@compass-labs/api-sdk 2.2.108-rc.0 → 2.2.109

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.
Files changed (93) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/lib/config.js.map +1 -1
  4. package/dist/commonjs/models/components/creditswaprequest.d.ts +8 -3
  5. package/dist/commonjs/models/components/creditswaprequest.d.ts.map +1 -1
  6. package/dist/commonjs/models/components/creditswaprequest.js +2 -1
  7. package/dist/commonjs/models/components/creditswaprequest.js.map +1 -1
  8. package/dist/commonjs/models/components/creditswapresponse.d.ts +6 -6
  9. package/dist/commonjs/models/components/creditswapresponse.js +1 -1
  10. package/dist/commonjs/models/components/perpetualtradingopportunity.d.ts +4 -0
  11. package/dist/commonjs/models/components/perpetualtradingopportunity.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/perpetualtradingopportunity.js +2 -0
  13. package/dist/commonjs/models/components/perpetualtradingopportunity.js.map +1 -1
  14. package/dist/esm/lib/config.d.ts +2 -2
  15. package/dist/esm/lib/config.js +2 -2
  16. package/dist/esm/lib/config.js.map +1 -1
  17. package/dist/esm/models/components/creditswaprequest.d.ts +8 -3
  18. package/dist/esm/models/components/creditswaprequest.d.ts.map +1 -1
  19. package/dist/esm/models/components/creditswaprequest.js +2 -1
  20. package/dist/esm/models/components/creditswaprequest.js.map +1 -1
  21. package/dist/esm/models/components/creditswapresponse.d.ts +6 -6
  22. package/dist/esm/models/components/creditswapresponse.js +1 -1
  23. package/dist/esm/models/components/perpetualtradingopportunity.d.ts +4 -0
  24. package/dist/esm/models/components/perpetualtradingopportunity.d.ts.map +1 -1
  25. package/dist/esm/models/components/perpetualtradingopportunity.js +2 -0
  26. package/dist/esm/models/components/perpetualtradingopportunity.js.map +1 -1
  27. package/docs/models/components/creditswaprequest.md +12 -11
  28. package/docs/models/components/creditswaprequestpricing.md +1 -1
  29. package/docs/models/components/creditswapresponse.md +7 -7
  30. package/docs/models/components/creditswapresponseswapprovider.md +1 -1
  31. package/docs/models/components/perpetualtradingopportunity.md +14 -12
  32. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +2 -1
  33. package/examples/node_modules/tsx/dist/cjs/api/index.d.cts +3 -3
  34. package/examples/node_modules/tsx/dist/cjs/api/index.d.mts +3 -3
  35. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +2 -1
  36. package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -1
  37. package/examples/node_modules/tsx/dist/cli.mjs +28 -28
  38. package/examples/node_modules/tsx/dist/client-XItNFmsq.cjs +1 -0
  39. package/examples/node_modules/tsx/dist/esm/api/index.cjs +2 -1
  40. package/examples/node_modules/tsx/dist/esm/api/index.d.cts +5 -3
  41. package/examples/node_modules/tsx/dist/esm/api/index.d.mts +5 -3
  42. package/examples/node_modules/tsx/dist/esm/api/index.mjs +2 -1
  43. package/examples/node_modules/tsx/dist/esm/index.mjs +2 -1
  44. package/examples/node_modules/tsx/dist/index-Bqjv9TxC.mjs +1 -0
  45. package/examples/node_modules/tsx/dist/index-DE3OBZuV.mjs +14 -0
  46. package/examples/node_modules/tsx/dist/{lexer-DgIbo0BU.cjs → lexer-CGfpMDSb.cjs} +2 -2
  47. package/examples/node_modules/tsx/dist/{lexer-DQCqS3nf.mjs → lexer-CanA6ArK.mjs} +2 -2
  48. package/examples/node_modules/tsx/dist/loader.mjs +2 -1
  49. package/examples/node_modules/tsx/dist/package-Dj0mHsMt.mjs +1 -0
  50. package/examples/node_modules/tsx/dist/preflight.cjs +1 -1
  51. package/examples/node_modules/tsx/dist/register-B1c7OH6V.cjs +23 -0
  52. package/examples/node_modules/tsx/dist/register-nyXW-TH3.mjs +2 -0
  53. package/examples/node_modules/tsx/dist/repl.mjs +4 -3
  54. package/examples/node_modules/tsx/dist/require-CBjy4Foe.mjs +10 -0
  55. package/examples/node_modules/tsx/dist/require-CVaYn9z3.cjs +1 -0
  56. package/examples/node_modules/tsx/dist/temporary-directory-Du7LpLp9.mjs +1 -0
  57. package/examples/node_modules/tsx/package.json +4 -1
  58. package/examples/package-lock.json +3 -3
  59. package/openapi_prepped_for_speakeasy.json +17 -5
  60. package/package.json +1 -1
  61. package/src/lib/config.ts +2 -2
  62. package/src/models/components/creditswaprequest.ts +9 -3
  63. package/src/models/components/creditswapresponse.ts +6 -6
  64. package/src/models/components/perpetualtradingopportunity.ts +6 -0
  65. package/examples/node_modules/tsx/dist/cjs/index.mjs +0 -1
  66. package/examples/node_modules/tsx/dist/cli.cjs +0 -54
  67. package/examples/node_modules/tsx/dist/client-D3mGB526.cjs +0 -1
  68. package/examples/node_modules/tsx/dist/client-D_mPDF5S.mjs +0 -1
  69. package/examples/node_modules/tsx/dist/esm/index.cjs +0 -1
  70. package/examples/node_modules/tsx/dist/get-pipe-path-D4YM6rQt.cjs +0 -1
  71. package/examples/node_modules/tsx/dist/get-pipe-path-_tAJyU_v.mjs +0 -1
  72. package/examples/node_modules/tsx/dist/index-BWFBUo6r.cjs +0 -1
  73. package/examples/node_modules/tsx/dist/index-D1vYaNWZ.cjs +0 -14
  74. package/examples/node_modules/tsx/dist/index-DCefr8NP.mjs +0 -14
  75. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +0 -1
  76. package/examples/node_modules/tsx/dist/loader.cjs +0 -1
  77. package/examples/node_modules/tsx/dist/node-features-CEjg7cMX.cjs +0 -1
  78. package/examples/node_modules/tsx/dist/node-features-JeyyvQz6.mjs +0 -1
  79. package/examples/node_modules/tsx/dist/package-B1lIY_Tn.cjs +0 -1
  80. package/examples/node_modules/tsx/dist/package-BL7Whz21.mjs +0 -1
  81. package/examples/node_modules/tsx/dist/patch-repl.mjs +0 -1
  82. package/examples/node_modules/tsx/dist/preflight.mjs +0 -1
  83. package/examples/node_modules/tsx/dist/register-DHgpdRjs.mjs +0 -10
  84. package/examples/node_modules/tsx/dist/register-DjPW2kSr.cjs +0 -2
  85. package/examples/node_modules/tsx/dist/register-OY9cqBEN.cjs +0 -10
  86. package/examples/node_modules/tsx/dist/register-SoqaU4rg.mjs +0 -2
  87. package/examples/node_modules/tsx/dist/repl.cjs +0 -3
  88. package/examples/node_modules/tsx/dist/require-Blr_8TcJ.cjs +0 -1
  89. package/examples/node_modules/tsx/dist/require-Cuv-0BLU.mjs +0 -1
  90. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
  91. package/examples/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +0 -1
  92. package/examples/node_modules/tsx/dist/temporary-directory-BDDVQOvU.mjs +0 -1
  93. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.108-rc.0",
3
+ "version": "2.2.109",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
package/src/lib/config.ts CHANGED
@@ -62,7 +62,7 @@ export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
64
  sdkVersion: "2.0.0",
65
- genVersion: "2.937.18",
65
+ genVersion: "2.938.0",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 2.0.0 2.937.18 0.0.1 @compass-labs/api-sdk",
67
+ "speakeasy-sdk/typescript 2.0.0 2.938.0 0.0.1 @compass-labs/api-sdk",
68
68
  } as const;
@@ -33,7 +33,7 @@ export const CreditSwapRequestChain = {
33
33
  export type CreditSwapRequestChain = ClosedEnum<typeof CreditSwapRequestChain>;
34
34
 
35
35
  /**
36
- * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
36
+ * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing — previews included: a preview the firm provider's live price levels cannot price returns the same typed error rather than market numbers. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
37
37
  */
38
38
  export const CreditSwapRequestPricing = {
39
39
  Auto: "auto",
@@ -41,7 +41,7 @@ export const CreditSwapRequestPricing = {
41
41
  Market: "market",
42
42
  } as const;
43
43
  /**
44
- * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
44
+ * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing — previews included: a preview the firm provider's live price levels cannot price returns the same typed error rather than market numbers. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
45
45
  */
46
46
  export type CreditSwapRequestPricing = ClosedEnum<
47
47
  typeof CreditSwapRequestPricing
@@ -88,7 +88,11 @@ export type CreditSwapRequest = {
88
88
  */
89
89
  gasSponsorship?: boolean | undefined;
90
90
  /**
91
- * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
91
+ * If true, build a display ESTIMATE: no firm RFQ quote is ever requested (quote_expires_at stays null). NOTE that this guarantees only that no firm quote was spent — it does not guarantee an absent payload: under 'auto' when the firm provider does not cover or cannot currently price the pair, and always under pricing=market, the call falls through to the aggregator and returns a signable market build (an unsigned transaction, or EIP-712 typed data when gas_sponsorship=true), without requiring the account to hold token_in yet. How the estimate is priced follows `pricing`: on a firm-covered pair whose size the firm provider's live price levels can serve, 'auto' and 'firm' price it from those levels (indicative, transaction stays null — re-call with preview=false for the signable build); otherwise it comes from the market build above (pricing='firm' instead refuses with a typed error). Set it on every call made while a user is exploring parameters, and leave it false only for the build they actually intend to sign — firm quotes are single-use maker commitments, and requesting them for displays that are never executed degrades the pricing this API is offered.
92
+ */
93
+ preview?: boolean | undefined;
94
+ /**
95
+ * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing — previews included: a preview the firm provider's live price levels cannot price returns the same typed error rather than market numbers. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
92
96
  */
93
97
  pricing?: CreditSwapRequestPricing | undefined;
94
98
  };
@@ -149,6 +153,7 @@ export type CreditSwapRequest$Outbound = {
149
153
  owner: string;
150
154
  chain: string;
151
155
  gas_sponsorship?: boolean | undefined;
156
+ preview?: boolean | undefined;
152
157
  pricing?: string | undefined;
153
158
  };
154
159
 
@@ -166,6 +171,7 @@ export const CreditSwapRequest$outboundSchema: z.ZodType<
166
171
  owner: z.string(),
167
172
  chain: CreditSwapRequestChain$outboundSchema,
168
173
  gasSponsorship: z.boolean().optional(),
174
+ preview: z.boolean().optional(),
169
175
  pricing: CreditSwapRequestPricing$outboundSchema.optional(),
170
176
  }).transform((v) => {
171
177
  return remap$(v, {
@@ -18,14 +18,14 @@ import {
18
18
  } from "./unsignedtransaction.js";
19
19
 
20
20
  /**
21
- * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
21
+ * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. On preview=true responses 'firm' means the estimate is INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quote at signing time. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
22
22
  */
23
23
  export const CreditSwapResponseSwapProvider = {
24
24
  Market: "market",
25
25
  Firm: "firm",
26
26
  } as const;
27
27
  /**
28
- * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
28
+ * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. On preview=true responses 'firm' means the estimate is INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quote at signing time. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
29
29
  */
30
30
  export type CreditSwapResponseSwapProvider = ClosedEnum<
31
31
  typeof CreditSwapResponseSwapProvider
@@ -39,7 +39,7 @@ export type CreditSwapResponseSwapProvider = ClosedEnum<
39
39
  */
40
40
  export type CreditSwapResponse = {
41
41
  /**
42
- * Unsigned transaction for direct execution. Present when gas_sponsorship=false.
42
+ * Unsigned transaction for direct execution. Present when gas_sponsorship=false — except firm-priced previews (preview=true responses reporting swap_provider='firm'), which carry the estimate only: the firm quote is fetched at execution time, so there is no payload to sign yet. A preview whose response reports swap_provider='market' does carry this signable payload.
43
43
  */
44
44
  transaction?: UnsignedTransaction | null | undefined;
45
45
  /**
@@ -47,15 +47,15 @@ export type CreditSwapResponse = {
47
47
  */
48
48
  eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
49
49
  /**
50
- * Estimated amount of output token received from the swap. Exact on firm builds (a firm quote fills at this amount or reverts). On market builds it is a quote-time estimate, and `slippage` sets how far below it the transaction's enforced minimum output sits.
50
+ * Estimated amount of output token received from the swap. Exact on executable firm builds (a firm quote fills at this amount or reverts). On market builds it is a quote-time estimate, and `slippage` sets how far below it the transaction's enforced minimum output sits. On preview=true responses reporting 'firm' it is INDICATIVE — computed from the firm provider's live price levels without spending a quote.
51
51
  */
52
52
  estimatedAmountOut: string;
53
53
  /**
54
- * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
54
+ * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. On preview=true responses 'firm' means the estimate is INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quote at signing time. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
55
55
  */
56
56
  swapProvider?: CreditSwapResponseSwapProvider | undefined;
57
57
  /**
58
- * Deadline of the firm swap quote. Sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Null on market builds.
58
+ * Deadline of the firm swap quote. Sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Null on market builds and on every preview (a preview never holds a firm quote).
59
59
  */
60
60
  quoteExpiresAt?: Date | null | undefined;
61
61
  };
@@ -32,6 +32,10 @@ export type PerpetualTradingOpportunity = {
32
32
  * Oracle reference price
33
33
  */
34
34
  oraclePrice: string;
35
+ /**
36
+ * Price 24 hours ago, for computing 24h price change (0 for newly listed markets)
37
+ */
38
+ prevDayPrice: string;
35
39
  /**
36
40
  * Open interest in USD
37
41
  */
@@ -65,6 +69,7 @@ export const PerpetualTradingOpportunity$inboundSchema: z.ZodType<
65
69
  category: z.string(),
66
70
  mark_price: z.string(),
67
71
  oracle_price: z.string(),
72
+ prev_day_price: z.string(),
68
73
  open_interest: z.string(),
69
74
  volume_24h: z.string(),
70
75
  funding_rate: z.string(),
@@ -75,6 +80,7 @@ export const PerpetualTradingOpportunity$inboundSchema: z.ZodType<
75
80
  "asset_id": "assetId",
76
81
  "mark_price": "markPrice",
77
82
  "oracle_price": "oraclePrice",
83
+ "prev_day_price": "prevDayPrice",
78
84
  "open_interest": "openInterest",
79
85
  "volume_24h": "volume24h",
80
86
  "funding_rate": "fundingRate",
@@ -1 +0,0 @@
1
- import{r}from"../register-DHgpdRjs.mjs";import"../get-pipe-path-_tAJyU_v.mjs";import"module";import"node:path";import"../temporary-directory-BDDVQOvU.mjs";import"node:os";import"node:module";import"node:url";import"node:fs";import"fs";import"os";import"path";import"../index-DCefr8NP.mjs";import"esbuild";import"node:crypto";import"../node-features-JeyyvQz6.mjs";import"../client-D_mPDF5S.mjs";import"node:net";import"node:util";import"../index-gbaejti9.mjs";r();
@@ -1,54 +0,0 @@
1
- "use strict";var Tn=Object.create;var ht=Object.defineProperty;var xn=Object.getOwnPropertyDescriptor;var On=Object.getOwnPropertyNames;var Nn=Object.getPrototypeOf,Pn=Object.prototype.hasOwnProperty;var a=(t,e)=>ht(t,"name",{value:e,configurable:!0});var Hn=(t,e,u,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of On(e))!Pn.call(t,n)&&n!==u&&ht(t,n,{get:()=>e[n],enumerable:!(r=xn(e,n))||r.enumerable});return t};var Ln=(t,e,u)=>(u=t!=null?Tn(Nn(t)):{},Hn(e||!t||!t.__esModule?ht(u,"default",{value:t,enumerable:!0}):u,t));var dt=require("node:os"),In=require("tty"),kn=require("./package-B1lIY_Tn.cjs"),he=require("./get-pipe-path-D4YM6rQt.cjs"),Ru=require("node:url"),Mn=require("child_process"),q=require("path"),De=require("fs"),ke=require("./node-features-CEjg7cMX.cjs"),Me=require("node:path"),We=require("node:fs"),Wn=require("events"),_e=require("util"),Gn=require("stream"),bu=require("os"),ne=require("./index-BWFBUo6r.cjs"),jn=require("node:net"),Un=require("./temporary-directory-B83uKxJF.cjs");require("module");const Kn="known-flag",Vn="unknown-flag",zn="argument",{stringify:Ae}=JSON,Yn=/\B([A-Z])/g,qn=a(t=>t.replace(Yn,"-$1").toLowerCase(),"v$1"),{hasOwnProperty:Xn}=Object.prototype,ye=a((t,e)=>Xn.call(t,e),"w$2"),Qn=a(t=>Array.isArray(t),"L$2"),vu=a(t=>typeof t=="function"?[t,!1]:Qn(t)?[t[0],!0]:vu(t.type),"b$2"),Zn=a((t,e)=>t===Boolean?e!=="false":e,"d$2"),Jn=a((t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),"m$1"),es=/[\s.:=]/,ts=a(t=>{const e=`Flag name ${Ae(t)}`;if(t.length===0)throw new Error(`${e} cannot be empty`);if(t.length===1)throw new Error(`${e} must be longer than a character`);const u=t.match(es);if(u)throw new Error(`${e} cannot contain ${Ae(u?.[0])}`)},"B"),us=a(t=>{const e={},u=a((r,n)=>{if(ye(e,r))throw new Error(`Duplicate flags named ${Ae(r)}`);e[r]=n},"r");for(const r in t){if(!ye(t,r))continue;ts(r);const n=t[r],s=[[],...vu(n),n];u(r,s);const i=qn(r);if(r!==i&&u(i,s),"alias"in n&&typeof n.alias=="string"){const{alias:o}=n,D=`Flag alias ${Ae(o)} for flag ${Ae(r)}`;if(o.length===0)throw new Error(`${D} cannot be empty`);if(o.length>1)throw new Error(`${D} must be a single character`);u(o,s)}}return e},"K$1"),rs=a((t,e)=>{const u={};for(const r in t){if(!ye(t,r))continue;const[n,,s,i]=e[r];if(n.length===0&&"default"in i){let{default:o}=i;typeof o=="function"&&(o=o()),u[r]=o}else u[r]=s?n:n.pop()}return u},"_$2"),Ge="--",ns=/[.:=]/,ss=/^-{1,2}\w/,is=a(t=>{if(!ss.test(t))return;const e=!t.startsWith(Ge);let u=t.slice(e?1:2),r;const n=u.match(ns);if(n){const{index:s}=n;r=u.slice(s+1),u=u.slice(0,s)}return[u,r,e]},"N"),os=a((t,{onFlag:e,onArgument:u})=>{let r;const n=a((s,i)=>{if(typeof r!="function")return!0;r(s,i),r=void 0},"o");for(let s=0;s<t.length;s+=1){const i=t[s];if(i===Ge){n();const D=t.slice(s+1);u?.(D,[s],!0);break}const o=is(i);if(o){if(n(),!e)continue;const[D,l,f]=o;if(f)for(let h=0;h<D.length;h+=1){n();const c=h===D.length-1;r=e(D[h],c?l:void 0,[s,h+1,c])}else r=e(D,l,[s])}else n(i,[s])&&u?.([i],[s])}n()},"$$1"),Ds=a((t,e)=>{for(const[u,r,n]of e.reverse()){if(r){const s=t[u];let i=s.slice(0,r);if(n||(i+=s.slice(r+1)),i!=="-"){t[u]=i;continue}}t.splice(u,1)}},"E"),Su=a((t,e=process.argv.slice(2),{ignore:u}={})=>{const r=[],n=us(t),s={},i=[];return i[Ge]=[],os(e,{onFlag(o,D,l){const f=ye(n,o);if(!u?.(f?Kn:Vn,o,D)){if(f){const[h,c]=n[o],C=Zn(c,D),F=a((m,R)=>{r.push(l),R&&r.push(R),h.push(Jn(c,m||""))},"p");return C===void 0?F:F(C)}ye(s,o)||(s[o]=[]),s[o].push(D===void 0?!0:D),r.push(l)}},onArgument(o,D,l){u?.(zn,e[D[0]])||(i.push(...o),l?(i[Ge]=o,e.splice(D[0])):r.push(D))}}),Ds(e,r),{flags:rs(t,n),unknownFlags:s,_:i}},"U$2");var as=Object.create,je=Object.defineProperty,ls=Object.defineProperties,cs=Object.getOwnPropertyDescriptor,fs=Object.getOwnPropertyDescriptors,hs=Object.getOwnPropertyNames,Bu=Object.getOwnPropertySymbols,ds=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty,Es=Object.prototype.propertyIsEnumerable,Tu=a((t,e,u)=>e in t?je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,"W$1"),Ue=a((t,e)=>{for(var u in e||(e={}))$u.call(e,u)&&Tu(t,u,e[u]);if(Bu)for(var u of Bu(e))Es.call(e,u)&&Tu(t,u,e[u]);return t},"p"),Et=a((t,e)=>ls(t,fs(e)),"c"),ps=a(t=>je(t,"__esModule",{value:!0}),"nD"),Cs=a((t,e)=>()=>(t&&(e=t(t=0)),e),"rD"),Fs=a((t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),"iD"),gs=a((t,e,u,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of hs(e))!$u.call(t,n)&&n!=="default"&&je(t,n,{get:a(()=>e[n],"get"),enumerable:!(r=cs(e,n))||r.enumerable});return t},"oD"),ms=a((t,e)=>gs(ps(je(t!=null?as(ds(t)):{},"default",{value:t,enumerable:!0})),t),"BD"),V=Cs(()=>{}),_s=Fs((t,e)=>{V(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});V(),V(),V();var As=a(t=>{var e,u,r;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(n)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:n}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(r=t.stdoutColumns)!=null?r:n}},"v");V(),V(),V(),V(),V();function ys({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}a(ys,"w$1");function xu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(ys(),"")}a(xu,"d$1"),V();function ws(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}a(ws,"y$1");var Rs=ms(_s());function ae(t){if(typeof t!="string"||t.length===0||(t=xu(t),t.length===0))return 0;t=t.replace((0,Rs.default)()," ");let e=0;for(let u=0;u<t.length;u++){let r=t.codePointAt(u);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&u++,e+=ws(r)?2:1)}return e}a(ae,"g");var Ou=a(t=>Math.max(...t.split(`
2
- `).map(ae)),"b$1"),bs=a(t=>{let e=[];for(let u of t){let{length:r}=u,n=r-e.length;for(let s=0;s<n;s+=1)e.push(0);for(let s=0;s<r;s+=1){let i=Ou(u[s]);i>e[s]&&(e[s]=i)}}return e},"k$1");V();var Nu=/^\d+%$/,Pu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},vs=a((t,e)=>{var u;let r=[];for(let n=0;n<t.length;n+=1){let s=(u=e[n])!=null?u:"auto";if(typeof s=="number"||s==="auto"||s==="content-width"||typeof s=="string"&&Nu.test(s)){r.push(Et(Ue({},Pu),{width:s,contentWidth:t[n]}));continue}if(s&&typeof s=="object"){let i=Et(Ue(Ue({},Pu),s),{contentWidth:t[n]});i.horizontalPadding=i.paddingLeft+i.paddingRight,r.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(s)}`)}return r},"sD");function Ss(t,e){for(let u of t){let{width:r}=u;if(r==="content-width"&&(u.width=u.contentWidth),r==="auto"){let D=Math.min(20,u.contentWidth);u.width=D,u.autoOverflow=u.contentWidth-D}if(typeof r=="string"&&Nu.test(r)){let D=Number.parseFloat(r.slice(0,-1))/100;u.width=Math.floor(e*D)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:n}=u,s=1,i=s+n;if(i>=e){let D=i-e,l=Math.ceil(u.paddingLeft/n*D),f=D-l;u.paddingLeft-=l,u.paddingRight-=f,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let o=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,o),s)}}a(Ss,"aD");var Hu=a(()=>Object.assign([],{columns:0}),"G$1");function Bs(t,e){let u=[Hu()],[r]=u;for(let n of t){let s=n.width+n.horizontalPadding;r.columns+s>e&&(r=Hu(),u.push(r)),r.push(n),r.columns+=s}for(let n of u){let s=n.reduce((c,C)=>c+C.width+C.horizontalPadding,0),i=e-s;if(i===0)continue;let o=n.filter(c=>"autoOverflow"in c),D=o.filter(c=>c.autoOverflow>0),l=D.reduce((c,C)=>c+C.autoOverflow,0),f=Math.min(l,i);for(let c of D){let C=Math.floor(c.autoOverflow/l*f);c.width+=C,i-=C}let h=Math.floor(i/o.length);for(let c=0;c<o.length;c+=1){let C=o[c];c===o.length-1?C.width+=i:C.width+=h,i-=h}}return u}a(Bs,"lD");function $s(t,e,u){let r=vs(u,e);return Ss(r,t),Bs(r,t)}a($s,"Z$1"),V(),V(),V();var pt=10,Lu=a((t=0)=>e=>`\x1B[${e+t}m`,"U$1"),Iu=a((t=0)=>e=>`\x1B[${38+t};5;${e}m`,"V$1"),ku=a((t=0)=>(e,u,r)=>`\x1B[${38+t};2;${e};${u};${r}m`,"Y");function Ts(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[u,r]of Object.entries(e)){for(let[n,s]of Object.entries(r))e[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=e[n],t.set(s[0],s[1]);Object.defineProperty(e,u,{value:r,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Lu(),e.color.ansi256=Iu(),e.color.ansi16m=ku(),e.bgColor.ansi=Lu(pt),e.bgColor.ansi256=Iu(pt),e.bgColor.ansi16m=ku(pt),Object.defineProperties(e,{rgbToAnsi256:{value:a((u,r,n)=>u===r&&r===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),"value"),enumerable:!1},hexToRgb:{value:a(u=>{let r=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!r)return[0,0,0];let{colorString:n}=r.groups;n.length===3&&(n=n.split("").map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},"value"),enumerable:!1},hexToAnsi256:{value:a(u=>e.rgbToAnsi256(...e.hexToRgb(u)),"value"),enumerable:!1},ansi256ToAnsi:{value:a(u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let r,n,s;if(u>=232)r=((u-232)*10+8)/255,n=r,s=r;else{u-=16;let D=u%36;r=Math.floor(u/36)/5,n=Math.floor(D/6)/5,s=D%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(o+=60),o},"value"),enumerable:!1},rgbToAnsi:{value:a((u,r,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,r,n)),"value"),enumerable:!1},hexToAnsi:{value:a(u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),"value"),enumerable:!1}}),e}a(Ts,"AD");var xs=Ts(),Os=xs,Ke=new Set(["\x1B","\x9B"]),Ns=39,Ct="\x07",Mu="[",Ps="]",Wu="m",Ft=`${Ps}8;;`,Gu=a(t=>`${Ke.values().next().value}${Mu}${t}${Wu}`,"J$1"),ju=a(t=>`${Ke.values().next().value}${Ft}${t}${Ct}`,"Q"),Hs=a(t=>t.split(" ").map(e=>ae(e)),"hD"),gt=a((t,e,u)=>{let r=[...e],n=!1,s=!1,i=ae(xu(t[t.length-1]));for(let[o,D]of r.entries()){let l=ae(D);if(i+l<=u?t[t.length-1]+=D:(t.push(D),i=0),Ke.has(D)&&(n=!0,s=r.slice(o+1).join("").startsWith(Ft)),n){s?D===Ct&&(n=!1,s=!1):D===Wu&&(n=!1);continue}i+=l,i===u&&o<r.length-1&&(t.push(""),i=0)}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},"S$1"),Ls=a(t=>{let e=t.split(" "),u=e.length;for(;u>0&&!(ae(e[u-1])>0);)u--;return u===e.length?t:e.slice(0,u).join(" ")+e.slice(u).join("")},"cD"),Is=a((t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let r="",n,s,i=Hs(t),o=[""];for(let[l,f]of t.split(" ").entries()){u.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let h=ae(o[o.length-1]);if(l!==0&&(h>=e&&(u.wordWrap===!1||u.trim===!1)&&(o.push(""),h=0),(h>0||u.trim===!1)&&(o[o.length-1]+=" ",h++)),u.hard&&i[l]>e){let c=e-h,C=1+Math.floor((i[l]-c-1)/e);Math.floor((i[l]-1)/e)<C&&o.push(""),gt(o,f,e);continue}if(h+i[l]>e&&h>0&&i[l]>0){if(u.wordWrap===!1&&h<e){gt(o,f,e);continue}o.push("")}if(h+i[l]>e&&u.wordWrap===!1){gt(o,f,e);continue}o[o.length-1]+=f}u.trim!==!1&&(o=o.map(l=>Ls(l)));let D=[...o.join(`
3
- `)];for(let[l,f]of D.entries()){if(r+=f,Ke.has(f)){let{groups:c}=new RegExp(`(?:\\${Mu}(?<code>\\d+)m|\\${Ft}(?<uri>.*)${Ct})`).exec(D.slice(l).join(""))||{groups:{}};if(c.code!==void 0){let C=Number.parseFloat(c.code);n=C===Ns?void 0:C}else c.uri!==void 0&&(s=c.uri.length===0?void 0:c.uri)}let h=Os.codes.get(Number(n));D[l+1]===`
4
- `?(s&&(r+=ju("")),n&&h&&(r+=Gu(h))):f===`
5
- `&&(n&&h&&(r+=Gu(n)),s&&(r+=ju(s)))}return r},"dD");function ks(t,e,u){return String(t).normalize().replace(/\r\n/g,`
6
- `).split(`
7
- `).map(r=>Is(r,e,u)).join(`
8
- `)}a(ks,"T$1");var Uu=a(t=>Array.from({length:t}).fill(""),"X");function Ms(t,e){let u=[],r=0;for(let n of t){let s=0,i=n.map(D=>{var l;let f=(l=e[r])!=null?l:"";r+=1,D.preprocess&&(f=D.preprocess(f)),Ou(f)>D.width&&(f=ks(f,D.width,{hard:!0}));let h=f.split(`
9
- `);if(D.postprocess){let{postprocess:c}=D;h=h.map((C,F)=>c.call(D,C,F))}return D.paddingTop&&h.unshift(...Uu(D.paddingTop)),D.paddingBottom&&h.push(...Uu(D.paddingBottom)),h.length>s&&(s=h.length),Et(Ue({},D),{lines:h})}),o=[];for(let D=0;D<s;D+=1){let l=i.map(f=>{var h;let c=(h=f.lines[D])!=null?h:"",C=Number.isFinite(f.width)?" ".repeat(f.width-ae(c)):"",F=f.paddingLeftString;return f.align==="right"&&(F+=C),F+=c,f.align==="left"&&(F+=C),F+f.paddingRightString}).join("");o.push(l)}u.push(o.join(`
10
- `))}return u.join(`
11
- `)}a(Ms,"P");function Ws(t,e){if(!t||t.length===0)return"";let u=bs(t),r=u.length;if(r===0)return"";let{stdoutColumns:n,columns:s}=As(e);if(s.length>r)throw new Error(`${s.length} columns defined, but only ${r} columns found`);let i=$s(n,s,u);return t.map(o=>Ms(i,o)).join(`
12
- `)}a(Ws,"mD"),V();var Gs=["<",">","=",">=","<="];function js(t){if(!Gs.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}a(js,"xD");function Us(t){let e=Object.keys(t).map(u=>{let[r,n]=u.split(" ");js(r);let s=Number.parseInt(n,10);if(Number.isNaN(s))throw new TypeError(`Invalid breakpoint value: ${n}`);let i=t[u];return{operator:r,breakpoint:s,value:i}}).sort((u,r)=>r.breakpoint-u.breakpoint);return u=>{var r;return(r=e.find(({operator:n,breakpoint:s})=>n==="="&&u===s||n===">"&&u>s||n==="<"&&u<s||n===">="&&u>=s||n==="<="&&u<=s))==null?void 0:r.value}}a(Us,"wD");const Ks=a(t=>t.replace(/[\W_]([a-z\d])?/gi,(e,u)=>u?u.toUpperCase():""),"S"),Vs=a(t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q"),zs={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:a(t=>t.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function Ys(t){let e=!1;return{type:"table",data:{tableData:Object.keys(t).sort((u,r)=>u.localeCompare(r)).map(u=>{const r=t[u],n="alias"in r;return n&&(e=!0),{name:u,flag:r,flagFormatted:`--${Vs(u)}`,aliasesEnabled:e,aliasFormatted:n?`-${r.alias}`:void 0}}).map(u=>(u.aliasesEnabled=e,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:zs}}}a(Ys,"D");const Ku=a(t=>!t||(t.version??(t.help?t.help.version:void 0)),"A"),Vu=a(t=>{const e="parent"in t&&t.parent?.name;return(e?`${e} `:"")+t.name},"C");function qs(t){const e=[];t.name&&e.push(Vu(t));const u=Ku(t)??("parent"in t&&Ku(t.parent));if(u&&e.push(`v${u}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
13
- `}}a(qs,"R");function Xs(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
14
- `}}a(Xs,"L");function Qs(t){const e=t.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
15
- `):e.usage}}:void 0;if(t.name){const u=[],r=[Vu(t)];if(t.flags&&Object.keys(t.flags).length>0&&r.push("[flags...]"),t.parameters&&t.parameters.length>0){const{parameters:n}=t,s=n.indexOf("--"),i=s>-1&&n.slice(s+1).some(o=>o.startsWith("<"));r.push(n.map(o=>o!=="--"?o:i?"--":"[--]").join(" "))}if(r.length>1&&u.push(r.join(" ")),"commands"in t&&t.commands?.length&&u.push(`${t.name} <command>`),u.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:u.join(`
16
- `)}}}}a(Qs,"T");function Zs(t){return!("commands"in t)||!t.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:t.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}a(Zs,"_");function Js(t){if(!(!t.flags||Object.keys(t.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Ys(t.flags),indentBody:0}}}a(Js,"k");function ei(t){const{help:e}=t;if(!e||!e.examples||e.examples.length===0)return;let{examples:u}=e;if(Array.isArray(u)&&(u=u.join(`
17
- `)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}a(ei,"F");function ti(t){if(!("alias"in t)||!t.alias)return;const{alias:e}=t;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}a(ti,"H");const ui=a(t=>[qs,Xs,Qs,Zs,Js,ei,ti].map(e=>e(t)).filter(Boolean),"U"),ri=In.WriteStream.prototype.hasColors();class ni{static{a(this,"M")}text(e){return e}bold(e){return ri?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:u}){return e.replace(/^/gm," ".repeat(u))}heading(e){return this.bold(e)}section({title:e,body:u,indentBody:r=2}){return`${(e?`${this.heading(e)}
18
- `:"")+(u?this.indentText({text:this.render(u),spaces:r}):"")}
19
- `}table({tableData:e,tableOptions:u,tableBreakpoints:r}){return Ws(e.map(n=>n.map(s=>this.render(s))),r?Us(r):u)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:u,flagFormatted:r,aliasesEnabled:n,aliasFormatted:s}=e;let i="";if(s?i+=`${s}, `:n&&(i+=" "),i+=r,"placeholder"in u&&typeof u.placeholder=="string")i+=`${this.flagOperator(e)}${u.placeholder}`;else{const o=this.flagParameter("type"in u?u.type:u);o&&(i+=`${this.flagOperator(e)}${o}`)}return i}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let u="description"in e?e.description??"":"";if("default"in e){let{default:r}=e;typeof r=="function"&&(r=r()),r&&(u+=` (default: ${this.flagDefault(r)})`)}return u}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(u=>this.render(u)).join(`
20
- `);if("type"in e&&this[e.type]){const u=this[e.type];if(typeof u=="function")return u.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}}const mt=/^[\w.-]+$/,{stringify:ue}=JSON,si=/[|\\{}()[\]^$+*?.]/;function _t(t){const e=[];let u,r;for(const n of t){if(r)throw new Error(`Invalid parameter: Spread parameter ${ue(r)} must be last`);const s=n[0],i=n[n.length-1];let o;if(s==="<"&&i===">"&&(o=!0,u))throw new Error(`Invalid parameter: Required parameter ${ue(n)} cannot come after optional parameter ${ue(u)}`);if(s==="["&&i==="]"&&(o=!1,u=n),o===void 0)throw new Error(`Invalid parameter: ${ue(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let D=n.slice(1,-1);const l=D.slice(-3)==="...";l&&(r=n,D=D.slice(0,-3));const f=D.match(si);if(f)throw new Error(`Invalid parameter: ${ue(n)}. Invalid character found ${ue(f[0])}`);e.push({name:D,required:o,spread:l})}return e}a(_t,"w");function At(t,e,u,r){for(let n=0;n<e.length;n+=1){const{name:s,required:i,spread:o}=e[n],D=Ks(s);if(D in t)throw new Error(`Invalid parameter: ${ue(s)} is used more than once.`);const l=o?u.slice(n):u[n];if(o&&(n=e.length),i&&(!l||o&&l.length===0))return console.error(`Error: Missing required parameter ${ue(s)}
21
- `),r(),process.exit(1);t[D]=l}}a(At,"b");function ii(t){return t===void 0||t!==!1}a(ii,"W");function zu(t,e,u,r){const n={...e.flags},s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:i}=e,o=ii(i);o&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const D=Su(n,r,{ignore:e.ignoreArgv}),l=a(()=>{console.log(e.version)},"f");if(s&&D.flags.version===!0)return l(),process.exit(0);const f=new ni,h=o&&i?.render?i.render:F=>f.render(F),c=a(F=>{const m=ui({...e,...F?{help:F}:{},flags:n});console.log(h(m,f))},"u");if(o&&D.flags.help===!0)return c(),process.exit(0);if(e.parameters){let{parameters:F}=e,m=D._;const R=F.indexOf("--"),T=F.slice(R+1),H=Object.create(null);if(R>-1&&T.length>0){F=F.slice(0,R);const O=D._["--"];m=m.slice(0,-O.length||void 0),At(H,_t(F),m,c),At(H,_t(T),O,c)}else At(H,_t(F),m,c);Object.assign(D._,H)}const C={...D,showVersion:l,showHelp:c};return typeof u=="function"&&u(C),{command:t,...C}}a(zu,"x");function oi(t,e){const u=new Map;for(const r of e){const n=[r.options.name],{alias:s}=r.options;s&&(Array.isArray(s)?n.push(...s):n.push(s));for(const i of n){if(u.has(i))throw new Error(`Duplicate command name found: ${ue(i)}`);u.set(i,r)}}return u.get(t)}a(oi,"z");function Yu(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!mt.test(t.name)))throw new Error(`Invalid script name: ${ue(t.name)}`);const r=u[0];if(t.commands&&mt.test(r)){const n=oi(r,t.commands);if(n)return zu(n.options.name,{...n.options,parent:t},n.callback,u.slice(1))}return zu(void 0,t,e,u)}a(Yu,"Z");function Di(t,e){if(!t)throw new Error("Command options are required");const{name:u}=t;if(t.name===void 0)throw new Error("Command name is required");if(!mt.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}a(Di,"G");var ai=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}a(qu,"getDefaultExportFromCjs");var de={exports:{}},yt,Xu;function li(){if(Xu)return yt;Xu=1,yt=r,r.sync=n;var t=De;function e(s,i){var o=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!o||(o=o.split(";"),o.indexOf("")!==-1))return!0;for(var D=0;D<o.length;D++){var l=o[D].toLowerCase();if(l&&s.substr(-l.length).toLowerCase()===l)return!0}return!1}a(e,"checkPathExt");function u(s,i,o){return!s.isSymbolicLink()&&!s.isFile()?!1:e(i,o)}a(u,"checkStat");function r(s,i,o){t.stat(s,function(D,l){o(D,D?!1:u(l,s,i))})}a(r,"isexe");function n(s,i){return u(t.statSync(s),s,i)}return a(n,"sync"),yt}a(li,"requireWindows");var wt,Qu;function ci(){if(Qu)return wt;Qu=1,wt=e,e.sync=u;var t=De;function e(s,i,o){t.stat(s,function(D,l){o(D,D?!1:r(l,i))})}a(e,"isexe");function u(s,i){return r(t.statSync(s),i)}a(u,"sync");function r(s,i){return s.isFile()&&n(s,i)}a(r,"checkStat");function n(s,i){var o=s.mode,D=s.uid,l=s.gid,f=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),h=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),c=parseInt("100",8),C=parseInt("010",8),F=parseInt("001",8),m=c|C,R=o&F||o&C&&l===h||o&c&&D===f||o&m&&f===0;return R}return a(n,"checkMode"),wt}a(ci,"requireMode");var Ve;process.platform==="win32"||ai.TESTING_WINDOWS?Ve=li():Ve=ci();var fi=Rt;Rt.sync=hi;function Rt(t,e,u){if(typeof e=="function"&&(u=e,e={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,n){Rt(t,e||{},function(s,i){s?n(s):r(i)})})}Ve(t,e||{},function(r,n){r&&(r.code==="EACCES"||e&&e.ignoreErrors)&&(r=null,n=!1),u(r,n)})}a(Rt,"isexe$1");function hi(t,e){try{return Ve.sync(t,e||{})}catch(u){if(e&&e.ignoreErrors||u.code==="EACCES")return!1;throw u}}a(hi,"sync");const Ee=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Zu=q,di=Ee?";":":",Ju=fi,er=a(t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),"getNotFoundError"),tr=a((t,e)=>{const u=e.colon||di,r=t.match(/\//)||Ee&&t.match(/\\/)?[""]:[...Ee?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(u)],n=Ee?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Ee?n.split(u):[""];return Ee&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:n}},"getPathInfo"),ur=a((t,e,u)=>{typeof e=="function"&&(u=e,e={}),e||(e={});const{pathEnv:r,pathExt:n,pathExtExe:s}=tr(t,e),i=[],o=a(l=>new Promise((f,h)=>{if(l===r.length)return e.all&&i.length?f(i):h(er(t));const c=r[l],C=/^".*"$/.test(c)?c.slice(1,-1):c,F=Zu.join(C,t),m=!C&&/^\.[\\\/]/.test(t)?t.slice(0,2)+F:F;f(D(m,l,0))}),"step"),D=a((l,f,h)=>new Promise((c,C)=>{if(h===n.length)return c(o(f+1));const F=n[h];Ju(l+F,{pathExt:s},(m,R)=>{if(!m&&R)if(e.all)i.push(l+F);else return c(l+F);return c(D(l,f,h+1))})}),"subStep");return u?o(0).then(l=>u(null,l),u):o(0)},"which$1"),Ei=a((t,e)=>{e=e||{};const{pathEnv:u,pathExt:r,pathExtExe:n}=tr(t,e),s=[];for(let i=0;i<u.length;i++){const o=u[i],D=/^".*"$/.test(o)?o.slice(1,-1):o,l=Zu.join(D,t),f=!D&&/^\.[\\\/]/.test(t)?t.slice(0,2)+l:l;for(let h=0;h<r.length;h++){const c=f+r[h];try{if(Ju.sync(c,{pathExt:n}))if(e.all)s.push(c);else return c}catch{}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw er(t)},"whichSync");var pi=ur;ur.sync=Ei;var bt={exports:{}};const rr=a((t={})=>{const e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"},"pathKey");bt.exports=rr,bt.exports.default=rr;var Ci=bt.exports;const nr=q,Fi=pi,gi=Ci;function sr(t,e){const u=t.options.env||process.env,r=process.cwd(),n=t.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let i;try{i=Fi.sync(t.command,{path:u[gi({env:u})],pathExt:e?nr.delimiter:void 0})}catch{}finally{s&&process.chdir(r)}return i&&(i=nr.resolve(n?t.options.cwd:"",i)),i}a(sr,"resolveCommandAttempt");function mi(t){return sr(t)||sr(t,!0)}a(mi,"resolveCommand$1");var _i=mi,vt={};const St=/([()\][%!^"`<>&|;, *?])/g;function Ai(t){return t=t.replace(St,"^$1"),t}a(Ai,"escapeCommand");function yi(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(St,"^$1"),e&&(t=t.replace(St,"^$1")),t}a(yi,"escapeArgument"),vt.command=Ai,vt.argument=yi;var wi=/^#!(.*)/;const Ri=wi;var bi=a((t="")=>{const e=t.match(Ri);if(!e)return null;const[u,r]=e[0].replace(/#! ?/,"").split(" "),n=u.split("/").pop();return n==="env"?r:r?`${n} ${r}`:n},"shebangCommand$1");const Bt=De,vi=bi;function Si(t){const u=Buffer.alloc(150);let r;try{r=Bt.openSync(t,"r"),Bt.readSync(r,u,0,150,0),Bt.closeSync(r)}catch{}return vi(u.toString())}a(Si,"readShebang$1");var Bi=Si;const $i=q,ir=_i,or=vt,Ti=Bi,xi=process.platform==="win32",Oi=/\.(?:com|exe)$/i,Ni=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Pi(t){t.file=ir(t);const e=t.file&&Ti(t.file);return e?(t.args.unshift(t.file),t.command=e,ir(t)):t.file}a(Pi,"detectShebang");function Hi(t){if(!xi)return t;const e=Pi(t),u=!Oi.test(e);if(t.options.forceShell||u){const r=Ni.test(e);t.command=$i.normalize(t.command),t.command=or.command(t.command),t.args=t.args.map(s=>or.argument(s,r));const n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}a(Hi,"parseNonShell");function Li(t,e,u){e&&!Array.isArray(e)&&(u=e,e=null),e=e?e.slice(0):[],u=Object.assign({},u);const r={command:t,args:e,options:u,file:void 0,original:{command:t,args:e}};return u.shell?r:Hi(r)}a(Li,"parse$5");var Ii=Li;const $t=process.platform==="win32";function Tt(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}a(Tt,"notFoundError");function ki(t,e){if(!$t)return;const u=t.emit;t.emit=function(r,n){if(r==="exit"){const s=Dr(n,e);if(s)return u.call(t,"error",s)}return u.apply(t,arguments)}}a(ki,"hookChildProcess");function Dr(t,e){return $t&&t===1&&!e.file?Tt(e.original,"spawn"):null}a(Dr,"verifyENOENT");function Mi(t,e){return $t&&t===1&&!e.file?Tt(e.original,"spawnSync"):null}a(Mi,"verifyENOENTSync");var Wi={hookChildProcess:ki,verifyENOENT:Dr,verifyENOENTSync:Mi,notFoundError:Tt};const ar=Mn,xt=Ii,Ot=Wi;function lr(t,e,u){const r=xt(t,e,u),n=ar.spawn(r.command,r.args,r.options);return Ot.hookChildProcess(n,r),n}a(lr,"spawn");function Gi(t,e,u){const r=xt(t,e,u),n=ar.spawnSync(r.command,r.args,r.options);return n.error=n.error||Ot.verifyENOENTSync(n.status,r),n}a(Gi,"spawnSync"),de.exports=lr,de.exports.spawn=lr,de.exports.sync=Gi,de.exports._parse=xt,de.exports._enoent=Ot;var ji=de.exports,Ui=qu(ji);const cr=a((t,e)=>{const u={...process.env},r=["inherit","inherit","inherit"];process.send&&r.push("ipc"),e&&(e.noCache&&(u.TSX_DISABLE_CACHE="1"),e.tsconfigPath&&(u.TSX_TSCONFIG_PATH=e.tsconfigPath));const n=t.filter(s=>s!=="-i"&&s!=="--interactive").length===0;return Ui(process.execPath,["--require",he.require.resolve("./preflight.cjs"),...n?["--require",he.require.resolve("./patch-repl.cjs")]:[],ke.isFeatureSupported(ke.moduleRegister)?"--import":"--loader",Ru.pathToFileURL(he.require.resolve("./loader.mjs")).toString(),...t],{stdio:r,env:u})},"run");var ze={};const Ki=q,re="\\\\/",fr=`[^${re}]`,se="\\.",Vi="\\+",zi="\\?",Ye="\\/",Yi="(?=.)",hr="[^/]",Nt=`(?:${Ye}|$)`,dr=`(?:^|${Ye})`,Pt=`${se}{1,2}${Nt}`,qi=`(?!${se})`,Xi=`(?!${dr}${Pt})`,Qi=`(?!${se}{0,1}${Nt})`,Zi=`(?!${Pt})`,Ji=`[^.${Ye}]`,eo=`${hr}*?`,Er={DOT_LITERAL:se,PLUS_LITERAL:Vi,QMARK_LITERAL:zi,SLASH_LITERAL:Ye,ONE_CHAR:Yi,QMARK:hr,END_ANCHOR:Nt,DOTS_SLASH:Pt,NO_DOT:qi,NO_DOTS:Xi,NO_DOT_SLASH:Qi,NO_DOTS_SLASH:Zi,QMARK_NO_DOT:Ji,STAR:eo,START_ANCHOR:dr},to={...Er,SLASH_LITERAL:`[${re}]`,QMARK:fr,STAR:`${fr}*?`,DOTS_SLASH:`${se}{1,2}(?:[${re}]|$)`,NO_DOT:`(?!${se})`,NO_DOTS:`(?!(?:^|[${re}])${se}{1,2}(?:[${re}]|$))`,NO_DOT_SLASH:`(?!${se}{0,1}(?:[${re}]|$))`,NO_DOTS_SLASH:`(?!${se}{1,2}(?:[${re}]|$))`,QMARK_NO_DOT:`[^.${re}]`,START_ANCHOR:`(?:^|[${re}])`,END_ANCHOR:`(?:[${re}]|$)`},uo={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var qe={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:uo,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Ki.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?to:Er}};(function(t){const e=q,u=process.platform==="win32",{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=qe;t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),t.hasRegexChars=o=>s.test(o),t.isRegexChar=o=>o.length===1&&t.hasRegexChars(o),t.escapeRegex=o=>o.replace(i,"\\$1"),t.toPosixSlashes=o=>o.replace(r,"/"),t.removeBackslashes=o=>o.replace(n,D=>D==="\\"?"":D),t.supportsLookbehinds=()=>{const o=process.version.slice(1).split(".").map(Number);return o.length===3&&o[0]>=9||o[0]===8&&o[1]>=10},t.isWindows=o=>o&&typeof o.windows=="boolean"?o.windows:u===!0||e.sep==="\\",t.escapeLast=(o,D,l)=>{const f=o.lastIndexOf(D,l);return f===-1?o:o[f-1]==="\\"?t.escapeLast(o,D,f-1):`${o.slice(0,f)}\\${o.slice(f)}`},t.removePrefix=(o,D={})=>{let l=o;return l.startsWith("./")&&(l=l.slice(2),D.prefix="./"),l},t.wrapOutput=(o,D={},l={})=>{const f=l.contains?"":"^",h=l.contains?"":"$";let c=`${f}(?:${o})${h}`;return D.negated===!0&&(c=`(?:^(?!${c}).*$)`),c}})(ze);const pr=ze,{CHAR_ASTERISK:Ht,CHAR_AT:ro,CHAR_BACKWARD_SLASH:we,CHAR_COMMA:no,CHAR_DOT:Lt,CHAR_EXCLAMATION_MARK:It,CHAR_FORWARD_SLASH:Cr,CHAR_LEFT_CURLY_BRACE:kt,CHAR_LEFT_PARENTHESES:Mt,CHAR_LEFT_SQUARE_BRACKET:so,CHAR_PLUS:io,CHAR_QUESTION_MARK:Fr,CHAR_RIGHT_CURLY_BRACE:oo,CHAR_RIGHT_PARENTHESES:gr,CHAR_RIGHT_SQUARE_BRACKET:Do}=qe,mr=a(t=>t===Cr||t===we,"isPathSeparator"),_r=a(t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},"depth"),ao=a((t,e)=>{const u=e||{},r=t.length-1,n=u.parts===!0||u.scanToEnd===!0,s=[],i=[],o=[];let D=t,l=-1,f=0,h=0,c=!1,C=!1,F=!1,m=!1,R=!1,T=!1,H=!1,O=!1,z=!1,I=!1,Z=0,M,y,g={value:"",depth:0,isGlob:!1};const w=a(()=>l>=r,"eos"),d=a(()=>D.charCodeAt(l+1),"peek"),b=a(()=>(M=y,D.charCodeAt(++l)),"advance");for(;l<r;){y=b();let U;if(y===we){H=g.backslashes=!0,y=b(),y===kt&&(T=!0);continue}if(T===!0||y===kt){for(Z++;w()!==!0&&(y=b());){if(y===we){H=g.backslashes=!0,b();continue}if(y===kt){Z++;continue}if(T!==!0&&y===Lt&&(y=b())===Lt){if(c=g.isBrace=!0,F=g.isGlob=!0,I=!0,n===!0)continue;break}if(T!==!0&&y===no){if(c=g.isBrace=!0,F=g.isGlob=!0,I=!0,n===!0)continue;break}if(y===oo&&(Z--,Z===0)){T=!1,c=g.isBrace=!0,I=!0;break}}if(n===!0)continue;break}if(y===Cr){if(s.push(l),i.push(g),g={value:"",depth:0,isGlob:!1},I===!0)continue;if(M===Lt&&l===f+1){f+=2;continue}h=l+1;continue}if(u.noext!==!0&&(y===io||y===ro||y===Ht||y===Fr||y===It)===!0&&d()===Mt){if(F=g.isGlob=!0,m=g.isExtglob=!0,I=!0,y===It&&l===f&&(z=!0),n===!0){for(;w()!==!0&&(y=b());){if(y===we){H=g.backslashes=!0,y=b();continue}if(y===gr){F=g.isGlob=!0,I=!0;break}}continue}break}if(y===Ht){if(M===Ht&&(R=g.isGlobstar=!0),F=g.isGlob=!0,I=!0,n===!0)continue;break}if(y===Fr){if(F=g.isGlob=!0,I=!0,n===!0)continue;break}if(y===so){for(;w()!==!0&&(U=b());){if(U===we){H=g.backslashes=!0,b();continue}if(U===Do){C=g.isBracket=!0,F=g.isGlob=!0,I=!0;break}}if(n===!0)continue;break}if(u.nonegate!==!0&&y===It&&l===f){O=g.negated=!0,f++;continue}if(u.noparen!==!0&&y===Mt){if(F=g.isGlob=!0,n===!0){for(;w()!==!0&&(y=b());){if(y===Mt){H=g.backslashes=!0,y=b();continue}if(y===gr){I=!0;break}}continue}break}if(F===!0){if(I=!0,n===!0)continue;break}}u.noext===!0&&(m=!1,F=!1);let v=D,W="",E="";f>0&&(W=D.slice(0,f),D=D.slice(f),h-=f),v&&F===!0&&h>0?(v=D.slice(0,h),E=D.slice(h)):F===!0?(v="",E=D):v=D,v&&v!==""&&v!=="/"&&v!==D&&mr(v.charCodeAt(v.length-1))&&(v=v.slice(0,-1)),u.unescape===!0&&(E&&(E=pr.removeBackslashes(E)),v&&H===!0&&(v=pr.removeBackslashes(v)));const p={prefix:W,input:t,start:f,base:v,glob:E,isBrace:c,isBracket:C,isGlob:F,isExtglob:m,isGlobstar:R,negated:O,negatedExtglob:z};if(u.tokens===!0&&(p.maxDepth=0,mr(y)||i.push(g),p.tokens=i),u.parts===!0||u.tokens===!0){let U;for(let $=0;$<s.length;$++){const ee=U?U+1:f,te=s[$],Y=t.slice(ee,te);u.tokens&&($===0&&f!==0?(i[$].isPrefix=!0,i[$].value=W):i[$].value=Y,_r(i[$]),p.maxDepth+=i[$].depth),($!==0||Y!=="")&&o.push(Y),U=te}if(U&&U+1<t.length){const $=t.slice(U+1);o.push($),u.tokens&&(i[i.length-1].value=$,_r(i[i.length-1]),p.maxDepth+=i[i.length-1].depth)}p.slashes=s,p.parts=o}return p},"scan$1");var lo=ao;const Xe=qe,X=ze,{MAX_LENGTH:Qe,POSIX_REGEX_SOURCE:co,REGEX_NON_SPECIAL_CHARS:fo,REGEX_SPECIAL_CHARS_BACKREF:ho,REPLACEMENTS:Ar}=Xe,Eo=a((t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const u=`[${t.join("-")}]`;try{new RegExp(u)}catch{return t.map(n=>X.escapeRegex(n)).join("..")}return u},"expandRange"),pe=a((t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,"syntaxError"),Wt=a((t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Ar[t]||t;const u={...e},r=typeof u.maxLength=="number"?Math.min(Qe,u.maxLength):Qe;let n=t.length;if(n>r)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${r}`);const s={type:"bos",value:"",output:u.prepend||""},i=[s],o=u.capture?"":"?:",D=X.isWindows(e),l=Xe.globChars(D),f=Xe.extglobChars(l),{DOT_LITERAL:h,PLUS_LITERAL:c,SLASH_LITERAL:C,ONE_CHAR:F,DOTS_SLASH:m,NO_DOT:R,NO_DOT_SLASH:T,NO_DOTS_SLASH:H,QMARK:O,QMARK_NO_DOT:z,STAR:I,START_ANCHOR:Z}=l,M=a(A=>`(${o}(?:(?!${Z}${A.dot?m:h}).)*?)`,"globstar"),y=u.dot?"":R,g=u.dot?O:z;let w=u.bash===!0?M(u):I;u.capture&&(w=`(${w})`),typeof u.noext=="boolean"&&(u.noextglob=u.noext);const d={input:t,index:-1,start:0,dot:u.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};t=X.removePrefix(t,d),n=t.length;const b=[],v=[],W=[];let E=s,p;const U=a(()=>d.index===n-1,"eos"),$=d.peek=(A=1)=>t[d.index+A],ee=d.advance=()=>t[++d.index]||"",te=a(()=>t.slice(d.index+1),"remaining"),Y=a((A="",N=0)=>{d.consumed+=A,d.index+=N},"consume"),Pe=a(A=>{d.output+=A.output!=null?A.output:A.value,Y(A.value)},"append"),Bn=a(()=>{let A=1;for(;$()==="!"&&($(2)!=="("||$(3)==="?");)ee(),d.start++,A++;return A%2===0?!1:(d.negated=!0,d.start++,!0)},"negate"),He=a(A=>{d[A]++,W.push(A)},"increment"),oe=a(A=>{d[A]--,W.pop()},"decrement"),B=a(A=>{if(E.type==="globstar"){const N=d.braces>0&&(A.type==="comma"||A.type==="brace"),_=A.extglob===!0||b.length&&(A.type==="pipe"||A.type==="paren");A.type!=="slash"&&A.type!=="paren"&&!N&&!_&&(d.output=d.output.slice(0,-E.output.length),E.type="star",E.value="*",E.output=w,d.output+=E.output)}if(b.length&&A.type!=="paren"&&(b[b.length-1].inner+=A.value),(A.value||A.output)&&Pe(A),E&&E.type==="text"&&A.type==="text"){E.value+=A.value,E.output=(E.output||"")+A.value;return}A.prev=E,i.push(A),E=A},"push"),Le=a((A,N)=>{const _={...f[N],conditions:1,inner:""};_.prev=E,_.parens=d.parens,_.output=d.output;const S=(u.capture?"(":"")+_.open;He("parens"),B({type:A,value:N,output:d.output?"":F}),B({type:"paren",extglob:!0,value:ee(),output:S}),b.push(_)},"extglobOpen"),$n=a(A=>{let N=A.close+(u.capture?")":""),_;if(A.type==="negate"){let S=w;if(A.inner&&A.inner.length>1&&A.inner.includes("/")&&(S=M(u)),(S!==w||U()||/^\)+$/.test(te()))&&(N=A.close=`)$))${S}`),A.inner.includes("*")&&(_=te())&&/^\.[^\\/.]+$/.test(_)){const P=Wt(_,{...e,fastpaths:!1}).output;N=A.close=`)${P})${S})`}A.prev.type==="bos"&&(d.negatedExtglob=!0)}B({type:"paren",extglob:!0,value:p,output:N}),oe("parens")},"extglobClose");if(u.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let A=!1,N=t.replace(ho,(_,S,P,K,k,ft)=>K==="\\"?(A=!0,_):K==="?"?S?S+K+(k?O.repeat(k.length):""):ft===0?g+(k?O.repeat(k.length):""):O.repeat(P.length):K==="."?h.repeat(P.length):K==="*"?S?S+K+(k?w:""):w:S?_:`\\${_}`);return A===!0&&(u.unescape===!0?N=N.replace(/\\/g,""):N=N.replace(/\\+/g,_=>_.length%2===0?"\\\\":_?"\\":"")),N===t&&u.contains===!0?(d.output=t,d):(d.output=X.wrapOutput(N,d,e),d)}for(;!U();){if(p=ee(),p==="\0")continue;if(p==="\\"){const _=$();if(_==="/"&&u.bash!==!0||_==="."||_===";")continue;if(!_){p+="\\",B({type:"text",value:p});continue}const S=/^\\+/.exec(te());let P=0;if(S&&S[0].length>2&&(P=S[0].length,d.index+=P,P%2!==0&&(p+="\\")),u.unescape===!0?p=ee():p+=ee(),d.brackets===0){B({type:"text",value:p});continue}}if(d.brackets>0&&(p!=="]"||E.value==="["||E.value==="[^")){if(u.posix!==!1&&p===":"){const _=E.value.slice(1);if(_.includes("[")&&(E.posix=!0,_.includes(":"))){const S=E.value.lastIndexOf("["),P=E.value.slice(0,S),K=E.value.slice(S+2),k=co[K];if(k){E.value=P+k,d.backtrack=!0,ee(),!s.output&&i.indexOf(E)===1&&(s.output=F);continue}}}(p==="["&&$()!==":"||p==="-"&&$()==="]")&&(p=`\\${p}`),p==="]"&&(E.value==="["||E.value==="[^")&&(p=`\\${p}`),u.posix===!0&&p==="!"&&E.value==="["&&(p="^"),E.value+=p,Pe({value:p});continue}if(d.quotes===1&&p!=='"'){p=X.escapeRegex(p),E.value+=p,Pe({value:p});continue}if(p==='"'){d.quotes=d.quotes===1?0:1,u.keepQuotes===!0&&B({type:"text",value:p});continue}if(p==="("){He("parens"),B({type:"paren",value:p});continue}if(p===")"){if(d.parens===0&&u.strictBrackets===!0)throw new SyntaxError(pe("opening","("));const _=b[b.length-1];if(_&&d.parens===_.parens+1){$n(b.pop());continue}B({type:"paren",value:p,output:d.parens?")":"\\)"}),oe("parens");continue}if(p==="["){if(u.nobracket===!0||!te().includes("]")){if(u.nobracket!==!0&&u.strictBrackets===!0)throw new SyntaxError(pe("closing","]"));p=`\\${p}`}else He("brackets");B({type:"bracket",value:p});continue}if(p==="]"){if(u.nobracket===!0||E&&E.type==="bracket"&&E.value.length===1){B({type:"text",value:p,output:`\\${p}`});continue}if(d.brackets===0){if(u.strictBrackets===!0)throw new SyntaxError(pe("opening","["));B({type:"text",value:p,output:`\\${p}`});continue}oe("brackets");const _=E.value.slice(1);if(E.posix!==!0&&_[0]==="^"&&!_.includes("/")&&(p=`/${p}`),E.value+=p,Pe({value:p}),u.literalBrackets===!1||X.hasRegexChars(_))continue;const S=X.escapeRegex(E.value);if(d.output=d.output.slice(0,-E.value.length),u.literalBrackets===!0){d.output+=S,E.value=S;continue}E.value=`(${o}${S}|${E.value})`,d.output+=E.value;continue}if(p==="{"&&u.nobrace!==!0){He("braces");const _={type:"brace",value:p,output:"(",outputIndex:d.output.length,tokensIndex:d.tokens.length};v.push(_),B(_);continue}if(p==="}"){const _=v[v.length-1];if(u.nobrace===!0||!_){B({type:"text",value:p,output:p});continue}let S=")";if(_.dots===!0){const P=i.slice(),K=[];for(let k=P.length-1;k>=0&&(i.pop(),P[k].type!=="brace");k--)P[k].type!=="dots"&&K.unshift(P[k].value);S=Eo(K,u),d.backtrack=!0}if(_.comma!==!0&&_.dots!==!0){const P=d.output.slice(0,_.outputIndex),K=d.tokens.slice(_.tokensIndex);_.value=_.output="\\{",p=S="\\}",d.output=P;for(const k of K)d.output+=k.output||k.value}B({type:"brace",value:p,output:S}),oe("braces"),v.pop();continue}if(p==="|"){b.length>0&&b[b.length-1].conditions++,B({type:"text",value:p});continue}if(p===","){let _=p;const S=v[v.length-1];S&&W[W.length-1]==="braces"&&(S.comma=!0,_="|"),B({type:"comma",value:p,output:_});continue}if(p==="/"){if(E.type==="dot"&&d.index===d.start+1){d.start=d.index+1,d.consumed="",d.output="",i.pop(),E=s;continue}B({type:"slash",value:p,output:C});continue}if(p==="."){if(d.braces>0&&E.type==="dot"){E.value==="."&&(E.output=h);const _=v[v.length-1];E.type="dots",E.output+=p,E.value+=p,_.dots=!0;continue}if(d.braces+d.parens===0&&E.type!=="bos"&&E.type!=="slash"){B({type:"text",value:p,output:h});continue}B({type:"dot",value:p,output:h});continue}if(p==="?"){if(!(E&&E.value==="(")&&u.noextglob!==!0&&$()==="("&&$(2)!=="?"){Le("qmark",p);continue}if(E&&E.type==="paren"){const S=$();let P=p;if(S==="<"&&!X.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(E.value==="("&&!/[!=<:]/.test(S)||S==="<"&&!/<([!=]|\w+>)/.test(te()))&&(P=`\\${p}`),B({type:"text",value:p,output:P});continue}if(u.dot!==!0&&(E.type==="slash"||E.type==="bos")){B({type:"qmark",value:p,output:z});continue}B({type:"qmark",value:p,output:O});continue}if(p==="!"){if(u.noextglob!==!0&&$()==="("&&($(2)!=="?"||!/[!=<:]/.test($(3)))){Le("negate",p);continue}if(u.nonegate!==!0&&d.index===0){Bn();continue}}if(p==="+"){if(u.noextglob!==!0&&$()==="("&&$(2)!=="?"){Le("plus",p);continue}if(E&&E.value==="("||u.regex===!1){B({type:"plus",value:p,output:c});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||d.parens>0){B({type:"plus",value:p});continue}B({type:"plus",value:c});continue}if(p==="@"){if(u.noextglob!==!0&&$()==="("&&$(2)!=="?"){B({type:"at",extglob:!0,value:p,output:""});continue}B({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const _=fo.exec(te());_&&(p+=_[0],d.index+=_[0].length),B({type:"text",value:p});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=p,E.output=w,d.backtrack=!0,d.globstar=!0,Y(p);continue}let A=te();if(u.noextglob!==!0&&/^\([^?]/.test(A)){Le("star",p);continue}if(E.type==="star"){if(u.noglobstar===!0){Y(p);continue}const _=E.prev,S=_.prev,P=_.type==="slash"||_.type==="bos",K=S&&(S.type==="star"||S.type==="globstar");if(u.bash===!0&&(!P||A[0]&&A[0]!=="/")){B({type:"star",value:p,output:""});continue}const k=d.braces>0&&(_.type==="comma"||_.type==="brace"),ft=b.length&&(_.type==="pipe"||_.type==="paren");if(!P&&_.type!=="paren"&&!k&&!ft){B({type:"star",value:p,output:""});continue}for(;A.slice(0,3)==="/**";){const Ie=t[d.index+4];if(Ie&&Ie!=="/")break;A=A.slice(3),Y("/**",3)}if(_.type==="bos"&&U()){E.type="globstar",E.value+=p,E.output=M(u),d.output=E.output,d.globstar=!0,Y(p);continue}if(_.type==="slash"&&_.prev.type!=="bos"&&!K&&U()){d.output=d.output.slice(0,-(_.output+E.output).length),_.output=`(?:${_.output}`,E.type="globstar",E.output=M(u)+(u.strictSlashes?")":"|$)"),E.value+=p,d.globstar=!0,d.output+=_.output+E.output,Y(p);continue}if(_.type==="slash"&&_.prev.type!=="bos"&&A[0]==="/"){const Ie=A[1]!==void 0?"|$":"";d.output=d.output.slice(0,-(_.output+E.output).length),_.output=`(?:${_.output}`,E.type="globstar",E.output=`${M(u)}${C}|${C}${Ie})`,E.value+=p,d.output+=_.output+E.output,d.globstar=!0,Y(p+ee()),B({type:"slash",value:"/",output:""});continue}if(_.type==="bos"&&A[0]==="/"){E.type="globstar",E.value+=p,E.output=`(?:^|${C}|${M(u)}${C})`,d.output=E.output,d.globstar=!0,Y(p+ee()),B({type:"slash",value:"/",output:""});continue}d.output=d.output.slice(0,-E.output.length),E.type="globstar",E.output=M(u),E.value+=p,d.output+=E.output,d.globstar=!0,Y(p);continue}const N={type:"star",value:p,output:w};if(u.bash===!0){N.output=".*?",(E.type==="bos"||E.type==="slash")&&(N.output=y+N.output),B(N);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&u.regex===!0){N.output=p,B(N);continue}(d.index===d.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(d.output+=T,E.output+=T):u.dot===!0?(d.output+=H,E.output+=H):(d.output+=y,E.output+=y),$()!=="*"&&(d.output+=F,E.output+=F)),B(N)}for(;d.brackets>0;){if(u.strictBrackets===!0)throw new SyntaxError(pe("closing","]"));d.output=X.escapeLast(d.output,"["),oe("brackets")}for(;d.parens>0;){if(u.strictBrackets===!0)throw new SyntaxError(pe("closing",")"));d.output=X.escapeLast(d.output,"("),oe("parens")}for(;d.braces>0;){if(u.strictBrackets===!0)throw new SyntaxError(pe("closing","}"));d.output=X.escapeLast(d.output,"{"),oe("braces")}if(u.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&B({type:"maybe_slash",value:"",output:`${C}?`}),d.backtrack===!0){d.output="";for(const A of d.tokens)d.output+=A.output!=null?A.output:A.value,A.suffix&&(d.output+=A.suffix)}return d},"parse$3");Wt.fastpaths=(t,e)=>{const u={...e},r=typeof u.maxLength=="number"?Math.min(Qe,u.maxLength):Qe,n=t.length;if(n>r)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${r}`);t=Ar[t]||t;const s=X.isWindows(e),{DOT_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:D,DOTS_SLASH:l,NO_DOT:f,NO_DOTS:h,NO_DOTS_SLASH:c,STAR:C,START_ANCHOR:F}=Xe.globChars(s),m=u.dot?h:f,R=u.dot?c:f,T=u.capture?"":"?:",H={negated:!1,prefix:""};let O=u.bash===!0?".*?":C;u.capture&&(O=`(${O})`);const z=a(y=>y.noglobstar===!0?O:`(${T}(?:(?!${F}${y.dot?l:i}).)*?)`,"globstar"),I=a(y=>{switch(y){case"*":return`${m}${D}${O}`;case".*":return`${i}${D}${O}`;case"*.*":return`${m}${O}${i}${D}${O}`;case"*/*":return`${m}${O}${o}${D}${R}${O}`;case"**":return m+z(u);case"**/*":return`(?:${m}${z(u)}${o})?${R}${D}${O}`;case"**/*.*":return`(?:${m}${z(u)}${o})?${R}${O}${i}${D}${O}`;case"**/.*":return`(?:${m}${z(u)}${o})?${i}${D}${O}`;default:{const g=/^(.*?)\.(\w+)$/.exec(y);if(!g)return;const w=I(g[1]);return w?w+i+g[2]:void 0}}},"create"),Z=X.removePrefix(t,H);let M=I(Z);return M&&u.strictSlashes!==!0&&(M+=`${o}?`),M};var po=Wt;const Co=q,Fo=lo,Gt=po,jt=ze,go=qe,mo=a(t=>t&&typeof t=="object"&&!Array.isArray(t),"isObject$1"),L=a((t,e,u=!1)=>{if(Array.isArray(t)){const f=t.map(c=>L(c,e,u));return a(c=>{for(const C of f){const F=C(c);if(F)return F}return!1},"arrayMatcher")}const r=mo(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");const n=e||{},s=jt.isWindows(e),i=r?L.compileRe(t,e):L.makeRe(t,e,!1,!0),o=i.state;delete i.state;let D=a(()=>!1,"isIgnored");if(n.ignore){const f={...e,ignore:null,onMatch:null,onResult:null};D=L(n.ignore,f,u)}const l=a((f,h=!1)=>{const{isMatch:c,match:C,output:F}=L.test(f,i,e,{glob:t,posix:s}),m={glob:t,state:o,regex:i,posix:s,input:f,output:F,match:C,isMatch:c};return typeof n.onResult=="function"&&n.onResult(m),c===!1?(m.isMatch=!1,h?m:!1):D(f)?(typeof n.onIgnore=="function"&&n.onIgnore(m),m.isMatch=!1,h?m:!1):(typeof n.onMatch=="function"&&n.onMatch(m),h?m:!0)},"matcher");return u&&(l.state=o),l},"picomatch$3");L.test=(t,e,u,{glob:r,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const s=u||{},i=s.format||(n?jt.toPosixSlashes:null);let o=t===r,D=o&&i?i(t):t;return o===!1&&(D=i?i(t):t,o=D===r),(o===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?o=L.matchBase(t,e,u,n):o=e.exec(D)),{isMatch:!!o,match:o,output:D}},L.matchBase=(t,e,u,r=jt.isWindows(u))=>(e instanceof RegExp?e:L.makeRe(e,u)).test(Co.basename(t)),L.isMatch=(t,e,u)=>L(e,u)(t),L.parse=(t,e)=>Array.isArray(t)?t.map(u=>L.parse(u,e)):Gt(t,{...e,fastpaths:!1}),L.scan=(t,e)=>Fo(t,e),L.compileRe=(t,e,u=!1,r=!1)=>{if(u===!0)return t.output;const n=e||{},s=n.contains?"":"^",i=n.contains?"":"$";let o=`${s}(?:${t.output})${i}`;t&&t.negated===!0&&(o=`^(?!${o}).*$`);const D=L.toRegex(o,e);return r===!0&&(D.state=t),D},L.makeRe=(t,e={},u=!1,r=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=Gt.fastpaths(t,e)),n.output||(n=Gt(t,e)),L.compileRe(n,e,u,r)},L.toRegex=(t,e)=>{try{const u=e||{};return new RegExp(t,u.flags||(u.nocase?"i":""))}catch(u){if(e&&e.debug===!0)throw u;return/$^/}},L.constants=go;var _o=L,yr=_o;const Re=De,{Readable:Ao}=Gn,be=q,{promisify:Ze}=_e,Ut=yr,yo=Ze(Re.readdir),wo=Ze(Re.stat),wr=Ze(Re.lstat),Ro=Ze(Re.realpath),bo="!",Rr="READDIRP_RECURSIVE_ERROR",vo=new Set(["ENOENT","EPERM","EACCES","ELOOP",Rr]),Kt="files",br="directories",Je="files_directories",et="all",vr=[Kt,br,Je,et],So=a(t=>vo.has(t.code),"isNormalFlowError"),[Sr,Bo]=process.versions.node.split(".").slice(0,2).map(t=>Number.parseInt(t,10)),$o=process.platform==="win32"&&(Sr>10||Sr===10&&Bo>=5),Br=a(t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){const e=Ut(t.trim());return u=>e(u.basename)}if(Array.isArray(t)){const e=[],u=[];for(const r of t){const n=r.trim();n.charAt(0)===bo?u.push(Ut(n.slice(1))):e.push(Ut(n))}return u.length>0?e.length>0?r=>e.some(n=>n(r.basename))&&!u.some(n=>n(r.basename)):r=>!u.some(n=>n(r.basename)):r=>e.some(n=>n(r.basename))}}},"normalizeFilter");class ct extends Ao{static{a(this,"ReaddirpStream")}static get defaultOptions(){return{root:".",fileFilter:a(e=>!0,"fileFilter"),directoryFilter:a(e=>!0,"directoryFilter"),type:Kt,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});const u={...ct.defaultOptions,...e},{root:r,type:n}=u;this._fileFilter=Br(u.fileFilter),this._directoryFilter=Br(u.directoryFilter);const s=u.lstat?wr:wo;$o?this._stat=i=>s(i,{bigint:!0}):this._stat=s,this._maxDepth=u.depth,this._wantsDir=[br,Je,et].includes(n),this._wantsFile=[Kt,Je,et].includes(n),this._wantsEverything=n===et,this._root=be.resolve(r),this._isDirent="Dirent"in Re&&!u.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(r,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){const{path:u,depth:r,files:n=[]}=this.parent||{};if(n.length>0){const s=n.splice(0,e).map(i=>this._formatEntry(i,u));for(const i of await Promise.all(s)){if(this.destroyed)return;const o=await this._getEntryType(i);o==="directory"&&this._directoryFilter(i)?(r<=this._maxDepth&&this.parents.push(this._exploreDir(i.fullPath,r+1)),this._wantsDir&&(this.push(i),e--)):(o==="file"||this._includeAsFile(i))&&this._fileFilter(i)&&this._wantsFile&&(this.push(i),e--)}}else{const s=this.parents.pop();if(!s){this.push(null);break}if(this.parent=await s,this.destroyed)return}}}catch(u){this.destroy(u)}finally{this.reading=!1}}}async _exploreDir(e,u){let r;try{r=await yo(e,this._rdOptions)}catch(n){this._onError(n)}return{files:r,depth:u,path:e}}async _formatEntry(e,u){let r;try{const n=this._isDirent?e.name:e,s=be.resolve(be.join(u,n));r={path:be.relative(this._root,s),fullPath:s,basename:n},r[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(n){this._onError(n)}return r}_onError(e){So(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){const u=e&&e[this._statsProp];if(u){if(u.isFile())return"file";if(u.isDirectory())return"directory";if(u&&u.isSymbolicLink()){const r=e.fullPath;try{const n=await Ro(r),s=await wr(n);if(s.isFile())return"file";if(s.isDirectory()){const i=n.length;if(r.startsWith(n)&&r.substr(i,1)===be.sep){const o=new Error(`Circular symlink detected: "${r}" points to "${n}"`);return o.code=Rr,this._onError(o)}return"directory"}}catch(n){this._onError(n)}}}}_includeAsFile(e){const u=e&&e[this._statsProp];return u&&this._wantsEverything&&!u.isDirectory()}}const Ce=a((t,e={})=>{let u=e.entryType||e.type;if(u==="both"&&(u=Je),u&&(e.type=u),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(u&&!vr.includes(u))throw new Error(`readdirp: Invalid type passed. Use one of ${vr.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new ct(e)},"readdirp$1"),To=a((t,e={})=>new Promise((u,r)=>{const n=[];Ce(t,e).on("data",s=>n.push(s)).on("end",()=>u(n)).on("error",s=>r(s))}),"readdirpPromise");Ce.promise=To,Ce.ReaddirpStream=ct,Ce.default=Ce;var xo=Ce,Vt={exports:{}};/*!
22
- * normalize-path <https://github.com/jonschlinkert/normalize-path>
23
- *
24
- * Copyright (c) 2014-2018, Jon Schlinkert.
25
- * Released under the MIT License.
26
- */var $r=a(function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var u=t.length;if(u<=1)return t;var r="";if(u>4&&t[3]==="\\"){var n=t[2];(n==="?"||n===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),r="//")}var s=t.split(/[/\\]+/);return e!==!1&&s[s.length-1]===""&&s.pop(),r+s.join("/")},"normalizePath$2"),Oo=Vt.exports;Object.defineProperty(Oo,"__esModule",{value:!0});const Tr=yr,No=$r,xr="!",Po={returnIndex:!1},Ho=a(t=>Array.isArray(t)?t:[t],"arrify$1"),Lo=a((t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=Tr(t,e);return r=>t===r||u(r)}return t instanceof RegExp?u=>t.test(u):u=>!1},"createPattern"),Or=a((t,e,u,r)=>{const n=Array.isArray(u),s=n?u[0]:u;if(!n&&typeof s!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(s));const i=No(s,!1);for(let D=0;D<e.length;D++){const l=e[D];if(l(i))return r?-1:!1}const o=n&&[i].concat(u.slice(1));for(let D=0;D<t.length;D++){const l=t[D];if(n?l(...o):l(i))return r?D:!0}return r?-1:!1},"matchPatterns"),zt=a((t,e,u=Po)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const r=typeof u=="boolean"?{returnIndex:u}:u,n=r.returnIndex||!1,s=Ho(t),i=s.filter(D=>typeof D=="string"&&D.charAt(0)===xr).map(D=>D.slice(1)).map(D=>Tr(D,r)),o=s.filter(D=>typeof D!="string"||typeof D=="string"&&D.charAt(0)!==xr).map(D=>Lo(D,r));return e==null?(D,l=!1)=>Or(o,i,D,typeof l=="boolean"?l:!1):Or(o,i,e,n)},"anymatch$1");zt.default=zt,Vt.exports=zt;var Io=Vt.exports;/*!
27
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
28
- *
29
- * Copyright (c) 2014-2016, Jon Schlinkert.
30
- * Licensed under the MIT License.
31
- */var ko=a(function(e){if(typeof e!="string"||e==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(u[2])return!0;e=e.slice(u.index+u[0].length)}return!1},"isExtglob");/*!
32
- * is-glob <https://github.com/jonschlinkert/is-glob>
33
- *
34
- * Copyright (c) 2014-2017, Jon Schlinkert.
35
- * Released under the MIT License.
36
- */var Mo=ko,Nr={"{":"}","(":")","[":"]"},Wo=a(function(t){if(t[0]==="!")return!0;for(var e=0,u=-2,r=-2,n=-2,s=-2,i=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||r!==-1&&t[e]==="["&&t[e+1]!=="]"&&(r<e&&(r=t.indexOf("]",e)),r>e&&(i===-1||i>r||(i=t.indexOf("\\",e),i===-1||i>r)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(i=t.indexOf("\\",e),i===-1||i>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(i=t.indexOf("\\",e),i===-1||i>s))||u!==-1&&t[e]==="("&&t[e+1]!=="|"&&(u<e&&(u=t.indexOf("|",e)),u!==-1&&t[u+1]!==")"&&(s=t.indexOf(")",u),s>u&&(i=t.indexOf("\\",u),i===-1||i>s))))return!0;if(t[e]==="\\"){var o=t[e+1];e+=2;var D=Nr[o];if(D){var l=t.indexOf(D,e);l!==-1&&(e=l+1)}if(t[e]==="!")return!0}else e++}return!1},"strictCheck"),Go=a(function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var u=t[e+1];e+=2;var r=Nr[u];if(r){var n=t.indexOf(r,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1},"relaxedCheck"),Yt=a(function(e,u){if(typeof e!="string"||e==="")return!1;if(Mo(e))return!0;var r=Wo;return u&&u.strict===!1&&(r=Go),r(e)},"isGlob"),Pr=qu(Yt),jo=Yt,Uo=q.posix.dirname,Ko=bu.platform()==="win32",qt="/",Vo=/\\/g,zo=/[\{\[].*[\}\]]$/,Yo=/(^|[^\\])([\{\[]|\([^\)]+$)/,qo=/\\([\!\*\?\|\[\]\(\)\{\}])/g,Xo=a(function(e,u){var r=Object.assign({flipBackslashes:!0},u);r.flipBackslashes&&Ko&&e.indexOf(qt)<0&&(e=e.replace(Vo,qt)),zo.test(e)&&(e+=qt),e+="a";do e=Uo(e);while(jo(e)||Yo.test(e));return e.replace(qo,"$1")},"globParent"),tt={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,u)=>e.nodes.find(r=>r.type===u),t.exceedsLimit=(e,u,r=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(u)?!1:(Number(u)-Number(e))/Number(r)>=n,t.escapeNode=(e,u=0,r)=>{let n=e.nodes[u];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0),t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((u,r)=>(r.type==="text"&&u.push(r.value),r.type==="range"&&(r.type="text"),u),[]),t.flatten=(...e)=>{const u=[],r=a(n=>{for(let s=0;s<n.length;s++){let i=n[s];Array.isArray(i)?r(i):i!==void 0&&u.push(i)}return u},"flat");return r(e),u}})(tt);const Hr=tt;var Xt=a((t,e={})=>{let u=a((r,n={})=>{let s=e.escapeInvalid&&Hr.isInvalidBrace(n),i=r.invalid===!0&&e.escapeInvalid===!0,o="";if(r.value)return(s||i)&&Hr.isOpenOrClose(r)?"\\"+r.value:r.value;if(r.value)return r.value;if(r.nodes)for(let D of r.nodes)o+=u(D);return o},"stringify");return u(t)},"stringify$4");/*!
37
- * is-number <https://github.com/jonschlinkert/is-number>
38
- *
39
- * Copyright (c) 2014-present, Jon Schlinkert.
40
- * Released under the MIT License.
41
- */var Qo=a(function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1},"isNumber$2");/*!
42
- * to-regex-range <https://github.com/micromatch/to-regex-range>
43
- *
44
- * Copyright (c) 2015-present, Jon Schlinkert.
45
- * Released under the MIT License.
46
- */const Lr=Qo,le=a((t,e,u)=>{if(Lr(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Lr(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...u};typeof r.strictZeros=="boolean"&&(r.relaxZeros=r.strictZeros===!1);let n=String(r.relaxZeros),s=String(r.shorthand),i=String(r.capture),o=String(r.wrap),D=t+":"+e+"="+n+s+i+o;if(le.cache.hasOwnProperty(D))return le.cache[D].result;let l=Math.min(t,e),f=Math.max(t,e);if(Math.abs(l-f)===1){let m=t+"|"+e;return r.capture?`(${m})`:r.wrap===!1?m:`(?:${m})`}let h=jr(t)||jr(e),c={min:t,max:e,a:l,b:f},C=[],F=[];if(h&&(c.isPadded=h,c.maxLen=String(c.max).length),l<0){let m=f<0?Math.abs(f):1;F=Ir(m,Math.abs(l),c,r),l=c.a=0}return f>=0&&(C=Ir(l,f,c,r)),c.negatives=F,c.positives=C,c.result=Zo(F,C),r.capture===!0?c.result=`(${c.result})`:r.wrap!==!1&&C.length+F.length>1&&(c.result=`(?:${c.result})`),le.cache[D]=c,c.result},"toRegexRange$1");function Zo(t,e,u){let r=Qt(t,e,"-",!1)||[],n=Qt(e,t,"",!1)||[],s=Qt(t,e,"-?",!0)||[];return r.concat(s).concat(n).join("|")}a(Zo,"collatePatterns");function Jo(t,e){let u=1,r=1,n=Mr(t,u),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),u+=1,n=Mr(t,u);for(n=Wr(e+1,r)-1;t<n&&n<=e;)s.add(n),r+=1,n=Wr(e+1,r)-1;return s=[...s],s.sort(uD),s}a(Jo,"splitToRanges");function eD(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let r=tD(t,e),n=r.length,s="",i=0;for(let o=0;o<n;o++){let[D,l]=r[o];D===l?s+=D:D!=="0"||l!=="9"?s+=rD(D,l):i++}return i&&(s+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:n}}a(eD,"rangeToPattern");function Ir(t,e,u,r){let n=Jo(t,e),s=[],i=t,o;for(let D=0;D<n.length;D++){let l=n[D],f=eD(String(i),String(l),r),h="";if(!u.isPadded&&o&&o.pattern===f.pattern){o.count.length>1&&o.count.pop(),o.count.push(f.count[0]),o.string=o.pattern+Gr(o.count),i=l+1;continue}u.isPadded&&(h=nD(l,u,r)),f.string=h+f.pattern+Gr(f.count),s.push(f),i=l+1,o=f}return s}a(Ir,"splitToPatterns");function Qt(t,e,u,r,n){let s=[];for(let i of t){let{string:o}=i;!r&&!kr(e,"string",o)&&s.push(u+o),r&&kr(e,"string",o)&&s.push(u+o)}return s}a(Qt,"filterPatterns");function tD(t,e){let u=[];for(let r=0;r<t.length;r++)u.push([t[r],e[r]]);return u}a(tD,"zip");function uD(t,e){return t>e?1:e>t?-1:0}a(uD,"compare");function kr(t,e,u){return t.some(r=>r[e]===u)}a(kr,"contains");function Mr(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}a(Mr,"countNines");function Wr(t,e){return t-t%Math.pow(10,e)}a(Wr,"countZeros");function Gr(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}a(Gr,"toQuantifier");function rD(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}a(rD,"toCharacterClass");function jr(t){return/^-?(0+)\d/.test(t)}a(jr,"hasPadding");function nD(t,e,u){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).length),n=u.relaxZeros!==!1;switch(r){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${r}}`:`0{${r}}`}}a(nD,"padZeros"),le.cache={},le.clearCache=()=>le.cache={};var sD=le;/*!
47
- * fill-range <https://github.com/jonschlinkert/fill-range>
48
- *
49
- * Copyright (c) 2014-present, Jon Schlinkert.
50
- * Licensed under the MIT License.
51
- */const iD=_e,Ur=sD,Kr=a(t=>t!==null&&typeof t=="object"&&!Array.isArray(t),"isObject"),oD=a(t=>e=>t===!0?Number(e):String(e),"transform"),Zt=a(t=>typeof t=="number"||typeof t=="string"&&t!=="","isValidValue"),ve=a(t=>Number.isInteger(+t),"isNumber"),Jt=a(t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},"zeros"),DD=a((t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,"stringify$3"),aD=a((t,e,u)=>{if(e>0){let r=t[0]==="-"?"-":"";r&&(t=t.slice(1)),t=r+t.padStart(r?e-1:e,"0")}return u===!1?String(t):t},"pad"),Vr=a((t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},"toMaxLen"),lD=a((t,e)=>{t.negatives.sort((i,o)=>i<o?-1:i>o?1:0),t.positives.sort((i,o)=>i<o?-1:i>o?1:0);let u=e.capture?"":"?:",r="",n="",s;return t.positives.length&&(r=t.positives.join("|")),t.negatives.length&&(n=`-(${u}${t.negatives.join("|")})`),r&&n?s=`${r}|${n}`:s=r||n,e.wrap?`(${u}${s})`:s},"toSequence"),zr=a((t,e,u,r)=>{if(u)return Ur(t,e,{wrap:!1,...r});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},"toRange"),Yr=a((t,e,u)=>{if(Array.isArray(t)){let r=u.wrap===!0,n=u.capture?"":"?:";return r?`(${n}${t.join("|")})`:t.join("|")}return Ur(t,e,u)},"toRegex"),qr=a((...t)=>new RangeError("Invalid range arguments: "+iD.inspect(...t)),"rangeError"),Xr=a((t,e,u)=>{if(u.strictRanges===!0)throw qr([t,e]);return[]},"invalidRange"),cD=a((t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},"invalidStep"),fD=a((t,e,u=1,r={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(r.strictRanges===!0)throw qr([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let i=n>s,o=String(t),D=String(e),l=String(u);u=Math.max(Math.abs(u),1);let f=Jt(o)||Jt(D)||Jt(l),h=f?Math.max(o.length,D.length,l.length):0,c=f===!1&&DD(t,e,r)===!1,C=r.transform||oD(c);if(r.toRegex&&u===1)return zr(Vr(t,h),Vr(e,h),!0,r);let F={negatives:[],positives:[]},m=a(H=>F[H<0?"negatives":"positives"].push(Math.abs(H)),"push"),R=[],T=0;for(;i?n>=s:n<=s;)r.toRegex===!0&&u>1?m(n):R.push(aD(C(n,T),h,c)),n=i?n-u:n+u,T++;return r.toRegex===!0?u>1?lD(F,r):Yr(R,null,{wrap:!1,...r}):R},"fillNumbers"),hD=a((t,e,u=1,r={})=>{if(!ve(t)&&t.length>1||!ve(e)&&e.length>1)return Xr(t,e,r);let n=r.transform||(c=>String.fromCharCode(c)),s=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),o=s>i,D=Math.min(s,i),l=Math.max(s,i);if(r.toRegex&&u===1)return zr(D,l,!1,r);let f=[],h=0;for(;o?s>=i:s<=i;)f.push(n(s,h)),s=o?s-u:s+u,h++;return r.toRegex===!0?Yr(f,null,{wrap:!1,options:r}):f},"fillLetters"),ut=a((t,e,u,r={})=>{if(e==null&&Zt(t))return[t];if(!Zt(t)||!Zt(e))return Xr(t,e,r);if(typeof u=="function")return ut(t,e,1,{transform:u});if(Kr(u))return ut(t,e,0,u);let n={...r};return n.capture===!0&&(n.wrap=!0),u=u||n.step||1,ve(u)?ve(t)&&ve(e)?fD(t,e,u,n):hD(t,e,Math.max(Math.abs(u),1),n):u!=null&&!Kr(u)?cD(u,n):ut(t,e,1,u)},"fill$2");var Qr=ut;const dD=Qr,Zr=tt,ED=a((t,e={})=>{let u=a((r,n={})=>{let s=Zr.isInvalidBrace(n),i=r.invalid===!0&&e.escapeInvalid===!0,o=s===!0||i===!0,D=e.escapeInvalid===!0?"\\":"",l="";if(r.isOpen===!0||r.isClose===!0)return D+r.value;if(r.type==="open")return o?D+r.value:"(";if(r.type==="close")return o?D+r.value:")";if(r.type==="comma")return r.prev.type==="comma"?"":o?r.value:"|";if(r.value)return r.value;if(r.nodes&&r.ranges>0){let f=Zr.reduce(r.nodes),h=dD(...f,{...e,wrap:!1,toRegex:!0});if(h.length!==0)return f.length>1&&h.length>1?`(${h})`:h}if(r.nodes)for(let f of r.nodes)l+=u(f,r);return l},"walk");return u(t)},"compile$1");var pD=ED;const CD=Qr,Jr=Xt,Fe=tt,ce=a((t="",e="",u=!1)=>{let r=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?Fe.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)r.push(ce(s,e,u));else for(let s of e)u===!0&&typeof s=="string"&&(s=`{${s}}`),r.push(Array.isArray(s)?ce(n,s,u):n+s);return Fe.flatten(r)},"append"),FD=a((t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,r=a((n,s={})=>{n.queue=[];let i=s,o=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,o=i.queue;if(n.invalid||n.dollar){o.push(ce(o.pop(),Jr(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){o.push(ce(o.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let h=Fe.reduce(n.nodes);if(Fe.exceedsLimit(...h,e.step,u))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=CD(...h,e);c.length===0&&(c=Jr(n,e)),o.push(ce(o.pop(),c)),n.nodes=[];return}let D=Fe.encloseBrace(n),l=n.queue,f=n;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,l=f.queue;for(let h=0;h<n.nodes.length;h++){let c=n.nodes[h];if(c.type==="comma"&&n.type==="brace"){h===1&&l.push(""),l.push("");continue}if(c.type==="close"){o.push(ce(o.pop(),l,D));continue}if(c.value&&c.type!=="open"){l.push(ce(l.pop(),c.value));continue}c.nodes&&r(c,n)}return l},"walk");return Fe.flatten(r(t))},"expand$1");var gD=FD,mD={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
52
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const _D=Xt,{MAX_LENGTH:en,CHAR_BACKSLASH:eu,CHAR_BACKTICK:AD,CHAR_COMMA:yD,CHAR_DOT:wD,CHAR_LEFT_PARENTHESES:RD,CHAR_RIGHT_PARENTHESES:bD,CHAR_LEFT_CURLY_BRACE:vD,CHAR_RIGHT_CURLY_BRACE:SD,CHAR_LEFT_SQUARE_BRACKET:tn,CHAR_RIGHT_SQUARE_BRACKET:un,CHAR_DOUBLE_QUOTE:BD,CHAR_SINGLE_QUOTE:$D,CHAR_NO_BREAK_SPACE:TD,CHAR_ZERO_WIDTH_NOBREAK_SPACE:xD}=mD,OD=a((t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},r=typeof u.maxLength=="number"?Math.min(en,u.maxLength):en;if(t.length>r)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${r})`);let n={type:"root",input:t,nodes:[]},s=[n],i=n,o=n,D=0,l=t.length,f=0,h=0,c;const C=a(()=>t[f++],"advance"),F=a(m=>{if(m.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&m.type==="text"){o.value+=m.value;return}return i.nodes.push(m),m.parent=i,m.prev=o,o=m,m},"push");for(F({type:"bos"});f<l;)if(i=s[s.length-1],c=C(),!(c===xD||c===TD)){if(c===eu){F({type:"text",value:(e.keepEscaping?c:"")+C()});continue}if(c===un){F({type:"text",value:"\\"+c});continue}if(c===tn){D++;let m;for(;f<l&&(m=C());){if(c+=m,m===tn){D++;continue}if(m===eu){c+=C();continue}if(m===un&&(D--,D===0))break}F({type:"text",value:c});continue}if(c===RD){i=F({type:"paren",nodes:[]}),s.push(i),F({type:"text",value:c});continue}if(c===bD){if(i.type!=="paren"){F({type:"text",value:c});continue}i=s.pop(),F({type:"text",value:c}),i=s[s.length-1];continue}if(c===BD||c===$D||c===AD){let m=c,R;for(e.keepQuotes!==!0&&(c="");f<l&&(R=C());){if(R===eu){c+=R+C();continue}if(R===m){e.keepQuotes===!0&&(c+=R);break}c+=R}F({type:"text",value:c});continue}if(c===vD){h++;let R={type:"brace",open:!0,close:!1,dollar:o.value&&o.value.slice(-1)==="$"||i.dollar===!0,depth:h,commas:0,ranges:0,nodes:[]};i=F(R),s.push(i),F({type:"open",value:c});continue}if(c===SD){if(i.type!=="brace"){F({type:"text",value:c});continue}let m="close";i=s.pop(),i.close=!0,F({type:m,value:c}),h--,i=s[s.length-1];continue}if(c===yD&&h>0){if(i.ranges>0){i.ranges=0;let m=i.nodes.shift();i.nodes=[m,{type:"text",value:_D(i)}]}F({type:"comma",value:c}),i.commas++;continue}if(c===wD&&h>0&&i.commas===0){let m=i.nodes;if(h===0||m.length===0){F({type:"text",value:c});continue}if(o.type==="dot"){if(i.range=[],o.value+=c,o.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,o.type="text";continue}i.ranges++,i.args=[];continue}if(o.type==="range"){m.pop();let R=m[m.length-1];R.value+=o.value+c,o=R,i.ranges--;continue}F({type:"dot",value:c});continue}F({type:"text",value:c})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let m=s[s.length-1],R=m.nodes.indexOf(i);m.nodes.splice(R,1,...i.nodes)}while(s.length>0);return F({type:"eos"}),n},"parse$1");var ND=OD;const rn=Xt,PD=pD,HD=gD,LD=ND,Q=a((t,e={})=>{let u=[];if(Array.isArray(t))for(let r of t){let n=Q.create(r,e);Array.isArray(n)?u.push(...n):u.push(n)}else u=[].concat(Q.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u},"braces$1");Q.parse=(t,e={})=>LD(t,e),Q.stringify=(t,e={})=>rn(typeof t=="string"?Q.parse(t,e):t,e),Q.compile=(t,e={})=>(typeof t=="string"&&(t=Q.parse(t,e)),PD(t,e)),Q.expand=(t,e={})=>{typeof t=="string"&&(t=Q.parse(t,e));let u=HD(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Q.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Q.compile(t,e):Q.expand(t,e);var ID=Q,kD=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"],MD=kD;const WD=q,GD=MD,jD=new Set(GD);var UD=a(t=>jD.has(WD.extname(t).slice(1).toLowerCase()),"isBinaryPath$1"),rt={};(function(t){const{sep:e}=q,{platform:u}=process,r=bu;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1,t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=n=>n,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=r.type()==="OS400"})(rt);const ie=De,G=q,{promisify:Se}=_e,KD=UD,{isWindows:VD,isLinux:zD,EMPTY_FN:YD,EMPTY_STR:qD,KEY_LISTENERS:ge,KEY_ERR:tu,KEY_RAW:Be,HANDLER_KEYS:XD,EV_CHANGE:nt,EV_ADD:st,EV_ADD_DIR:QD,EV_ERROR:nn,STR_DATA:ZD,STR_END:JD,BRACE_START:ea,STAR:ta}=rt,ua="watch",ra=Se(ie.open),sn=Se(ie.stat),na=Se(ie.lstat),sa=Se(ie.close),uu=Se(ie.realpath),ia={lstat:na,stat:sn},ru=a((t,e)=>{t instanceof Set?t.forEach(e):e(t)},"foreach"),$e=a((t,e,u)=>{let r=t[e];r instanceof Set||(t[e]=r=new Set([r])),r.add(u)},"addAndConvert"),oa=a(t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},"clearItem"),Te=a((t,e,u)=>{const r=t[e];r instanceof Set?r.delete(u):r===u&&delete t[e]},"delFromSet"),on=a(t=>t instanceof Set?t.size===0:!t,"isEmptySet"),it=new Map;function Dn(t,e,u,r,n){const s=a((i,o)=>{u(t),n(i,o,{watchedPath:t}),o&&t!==o&&ot(G.resolve(t,o),ge,G.join(t,o))},"handleEvent");try{return ie.watch(t,e,s)}catch(i){r(i)}}a(Dn,"createFsWatchInstance");const ot=a((t,e,u,r,n)=>{const s=it.get(t);s&&ru(s[e],i=>{i(u,r,n)})},"fsWatchBroadcast"),Da=a((t,e,u,r)=>{const{listener:n,errHandler:s,rawEmitter:i}=r;let o=it.get(e),D;if(!u.persistent)return D=Dn(t,u,n,s,i),D.close.bind(D);if(o)$e(o,ge,n),$e(o,tu,s),$e(o,Be,i);else{if(D=Dn(t,u,ot.bind(null,e,ge),s,ot.bind(null,e,Be)),!D)return;D.on(nn,async l=>{const f=ot.bind(null,e,tu);if(o.watcherUnusable=!0,VD&&l.code==="EPERM")try{const h=await ra(t,"r");await sa(h),f(l)}catch{}else f(l)}),o={listeners:n,errHandlers:s,rawEmitters:i,watcher:D},it.set(e,o)}return()=>{Te(o,ge,n),Te(o,tu,s),Te(o,Be,i),on(o.listeners)&&(o.watcher.close(),it.delete(e),XD.forEach(oa(o)),o.watcher=void 0,Object.freeze(o))}},"setFsWatchListener"),nu=new Map,aa=a((t,e,u,r)=>{const{listener:n,rawEmitter:s}=r;let i=nu.get(e);const o=i&&i.options;return o&&(o.persistent<u.persistent||o.interval>u.interval)&&(i.listeners,i.rawEmitters,ie.unwatchFile(e),i=void 0),i?($e(i,ge,n),$e(i,Be,s)):(i={listeners:n,rawEmitters:s,options:u,watcher:ie.watchFile(e,u,(D,l)=>{ru(i.rawEmitters,h=>{h(nt,e,{curr:D,prev:l})});const f=D.mtimeMs;(D.size!==l.size||f>l.mtimeMs||f===0)&&ru(i.listeners,h=>h(t,D))})},nu.set(e,i)),()=>{Te(i,ge,n),Te(i,Be,s),on(i.listeners)&&(nu.delete(e),ie.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}},"setFsWatchFileListener");let la=class{static{a(this,"NodeFsHandler")}constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const r=this.fsw.options,n=G.dirname(e),s=G.basename(e);this.fsw._getWatchedDir(n).add(s);const o=G.resolve(e),D={persistent:r.persistent};u||(u=YD);let l;return r.usePolling?(D.interval=r.enableBinaryInterval&&KD(s)?r.binaryInterval:r.interval,l=aa(e,o,D,{listener:u,rawEmitter:this.fsw._emitRaw})):l=Da(e,o,D,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),l}_handleFile(e,u,r){if(this.fsw.closed)return;const n=G.dirname(e),s=G.basename(e),i=this.fsw._getWatchedDir(n);let o=u;if(i.has(s))return;const D=a(async(f,h)=>{if(this.fsw._throttle(ua,e,5)){if(!h||h.mtimeMs===0)try{const c=await sn(e);if(this.fsw.closed)return;const C=c.atimeMs,F=c.mtimeMs;(!C||C<=F||F!==o.mtimeMs)&&this.fsw._emit(nt,e,c),zD&&o.ino!==c.ino?(this.fsw._closeFile(f),o=c,this.fsw._addPathCloser(f,this._watchWithNodeFs(e,D))):o=c}catch{this.fsw._remove(n,s)}else if(i.has(s)){const c=h.atimeMs,C=h.mtimeMs;(!c||c<=C||C!==o.mtimeMs)&&this.fsw._emit(nt,e,h),o=h}}},"listener"),l=this._watchWithNodeFs(e,D);if(!(r&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(st,e,0))return;this.fsw._emit(st,e,u)}return l}async _handleSymlink(e,u,r,n){if(this.fsw.closed)return;const s=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let o;try{o=await uu(r)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(n)?this.fsw._symlinkPaths.get(s)!==o&&(this.fsw._symlinkPaths.set(s,o),this.fsw._emit(nt,r,e.stats)):(i.add(n),this.fsw._symlinkPaths.set(s,o),this.fsw._emit(st,r,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,u,r,n,s,i,o){if(e=G.join(e,qD),!r.hasGlob&&(o=this.fsw._throttle("readdir",e,1e3),!o))return;const D=this.fsw._getWatchedDir(r.path),l=new Set;let f=this.fsw._readdirp(e,{fileFilter:a(h=>r.filterPath(h),"fileFilter"),directoryFilter:a(h=>r.filterDir(h),"directoryFilter"),depth:0}).on(ZD,async h=>{if(this.fsw.closed){f=void 0;return}const c=h.path;let C=G.join(e,c);if(l.add(c),!(h.stats.isSymbolicLink()&&await this._handleSymlink(h,e,C,c))){if(this.fsw.closed){f=void 0;return}(c===n||!n&&!D.has(c))&&(this.fsw._incrReadyCount(),C=G.join(s,G.relative(s,C)),this._addToNodeFs(C,u,r,i+1))}}).on(nn,this._boundHandleError);return new Promise(h=>f.once(JD,()=>{if(this.fsw.closed){f=void 0;return}const c=o?o.clear():!1;h(),D.getChildren().filter(C=>C!==e&&!l.has(C)&&(!r.hasGlob||r.filterPath({fullPath:G.resolve(e,C)}))).forEach(C=>{this.fsw._remove(e,C)}),f=void 0,c&&this._handleRead(e,!1,r,n,s,i,o)}))}async _handleDir(e,u,r,n,s,i,o){const D=this.fsw._getWatchedDir(G.dirname(e)),l=D.has(G.basename(e));!(r&&this.fsw.options.ignoreInitial)&&!s&&!l&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(QD,e,u),D.add(G.basename(e)),this.fsw._getWatchedDir(e);let f,h;const c=this.fsw.options.depth;if((c==null||n<=c)&&!this.fsw._symlinkPaths.has(o)){if(!s&&(await this._handleRead(e,r,i,s,e,n,f),this.fsw.closed))return;h=this._watchWithNodeFs(e,(C,F)=>{F&&F.mtimeMs===0||this._handleRead(C,!1,i,s,e,n,f)})}return h}async _addToNodeFs(e,u,r,n,s){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const o=this.fsw._getWatchHelpers(e,n);!o.hasGlob&&r&&(o.hasGlob=r.hasGlob,o.globFilter=r.globFilter,o.filterPath=D=>r.filterPath(D),o.filterDir=D=>r.filterDir(D));try{const D=await ia[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,D))return i(),!1;const l=this.fsw.options.followSymlinks&&!e.includes(ta)&&!e.includes(ea);let f;if(D.isDirectory()){const h=G.resolve(e),c=l?await uu(e):e;if(this.fsw.closed||(f=await this._handleDir(o.watchPath,D,u,n,s,o,c),this.fsw.closed))return;h!==c&&c!==void 0&&this.fsw._symlinkPaths.set(h,c)}else if(D.isSymbolicLink()){const h=l?await uu(e):e;if(this.fsw.closed)return;const c=G.dirname(o.watchPath);if(this.fsw._getWatchedDir(c).add(o.watchPath),this.fsw._emit(st,o.watchPath,D),f=await this._handleDir(c,D,u,n,e,o,h),this.fsw.closed)return;h!==void 0&&this.fsw._symlinkPaths.set(G.resolve(e),h)}else f=this._handleFile(o.watchPath,D,u);return i(),this.fsw._addPathCloser(e,f),!1}catch(D){if(this.fsw._handleError(D))return i(),e}}};var ca=la,su={exports:{}};const iu=De,j=q,{promisify:ou}=_e;let me;try{me=he.require("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(me){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(me=void 0)}}const{EV_ADD:Du,EV_CHANGE:fa,EV_ADD_DIR:an,EV_UNLINK:Dt,EV_ERROR:ha,STR_DATA:da,STR_END:Ea,FSEVENT_CREATED:pa,FSEVENT_MODIFIED:Ca,FSEVENT_DELETED:Fa,FSEVENT_MOVED:ga,FSEVENT_UNKNOWN:ma,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:_a,FSEVENT_TYPE_FILE:Aa,FSEVENT_TYPE_DIRECTORY:xe,FSEVENT_TYPE_SYMLINK:ln,ROOT_GLOBSTAR:cn,DIR_SUFFIX:ya,DOT_SLASH:fn,FUNCTION_TYPE:au,EMPTY_FN:wa,IDENTITY_FN:Ra}=rt,ba=a(t=>isNaN(t)?{}:{depth:t},"Depth"),lu=ou(iu.stat),va=ou(iu.lstat),hn=ou(iu.realpath),Sa={stat:lu,lstat:va},fe=new Map,Ba=10,$a=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Ta=a((t,e)=>({stop:me.watch(t,e)}),"createFSEventsInstance");function xa(t,e,u,r){let n=j.extname(e)?j.dirname(e):e;const s=j.dirname(n);let i=fe.get(n);Oa(s)&&(n=s);const o=j.resolve(t),D=o!==e,l=a((h,c,C)=>{D&&(h=h.replace(e,o)),(h===o||!h.indexOf(o+j.sep))&&u(h,c,C)},"filteredListener");let f=!1;for(const h of fe.keys())if(e.indexOf(j.resolve(h)+j.sep)===0){n=h,i=fe.get(n),f=!0;break}return i||f?i.listeners.add(l):(i={listeners:new Set([l]),rawEmitter:r,watcher:Ta(n,(h,c)=>{if(!i.listeners.size||c&_a)return;const C=me.getInfo(h,c);i.listeners.forEach(F=>{F(h,c,C)}),i.rawEmitter(C.event,h,C)})},fe.set(n,i)),()=>{const h=i.listeners;if(h.delete(l),!h.size&&(fe.delete(n),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}a(xa,"setFSEventsListener");const Oa=a(t=>{let e=0;for(const u of fe.keys())if(u.indexOf(t)===0&&(e++,e>=Ba))return!0;return!1},"couldConsolidate"),Na=a(()=>me&&fe.size<128,"canUse"),cu=a((t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=j.dirname(t))!==e;)u++;return u},"calcDepth"),dn=a((t,e)=>t.type===xe&&e.isDirectory()||t.type===ln&&e.isSymbolicLink()||t.type===Aa&&e.isFile(),"sameTypes");let Pa=class{static{a(this,"FsEventsHandler")}constructor(e){this.fsw=e}checkIgnored(e,u){const r=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return r.add(e),u&&u.isDirectory()&&r.add(e+cn),!0;r.delete(e),r.delete(e+cn)}addOrChange(e,u,r,n,s,i,o,D){const l=s.has(i)?fa:Du;this.handleEvent(l,e,u,r,n,s,i,o,D)}async checkExists(e,u,r,n,s,i,o,D){try{const l=await lu(e);if(this.fsw.closed)return;dn(o,l)?this.addOrChange(e,u,r,n,s,i,o,D):this.handleEvent(Dt,e,u,r,n,s,i,o,D)}catch(l){l.code==="EACCES"?this.addOrChange(e,u,r,n,s,i,o,D):this.handleEvent(Dt,e,u,r,n,s,i,o,D)}}handleEvent(e,u,r,n,s,i,o,D,l){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===Dt){const f=D.type===xe;(f||i.has(o))&&this.fsw._remove(s,o,f)}else{if(e===Du){if(D.type===xe&&this.fsw._getWatchedDir(u),D.type===ln&&l.followSymlinks){const h=l.depth===void 0?void 0:cu(r,n)+1;return this._addToFsEvents(u,!1,!0,h)}this.fsw._getWatchedDir(s).add(o)}const f=D.type===xe?e+ya:e;this.fsw._emit(f,u),f===an&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,r,n){if(this.fsw.closed||this.fsw._isIgnored(e))return;const s=this.fsw.options,o=xa(e,u,a(async(D,l,f)=>{if(this.fsw.closed||s.depth!==void 0&&cu(D,u)>s.depth)return;const h=r(j.join(e,j.relative(e,D)));if(n&&!n(h))return;const c=j.dirname(h),C=j.basename(h),F=this.fsw._getWatchedDir(f.type===xe?h:c);if($a.has(l)||f.event===ma)if(typeof s.ignored===au){let m;try{m=await lu(h)}catch{}if(this.fsw.closed||this.checkIgnored(h,m))return;dn(f,m)?this.addOrChange(h,D,u,c,F,C,f,s):this.handleEvent(Dt,h,D,u,c,F,C,f,s)}else this.checkExists(h,D,u,c,F,C,f,s);else switch(f.event){case pa:case Ca:return this.addOrChange(h,D,u,c,F,C,f,s);case Fa:case ga:return this.checkExists(h,D,u,c,F,C,f,s)}},"watchCallback"),this.fsw._emitRaw);return this.fsw._emitReady(),o}async _handleFsEventsSymlink(e,u,r,n){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const s=await hn(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(s))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(s||e,i=>{let o=e;return s&&s!==fn?o=i.replace(s,e):i!==fn&&(o=j.join(e,i)),r(o)},!1,n)}catch(s){if(this.fsw._handleError(s))return this.fsw._emitReady()}}}emitAdd(e,u,r,n,s){const i=r(e),o=u.isDirectory(),D=this.fsw._getWatchedDir(j.dirname(i)),l=j.basename(i);o&&this.fsw._getWatchedDir(i),!D.has(l)&&(D.add(l),(!n.ignoreInitial||s===!0)&&this.fsw._emit(o?an:Du,i,u))}initWatch(e,u,r,n){if(this.fsw.closed)return;const s=this._watchWithFsEvents(r.watchPath,j.resolve(e||r.watchPath),n,r.globFilter);this.fsw._addPathCloser(u,s)}async _addToFsEvents(e,u,r,n){if(this.fsw.closed)return;const s=this.fsw.options,i=typeof u===au?u:Ra,o=this.fsw._getWatchHelpers(e);try{const D=await Sa[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,D))throw null;if(D.isDirectory()){if(o.globFilter||this.emitAdd(i(e),D,i,s,r),n&&n>s.depth)return;this.fsw._readdirp(o.watchPath,{fileFilter:a(l=>o.filterPath(l),"fileFilter"),directoryFilter:a(l=>o.filterDir(l),"directoryFilter"),...ba(s.depth-(n||0))}).on(da,l=>{if(this.fsw.closed||l.stats.isDirectory()&&!o.filterPath(l))return;const f=j.join(o.watchPath,l.path),{fullPath:h}=l;if(o.followSymlinks&&l.stats.isSymbolicLink()){const c=s.depth===void 0?void 0:cu(f,j.resolve(o.watchPath))+1;this._handleFsEventsSymlink(f,h,i,c)}else this.emitAdd(f,l.stats,i,s,r)}).on(ha,wa).on(Ea,()=>{this.fsw._emitReady()})}else this.emitAdd(o.watchPath,D,i,s,r),this.fsw._emitReady()}catch(D){(!D||this.fsw._handleError(D))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(s.persistent&&r!==!0)if(typeof u===au)this.initWatch(void 0,e,o,i);else{let D;try{D=await hn(o.watchPath)}catch{}this.initWatch(D,e,o,i)}}};su.exports=Pa,su.exports.canUse=Na;var Ha=su.exports;const{EventEmitter:La}=Wn,fu=De,x=q,{promisify:En}=_e,Ia=xo,hu=Io.default,ka=Xo,du=Yt,Ma=ID,Wa=$r,Ga=ca,pn=Ha,{EV_ALL:Eu,EV_READY:ja,EV_ADD:at,EV_CHANGE:Oe,EV_UNLINK:Cn,EV_ADD_DIR:Ua,EV_UNLINK_DIR:Ka,EV_RAW:Va,EV_ERROR:pu,STR_CLOSE:za,STR_END:Ya,BACK_SLASH_RE:qa,DOUBLE_SLASH_RE:Fn,SLASH_OR_BACK_SLASH_RE:Xa,DOT_RE:Qa,REPLACER_RE:Za,SLASH:Cu,SLASH_SLASH:Ja,BRACE_START:el,BANG:Fu,ONE_DOT:gn,TWO_DOTS:tl,GLOBSTAR:ul,SLASH_GLOBSTAR:gu,ANYMATCH_OPTS:mu,STRING_TYPE:_u,FUNCTION_TYPE:rl,EMPTY_STR:Au,EMPTY_FN:nl,isWindows:sl,isMacos:il,isIBMi:ol}=rt,Dl=En(fu.stat),al=En(fu.readdir),yu=a((t=[])=>Array.isArray(t)?t:[t],"arrify"),mn=a((t,e=[])=>(t.forEach(u=>{Array.isArray(u)?mn(u,e):e.push(u)}),e),"flatten"),_n=a(t=>{const e=mn(yu(t));if(!e.every(u=>typeof u===_u))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(yn)},"unifyPaths"),An=a(t=>{let e=t.replace(qa,Cu),u=!1;for(e.startsWith(Ja)&&(u=!0);e.match(Fn);)e=e.replace(Fn,Cu);return u&&(e=Cu+e),e},"toUnix"),yn=a(t=>An(x.normalize(An(t))),"normalizePathToUnix"),wn=a((t=Au)=>e=>typeof e!==_u?e:yn(x.isAbsolute(e)?e:x.join(t,e)),"normalizeIgnored"),ll=a((t,e)=>x.isAbsolute(t)?t:t.startsWith(Fu)?Fu+x.join(e,t.slice(1)):x.join(e,t),"getAbsolutePath"),J=a((t,e)=>t[e]===void 0,"undef");class cl{static{a(this,"DirEntry")}constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;u&&e!==gn&&e!==tl&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const r=this.path;try{await al(r)}catch{this._removeWatcher&&this._removeWatcher(x.dirname(r),x.basename(r))}}has(e){const{items:u}=this;if(u)return u.has(e)}getChildren(){const{items:e}=this;if(e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const fl="stat",hl="lstat";class dl{static{a(this,"WatchHelper")}constructor(e,u,r,n){this.fsw=n,this.path=e=e.replace(Za,Au),this.watchPath=u,this.fullWatchPath=x.resolve(u),this.hasGlob=u!==e,e===Au&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&r?void 0:!1,this.globFilter=this.hasGlob?hu(e,void 0,mu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=r,this.statMethod=r?fl:hl}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return x.join(this.watchPath,x.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const r=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===rl?this.globFilter(r):!0)&&this.fsw._isntIgnored(r,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(el)?Ma.expand(e):[e]).forEach(n=>{u.push(x.relative(this.watchPath,n).split(Xa))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let r=!1;this.unmatchedGlob=!this.dirParts.some(n=>n.every((s,i)=>(s===ul&&(r=!0),r||!u[0][i]||hu(s,u[0][i],mu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class El extends La{static{a(this,"FSWatcher")}constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,J(u,"persistent")&&(u.persistent=!0),J(u,"ignoreInitial")&&(u.ignoreInitial=!1),J(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),J(u,"interval")&&(u.interval=100),J(u,"binaryInterval")&&(u.binaryInterval=300),J(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,J(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),pn.canUse()||(u.useFsEvents=!1),J(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=il),ol&&(u.usePolling=!0);const n=process.env.CHOKIDAR_USEPOLLING;if(n!==void 0){const D=n.toLowerCase();D==="false"||D==="0"?u.usePolling=!1:D==="true"||D==="1"?u.usePolling=!0:u.usePolling=!!D}const s=process.env.CHOKIDAR_INTERVAL;s&&(u.interval=Number.parseInt(s,10)),J(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),J(u,"followSymlinks")&&(u.followSymlinks=!0),J(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=yu(u.ignored));let o=0;this._emitReady=()=>{o++,o>=this._readyCount&&(this._emitReady=nl,this._readyEmitted=!0,process.nextTick(()=>this.emit(ja)))},this._emitRaw=(...D)=>this.emit(Va,...D),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new pn(this):this._nodeFsHandler=new Ga(this),Object.freeze(u)}add(e,u,r){const{cwd:n,disableGlobbing:s}=this.options;this.closed=!1;let i=_n(e);return n&&(i=i.map(o=>{const D=ll(o,n);return s||!du(o)?D:Wa(D)})),i=i.filter(o=>o.startsWith(Fu)?(this._ignoredPaths.add(o.slice(1)),!1):(this._ignoredPaths.delete(o),this._ignoredPaths.delete(o+gu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount+=i.length),i.forEach(o=>this._fsEventsHandler._addToFsEvents(o))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async o=>{const D=await this._nodeFsHandler._addToNodeFs(o,!r,0,0,u);return D&&this._emitReady(),D})).then(o=>{this.closed||o.filter(D=>D).forEach(D=>{this.add(x.dirname(D),x.basename(u||D))})})),this}unwatch(e){if(this.closed)return this;const u=_n(e),{cwd:r}=this.options;return u.forEach(n=>{!x.isAbsolute(n)&&!this._closers.has(n)&&(r&&(n=x.join(r,n)),n=x.resolve(n)),this._closePath(n),this._ignoredPaths.add(n),this._watched.has(n)&&this._ignoredPaths.add(n+gu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(r=>{const n=r();n instanceof Promise&&e.push(n)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,r)=>{const n=this.options.cwd?x.relative(this.options.cwd,r):r;e[n||gn]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==pu&&this.emit(Eu,...u)}async _emit(e,u,r,n,s){if(this.closed)return;const i=this.options;sl&&(u=x.normalize(u)),i.cwd&&(u=x.relative(i.cwd,u));const o=[e,u];s!==void 0?o.push(r,n,s):n!==void 0?o.push(r,n):r!==void 0&&o.push(r);const D=i.awaitWriteFinish;let l;if(D&&(l=this._pendingWrites.get(u)))return l.lastChange=new Date,this;if(i.atomic){if(e===Cn)return this._pendingUnlinks.set(u,o),setTimeout(()=>{this._pendingUnlinks.forEach((f,h)=>{this.emit(...f),this.emit(Eu,...f),this._pendingUnlinks.delete(h)})},typeof i.atomic=="number"?i.atomic:100),this;e===at&&this._pendingUnlinks.has(u)&&(e=o[0]=Oe,this._pendingUnlinks.delete(u))}if(D&&(e===at||e===Oe)&&this._readyEmitted){const f=a((h,c)=>{h?(e=o[0]=pu,o[1]=h,this.emitWithAll(e,o)):c&&(o.length>2?o[2]=c:o.push(c),this.emitWithAll(e,o))},"awfEmit");return this._awaitWriteFinish(u,D.stabilityThreshold,e,f),this}if(e===Oe&&!this._throttle(Oe,u,50))return this;if(i.alwaysStat&&r===void 0&&(e===at||e===Ua||e===Oe)){const f=i.cwd?x.join(i.cwd,u):u;let h;try{h=await Dl(f)}catch{}if(!h||this.closed)return;o.push(h)}return this.emitWithAll(e,o),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(pu,e),e||this.closed}_throttle(e,u,r){this._throttled.has(e)||this._throttled.set(e,new Map);const n=this._throttled.get(e),s=n.get(u);if(s)return s.count++,!1;let i;const o=a(()=>{const l=n.get(u),f=l?l.count:0;return n.delete(u),clearTimeout(i),l&&clearTimeout(l.timeoutObject),f},"clear");i=setTimeout(o,r);const D={timeoutObject:i,clear:o,count:0};return n.set(u,D),D}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,r,n){let s,i=e;this.options.cwd&&!x.isAbsolute(e)&&(i=x.join(this.options.cwd,e));const o=new Date,D=a(l=>{fu.stat(i,(f,h)=>{if(f||!this._pendingWrites.has(e)){f&&f.code!=="ENOENT"&&n(f);return}const c=Number(new Date);l&&h.size!==l.size&&(this._pendingWrites.get(e).lastChange=c);const C=this._pendingWrites.get(e);c-C.lastChange>=u?(this._pendingWrites.delete(e),n(void 0,h)):s=setTimeout(D,this.options.awaitWriteFinish.pollInterval,h)})},"awaitWriteFinish");this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:o,cancelWait:a(()=>(this._pendingWrites.delete(e),clearTimeout(s),r),"cancelWait")}),s=setTimeout(D,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Qa.test(e))return!0;if(!this._userIgnored){const{cwd:r}=this.options,n=this.options.ignored,s=n&&n.map(wn(r)),i=yu(s).filter(D=>typeof D===_u&&!du(D)).map(D=>D+gu),o=this._getGlobIgnored().map(wn(r)).concat(s,i);this._userIgnored=hu(o,void 0,mu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const r=u||this.options.disableGlobbing||!du(e)?e:ka(e),n=this.options.followSymlinks;return new dl(e,r,n,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=x.resolve(e);return this._watched.has(u)||this._watched.set(u,new cl(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const r=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(r.toString(8)[0],10))}_remove(e,u,r){const n=x.join(e,u),s=x.resolve(n);if(r=r??(this._watched.has(n)||this._watched.has(s)),!this._throttle("remove",n,100))return;!r&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(n).getChildren().forEach(c=>this._remove(n,c));const D=this._getWatchedDir(e),l=D.has(u);D.remove(u),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let f=n;if(this.options.cwd&&(f=x.relative(this.options.cwd,n)),this.options.awaitWriteFinish&&this._pendingWrites.has(f)&&this._pendingWrites.get(f).cancelWait()===at)return;this._watched.delete(n),this._watched.delete(s);const h=r?Ka:Cn;l&&!this._isIgnored(n)&&this._emit(h,n),this.options.useFsEvents||this._closePath(n)}_closePath(e){this._closeFile(e);const u=x.dirname(e);this._getWatchedDir(u).remove(x.basename(e))}_closeFile(e){const u=this._closers.get(e);u&&(u.forEach(r=>r()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let r=this._closers.get(e);r||(r=[],this._closers.set(e,r)),r.push(u)}_readdirp(e,u){if(this.closed)return;const r={type:Eu,alwaysStat:!0,lstat:!0,...u};let n=Ia(e,r);return this._streams.add(n),n.once(za,()=>{n=void 0}),n.once(Ya,()=>{n&&(this._streams.delete(n),n=void 0)}),n}}var wu=El;const lt=a((t=!0)=>{let e=!1;return u=>{if(e||u==="unknown-flag")return!0;if(u==="argument")return e=!0,t}},"ignoreAfterArgument"),Rn=a((t,e=process.argv.slice(2))=>(Su(t,e,{ignore:lt()}),e),"removeArgvFlags"),pl=a(t=>{let e=Buffer.alloc(0);return u=>{for(e=Buffer.concat([e,u]);e.length>4;){const r=e.readInt32BE(0);if(e.length>=4+r){const n=e.slice(4,4+r);t(n),e=e.slice(4+r)}else break}}},"bufferData"),bn=a(async()=>{const t=jn.createServer(u=>{u.on("data",pl(r=>{const n=JSON.parse(r.toString());t.emit("data",n)}))}),e=he.getPipePath(process.pid);return await We.promises.mkdir(Un.tmpdir,{recursive:!0}),await We.promises.rm(e,{force:!0}),await new Promise((u,r)=>{t.listen(e,u),t.on("error",r)}),t.unref(),process.on("exit",()=>{if(t.close(),!he.isWindows)try{We.rmSync(e)}catch{}}),t},"createIpcServer"),Cl=a(()=>new Date().toLocaleTimeString(),"currentTime"),Ne=a((...t)=>console.log(ne.gray(Cl()),ne.lightCyan("[tsx]"),...t),"log"),Fl="\x1Bc",gl=a((t,e)=>{let u;return function(){u&&clearTimeout(u),u=setTimeout(()=>Reflect.apply(t,this,arguments),e)}},"debounce"),vn={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0},ignore:{type:[String],description:"Paths & globs to exclude from being watched (Deprecated: use --exclude)"},include:{type:[String],description:"Additional paths & globs to watch"},exclude:{type:[String],description:"Paths & globs to exclude from being watched"}},ml=Di({name:"watch",parameters:["<script path>"],flags:vn,help:{description:"Run the script and watch for changes"},ignoreArgv:lt(!1)},async t=>{const e=Rn(vn,process.argv.slice(3)),u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,include:t.flags.include,exclude:[...t.flags.ignore,...t.flags.exclude],ipc:!0};let r,n=!1;const s=process.cwd(),i=new Map,o=a((g,w)=>{const d=Me.resolve(w),b=i.get(d);if(g==="add"||g==="addDir"||g==="unlink"||g==="unlinkDir")b&&(clearTimeout(b.expiration),i.delete(d));else if(b)return`${g}:${b.path}`;let v;try{v=We.realpathSync.native(d)}catch{v=d}const W={path:v,expiration:setTimeout(()=>{i.get(d)===W&&i.delete(d)},1e3)};return W.expiration.unref(),i.set(d,W),`${g}:${v}`},"getEventKey"),D=t._.map(g=>Me.resolve(g));let l,f,h=!1;const c=new Map,C=a(g=>{const w=Me.resolve(g);return process.platform==="win32"?w.toLowerCase():w},"getPathKey"),F=new Set;for(const g of u.include)if(g.startsWith("!")){const w=g.slice(1);Pr(w)||F.add(C(w))}else Pr(g)||F.delete(C(g));(await bn()).on("data",g=>{if(g&&typeof g=="object"&&"type"in g&&g.type==="dependency"&&"path"in g&&typeof g.path=="string"){const w=g.path.startsWith("file:")?Ru.fileURLToPath(g.path):g.path;Me.isAbsolute(w)&&(F.has(C(w))?(f||(f=new wu({...I,disableGlobbing:!0}),f.on("all",(d,b)=>{Z("literal",d,b)})),f.add(w)):l.add(w))}});const R=a(()=>{if(!n)return cr(e,u)},"spawnProcess");let T=!1;const H=a(async(g,w="SIGTERM",d=5e3)=>{let b=!1;const v=new Promise(W=>{g.on("exit",E=>{b=!0,T=!1,W(E)})});return T=!0,g.kill(w),setTimeout(()=>{b||(Ne(ne.yellow(`Process didn't exit in ${Math.floor(d/1e3)}s. Force killing...`)),g.kill("SIGKILL"))},d),await v},"killProcess"),O=gl(async(g,w)=>{const d=g?`${g?ne.lightMagenta(g):""}${w?` in ${ne.lightGreen(`./${w}`)}`:""}`:"";if(T){Ne(d,ne.yellow("Process hasn't exited. Killing process...")),r.kill("SIGKILL");return}r&&(r.exitCode===null?(Ne(d,ne.yellow("Restarting...")),await H(r)):Ne(d,ne.yellow("Rerunning...")),u.clearScreen&&process.stdout.isTTY&&process.stdout.write(Fl)),r=R()},100),z=a(g=>{n=!0,r?.exitCode===null?(T&&Ne(ne.yellow("Previous process hasn't exited yet. Force killing...")),H(r,T?"SIGKILL":g).then(w=>{process.exit(w??0)},()=>{})):process.exit(128+dt.constants.signals[g])},"relaySignal");process.on("SIGINT",z),process.on("SIGTERM",z);const I={cwd:s,ignoreInitial:!0,ignored:["**/.*/**","**/.*","**/{node_modules,bower_components,vendor}/**",...u.exclude],ignorePermissionErrors:!0},Z=a((g,w,d)=>{if(!h)return;const b=o(w,d),v=c.get(b);if(v&&v.source!==g){clearTimeout(v.expiration),c.delete(b);return}v&&clearTimeout(v.expiration);const W={source:g,expiration:setTimeout(()=>{c.get(b)===W&&c.delete(b)},1e3)};W.expiration.unref(),c.set(b,W),O(w,d)},"handleWatchEvent");l=new wu({...I,disableGlobbing:!0}),l.on("all",(g,w)=>{Z("literal",g,w)});const M=a(g=>new Promise(w=>{g.once("ready",w)}),"waitForReady"),y=[M(l)];if(l.add(D),u.include.some(g=>!g.startsWith("!"))){const g=new wu(I);g.on("all",(w,d)=>{Z("include",w,d)}),y.push(M(g)),g.add(u.include)}await Promise.all(y),l.add(u.include.filter(g=>g.startsWith("!"))),h=!0,r=R(),process.stdin.on("data",()=>O("Return key"))}),_l=a((t,e)=>{let u;e.on("data",s=>{s&&s.type==="signal"&&u&&u(s.signal)});const r=a(()=>{const s=new Promise(i=>{setTimeout(()=>i(void 0),30),u=i});return s.then(()=>{u=void 0},()=>{}),s},"waitForSignalFromChild"),n=a(async s=>{await r()!==s&&(t.kill(s),await r()!==s&&(t.on("exit",()=>{const D=dt.constants.signals[s];process.exit(128+D)}),t.kill("SIGKILL")))},"relaySignalToChild");process.on("SIGINT",n),process.on("SIGTERM",n)},"relaySignals"),Sn={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}};Yu({name:"tsx",parameters:["[script path]"],commands:[ml],flags:{...Sn,version:{type:Boolean,alias:"v",description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}},help:!1,ignoreArgv:lt()},async t=>{t.flags.version?process.stdout.write(`tsx v${kn.version}
53
- node `):t.flags.help&&(t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"}),console.log(`${"-".repeat(45)}
54
- `));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:r}=Yu({flags:{...e,inputType:String,test:Boolean},help:!1,ignoreArgv:lt(!1)}),n=Rn({...Sn,...e}),i=["print","eval"].find(l=>!!r[l]);if(i){const{inputType:l}=r,f=r[i],{transformSync:h}=await import("esbuild"),c=h(f,{loader:"default",sourcefile:"/eval.ts",format:l==="module"?"esm":"cjs"});n.unshift(`--${i}`,c.code)}ke.isFeatureSupported(ke.testRunnerGlob)&&r.test&&u.length===0&&n.push("**/{test,test/**/*,test-*,*[.-_]test}.?(c|m)@(t|j)s"),r.test&&n.unshift("--enable-source-maps");const o=await bn(),D=cr(n,{noCache:!!t.flags.noCache,tsconfigPath:t.flags.tsconfig});_l(D,o),process.send&&D.on("message",l=>{process.send(l)}),D.send&&process.on("message",l=>{D.send(l)}),D.on("close",l=>{l===null&&(l=dt.constants.signals[D.signalCode]+128),process.exit(l)})});
@@ -1 +0,0 @@
1
- "use strict";var u=Object.defineProperty;var t=(e,n)=>u(e,"name",{value:n,configurable:!0});var g=require("node:net"),p=require("./get-pipe-path-D4YM6rQt.cjs");let r=[];const P=t(()=>new Promise(e=>{const n=p.getPipePath(process.ppid),o=g.createConnection(n,()=>{e(t(a=>{const c=Buffer.from(JSON.stringify(a)),i=Buffer.alloc(4);i.writeInt32BE(c.length,0),o.write(Buffer.concat([i,c]))},"sendToParent"))});o.on("error",()=>{e()}),o.unref()}),"connectToServer"),s={send:t(e=>{r.push(e)},"send")},f=P();f.then(e=>{if(e)for(const n of r)e(n);r=[],s.send=e},()=>{r=[],s.send=void 0}),exports.connectingToServer=f,exports.parent=s;
@@ -1 +0,0 @@
1
- var p=Object.defineProperty;var t=(e,n)=>p(e,"name",{value:n,configurable:!0});import g from"node:net";import{g as u}from"./get-pipe-path-_tAJyU_v.mjs";let o=[];const m=t(()=>new Promise(e=>{const n=u(process.ppid),r=g.createConnection(n,()=>{e(t(i=>{const c=Buffer.from(JSON.stringify(i)),f=Buffer.alloc(4);f.writeInt32BE(c.length,0),r.write(Buffer.concat([f,c]))},"sendToParent"))});r.on("error",()=>{e()}),r.unref()}),"connectToServer"),s={send:t(e=>{o.push(e)},"send")},a=m();a.then(e=>{if(e)for(const n of o)e(n);o=[],s.send=e},()=>{o=[],s.send=void 0});export{a as c,s as p};
@@ -1 +0,0 @@
1
- "use strict";var s=Object.defineProperty;var o=(e,i)=>s(e,"name",{value:i,configurable:!0});var c=require("node:worker_threads"),a=require("../node-features-CEjg7cMX.cjs"),r=require("../register-DjPW2kSr.cjs");require("node:crypto"),require("../get-pipe-path-D4YM6rQt.cjs"),require("node:module"),require("node:path"),require("node:url"),require("../register-OY9cqBEN.cjs"),require("node:fs"),require("esbuild"),require("../index-D1vYaNWZ.cjs"),require("../client-D3mGB526.cjs"),require("../require-Blr_8TcJ.cjs"),require("node:fs/promises"),require("module"),require("../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("fs"),require("os"),require("path"),require("node:util"),require("../index-BWFBUo6r.cjs"),require("node:net");function q(e){var i=Object.create(null);return e&&Object.keys(e).forEach(function(t){if(t!=="default"){var l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,l.get?l:{enumerable:!0,get:o(function(){return e[t]},"get")})}}),i.default=e,Object.freeze(i)}o(q,"_interopNamespaceDefault");var n=q(c);(a.isFeatureSupported(a.moduleRegisterHooksCjsReload)&&!n.isInternalThread||a.isFeatureSupported(a.moduleRegister)&&n.isMainThread)&&r.register();const u=r.createDefaultData(),d=r.createInitialize(u),f=r.createGlobalPreload(u),p=r.createLoad(u),b=r.createResolve(u);exports.globalPreload=f,exports.initialize=d,exports.load=p,exports.resolve=b;
@@ -1 +0,0 @@
1
- "use strict";var u=Object.defineProperty;var t=(r,e)=>u(r,"name",{value:e,configurable:!0});var d=require("module"),n=require("node:path"),o=require("./temporary-directory-B83uKxJF.cjs"),s=typeof document<"u"?document.currentScript:null,p=require;const i=process.platform==="win32",c=t(r=>{const e=n.join(o.tmpdir,`${r}.pipe`);return i?`\\\\?\\pipe\\${e}`:e},"getPipePath");exports.getPipePath=c,exports.isWindows=i,exports.require=p;
@@ -1 +0,0 @@
1
- var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});import{createRequire as p}from"module";import a from"node:path";import{t as s}from"./temporary-directory-BDDVQOvU.mjs";var m=p(import.meta.url);const i=process.platform==="win32",n=t(e=>{const r=a.join(s,`${e}.pipe`);return i?`\\\\?\\pipe\\${r}`:r},"getPipePath");export{n as g,i,m as r};
@@ -1 +0,0 @@
1
- "use strict";var b=Object.defineProperty;var p=(s,l)=>b(s,"name",{value:l,configurable:!0});let t=!0;const n=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let r=0;if(n.process&&n.process.env&&n.process.stdout){const{FORCE_COLOR:s,NODE_DISABLE_COLORS:l,NO_COLOR:c,TERM:o,COLORTERM:i}=n.process.env;l||c||s==="0"?t=!1:s==="1"||s==="2"||s==="3"?t=!0:o==="dumb"?t=!1:"CI"in n.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(g=>g in n.process.env)?t=!0:t=process.stdout.isTTY,t&&(process.platform==="win32"||i&&(i==="truecolor"||i==="24bit")?r=3:o&&(o.endsWith("-256color")||o.endsWith("256"))?r=2:r=1)}let a={enabled:t,supportLevel:r};function e(s,l,c=1){const o=`\x1B[${s}m`,i=`\x1B[${l}m`,g=new RegExp(`\\x1b\\[${l}m`,"g");return f=>a.enabled&&a.supportLevel>=c?o+(""+f).replace(g,o)+i:""+f}p(e,"kolorist");const u=e(30,39),d=e(33,39),O=e(90,39),C=e(92,39),L=e(95,39),R=e(96,39),y=e(44,49),I=e(100,49),h=e(103,49);exports.bgBlue=y,exports.bgGray=I,exports.bgLightYellow=h,exports.black=u,exports.gray=O,exports.lightCyan=R,exports.lightGreen=C,exports.lightMagenta=L,exports.options=a,exports.yellow=d;