@redocly/cli 2.43.1 → 2.43.3

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,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as T,b as O,c as A,d as E}from"./VK2PYQAI.js";import{c as m,k as C,r as $}from"./F4I4B6CF.js";import{a as R,b as y}from"./FJ3ZKIJG.js";import{a as q}from"./O6MCQRCP.js";import{O as u,c as H}from"./PQKTPLKO.js";import"./NEWT5A6S.js";import{e as z}from"./RFWIIJFG.js";import{createReadStream as F,createWriteStream as k,existsSync as V}from"node:fs";import{appendFile as N,mkdir as j,rm as _,writeFile as W}from"node:fs/promises";import B from"node:path";import{createInterface as G}from"node:readline";var w=class{outputPath;entriesPath;creatorVersion;writeChain=Promise.resolve();directoryEnsured=!1;started=!1;count=0;constructor(t,r){this.outputPath=B.resolve(process.cwd(),t),this.entriesPath=`${this.outputPath}.entries.tmp`,this.creatorVersion=r}get entryCount(){return this.count}add(t){let r=`${JSON.stringify(t)}
7
+ import{a as T,b as O,c as A,d as E}from"./K4MGAJAT.js";import{c as m,k as C,r as $}from"./3Q7NWMTP.js";import{a as R,b as y}from"./6HPPISLY.js";import{a as q}from"./O6MCQRCP.js";import{O as u,c as H}from"./DLYUMFFQ.js";import"./NEWT5A6S.js";import{e as z}from"./RFWIIJFG.js";import{createReadStream as F,createWriteStream as k,existsSync as V}from"node:fs";import{appendFile as N,mkdir as j,rm as _,writeFile as W}from"node:fs/promises";import B from"node:path";import{createInterface as G}from"node:readline";var w=class{outputPath;entriesPath;creatorVersion;writeChain=Promise.resolve();directoryEnsured=!1;started=!1;count=0;constructor(t,r){this.outputPath=B.resolve(process.cwd(),t),this.entriesPath=`${this.outputPath}.entries.tmp`,this.creatorVersion=r}get entryCount(){return this.count}add(t){let r=`${JSON.stringify(t)}
8
8
  `,n=this.writeChain.catch(()=>{}).then(()=>this.append(r)).then(()=>{this.count+=1});return this.writeChain=n.catch(()=>{}),n}async finalize(){await this.writeChain.catch(()=>{}),await this.ensureDirectory(),await this.writeDocument(),await _(this.entriesPath,{force:!0})}async append(t){if(await this.ensureDirectory(),!this.started){await W(this.entriesPath,t,"utf8"),this.started=!0;return}await N(this.entriesPath,t,"utf8")}async ensureDirectory(){this.directoryEnsured||(await j(B.dirname(this.outputPath),{recursive:!0}),this.directoryEnsured=!0)}async writeDocument(){let t=k(this.outputPath,{encoding:"utf8"}),r=n=>new Promise((o,s)=>{t.write(n,i=>i?s(i):o())});try{let n=JSON.stringify({name:"redocly-cli proxy",version:this.creatorVersion});await r(`{
9
9
  "log": {
10
10
  "version": "1.2",
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as oe,e as ae,f as ue,g as ce,h as b,i as de,k as H,l as V,m as pe,n as le,v as he,w as me}from"./F4I4B6CF.js";import{D as X,E as g,F as O,G as Z,H as $,I as C,K as S,M as y,O as w,Q as ee,R as te,S as Je,W as ne,Y as re,_ as se,aa as ie,c as l,p as Y,u as Q,x as We}from"./PQKTPLKO.js";import{e as J}from"./RFWIIJFG.js";import fe from"node:path";function R(t){return t?t.trim():""}function T(t){let e=R(t.operationId)||R(t.path);return[R(t.ruleId),R(t.severity),R(t.message),e,R(t.target),R(t.schemaPath)].join("")}var F=t=>X(S(t));function Ye(t){return t==="error"?"error":t==="warning"?"warning":"note"}function Qe(t){if(t==null)return"";let e=String(t);return!e.includes(",")&&!e.includes('"')&&!e.includes(`
7
+ import{a as oe,e as ae,f as ue,g as ce,h as b,i as de,k as H,l as V,m as pe,n as le,v as he,w as me}from"./3Q7NWMTP.js";import{D as X,E as g,F as O,G as Z,H as $,I as C,K as S,M as y,O as w,Q as ee,R as te,S as Je,W as ne,Y as re,_ as se,aa as ie,c as l,p as Y,u as Q,x as We}from"./DLYUMFFQ.js";import{e as J}from"./RFWIIJFG.js";import fe from"node:path";function R(t){return t?t.trim():""}function T(t){let e=R(t.operationId)||R(t.path);return[R(t.ruleId),R(t.severity),R(t.message),e,R(t.target),R(t.schemaPath)].join("")}var F=t=>X(S(t));function Ye(t){return t==="error"?"error":t==="warning"?"warning":"note"}function Qe(t){if(t==null)return"";let e=String(t);return!e.includes(",")&&!e.includes('"')&&!e.includes(`
8
8
  `)?e:`"${e.replace(/"/g,'""')}"`}function Xe(t){return fe.isAbsolute(t)?fe.relative(process.cwd(),t)||".":t}function Ze(t){if(!t)return null;let e=t.operationPathTemplate;return typeof e=="string"&&e.length>0?e:null}function et(t){return Object.entries(t).sort((e,r)=>{let n=r[1]-e[1];return n!==0?n:e[0].localeCompare(r[0])})}function tt(t){let e=[],r=new Map;for(let n of t){let s=T({ruleId:n.ruleId,severity:n.severity,message:n.message,operationId:n.operationId,path:n.path,target:n.target,schemaPath:n.schemaPath}),i=r.get(s);if(i!==void 0){e[i].occurrences+=1;continue}r.set(s,e.length),e.push({finding:n,occurrences:1})}return e}function nt(t){let e=tt(t.findings).map(n=>({occurrences:n.occurrences,exchangeIndex:n.finding.exchangeIndex,ruleId:n.finding.ruleId,severity:n.finding.severity,category:n.finding.category,message:n.finding.message,operationId:n.finding.operationId,specSource:n.finding.specSource,target:n.finding.target,schemaPath:n.finding.schemaPath,dataPath:n.finding.dataPath,details:n.finding.details,method:n.finding.method,url:n.finding.url,path:n.finding.path,status:n.finding.status})),r={run:{id:t.runId,specSource:t.meta.specSource,trafficPath:t.meta.trafficPath,format:t.meta.format,matchMode:t.meta.matchMode,server:t.meta.server,totalExchanges:t.summary.totalExchanges,documentedExchanges:t.summary.documentedExchanges,undocumentedExchanges:t.summary.undocumentedExchanges,skippedExchanges:t.summary.skippedExchanges,findingsBySeverity:t.summary.findingsBySeverity,findingsByRule:t.summary.findingsByRule,totalProblems:t.summary.totalProblemGroups,durationMs:t.summary.durationMs},problems:e};return`${JSON.stringify(r,null,2)}
9
9
  `}function rt(t){let e=["run_id","finding_id","exchange_index","severity","category","rule_id","message","method","path","url","status","operation_id","spec_source","target","schema_path","data_path"],r=t.findings.map(s=>[t.runId,s.id,s.exchangeIndex,s.severity,s.category,s.ruleId,s.message,s.method,s.path,s.url,s.status,s.operationId,s.specSource,s.target,s.schemaPath,s.dataPath]);return`${[e,...r].map(s=>s.map(Qe).join(",")).join(`
10
10
  `)}
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c as p}from"./P26PQ2RU.js";import{a as O}from"./RS5PUOTT.js";import{a as R}from"./7LVD3IVI.js";import{a as I}from"./O6MCQRCP.js";import{G as T,I as w,O as a}from"./PQKTPLKO.js";import{e as C}from"./RFWIIJFG.js";import{Buffer as P}from"node:buffer";import y from"node:crypto";import{mkdirSync as j,existsSync as F,writeFileSync as q,readFileSync as z,rmSync as M}from"node:fs";import{homedir as H}from"node:os";import B from"node:path";var l={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function G(){return process.env.REDOCLY_DOMAIN||l.us}var U=D((o,e)=>{try{let t=e||o?.resolvedConfig.residency;return W(t)?l[t]:t?new URL(t).origin:o?.resolvedConfig.scorecard?.fromProjectUrl?new URL(o.resolvedConfig.scorecard.fromProjectUrl).origin:l.us}catch{throw new f}});function x(o){try{U(void 0,o)}catch{return!1}return!0}function D(o){return(...e)=>{let t=o(...e);if(!t.startsWith("https://"))throw new f;return t}}var f=class extends Error{constructor(){super("Invalid Reunite URL")}};function W(o){return typeof o=="string"&&o in l}import*as k from"node:child_process";var g=C(I(),1);var N=C(O(),1);function b(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function S(o){let e=process.env.NO_PROXY||process.env.no_proxy;if(!e)return!1;let t=e.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!1;let r;try{r=new URL(o).hostname.toLowerCase()}catch{return!1}return t.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var _=async(o,{timeout:e,...t}={})=>{let r=b(),s=r&&!S(o),n,i=e?{connect:{timeout:e}}:{};return s?n=new g.ProxyAgent({uri:r,...i}):e&&(n=new g.Agent(i)),await fetch(o,{signal:e?AbortSignal.timeout(e):void 0,...t,dispatcher:n})};var c=class extends Error{constructor(t,r){super(t);this.status=r}status},h=class{constructor(e){this.command=e}command;sunsetWarnings=[];async request(e,t){let r={...t.headers,"user-agent":`redocly-cli/${R} ${this.command}`};try{let s=await _(e,{...t,headers:r});return this.collectSunsetWarning(s),s}catch(s){let n="Failed to fetch.";throw s.cause&&(n+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(n+=` Code: ${s.code||s.cause?.code}`),new Error(n)}}collectSunsetWarning(e){let t=this.getSunsetDate(e);if(!t)return;let r=new Date(t);t>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(e){let{headers:t}=e;if(!t)return;let r=t.get("sunset")||t.get("Sunset");if(r)return Date.parse(r)}},v=class{constructor(e,t,r){this.client=e;this.domain=t;this.apiKey=r}client;domain;apiKey;async getParsedResponse(e){let t=await e.json();if(e.ok)return t;throw new c(`${t.title||e.statusText||"Unknown error"}.`,e.status)}async getDefaultBranch(e,t){try{let r=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/source`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let s=`Failed to fetch default branch. ${r.message}`;throw r instanceof c?new c(s,r.status):new Error(s)}}async upsert(e,t,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes`,{timeout:p,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(s)}catch(s){let n=`Failed to upsert remote. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async push(e,t,r,s){let n=new globalThis.FormData;n.append("remoteId",r.remoteId),n.append("commit[message]",r.commit.message),n.append("commit[author][name]",r.commit.author.name),n.append("commit[author][email]",r.commit.author.email),n.append("commit[branchName]",r.commit.branchName),r.commit.url&&n.append("commit[url]",r.commit.url),r.commit.namespace&&n.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&n.append("commit[sha]",r.commit.sha),r.commit.repository&&n.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&n.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let u=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await L(i.stream)]);n.append(`files[${i.path}]`,u,i.path)}r.isMainBranch&&n.append("isMainBranch","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:n});return await this.getParsedResponse(i)}catch(i){let u=`Failed to push. ${i.message}`;throw i instanceof c?new c(u,i.status):new Error(u)}}async getRemotesList({organizationId:e,projectId:t,mountPath:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes?filter=mountPath:/${r}/`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get remote list. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async getPush({organizationId:e,projectId:t,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes/${r}`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get push status. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}},$=class{apiClient;command;remotes;constructor({domain:e,apiKey:t,command:r}){this.command=r,this.apiClient=new h(this.command),this.remotes=new v(this.apiClient,e,t)}reportSunsetWarnings(){let e=this.apiClient.sunsetWarnings;if(e.length){let[{isSunsetExpired:t,sunsetDate:r}]=e.sort((n,i)=>n.isSunsetExpired!==i.isSunsetExpired?n.isSunsetExpired?-1:1:n.sunsetDate>i.sunsetDate?1:-1),s='Update to the latest version by running "npm install @redocly/cli@latest".';t?a.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${s}
7
+ import{c as p}from"./P26PQ2RU.js";import{a as O}from"./RS5PUOTT.js";import{a as R}from"./A7L35TO3.js";import{a as I}from"./O6MCQRCP.js";import{G as T,I as w,O as a}from"./DLYUMFFQ.js";import{e as C}from"./RFWIIJFG.js";import{Buffer as P}from"node:buffer";import y from"node:crypto";import{mkdirSync as j,existsSync as F,writeFileSync as q,readFileSync as z,rmSync as M}from"node:fs";import{homedir as H}from"node:os";import B from"node:path";var l={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function G(){return process.env.REDOCLY_DOMAIN||l.us}var U=D((o,e)=>{try{let t=e||o?.resolvedConfig.residency;return W(t)?l[t]:t?new URL(t).origin:o?.resolvedConfig.scorecard?.fromProjectUrl?new URL(o.resolvedConfig.scorecard.fromProjectUrl).origin:l.us}catch{throw new f}});function x(o){try{U(void 0,o)}catch{return!1}return!0}function D(o){return(...e)=>{let t=o(...e);if(!t.startsWith("https://"))throw new f;return t}}var f=class extends Error{constructor(){super("Invalid Reunite URL")}};function W(o){return typeof o=="string"&&o in l}import*as k from"node:child_process";var g=C(I(),1);var N=C(O(),1);function b(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function S(o){let e=process.env.NO_PROXY||process.env.no_proxy;if(!e)return!1;let t=e.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!1;let r;try{r=new URL(o).hostname.toLowerCase()}catch{return!1}return t.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var _=async(o,{timeout:e,...t}={})=>{let r=b(),s=r&&!S(o),n,i=e?{connect:{timeout:e}}:{};return s?n=new g.ProxyAgent({uri:r,...i}):e&&(n=new g.Agent(i)),await fetch(o,{signal:e?AbortSignal.timeout(e):void 0,...t,dispatcher:n})};var c=class extends Error{constructor(t,r){super(t);this.status=r}status},h=class{constructor(e){this.command=e}command;sunsetWarnings=[];async request(e,t){let r={...t.headers,"user-agent":`redocly-cli/${R} ${this.command}`};try{let s=await _(e,{...t,headers:r});return this.collectSunsetWarning(s),s}catch(s){let n="Failed to fetch.";throw s.cause&&(n+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(n+=` Code: ${s.code||s.cause?.code}`),new Error(n)}}collectSunsetWarning(e){let t=this.getSunsetDate(e);if(!t)return;let r=new Date(t);t>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(e){let{headers:t}=e;if(!t)return;let r=t.get("sunset")||t.get("Sunset");if(r)return Date.parse(r)}},v=class{constructor(e,t,r){this.client=e;this.domain=t;this.apiKey=r}client;domain;apiKey;async getParsedResponse(e){let t=await e.json();if(e.ok)return t;throw new c(`${t.title||e.statusText||"Unknown error"}.`,e.status)}async getDefaultBranch(e,t){try{let r=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/source`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let s=`Failed to fetch default branch. ${r.message}`;throw r instanceof c?new c(s,r.status):new Error(s)}}async upsert(e,t,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes`,{timeout:p,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(s)}catch(s){let n=`Failed to upsert remote. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async push(e,t,r,s){let n=new globalThis.FormData;n.append("remoteId",r.remoteId),n.append("commit[message]",r.commit.message),n.append("commit[author][name]",r.commit.author.name),n.append("commit[author][email]",r.commit.author.email),n.append("commit[branchName]",r.commit.branchName),r.commit.url&&n.append("commit[url]",r.commit.url),r.commit.namespace&&n.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&n.append("commit[sha]",r.commit.sha),r.commit.repository&&n.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&n.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let u=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await L(i.stream)]);n.append(`files[${i.path}]`,u,i.path)}r.isMainBranch&&n.append("isMainBranch","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:n});return await this.getParsedResponse(i)}catch(i){let u=`Failed to push. ${i.message}`;throw i instanceof c?new c(u,i.status):new Error(u)}}async getRemotesList({organizationId:e,projectId:t,mountPath:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes?filter=mountPath:/${r}/`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get remote list. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async getPush({organizationId:e,projectId:t,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes/${r}`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get push status. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}},$=class{apiClient;command;remotes;constructor({domain:e,apiKey:t,command:r}){this.command=r,this.apiClient=new h(this.command),this.remotes=new v(this.apiClient,e,t)}reportSunsetWarnings(){let e=this.apiClient.sunsetWarnings;if(e.length){let[{isSunsetExpired:t,sunsetDate:r}]=e.sort((n,i)=>n.isSunsetExpired!==i.isSunsetExpired?n.isSunsetExpired?-1:1:n.sunsetDate>i.sunsetDate?1:-1),s='Update to the latest version by running "npm install @redocly/cli@latest".';t?a.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${s}
8
8
 
9
9
  `):a.warn(`The "${this.command}" command will be incompatible with your version of Redocly CLI after ${r.toLocaleString()}. ${s}
10
10
 
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c as Wz,e as jz}from"./UN3N7VZE.js";import{b as g1}from"./FJ3ZKIJG.js";import{a as ere}from"./RS5PUOTT.js";import{d as Uz,e as Hz}from"./7LVD3IVI.js";import{a as tre,b as nre}from"./O6PRCLSV.js";import"./32XCOMOR.js";import{O as zv,k as Jne,s as p1,v as zz,w as $ne}from"./PQKTPLKO.js";import"./NEWT5A6S.js";import{a as Fr,b as Bz,c as j,d as Kne,e as Bv,f as Zne}from"./RFWIIJFG.js";var Yz=j((Vz,Gz)=>{(function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.9";e.utils={},e.utils.warn=(function(t){return function(n){t.console&&console.warn&&console.warn(n)}})(this),e.utils.asString=function(t){return t==null?"":t.toString()},e.utils.clone=function(t){if(t==null)return t;for(var n=Object.create(null),r=Object.keys(t),i=0;i<r.length;i++){var o=r[i],s=t[o];if(Array.isArray(s)){n[o]=s.slice();continue}if(typeof s=="string"||typeof s=="number"||typeof s=="boolean"){n[o]=s;continue}throw new TypeError("clone is not deep and does not support nested objects")}return n},e.FieldRef=function(t,n,r){this.docRef=t,this.fieldName=n,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var n=t.indexOf(e.FieldRef.joiner);if(n===-1)throw"malformed field ref string";var r=t.slice(0,n),i=t.slice(n+1);return new e.FieldRef(i,r,t)},e.FieldRef.prototype.toString=function(){return this._stringValue==null&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue};e.Set=function(t){if(this.elements=Object.create(null),t){this.length=t.length;for(var n=0;n<this.length;n++)this.elements[t[n]]=!0}else this.length=0},e.Set.complete={intersect:function(t){return t},union:function(){return this},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(t){return t},contains:function(){return!1}},e.Set.prototype.contains=function(t){return!!this.elements[t]},e.Set.prototype.intersect=function(t){var n,r,i,o=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(n=this,r=t):(n=t,r=this),i=Object.keys(n.elements);for(var s=0;s<i.length;s++){var a=i[s];a in r.elements&&o.push(a)}return new e.Set(o)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(t,n){var r=0;for(var i in t)i!="_index"&&(r+=Object.keys(t[i]).length);var o=(n-r+.5)/(r+.5);return Math.log(1+Math.abs(o))},e.Token=function(t,n){this.str=t||"",this.metadata=n||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(t){return this.str=t(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(n){return n},new e.Token(t(this.str,this.metadata),this.metadata)};e.tokenizer=function(t,n){if(t==null||t==null)return[];if(Array.isArray(t))return t.map(function(d){return new e.Token(e.utils.asString(d).toLowerCase(),e.utils.clone(n))});for(var r=t.toString().toLowerCase(),i=r.length,o=[],s=0,a=0;s<=i;s++){var l=r.charAt(s),c=s-a;if(l.match(e.tokenizer.separator)||s==i){if(c>0){var y=e.utils.clone(n)||{};y.position=[a,c],y.index=o.length,o.push(new e.Token(r.slice(a,s),y))}a=s+1}}return o},e.tokenizer.separator=/[\s\-]+/;e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
7
+ import{c as Wz,e as jz}from"./WF2UYHZN.js";import{b as g1}from"./6HPPISLY.js";import{a as ere}from"./RS5PUOTT.js";import{d as Uz,e as Hz}from"./A7L35TO3.js";import{a as tre,b as nre}from"./O6PRCLSV.js";import"./32XCOMOR.js";import{O as zv,k as Jne,s as p1,v as zz,w as $ne}from"./DLYUMFFQ.js";import"./NEWT5A6S.js";import{a as Fr,b as Bz,c as j,d as Kne,e as Bv,f as Zne}from"./RFWIIJFG.js";var Yz=j((Vz,Gz)=>{(function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.9";e.utils={},e.utils.warn=(function(t){return function(n){t.console&&console.warn&&console.warn(n)}})(this),e.utils.asString=function(t){return t==null?"":t.toString()},e.utils.clone=function(t){if(t==null)return t;for(var n=Object.create(null),r=Object.keys(t),i=0;i<r.length;i++){var o=r[i],s=t[o];if(Array.isArray(s)){n[o]=s.slice();continue}if(typeof s=="string"||typeof s=="number"||typeof s=="boolean"){n[o]=s;continue}throw new TypeError("clone is not deep and does not support nested objects")}return n},e.FieldRef=function(t,n,r){this.docRef=t,this.fieldName=n,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var n=t.indexOf(e.FieldRef.joiner);if(n===-1)throw"malformed field ref string";var r=t.slice(0,n),i=t.slice(n+1);return new e.FieldRef(i,r,t)},e.FieldRef.prototype.toString=function(){return this._stringValue==null&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue};e.Set=function(t){if(this.elements=Object.create(null),t){this.length=t.length;for(var n=0;n<this.length;n++)this.elements[t[n]]=!0}else this.length=0},e.Set.complete={intersect:function(t){return t},union:function(){return this},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(t){return t},contains:function(){return!1}},e.Set.prototype.contains=function(t){return!!this.elements[t]},e.Set.prototype.intersect=function(t){var n,r,i,o=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(n=this,r=t):(n=t,r=this),i=Object.keys(n.elements);for(var s=0;s<i.length;s++){var a=i[s];a in r.elements&&o.push(a)}return new e.Set(o)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(t,n){var r=0;for(var i in t)i!="_index"&&(r+=Object.keys(t[i]).length);var o=(n-r+.5)/(r+.5);return Math.log(1+Math.abs(o))},e.Token=function(t,n){this.str=t||"",this.metadata=n||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(t){return this.str=t(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(n){return n},new e.Token(t(this.str,this.metadata),this.metadata)};e.tokenizer=function(t,n){if(t==null||t==null)return[];if(Array.isArray(t))return t.map(function(d){return new e.Token(e.utils.asString(d).toLowerCase(),e.utils.clone(n))});for(var r=t.toString().toLowerCase(),i=r.length,o=[],s=0,a=0;s<=i;s++){var l=r.charAt(s),c=s-a;if(l.match(e.tokenizer.separator)||s==i){if(c>0){var y=e.utils.clone(n)||{};y.position=[a,c],y.index=o.length,o.push(new e.Token(r.slice(a,s),y))}a=s+1}}return o},e.tokenizer.separator=/[\s\-]+/;e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
8
8
  `,t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(r){var i=e.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(n){e.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},e.Pipeline.prototype.remove=function(t){var n=this._stack.indexOf(t);n!=-1&&this._stack.splice(n,1)},e.Pipeline.prototype.run=function(t){for(var n=this._stack.length,r=0;r<n;r++){for(var i=this._stack[r],o=[],s=0;s<t.length;s++){var a=i(t[s],s,t);if(!(a==null||a===""))if(Array.isArray(a))for(var l=0;l<a.length;l++)o.push(a[l]);else o.push(a)}t=o}return t},e.Pipeline.prototype.runString=function(t,n){var r=new e.Token(t,n);return this.run([r]).map(function(i){return i.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})};e.Vector=function(t){this._magnitude=0,this.elements=t||[]},e.Vector.prototype.positionForIndex=function(t){if(this.elements.length==0)return 0;for(var n=0,r=this.elements.length/2,i=r-n,o=Math.floor(i/2),s=this.elements[o*2];i>1&&(s<t&&(n=o),s>t&&(r=o),s!=t);)i=r-n,o=n+Math.floor(i/2),s=this.elements[o*2];if(s==t||s>t)return o*2;if(s<t)return(o+1)*2},e.Vector.prototype.insert=function(t,n){this.upsert(t,n,function(){throw"duplicate index"})},e.Vector.prototype.upsert=function(t,n,r){this._magnitude=0;var i=this.positionForIndex(t);this.elements[i]==t?this.elements[i+1]=r(this.elements[i+1],n):this.elements.splice(i,0,t,n)},e.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t=0,n=this.elements.length,r=1;r<n;r+=2){var i=this.elements[r];t+=i*i}return this._magnitude=Math.sqrt(t)},e.Vector.prototype.dot=function(t){for(var n=0,r=this.elements,i=t.elements,o=r.length,s=i.length,a=0,l=0,c=0,y=0;c<o&&y<s;)a=r[c],l=i[y],a<l?c+=2:a>l?y+=2:a==l&&(n+=r[c+1]*i[y+1],c+=2,y+=2);return n},e.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),n=1,r=0;n<this.elements.length;n+=2,r++)t[r]=this.elements[n];return t},e.Vector.prototype.toJSON=function(){return this.elements};e.stemmer=(function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[^aeiou]",i="[aeiouy]",o=r+"[^aeiouy]*",s=i+"[aeiou]*",a="^("+o+")?"+s+o,l="^("+o+")?"+s+o+"("+s+")?$",c="^("+o+")?"+s+o+s+o,y="^("+o+")?"+i,d=new RegExp(a),v=new RegExp(c),x=new RegExp(l),T=new RegExp(y),O=/^(.+?)(ss|i)es$/,k=/^(.+?)([^s])s$/,R=/^(.+?)eed$/,N=/^(.+?)(ed|ing)$/,W=/.$/,V=/(at|bl|iz)$/,$=new RegExp("([^aeiouylsz])\\1$"),z=new RegExp("^"+o+i+"[^aeiouwxy]$"),oe=/^(.+?[^aeiou])y$/,H=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,ie=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,re=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,fe=/^(.+?)(s|t)(ion)$/,he=/^(.+?)e$/,Y=/ll$/,le=new RegExp("^"+o+i+"[^aeiouwxy]$"),de=function(ce){var Ee,pe,Oe,ne,_e,De,at;if(ce.length<3)return ce;if(Oe=ce.substr(0,1),Oe=="y"&&(ce=Oe.toUpperCase()+ce.substr(1)),ne=O,_e=k,ne.test(ce)?ce=ce.replace(ne,"$1$2"):_e.test(ce)&&(ce=ce.replace(_e,"$1$2")),ne=R,_e=N,ne.test(ce)){var Ge=ne.exec(ce);ne=d,ne.test(Ge[1])&&(ne=W,ce=ce.replace(ne,""))}else if(_e.test(ce)){var Ge=_e.exec(ce);Ee=Ge[1],_e=T,_e.test(Ee)&&(ce=Ee,_e=V,De=$,at=z,_e.test(ce)?ce=ce+"e":De.test(ce)?(ne=W,ce=ce.replace(ne,"")):at.test(ce)&&(ce=ce+"e"))}if(ne=oe,ne.test(ce)){var Ge=ne.exec(ce);Ee=Ge[1],ce=Ee+"i"}if(ne=H,ne.test(ce)){var Ge=ne.exec(ce);Ee=Ge[1],pe=Ge[2],ne=d,ne.test(Ee)&&(ce=Ee+t[pe])}if(ne=ie,ne.test(ce)){var Ge=ne.exec(ce);Ee=Ge[1],pe=Ge[2],ne=d,ne.test(Ee)&&(ce=Ee+n[pe])}if(ne=re,_e=fe,ne.test(ce)){var Ge=ne.exec(ce);Ee=Ge[1],ne=v,ne.test(Ee)&&(ce=Ee)}else if(_e.test(ce)){var Ge=_e.exec(ce);Ee=Ge[1]+Ge[2],_e=v,_e.test(Ee)&&(ce=Ee)}if(ne=he,ne.test(ce)){var Ge=ne.exec(ce);Ee=Ge[1],ne=v,_e=x,De=le,(ne.test(Ee)||_e.test(Ee)&&!De.test(Ee))&&(ce=Ee)}return ne=Y,_e=v,ne.test(ce)&&_e.test(ce)&&(ne=W,ce=ce.replace(ne,"")),Oe=="y"&&(ce=Oe.toLowerCase()+ce.substr(1)),ce};return function(ve){return ve.update(de)}})(),e.Pipeline.registerFunction(e.stemmer,"stemmer");e.generateStopWordFilter=function(t){var n=t.reduce(function(r,i){return r[i]=i,r},{});return function(r){if(r&&n[r.toString()]!==r.toString())return r}},e.stopWordFilter=e.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),e.Pipeline.registerFunction(e.stopWordFilter,"stopWordFilter");e.trimmer=function(t){return t.update(function(n){return n.replace(/^\W+/,"").replace(/\W+$/,"")})},e.Pipeline.registerFunction(e.trimmer,"trimmer");e.TokenSet=function(){this.final=!1,this.edges={},this.id=e.TokenSet._nextId,e.TokenSet._nextId+=1},e.TokenSet._nextId=1,e.TokenSet.fromArray=function(t){for(var n=new e.TokenSet.Builder,r=0,i=t.length;r<i;r++)n.insert(t[r]);return n.finish(),n.root},e.TokenSet.fromClause=function(t){return"editDistance"in t?e.TokenSet.fromFuzzyString(t.term,t.editDistance):e.TokenSet.fromString(t.term)},e.TokenSet.fromFuzzyString=function(t,n){for(var r=new e.TokenSet,i=[{node:r,editsRemaining:n,str:t}];i.length;){var o=i.pop();if(o.str.length>0){var s=o.str.charAt(0),a;s in o.node.edges?a=o.node.edges[s]:(a=new e.TokenSet,o.node.edges[s]=a),o.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:o.editsRemaining,str:o.str.slice(1)})}if(o.editsRemaining!=0){if("*"in o.node.edges)var l=o.node.edges["*"];else{var l=new e.TokenSet;o.node.edges["*"]=l}if(o.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:o.editsRemaining-1,str:o.str}),o.str.length>1&&i.push({node:o.node,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)}),o.str.length==1&&(o.node.final=!0),o.str.length>=1){if("*"in o.node.edges)var c=o.node.edges["*"];else{var c=new e.TokenSet;o.node.edges["*"]=c}o.str.length==1&&(c.final=!0),i.push({node:c,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)})}if(o.str.length>1){var y=o.str.charAt(0),d=o.str.charAt(1),v;d in o.node.edges?v=o.node.edges[d]:(v=new e.TokenSet,o.node.edges[d]=v),o.str.length==1&&(v.final=!0),i.push({node:v,editsRemaining:o.editsRemaining-1,str:y+o.str.slice(2)})}}}return r},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,r=n,i=0,o=t.length;i<o;i++){var s=t[i],a=i==o-1;if(s=="*")n.edges[s]=n,n.final=a;else{var l=new e.TokenSet;l.final=a,n.edges[s]=l,n=l}}return r},e.TokenSet.prototype.toArray=function(){for(var t=[],n=[{prefix:"",node:this}];n.length;){var r=n.pop(),i=Object.keys(r.node.edges),o=i.length;r.node.final&&(r.prefix.charAt(0),t.push(r.prefix));for(var s=0;s<o;s++){var a=i[s];n.push({prefix:r.prefix.concat(a),node:r.node.edges[a]})}}return t},e.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var t=this.final?"1":"0",n=Object.keys(this.edges).sort(),r=n.length,i=0;i<r;i++){var o=n[i],s=this.edges[o];t=t+o+s.id}return t},e.TokenSet.prototype.intersect=function(t){for(var n=new e.TokenSet,r=void 0,i=[{qNode:t,output:n,node:this}];i.length;){r=i.pop();for(var o=Object.keys(r.qNode.edges),s=o.length,a=Object.keys(r.node.edges),l=a.length,c=0;c<s;c++)for(var y=o[c],d=0;d<l;d++){var v=a[d];if(v==y||y=="*"){var x=r.node.edges[v],T=r.qNode.edges[y],O=x.final&&T.final,k=void 0;v in r.output.edges?(k=r.output.edges[v],k.final=k.final||O):(k=new e.TokenSet,k.final=O,r.output.edges[v]=k),i.push({qNode:T,output:k,node:x})}}}return n},e.TokenSet.Builder=function(){this.previousWord="",this.root=new e.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},e.TokenSet.Builder.prototype.insert=function(t){var n,r=0;if(t<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<t.length&&i<this.previousWord.length&&t[i]==this.previousWord[i];i++)r++;this.minimize(r),this.uncheckedNodes.length==0?n=this.root:n=this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var i=r;i<t.length;i++){var o=new e.TokenSet,s=t[i];n.edges[s]=o,this.uncheckedNodes.push({parent:n,char:s,child:o}),n=o}n.final=!0,this.previousWord=t},e.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},e.TokenSet.Builder.prototype.minimize=function(t){for(var n=this.uncheckedNodes.length-1;n>=t;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};e.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},e.Index.prototype.search=function(t){return this.query(function(n){var r=new e.QueryParser(t,n);r.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),r=Object.create(null),i=Object.create(null),o=Object.create(null),s=Object.create(null),a=Object.create(null),l=0;l<this.fields.length;l++)i[this.fields[l]]=new e.Vector;t.call(n,n);for(var l=0;l<n.clauses.length;l++){var c=n.clauses[l],y=null,d=e.Set.empty;c.usePipeline?y=this.pipeline.runString(c.term,{fields:c.fields}):y=[c.term];for(var v=0;v<y.length;v++){var x=y[v];c.term=x;var T=e.TokenSet.fromClause(c),O=this.tokenSet.intersect(T).toArray();if(O.length===0&&c.presence===e.Query.presence.REQUIRED){for(var k=0;k<c.fields.length;k++){var R=c.fields[k];s[R]=e.Set.empty}break}for(var N=0;N<O.length;N++)for(var W=O[N],V=this.invertedIndex[W],$=V._index,k=0;k<c.fields.length;k++){var R=c.fields[k],z=V[R],oe=Object.keys(z),H=W+"/"+R,ie=new e.Set(oe);if(c.presence==e.Query.presence.REQUIRED&&(d=d.union(ie),s[R]===void 0&&(s[R]=e.Set.complete)),c.presence==e.Query.presence.PROHIBITED){a[R]===void 0&&(a[R]=e.Set.empty),a[R]=a[R].union(ie);continue}if(i[R].upsert($,c.boost,function(Q,Le){return Q+Le}),!o[H]){for(var re=0;re<oe.length;re++){var fe=oe[re],he=new e.FieldRef(fe,R),Y=z[fe],le;(le=r[he])===void 0?r[he]=new e.MatchData(W,R,Y):le.add(W,R,Y)}o[H]=!0}}}if(c.presence===e.Query.presence.REQUIRED)for(var k=0;k<c.fields.length;k++){var R=c.fields[k];s[R]=s[R].intersect(d)}}for(var de=e.Set.complete,ve=e.Set.empty,l=0;l<this.fields.length;l++){var R=this.fields[l];s[R]&&(de=de.intersect(s[R])),a[R]&&(ve=ve.union(a[R]))}var ce=Object.keys(r),Ee=[],pe=Object.create(null);if(n.isNegated()){ce=Object.keys(this.fieldVectors);for(var l=0;l<ce.length;l++){var he=ce[l],Oe=e.FieldRef.fromString(he);r[he]=new e.MatchData}}for(var l=0;l<ce.length;l++){var Oe=e.FieldRef.fromString(ce[l]),ne=Oe.docRef;if(de.contains(ne)&&!ve.contains(ne)){var _e=this.fieldVectors[Oe],De=i[Oe.fieldName].similarity(_e),at;if((at=pe[ne])!==void 0)at.score+=De,at.matchData.combine(r[Oe]);else{var Ge={ref:ne,score:De,matchData:r[Oe]};pe[ne]=Ge,Ee.push(Ge)}}}return Ee.sort(function(Se,Fe){return Fe.score-Se.score})},e.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(r){return[r,this.invertedIndex[r]]},this),n=Object.keys(this.fieldVectors).map(function(r){return[r,this.fieldVectors[r].toJSON()]},this);return{version:e.version,fields:this.fields,fieldVectors:n,invertedIndex:t,pipeline:this.pipeline.toJSON()}},e.Index.load=function(t){var n={},r={},i=t.fieldVectors,o=Object.create(null),s=t.invertedIndex,a=new e.TokenSet.Builder,l=e.Pipeline.load(t.pipeline);t.version!=e.version&&e.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+e.version+"' does not match serialized index '"+t.version+"'");for(var c=0;c<i.length;c++){var y=i[c],d=y[0],v=y[1];r[d]=new e.Vector(v)}for(var c=0;c<s.length;c++){var y=s[c],x=y[0],T=y[1];a.insert(x),o[x]=T}return a.finish(),n.fields=t.fields,n.fieldVectors=r,n.invertedIndex=o,n.tokenSet=a.root,n.pipeline=l,new e.Index(n)};e.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=e.tokenizer,this.pipeline=new e.Pipeline,this.searchPipeline=new e.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},e.Builder.prototype.ref=function(t){this._ref=t},e.Builder.prototype.field=function(t,n){if(/\//.test(t))throw new RangeError("Field '"+t+"' contains illegal character '/'");this._fields[t]=n||{}},e.Builder.prototype.b=function(t){t<0?this._b=0:t>1?this._b=1:this._b=t},e.Builder.prototype.k1=function(t){this._k1=t},e.Builder.prototype.add=function(t,n){var r=t[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var o=0;o<i.length;o++){var s=i[o],a=this._fields[s].extractor,l=a?a(t):t[s],c=this.tokenizer(l,{fields:[s]}),y=this.pipeline.run(c),d=new e.FieldRef(r,s),v=Object.create(null);this.fieldTermFrequencies[d]=v,this.fieldLengths[d]=0,this.fieldLengths[d]+=y.length;for(var x=0;x<y.length;x++){var T=y[x];if(v[T]==null&&(v[T]=0),v[T]+=1,this.invertedIndex[T]==null){var O=Object.create(null);O._index=this.termIndex,this.termIndex+=1;for(var k=0;k<i.length;k++)O[i[k]]=Object.create(null);this.invertedIndex[T]=O}this.invertedIndex[T][s][r]==null&&(this.invertedIndex[T][s][r]=Object.create(null));for(var R=0;R<this.metadataWhitelist.length;R++){var N=this.metadataWhitelist[R],W=T.metadata[N];this.invertedIndex[T][s][r][N]==null&&(this.invertedIndex[T][s][r][N]=[]),this.invertedIndex[T][s][r][N].push(W)}}}},e.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),n=t.length,r={},i={},o=0;o<n;o++){var s=e.FieldRef.fromString(t[o]),a=s.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[s]}for(var l=Object.keys(this._fields),o=0;o<l.length;o++){var c=l[o];r[c]=r[c]/i[c]}this.averageFieldLength=r},e.Builder.prototype.createFieldVectors=function(){for(var t={},n=Object.keys(this.fieldTermFrequencies),r=n.length,i=Object.create(null),o=0;o<r;o++){for(var s=e.FieldRef.fromString(n[o]),a=s.fieldName,l=this.fieldLengths[s],c=new e.Vector,y=this.fieldTermFrequencies[s],d=Object.keys(y),v=d.length,x=this._fields[a].boost||1,T=this._documents[s.docRef].boost||1,O=0;O<v;O++){var k=d[O],R=y[k],N=this.invertedIndex[k]._index,W,V,$;i[k]===void 0?(W=e.idf(this.invertedIndex[k],this.documentCount),i[k]=W):W=i[k],V=W*((this._k1+1)*R)/(this._k1*(1-this._b+this._b*(l/this.averageFieldLength[a]))+R),V*=x,V*=T,$=Math.round(V*1e3)/1e3,c.insert(N,$)}t[s]=c}this.fieldVectors=t},e.Builder.prototype.createTokenSet=function(){this.tokenSet=e.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},e.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new e.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},e.Builder.prototype.use=function(t){var n=Array.prototype.slice.call(arguments,1);n.unshift(this),t.apply(this,n)},e.MatchData=function(t,n,r){for(var i=Object.create(null),o=Object.keys(r||{}),s=0;s<o.length;s++){var a=o[s];i[a]=r[a].slice()}this.metadata=Object.create(null),t!==void 0&&(this.metadata[t]=Object.create(null),this.metadata[t][n]=i)},e.MatchData.prototype.combine=function(t){for(var n=Object.keys(t.metadata),r=0;r<n.length;r++){var i=n[r],o=Object.keys(t.metadata[i]);this.metadata[i]==null&&(this.metadata[i]=Object.create(null));for(var s=0;s<o.length;s++){var a=o[s],l=Object.keys(t.metadata[i][a]);this.metadata[i][a]==null&&(this.metadata[i][a]=Object.create(null));for(var c=0;c<l.length;c++){var y=l[c];this.metadata[i][a][y]==null?this.metadata[i][a][y]=t.metadata[i][a][y]:this.metadata[i][a][y]=this.metadata[i][a][y].concat(t.metadata[i][a][y])}}}},e.MatchData.prototype.add=function(t,n,r){if(!(t in this.metadata)){this.metadata[t]=Object.create(null),this.metadata[t][n]=r;return}if(!(n in this.metadata[t])){this.metadata[t][n]=r;return}for(var i=Object.keys(r),o=0;o<i.length;o++){var s=i[o];s in this.metadata[t][n]?this.metadata[t][n][s]=this.metadata[t][n][s].concat(r[s]):this.metadata[t][n][s]=r[s]}},e.Query=function(t){this.clauses=[],this.allFields=t},e.Query.wildcard=new String("*"),e.Query.wildcard.NONE=0,e.Query.wildcard.LEADING=1,e.Query.wildcard.TRAILING=2,e.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},e.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=e.Query.wildcard.NONE),t.wildcard&e.Query.wildcard.LEADING&&t.term.charAt(0)!=e.Query.wildcard&&(t.term="*"+t.term),t.wildcard&e.Query.wildcard.TRAILING&&t.term.slice(-1)!=e.Query.wildcard&&(t.term=""+t.term+"*"),"presence"in t||(t.presence=e.Query.presence.OPTIONAL),this.clauses.push(t),this},e.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=e.Query.presence.PROHIBITED)return!1;return!0},e.Query.prototype.term=function(t,n){if(Array.isArray(t))return t.forEach(function(i){this.term(i,e.utils.clone(n))},this),this;var r=n||{};return r.term=t.toString(),this.clause(r),this},e.QueryParseError=function(t,n,r){this.name="QueryParseError",this.message=t,this.start=n,this.end=r},e.QueryParseError.prototype=new Error,e.QueryLexer=function(t){this.lexemes=[],this.str=t,this.length=t.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},e.QueryLexer.prototype.run=function(){for(var t=e.QueryLexer.lexText;t;)t=t(this)},e.QueryLexer.prototype.sliceString=function(){for(var t=[],n=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],t.push(this.str.slice(n,r)),n=r+1;return t.push(this.str.slice(n,this.pos)),this.escapeCharPositions.length=0,t.join("")},e.QueryLexer.prototype.emit=function(t){this.lexemes.push({type:t,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},e.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},e.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,n;do t=this.next(),n=t.charCodeAt(0);while(n>47&&n<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos<this.length},e.QueryLexer.EOS="EOS",e.QueryLexer.FIELD="FIELD",e.QueryLexer.TERM="TERM",e.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",e.QueryLexer.BOOST="BOOST",e.QueryLexer.PRESENCE="PRESENCE",e.QueryLexer.lexField=function(t){return t.backup(),t.emit(e.QueryLexer.FIELD),t.ignore(),e.QueryLexer.lexText},e.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var n=t.next();if(n==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){t.escapeCharacter();continue}if(n==":")return e.QueryLexer.lexField;if(n=="~")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if(n=="^")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if(n=="+"&&t.width()===1||n=="-"&&t.width()===1)return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(n.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}},e.QueryParser=function(t,n){this.lexer=new e.QueryLexer(t),this.query=n,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},e.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},e.QueryParser.parseClause=function(t){var n=t.peekLexeme();if(n!=null)switch(n.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new e.QueryParseError(r,n.start,n.end)}},e.QueryParser.parsePresence=function(t){var n=t.consumeLexeme();if(n!=null){switch(n.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(r,n.start,n.end)}var i=t.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(i.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var r=t.query.allFields.map(function(s){return"'"+s+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.fields=[n.str];var o=t.peekLexeme();if(o==null){var i="expecting term, found nothing";throw new e.QueryParseError(i,n.start,n.end)}if(o.type===e.QueryLexer.TERM)return e.QueryParser.parseTerm;var i="expecting term, found '"+o.type+"'";throw new e.QueryParseError(i,o.start,o.end)}},e.QueryParser.parseTerm=function(t){var n=t.consumeLexeme();if(n!=null){t.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var r=t.peekLexeme();if(r==null){t.nextClause();return}switch(r.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.editDistance=r;var o=t.peekLexeme();if(o==null){t.nextClause();return}switch(o.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+o.type+"'";throw new e.QueryParseError(i,o.start,o.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.boost=r;var o=t.peekLexeme();if(o==null){t.nextClause();return}switch(o.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+o.type+"'";throw new e.QueryParseError(i,o.start,o.end)}}},(function(t,n){typeof define=="function"&&define.amd?define(n):typeof Vz=="object"?Gz.exports=n():t.lunr=n()})(this,function(){return e})})()});var qz=j((ZFe,Xz)=>{"use strict";function rre(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}Xz.exports=rre()});var Zz=j((JFe,Kz)=>{"use strict";var Qz=qz();Kz.exports=function(t,n){if(t){n.then(function(r){Qz(function(){t(null,r)})},function(r){Qz(function(){t(r)})});return}else return n}});var r5=j(($Fe,n5)=>{n5.exports=kS;kS.default=kS;kS.stable=e5;kS.stableStringify=e5;var m1="[...]",Jz="[Circular]",Py=[],Cy=[];function $z(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function kS(e,t,n,r){typeof r>"u"&&(r=$z()),VA(e,"",0,[],void 0,0,r);var i;try{Cy.length===0?i=JSON.stringify(e,t,n):i=JSON.stringify(e,t5(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Py.length!==0;){var o=Py.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function Uv(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);i.get!==void 0?i.configurable?(Object.defineProperty(r,n,{value:e}),Py.push([r,n,t,i])):Cy.push([t,n,e]):(r[n]=e,Py.push([r,n,t]))}function VA(e,t,n,r,i,o,s){o+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<r.length;a++)if(r[a]===e){Uv(Jz,e,t,i);return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){Uv(m1,e,t,i);return}if(typeof s.edgesLimit<"u"&&n+1>s.edgesLimit){Uv(m1,e,t,i);return}if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)VA(e[a],a,a,r,e,o,s);else{var l=Object.keys(e);for(a=0;a<l.length;a++){var c=l[a];VA(e[c],c,a,r,e,o,s)}}r.pop()}}function ire(e,t){return e<t?-1:e>t?1:0}function e5(e,t,n,r){typeof r>"u"&&(r=$z());var i=GA(e,"",0,[],void 0,0,r)||e,o;try{Cy.length===0?o=JSON.stringify(i,t,n):o=JSON.stringify(i,t5(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Py.length!==0;){var s=Py.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return o}function GA(e,t,n,r,i,o,s){o+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<r.length;a++)if(r[a]===e){Uv(Jz,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){Uv(m1,e,t,i);return}if(typeof s.edgesLimit<"u"&&n+1>s.edgesLimit){Uv(m1,e,t,i);return}if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)GA(e[a],a,a,r,e,o,s);else{var l={},c=Object.keys(e).sort(ire);for(a=0;a<c.length;a++){var y=c[a];GA(e[y],y,a,r,e,o,s),l[y]=e[y]}if(typeof i<"u")Py.push([i,t,e]),i[t]=l;else return l}r.pop()}}function t5(e){return e=typeof e<"u"?e:function(t,n){return n},function(t,n){if(Cy.length>0)for(var r=0;r<Cy.length;r++){var i=Cy[r];if(i[1]===t&&i[0]===n){n=i[2],Cy.splice(r,1);break}}return e.call(this,t,n)}}});var o5=j((e3e,i5)=>{i5.exports=(function(e,t){e||(e=document),t||(t=window);var n=[],r,i=!1,o=e.documentElement,s=function(){},a,l="hidden",c="visibilitychange";e.webkitHidden!==void 0&&(l="webkitHidden",c="webkitvisibilitychange"),t.getComputedStyle||x();for(var y=["","-webkit-","-moz-","-ms-"],d=document.createElement("div"),v=y.length-1;v>=0;v--){try{d.style.position=y[v]+"sticky"}catch{}d.style.position!=""&&x()}k();function x(){pe=at=Oe=ne=_e=De=s}function T(Se,Fe){for(key in Fe)Fe.hasOwnProperty(key)&&(Se[key]=Fe[key])}function O(Se){return parseFloat(Se)||0}function k(){r={top:t.pageYOffset,left:t.pageXOffset}}function R(){if(t.pageXOffset!=r.left){k(),Oe();return}t.pageYOffset!=r.top&&(k(),W())}function N(Se){setTimeout(function(){t.pageYOffset!=r.top&&(r.top=t.pageYOffset,W())},0)}function W(){for(var Se=n.length-1;Se>=0;Se--)V(n[Se])}function V(Se){if(Se.inited){var Fe=r.top<=Se.limit.start?0:r.top>=Se.limit.end?2:1;Se.mode!=Fe&&re(Se,Fe)}}function $(){for(var Se=n.length-1;Se>=0;Se--)if(n[Se].inited){var Fe=Math.abs(le(n[Se].clone)-n[Se].docOffsetTop),L=Math.abs(n[Se].parent.node.offsetHeight-n[Se].parent.height);if(Fe>=2||L>=2)return!1}return!0}function z(Se){isNaN(parseFloat(Se.computed.top))||Se.isCell||(Se.inited=!0,Se.clone||fe(Se),Se.parent.computed.position!="absolute"&&Se.parent.computed.position!="relative"&&(Se.parent.node.style.position="relative"),V(Se),Se.parent.height=Se.parent.node.offsetHeight,Se.docOffsetTop=le(Se.clone))}function oe(Se){var Fe=!0;Se.clone&&he(Se),T(Se.node.style,Se.css);for(var L=n.length-1;L>=0;L--)if(n[L].node!==Se.node&&n[L].parent.node===Se.parent.node){Fe=!1;break}Fe&&(Se.parent.node.style.position=Se.parent.css.position),Se.mode=-1}function H(){for(var Se=n.length-1;Se>=0;Se--)z(n[Se])}function ie(){for(var Se=n.length-1;Se>=0;Se--)oe(n[Se])}function re(Se,Fe){var L=Se.node.style;switch(Fe){case 0:L.position="absolute",L.left=Se.offset.left+"px",L.right=Se.offset.right+"px",L.top=Se.offset.top+"px",L.bottom="auto",L.width="auto",L.marginLeft=0,L.marginRight=0,L.marginTop=0;break;case 1:L.position="fixed",L.left=Se.box.left+"px",L.right=Se.box.right+"px",L.top=Se.css.top,L.bottom="auto",L.width="auto",L.marginLeft=0,L.marginRight=0,L.marginTop=0;break;case 2:L.position="absolute",L.left=Se.offset.left+"px",L.right=Se.offset.right+"px",L.top="auto",L.bottom=0,L.width="auto",L.marginLeft=0,L.marginRight=0;break}Se.mode=Fe}function fe(Se){Se.clone=document.createElement("div");var Fe=Se.node.nextSibling||Se.node,L=Se.clone.style;L.height=Se.height+"px",L.width=Se.width+"px",L.marginTop=Se.computed.marginTop,L.marginBottom=Se.computed.marginBottom,L.marginLeft=Se.computed.marginLeft,L.marginRight=Se.computed.marginRight,L.padding=L.border=L.borderSpacing=0,L.fontSize="1em",L.position="static",L.cssFloat=Se.computed.cssFloat,Se.node.parentNode.insertBefore(Se.clone,Fe)}function he(Se){Se.clone.parentNode.removeChild(Se.clone),Se.clone=void 0}function Y(Se){var Fe=getComputedStyle(Se),L=Se.parentNode,Q=getComputedStyle(L),Le=Se.style.position;Se.style.position="relative";var Ye={top:Fe.top,marginTop:Fe.marginTop,marginBottom:Fe.marginBottom,marginLeft:Fe.marginLeft,marginRight:Fe.marginRight,cssFloat:Fe.cssFloat},Pe={top:O(Fe.top),marginBottom:O(Fe.marginBottom),paddingLeft:O(Fe.paddingLeft),paddingRight:O(Fe.paddingRight),borderLeftWidth:O(Fe.borderLeftWidth),borderRightWidth:O(Fe.borderRightWidth)};Se.style.position=Le;var q={position:Se.style.position,top:Se.style.top,bottom:Se.style.bottom,left:Se.style.left,right:Se.style.right,width:Se.style.width,marginTop:Se.style.marginTop,marginLeft:Se.style.marginLeft,marginRight:Se.style.marginRight},ee=de(Se),Re=de(L),Te={node:L,css:{position:L.style.position},computed:{position:Q.position},numeric:{borderLeftWidth:O(Q.borderLeftWidth),borderRightWidth:O(Q.borderRightWidth),borderTopWidth:O(Q.borderTopWidth),borderBottomWidth:O(Q.borderBottomWidth)}},nt={node:Se,box:{left:ee.win.left,right:o.clientWidth-ee.win.right},offset:{top:ee.win.top-Re.win.top-Te.numeric.borderTopWidth,left:ee.win.left-Re.win.left-Te.numeric.borderLeftWidth,right:-ee.win.right+Re.win.right-Te.numeric.borderRightWidth},css:q,isCell:Fe.display=="table-cell",computed:Ye,numeric:Pe,width:ee.win.right-ee.win.left,height:ee.win.bottom-ee.win.top,mode:-1,inited:!1,parent:Te,limit:{start:ee.doc.top-Pe.top,end:Re.doc.top+L.offsetHeight-Te.numeric.borderBottomWidth-Se.offsetHeight-Pe.top-Pe.marginBottom}};return nt}function le(Se){for(var Fe=0;Se;)Fe+=Se.offsetTop,Se=Se.offsetParent;return Fe}function de(Se){var Fe=Se.getBoundingClientRect();return{doc:{top:Fe.top+t.pageYOffset,left:Fe.left+t.pageXOffset},win:Fe}}function ve(){a=setInterval(function(){!$()&&Oe()},500)}function ce(){clearInterval(a)}function Ee(){i&&(document[l]?ce():ve())}function pe(){i||(k(),H(),t.addEventListener("scroll",R),t.addEventListener("wheel",N),t.addEventListener("resize",Oe),t.addEventListener("orientationchange",Oe),e.addEventListener(c,Ee),ve(),i=!0)}function Oe(){if(i){ie();for(var Se=n.length-1;Se>=0;Se--)n[Se]=Y(n[Se].node);H()}}function ne(){t.removeEventListener("scroll",R),t.removeEventListener("wheel",N),t.removeEventListener("resize",Oe),t.removeEventListener("orientationchange",Oe),e.removeEventListener(c,Ee),ce(),i=!1}function _e(){ne(),ie()}function De(){for(_e();n.length;)n.pop()}function at(Se){for(var Fe=n.length-1;Fe>=0;Fe--)if(n[Fe].node===Se)return;var L=Y(Se);n.push(L),i?z(L):pe()}function Ge(Se){for(var Fe=n.length-1;Fe>=0;Fe--)n[Fe].node===Se&&(oe(n[Fe]),n.splice(Fe,1))}return{stickies:n,add:at,remove:Ge,init:pe,rebuild:Oe,pause:ne,stop:_e,kill:De}})});var tr=j(oa=>{"use strict";var YA=Symbol.for("yaml.alias"),s5=Symbol.for("yaml.document"),y1=Symbol.for("yaml.map"),a5=Symbol.for("yaml.pair"),XA=Symbol.for("yaml.scalar"),b1=Symbol.for("yaml.seq"),ep=Symbol.for("yaml.node.type"),ore=e=>!!e&&typeof e=="object"&&e[ep]===YA,sre=e=>!!e&&typeof e=="object"&&e[ep]===s5,are=e=>!!e&&typeof e=="object"&&e[ep]===y1,lre=e=>!!e&&typeof e=="object"&&e[ep]===a5,l5=e=>!!e&&typeof e=="object"&&e[ep]===XA,cre=e=>!!e&&typeof e=="object"&&e[ep]===b1;function c5(e){if(e&&typeof e=="object")switch(e[ep]){case y1:case b1:return!0}return!1}function ure(e){if(e&&typeof e=="object")switch(e[ep]){case YA:case y1:case XA:case b1:return!0}return!1}var fre=e=>(l5(e)||c5(e))&&!!e.anchor;oa.ALIAS=YA;oa.DOC=s5;oa.MAP=y1;oa.NODE_TYPE=ep;oa.PAIR=a5;oa.SCALAR=XA;oa.SEQ=b1;oa.hasAnchor=fre;oa.isAlias=ore;oa.isCollection=c5;oa.isDocument=sre;oa.isMap=are;oa.isNode=ure;oa.isPair=lre;oa.isScalar=l5;oa.isSeq=cre});var CS=j(qA=>{"use strict";var xs=tr(),dc=Symbol("break visit"),u5=Symbol("skip children"),Hd=Symbol("remove node");function v1(e,t){let n=f5(t);xs.isDocument(e)?Hv(null,e.contents,n,Object.freeze([e]))===Hd&&(e.contents=null):Hv(null,e,n,Object.freeze([]))}v1.BREAK=dc;v1.SKIP=u5;v1.REMOVE=Hd;function Hv(e,t,n,r){let i=d5(e,t,n,r);if(xs.isNode(i)||xs.isPair(i))return h5(e,r,i),Hv(e,i,n,r);if(typeof i!="symbol"){if(xs.isCollection(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){let s=Hv(o,t.items[o],n,r);if(typeof s=="number")o=s-1;else{if(s===dc)return dc;s===Hd&&(t.items.splice(o,1),o-=1)}}}else if(xs.isPair(t)){r=Object.freeze(r.concat(t));let o=Hv("key",t.key,n,r);if(o===dc)return dc;o===Hd&&(t.key=null);let s=Hv("value",t.value,n,r);if(s===dc)return dc;s===Hd&&(t.value=null)}}return i}async function w1(e,t){let n=f5(t);xs.isDocument(e)?await Wv(null,e.contents,n,Object.freeze([e]))===Hd&&(e.contents=null):await Wv(null,e,n,Object.freeze([]))}w1.BREAK=dc;w1.SKIP=u5;w1.REMOVE=Hd;async function Wv(e,t,n,r){let i=await d5(e,t,n,r);if(xs.isNode(i)||xs.isPair(i))return h5(e,r,i),Wv(e,i,n,r);if(typeof i!="symbol"){if(xs.isCollection(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){let s=await Wv(o,t.items[o],n,r);if(typeof s=="number")o=s-1;else{if(s===dc)return dc;s===Hd&&(t.items.splice(o,1),o-=1)}}}else if(xs.isPair(t)){r=Object.freeze(r.concat(t));let o=await Wv("key",t.key,n,r);if(o===dc)return dc;o===Hd&&(t.key=null);let s=await Wv("value",t.value,n,r);if(s===dc)return dc;s===Hd&&(t.value=null)}}return i}function f5(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function d5(e,t,n,r){if(typeof n=="function")return n(e,t,r);if(xs.isMap(t))return n.Map?.(e,t,r);if(xs.isSeq(t))return n.Seq?.(e,t,r);if(xs.isPair(t))return n.Pair?.(e,t,r);if(xs.isScalar(t))return n.Scalar?.(e,t,r);if(xs.isAlias(t))return n.Alias?.(e,t,r)}function h5(e,t,n){let r=t[t.length-1];if(xs.isCollection(r))r.items[e]=n;else if(xs.isPair(r))e==="key"?r.key=n:r.value=n;else if(xs.isDocument(r))r.contents=n;else{let i=xs.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}qA.visit=v1;qA.visitAsync=w1});var QA=j(g5=>{"use strict";var p5=tr(),dre=CS(),hre={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},pre=e=>e.replace(/[!,[\]{}]/g,t=>hre[t]),PS=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[o,s]=r;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let s=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,s),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let s=t.slice(2,-1);return s==="!"||s==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),s)}let[,r,i]=t.match(/^(.*!)([^!]*)$/s);i||n(`The ${t} tag has no suffix`);let o=this.tags[r];if(o)try{return o+decodeURIComponent(i)}catch(s){return n(String(s)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+pre(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),i;if(t&&r.length>0&&p5.isNode(t.contents)){let o={};dre.visit(t.contents,(s,a)=>{p5.isNode(a)&&a.tag&&(o[a.tag]=!0)}),i=Object.keys(o)}else i=[];for(let[o,s]of r)o==="!!"&&s==="tag:yaml.org,2002:"||(!t||i.some(a=>a.startsWith(s)))&&n.push(`%TAG ${o} ${s}`);return n.join(`
9
9
  `)}};PS.defaultYaml={explicit:!1,version:"1.2"};PS.defaultTags={"!!":"tag:yaml.org,2002:"};g5.Directives=PS});var S1=j(AS=>{"use strict";var m5=tr(),gre=CS();function mre(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function y5(e){let t=new Set;return gre.visit(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function b5(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function yre(e,t){let n=[],r=new Map,i=null;return{onAnchor:o=>{n.push(o),i??(i=y5(e));let s=b5(t,i);return i.add(s),s},setAnchors:()=>{for(let o of n){let s=r.get(o);if(typeof s=="object"&&s.anchor&&(m5.isScalar(s.node)||m5.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:r}}AS.anchorIsValid=mre;AS.anchorNames=y5;AS.createNodeAnchors=yre;AS.findNewAnchor=b5});var KA=j(v5=>{"use strict";function RS(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,o=r.length;i<o;++i){let s=r[i],a=RS(e,r,String(i),s);a===void 0?delete r[i]:a!==s&&(r[i]=a)}else if(r instanceof Map)for(let i of Array.from(r.keys())){let o=r.get(i),s=RS(e,r,i,o);s===void 0?r.delete(i):s!==o&&r.set(i,s)}else if(r instanceof Set)for(let i of Array.from(r)){let o=RS(e,r,i,i);o===void 0?r.delete(i):o!==i&&(r.delete(i),r.add(o))}else for(let[i,o]of Object.entries(r)){let s=RS(e,r,i,o);s===void 0?delete r[i]:s!==o&&(r[i]=s)}return e.call(t,n,r)}v5.applyReviver=RS});var Bg=j(S5=>{"use strict";var bre=tr();function w5(e,t,n){if(Array.isArray(e))return e.map((r,i)=>w5(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!bre.hasAnchor(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=o=>{r.res=o,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!n?.keep?Number(e):e}S5.toJS=w5});var x1=j(E5=>{"use strict";var vre=KA(),x5=tr(),wre=Bg(),ZA=class{constructor(t){Object.defineProperty(this,x5.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){if(!x5.isDocument(t))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=wre.toJS(this,"",s);if(typeof i=="function")for(let{count:l,res:c}of s.anchors.values())i(c,l);return typeof o=="function"?vre.applyReviver(o,{"":a},"",a):a}};E5.NodeBase=ZA});var IS=j(_5=>{"use strict";var Sre=S1(),xre=CS(),jv=tr(),Ere=x1(),_re=Bg(),JA=class extends Ere.NodeBase{constructor(t){super(jv.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],xre.visit(t,{Node:(o,s)=>{(jv.isAlias(s)||jv.hasAnchor(s))&&r.push(s)}}),n&&(n.aliasResolveCache=r));let i;for(let o of r){if(o===this)break;o.anchor===this.source&&(i=o)}return i}toJSON(t,n){if(!n)return{source:this.source};let{anchors:r,doc:i,maxAliasCount:o}=n,s=this.resolve(i,n);if(!s){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(s);if(a||(_re.toJS(s,null,n),a=r.get(s)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=E1(i,s,r)),a.count*a.aliasCount>o)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(t,n,r){let i=`*${this.source}`;if(t){if(Sre.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${i} `}return i}};function E1(e,t,n){if(jv.isAlias(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(jv.isCollection(t)){let r=0;for(let i of t.items){let o=E1(e,i,n);o>r&&(r=o)}return r}else if(jv.isPair(t)){let r=E1(e,t.key,n),i=E1(e,t.value,n);return Math.max(r,i)}return 1}_5.Alias=JA});var os=j($A=>{"use strict";var Ore=tr(),Tre=x1(),kre=Bg(),Cre=e=>!e||typeof e!="function"&&typeof e!="object",zg=class extends Tre.NodeBase{constructor(t){super(Ore.SCALAR),this.value=t}toJSON(t,n){return n?.keep?this.value:kre.toJS(this.value,t,n)}toString(){return String(this.value)}};zg.BLOCK_FOLDED="BLOCK_FOLDED";zg.BLOCK_LITERAL="BLOCK_LITERAL";zg.PLAIN="PLAIN";zg.QUOTE_DOUBLE="QUOTE_DOUBLE";zg.QUOTE_SINGLE="QUOTE_SINGLE";$A.Scalar=zg;$A.isScalarValue=Cre});var MS=j(T5=>{"use strict";var Pre=IS(),Ay=tr(),O5=os(),Are="tag:yaml.org,2002:";function Rre(e,t,n){if(t){let r=n.filter(o=>o.tag===t),i=r.find(o=>!o.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>r.identify?.(e)&&!r.format)}function Ire(e,t,n){if(Ay.isDocument(e)&&(e=e.contents),Ay.isNode(e))return e;if(Ay.isPair(e)){let d=n.schema[Ay.MAP].createNode?.(n.schema,null,n);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:o,schema:s,sourceObjects:a}=n,l;if(r&&e&&typeof e=="object"){if(l=a.get(e),l)return l.anchor??(l.anchor=i(e)),new Pre.Alias(l.anchor);l={anchor:null,node:null},a.set(e,l)}t?.startsWith("!!")&&(t=Are+t.slice(2));let c=Rre(e,t,s.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let d=new O5.Scalar(e);return l&&(l.node=d),d}c=e instanceof Map?s[Ay.MAP]:Symbol.iterator in Object(e)?s[Ay.SEQ]:s[Ay.MAP]}o&&(o(c),delete n.onTagObj);let y=c?.createNode?c.createNode(n.schema,e,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,e,n):new O5.Scalar(e);return t?y.tag=t:c.default||(y.tag=c.tag),l&&(l.node=y),y}T5.createNode=Ire});var O1=j(_1=>{"use strict";var Mre=MS(),Wd=tr(),Lre=x1();function eR(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){let o=t[i];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=r,r=s}else r=new Map([[o,r]])}return Mre.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var k5=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,tR=class extends Lre.NodeBase{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Wd.isNode(r)||Wd.isPair(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(k5(t))this.add(n);else{let[r,...i]=t,o=this.get(r,!0);if(Wd.isCollection(o))o.addIn(i,n);else if(o===void 0&&this.schema)this.set(r,eR(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){let[n,...r]=t;if(r.length===0)return this.delete(n);let i=this.get(n,!0);if(Wd.isCollection(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){let[r,...i]=t,o=this.get(r,!0);return i.length===0?!n&&Wd.isScalar(o)?o.value:o:Wd.isCollection(o)?o.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Wd.isPair(n))return!1;let r=n.value;return r==null||t&&Wd.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){let[n,...r]=t;if(r.length===0)return this.has(n);let i=this.get(n,!0);return Wd.isCollection(i)?i.hasIn(r):!1}setIn(t,n){let[r,...i]=t;if(i.length===0)this.set(r,n);else{let o=this.get(r,!0);if(Wd.isCollection(o))o.setIn(i,n);else if(o===void 0&&this.schema)this.set(r,eR(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}};_1.Collection=tR;_1.collectionFromPath=eR;_1.isEmptyPath=k5});var LS=j(T1=>{"use strict";var Nre=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function nR(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Dre=(e,t,n)=>e.endsWith(`
10
10
  `)?nR(n,t):n.includes(`
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as Oe,b as z}from"./FJ3ZKIJG.js";import{B as ye,C as Kt,F as be,G as At,H as ve,I as J,M as X,O as x,P as Se,V as xe,Z as kt,ba as Ee,d as me,e as qt,ea as Zt,f as we,fa as Ct,ha as Ae,ka as ke,l as N,la as Ce,s as nt}from"./PQKTPLKO.js";import{performance as tn}from"perf_hooks";function Te(t){return t?._?.[0]??""}import{fileURLToPath as Js}from"node:url";import{posix as Xs,win32 as he}from"node:path";import{fileURLToPath as Qs}from"node:url";import{lstatSync as tr,readdir as er,readdirSync as ir,readlinkSync as sr,realpathSync as rr}from"fs";import*as nr from"node:fs";import{lstat as or,readdir as hr,readlink as ar,realpath as lr}from"node:fs/promises";import{EventEmitter as ce}from"node:events";import fi from"node:stream";import{StringDecoder as cr}from"node:string_decoder";var Ze=(t,e,i)=>{let s=t instanceof RegExp?Fe(t,i):t,r=e instanceof RegExp?Fe(e,i):e,n=s!==null&&r!=null&&Vi(s,r,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+s.length,n[1]),post:i.slice(n[1]+r.length)}},Fe=(t,e)=>{let i=e.match(t);return i?i[0]:null},Vi=(t,e,i)=>{let s,r,n,o,h,a=i.indexOf(t),l=i.indexOf(e,a+1),p=a;if(a>=0&&l>0){if(t===e)return[a,l];for(s=[],n=i.length;p>=0&&!h;){if(p===a)s.push(p),a=i.indexOf(t,p+1);else if(s.length===1){let c=s.pop();c!==void 0&&(h=[c,l])}else r=s.pop(),r!==void 0&&r<n&&(n=r,o=l),l=i.indexOf(e,p+1);p=a<l&&a>=0?a:l}s.length&&o!==void 0&&(h=[n,o])}return h},Xe="\0SLASH"+Math.random()+"\0",Qe="\0OPEN"+Math.random()+"\0",ae="\0CLOSE"+Math.random()+"\0",ti="\0COMMA"+Math.random()+"\0",ei="\0PERIOD"+Math.random()+"\0",Yi=new RegExp(Xe,"g"),Ji=new RegExp(Qe,"g"),qi=new RegExp(ae,"g"),Ki=new RegExp(ti,"g"),Zi=new RegExp(ei,"g"),Xi=/\\\\/g,Qi=/\\{/g,ts=/\\}/g,es=/\\,/g,is=/\\./g,ss=1e5;function Xt(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function rs(t){return t.replace(Xi,Xe).replace(Qi,Qe).replace(ts,ae).replace(es,ti).replace(is,ei)}function ns(t){return t.replace(Yi,"\\").replace(Ji,"{").replace(qi,"}").replace(Ki,",").replace(Zi,".")}function ii(t){if(!t)return[""];let e=[],i=Ze("{","}",t);if(!i)return t.split(",");let{pre:s,body:r,post:n}=i,o=s.split(",");o[o.length-1]+="{"+r+"}";let h=ii(n);return n.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),e.push.apply(e,o),e}function os(t,e={}){if(!t)return[];let{max:i=ss}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),mt(rs(t),i,!0).map(ns)}function hs(t){return"{"+t+"}"}function as(t){return/^-?0\d/.test(t)}function ls(t,e){return t<=e}function cs(t,e){return t>=e}function mt(t,e,i){let s=[],r=Ze("{","}",t);if(!r)return[t];let n=r.pre,o=r.post.length?mt(r.post,e,!1):[""];if(/\$$/.test(r.pre))for(let h=0;h<o.length&&h<e;h++){let a=n+"{"+r.body+"}"+o[h];s.push(a)}else{let h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),l=h||a,p=r.body.indexOf(",")>=0;if(!l&&!p)return r.post.match(/,(?!,).*\}/)?(t=r.pre+"{"+r.body+ae+r.post,mt(t,e,!0)):[t];let c;if(l)c=r.body.split(/\.\./);else if(c=ii(r.body),c.length===1&&c[0]!==void 0&&(c=mt(c[0],e,!1).map(hs),c.length===1))return o.map(u=>r.pre+c[0]+u);let f;if(l&&c[0]!==void 0&&c[1]!==void 0){let u=Xt(c[0]),d=Xt(c[1]),g=Math.max(c[0].length,c[1].length),w=c.length===3&&c[2]!==void 0?Math.abs(Xt(c[2])):1,m=ls;d<u&&(w*=-1,m=cs);let y=c.some(as);f=[];for(let b=u;m(b,d);b+=w){let v;if(a)v=String.fromCharCode(b),v==="\\"&&(v="");else if(v=String(b),y){let S=g-v.length;if(S>0){let Y=new Array(S+1).join("0");b<0?v="-"+Y+v.slice(1):v=Y+v}}f.push(v)}}else{f=[];for(let u=0;u<c.length;u++)f.push.apply(f,mt(c[u],e,!1))}for(let u=0;u<f.length;u++)for(let d=0;d<o.length&&s.length<e;d++){let g=n+f[u]+o[d];(!i||l||g)&&s.push(g)}}return s}var Wt=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ps={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ct=t=>t.replace(/[[\]\\-]/g,"\\$&"),us=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Re=t=>t.join(""),fs=(t,e)=>{let i=e;if(t.charAt(i)!=="[")throw new Error("not in a brace expression");let s=[],r=[],n=i+1,o=!1,h=!1,a=!1,l=!1,p=i,c="";t:for(;n<t.length;){let d=t.charAt(n);if((d==="!"||d==="^")&&n===i+1){l=!0,n++;continue}if(d==="]"&&o&&!a){p=n+1;break}if(o=!0,d==="\\"&&!a){a=!0,n++;continue}if(d==="["&&!a){for(let[g,[w,m,y]]of Object.entries(ps))if(t.startsWith(g,n)){if(c)return["$.",!1,t.length-i,!0];n+=g.length,y?r.push(w):s.push(w),h=h||m;continue t}}if(a=!1,c){d>c?s.push(ct(c)+"-"+ct(d)):d===c&&s.push(ct(d)),c="",n++;continue}if(t.startsWith("-]",n+1)){s.push(ct(d+"-")),n+=2;continue}if(t.startsWith("-",n+1)){c=d,n+=2;continue}s.push(ct(d)),n++}if(p<n)return["",!1,0,!1];if(!s.length&&!r.length)return["$.",!1,t.length-i,!0];if(r.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!l){let d=s[0].length===2?s[0].slice(-1):s[0];return[us(d),!1,p-i,!1]}let f="["+(l?"^":"")+Re(s)+"]",u="["+(l?"":"^")+Re(r)+"]";return[s.length&&r.length?"("+f+"|"+u+")":s.length?f:u,h,p-i,!0]},at=(t,{windowsPathsNoEscape:e=!1,magicalBraces:i=!0}={})=>i?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),ds=new Set(["!","?","+","*","@"]),je=t=>ds.has(t),gs="(?!(?:^|/)\\.\\.?(?:$|/))",Ot="(?!\\.)",ms=new Set(["[","."]),ws=new Set(["..","."]),ys=new Set("().*{}+?[]^$\\!"),bs=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),le="[^/]",Pe=le+"*?",De=le+"+?",si=class D{type;#t;#i;#n=!1;#r=[];#o;#v;#w;#c=!1;#h;#u;#p=!1;constructor(e,i,s={}){this.type=e,e&&(this.#i=!0),this.#o=i,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#w=this.#t===this?[]:this.#t.#w,e==="!"&&!this.#t.#c&&this.#w.push(this),this.#v=this.#o?this.#o.#r.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#u=this.#r.map(e=>String(e)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#w.pop();){if(e.type!=="!")continue;let i=e,s=i.#o;for(;s;){for(let r=i.#v+1;!s.type&&r<s.#r.length;r++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(s.#r[r])}i=s,s=i.#o}}return this}push(...e){for(let i of e)if(i!==""){if(typeof i!="string"&&!(i instanceof D&&i.#o===this))throw new Error("invalid part: "+i);this.#r.push(i)}}toJSON(){let e=this.type===null?this.#r.slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...this.#r.map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(this.#v===0)return!0;let e=this.#o;for(let i=0;i<this.#v;i++){let s=e.#r[i];if(!(s instanceof D&&s.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#r.length:0;return this.#v===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let i=new D(this.type,e);for(let s of this.#r)i.copyIn(s);return i}static#s(e,i,s,r){let n=!1,o=!1,h=-1,a=!1;if(i.type===null){let u=s,d="";for(;u<e.length;){let g=e.charAt(u++);if(n||g==="\\"){n=!n,d+=g;continue}if(o){u===h+1?(g==="^"||g==="!")&&(a=!0):g==="]"&&!(u===h+2&&a)&&(o=!1),d+=g;continue}else if(g==="["){o=!0,h=u,a=!1,d+=g;continue}if(!r.noext&&je(g)&&e.charAt(u)==="("){i.push(d),d="";let w=new D(g,i);u=D.#s(e,w,u,r),i.push(w);continue}d+=g}return i.push(d),u}let l=s+1,p=new D(null,i),c=[],f="";for(;l<e.length;){let u=e.charAt(l++);if(n||u==="\\"){n=!n,f+=u;continue}if(o){l===h+1?(u==="^"||u==="!")&&(a=!0):u==="]"&&!(l===h+2&&a)&&(o=!1),f+=u;continue}else if(u==="["){o=!0,h=l,a=!1,f+=u;continue}if(je(u)&&e.charAt(l)==="("){p.push(f),f="";let d=new D(u,p);p.push(d),l=D.#s(e,d,l,r);continue}if(u==="|"){p.push(f),f="",c.push(p),p=new D(null,i);continue}if(u===")")return f===""&&i.#r.length===0&&(i.#p=!0),p.push(f),f="",i.push(...c,p),l;f+=u}return i.type=null,i.#i=void 0,i.#r=[e.substring(s-1)],l}static fromGlob(e,i={}){let s=new D(null,void 0,i);return D.#s(e,s,0,i),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[i,s,r,n]=this.toRegExpSource();if(!(r||this.#i||this.#h.nocase&&!this.#h.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return s;let o=(this.#h.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${i}$`,o),{_src:i,_glob:e})}get options(){return this.#h}toRegExpSource(e){let i=e??!!this.#h.dot;if(this.#t===this&&this.#a(),!this.type){let a=this.isStart()&&this.isEnd()&&!this.#r.some(f=>typeof f!="string"),l=this.#r.map(f=>{let[u,d,g,w]=typeof f=="string"?D.#S(f,this.#i,a):f.toRegExpSource(e);return this.#i=this.#i||g,this.#n=this.#n||w,u}).join(""),p="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&ws.has(this.#r[0]))){let f=ms,u=i&&f.has(l.charAt(0))||l.startsWith("\\.")&&f.has(l.charAt(2))||l.startsWith("\\.\\.")&&f.has(l.charAt(4)),d=!i&&!e&&f.has(l.charAt(0));p=u?gs:d?Ot:""}let c="";return this.isEnd()&&this.#t.#c&&this.#o?.type==="!"&&(c="(?:$|\\/)"),[p+l+c,at(l),this.#i=!!this.#i,this.#n]}let s=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#f(i);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#i=void 0,[a,at(this.toString()),!1,!1]}let o=!s||e||i||!Ot?"":this.#f(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let h="";if(this.type==="!"&&this.#p)h=(this.isStart()&&!i?Ot:"")+De;else{let a=this.type==="!"?"))"+(this.isStart()&&!i&&!e?Ot:"")+Pe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=r+n+a}return[h,at(n),this.#i=!!this.#i,this.#n]}#f(e){return this.#r.map(i=>{if(typeof i=="string")throw new Error("string type in extglob ast??");let[s,r,n,o]=i.toRegExpSource(e);return this.#n=this.#n||o,s}).filter(i=>!(this.isStart()&&this.isEnd())||!!i).join("|")}static#S(e,i,s=!1){let r=!1,n="",o=!1,h=!1;for(let a=0;a<e.length;a++){let l=e.charAt(a);if(r){r=!1,n+=(ys.has(l)?"\\":"")+l;continue}if(l==="*"){if(h)continue;h=!0,n+=s&&/^[*]+$/.test(e)?De:Pe,i=!0;continue}else h=!1;if(l==="\\"){a===e.length-1?n+="\\\\":r=!0;continue}if(l==="["){let[p,c,f,u]=fs(e,a);if(f){n+=p,o=o||c,a+=f-1,i=i||u;continue}}if(l==="?"){n+=le,i=!0;continue}n+=bs(l)}return[n,at(e),!!i,o]}},ri=(t,{windowsPathsNoEscape:e=!1,magicalBraces:i=!1}={})=>i?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),R=(t,e,i={})=>(Wt(e),!i.nocomment&&e.charAt(0)==="#"?!1:new Z(e,i).match(t)),vs=/^\*+([^+@!?\*\[\(]*)$/,Ss=t=>e=>!e.startsWith(".")&&e.endsWith(t),xs=t=>e=>e.endsWith(t),Es=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),As=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),ks=/^\*+\.\*+$/,Cs=t=>!t.startsWith(".")&&t.includes("."),Os=t=>t!=="."&&t!==".."&&t.includes("."),Ts=/^\.\*+$/,Fs=t=>t!=="."&&t!==".."&&t.startsWith("."),Rs=/^\*+$/,js=t=>t.length!==0&&!t.startsWith("."),Ps=t=>t.length!==0&&t!=="."&&t!=="..",Ds=/^\?+([^+@!?\*\[\(]*)?$/,$s=([t,e=""])=>{let i=ni([t]);return e?(e=e.toLowerCase(),s=>i(s)&&s.toLowerCase().endsWith(e)):i},Ms=([t,e=""])=>{let i=oi([t]);return e?(e=e.toLowerCase(),s=>i(s)&&s.toLowerCase().endsWith(e)):i},Ls=([t,e=""])=>{let i=oi([t]);return e?s=>i(s)&&s.endsWith(e):i},Ws=([t,e=""])=>{let i=ni([t]);return e?s=>i(s)&&s.endsWith(e):i},ni=([t])=>{let e=t.length;return i=>i.length===e&&!i.startsWith(".")},oi=([t])=>{let e=t.length;return i=>i.length===e&&i!=="."&&i!==".."},hi=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",$e={win32:{sep:"\\"},posix:{sep:"/"}},Ns=hi==="win32"?$e.win32.sep:$e.posix.sep;R.sep=Ns;var F=Symbol("globstar **");R.GLOBSTAR=F;var zs="[^/]",_s=zs+"*?",Bs="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Is="(?:(?!(?:\\/|^)\\.).)*?",Us=(t,e={})=>i=>R(i,t,e);R.filter=Us;var $=(t,e={})=>Object.assign({},t,e),Gs=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return R;let e=R;return Object.assign((i,s,r={})=>e(i,s,$(t,r)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,$(t,s))}static defaults(i){return e.defaults($(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,r={}){super(i,s,$(t,r))}static fromGlob(i,s={}){return e.AST.fromGlob(i,$(t,s))}},unescape:(i,s={})=>e.unescape(i,$(t,s)),escape:(i,s={})=>e.escape(i,$(t,s)),filter:(i,s={})=>e.filter(i,$(t,s)),defaults:i=>e.defaults($(t,i)),makeRe:(i,s={})=>e.makeRe(i,$(t,s)),braceExpand:(i,s={})=>e.braceExpand(i,$(t,s)),match:(i,s,r={})=>e.match(i,s,$(t,r)),sep:e.sep,GLOBSTAR:F})};R.defaults=Gs;var ai=(t,e={})=>(Wt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:os(t,{max:e.braceExpandMax}));R.braceExpand=ai;var Hs=(t,e={})=>new Z(t,e).makeRe();R.makeRe=Hs;var Vs=(t,e,i={})=>{let s=new Z(e,i);return t=t.filter(r=>s.match(r)),s.options.nonull&&!t.length&&t.push(e),t};R.match=Vs;var Me=/[?*]|[+@!]\(.*?\)|\[|\]/,Ys=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Z=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){Wt(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||hi,this.isWindows=this.platform==="win32";let i="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[i]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((r,n,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=r[0]===""&&r[1]===""&&(r[2]==="?"||!Me.test(r[2]))&&!Me.test(r[3]),a=/^[a-z]:/i.test(r[0]);if(h)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(a)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(h=>this.parse(h))});if(this.debug(this.pattern,s),this.set=s.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let n=this.set[r];n[0]===""&&n[1]===""&&this.globParts[r][2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])&&(n[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let s=0;s<t[i].length;s++)t[i][s]==="**"&&(t[i][s]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let i=-1;for(;(i=e.indexOf("**",i+1))!==-1;){let s=i;for(;e[s+1]==="**";)s++;s!==i&&e.splice(i,s-i)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((i,s)=>{let r=i[i.length-1];return s==="**"&&r==="**"?i:s===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(i.pop(),i):(i.push(s),i)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){let r=t[s];s===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let s=t[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(e=!0,t.splice(i-1,2),i-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let i of t){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let n=s;for(;i[n+1]==="**";)n++;n>s&&i.splice(s+1,n-s);let o=i[s+1],h=i[s+2],a=i[s+3];if(o!==".."||!h||h==="."||h===".."||!a||a==="."||a==="..")continue;e=!0,i.splice(s,1);let l=i.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let n=1;n<i.length-1;n++){let o=i[n];n===1&&o===""&&i[0]===""||(o==="."||o==="")&&(e=!0,i.splice(n,1),n--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(e=!0,i.pop())}let r=0;for(;(r=i.indexOf("..",r+1))!==-1;){let n=i[r-1];if(n&&n!=="."&&n!==".."&&n!=="**"){e=!0;let o=r===1&&i[r+1]==="**"?["."]:[];i.splice(r-1,2,...o),i.length===0&&i.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){let s=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);if(s){t[e]=[],t[i]=s;break}}return t.filter(e=>e.length)}partsMatch(t,e,i=!1){let s=0,r=0,n=[],o="";for(;s<t.length&&r<e.length;)if(t[s]===e[r])n.push(o==="b"?e[r]:t[s]),s++,r++;else if(i&&t[s]==="**"&&e[r]===t[s+1])n.push(t[s]),s++;else if(i&&e[r]==="**"&&t[s]===e[r+1])n.push(e[r]),r++;else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(o==="b")return!1;o="a",n.push(t[s]),s++,r++}else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(o==="a")return!1;o="b",n.push(e[r]),s++,r++}else return!1;return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,i=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e}matchOne(t,e,i=!1){let s=this.options;if(this.isWindows){let d=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),g=!d&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),w=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),m=!w&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),y=g?3:d?0:void 0,b=m?3:w?0:void 0;if(typeof y=="number"&&typeof b=="number"){let[v,S]=[t[y],e[b]];v.toLowerCase()===S.toLowerCase()&&(e[b]=v,b>y?e=e.slice(b):y>b&&(t=t.slice(y)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,o=0,h=t.length,a=e.length;n<h&&o<a;n++,o++){this.debug("matchOne loop");var l=e[o],p=t[n];if(this.debug(e,l,p),l===!1)return!1;if(l===F){this.debug("GLOBSTAR",[e,l,p]);var c=n,f=o+1;if(f===a){for(this.debug("** at the end");n<h;n++)if(t[n]==="."||t[n]===".."||!s.dot&&t[n].charAt(0)===".")return!1;return!0}for(;c<h;){var u=t[c];if(this.debug(`
7
+ import{a as Oe,b as z}from"./6HPPISLY.js";import{B as ye,C as Kt,F as be,G as At,H as ve,I as J,M as X,O as x,P as Se,V as xe,Z as kt,ba as Ee,d as me,e as qt,ea as Zt,f as we,fa as Ct,ha as Ae,ka as ke,l as N,la as Ce,s as nt}from"./DLYUMFFQ.js";import{performance as tn}from"perf_hooks";function Te(t){return t?._?.[0]??""}import{fileURLToPath as Js}from"node:url";import{posix as Xs,win32 as he}from"node:path";import{fileURLToPath as Qs}from"node:url";import{lstatSync as tr,readdir as er,readdirSync as ir,readlinkSync as sr,realpathSync as rr}from"fs";import*as nr from"node:fs";import{lstat as or,readdir as hr,readlink as ar,realpath as lr}from"node:fs/promises";import{EventEmitter as ce}from"node:events";import fi from"node:stream";import{StringDecoder as cr}from"node:string_decoder";var Ze=(t,e,i)=>{let s=t instanceof RegExp?Fe(t,i):t,r=e instanceof RegExp?Fe(e,i):e,n=s!==null&&r!=null&&Vi(s,r,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+s.length,n[1]),post:i.slice(n[1]+r.length)}},Fe=(t,e)=>{let i=e.match(t);return i?i[0]:null},Vi=(t,e,i)=>{let s,r,n,o,h,a=i.indexOf(t),l=i.indexOf(e,a+1),p=a;if(a>=0&&l>0){if(t===e)return[a,l];for(s=[],n=i.length;p>=0&&!h;){if(p===a)s.push(p),a=i.indexOf(t,p+1);else if(s.length===1){let c=s.pop();c!==void 0&&(h=[c,l])}else r=s.pop(),r!==void 0&&r<n&&(n=r,o=l),l=i.indexOf(e,p+1);p=a<l&&a>=0?a:l}s.length&&o!==void 0&&(h=[n,o])}return h},Xe="\0SLASH"+Math.random()+"\0",Qe="\0OPEN"+Math.random()+"\0",ae="\0CLOSE"+Math.random()+"\0",ti="\0COMMA"+Math.random()+"\0",ei="\0PERIOD"+Math.random()+"\0",Yi=new RegExp(Xe,"g"),Ji=new RegExp(Qe,"g"),qi=new RegExp(ae,"g"),Ki=new RegExp(ti,"g"),Zi=new RegExp(ei,"g"),Xi=/\\\\/g,Qi=/\\{/g,ts=/\\}/g,es=/\\,/g,is=/\\./g,ss=1e5;function Xt(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function rs(t){return t.replace(Xi,Xe).replace(Qi,Qe).replace(ts,ae).replace(es,ti).replace(is,ei)}function ns(t){return t.replace(Yi,"\\").replace(Ji,"{").replace(qi,"}").replace(Ki,",").replace(Zi,".")}function ii(t){if(!t)return[""];let e=[],i=Ze("{","}",t);if(!i)return t.split(",");let{pre:s,body:r,post:n}=i,o=s.split(",");o[o.length-1]+="{"+r+"}";let h=ii(n);return n.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),e.push.apply(e,o),e}function os(t,e={}){if(!t)return[];let{max:i=ss}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),mt(rs(t),i,!0).map(ns)}function hs(t){return"{"+t+"}"}function as(t){return/^-?0\d/.test(t)}function ls(t,e){return t<=e}function cs(t,e){return t>=e}function mt(t,e,i){let s=[],r=Ze("{","}",t);if(!r)return[t];let n=r.pre,o=r.post.length?mt(r.post,e,!1):[""];if(/\$$/.test(r.pre))for(let h=0;h<o.length&&h<e;h++){let a=n+"{"+r.body+"}"+o[h];s.push(a)}else{let h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),l=h||a,p=r.body.indexOf(",")>=0;if(!l&&!p)return r.post.match(/,(?!,).*\}/)?(t=r.pre+"{"+r.body+ae+r.post,mt(t,e,!0)):[t];let c;if(l)c=r.body.split(/\.\./);else if(c=ii(r.body),c.length===1&&c[0]!==void 0&&(c=mt(c[0],e,!1).map(hs),c.length===1))return o.map(u=>r.pre+c[0]+u);let f;if(l&&c[0]!==void 0&&c[1]!==void 0){let u=Xt(c[0]),d=Xt(c[1]),g=Math.max(c[0].length,c[1].length),w=c.length===3&&c[2]!==void 0?Math.abs(Xt(c[2])):1,m=ls;d<u&&(w*=-1,m=cs);let y=c.some(as);f=[];for(let b=u;m(b,d);b+=w){let v;if(a)v=String.fromCharCode(b),v==="\\"&&(v="");else if(v=String(b),y){let S=g-v.length;if(S>0){let Y=new Array(S+1).join("0");b<0?v="-"+Y+v.slice(1):v=Y+v}}f.push(v)}}else{f=[];for(let u=0;u<c.length;u++)f.push.apply(f,mt(c[u],e,!1))}for(let u=0;u<f.length;u++)for(let d=0;d<o.length&&s.length<e;d++){let g=n+f[u]+o[d];(!i||l||g)&&s.push(g)}}return s}var Wt=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ps={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ct=t=>t.replace(/[[\]\\-]/g,"\\$&"),us=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Re=t=>t.join(""),fs=(t,e)=>{let i=e;if(t.charAt(i)!=="[")throw new Error("not in a brace expression");let s=[],r=[],n=i+1,o=!1,h=!1,a=!1,l=!1,p=i,c="";t:for(;n<t.length;){let d=t.charAt(n);if((d==="!"||d==="^")&&n===i+1){l=!0,n++;continue}if(d==="]"&&o&&!a){p=n+1;break}if(o=!0,d==="\\"&&!a){a=!0,n++;continue}if(d==="["&&!a){for(let[g,[w,m,y]]of Object.entries(ps))if(t.startsWith(g,n)){if(c)return["$.",!1,t.length-i,!0];n+=g.length,y?r.push(w):s.push(w),h=h||m;continue t}}if(a=!1,c){d>c?s.push(ct(c)+"-"+ct(d)):d===c&&s.push(ct(d)),c="",n++;continue}if(t.startsWith("-]",n+1)){s.push(ct(d+"-")),n+=2;continue}if(t.startsWith("-",n+1)){c=d,n+=2;continue}s.push(ct(d)),n++}if(p<n)return["",!1,0,!1];if(!s.length&&!r.length)return["$.",!1,t.length-i,!0];if(r.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!l){let d=s[0].length===2?s[0].slice(-1):s[0];return[us(d),!1,p-i,!1]}let f="["+(l?"^":"")+Re(s)+"]",u="["+(l?"":"^")+Re(r)+"]";return[s.length&&r.length?"("+f+"|"+u+")":s.length?f:u,h,p-i,!0]},at=(t,{windowsPathsNoEscape:e=!1,magicalBraces:i=!0}={})=>i?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),ds=new Set(["!","?","+","*","@"]),je=t=>ds.has(t),gs="(?!(?:^|/)\\.\\.?(?:$|/))",Ot="(?!\\.)",ms=new Set(["[","."]),ws=new Set(["..","."]),ys=new Set("().*{}+?[]^$\\!"),bs=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),le="[^/]",Pe=le+"*?",De=le+"+?",si=class D{type;#t;#i;#n=!1;#r=[];#o;#v;#w;#c=!1;#h;#u;#p=!1;constructor(e,i,s={}){this.type=e,e&&(this.#i=!0),this.#o=i,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#w=this.#t===this?[]:this.#t.#w,e==="!"&&!this.#t.#c&&this.#w.push(this),this.#v=this.#o?this.#o.#r.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#u=this.#r.map(e=>String(e)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#w.pop();){if(e.type!=="!")continue;let i=e,s=i.#o;for(;s;){for(let r=i.#v+1;!s.type&&r<s.#r.length;r++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(s.#r[r])}i=s,s=i.#o}}return this}push(...e){for(let i of e)if(i!==""){if(typeof i!="string"&&!(i instanceof D&&i.#o===this))throw new Error("invalid part: "+i);this.#r.push(i)}}toJSON(){let e=this.type===null?this.#r.slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...this.#r.map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(this.#v===0)return!0;let e=this.#o;for(let i=0;i<this.#v;i++){let s=e.#r[i];if(!(s instanceof D&&s.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#r.length:0;return this.#v===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let i=new D(this.type,e);for(let s of this.#r)i.copyIn(s);return i}static#s(e,i,s,r){let n=!1,o=!1,h=-1,a=!1;if(i.type===null){let u=s,d="";for(;u<e.length;){let g=e.charAt(u++);if(n||g==="\\"){n=!n,d+=g;continue}if(o){u===h+1?(g==="^"||g==="!")&&(a=!0):g==="]"&&!(u===h+2&&a)&&(o=!1),d+=g;continue}else if(g==="["){o=!0,h=u,a=!1,d+=g;continue}if(!r.noext&&je(g)&&e.charAt(u)==="("){i.push(d),d="";let w=new D(g,i);u=D.#s(e,w,u,r),i.push(w);continue}d+=g}return i.push(d),u}let l=s+1,p=new D(null,i),c=[],f="";for(;l<e.length;){let u=e.charAt(l++);if(n||u==="\\"){n=!n,f+=u;continue}if(o){l===h+1?(u==="^"||u==="!")&&(a=!0):u==="]"&&!(l===h+2&&a)&&(o=!1),f+=u;continue}else if(u==="["){o=!0,h=l,a=!1,f+=u;continue}if(je(u)&&e.charAt(l)==="("){p.push(f),f="";let d=new D(u,p);p.push(d),l=D.#s(e,d,l,r);continue}if(u==="|"){p.push(f),f="",c.push(p),p=new D(null,i);continue}if(u===")")return f===""&&i.#r.length===0&&(i.#p=!0),p.push(f),f="",i.push(...c,p),l;f+=u}return i.type=null,i.#i=void 0,i.#r=[e.substring(s-1)],l}static fromGlob(e,i={}){let s=new D(null,void 0,i);return D.#s(e,s,0,i),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[i,s,r,n]=this.toRegExpSource();if(!(r||this.#i||this.#h.nocase&&!this.#h.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return s;let o=(this.#h.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${i}$`,o),{_src:i,_glob:e})}get options(){return this.#h}toRegExpSource(e){let i=e??!!this.#h.dot;if(this.#t===this&&this.#a(),!this.type){let a=this.isStart()&&this.isEnd()&&!this.#r.some(f=>typeof f!="string"),l=this.#r.map(f=>{let[u,d,g,w]=typeof f=="string"?D.#S(f,this.#i,a):f.toRegExpSource(e);return this.#i=this.#i||g,this.#n=this.#n||w,u}).join(""),p="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&ws.has(this.#r[0]))){let f=ms,u=i&&f.has(l.charAt(0))||l.startsWith("\\.")&&f.has(l.charAt(2))||l.startsWith("\\.\\.")&&f.has(l.charAt(4)),d=!i&&!e&&f.has(l.charAt(0));p=u?gs:d?Ot:""}let c="";return this.isEnd()&&this.#t.#c&&this.#o?.type==="!"&&(c="(?:$|\\/)"),[p+l+c,at(l),this.#i=!!this.#i,this.#n]}let s=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#f(i);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#i=void 0,[a,at(this.toString()),!1,!1]}let o=!s||e||i||!Ot?"":this.#f(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let h="";if(this.type==="!"&&this.#p)h=(this.isStart()&&!i?Ot:"")+De;else{let a=this.type==="!"?"))"+(this.isStart()&&!i&&!e?Ot:"")+Pe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=r+n+a}return[h,at(n),this.#i=!!this.#i,this.#n]}#f(e){return this.#r.map(i=>{if(typeof i=="string")throw new Error("string type in extglob ast??");let[s,r,n,o]=i.toRegExpSource(e);return this.#n=this.#n||o,s}).filter(i=>!(this.isStart()&&this.isEnd())||!!i).join("|")}static#S(e,i,s=!1){let r=!1,n="",o=!1,h=!1;for(let a=0;a<e.length;a++){let l=e.charAt(a);if(r){r=!1,n+=(ys.has(l)?"\\":"")+l;continue}if(l==="*"){if(h)continue;h=!0,n+=s&&/^[*]+$/.test(e)?De:Pe,i=!0;continue}else h=!1;if(l==="\\"){a===e.length-1?n+="\\\\":r=!0;continue}if(l==="["){let[p,c,f,u]=fs(e,a);if(f){n+=p,o=o||c,a+=f-1,i=i||u;continue}}if(l==="?"){n+=le,i=!0;continue}n+=bs(l)}return[n,at(e),!!i,o]}},ri=(t,{windowsPathsNoEscape:e=!1,magicalBraces:i=!1}={})=>i?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),R=(t,e,i={})=>(Wt(e),!i.nocomment&&e.charAt(0)==="#"?!1:new Z(e,i).match(t)),vs=/^\*+([^+@!?\*\[\(]*)$/,Ss=t=>e=>!e.startsWith(".")&&e.endsWith(t),xs=t=>e=>e.endsWith(t),Es=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),As=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),ks=/^\*+\.\*+$/,Cs=t=>!t.startsWith(".")&&t.includes("."),Os=t=>t!=="."&&t!==".."&&t.includes("."),Ts=/^\.\*+$/,Fs=t=>t!=="."&&t!==".."&&t.startsWith("."),Rs=/^\*+$/,js=t=>t.length!==0&&!t.startsWith("."),Ps=t=>t.length!==0&&t!=="."&&t!=="..",Ds=/^\?+([^+@!?\*\[\(]*)?$/,$s=([t,e=""])=>{let i=ni([t]);return e?(e=e.toLowerCase(),s=>i(s)&&s.toLowerCase().endsWith(e)):i},Ms=([t,e=""])=>{let i=oi([t]);return e?(e=e.toLowerCase(),s=>i(s)&&s.toLowerCase().endsWith(e)):i},Ls=([t,e=""])=>{let i=oi([t]);return e?s=>i(s)&&s.endsWith(e):i},Ws=([t,e=""])=>{let i=ni([t]);return e?s=>i(s)&&s.endsWith(e):i},ni=([t])=>{let e=t.length;return i=>i.length===e&&!i.startsWith(".")},oi=([t])=>{let e=t.length;return i=>i.length===e&&i!=="."&&i!==".."},hi=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",$e={win32:{sep:"\\"},posix:{sep:"/"}},Ns=hi==="win32"?$e.win32.sep:$e.posix.sep;R.sep=Ns;var F=Symbol("globstar **");R.GLOBSTAR=F;var zs="[^/]",_s=zs+"*?",Bs="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Is="(?:(?!(?:\\/|^)\\.).)*?",Us=(t,e={})=>i=>R(i,t,e);R.filter=Us;var $=(t,e={})=>Object.assign({},t,e),Gs=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return R;let e=R;return Object.assign((i,s,r={})=>e(i,s,$(t,r)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,$(t,s))}static defaults(i){return e.defaults($(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,r={}){super(i,s,$(t,r))}static fromGlob(i,s={}){return e.AST.fromGlob(i,$(t,s))}},unescape:(i,s={})=>e.unescape(i,$(t,s)),escape:(i,s={})=>e.escape(i,$(t,s)),filter:(i,s={})=>e.filter(i,$(t,s)),defaults:i=>e.defaults($(t,i)),makeRe:(i,s={})=>e.makeRe(i,$(t,s)),braceExpand:(i,s={})=>e.braceExpand(i,$(t,s)),match:(i,s,r={})=>e.match(i,s,$(t,r)),sep:e.sep,GLOBSTAR:F})};R.defaults=Gs;var ai=(t,e={})=>(Wt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:os(t,{max:e.braceExpandMax}));R.braceExpand=ai;var Hs=(t,e={})=>new Z(t,e).makeRe();R.makeRe=Hs;var Vs=(t,e,i={})=>{let s=new Z(e,i);return t=t.filter(r=>s.match(r)),s.options.nonull&&!t.length&&t.push(e),t};R.match=Vs;var Me=/[?*]|[+@!]\(.*?\)|\[|\]/,Ys=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Z=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){Wt(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||hi,this.isWindows=this.platform==="win32";let i="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[i]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((r,n,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=r[0]===""&&r[1]===""&&(r[2]==="?"||!Me.test(r[2]))&&!Me.test(r[3]),a=/^[a-z]:/i.test(r[0]);if(h)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(a)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(h=>this.parse(h))});if(this.debug(this.pattern,s),this.set=s.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let n=this.set[r];n[0]===""&&n[1]===""&&this.globParts[r][2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])&&(n[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let s=0;s<t[i].length;s++)t[i][s]==="**"&&(t[i][s]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let i=-1;for(;(i=e.indexOf("**",i+1))!==-1;){let s=i;for(;e[s+1]==="**";)s++;s!==i&&e.splice(i,s-i)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((i,s)=>{let r=i[i.length-1];return s==="**"&&r==="**"?i:s===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(i.pop(),i):(i.push(s),i)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){let r=t[s];s===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let s=t[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(e=!0,t.splice(i-1,2),i-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let i of t){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let n=s;for(;i[n+1]==="**";)n++;n>s&&i.splice(s+1,n-s);let o=i[s+1],h=i[s+2],a=i[s+3];if(o!==".."||!h||h==="."||h===".."||!a||a==="."||a==="..")continue;e=!0,i.splice(s,1);let l=i.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let n=1;n<i.length-1;n++){let o=i[n];n===1&&o===""&&i[0]===""||(o==="."||o==="")&&(e=!0,i.splice(n,1),n--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(e=!0,i.pop())}let r=0;for(;(r=i.indexOf("..",r+1))!==-1;){let n=i[r-1];if(n&&n!=="."&&n!==".."&&n!=="**"){e=!0;let o=r===1&&i[r+1]==="**"?["."]:[];i.splice(r-1,2,...o),i.length===0&&i.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){let s=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);if(s){t[e]=[],t[i]=s;break}}return t.filter(e=>e.length)}partsMatch(t,e,i=!1){let s=0,r=0,n=[],o="";for(;s<t.length&&r<e.length;)if(t[s]===e[r])n.push(o==="b"?e[r]:t[s]),s++,r++;else if(i&&t[s]==="**"&&e[r]===t[s+1])n.push(t[s]),s++;else if(i&&e[r]==="**"&&t[s]===e[r+1])n.push(e[r]),r++;else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(o==="b")return!1;o="a",n.push(t[s]),s++,r++}else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(o==="a")return!1;o="b",n.push(e[r]),s++,r++}else return!1;return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,i=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e}matchOne(t,e,i=!1){let s=this.options;if(this.isWindows){let d=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),g=!d&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),w=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),m=!w&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),y=g?3:d?0:void 0,b=m?3:w?0:void 0;if(typeof y=="number"&&typeof b=="number"){let[v,S]=[t[y],e[b]];v.toLowerCase()===S.toLowerCase()&&(e[b]=v,b>y?e=e.slice(b):y>b&&(t=t.slice(y)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,o=0,h=t.length,a=e.length;n<h&&o<a;n++,o++){this.debug("matchOne loop");var l=e[o],p=t[n];if(this.debug(e,l,p),l===!1)return!1;if(l===F){this.debug("GLOBSTAR",[e,l,p]);var c=n,f=o+1;if(f===a){for(this.debug("** at the end");n<h;n++)if(t[n]==="."||t[n]===".."||!s.dot&&t[n].charAt(0)===".")return!1;return!0}for(;c<h;){var u=t[c];if(this.debug(`
8
8
  globstar while`,t,c,e,f,u),this.matchOne(t.slice(c),e.slice(f),i))return this.debug("globstar found match!",c,h,u),!0;if(u==="."||u===".."||!s.dot&&u.charAt(0)==="."){this.debug("dot detected!",t,c,e,f);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(i&&(this.debug(`
9
9
  >>> no match, partial?`,t,c,e,f),c===h))}let d;if(typeof l=="string"?(d=p===l,this.debug("string match",l,p,d)):(d=l.test(p),this.debug("pattern match",l,p,d)),!d)return!1}if(n===h&&o===a)return!0;if(n===h)return i;if(o===a)return n===h-1&&t[n]==="";throw new Error("wtf?")}braceExpand(){return ai(this.pattern,this.options)}parse(t){Wt(t);let e=this.options;if(t==="**")return F;if(t==="")return"";let i,s=null;(i=t.match(Rs))?s=e.dot?Ps:js:(i=t.match(vs))?s=(e.nocase?e.dot?As:Es:e.dot?xs:Ss)(i[1]):(i=t.match(Ds))?s=(e.nocase?e.dot?Ms:$s:e.dot?Ls:Ws)(i):(i=t.match(ks))?s=e.dot?Os:Cs:(i=t.match(Ts))&&(s=Fs);let r=si.fromGlob(t,this.options).toMMPattern();return s&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:s}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,i=e.noglobstar?_s:e.dot?Bs:Is,s=new Set(e.nocase?["i"]:[]),r=t.map(h=>{let a=h.map(p=>{if(p instanceof RegExp)for(let c of p.flags.split(""))s.add(c);return typeof p=="string"?Ys(p):p===F?F:p._src});a.forEach((p,c)=>{let f=a[c+1],u=a[c-1];p!==F||u===F||(u===void 0?f!==void 0&&f!==F?a[c+1]="(?:\\/|"+i+"\\/)?"+f:a[c]=i:f===void 0?a[c-1]=u+"(?:\\/|\\/"+i+")?":f!==F&&(a[c-1]=u+"(?:\\/|\\/"+i+"\\/)"+f,a[c+1]=F))});let l=a.filter(p=>p!==F);if(this.partial&&l.length>=1){let p=[];for(let c=1;c<=l.length;c++)p.push(l.slice(0,c).join("/"));return"(?:"+p.join("|")+")"}return l.join("/")}).join("|"),[n,o]=t.length>1?["(?:",")"]:["",""];r="^"+n+r+o+"$",this.partial&&(r="^(?:\\/|"+n+r.slice(1,-1)+o+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let s=this.slashSplit(t);this.debug(this.pattern,"split",s);let r=this.set;this.debug(this.pattern,"set",r);let n=s[s.length-1];if(!n)for(let o=s.length-2;!n&&o>=0;o--)n=s[o];for(let o=0;o<r.length;o++){let h=r[o],a=s;if(i.matchBase&&h.length===1&&(a=[n]),this.matchOne(a,h,e))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return R.defaults(t).Minimatch}};R.AST=si;R.Minimatch=Z;R.escape=ri;R.unescape=at;var qs=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,li=new Set,oe=typeof process=="object"&&process?process:{},ci=(t,e,i,s)=>{typeof oe.emitWarning=="function"?oe.emitWarning(t,e,i,s):console.error(`[${i}] ${e}: ${t}`)},Nt=globalThis.AbortController,Le=globalThis.AbortSignal;if(typeof Nt>"u"){Le=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},Nt=class{constructor(){e()}signal=new Le;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let t=oe.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,ci("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var Ks=t=>!li.has(t),K=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),pi=t=>K(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Mt:null:null,Mt=class extends Array{constructor(t){super(t),this.fill(0)}},Zs=class wt{heap;length;static#t=!1;static create(e){let i=pi(e);if(!i)return[];wt.#t=!0;let s=new wt(e,i);return wt.#t=!1,s}constructor(e,i){if(!wt.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Bt=class ui{#t;#i;#n;#r;#o;#v;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#u;#p;#a;#s;#f;#S;#b;#d;#T;#g;#A;#k;#m;#y;#x;#C;#e;#$;static unsafeExposeInternals(e){return{starts:e.#k,ttls:e.#m,autopurgeTimers:e.#y,sizes:e.#A,keyMap:e.#p,keyList:e.#a,valList:e.#s,next:e.#f,prev:e.#S,get head(){return e.#b},get tail(){return e.#d},free:e.#T,isBackgroundFetch:i=>e.#l(i),backgroundFetch:(i,s,r,n)=>e.#I(i,s,r,n),moveToTail:i=>e.#L(i),indexes:i=>e.#R(i),rindexes:i=>e.#j(i),isStale:i=>e.#E(i)}}get max(){return this.#t}get maxSize(){return this.#i}get calculatedSize(){return this.#u}get size(){return this.#h}get fetchMethod(){return this.#v}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(e){let{max:i=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,onInsert:p,disposeAfter:c,noDisposeOnSet:f,noUpdateTTL:u,maxSize:d=0,maxEntrySize:g=0,sizeCalculation:w,fetchMethod:m,memoMethod:y,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:Y,ignoreFetchAbort:it,perf:st}=e;if(st!==void 0&&typeof st?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=st??qs,i!==0&&!K(i))throw new TypeError("max option must be a nonnegative integer");let rt=i?pi(i):Array;if(!rt)throw new Error("invalid max value: "+i);if(this.#t=i,this.#i=d,this.maxEntrySize=g||this.#i,this.sizeCalculation=w,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=y,m!==void 0&&typeof m!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#v=m,this.#C=!!m,this.#p=new Map,this.#a=new Array(i).fill(void 0),this.#s=new Array(i).fill(void 0),this.#f=new rt(i),this.#S=new rt(i),this.#b=0,this.#d=0,this.#T=Zs.create(i),this.#h=0,this.#u=0,typeof l=="function"&&(this.#n=l),typeof p=="function"&&(this.#r=p),typeof c=="function"?(this.#o=c,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#x=!!this.#n,this.#$=!!this.#r,this.#e=!!this.#o,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!Y,this.ignoreFetchAbort=!!it,this.maxEntrySize!==0){if(this.#i!==0&&!K(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!K(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=K(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!K(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#i===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#i){let Jt="LRU_CACHE_UNBOUNDED";Ks(Jt)&&(li.add(Jt),ci("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Jt,ui))}}getRemainingTTL(e){return this.#p.has(e)?1/0:0}#P(){let e=new Mt(this.#t),i=new Mt(this.#t);this.#m=e,this.#k=i;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#y=s,this.#N=(o,h,a=this.#c.now())=>{if(i[o]=h!==0?a:0,e[o]=h,s?.[o]&&(clearTimeout(s[o]),s[o]=void 0),h!==0&&s){let l=setTimeout(()=>{this.#E(o)&&this.#F(this.#a[o],"expire")},h+1);l.unref&&l.unref(),s[o]=l}},this.#O=o=>{i[o]=e[o]!==0?this.#c.now():0},this.#D=(o,h)=>{if(e[h]){let a=e[h],l=i[h];if(!a||!l)return;o.ttl=a,o.start=l,o.now=r||n();let p=o.now-l;o.remainingTTL=a-p}};let r=0,n=()=>{let o=this.#c.now();if(this.ttlResolution>0){r=o;let h=setTimeout(()=>r=0,this.ttlResolution);h.unref&&h.unref()}return o};this.getRemainingTTL=o=>{let h=this.#p.get(o);if(h===void 0)return 0;let a=e[h],l=i[h];if(!a||!l)return 1/0;let p=(r||n())-l;return a-p},this.#E=o=>{let h=i[o],a=e[o];return!!a&&!!h&&(r||n())-h>a}}#O=()=>{};#D=()=>{};#N=()=>{};#E=()=>!1;#G(){let e=new Mt(this.#t);this.#u=0,this.#A=e,this.#W=i=>{this.#u-=e[i],e[i]=0},this.#z=(i,s,r,n)=>{if(this.#l(s))return 0;if(!K(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(s,i),!K(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.#M=(i,s,r)=>{if(e[i]=s,this.#i){let n=this.#i-e[i];for(;this.#u>n;)this.#B(!0)}this.#u+=e[i],r&&(r.entrySize=s,r.totalCalculatedSize=this.#u)}}#W=e=>{};#M=(e,i,s)=>{};#z=(e,i,s,r)=>{if(s||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#h)for(let i=this.#d;!(!this.#_(i)||((e||!this.#E(i))&&(yield i),i===this.#b));)i=this.#S[i]}*#j({allowStale:e=this.allowStale}={}){if(this.#h)for(let i=this.#b;!(!this.#_(i)||((e||!this.#E(i))&&(yield i),i===this.#d));)i=this.#f[i]}#_(e){return e!==void 0&&this.#p.get(this.#a[e])===e}*entries(){for(let e of this.#R())this.#s[e]!==void 0&&this.#a[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#a[e],this.#s[e]])}*rentries(){for(let e of this.#j())this.#s[e]!==void 0&&this.#a[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#a[e],this.#s[e]])}*keys(){for(let e of this.#R()){let i=this.#a[e];i!==void 0&&!this.#l(this.#s[e])&&(yield i)}}*rkeys(){for(let e of this.#j()){let i=this.#a[e];i!==void 0&&!this.#l(this.#s[e])&&(yield i)}}*values(){for(let e of this.#R())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}*rvalues(){for(let e of this.#j())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,i={}){for(let s of this.#R()){let r=this.#s[s],n=this.#l(r)?r.__staleWhileFetching:r;if(n!==void 0&&e(n,this.#a[s],this))return this.get(this.#a[s],i)}}forEach(e,i=this){for(let s of this.#R()){let r=this.#s[s],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(i,n,this.#a[s],this)}}rforEach(e,i=this){for(let s of this.#j()){let r=this.#s[s],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(i,n,this.#a[s],this)}}purgeStale(){let e=!1;for(let i of this.#j({allowStale:!0}))this.#E(i)&&(this.#F(this.#a[i],"expire"),e=!0);return e}info(e){let i=this.#p.get(e);if(i===void 0)return;let s=this.#s[i],r=this.#l(s)?s.__staleWhileFetching:s;if(r===void 0)return;let n={value:r};if(this.#m&&this.#k){let o=this.#m[i],h=this.#k[i];if(o&&h){let a=o-(this.#c.now()-h);n.ttl=a,n.start=Date.now()}}return this.#A&&(n.size=this.#A[i]),n}dump(){let e=[];for(let i of this.#R({allowStale:!0})){let s=this.#a[i],r=this.#s[i],n=this.#l(r)?r.__staleWhileFetching:r;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#m&&this.#k){o.ttl=this.#m[i];let h=this.#c.now()-this.#k[i];o.start=Math.floor(Date.now()-h)}this.#A&&(o.size=this.#A[i]),e.unshift([s,o])}return e}load(e){this.clear();for(let[i,s]of e){if(s.start){let r=Date.now()-s.start;s.start=this.#c.now()-r}this.set(i,s.value,s)}}set(e,i,s={}){if(i===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,p=this.#z(e,i,s.size||0,h);if(this.maxEntrySize&&p>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#F(e,"set"),this;let c=this.#h===0?void 0:this.#p.get(e);if(c===void 0)c=this.#h===0?this.#d:this.#T.length!==0?this.#T.pop():this.#h===this.#t?this.#B(!1):this.#h,this.#a[c]=e,this.#s[c]=i,this.#p.set(e,c),this.#f[this.#d]=c,this.#S[c]=this.#d,this.#d=c,this.#h++,this.#M(c,p,a),a&&(a.set="add"),l=!1,this.#$&&this.#r?.(i,e,"add");else{this.#L(c);let f=this.#s[c];if(i!==f){if(this.#C&&this.#l(f)){f.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=f;u!==void 0&&!o&&(this.#x&&this.#n?.(u,e,"set"),this.#e&&this.#g?.push([u,e,"set"]))}else o||(this.#x&&this.#n?.(f,e,"set"),this.#e&&this.#g?.push([f,e,"set"]));if(this.#W(c),this.#M(c,p,a),this.#s[c]=i,a){a.set="replace";let u=f&&this.#l(f)?f.__staleWhileFetching:f;u!==void 0&&(a.oldValue=u)}}else a&&(a.set="update");this.#$&&this.onInsert?.(i,e,i===f?"update":"replace")}if(r!==0&&!this.#m&&this.#P(),this.#m&&(l||this.#N(c,r,n),a&&this.#D(a,c)),!o&&this.#e&&this.#g){let f=this.#g,u;for(;u=f?.shift();)this.#o?.(...u)}return this}pop(){try{for(;this.#h;){let e=this.#s[this.#b];if(this.#B(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#e&&this.#g){let e=this.#g,i;for(;i=e?.shift();)this.#o?.(...i)}}}#B(e){let i=this.#b,s=this.#a[i],r=this.#s[i];return this.#C&&this.#l(r)?r.__abortController.abort(new Error("evicted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(r,s,"evict"),this.#e&&this.#g?.push([r,s,"evict"])),this.#W(i),this.#y?.[i]&&(clearTimeout(this.#y[i]),this.#y[i]=void 0),e&&(this.#a[i]=void 0,this.#s[i]=void 0,this.#T.push(i)),this.#h===1?(this.#b=this.#d=0,this.#T.length=0):this.#b=this.#f[i],this.#p.delete(s),this.#h--,i}has(e,i={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:r}=i,n=this.#p.get(e);if(n!==void 0){let o=this.#s[n];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#E(n))r&&(r.has="stale",this.#D(r,n));else return s&&this.#O(n),r&&(r.has="hit",this.#D(r,n)),!0}else r&&(r.has="miss");return!1}peek(e,i={}){let{allowStale:s=this.allowStale}=i,r=this.#p.get(e);if(r===void 0||!s&&this.#E(r))return;let n=this.#s[r];return this.#l(n)?n.__staleWhileFetching:n}#I(e,i,s,r){let n=i===void 0?void 0:this.#s[i];if(this.#l(n))return n;let o=new Nt,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:r},l=(g,w=!1)=>{let{aborted:m}=o.signal,y=s.ignoreFetchAbort&&g!==void 0,b=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&g!==void 0);if(s.status&&(m&&!w?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,y&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),m&&!y&&!w)return c(o.signal.reason,b);let v=u,S=this.#s[i];return(S===u||y&&w&&S===void 0)&&(g===void 0?v.__staleWhileFetching!==void 0?this.#s[i]=v.__staleWhileFetching:this.#F(e,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(e,g,a.options))),g},p=g=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=g),c(g,!1)),c=(g,w)=>{let{aborted:m}=o.signal,y=m&&s.allowStaleOnFetchAbort,b=y||s.allowStaleOnFetchRejection,v=b||s.noDeleteOnFetchRejection,S=u;if(this.#s[i]===u&&(!v||!w&&S.__staleWhileFetching===void 0?this.#F(e,"fetch"):y||(this.#s[i]=S.__staleWhileFetching)),b)return s.status&&S.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw g},f=(g,w)=>{let m=this.#v?.(e,n,a);m&&m instanceof Promise&&m.then(y=>g(y===void 0?void 0:y),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(g(void 0),s.allowStaleOnFetchAbort&&(g=y=>l(y,!0)))})};s.status&&(s.status.fetchDispatched=!0);let u=new Promise(f).then(l,p),d=Object.assign(u,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return i===void 0?(this.set(e,d,{...a.options,status:void 0}),i=this.#p.get(e)):this.#s[i]=d,d}#l(e){if(!this.#C)return!1;let i=e;return!!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof Nt}async fetch(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:g,forceRefresh:w=!1,status:m,signal:y}=i;if(!this.#C)return m&&(m.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:m});let b={allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:p,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:d,ignoreFetchAbort:u,status:m,signal:y},v=this.#p.get(e);if(v===void 0){m&&(m.fetch="miss");let S=this.#I(e,v,b,g);return S.__returned=S}else{let S=this.#s[v];if(this.#l(S)){let rt=s&&S.__staleWhileFetching!==void 0;return m&&(m.fetch="inflight",rt&&(m.returnedStale=!0)),rt?S.__staleWhileFetching:S.__returned=S}let Y=this.#E(v);if(!w&&!Y)return m&&(m.fetch="hit"),this.#L(v),r&&this.#O(v),m&&this.#D(m,v),S;let it=this.#I(e,v,b,g),st=it.__staleWhileFetching!==void 0&&s;return m&&(m.fetch=Y?"stale":"refresh",st&&Y&&(m.returnedStale=!0)),st?it.__staleWhileFetching:it.__returned=it}}async forceFetch(e,i={}){let s=await this.fetch(e,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,i={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...o}=i,h=this.get(e,o);if(!n&&h!==void 0)return h;let a=s(e,h,{options:o,context:r});return this.set(e,a,o),a}get(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=i,h=this.#p.get(e);if(h!==void 0){let a=this.#s[h],l=this.#l(a);return o&&this.#D(o,h),this.#E(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(n||this.#F(e,"expire"),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#L(h),r&&this.#O(h),a))}else o&&(o.get="miss")}#U(e,i){this.#S[i]=e,this.#f[e]=i}#L(e){e!==this.#d&&(e===this.#b?this.#b=this.#f[e]:this.#U(this.#S[e],this.#f[e]),this.#U(this.#d,e),this.#d=e)}delete(e){return this.#F(e,"delete")}#F(e,i){let s=!1;if(this.#h!==0){let r=this.#p.get(e);if(r!==void 0)if(this.#y?.[r]&&(clearTimeout(this.#y?.[r]),this.#y[r]=void 0),s=!0,this.#h===1)this.#H(i);else{this.#W(r);let n=this.#s[r];if(this.#l(n)?n.__abortController.abort(new Error("deleted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(n,e,i),this.#e&&this.#g?.push([n,e,i])),this.#p.delete(e),this.#a[r]=void 0,this.#s[r]=void 0,r===this.#d)this.#d=this.#S[r];else if(r===this.#b)this.#b=this.#f[r];else{let o=this.#S[r];this.#f[o]=this.#f[r];let h=this.#f[r];this.#S[h]=this.#S[r]}this.#h--,this.#T.push(r)}}if(this.#e&&this.#g?.length){let r=this.#g,n;for(;n=r?.shift();)this.#o?.(...n)}return s}clear(){return this.#H("delete")}#H(e){for(let i of this.#j({allowStale:!0})){let s=this.#s[i];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else{let r=this.#a[i];this.#x&&this.#n?.(s,r,e),this.#e&&this.#g?.push([s,r,e])}}if(this.#p.clear(),this.#s.fill(void 0),this.#a.fill(void 0),this.#m&&this.#k){this.#m.fill(0),this.#k.fill(0);for(let i of this.#y??[])i!==void 0&&clearTimeout(i);this.#y?.fill(void 0)}if(this.#A&&this.#A.fill(0),this.#b=0,this.#d=0,this.#T.length=0,this.#u=0,this.#h=0,this.#e&&this.#g){let i=this.#g,s;for(;s=i?.shift();)this.#o?.(...s)}}},We=typeof process=="object"&&process?process:{stdout:null,stderr:null},pr=t=>!!t&&typeof t=="object"&&(t instanceof zt||t instanceof fi||ur(t)||fr(t)),ur=t=>!!t&&typeof t=="object"&&t instanceof ce&&typeof t.pipe=="function"&&t.pipe!==fi.Writable.prototype.pipe,fr=t=>!!t&&typeof t=="object"&&t instanceof ce&&typeof t.write=="function"&&typeof t.end=="function",G=Symbol("EOF"),H=Symbol("maybeEmitEnd"),q=Symbol("emittedEnd"),Tt=Symbol("emittingEnd"),pt=Symbol("emittedError"),Ft=Symbol("closed"),Ne=Symbol("read"),Rt=Symbol("flush"),ze=Symbol("flushChunk"),_=Symbol("encoding"),ot=Symbol("decoder"),A=Symbol("flowing"),ut=Symbol("paused"),ht=Symbol("resume"),k=Symbol("buffer"),T=Symbol("pipes"),C=Symbol("bufferLength"),Qt=Symbol("bufferPush"),jt=Symbol("bufferShift"),O=Symbol("objectMode"),E=Symbol("destroyed"),te=Symbol("error"),ee=Symbol("emitData"),_e=Symbol("emitEnd"),ie=Symbol("emitEnd2"),I=Symbol("async"),se=Symbol("abort"),Pt=Symbol("aborted"),ft=Symbol("signal"),Q=Symbol("dataListeners"),P=Symbol("discarded"),dt=t=>Promise.resolve().then(t),dr=t=>t(),gr=t=>t==="end"||t==="finish"||t==="prefinish",mr=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,wr=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),di=class{src;dest;opts;ondrain;constructor(t,e,i){this.src=t,this.dest=e,this.opts=i,this.ondrain=()=>t[ht](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},yr=class extends di{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,i){super(t,e,i),this.proxyErrors=s=>e.emit("error",s),t.on("error",this.proxyErrors)}},br=t=>!!t.objectMode,vr=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",zt=class extends ce{[A]=!1;[ut]=!1;[T]=[];[k]=[];[O];[_];[I];[ot];[G]=!1;[q]=!1;[Tt]=!1;[Ft]=!1;[pt]=null;[C]=0;[E]=!1;[ft];[Pt]=!1;[Q]=0;[P]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");br(e)?(this[O]=!0,this[_]=null):vr(e)?(this[_]=e.encoding,this[O]=!1):(this[O]=!1,this[_]=null),this[I]=!!e.async,this[ot]=this[_]?new cr(this[_]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[k]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[T]});let{signal:i}=e;i&&(this[ft]=i,i.aborted?this[se]():i.addEventListener("abort",()=>this[se]()))}get bufferLength(){return this[C]}get encoding(){return this[_]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[O]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[I]}set async(t){this[I]=this[I]||!!t}[se](){this[Pt]=!0,this.emit("abort",this[ft]?.reason),this.destroy(this[ft]?.reason)}get aborted(){return this[Pt]}set aborted(t){}write(t,e,i){if(this[Pt])return!1;if(this[G])throw new Error("write after end");if(this[E])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(i=e,e="utf8"),e||(e="utf8");let s=this[I]?dt:dr;if(!this[O]&&!Buffer.isBuffer(t)){if(wr(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(mr(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[O]?(this[A]&&this[C]!==0&&this[Rt](!0),this[A]?this.emit("data",t):this[Qt](t),this[C]!==0&&this.emit("readable"),i&&s(i),this[A]):t.length?(typeof t=="string"&&!(e===this[_]&&!this[ot]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[_]&&(t=this[ot].write(t)),this[A]&&this[C]!==0&&this[Rt](!0),this[A]?this.emit("data",t):this[Qt](t),this[C]!==0&&this.emit("readable"),i&&s(i),this[A]):(this[C]!==0&&this.emit("readable"),i&&s(i),this[A])}read(t){if(this[E])return null;if(this[P]=!1,this[C]===0||t===0||t&&t>this[C])return this[H](),null;this[O]&&(t=null),this[k].length>1&&!this[O]&&(this[k]=[this[_]?this[k].join(""):Buffer.concat(this[k],this[C])]);let e=this[Ne](t||null,this[k][0]);return this[H](),e}[Ne](t,e){if(this[O])this[jt]();else{let i=e;t===i.length||t===null?this[jt]():typeof i=="string"?(this[k][0]=i.slice(t),e=i.slice(0,t),this[C]-=t):(this[k][0]=i.subarray(t),e=i.subarray(0,t),this[C]-=t)}return this.emit("data",e),!this[k].length&&!this[G]&&this.emit("drain"),e}end(t,e,i){return typeof t=="function"&&(i=t,t=void 0),typeof e=="function"&&(i=e,e="utf8"),t!==void 0&&this.write(t,e),i&&this.once("end",i),this[G]=!0,this.writable=!1,(this[A]||!this[ut])&&this[H](),this}[ht](){this[E]||(!this[Q]&&!this[T].length&&(this[P]=!0),this[ut]=!1,this[A]=!0,this.emit("resume"),this[k].length?this[Rt]():this[G]?this[H]():this.emit("drain"))}resume(){return this[ht]()}pause(){this[A]=!1,this[ut]=!0,this[P]=!1}get destroyed(){return this[E]}get flowing(){return this[A]}get paused(){return this[ut]}[Qt](t){this[O]?this[C]+=1:this[C]+=t.length,this[k].push(t)}[jt](){return this[O]?this[C]-=1:this[C]-=this[k][0].length,this[k].shift()}[Rt](t=!1){do;while(this[ze](this[jt]())&&this[k].length);!t&&!this[k].length&&!this[G]&&this.emit("drain")}[ze](t){return this.emit("data",t),this[A]}pipe(t,e){if(this[E])return t;this[P]=!1;let i=this[q];return e=e||{},t===We.stdout||t===We.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[T].push(e.proxyErrors?new yr(this,t,e):new di(this,t,e)),this[I]?dt(()=>this[ht]()):this[ht]()),t}unpipe(t){let e=this[T].find(i=>i.dest===t);e&&(this[T].length===1?(this[A]&&this[Q]===0&&(this[A]=!1),this[T]=[]):this[T].splice(this[T].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let i=super.on(t,e);if(t==="data")this[P]=!1,this[Q]++,!this[T].length&&!this[A]&&this[ht]();else if(t==="readable"&&this[C]!==0)super.emit("readable");else if(gr(t)&&this[q])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[pt]){let s=e;this[I]?dt(()=>s.call(this,this[pt])):s.call(this,this[pt])}return i}removeListener(t,e){return this.off(t,e)}off(t,e){let i=super.off(t,e);return t==="data"&&(this[Q]=this.listeners("data").length,this[Q]===0&&!this[P]&&!this[T].length&&(this[A]=!1)),i}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Q]=0,!this[P]&&!this[T].length&&(this[A]=!1)),e}get emittedEnd(){return this[q]}[H](){!this[Tt]&&!this[q]&&!this[E]&&this[k].length===0&&this[G]&&(this[Tt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ft]&&this.emit("close"),this[Tt]=!1)}emit(t,...e){let i=e[0];if(t!=="error"&&t!=="close"&&t!==E&&this[E])return!1;if(t==="data")return!this[O]&&!i?!1:this[I]?(dt(()=>this[ee](i)),!0):this[ee](i);if(t==="end")return this[_e]();if(t==="close"){if(this[Ft]=!0,!this[q]&&!this[E])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[pt]=i,super.emit(te,i);let r=!this[ft]||this.listeners("error").length?super.emit("error",i):!1;return this[H](),r}else if(t==="resume"){let r=super.emit("resume");return this[H](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let s=super.emit(t,...e);return this[H](),s}[ee](t){for(let i of this[T])i.dest.write(t)===!1&&this.pause();let e=this[P]?!1:super.emit("data",t);return this[H](),e}[_e](){return this[q]?!1:(this[q]=!0,this.readable=!1,this[I]?(dt(()=>this[ie]()),!0):this[ie]())}[ie](){if(this[ot]){let e=this[ot].end();if(e){for(let i of this[T])i.dest.write(e);this[P]||super.emit("data",e)}}for(let e of this[T])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[O]||(t.dataLength=0);let e=this.promise();return this.on("data",i=>{t.push(i),this[O]||(t.dataLength+=i.length)}),await e,t}async concat(){if(this[O])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[_]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(E,()=>e(new Error("stream destroyed"))),this.on("error",i=>e(i)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[P]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[G])return e();let s,r,n=l=>{this.off("data",o),this.off("end",h),this.off(E,a),e(),r(l)},o=l=>{this.off("error",n),this.off("end",h),this.off(E,a),this.pause(),s({value:l,done:!!this[G]})},h=()=>{this.off("error",n),this.off("data",o),this.off(E,a),e(),s({done:!0,value:void 0})},a=()=>n(new Error("stream destroyed"));return new Promise((l,p)=>{r=p,s=l,this.once(E,a),this.once("error",n),this.once("end",h),this.once("data",o)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[P]=!1;let t=!1,e=()=>(this.pause(),this.off(te,e),this.off(E,e),this.off("end",e),t=!0,{done:!0,value:void 0}),i=()=>{if(t)return e();let s=this.read();return s===null?e():{done:!1,value:s}};return this.once("end",e),this.once(te,e),this.once(E,e),{next:i,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[E])return t?this.emit("error",t):this.emit(E),this;this[E]=!0,this[P]=!0,this[k].length=0,this[C]=0;let e=this;return typeof e.close=="function"&&!this[Ft]&&e.close(),t?this.emit("error",t):this.emit(E),this}static get isStream(){return pr}},Sr=rr.native,yt={lstatSync:tr,readdir:er,readdirSync:ir,readlinkSync:sr,realpathSync:Sr,promises:{lstat:or,readdir:hr,readlink:ar,realpath:lr}},gi=t=>!t||t===yt||t===nr?yt:{...yt,...t,promises:{...yt.promises,...t.promises||{}}},mi=/^\\\\\?\\([a-z]:)\\?$/i,xr=t=>t.replace(/\//g,"\\").replace(mi,"$1\\"),Er=/[\\\/]/,L=0,wi=1,yi=2,U=4,bi=6,vi=8,tt=10,Si=12,M=15,gt=~M,re=16,Be=32,bt=64,B=128,Dt=256,Lt=512,Ie=bt|B|Lt,Ar=1023,ne=t=>t.isFile()?vi:t.isDirectory()?U:t.isSymbolicLink()?tt:t.isCharacterDevice()?yi:t.isBlockDevice()?bi:t.isSocket()?Si:t.isFIFO()?wi:L,Ue=new Bt({max:2**12}),vt=t=>{let e=Ue.get(t);if(e)return e;let i=t.normalize("NFKD");return Ue.set(t,i),i},Ge=new Bt({max:2**12}),$t=t=>{let e=Ge.get(t);if(e)return e;let i=vt(t.toLowerCase());return Ge.set(t,i),i},He=class extends Bt{constructor(){super({max:256})}},kr=class extends Bt{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},xi=Symbol("PathScurry setAsCwd"),j=class{name;root;roots;parent;nocase;isCWD=!1;#t;#i;get dev(){return this.#i}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#v;get gid(){return this.#v}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#h;get ino(){return this.#h}#u;get size(){return this.#u}#p;get blocks(){return this.#p}#a;get atimeMs(){return this.#a}#s;get mtimeMs(){return this.#s}#f;get ctimeMs(){return this.#f}#S;get birthtimeMs(){return this.#S}#b;get atime(){return this.#b}#d;get mtime(){return this.#d}#T;get ctime(){return this.#T}#g;get birthtime(){return this.#g}#A;#k;#m;#y;#x;#C;#e;#$;#P;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=L,i,s,r,n,o){this.name=t,this.#A=r?$t(t):vt(t),this.#e=e&Ar,this.nocase=r,this.roots=s,this.root=i||this,this.#$=n,this.#m=o.fullpath,this.#x=o.relative,this.#C=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=gi(o.fs)}depth(){return this.#k!==void 0?this.#k:this.parent?this.#k=this.parent.depth()+1:this.#k=0}childrenCache(){return this.#$}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#D(i):this.#D(i)}#D(t){let e=this;for(let i of t)e=e.child(i);return e}children(){let t=this.#$.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#$.set(this,e),this.#e&=~re,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let i=this.children(),s=this.nocase?$t(t):vt(t);for(let h of i)if(h.#A===s)return h;let r=this.parent?this.sep:"",n=this.#m?this.#m+r+t:void 0,o=this.newChild(t,L,{...e,parent:this,fullpath:n});return this.canReaddir()||(o.#e|=B),i.push(o),o}relative(){if(this.isCWD)return"";if(this.#x!==void 0)return this.#x;let t=this.name,e=this.parent;if(!e)return this.#x=this.name;let i=e.relative();return i+(!i||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#C!==void 0)return this.#C;let t=this.name,e=this.parent;if(!e)return this.#C=this.fullpathPosix();let i=e.relativePosix();return i+(!i||!e.parent?"":"/")+t}fullpath(){if(this.#m!==void 0)return this.#m;let t=this.name,e=this.parent;if(!e)return this.#m=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#m=i}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(s)?this.#y=`//?/${s}`:this.#y=s}let t=this.parent,e=t.fullpathPosix(),i=e+(!e||!t.parent?"":"/")+this.name;return this.#y=i}isUnknown(){return(this.#e&M)===L}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&M)===vi}isDirectory(){return(this.#e&M)===U}isCharacterDevice(){return(this.#e&M)===yi}isBlockDevice(){return(this.#e&M)===bi}isFIFO(){return(this.#e&M)===wi}isSocket(){return(this.#e&M)===Si}isSymbolicLink(){return(this.#e&tt)===tt}lstatCached(){return this.#e&Be?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#O}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let t=this.#e&M;return!(t!==L&&t!==tt||this.#e&Dt||this.#e&B)}calledReaddir(){return!!(this.#e&re)}isENOENT(){return!!(this.#e&B)}isNamed(t){return this.nocase?this.#A===$t(t):this.#A===vt(t)}async readlink(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(e);if(i)return this.#P=i}catch(e){this.#j(e.code);return}}readlinkSync(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(e);if(i)return this.#P=i}catch(e){this.#j(e.code);return}}#N(t){this.#e|=re;for(let e=t.provisional;e<t.length;e++){let i=t[e];i&&i.#E()}}#E(){this.#e&B||(this.#e=(this.#e|B)&gt,this.#G())}#G(){let t=this.children();t.provisional=0;for(let e of t)e.#E()}#W(){this.#e|=Lt,this.#M()}#M(){if(this.#e&bt)return;let t=this.#e;(t&M)===U&&(t&=gt),this.#e=t|bt,this.#G()}#z(t=""){t==="ENOTDIR"||t==="EPERM"?this.#M():t==="ENOENT"?this.#E():this.children().provisional=0}#R(t=""){t==="ENOTDIR"?this.parent.#M():t==="ENOENT"&&this.#E()}#j(t=""){let e=this.#e;e|=Dt,t==="ENOENT"&&(e|=B),(t==="EINVAL"||t==="UNKNOWN")&&(e&=gt),this.#e=e,t==="ENOTDIR"&&this.parent&&this.parent.#M()}#_(t,e){return this.#I(t,e)||this.#B(t,e)}#B(t,e){let i=ne(t),s=this.newChild(t.name,i,{parent:this}),r=s.#e&M;return r!==U&&r!==tt&&r!==L&&(s.#e|=bt),e.unshift(s),e.provisional++,s}#I(t,e){for(let i=e.provisional;i<e.length;i++){let s=e[i];if((this.nocase?$t(t.name):vt(t.name))===s.#A)return this.#l(t,s,i,e)}}#l(t,e,i,s){let r=e.name;return e.#e=e.#e&gt|ne(t),r!==t.name&&(e.name=t.name),i!==s.provisional&&(i===s.length-1?s.pop():s.splice(i,1),s.unshift(e)),s.provisional++,e}async lstat(){if((this.#e&B)===0)try{return this.#U(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#R(t.code)}}lstatSync(){if((this.#e&B)===0)try{return this.#U(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#R(t.code)}}#U(t){let{atime:e,atimeMs:i,birthtime:s,birthtimeMs:r,blksize:n,blocks:o,ctime:h,ctimeMs:a,dev:l,gid:p,ino:c,mode:f,mtime:u,mtimeMs:d,nlink:g,rdev:w,size:m,uid:y}=t;this.#b=e,this.#a=i,this.#g=s,this.#S=r,this.#c=n,this.#p=o,this.#T=h,this.#f=a,this.#i=l,this.#v=p,this.#h=c,this.#n=f,this.#d=u,this.#s=d,this.#r=g,this.#w=w,this.#u=m,this.#o=y;let b=ne(t);this.#e=this.#e&gt|b|Be,b!==L&&b!==U&&b!==tt&&(this.#e|=bt)}#L=[];#F=!1;#H(t){this.#F=!1;let e=this.#L.slice();this.#L.length=0,e.forEach(i=>i(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let i=this.children();if(this.calledReaddir()){let r=i.slice(0,i.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#L.push(t),this.#F)return;this.#F=!0;let s=this.fullpath();this.#t.readdir(s,{withFileTypes:!0},(r,n)=>{if(r)this.#z(r.code),i.provisional=0;else{for(let o of n)this.#_(o,i);this.#N(i)}this.#H(i.slice(0,i.provisional))})}#V;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#V)await this.#V;else{let i=()=>{};this.#V=new Promise(s=>i=s);try{for(let s of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#_(s,t);this.#N(t)}catch(s){this.#z(s.code),t.provisional=0}this.#V=void 0,i()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let i of this.#t.readdirSync(e,{withFileTypes:!0}))this.#_(i,t);this.#N(t)}catch(i){this.#z(i.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ie)return!1;let t=M&this.#e;return t===L||t===U||t===tt}shouldWalk(t,e){return(this.#e&U)===U&&!(this.#e&Ie)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#O)return this.#O;if(!((Lt|Dt|B)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#O=this.resolve(t)}catch{this.#W()}}realpathSync(){if(this.#O)return this.#O;if(!((Lt|Dt|B)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#O=this.resolve(t)}catch{this.#W()}}[xi](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),i=[],s=this;for(;s&&s.parent;)e.add(s),s.#x=i.join(this.sep),s.#C=i.join("/"),s=s.parent,i.push("..");for(s=t;s&&s.parent&&!e.has(s);)s.#x=void 0,s.#C=void 0,s=s.parent}},Ei=class Ai extends j{sep="\\";splitSep=Er;constructor(e,i=L,s,r,n,o,h){super(e,i,s,r,n,o,h)}newChild(e,i=L,s={}){return new Ai(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(e){return he.parse(e).root}getRoot(e){if(e=xr(e.toUpperCase()),e===this.root.name)return this.root;for(let[i,s]of Object.entries(this.roots))if(this.sameRoot(e,i))return this.roots[e]=s;return this.roots[e]=new pe(e,this).root}sameRoot(e,i=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(mi,"$1\\"),e===i}},ki=class Ci extends j{splitSep="/";sep="/";constructor(e,i=L,s,r,n,o,h){super(e,i,s,r,n,o,h)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,i=L,s={}){return new Ci(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Oi=class{root;rootPath;roots;cwd;#t;#i;#n;nocase;#r;constructor(t=process.cwd(),e,i,{nocase:s,childrenCacheSize:r=16*1024,fs:n=yt}={}){this.#r=gi(n),(t instanceof URL||t.startsWith("file://"))&&(t=Qs(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new He,this.#i=new He,this.#n=new kr(r);let h=o.substring(this.rootPath.length).split(i);if(h.length===1&&!h[0]&&h.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let a=this.root,l=h.length-1,p=e.sep,c=this.rootPath,f=!1;for(let u of h){let d=l--;a=a.child(u,{relative:new Array(d).fill("..").join(p),relativePosix:new Array(d).fill("..").join("/"),fullpath:c+=(f?"":p)+u}),f=!0}this.cwd=a}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let n=t[r];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let i=this.#t.get(e);if(i!==void 0)return i;let s=this.cwd.resolve(e).fullpath();return this.#t.set(e,s),s}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let n=t[r];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let i=this.#i.get(e);if(i!==void 0)return i;let s=this.cwd.resolve(e).fullpathPosix();return this.#i.set(e,s),s}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t,t=this.cwd);let{withFileTypes:i}=e;if(t.canReaddir()){let s=await t.readdir();return i?s:s.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t,t=this.cwd);let{withFileTypes:i=!0}=e;return t.canReaddir()?i?t.readdirSync():t.readdirSync().map(s=>s.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t.withFileTypes,t=this.cwd);let i=await t.readlink();return e?i:i?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t.withFileTypes,t=this.cwd);let i=t.readlinkSync();return e?i:i?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t.withFileTypes,t=this.cwd);let i=await t.realpath();return e?i:i?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t.withFileTypes,t=this.cwd);let i=t.realpathSync();return e?i:i?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,o=[];(!r||r(t))&&o.push(i?t:t.fullpath());let h=new Set,a=(p,c)=>{h.add(p),p.readdirCB((f,u)=>{if(f)return c(f);let d=u.length;if(!d)return c();let g=()=>{--d===0&&c()};for(let w of u)(!r||r(w))&&o.push(i?w:w.fullpath()),s&&w.isSymbolicLink()?w.realpath().then(m=>m?.isUnknown()?m.lstat():m).then(m=>m?.shouldWalk(h,n)?a(m,g):g()):w.shouldWalk(h,n)?a(w,g):g()},!0)},l=t;return new Promise((p,c)=>{a(l,f=>{if(f)return c(f);p(o)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,o=[];(!r||r(t))&&o.push(i?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let p of l){(!r||r(p))&&o.push(i?p:p.fullpath());let c=p;if(p.isSymbolicLink()){if(!(s&&(c=p.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(h,n)&&h.add(c)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e;(!r||r(t))&&(yield i?t:t.fullpath());let o=new Set([t]);for(let h of o){let a=h.readdirSync();for(let l of a){(!r||r(l))&&(yield i?l:l.fullpath());let p=l;if(l.isSymbolicLink()){if(!(s&&(p=l.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(o,n)&&o.add(p)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,o=new zt({objectMode:!0});(!r||r(t))&&o.write(i?t:t.fullpath());let h=new Set,a=[t],l=0,p=()=>{let c=!1;for(;!c;){let f=a.shift();if(!f){l===0&&o.end();return}l++,h.add(f);let u=(g,w,m=!1)=>{if(g)return o.emit("error",g);if(s&&!m){let y=[];for(let b of w)b.isSymbolicLink()&&y.push(b.realpath().then(v=>v?.isUnknown()?v.lstat():v));if(y.length){Promise.all(y).then(()=>u(null,w,!0));return}}for(let y of w)y&&(!r||r(y))&&(o.write(i?y:y.fullpath())||(c=!0));l--;for(let y of w){let b=y.realpathCached()||y;b.shouldWalk(h,n)&&a.push(b)}c&&!o.flowing?o.once("drain",p):d||p()},d=!0;f.readdirCB(u,!0),d=!1}};return p(),o}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof j||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,o=new zt({objectMode:!0}),h=new Set;(!r||r(t))&&o.write(i?t:t.fullpath());let a=[t],l=0,p=()=>{let c=!1;for(;!c;){let f=a.shift();if(!f){l===0&&o.end();return}l++,h.add(f);let u=f.readdirSync();for(let d of u)(!r||r(d))&&(o.write(i?d:d.fullpath())||(c=!0));l--;for(let d of u){let g=d;if(d.isSymbolicLink()){if(!(s&&(g=d.realpathSync())))continue;g.isUnknown()&&g.lstatSync()}g.shouldWalk(h,n)&&a.push(g)}}c&&!o.flowing&&o.once("drain",p)};return p(),o}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[xi](e)}},pe=class extends Oi{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:i=!0}=e;super(t,he,"\\",{...e,nocase:i}),this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(t){return he.parse(t).root.toUpperCase()}newRoot(t){return new Ei(this.rootPath,U,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},ue=class extends Oi{sep="/";constructor(t=process.cwd(),e={}){let{nocase:i=!1}=e;super(t,Xs,"/",{...e,nocase:i}),this.nocase=i}parseRootPath(t){return"/"}newRoot(t){return new ki(this.rootPath,U,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},Ti=class extends ue{constructor(t=process.cwd(),e={}){let{nocase:i=!0}=e;super(t,{...e,nocase:i})}},pn=process.platform==="win32"?Ei:ki,Cr=process.platform==="win32"?pe:process.platform==="darwin"?Ti:ue,Or=t=>t.length>=1,Tr=t=>t.length>=1,Fr=Symbol.for("nodejs.util.inspect.custom"),Fi=class Ri{#t;#i;#n;length;#r;#o;#v;#w;#c;#h;#u=!0;constructor(e,i,s,r){if(!Or(e))throw new TypeError("empty pattern list");if(!Tr(i))throw new TypeError("empty glob list");if(i.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=e,this.#i=i,this.#n=s,this.#r=r,this.#n===0){if(this.isUNC()){let[n,o,h,a,...l]=this.#t,[p,c,f,u,...d]=this.#i;l[0]===""&&(l.shift(),d.shift());let g=[n,o,h,a,""].join("/"),w=[p,c,f,u,""].join("/");this.#t=[g,...l],this.#i=[w,...d],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[n,...o]=this.#t,[h,...a]=this.#i;o[0]===""&&(o.shift(),a.shift());let l=n+"/",p=h+"/";this.#t=[l,...o],this.#i=[p,...a],this.length=this.#t.length}}}[Fr](){return"Pattern <"+this.#i.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===F}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#v=this.#v||(this.#n===0?this.isAbsolute()?this.#i[0]+this.#i.slice(1).join("/"):this.#i.join("/"):this.#i.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new Ri(this.#t,this.#i,this.#n+1,this.#r),this.#o.#h=this.#h,this.#o.#c=this.#c,this.#o.#w=this.#w,this.#o):this.#o=null}isUNC(){let e=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#t;return this.#h!==void 0?this.#h:this.#h=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#t[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}},Rr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ve=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:i,noext:s,noglobstar:r,platform:n=Rr}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=n,this.mmopts={dot:!0,nobrace:e,nocase:i,noext:s,noglobstar:r,optimizationLevel:2,platform:n,nocomment:!0,nonegate:!0};for(let o of t)this.add(o)}add(t){let e=new Z(t,this.mmopts);for(let i=0;i<e.set.length;i++){let s=e.set[i],r=e.globParts[i];if(!s||!r)throw new Error("invalid pattern object");for(;s[0]==="."&&r[0]===".";)s.shift(),r.shift();let n=new Fi(s,r,0,this.platform),o=new Z(n.globString(),this.mmopts),h=r[r.length-1]==="**",a=n.isAbsolute();a?this.absolute.push(o):this.relative.push(o),h&&(a?this.absoluteChildren.push(o):this.relativeChildren.push(o))}}ignored(t){let e=t.fullpath(),i=`${e}/`,s=t.relative()||".",r=`${s}/`;for(let n of this.relative)if(n.match(s)||n.match(r))return!0;for(let n of this.absolute)if(n.match(e)||n.match(i))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",i=(t.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(i))return!0;for(let s of this.absoluteChildren)if(s.match(e))return!0;return!1}},jr=class ji{store;constructor(e=new Map){this.store=e}copy(){return new ji(new Map(this.store))}hasWalked(e,i){return this.store.get(e.fullpath())?.has(i.globString())}storeWalked(e,i){let s=e.fullpath(),r=this.store.get(s);r?r.add(i.globString()):this.store.set(s,new Set([i.globString()]))}},Pr=class{store=new Map;add(t,e,i){let s=(e?2:0)|(i?1:0),r=this.store.get(t);this.store.set(t,r===void 0?s:s&r)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},Dr=class{store=new Map;add(t,e){if(!t.canReaddir())return;let i=this.store.get(t);i?i.find(s=>s.globString()===e.globString())||i.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Ye=class Pi{hasWalkedCache;matches=new Pr;subwalks=new Dr;patterns;follow;dot;opts;constructor(e,i){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=i?i.copy():new jr}processPatterns(e,i){this.patterns=i;let s=i.map(r=>[e,r]);for(let[r,n]of s){this.hasWalkedCache.storeWalked(r,n);let o=n.root(),h=n.isAbsolute()&&this.opts.absolute!==!1;if(o){r=r.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=n.rest();if(c)n=c;else{this.matches.add(r,!0,!1);continue}}if(r.isENOENT())continue;let a,l,p=!1;for(;typeof(a=n.pattern())=="string"&&(l=n.rest());)r=r.resolve(a),n=l,p=!0;if(a=n.pattern(),l=n.rest(),p){if(this.hasWalkedCache.hasWalked(r,n))continue;this.hasWalkedCache.storeWalked(r,n)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(r.resolve(a),h,c);continue}else if(a===F){(!r.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(r,n);let c=l?.pattern(),f=l?.rest();if(!l||(c===""||c===".")&&!f)this.matches.add(r,h,c===""||c===".");else if(c===".."){let u=r.parent||r;f?this.hasWalkedCache.hasWalked(u,f)||this.subwalks.add(u,f):this.matches.add(u,h,!0)}}else a instanceof RegExp&&this.subwalks.add(r,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Pi(this.opts,this.hasWalkedCache)}filterEntries(e,i){let s=this.subwalks.get(e),r=this.child();for(let n of i)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===F?r.testGlobstar(n,o,l,h):a instanceof RegExp?r.testRegExp(n,a,l,h):r.testString(n,a,l,h)}return r}testGlobstar(e,i,s,r){if((this.dot||!e.name.startsWith("."))&&(i.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,i):e.isSymbolicLink()&&(s&&i.checkFollowGlobstar()?this.subwalks.add(e,s):i.markFollowGlobstar()&&this.subwalks.add(e,i)))),s){let n=s.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,s.rest(),r);else if(n===".."){let o=e.parent||e;this.subwalks.add(o,s)}else n instanceof RegExp&&this.testRegExp(e,n,s.rest(),r)}}testRegExp(e,i,s,r){i.test(e.name)&&(s?this.subwalks.add(e,s):this.matches.add(e,r,!1))}testString(e,i,s,r){e.isNamed(i)&&(s?this.subwalks.add(e,s):this.matches.add(e,r,!1))}},$r=(t,e)=>typeof t=="string"?new Ve([t],e):Array.isArray(t)?new Ve(t,e):t,Di=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#i;#n;signal;maxDepth;includeChildMatches;constructor(t,e,i){if(this.patterns=t,this.path=e,this.opts=i,this.#n=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#i=$r(i.ignore??[],i),!this.includeChildMatches&&typeof this.#i.add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#r(t){return this.seen.has(t)||!!this.#i?.ignored?.(t)}#o(t){return!!this.#i?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=t.realpathCached()||await t.realpath(),!i)return;t=i}let s=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let r=await s.realpath();r&&(r.isUnknown()||this.opts.stat)&&await r.lstat()}return this.matchCheckTest(s,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=t.realpathCached()||t.realpathSync(),!i)return;t=i}let s=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let r=s.realpathSync();r&&(r?.isUnknown()||this.opts.stat)&&r.lstatSync()}return this.matchCheckTest(s,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#i?.add){let r=`${t.relativePosix()}/**`;this.#i.add(r)}let i=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let s=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(i){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+s)}else{let r=this.opts.posix?t.relativePosix():t.relative(),n=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?n+r+s:"."+s)}}async match(t,e,i){let s=await this.matchCheck(t,i);s&&this.matchFinish(s,e)}matchSync(t,e,i){let s=this.matchCheckSync(t,i);s&&this.matchFinish(s,e)}walkCB(t,e,i){this.signal?.aborted&&i(),this.walkCB2(t,e,new Ye(this.opts),i)}walkCB2(t,e,i,s){if(this.#o(t))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(t,e,i,s));return}i.processPatterns(t,e);let r=1,n=()=>{--r===0&&s()};for(let[o,h,a]of i.matches.entries())this.#r(o)||(r++,this.match(o,h,a).then(()=>n()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let h=o.readdirCached();o.calledReaddir()?this.walkCB3(o,h,i,n):o.readdirCB((a,l)=>this.walkCB3(o,l,i,n),!0)}n()}walkCB3(t,e,i,s){i=i.filterEntries(t,e);let r=1,n=()=>{--r===0&&s()};for(let[o,h,a]of i.matches.entries())this.#r(o)||(r++,this.match(o,h,a).then(()=>n()));for(let[o,h]of i.subwalks.entries())r++,this.walkCB2(o,h,i.child(),n);n()}walkCBSync(t,e,i){this.signal?.aborted&&i(),this.walkCB2Sync(t,e,new Ye(this.opts),i)}walkCB2Sync(t,e,i,s){if(this.#o(t))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,i,s));return}i.processPatterns(t,e);let r=1,n=()=>{--r===0&&s()};for(let[o,h,a]of i.matches.entries())this.#r(o)||this.matchSync(o,h,a);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let h=o.readdirSync();this.walkCB3Sync(o,h,i,n)}n()}walkCB3Sync(t,e,i,s){i=i.filterEntries(t,e);let r=1,n=()=>{--r===0&&s()};for(let[o,h,a]of i.matches.entries())this.#r(o)||this.matchSync(o,h,a);for(let[o,h]of i.subwalks.entries())r++,this.walkCB2Sync(o,h,i.child(),n);n()}},Je=class extends Di{matches=new Set;constructor(t,e,i){super(t,e,i)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},qe=class extends Di{results;constructor(t,e,i){super(t,e,i),this.results=new zt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},Mr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",et=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=Js(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(h=>h.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(h=>h.includes("/")?h:`./**/${h}`)}if(this.pattern=t,this.platform=e.platform||Mr,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let h=e.platform==="win32"?pe:e.platform==="darwin"?Ti:e.platform?ue:Cr;this.scurry=new h(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",s={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(h=>new Z(h,s)),[n,o]=r.reduce((h,a)=>(h[0].push(...a.set),h[1].push(...a.globParts),h),[[],[]]);this.patterns=n.map((h,a)=>{let l=o[a];if(!l)throw new Error("invalid pattern object");return new Fi(h,l,0,this.platform)})}async walk(){return[...await new Je(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Je(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new qe(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new qe(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}},fe=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let i of t)if(new Z(i,e).hasMagic())return!0;return!1};function It(t,e={}){return new et(t,e).streamSync()}function $i(t,e={}){return new et(t,e).stream()}function Mi(t,e={}){return new et(t,e).walkSync()}async function Ke(t,e={}){return new et(t,e).walk()}function Ut(t,e={}){return new et(t,e).iterateSync()}function Li(t,e={}){return new et(t,e).iterate()}var Lr=It,Wr=Object.assign($i,{sync:It}),Nr=Ut,zr=Object.assign(Li,{sync:Ut}),_r=Object.assign(Mi,{stream:It,iterate:Ut}),_t=Object.assign(Ke,{glob:Ke,globSync:Mi,sync:_r,globStream:$i,stream:Wr,globStreamSync:It,streamSync:Lr,globIterate:Li,iterate:zr,globIterateSync:Ut,iterateSync:Nr,Glob:et,hasMagic:fe,escape:ri,unescape:at});_t.glob=_t;import*as W from"node:fs";import{basename as Wi,dirname as xt,extname as St,join as Ni,resolve as lt,relative as Br}from"node:path";import*as V from"node:process";import{performance as Ir}from"perf_hooks";var Gt=["json","yaml","yml"];async function Bi(t,e){let s=!qt(t)&&we(e.resolvedConfig.apis)?Gr(e):await Hr(t,e),r=s.filter(({path:n})=>!Ur(n));if(qt(r)){for(let{path:n}of r)x.warn(`
10
10
  ${Et(n)} ${be(`does not exist or is invalid.