pkgroll 2.0.2 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <h1 align="center">
5
5
  <sup>pkgroll</sup>
6
6
  <br>
7
- <a href="https://npm.im/pkgroll"><img src="https://badgen.net/npm/v/pkgroll"></a> <a href="https://npm.im/pkgroll"><img src="https://badgen.net/npm/dm/pkgroll"></a>
7
+ <a href="https://npm.im/pkgroll"><img src="https://badgen.net/npm/v/pkgroll"></a> <a href="https://npm.im/pkgroll"><img src="https://badgen.net/npm/dm/pkgroll"></a>
8
8
  </h1>
9
9
 
10
10
  _pkgroll_ is a JavaScript package bundler powered by Rollup that automatically builds your package from entry-points defined in `package.json`. No config necessary!
@@ -22,14 +22,10 @@ Write your code in TypeScript/ESM and run `pkgroll` to get ESM/CommonJS/.d.ts ou
22
22
  <br>
23
23
 
24
24
  <p align="center">
25
- <a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum">
26
- <picture>
27
- <source width="830" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image=dark">
28
- <source width="830" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image">
29
- <img width="830" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image" alt="Premium sponsor banner">
30
- </picture>
31
- </a>
25
+ <a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=398771"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/donate.webp"></a>
26
+ <a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=397608"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
32
27
  </p>
28
+ <p align="center"><sup><i>Already a sponsor?</i> Join the discussion in the <a href="https://github.com/pvtnbr/pkgroll">Development repo</a>!</sup></p>
33
29
 
34
30
  ## Install
35
31
  ```sh
@@ -42,7 +38,7 @@ npm install --save-dev pkgroll
42
38
  2. Define package entry-files in `package.json`.
43
39
 
44
40
  [These configurations](https://nodejs.org/api/packages.html#package-entry-points) are for Node.js to determine how to import the package.
45
-
41
+
46
42
  Pkgroll leverages the same configuration to determine how to build the package.
47
43
 
48
44
  ```json5
@@ -88,18 +84,6 @@ npm install --save-dev pkgroll
88
84
  npm run build # or npx pkgroll
89
85
  ```
90
86
 
91
- <br>
92
-
93
- <p align="center">
94
- <a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold">
95
- <picture>
96
- <source width="830" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image=dark">
97
- <source width="830" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image">
98
- <img width="830" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image" alt="Premium sponsor banner">
99
- </picture>
100
- </a>
101
- </p>
102
-
103
87
  ## Usage
104
88
 
105
89
  ### Entry-points
@@ -253,6 +237,12 @@ Run the bundler in watch mode during development:
253
237
  pkgroll --watch
254
238
  ```
255
239
 
240
+ ### Clean dist
241
+ Clean dist directory before bundling:
242
+ ```sh
243
+ pkgroll --clean-dist
244
+ ```
245
+
256
246
  ## FAQ
257
247
 
258
248
  ### Why bundle with Rollup?
@@ -285,23 +275,6 @@ pkgroll --watch
285
275
 
286
276
  ## Sponsors
287
277
 
288
- <p align="center">
289
- <a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1">
290
- <picture>
291
- <source width="410" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image=dark">
292
- <source width="410" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image">
293
- <img width="410" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image" alt="Premium sponsor banner">
294
- </picture>
295
- </a>
296
- <a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2">
297
- <picture>
298
- <source width="410" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image=dark">
299
- <source width="410" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image">
300
- <img width="410" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image" alt="Premium sponsor banner">
301
- </picture>
302
- </a>
303
- </p>
304
-
305
278
  <p align="center">
306
279
  <a href="https://github.com/sponsors/privatenumber">
307
280
  <img src="https://cdn.jsdelivr.net/gh/privatenumber/sponsors/sponsorkit/sponsors.svg">
package/dist/cli.js CHANGED
@@ -1,33 +1,37 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var O=require("fs"),bD=require("tty"),Au=require("rollup"),p=require("path"),yD=require("@rollup/plugin-node-resolve"),wD=require("@rollup/plugin-commonjs"),$D=require("@rollup/plugin-json"),vD=require("@rollup/plugin-alias"),bu=require("@rollup/plugin-replace"),xD=require("@rollup/plugin-inject"),kD=require("@rollup/pluginutils"),yu=require("esbuild"),wu=require("module"),$u=require("magic-string");const OD="known-flag",jD="unknown-flag",TD="argument",{stringify:R}=JSON,SD=/\B([A-Z])/g,PD=u=>u.replace(SD,"-$1").toLowerCase(),{hasOwnProperty:ND}=Object.prototype,M=(u,e)=>ND.call(u,e),ID=u=>Array.isArray(u),vu=u=>typeof u=="function"?[u,!1]:ID(u)?[u[0],!0]:vu(u.type),_D=(u,e)=>u===Boolean?e!=="false":e,LD=(u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),RD=/[\s.:=]/,MD=u=>{const e=`Flag name ${R(u)}`;if(u.length===0)throw new Error(`${e} cannot be empty`);if(u.length===1)throw new Error(`${e} must be longer than a character`);const t=u.match(RD);if(t)throw new Error(`${e} cannot contain ${R(t?.[0])}`)},UD=u=>{const e={},t=(D,n)=>{if(M(e,D))throw new Error(`Duplicate flags named ${R(D)}`);e[D]=n};for(const D in u){if(!M(u,D))continue;MD(D);const n=u[D],r=[[],...vu(n),n];t(D,r);const o=PD(D);if(D!==o&&t(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:i}=n,s=`Flag alias ${R(i)} for flag ${R(D)}`;if(i.length===0)throw new Error(`${s} cannot be empty`);if(i.length>1)throw new Error(`${s} must be a single character`);t(i,r)}}return e},WD=(u,e)=>{const t={};for(const D in u){if(!M(u,D))continue;const[n,,r,o]=e[D];if(n.length===0&&"default"in o){let{default:i}=o;typeof i=="function"&&(i=i()),t[D]=i}else t[D]=r?n:n.pop()}return t},G="--",qD=/[.:=]/,zD=/^-{1,2}\w/,VD=u=>{if(!zD.test(u))return;const e=!u.startsWith(G);let t=u.slice(e?1:2),D;const n=t.match(qD);if(n){const{index:r}=n;D=t.slice(r+1),t=t.slice(0,r)}return[t,D,e]},GD=(u,{onFlag:e,onArgument:t})=>{let D;const n=(r,o)=>{if(typeof D!="function")return!0;D(r,o),D=void 0};for(let r=0;r<u.length;r+=1){const o=u[r];if(o===G){n();const s=u.slice(r+1);t?.(s,[r],!0);break}const i=VD(o);if(i){if(n(),!e)continue;const[s,a,F]=i;if(F)for(let c=0;c<s.length;c+=1){n();const C=c===s.length-1;D=e(s[c],C?a:void 0,[r,c+1,C])}else D=e(s,a,[r])}else n(o,[r])&&t?.([o],[r])}n()},KD=(u,e)=>{for(const[t,D,n]of e.reverse()){if(D){const r=u[t];let o=r.slice(0,D);if(n||(o+=r.slice(D+1)),o!=="-"){u[t]=o;continue}}u.splice(t,1)}},ZD=(u,e=process.argv.slice(2),{ignore:t}={})=>{const D=[],n=UD(u),r={},o=[];return o[G]=[],GD(e,{onFlag(i,s,a){const F=M(n,i);if(!t?.(F?OD:jD,i,s)){if(F){const[c,C]=n[i],E=_D(C,s),f=(g,y)=>{D.push(a),y&&D.push(y),c.push(LD(C,g||""))};return E===void 0?f:f(E)}M(r,i)||(r[i]=[]),r[i].push(s===void 0?!0:s),D.push(a)}},onArgument(i,s,a){t?.(TD,e[s[0]])||(o.push(...i),a?(o[G]=i,e.splice(s[0])):D.push(s))}}),KD(e,D),{flags:WD(u,n),unknownFlags:r,_:o}};var HD=Object.create,K=Object.defineProperty,JD=Object.defineProperties,YD=Object.getOwnPropertyDescriptor,QD=Object.getOwnPropertyDescriptors,XD=Object.getOwnPropertyNames,xu=Object.getOwnPropertySymbols,ue=Object.getPrototypeOf,ku=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Ou=(u,e,t)=>e in u?K(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Z=(u,e)=>{for(var t in e||(e={}))ku.call(e,t)&&Ou(u,t,e[t]);if(xu)for(var t of xu(e))De.call(e,t)&&Ou(u,t,e[t]);return u},tu=(u,e)=>JD(u,QD(e)),ee=u=>K(u,"__esModule",{value:!0}),te=(u,e)=>()=>(u&&(e=u(u=0)),e),ne=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),re=(u,e,t,D)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of XD(e))!ku.call(u,n)&&(t||n!=="default")&&K(u,n,{get:()=>e[n],enumerable:!(D=YD(e,n))||D.enumerable});return u},oe=(u,e)=>re(ee(K(u!=null?HD(ue(u)):{},"default",!e&&u&&u.__esModule?{get:()=>u.default,enumerable:!0}:{value:u,enumerable:!0})),u),w=te(()=>{}),ie=ne((u,e)=>{w(),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}});w(),w(),w();var se=u=>{var e,t,D;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(n)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:n}:{columns:(t=u.columns)!=null?t:[],stdoutColumns:(D=u.stdoutColumns)!=null?D:n}};w(),w(),w(),w(),w();function ae({onlyFirst:u=!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,u?void 0:"g")}function ju(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(ae(),"")}w();function ce(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}var le=oe(ie(),1);function S(u){if(typeof u!="string"||u.length===0||(u=ju(u),u.length===0))return 0;u=u.replace((0,le.default)()," ");let e=0;for(let t=0;t<u.length;t++){let D=u.codePointAt(t);D<=31||D>=127&&D<=159||D>=768&&D<=879||(D>65535&&t++,e+=ce(D)?2:1)}return e}var Tu=u=>Math.max(...u.split(`
3
- `).map(S)),Fe=u=>{let e=[];for(let t of u){let{length:D}=t,n=D-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<D;r+=1){let o=Tu(t[r]);o>e[r]&&(e[r]=o)}}return e};w();var Su=/^\d+%$/,Pu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Ce=(u,e)=>{var t;let D=[];for(let n=0;n<u.length;n+=1){let r=(t=e[n])!=null?t:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&Su.test(r)){D.push(tu(Z({},Pu),{width:r,contentWidth:u[n]}));continue}if(r&&typeof r=="object"){let o=tu(Z(Z({},Pu),r),{contentWidth:u[n]});o.horizontalPadding=o.paddingLeft+o.paddingRight,D.push(o);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return D};function Ee(u,e){for(let t of u){let{width:D}=t;if(D==="content-width"&&(t.width=t.contentWidth),D==="auto"){let s=Math.min(20,t.contentWidth);t.width=s,t.autoOverflow=t.contentWidth-s}if(typeof D=="string"&&Su.test(D)){let s=Number.parseFloat(D.slice(0,-1))/100;t.width=Math.floor(e*s)-(t.paddingLeft+t.paddingRight)}let{horizontalPadding:n}=t,r=1,o=r+n;if(o>=e){let s=o-e,a=Math.ceil(t.paddingLeft/n*s),F=s-a;t.paddingLeft-=a,t.paddingRight-=F,t.horizontalPadding=t.paddingLeft+t.paddingRight}t.paddingLeftString=t.paddingLeft?" ".repeat(t.paddingLeft):"",t.paddingRightString=t.paddingRight?" ".repeat(t.paddingRight):"";let i=e-t.horizontalPadding;t.width=Math.max(Math.min(t.width,i),r)}}var Nu=()=>Object.assign([],{columns:0});function fe(u,e){let t=[Nu()],[D]=t;for(let n of u){let r=n.width+n.horizontalPadding;D.columns+r>e&&(D=Nu(),t.push(D)),D.push(n),D.columns+=r}for(let n of t){let r=n.reduce((C,E)=>C+E.width+E.horizontalPadding,0),o=e-r;if(o===0)continue;let i=n.filter(C=>"autoOverflow"in C),s=i.filter(C=>C.autoOverflow>0),a=s.reduce((C,E)=>C+E.autoOverflow,0),F=Math.min(a,o);for(let C of s){let E=Math.floor(C.autoOverflow/a*F);C.width+=E,o-=E}let c=Math.floor(o/i.length);for(let C=0;C<i.length;C+=1){let E=i[C];C===i.length-1?E.width+=o:E.width+=c,o-=c}}return t}function de(u,e,t){let D=Ce(t,e);return Ee(D,u),fe(D,u)}w(),w(),w();var nu=10,Iu=(u=0)=>e=>`\x1B[${e+u}m`,_u=(u=0)=>e=>`\x1B[${38+u};5;${e}m`,Lu=(u=0)=>(e,t,D)=>`\x1B[${38+u};2;${e};${t};${D}m`;function pe(){let u=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[t,D]of Object.entries(e)){for(let[n,r]of Object.entries(D))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},D[n]=e[n],u.set(r[0],r[1]);Object.defineProperty(e,t,{value:D,enumerable:!1})}return Object.defineProperty(e,"codes",{value:u,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Iu(),e.color.ansi256=_u(),e.color.ansi16m=Lu(),e.bgColor.ansi=Iu(nu),e.bgColor.ansi256=_u(nu),e.bgColor.ansi16m=Lu(nu),Object.defineProperties(e,{rgbToAnsi256:{value:(t,D,n)=>t===D&&D===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(D/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let D=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(t.toString(16));if(!D)return[0,0,0];let{colorString:n}=D.groups;n.length===3&&(n=n.split("").map(o=>o+o).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>e.rgbToAnsi256(...e.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let D,n,r;if(t>=232)D=((t-232)*10+8)/255,n=D,r=D;else{t-=16;let s=t%36;D=Math.floor(t/36)/5,n=Math.floor(s/6)/5,r=s%6/5}let o=Math.max(D,n,r)*2;if(o===0)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(D));return o===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,D,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(t,D,n)),enumerable:!1},hexToAnsi:{value:t=>e.ansi256ToAnsi(e.hexToAnsi256(t)),enumerable:!1}}),e}var ge=pe(),he=ge,H=new Set(["\x1B","\x9B"]),me=39,ru="\x07",Ru="[",Be="]",Mu="m",ou=`${Be}8;;`,Uu=u=>`${H.values().next().value}${Ru}${u}${Mu}`,Wu=u=>`${H.values().next().value}${ou}${u}${ru}`,Ae=u=>u.split(" ").map(e=>S(e)),iu=(u,e,t)=>{let D=[...e],n=!1,r=!1,o=S(ju(u[u.length-1]));for(let[i,s]of D.entries()){let a=S(s);if(o+a<=t?u[u.length-1]+=s:(u.push(s),o=0),H.has(s)&&(n=!0,r=D.slice(i+1).join("").startsWith(ou)),n){r?s===ru&&(n=!1,r=!1):s===Mu&&(n=!1);continue}o+=a,o===t&&i<D.length-1&&(u.push(""),o=0)}!o&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},be=u=>{let e=u.split(" "),t=e.length;for(;t>0&&!(S(e[t-1])>0);)t--;return t===e.length?u:e.slice(0,t).join(" ")+e.slice(t).join("")},ye=(u,e,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let D="",n,r,o=Ae(u),i=[""];for(let[a,F]of u.split(" ").entries()){t.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let c=S(i[i.length-1]);if(a!==0&&(c>=e&&(t.wordWrap===!1||t.trim===!1)&&(i.push(""),c=0),(c>0||t.trim===!1)&&(i[i.length-1]+=" ",c++)),t.hard&&o[a]>e){let C=e-c,E=1+Math.floor((o[a]-C-1)/e);Math.floor((o[a]-1)/e)<E&&i.push(""),iu(i,F,e);continue}if(c+o[a]>e&&c>0&&o[a]>0){if(t.wordWrap===!1&&c<e){iu(i,F,e);continue}i.push("")}if(c+o[a]>e&&t.wordWrap===!1){iu(i,F,e);continue}i[i.length-1]+=F}t.trim!==!1&&(i=i.map(a=>be(a)));let s=[...i.join(`
4
- `)];for(let[a,F]of s.entries()){if(D+=F,H.has(F)){let{groups:C}=new RegExp(`(?:\\${Ru}(?<code>\\d+)m|\\${ou}(?<uri>.*)${ru})`).exec(s.slice(a).join(""))||{groups:{}};if(C.code!==void 0){let E=Number.parseFloat(C.code);n=E===me?void 0:E}else C.uri!==void 0&&(r=C.uri.length===0?void 0:C.uri)}let c=he.codes.get(Number(n));s[a+1]===`
5
- `?(r&&(D+=Wu("")),n&&c&&(D+=Uu(c))):F===`
6
- `&&(n&&c&&(D+=Uu(n)),r&&(D+=Wu(r)))}return D};function we(u,e,t){return String(u).normalize().replace(/\r\n/g,`
2
+ "use strict";var wD=Object.defineProperty;var i=(u,e)=>wD(u,"name",{value:e,configurable:!0});var j=require("fs"),$D=require("tty"),wu=require("rollup"),g=require("path"),vD=require("@rollup/plugin-node-resolve"),xD=require("@rollup/plugin-commonjs"),kD=require("@rollup/plugin-json"),OD=require("@rollup/plugin-alias"),$u=require("@rollup/plugin-replace"),jD=require("@rollup/plugin-inject"),TD=require("@rollup/pluginutils"),vu=require("esbuild"),xu=require("module"),ku=require("magic-string");const SD="known-flag",PD="unknown-flag",ND="argument",{stringify:W}=JSON,ID=/\B([A-Z])/g,_D=i(u=>u.replace(ID,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:RD}=Object.prototype,q=i((u,e)=>RD.call(u,e),"w$3"),LD=i(u=>Array.isArray(u),"L$2"),Ou=i(u=>typeof u=="function"?[u,!1]:LD(u)?[u[0],!0]:Ou(u.type),"b$2"),MD=i((u,e)=>u===Boolean?e!=="false":e,"d$3"),UD=i((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"m$2"),WD=/[\s.:=]/,qD=i(u=>{const e=`Flag name ${W(u)}`;if(u.length===0)throw new Error(`${e} cannot be empty`);if(u.length===1)throw new Error(`${e} must be longer than a character`);const t=u.match(WD);if(t)throw new Error(`${e} cannot contain ${W(t?.[0])}`)},"B$1"),zD=i(u=>{const e={},t=i((D,n)=>{if(q(e,D))throw new Error(`Duplicate flags named ${W(D)}`);e[D]=n},"r");for(const D in u){if(!q(u,D))continue;qD(D);const n=u[D],r=[[],...Ou(n),n];t(D,r);const o=_D(D);if(D!==o&&t(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:s}=n,a=`Flag alias ${W(s)} for flag ${W(D)}`;if(s.length===0)throw new Error(`${a} cannot be empty`);if(s.length>1)throw new Error(`${a} must be a single character`);t(s,r)}}return e},"K$2"),VD=i((u,e)=>{const t={};for(const D in u){if(!q(u,D))continue;const[n,,r,o]=e[D];if(n.length===0&&"default"in o){let{default:s}=o;typeof s=="function"&&(s=s()),t[D]=s}else t[D]=r?n:n.pop()}return t},"_$4"),H="--",GD=/[.:=]/,KD=/^-{1,2}\w/,ZD=i(u=>{if(!KD.test(u))return;const e=!u.startsWith(H);let t=u.slice(e?1:2),D;const n=t.match(GD);if(n){const{index:r}=n;D=t.slice(r+1),t=t.slice(0,r)}return[t,D,e]},"N$1"),HD=i((u,{onFlag:e,onArgument:t})=>{let D;const n=i((r,o)=>{if(typeof D!="function")return!0;D(r,o),D=void 0},"o");for(let r=0;r<u.length;r+=1){const o=u[r];if(o===H){n();const a=u.slice(r+1);t?.(a,[r],!0);break}const s=ZD(o);if(s){if(n(),!e)continue;const[a,l,C]=s;if(C)for(let c=0;c<a.length;c+=1){n();const f=c===a.length-1;D=e(a[c],f?l:void 0,[r,c+1,f])}else D=e(a,l,[r])}else n(o,[r])&&t?.([o],[r])}n()},"$$1"),JD=i((u,e)=>{for(const[t,D,n]of e.reverse()){if(D){const r=u[t];let o=r.slice(0,D);if(n||(o+=r.slice(D+1)),o!=="-"){u[t]=o;continue}}u.splice(t,1)}},"E$1"),YD=i((u,e=process.argv.slice(2),{ignore:t}={})=>{const D=[],n=zD(u),r={},o=[];return o[H]=[],HD(e,{onFlag(s,a,l){const C=q(n,s);if(!t?.(C?SD:PD,s,a)){if(C){const[c,f]=n[s],E=MD(f,a),p=i((h,w)=>{D.push(l),w&&D.push(w),c.push(UD(f,h||""))},"p");return E===void 0?p:p(E)}q(r,s)||(r[s]=[]),r[s].push(a===void 0?!0:a),D.push(l)}},onArgument(s,a,l){t?.(ND,e[a[0]])||(o.push(...s),l?(o[H]=s,e.splice(a[0])):D.push(a))}}),JD(e,D),{flags:VD(u,n),unknownFlags:r,_:o}},"U$2");var QD=Object.create,J=Object.defineProperty,XD=Object.defineProperties,ue=Object.getOwnPropertyDescriptor,De=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertyNames,ju=Object.getOwnPropertySymbols,te=Object.getPrototypeOf,Tu=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,Su=i((u,e,t)=>e in u?J(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,"W$2"),Y=i((u,e)=>{for(var t in e||(e={}))Tu.call(e,t)&&Su(u,t,e[t]);if(ju)for(var t of ju(e))ne.call(e,t)&&Su(u,t,e[t]);return u},"p$1"),nu=i((u,e)=>XD(u,De(e)),"c"),re=i(u=>J(u,"__esModule",{value:!0}),"nD"),oe=i((u,e)=>()=>(u&&(e=u(u=0)),e),"rD"),ie=i((u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),"iD"),se=i((u,e,t,D)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ee(e))!Tu.call(u,n)&&n!=="default"&&J(u,n,{get:()=>e[n],enumerable:!(D=ue(e,n))||D.enumerable});return u},"oD"),ae=i((u,e)=>se(re(J(u!=null?QD(te(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),$=oe(()=>{}),le=ie((u,e)=>{$(),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}});$(),$(),$();var ce=i(u=>{var e,t,D;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(n)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:n}:{columns:(t=u.columns)!=null?t:[],stdoutColumns:(D=u.stdoutColumns)!=null?D:n}},"v$1");$(),$(),$(),$(),$();function Fe({onlyFirst:u=!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,u?void 0:"g")}i(Fe,"w$2");function Pu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Fe(),"")}i(Pu,"d$2"),$();function Ce(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}i(Ce,"y$2");var Ee=ae(le());function P(u){if(typeof u!="string"||u.length===0||(u=Pu(u),u.length===0))return 0;u=u.replace((0,Ee.default)()," ");let e=0;for(let t=0;t<u.length;t++){let D=u.codePointAt(t);D<=31||D>=127&&D<=159||D>=768&&D<=879||(D>65535&&t++,e+=Ce(D)?2:1)}return e}i(P,"g");var Nu=i(u=>Math.max(...u.split(`
3
+ `).map(P)),"b$1"),fe=i(u=>{let e=[];for(let t of u){let{length:D}=t,n=D-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<D;r+=1){let o=Nu(t[r]);o>e[r]&&(e[r]=o)}}return e},"k$1");$();var Iu=/^\d+%$/,_u={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},pe=i((u,e)=>{var t;let D=[];for(let n=0;n<u.length;n+=1){let r=(t=e[n])!=null?t:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&Iu.test(r)){D.push(nu(Y({},_u),{width:r,contentWidth:u[n]}));continue}if(r&&typeof r=="object"){let o=nu(Y(Y({},_u),r),{contentWidth:u[n]});o.horizontalPadding=o.paddingLeft+o.paddingRight,D.push(o);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return D},"sD");function de(u,e){for(let t of u){let{width:D}=t;if(D==="content-width"&&(t.width=t.contentWidth),D==="auto"){let a=Math.min(20,t.contentWidth);t.width=a,t.autoOverflow=t.contentWidth-a}if(typeof D=="string"&&Iu.test(D)){let a=Number.parseFloat(D.slice(0,-1))/100;t.width=Math.floor(e*a)-(t.paddingLeft+t.paddingRight)}let{horizontalPadding:n}=t,r=1,o=r+n;if(o>=e){let a=o-e,l=Math.ceil(t.paddingLeft/n*a),C=a-l;t.paddingLeft-=l,t.paddingRight-=C,t.horizontalPadding=t.paddingLeft+t.paddingRight}t.paddingLeftString=t.paddingLeft?" ".repeat(t.paddingLeft):"",t.paddingRightString=t.paddingRight?" ".repeat(t.paddingRight):"";let s=e-t.horizontalPadding;t.width=Math.max(Math.min(t.width,s),r)}}i(de,"aD");var Ru=i(()=>Object.assign([],{columns:0}),"G$1");function ge(u,e){let t=[Ru()],[D]=t;for(let n of u){let r=n.width+n.horizontalPadding;D.columns+r>e&&(D=Ru(),t.push(D)),D.push(n),D.columns+=r}for(let n of t){let r=n.reduce((f,E)=>f+E.width+E.horizontalPadding,0),o=e-r;if(o===0)continue;let s=n.filter(f=>"autoOverflow"in f),a=s.filter(f=>f.autoOverflow>0),l=a.reduce((f,E)=>f+E.autoOverflow,0),C=Math.min(l,o);for(let f of a){let E=Math.floor(f.autoOverflow/l*C);f.width+=E,o-=E}let c=Math.floor(o/s.length);for(let f=0;f<s.length;f+=1){let E=s[f];f===s.length-1?E.width+=o:E.width+=c,o-=c}}return t}i(ge,"lD");function he(u,e,t){let D=pe(t,e);return de(D,u),ge(D,u)}i(he,"Z$1"),$(),$(),$();var ru=10,Lu=i((u=0)=>e=>`\x1B[${e+u}m`,"U$1"),Mu=i((u=0)=>e=>`\x1B[${38+u};5;${e}m`,"V$1"),Uu=i((u=0)=>(e,t,D)=>`\x1B[${38+u};2;${e};${t};${D}m`,"Y");function me(){let u=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[t,D]of Object.entries(e)){for(let[n,r]of Object.entries(D))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},D[n]=e[n],u.set(r[0],r[1]);Object.defineProperty(e,t,{value:D,enumerable:!1})}return Object.defineProperty(e,"codes",{value:u,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Lu(),e.color.ansi256=Mu(),e.color.ansi16m=Uu(),e.bgColor.ansi=Lu(ru),e.bgColor.ansi256=Mu(ru),e.bgColor.ansi16m=Uu(ru),Object.defineProperties(e,{rgbToAnsi256:{value:(t,D,n)=>t===D&&D===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(D/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let D=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(t.toString(16));if(!D)return[0,0,0];let{colorString:n}=D.groups;n.length===3&&(n=n.split("").map(o=>o+o).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>e.rgbToAnsi256(...e.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let D,n,r;if(t>=232)D=((t-232)*10+8)/255,n=D,r=D;else{t-=16;let a=t%36;D=Math.floor(t/36)/5,n=Math.floor(a/6)/5,r=a%6/5}let o=Math.max(D,n,r)*2;if(o===0)return 30;let s=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(D));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,D,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(t,D,n)),enumerable:!1},hexToAnsi:{value:t=>e.ansi256ToAnsi(e.hexToAnsi256(t)),enumerable:!1}}),e}i(me,"AD");var Be=me(),Ae=Be,Q=new Set(["\x1B","\x9B"]),be=39,ou="\x07",Wu="[",ye="]",qu="m",iu=`${ye}8;;`,zu=i(u=>`${Q.values().next().value}${Wu}${u}${qu}`,"J$2"),Vu=i(u=>`${Q.values().next().value}${iu}${u}${ou}`,"Q$1"),we=i(u=>u.split(" ").map(e=>P(e)),"hD"),su=i((u,e,t)=>{let D=[...e],n=!1,r=!1,o=P(Pu(u[u.length-1]));for(let[s,a]of D.entries()){let l=P(a);if(o+l<=t?u[u.length-1]+=a:(u.push(a),o=0),Q.has(a)&&(n=!0,r=D.slice(s+1).join("").startsWith(iu)),n){r?a===ou&&(n=!1,r=!1):a===qu&&(n=!1);continue}o+=l,o===t&&s<D.length-1&&(u.push(""),o=0)}!o&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"S$1"),$e=i(u=>{let e=u.split(" "),t=e.length;for(;t>0&&!(P(e[t-1])>0);)t--;return t===e.length?u:e.slice(0,t).join(" ")+e.slice(t).join("")},"cD"),ve=i((u,e,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let D="",n,r,o=we(u),s=[""];for(let[l,C]of u.split(" ").entries()){t.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let c=P(s[s.length-1]);if(l!==0&&(c>=e&&(t.wordWrap===!1||t.trim===!1)&&(s.push(""),c=0),(c>0||t.trim===!1)&&(s[s.length-1]+=" ",c++)),t.hard&&o[l]>e){let f=e-c,E=1+Math.floor((o[l]-f-1)/e);Math.floor((o[l]-1)/e)<E&&s.push(""),su(s,C,e);continue}if(c+o[l]>e&&c>0&&o[l]>0){if(t.wordWrap===!1&&c<e){su(s,C,e);continue}s.push("")}if(c+o[l]>e&&t.wordWrap===!1){su(s,C,e);continue}s[s.length-1]+=C}t.trim!==!1&&(s=s.map(l=>$e(l)));let a=[...s.join(`
4
+ `)];for(let[l,C]of a.entries()){if(D+=C,Q.has(C)){let{groups:f}=new RegExp(`(?:\\${Wu}(?<code>\\d+)m|\\${iu}(?<uri>.*)${ou})`).exec(a.slice(l).join(""))||{groups:{}};if(f.code!==void 0){let E=Number.parseFloat(f.code);n=E===be?void 0:E}else f.uri!==void 0&&(r=f.uri.length===0?void 0:f.uri)}let c=Ae.codes.get(Number(n));a[l+1]===`
5
+ `?(r&&(D+=Vu("")),n&&c&&(D+=zu(c))):C===`
6
+ `&&(n&&c&&(D+=zu(n)),r&&(D+=Vu(r)))}return D},"dD");function xe(u,e,t){return String(u).normalize().replace(/\r\n/g,`
7
7
  `).split(`
8
- `).map(D=>ye(D,e,t)).join(`
9
- `)}var qu=u=>Array.from({length:u}).fill("");function $e(u,e){let t=[],D=0;for(let n of u){let r=0,o=n.map(s=>{var a;let F=(a=e[D])!=null?a:"";D+=1,s.preprocess&&(F=s.preprocess(F)),Tu(F)>s.width&&(F=we(F,s.width,{hard:!0}));let c=F.split(`
10
- `);if(s.postprocess){let{postprocess:C}=s;c=c.map((E,f)=>C.call(s,E,f))}return s.paddingTop&&c.unshift(...qu(s.paddingTop)),s.paddingBottom&&c.push(...qu(s.paddingBottom)),c.length>r&&(r=c.length),tu(Z({},s),{lines:c})}),i=[];for(let s=0;s<r;s+=1){let a=o.map(F=>{var c;let C=(c=F.lines[s])!=null?c:"",E=Number.isFinite(F.width)?" ".repeat(F.width-S(C)):"",f=F.paddingLeftString;return F.align==="right"&&(f+=E),f+=C,F.align==="left"&&(f+=E),f+F.paddingRightString}).join("");i.push(a)}t.push(i.join(`
8
+ `).map(D=>ve(D,e,t)).join(`
9
+ `)}i(xe,"T$1");var Gu=i(u=>Array.from({length:u}).fill(""),"X");function ke(u,e){let t=[],D=0;for(let n of u){let r=0,o=n.map(a=>{var l;let C=(l=e[D])!=null?l:"";D+=1,a.preprocess&&(C=a.preprocess(C)),Nu(C)>a.width&&(C=xe(C,a.width,{hard:!0}));let c=C.split(`
10
+ `);if(a.postprocess){let{postprocess:f}=a;c=c.map((E,p)=>f.call(a,E,p))}return a.paddingTop&&c.unshift(...Gu(a.paddingTop)),a.paddingBottom&&c.push(...Gu(a.paddingBottom)),c.length>r&&(r=c.length),nu(Y({},a),{lines:c})}),s=[];for(let a=0;a<r;a+=1){let l=o.map(C=>{var c;let f=(c=C.lines[a])!=null?c:"",E=Number.isFinite(C.width)?" ".repeat(C.width-P(f)):"",p=C.paddingLeftString;return C.align==="right"&&(p+=E),p+=f,C.align==="left"&&(p+=E),p+C.paddingRightString}).join("");s.push(l)}t.push(s.join(`
11
11
  `))}return t.join(`
12
- `)}function ve(u,e){if(!u||u.length===0)return"";let t=Fe(u),D=t.length;if(D===0)return"";let{stdoutColumns:n,columns:r}=se(e);if(r.length>D)throw new Error(`${r.length} columns defined, but only ${D} columns found`);let o=de(n,r,t);return u.map(i=>$e(o,i)).join(`
13
- `)}w();var xe=["<",">","=",">=","<="];function ke(u){if(!xe.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}function Oe(u){let e=Object.keys(u).map(t=>{let[D,n]=t.split(" ");ke(D);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let o=u[t];return{operator:D,breakpoint:r,value:o}}).sort((t,D)=>D.breakpoint-t.breakpoint);return t=>{var D;return(D=e.find(({operator:n,breakpoint:r})=>n==="="&&t===r||n===">"&&t>r||n==="<"&&t<r||n===">="&&t>=r||n==="<="&&t<=r))==null?void 0:D.value}}const je=u=>u.replace(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),Te=u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),Se={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:u=>u.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function Pe(u){let e=!1;return{type:"table",data:{tableData:Object.keys(u).sort((t,D)=>t.localeCompare(D)).map(t=>{const D=u[t],n="alias"in D;return n&&(e=!0),{name:t,flag:D,flagFormatted:`--${Te(t)}`,aliasesEnabled:e,aliasFormatted:n?`-${D.alias}`:void 0}}).map(t=>(t.aliasesEnabled=e,[{type:"flagName",data:t},{type:"flagDescription",data:t}])),tableBreakpoints:Se}}}const zu=u=>!u||(u.version??(u.help?u.help.version:void 0)),Vu=u=>{const e="parent"in u&&u.parent?.name;return(e?`${e} `:"")+u.name};function Ne(u){const e=[];u.name&&e.push(Vu(u));const t=zu(u)??("parent"in u&&zu(u.parent));if(t&&e.push(`v${t}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
14
- `}}function Ie(u){const{help:e}=u;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
15
- `}}function _e(u){const e=u.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
16
- `):e.usage}}:void 0;if(u.name){const t=[],D=[Vu(u)];if(u.flags&&Object.keys(u.flags).length>0&&D.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:n}=u,r=n.indexOf("--"),o=r>-1&&n.slice(r+1).some(i=>i.startsWith("<"));D.push(n.map(i=>i!=="--"?i:o?"--":"[--]").join(" "))}if(D.length>1&&t.push(D.join(" ")),"commands"in u&&u.commands?.length&&t.push(`${u.name} <command>`),t.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:t.join(`
17
- `)}}}}function Le(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}function Re(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Pe(u.flags),indentBody:0}}}function Me(u){const{help:e}=u;if(!e||!e.examples||e.examples.length===0)return;let{examples:t}=e;if(Array.isArray(t)&&(t=t.join(`
18
- `)),t)return{id:"examples",type:"section",data:{title:"Examples:",body:t}}}function Ue(u){if(!("alias"in u)||!u.alias)return;const{alias:e}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}const We=u=>[Ne,Ie,_e,Le,Re,Me,Ue].map(e=>e(u)).filter(Boolean),qe=bD.WriteStream.prototype.hasColors();let ze=class{text(e){return e}bold(e){return qe?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:t}){return e.replace(/^/gm," ".repeat(t))}heading(e){return this.bold(e)}section({title:e,body:t,indentBody:D=2}){return`${(e?`${this.heading(e)}
12
+ `)}i(ke,"P$1");function Oe(u,e){if(!u||u.length===0)return"";let t=fe(u),D=t.length;if(D===0)return"";let{stdoutColumns:n,columns:r}=ce(e);if(r.length>D)throw new Error(`${r.length} columns defined, but only ${D} columns found`);let o=he(n,r,t);return u.map(s=>ke(o,s)).join(`
13
+ `)}i(Oe,"mD"),$();var je=["<",">","=",">=","<="];function Te(u){if(!je.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}i(Te,"xD");function Se(u){let e=Object.keys(u).map(t=>{let[D,n]=t.split(" ");Te(D);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let o=u[t];return{operator:D,breakpoint:r,value:o}}).sort((t,D)=>D.breakpoint-t.breakpoint);return t=>{var D;return(D=e.find(({operator:n,breakpoint:r})=>n==="="&&t===r||n===">"&&t>r||n==="<"&&t<r||n===">="&&t>=r||n==="<="&&t<=r))==null?void 0:D.value}}i(Se,"wD");const Pe=i(u=>u.replace(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),"S"),Ne=i(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q$1"),Ie={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:u=>u.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function _e(u){let e=!1;return{type:"table",data:{tableData:Object.keys(u).sort((t,D)=>t.localeCompare(D)).map(t=>{const D=u[t],n="alias"in D;return n&&(e=!0),{name:t,flag:D,flagFormatted:`--${Ne(t)}`,aliasesEnabled:e,aliasFormatted:n?`-${D.alias}`:void 0}}).map(t=>(t.aliasesEnabled=e,[{type:"flagName",data:t},{type:"flagDescription",data:t}])),tableBreakpoints:Ie}}}i(_e,"D");const Ku=i(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A$1"),Zu=i(u=>{const e="parent"in u&&u.parent?.name;return(e?`${e} `:"")+u.name},"C$1");function Re(u){const e=[];u.name&&e.push(Zu(u));const t=Ku(u)??("parent"in u&&Ku(u.parent));if(t&&e.push(`v${t}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
14
+ `}}i(Re,"R$2");function Le(u){const{help:e}=u;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
15
+ `}}i(Le,"L");function Me(u){const e=u.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
16
+ `):e.usage}}:void 0;if(u.name){const t=[],D=[Zu(u)];if(u.flags&&Object.keys(u.flags).length>0&&D.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:n}=u,r=n.indexOf("--"),o=r>-1&&n.slice(r+1).some(s=>s.startsWith("<"));D.push(n.map(s=>s!=="--"?s:o?"--":"[--]").join(" "))}if(D.length>1&&t.push(D.join(" ")),"commands"in u&&u.commands?.length&&t.push(`${u.name} <command>`),t.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:t.join(`
17
+ `)}}}}i(Me,"T");function Ue(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}i(Ue,"_$2");function We(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:_e(u.flags),indentBody:0}}}i(We,"k");function qe(u){const{help:e}=u;if(!e||!e.examples||e.examples.length===0)return;let{examples:t}=e;if(Array.isArray(t)&&(t=t.join(`
18
+ `)),t)return{id:"examples",type:"section",data:{title:"Examples:",body:t}}}i(qe,"F$1");function ze(u){if(!("alias"in u)||!u.alias)return;const{alias:e}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}i(ze,"H");const Ve=i(u=>[Re,Le,Me,Ue,We,qe,ze].map(e=>e(u)).filter(Boolean),"U"),Ge=$D.WriteStream.prototype.hasColors();let Ke=class{static{i(this,"M")}text(e){return e}bold(e){return Ge?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:t}){return e.replace(/^/gm," ".repeat(t))}heading(e){return this.bold(e)}section({title:e,body:t,indentBody:D=2}){return`${(e?`${this.heading(e)}
19
19
  `:"")+(t?this.indentText({text:this.render(t),spaces:D}):"")}
20
- `}table({tableData:e,tableOptions:t,tableBreakpoints:D}){return ve(e.map(n=>n.map(r=>this.render(r))),D?Oe(D):t)}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:t,flagFormatted:D,aliasesEnabled:n,aliasFormatted:r}=e;let o="";if(r?o+=`${r}, `:n&&(o+=" "),o+=D,"placeholder"in t&&typeof t.placeholder=="string")o+=`${this.flagOperator(e)}${t.placeholder}`;else{const i=this.flagParameter("type"in t?t.type:t);i&&(o+=`${this.flagOperator(e)}${i}`)}return o}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let t="description"in e?e.description??"":"";if("default"in e){let{default:D}=e;typeof D=="function"&&(D=D()),D&&(t+=` (default: ${this.flagDefault(D)})`)}return t}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>this.render(t)).join(`
21
- `);if("type"in e&&this[e.type]){const t=this[e.type];if(typeof t=="function")return t.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}};const Gu=/^[\w.-]+$/,{stringify:x}=JSON,Ve=/[|\\{}()[\]^$+*?.]/;function su(u){const e=[];let t,D;for(const n of u){if(D)throw new Error(`Invalid parameter: Spread parameter ${x(D)} must be last`);const r=n[0],o=n[n.length-1];let i;if(r==="<"&&o===">"&&(i=!0,t))throw new Error(`Invalid parameter: Required parameter ${x(n)} cannot come after optional parameter ${x(t)}`);if(r==="["&&o==="]"&&(i=!1,t=n),i===void 0)throw new Error(`Invalid parameter: ${x(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let s=n.slice(1,-1);const a=s.slice(-3)==="...";a&&(D=n,s=s.slice(0,-3));const F=s.match(Ve);if(F)throw new Error(`Invalid parameter: ${x(n)}. Invalid character found ${x(F[0])}`);e.push({name:s,required:i,spread:a})}return e}function au(u,e,t,D){for(let n=0;n<e.length;n+=1){const{name:r,required:o,spread:i}=e[n],s=je(r);if(s in u)throw new Error(`Invalid parameter: ${x(r)} is used more than once.`);const a=i?t.slice(n):t[n];if(i&&(n=e.length),o&&(!a||i&&a.length===0))return console.error(`Error: Missing required parameter ${x(r)}
22
- `),D(),process.exit(1);u[s]=a}}function Ge(u){return u===void 0||u!==!1}function Ku(u,e,t,D){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=e,i=Ge(o);i&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const s=ZD(n,D,{ignore:e.ignoreArgv}),a=()=>{console.log(e.version)};if(r&&s.flags.version===!0)return a(),process.exit(0);const F=new ze,c=i&&o?.render?o.render:f=>F.render(f),C=f=>{const g=We({...e,...f?{help:f}:{},flags:n});console.log(c(g,F))};if(i&&s.flags.help===!0)return C(),process.exit(0);if(e.parameters){let{parameters:f}=e,g=s._;const y=f.indexOf("--"),k=f.slice(y+1),$=Object.create(null);if(y>-1&&k.length>0){f=f.slice(0,y);const l=s._["--"];g=g.slice(0,-l.length||void 0),au($,su(f),g,C),au($,su(k),l,C)}else au($,su(f),g,C);Object.assign(s._,$)}const E={...s,showVersion:a,showHelp:C};return typeof t=="function"&&t(E),{command:u,...E}}function Ke(u,e){const t=new Map;for(const D of e){const n=[D.options.name],{alias:r}=D.options;r&&(Array.isArray(r)?n.push(...r):n.push(r));for(const o of n){if(t.has(o))throw new Error(`Duplicate command name found: ${x(o)}`);t.set(o,D)}}return t.get(u)}function Ze(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Gu.test(u.name)))throw new Error(`Invalid script name: ${x(u.name)}`);const D=t[0];if(u.commands&&Gu.test(D)){const n=Ke(D,u.commands);if(n)return Ku(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return Ku(void 0,u,e,t)}var He="2.0.2";const Zu=u=>O.promises.access(u).then(()=>!0,()=>!1),Je=async u=>{const e=p.join(u,"package.json");if(!await Zu(e))throw new Error(`package.json not found at: ${e}`);const D=await O.promises.readFile(e,"utf8");try{return JSON.parse(D)}catch(n){throw new Error(`Cannot parse package.json: ${n.message}`)}},Ye=/^[/.]/,J=(u,e)=>(!p.isAbsolute(u)&&!Ye.test(u)&&(u=`./${u}`),e&&!u.endsWith("/")&&(u+="/"),u),j=u=>{if(u.endsWith(".mjs"))return"module";if(u.endsWith(".cjs"))return"commonjs"},Hu=u=>u.startsWith("."),cu=(u,e,t="exports")=>{if(u){if(typeof u=="string")return Hu(u)?[{outputPath:u,type:j(u)||e,from:t}]:[];if(Array.isArray(u))return u.flatMap((D,n)=>{const r=`${t}[${n}]`;return typeof D=="string"?Hu(D)?{outputPath:D,type:j(D)||e,from:r}:[]:cu(D,e,r)});if(typeof u=="object")return Object.entries(u).flatMap(([D,n])=>{if(typeof n=="string"){const r={outputPath:n,from:`${t}.${D}`};if(D==="require")return{...r,type:"commonjs"};if(D==="import")return{...r,type:j(n)||e};if(D==="types")return{...r,type:"types"};if(D==="node")return{...r,type:j(n)||e,platform:"node"};if(D==="default")return{...r,type:j(n)||e}}return cu(n,e,`${t}.${D}`)})}return[]},N=(u,e)=>{e.outputPath=J(e.outputPath);const{outputPath:t,type:D,platform:n}=e,r=u[t];if(r){if(r.type!==D)throw new Error(`Conflicting export types "${r.type}" & "${D}" found for ${t}`);if(r.platform!==n)throw new Error(`Conflicting export platforms "${r.platform}" & "${n}" found for ${t}`);Object.assign(r,e)}else u[t]=e},Qe=u=>{const e={},t=u.type??"commonjs";if(u.main){const D=u.main;N(e,{outputPath:D,type:j(D)??t,from:"main"})}if(u.module&&N(e,{outputPath:u.module,type:"module",from:"module"}),u.types&&N(e,{outputPath:u.types,type:"types",from:"types"}),u.bin){const{bin:D}=u;if(typeof D=="string")N(e,{outputPath:D,type:j(D)??t,isExecutable:!0,from:"bin"});else for(const[n,r]of Object.entries(D))N(e,{outputPath:r,type:j(r)??t,isExecutable:!0,from:`bin.${n}`})}if(u.exports){const D=cu(u.exports,t);for(const n of D)N(e,n)}return Object.values(e)},Xe=({imports:u},e)=>{const t={};if(u)for(const D in u){if(D.startsWith("#"))continue;const n=u[D];typeof n=="string"&&(t[D]=p.join(e,n))}return t},{stringify:ut}=JSON,Dt=async(u,e)=>{for(const t of e){const D=u+t;if(await Zu(D))return{extension:t,path:D}}},Ju={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts"]},et=Object.keys(Ju),tt=async(u,e,t)=>{const D=e+u.outputPath.slice(t.length);for(const n of et)if(u.outputPath.endsWith(n)){const r=await Dt(D.slice(0,-n.length),Ju[n]);if(r)return{input:r.path,srcExtension:r.extension,distExtension:n}}throw new Error(`Could not find matching source file for export path ${ut(u.outputPath)}`)},lu="pkgroll:create-require",Yu=`IS_ESM${Math.random().toString(36).slice(2)}`,nt=()=>({...xD({require:lu}),name:"create-require",resolveId:u=>u===lu?u:null,load:u=>u!==lu?null:`
20
+ `}table({tableData:e,tableOptions:t,tableBreakpoints:D}){return Oe(e.map(n=>n.map(r=>this.render(r))),D?Se(D):t)}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:t,flagFormatted:D,aliasesEnabled:n,aliasFormatted:r}=e;let o="";if(r?o+=`${r}, `:n&&(o+=" "),o+=D,"placeholder"in t&&typeof t.placeholder=="string")o+=`${this.flagOperator(e)}${t.placeholder}`;else{const s=this.flagParameter("type"in t?t.type:t);s&&(o+=`${this.flagOperator(e)}${s}`)}return o}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let t="description"in e?e.description??"":"";if("default"in e){let{default:D}=e;typeof D=="function"&&(D=D()),D&&(t+=` (default: ${this.flagDefault(D)})`)}return t}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>this.render(t)).join(`
21
+ `);if("type"in e&&this[e.type]){const t=this[e.type];if(typeof t=="function")return t.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}};const Hu=/^[\w.-]+$/,{stringify:k}=JSON,Ze=/[|\\{}()[\]^$+*?.]/;function au(u){const e=[];let t,D;for(const n of u){if(D)throw new Error(`Invalid parameter: Spread parameter ${k(D)} must be last`);const r=n[0],o=n[n.length-1];let s;if(r==="<"&&o===">"&&(s=!0,t))throw new Error(`Invalid parameter: Required parameter ${k(n)} cannot come after optional parameter ${k(t)}`);if(r==="["&&o==="]"&&(s=!1,t=n),s===void 0)throw new Error(`Invalid parameter: ${k(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=n.slice(1,-1);const l=a.slice(-3)==="...";l&&(D=n,a=a.slice(0,-3));const C=a.match(Ze);if(C)throw new Error(`Invalid parameter: ${k(n)}. Invalid character found ${k(C[0])}`);e.push({name:a,required:s,spread:l})}return e}i(au,"w$1");function lu(u,e,t,D){for(let n=0;n<e.length;n+=1){const{name:r,required:o,spread:s}=e[n],a=Pe(r);if(a in u)throw new Error(`Invalid parameter: ${k(r)} is used more than once.`);const l=s?t.slice(n):t[n];if(s&&(n=e.length),o&&(!l||s&&l.length===0))return console.error(`Error: Missing required parameter ${k(r)}
22
+ `),D(),process.exit(1);u[a]=l}}i(lu,"b");function He(u){return u===void 0||u!==!1}i(He,"W$1");function Ju(u,e,t,D){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=e,s=He(o);s&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const a=YD(n,D,{ignore:e.ignoreArgv}),l=i(()=>{console.log(e.version)},"f");if(r&&a.flags.version===!0)return l(),process.exit(0);const C=new Ke,c=s&&o?.render?o.render:p=>C.render(p),f=i(p=>{const h=Ve({...e,...p?{help:p}:{},flags:n});console.log(c(h,C))},"u");if(s&&a.flags.help===!0)return f(),process.exit(0);if(e.parameters){let{parameters:p}=e,h=a._;const w=p.indexOf("--"),O=p.slice(w+1),v=Object.create(null);if(w>-1&&O.length>0){p=p.slice(0,w);const F=a._["--"];h=h.slice(0,-F.length||void 0),lu(v,au(p),h,f),lu(v,au(O),F,f)}else lu(v,au(p),h,f);Object.assign(a._,v)}const E={...a,showVersion:l,showHelp:f};return typeof t=="function"&&t(E),{command:u,...E}}i(Ju,"x");function Je(u,e){const t=new Map;for(const D of e){const n=[D.options.name],{alias:r}=D.options;r&&(Array.isArray(r)?n.push(...r):n.push(r));for(const o of n){if(t.has(o))throw new Error(`Duplicate command name found: ${k(o)}`);t.set(o,D)}}return t.get(u)}i(Je,"z$1");function Ye(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Hu.test(u.name)))throw new Error(`Invalid script name: ${k(u.name)}`);const D=t[0];if(u.commands&&Hu.test(D)){const n=Je(D,u.commands);if(n)return Ju(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return Ju(void 0,u,e,t)}i(Ye,"Z");var Qe="2.1.1";const cu=i(u=>j.promises.access(u).then(()=>!0,()=>!1),"fsExists"),Xe=i(async u=>{const e=g.join(u,"package.json");if(!await cu(e))throw new Error(`package.json not found at: ${e}`);const D=await j.promises.readFile(e,"utf8");try{return JSON.parse(D)}catch(n){throw new Error(`Cannot parse package.json: ${n.message}`)}},"readPackageJson"),ut=/^[/.]/,X=i((u,e)=>(!g.isAbsolute(u)&&!ut.test(u)&&(u=`./${u}`),e&&!u.endsWith("/")&&(u+="/"),u),"normalizePath"),T=i(u=>{if(u.endsWith(".mjs"))return"module";if(u.endsWith(".cjs"))return"commonjs"},"getFileType"),Yu=i(u=>u.startsWith("."),"isPath"),Fu=i((u,e,t="exports")=>{if(u){if(typeof u=="string")return Yu(u)?[{outputPath:u,type:T(u)||e,from:t}]:[];if(Array.isArray(u))return u.flatMap((D,n)=>{const r=`${t}[${n}]`;return typeof D=="string"?Yu(D)?{outputPath:D,type:T(D)||e,from:r}:[]:Fu(D,e,r)});if(typeof u=="object")return Object.entries(u).flatMap(([D,n])=>{if(typeof n=="string"){const r={outputPath:n,from:`${t}.${D}`};if(D==="require")return{...r,type:"commonjs"};if(D==="import")return{...r,type:T(n)||e};if(D==="types")return{...r,type:"types"};if(D==="node")return{...r,type:T(n)||e,platform:"node"};if(D==="default")return{...r,type:T(n)||e}}return Fu(n,e,`${t}.${D}`)})}return[]},"parseExportsMap"),I=i((u,e)=>{e.outputPath=X(e.outputPath);const{outputPath:t,type:D,platform:n}=e,r=u[t];if(r){if(r.type!==D)throw new Error(`Conflicting export types "${r.type}" & "${D}" found for ${t}`);if(r.platform!==n)throw new Error(`Conflicting export platforms "${r.platform}" & "${n}" found for ${t}`);Object.assign(r,e)}else u[t]=e},"addExportPath"),Dt=i(u=>{const e={},t=u.type??"commonjs";if(u.main){const D=u.main;I(e,{outputPath:D,type:T(D)??t,from:"main"})}if(u.module&&I(e,{outputPath:u.module,type:"module",from:"module"}),u.types&&I(e,{outputPath:u.types,type:"types",from:"types"}),u.bin){const{bin:D}=u;if(typeof D=="string")I(e,{outputPath:D,type:T(D)??t,isExecutable:!0,from:"bin"});else for(const[n,r]of Object.entries(D))I(e,{outputPath:r,type:T(r)??t,isExecutable:!0,from:`bin.${n}`})}if(u.exports){const D=Fu(u.exports,t);for(const n of D)I(e,n)}return Object.values(e)},"getExportEntries"),et=i(({imports:u},e)=>{const t={};if(u)for(const D in u){if(D.startsWith("#"))continue;const n=u[D];typeof n=="string"&&(t[D]=g.join(e,n))}return t},"getAliases"),{stringify:tt}=JSON,nt=i(async(u,e)=>{for(const t of e){const D=u+t;if(await cu(D))return{extension:t,path:D}}},"tryExtensions"),Qu={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts"]},rt=Object.keys(Qu),ot=i(async(u,e,t)=>{const D=e+u.outputPath.slice(t.length);for(const n of rt)if(u.outputPath.endsWith(n)){const r=await nt(D.slice(0,-n.length),Qu[n]);if(r)return{input:r.path,srcExtension:r.extension,distExtension:n}}throw new Error(`Could not find matching source file for export path ${tt(u.outputPath)}`)},"getSourcePath"),Cu="pkgroll:create-require",Xu=`IS_ESM${Math.random().toString(36).slice(2)}`,it=i(()=>({...jD({require:Cu}),name:"create-require",resolveId:u=>u===Cu?u:null,load:u=>u!==Cu?null:`
23
23
  import { createRequire } from 'module';
24
24
 
25
25
  export default (
26
- ${Yu}
26
+ ${Xu}
27
27
  ? /* @__PURE__ */ createRequire(import.meta.url)
28
28
  : require
29
29
  );
30
- `}),rt=u=>{const e=bu({[Yu]:u}).renderChunk;return{name:"create-require-insert-format",renderChunk:{order:"pre",handler:typeof e=="function"?e:e.handler}}},Qu=u=>u!==null&&typeof u=="object",I=(u,e)=>Object.assign(new Error(`[${u}]: ${e}`),{code:u}),Xu="ERR_INVALID_PACKAGE_CONFIG",Fu="ERR_INVALID_PACKAGE_TARGET",ot="ERR_PACKAGE_PATH_NOT_EXPORTED",it=/^\d+$/,st=/^(\.{1,2}|node_modules)$/i,at=/\/|\\/;var uD=(u=>(u.Export="exports",u.Import="imports",u))(uD||{});const Cu=(u,e,t,D,n)=>{if(e==null)return[];if(typeof e=="string"){const[r,...o]=e.split(at);if(r===".."||o.some(i=>st.test(i)))throw I(Fu,`Invalid "${u}" target "${e}" defined in the package config`);return[n?e.replace(/\*/g,n):e]}if(Array.isArray(e))return e.flatMap(r=>Cu(u,r,t,D,n));if(Qu(e)){for(const r of Object.keys(e)){if(it.test(r))throw I(Xu,"Cannot contain numeric property keys");if(r==="default"||D.includes(r))return Cu(u,e[r],t,D,n)}return[]}throw I(Fu,`Invalid "${u}" target "${e}"`)},U="*",ct=(u,e)=>{const t=u.indexOf(U),D=e.indexOf(U);return t===D?e.length>u.length:D>t};function lt(u,e){if(!e.includes(U)&&u.hasOwnProperty(e))return[e];let t,D;for(const n of Object.keys(u))if(n.includes(U)){const[r,o,i]=n.split(U);if(i===void 0&&e.startsWith(r)&&e.endsWith(o)){const s=e.slice(r.length,-o.length||void 0);s&&(!t||ct(t,n))&&(t=n,D=s)}}return[t,D]}const Ft=u=>Object.keys(u).reduce((e,t)=>{const D=t===""||t[0]!==".";if(e===void 0||e===D)return D;throw I(Xu,'"exports" cannot contain some keys starting with "." and some not')},void 0),Ct=/^\w+:/,Et=(u,e,t)=>{if(!u)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof u=="string"||Array.isArray(u)||Qu(u)&&Ft(u))&&(u={".":u});const[D,n]=lt(u,e),r=Cu(uD.Export,u[D],e,t,n);if(r.length===0)throw I(ot,e==="."?'No "exports" main defined':`Package subpath '${e}' is not defined by "exports"`);for(const o of r)if(!o.startsWith("./")&&!Ct.test(o))throw I(Fu,`Invalid "exports" target "${o}" defined in the package config`);return r};function T(u){return u.startsWith("\\\\?\\")?u:u.replace(/\\/g,"/")}const Y=u=>{const e=O[u];return(t,...D)=>{const n=`${u}:${D.join(":")}`;let r=t?.get(n);return r===void 0&&(r=Reflect.apply(e,O,D),t?.set(n,r)),r}},v=Y("existsSync"),ft=Y("realpathSync"),dt=Y("readFileSync"),Q=Y("statSync"),DD=(u,e,t)=>{for(;;){const D=p.posix.join(u,e);if(v(t,D))return D;const n=p.dirname(u);if(n===u)return;u=n}},pt=/^\.{1,2}(\/.*)?$/,Eu=u=>{const e=T(u);return pt.test(e)?e:`./${e}`};function gt(u,e=!1){const t=u.length;let D=0,n="",r=0,o=16,i=0,s=0,a=0,F=0,c=0;function C(l,h){let d=0,B=0;for(;d<l||!h;){let b=u.charCodeAt(D);if(b>=48&&b<=57)B=B*16+b-48;else if(b>=65&&b<=70)B=B*16+b-65+10;else if(b>=97&&b<=102)B=B*16+b-97+10;else break;D++,d++}return d<l&&(B=-1),B}function E(l){D=l,n="",r=0,o=16,c=0}function f(){let l=D;if(u.charCodeAt(D)===48)D++;else for(D++;D<u.length&&_(u.charCodeAt(D));)D++;if(D<u.length&&u.charCodeAt(D)===46)if(D++,D<u.length&&_(u.charCodeAt(D)))for(D++;D<u.length&&_(u.charCodeAt(D));)D++;else return c=3,u.substring(l,D);let h=D;if(D<u.length&&(u.charCodeAt(D)===69||u.charCodeAt(D)===101))if(D++,(D<u.length&&u.charCodeAt(D)===43||u.charCodeAt(D)===45)&&D++,D<u.length&&_(u.charCodeAt(D))){for(D++;D<u.length&&_(u.charCodeAt(D));)D++;h=D}else c=3;return u.substring(l,h)}function g(){let l="",h=D;for(;;){if(D>=t){l+=u.substring(h,D),c=2;break}const d=u.charCodeAt(D);if(d===34){l+=u.substring(h,D),D++;break}if(d===92){if(l+=u.substring(h,D),D++,D>=t){c=2;break}switch(u.charCodeAt(D++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`
31
- `;break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:const B=C(4,!0);B>=0?l+=String.fromCharCode(B):c=4;break;default:c=5}h=D;continue}if(d>=0&&d<=31)if(W(d)){l+=u.substring(h,D),c=2;break}else c=6;D++}return l}function y(){if(n="",c=0,r=D,s=i,F=a,D>=t)return r=t,o=17;let l=u.charCodeAt(D);if(fu(l)){do D++,n+=String.fromCharCode(l),l=u.charCodeAt(D);while(fu(l));return o=15}if(W(l))return D++,n+=String.fromCharCode(l),l===13&&u.charCodeAt(D)===10&&(D++,n+=`
32
- `),i++,a=D,o=14;switch(l){case 123:return D++,o=1;case 125:return D++,o=2;case 91:return D++,o=3;case 93:return D++,o=4;case 58:return D++,o=6;case 44:return D++,o=5;case 34:return D++,n=g(),o=10;case 47:const h=D-1;if(u.charCodeAt(D+1)===47){for(D+=2;D<t&&!W(u.charCodeAt(D));)D++;return n=u.substring(h,D),o=12}if(u.charCodeAt(D+1)===42){D+=2;const d=t-1;let B=!1;for(;D<d;){const b=u.charCodeAt(D);if(b===42&&u.charCodeAt(D+1)===47){D+=2,B=!0;break}D++,W(b)&&(b===13&&u.charCodeAt(D)===10&&D++,i++,a=D)}return B||(D++,c=1),n=u.substring(h,D),o=13}return n+=String.fromCharCode(l),D++,o=16;case 45:if(n+=String.fromCharCode(l),D++,D===t||!_(u.charCodeAt(D)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=f(),o=11;default:for(;D<t&&k(l);)D++,l=u.charCodeAt(D);if(r!==D){switch(n=u.substring(r,D),n){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return n+=String.fromCharCode(l),D++,o=16}}function k(l){if(fu(l)||W(l))return!1;switch(l){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function $(){let l;do l=y();while(l>=12&&l<=15);return l}return{setPosition:E,getPosition:()=>D,scan:e?$:y,getToken:()=>o,getTokenValue:()=>n,getTokenOffset:()=>r,getTokenLength:()=>D-r,getTokenStartLine:()=>s,getTokenStartCharacter:()=>r-F,getTokenError:()=>c}}function fu(u){return u===32||u===9}function W(u){return u===10||u===13}function _(u){return u>=48&&u<=57}var eD;(function(u){u[u.lineFeed=10]="lineFeed",u[u.carriageReturn=13]="carriageReturn",u[u.space=32]="space",u[u._0=48]="_0",u[u._1=49]="_1",u[u._2=50]="_2",u[u._3=51]="_3",u[u._4=52]="_4",u[u._5=53]="_5",u[u._6=54]="_6",u[u._7=55]="_7",u[u._8=56]="_8",u[u._9=57]="_9",u[u.a=97]="a",u[u.b=98]="b",u[u.c=99]="c",u[u.d=100]="d",u[u.e=101]="e",u[u.f=102]="f",u[u.g=103]="g",u[u.h=104]="h",u[u.i=105]="i",u[u.j=106]="j",u[u.k=107]="k",u[u.l=108]="l",u[u.m=109]="m",u[u.n=110]="n",u[u.o=111]="o",u[u.p=112]="p",u[u.q=113]="q",u[u.r=114]="r",u[u.s=115]="s",u[u.t=116]="t",u[u.u=117]="u",u[u.v=118]="v",u[u.w=119]="w",u[u.x=120]="x",u[u.y=121]="y",u[u.z=122]="z",u[u.A=65]="A",u[u.B=66]="B",u[u.C=67]="C",u[u.D=68]="D",u[u.E=69]="E",u[u.F=70]="F",u[u.G=71]="G",u[u.H=72]="H",u[u.I=73]="I",u[u.J=74]="J",u[u.K=75]="K",u[u.L=76]="L",u[u.M=77]="M",u[u.N=78]="N",u[u.O=79]="O",u[u.P=80]="P",u[u.Q=81]="Q",u[u.R=82]="R",u[u.S=83]="S",u[u.T=84]="T",u[u.U=85]="U",u[u.V=86]="V",u[u.W=87]="W",u[u.X=88]="X",u[u.Y=89]="Y",u[u.Z=90]="Z",u[u.asterisk=42]="asterisk",u[u.backslash=92]="backslash",u[u.closeBrace=125]="closeBrace",u[u.closeBracket=93]="closeBracket",u[u.colon=58]="colon",u[u.comma=44]="comma",u[u.dot=46]="dot",u[u.doubleQuote=34]="doubleQuote",u[u.minus=45]="minus",u[u.openBrace=123]="openBrace",u[u.openBracket=91]="openBracket",u[u.plus=43]="plus",u[u.slash=47]="slash",u[u.formFeed=12]="formFeed",u[u.tab=9]="tab"})(eD||(eD={}));var X;(function(u){u.DEFAULT={allowTrailingComma:!1}})(X||(X={}));function ht(u,e=[],t=X.DEFAULT){let D=null,n=[];const r=[];function o(i){Array.isArray(n)?n.push(i):D!==null&&(n[D]=i)}return mt(u,{onObjectBegin:()=>{const i={};o(i),r.push(n),n=i,D=null},onObjectProperty:i=>{D=i},onObjectEnd:()=>{n=r.pop()},onArrayBegin:()=>{const i=[];o(i),r.push(n),n=i,D=null},onArrayEnd:()=>{n=r.pop()},onLiteralValue:o,onError:(i,s,a)=>{e.push({error:i,offset:s,length:a})}},t),n[0]}function mt(u,e,t=X.DEFAULT){const D=gt(u,!1),n=[];function r(m){return m?()=>m(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}function o(m){return m?()=>m(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}function i(m){return m?A=>m(A,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}function s(m){return m?A=>m(A,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}const a=o(e.onObjectBegin),F=s(e.onObjectProperty),c=r(e.onObjectEnd),C=o(e.onArrayBegin),E=r(e.onArrayEnd),f=s(e.onLiteralValue),g=i(e.onSeparator),y=r(e.onComment),k=i(e.onError),$=t&&t.disallowComments,l=t&&t.allowTrailingComma;function h(){for(;;){const m=D.scan();switch(D.getTokenError()){case 4:d(14);break;case 5:d(15);break;case 3:d(13);break;case 1:$||d(11);break;case 2:d(12);break;case 6:d(16);break}switch(m){case 12:case 13:$?d(10):y();break;case 16:d(1);break;case 15:case 14:break;default:return m}}}function d(m,A=[],Bu=[]){if(k(m),A.length+Bu.length>0){let V=D.getToken();for(;V!==17;){if(A.indexOf(V)!==-1){h();break}else if(Bu.indexOf(V)!==-1)break;V=h()}}}function B(m){const A=D.getTokenValue();return m?f(A):(F(A),n.push(A)),h(),!0}function b(){switch(D.getToken()){case 11:const m=D.getTokenValue();let A=Number(m);isNaN(A)&&(d(2),A=0),f(A);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return h(),!0}function mD(){return D.getToken()!==10?(d(3,[],[2,5]),!1):(B(!1),D.getToken()===6?(g(":"),h(),eu()||d(4,[],[2,5])):d(5,[],[2,5]),n.pop(),!0)}function BD(){a(),h();let m=!1;for(;D.getToken()!==2&&D.getToken()!==17;){if(D.getToken()===5){if(m||d(4,[],[]),g(","),h(),D.getToken()===2&&l)break}else m&&d(6,[],[]);mD()||d(4,[],[2,5]),m=!0}return c(),D.getToken()!==2?d(7,[2],[]):h(),!0}function AD(){C(),h();let m=!0,A=!1;for(;D.getToken()!==4&&D.getToken()!==17;){if(D.getToken()===5){if(A||d(4,[],[]),g(","),h(),D.getToken()===4&&l)break}else A&&d(6,[],[]);m?(n.push(0),m=!1):n[n.length-1]++,eu()||d(4,[],[4,5]),A=!0}return E(),m||n.pop(),D.getToken()!==4?d(8,[4],[]):h(),!0}function eu(){switch(D.getToken()){case 3:return AD();case 1:return BD();case 10:return B(!0);default:return b()}}return h(),D.getToken()===17?t.allowEmptyContent?!0:(d(4,[],[]),!1):eu()?(D.getToken()!==17&&d(9,[],[]),!0):(d(4,[],[]),!1)}var tD;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(tD||(tD={}));var nD;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(nD||(nD={}));const Bt=ht;var rD;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(rD||(rD={}));const oD=(u,e)=>Bt(dt(e,u,"utf8")),At=Symbol("implicitBaseUrl"),bt=()=>{const{findPnpApi:u}=wu;return u&&u(process.cwd())},du=(u,e,t,D)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${t}`;if(D!=null&&D.has(n))return D.get(n);const r=oD(u,D);if(!r)return;let o=e||"tsconfig.json";if(!t&&r.exports)try{const[i]=Et(r.exports,e,["require","types"]);o=i}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=p.join(u,"..",o),D?.set(n,o),o},pu="package.json",gu="tsconfig.json",yt=(u,e,t)=>{let D=u;if(u===".."&&(D=p.join(D,gu)),u[0]==="."&&(D=p.resolve(e,D)),p.isAbsolute(D)){if(v(t,D)){if(Q(t,D).isFile())return D}else if(!D.endsWith(".json")){const E=`${D}.json`;if(v(t,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,i=r.join("/"),s=bt();if(s){const{resolveRequest:E}=s;try{if(o===u){const f=E(p.join(o,pu),e);if(f){const g=du(f,i,!1,t);if(g&&v(t,g))return g}}else{let f;try{f=E(u,e,{extensions:[".json"]})}catch{f=E(p.join(u,gu),e)}if(f)return f}}catch{}}const a=DD(e,p.join("node_modules",o),t);if(!a||!Q(t,a).isDirectory())return;const F=p.join(a,pu);if(v(t,F)){const E=du(F,i,!1,t);if(E===!1)return;if(E&&v(t,E)&&Q(t,E).isFile())return E}const c=p.join(a,i),C=c.endsWith(".json");if(!C){const E=`${c}.json`;if(v(t,E))return E}if(v(t,c)){if(Q(t,c).isDirectory()){const E=p.join(c,pu);if(v(t,E)){const g=du(E,"",!0,t);if(g&&v(t,g))return g}const f=p.join(c,gu);if(v(t,f))return f}else if(C)return c}},wt=(u,e,t,D)=>{const n=yt(u,e,D);if(!n)throw new Error(`File '${u}' not found.`);if(t.has(n))throw new Error(`Circularity detected while resolving configuration: ${n}`);t.add(n);const r=p.dirname(n),o=iD(n,D,t);delete o.references;const{compilerOptions:i}=o;if(i){const s=["baseUrl","outDir"];for(const a of s){const F=i[a];F&&(i[a]=T(p.relative(e,p.join(r,F)))||"./")}}return o.files&&(o.files=o.files.map(s=>T(p.relative(e,p.join(r,s))))),o.include&&(o.include=o.include.map(s=>T(p.relative(e,p.join(r,s))))),o.exclude&&(o.exclude=o.exclude.map(s=>T(p.relative(e,p.join(r,s))))),o},iD=(u,e,t=new Set)=>{let D;try{D=ft(e,u)}catch{throw new Error(`Cannot resolve tsconfig at path: ${u}`)}let n=oD(D,e)||{};if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const r=p.dirname(D);if(n.compilerOptions){const{compilerOptions:o}=n;o.paths&&!o.baseUrl&&(o[At]=r)}if(n.extends){const o=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const i of o.reverse()){const s=wt(i,r,new Set(t),e),a={...s,...n,compilerOptions:{...s.compilerOptions,...n.compilerOptions}};s.watchOptions&&(a.watchOptions={...s.watchOptions,...n.watchOptions}),n=a}}if(n.compilerOptions){const{compilerOptions:o}=n,i=["baseUrl","rootDir"];for(const a of i){const F=o[a];if(F){const c=p.resolve(r,F),C=Eu(p.relative(r,c));o[a]=C}}const{outDir:s}=o;s&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(s)||n.exclude.push(s),o.outDir=Eu(s))}else n.compilerOptions={};if(n.files&&(n.files=n.files.map(Eu)),n.include&&(n.include=n.include.map(T)),n.watchOptions){const{watchOptions:o}=n;o.excludeDirectories&&(o.excludeDirectories=o.excludeDirectories.map(i=>T(p.resolve(r,i))))}return n},$t=(u,e=new Map)=>iD(u,e),vt=(u=process.cwd(),e="tsconfig.json",t=new Map)=>{const D=DD(T(u),e,t);if(!D)return null;const n=$t(D,t);return{path:D,config:n}};p.posix,process.platform;const sD=vt(),xt=u=>{const e=kD.createFilter(/\.([cm]?ts|[jt]sx)$/);return{name:"esbuild-transform",transform:async(t,D)=>{if(!e(D))return null;const n=await yu.transform(t,{...u,loader:"default",sourcefile:D.replace(/\.[cm]ts/,".ts"),tsconfigRaw:sD?.config});return{code:n.code,map:n.map||null}}}},kt=u=>{if(u==="es")return"esm";if(u==="cjs"||u==="iife")return u},Ot=u=>({name:"esbuild-minify",renderChunk:async(e,t,D)=>{const n=await yu.transform(e,{...u,format:kt(D.format),minify:!0});return{code:n.code,map:n.map||null}}}),hu=(u,e)=>u[0]-e[0]||u[1]-e[1]||u[2]-e[2],aD=({target:u})=>{const e=u.some(t=>{if(t=t.trim(),!t.startsWith("node"))return;const D=t.slice(4).split(".").map(Number),n=[D[0],D[1]??0,D[2]??0];return!(hu(n,[12,20,0])>=0&&hu(n,[13,0,0])<0||hu(n,[14,13,1])>=0)});return{name:"externalize-node-builtins",resolveId:t=>{const D=t.startsWith("node:");if(e&&D&&(t=t.slice(5)),wu.builtinModules.includes(t)||D)return{id:t,external:!0}}}},jt=u=>({name:"patch-binary",renderChunk:(e,t,D)=>{if(!t.isEntry||!t.facadeModuleId)return;const n=D.entryFileNames,r=`./${p.posix.join(D.dir,n(t))}`;if(u.includes(r)){const o=new $u(e);return o.prepend(`#!/usr/bin/env node
33
- `),{code:o.toString(),map:D.sourcemap?o.generateMap({hires:!0}):void 0}}},writeBundle:async(e,t)=>{const D=e.entryFileNames,n=Object.values(t).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const i=`./${p.posix.join(e.dir,D(o))}`;await O.promises.chmod(i,493)}});await Promise.all(n)}}),cD=()=>{const u=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-typescript-mjs-cjs",resolveId(e,t,D){return u.test(e)&&t?this.resolve(e.replace(/js(x?)$/,"ts$1"),t,D):null}}},lD=/^#!.*/,Tt=()=>({name:"strip-hashbang",transform:u=>{if(!lD.test(u))return null;const e=new $u(u);return e.replace(lD,""),{code:e.toString(),map:e.generateMap({hires:!0})}}}),St=["peerDependencies","dependencies","optionalDependencies"],mu="@types/",FD=(u,e,t=!1)=>{const D=[],{devDependencies:n}=u;for(const r of St){const o=u[r];if(!o)continue;const i=Object.keys(o);for(const s of i)if(!(s in e))if(s.startsWith(mu)){if(t){let a=s.slice(mu.length);a.includes("__")&&(a=`@${a.replace("__","/")}`),D.push(a)}}else{if(n&&t){const a=mu+s.replace("@","").replace("/","__");n[a]&&!(a in o)&&console.warn(`Recommendation: "${a}" is externalized because "${s}" is in "${r}". Place "${a}" in "${r}" as well so users don't have missing types.`)}D.push(s)}}return D.flatMap(r=>[r,new RegExp(`^${r}/`)])},CD=u=>u.split("?")[0],ED={type:async u=>{const e=await Promise.resolve().then(function(){return require("./rollup-plugin-dts-DRxj1yaY.js")});return{input:[],preserveEntrySignatures:"strict",plugins:[aD(u),cD(),e.default({respectExternal:!0,compilerOptions:{composite:!1}})],output:[],external:[]}},app:(u,e,t,D)=>{const n={target:u.target};return{input:[],preserveEntrySignatures:"strict",plugins:[aD(u),cD(),vD({entries:e}),yD({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),...Object.keys(t).length>0?[bu({preventAssignment:!0,objectGuards:!0,values:t})]:[],Tt(),wD(),$D(),xt(n),nt(),...u.minify?[Ot(n)]:[],jt(D)],output:[],external:[]}}},Pt=async(u,e,t,D,n,r)=>{const o=t.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),i=Object.create(null),s=Object.fromEntries(D.env.map(({key:c,value:C})=>[`process.env.${c}`,JSON.stringify(C)])),a=FD(r,n),F=FD(r,n,!0);for(const{input:c,srcExtension:C,distExtension:E,exportEntry:f}of t){if(f.type==="types"){let l=i.type;l||(l=await ED.type(D),l.external=F,i.type=l),l.input.includes(c)||l.input.push(c),l.output.push({dir:e,entryFileNames:h=>O.realpathSync.native(CD(h.facadeModuleId)).slice(u.length,-C.length)+E,exports:"auto",format:"esm"});continue}let g=i.app;g||(g=ED.app(D,n,s,o),g.external=a,i.app=g),g.input.includes(c)||g.input.push(c);const y=g.output,k=p.extname(f.outputPath),$=`${f.type}-${k}`;if(!y[$]){const l={dir:e,exports:"auto",format:f.type,chunkFileNames:`[name]-[hash]${k}`,sourcemap:D.sourcemap,plugins:[rt(f.type==="module")],entryFileNames:h=>{const B=O.realpathSync.native(CD(h.facadeModuleId)).slice(u.length),[b]=B.split(".");return b+E}};y.push(l),y[$]=l}}return i};let P=!0;const L=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let q=0;if(L.process&&L.process.env&&L.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:t,TERM:D,COLORTERM:n}=L.process.env;e||t||u==="0"?P=!1:u==="1"||u==="2"||u==="3"?P=!0:D==="dumb"?P=!1:"CI"in L.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in L.process.env)?P=!0:P=process.stdout.isTTY,P&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?q=3:D&&(D.endsWith("-256color")||D.endsWith("256"))?q=2:q=1)}let fD={enabled:P,supportLevel:q};function Nt(u,e,t=1){const D=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>fD.enabled&&fD.supportLevel>=t?D+(""+o).replace(r,D)+n:""+o}const It=Nt(90,39),_t=()=>new Date().toLocaleTimeString(),uu=(...u)=>console.log(`[${It(_t())}]`,...u),{stringify:dD}=JSON,z=Ze({name:"pkgroll",version:He,flags:{src:{type:String,description:"Source directory",default:"./src"},dist:{type:String,description:"Distribution directory",default:"./dist"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[u=>{const[e,t]=u.split("=");return{key:e,value:t}}],description:"Compile-time environment variables (eg. --env.NODE_ENV=production)"},exportCondition:{type:[String],description:"Export conditions for resolving dependency export and import maps (eg. --export-condition=node)"},sourcemap:{type:u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${dD(u)}`)},description:"Sourcemap generation. Provide `inline` option for inline sourcemap (eg. --sourcemap, --sourcemap=inline)"}},help:{description:"Minimalistic package bundler",render:(u,e)=>(e.flagOperator=t=>t.name==="env"?".key=":" ",e.render(u))}}),pD=process.cwd(),gD=J(z.flags.src,!0),Du=J(z.flags.dist,!0),hD=sD?.config.compilerOptions?.target;hD&&z.flags.target.push(hD),(async()=>{const u=await Je(pD);let e=Qe(u);if(e=e.filter(n=>{const r=n.outputPath.startsWith(Du);return r||console.warn(`Ignoring entry outside of ${Du} directory: package.json#${n.from}=${dD(n.outputPath)}`),r}),e.length===0)throw new Error("No export entries found in package.json");const t=await Promise.all(e.map(async n=>({...await tt(n,gD,Du),exportEntry:n}))),D=await Pt(J(O.realpathSync.native(gD),!0),Du,t,z.flags,Xe(u,pD),u);z.flags.watch?(uu("Watch initialized"),Object.values(D).map(async n=>{Au.watch(n).on("event",async o=>{o.code==="BUNDLE_START"&&uu("Building",...Array.isArray(o.input)?o.input:[o.input]),o.code==="BUNDLE_END"&&(await Promise.all(n.output.map(i=>o.result.write(i))),uu("Built",...Array.isArray(o.input)?o.input:[o.input])),o.code==="ERROR"&&uu("Error:",o.error.message)})})):await Promise.all(Object.values(D).map(async n=>{const r=await Au.rollup(n);return Promise.all(n.output.map(o=>r.write(o)))}))})().catch(u=>{console.error(u),process.exit(1)});
30
+ `}),"createRequire"),st=i(u=>{const e=$u({[Xu]:u}).renderChunk;return{name:"create-require-insert-format",renderChunk:{order:"pre",handler:typeof e=="function"?e:e.handler}}},"isFormatEsm"),uD=i(u=>u!==null&&typeof u=="object","A"),_=i((u,e)=>Object.assign(new Error(`[${u}]: ${e}`),{code:u}),"a"),DD="ERR_INVALID_PACKAGE_CONFIG",Eu="ERR_INVALID_PACKAGE_TARGET",at="ERR_PACKAGE_PATH_NOT_EXPORTED",lt=/^\d+$/,ct=/^(\.{1,2}|node_modules)$/i,Ft=/\/|\\/;var eD=(u=>(u.Export="exports",u.Import="imports",u))(eD||{});const fu=i((u,e,t,D,n)=>{if(e==null)return[];if(typeof e=="string"){const[r,...o]=e.split(Ft);if(r===".."||o.some(s=>ct.test(s)))throw _(Eu,`Invalid "${u}" target "${e}" defined in the package config`);return[n?e.replace(/\*/g,n):e]}if(Array.isArray(e))return e.flatMap(r=>fu(u,r,t,D,n));if(uD(e)){for(const r of Object.keys(e)){if(lt.test(r))throw _(DD,"Cannot contain numeric property keys");if(r==="default"||D.includes(r))return fu(u,e[r],t,D,n)}return[]}throw _(Eu,`Invalid "${u}" target "${e}"`)},"f"),z="*",Ct=i((u,e)=>{const t=u.indexOf(z),D=e.indexOf(z);return t===D?e.length>u.length:D>t},"m");function Et(u,e){if(!e.includes(z)&&u.hasOwnProperty(e))return[e];let t,D;for(const n of Object.keys(u))if(n.includes(z)){const[r,o,s]=n.split(z);if(s===void 0&&e.startsWith(r)&&e.endsWith(o)){const a=e.slice(r.length,-o.length||void 0);a&&(!t||Ct(t,n))&&(t=n,D=a)}}return[t,D]}i(Et,"d");const ft=i(u=>Object.keys(u).reduce((e,t)=>{const D=t===""||t[0]!==".";if(e===void 0||e===D)return D;throw _(DD,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),pt=/^\w+:/,dt=i((u,e,t)=>{if(!u)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof u=="string"||Array.isArray(u)||uD(u)&&ft(u))&&(u={".":u});const[D,n]=Et(u,e),r=fu(eD.Export,u[D],e,t,n);if(r.length===0)throw _(at,e==="."?'No "exports" main defined':`Package subpath '${e}' is not defined by "exports"`);for(const o of r)if(!o.startsWith("./")&&!pt.test(o))throw _(Eu,`Invalid "exports" target "${o}" defined in the package config`);return r},"v");function S(u){return u.startsWith("\\\\?\\")?u:u.replace(/\\/g,"/")}i(S,"B");const pu=i(u=>{const e=j[u];return(t,...D)=>{const n=`${u}:${D.join(":")}`;let r=t?.get(n);return r===void 0&&(r=Reflect.apply(e,j,D),t?.set(n,r)),r}},"W"),x=pu("existsSync"),gt=pu("readFileSync"),uu=pu("statSync"),tD=i((u,e,t)=>{for(;;){const D=g.posix.join(u,e);if(x(t,D))return D;const n=g.dirname(u);if(n===u)return;u=n}},"q"),ht=/^\.{1,2}(\/.*)?$/,du=i(u=>{const e=S(u);return ht.test(e)?e:`./${e}`},"J");function mt(u,e=!1){const t=u.length;let D=0,n="",r=0,o=16,s=0,a=0,l=0,C=0,c=0;function f(F,m){let d=0,A=0;for(;d<F||!m;){let y=u.charCodeAt(D);if(y>=48&&y<=57)A=A*16+y-48;else if(y>=65&&y<=70)A=A*16+y-65+10;else if(y>=97&&y<=102)A=A*16+y-97+10;else break;D++,d++}return d<F&&(A=-1),A}i(f,"E");function E(F){D=F,n="",r=0,o=16,c=0}i(E,"b");function p(){let F=D;if(u.charCodeAt(D)===48)D++;else for(D++;D<u.length&&R(u.charCodeAt(D));)D++;if(D<u.length&&u.charCodeAt(D)===46)if(D++,D<u.length&&R(u.charCodeAt(D)))for(D++;D<u.length&&R(u.charCodeAt(D));)D++;else return c=3,u.substring(F,D);let m=D;if(D<u.length&&(u.charCodeAt(D)===69||u.charCodeAt(D)===101))if(D++,(D<u.length&&u.charCodeAt(D)===43||u.charCodeAt(D)===45)&&D++,D<u.length&&R(u.charCodeAt(D))){for(D++;D<u.length&&R(u.charCodeAt(D));)D++;m=D}else c=3;return u.substring(F,m)}i(p,"T");function h(){let F="",m=D;for(;;){if(D>=t){F+=u.substring(m,D),c=2;break}const d=u.charCodeAt(D);if(d===34){F+=u.substring(m,D),D++;break}if(d===92){if(F+=u.substring(m,D),D++,D>=t){c=2;break}switch(u.charCodeAt(D++)){case 34:F+='"';break;case 92:F+="\\";break;case 47:F+="/";break;case 98:F+="\b";break;case 102:F+="\f";break;case 110:F+=`
31
+ `;break;case 114:F+="\r";break;case 116:F+=" ";break;case 117:const A=f(4,!0);A>=0?F+=String.fromCharCode(A):c=4;break;default:c=5}m=D;continue}if(d>=0&&d<=31)if(V(d)){F+=u.substring(m,D),c=2;break}else c=6;D++}return F}i(h,"k");function w(){if(n="",c=0,r=D,a=s,C=l,D>=t)return r=t,o=17;let F=u.charCodeAt(D);if(gu(F)){do D++,n+=String.fromCharCode(F),F=u.charCodeAt(D);while(gu(F));return o=15}if(V(F))return D++,n+=String.fromCharCode(F),F===13&&u.charCodeAt(D)===10&&(D++,n+=`
32
+ `),s++,l=D,o=14;switch(F){case 123:return D++,o=1;case 125:return D++,o=2;case 91:return D++,o=3;case 93:return D++,o=4;case 58:return D++,o=6;case 44:return D++,o=5;case 34:return D++,n=h(),o=10;case 47:const m=D-1;if(u.charCodeAt(D+1)===47){for(D+=2;D<t&&!V(u.charCodeAt(D));)D++;return n=u.substring(m,D),o=12}if(u.charCodeAt(D+1)===42){D+=2;const d=t-1;let A=!1;for(;D<d;){const y=u.charCodeAt(D);if(y===42&&u.charCodeAt(D+1)===47){D+=2,A=!0;break}D++,V(y)&&(y===13&&u.charCodeAt(D)===10&&D++,s++,l=D)}return A||(D++,c=1),n=u.substring(m,D),o=13}return n+=String.fromCharCode(F),D++,o=16;case 45:if(n+=String.fromCharCode(F),D++,D===t||!R(u.charCodeAt(D)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=p(),o=11;default:for(;D<t&&O(F);)D++,F=u.charCodeAt(D);if(r!==D){switch(n=u.substring(r,D),n){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return n+=String.fromCharCode(F),D++,o=16}}i(w,"j");function O(F){if(gu(F)||V(F))return!1;switch(F){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}i(O,"L");function v(){let F;do F=w();while(F>=12&&F<=15);return F}return i(v,"U"),{setPosition:E,getPosition:()=>D,scan:e?v:w,getToken:()=>o,getTokenValue:()=>n,getTokenOffset:()=>r,getTokenLength:()=>D-r,getTokenStartLine:()=>a,getTokenStartCharacter:()=>r-C,getTokenError:()=>c}}i(mt,"be");function gu(u){return u===32||u===9}i(gu,"M");function V(u){return u===10||u===13}i(V,"N");function R(u){return u>=48&&u<=57}i(R,"y");var nD;(function(u){u[u.lineFeed=10]="lineFeed",u[u.carriageReturn=13]="carriageReturn",u[u.space=32]="space",u[u._0=48]="_0",u[u._1=49]="_1",u[u._2=50]="_2",u[u._3=51]="_3",u[u._4=52]="_4",u[u._5=53]="_5",u[u._6=54]="_6",u[u._7=55]="_7",u[u._8=56]="_8",u[u._9=57]="_9",u[u.a=97]="a",u[u.b=98]="b",u[u.c=99]="c",u[u.d=100]="d",u[u.e=101]="e",u[u.f=102]="f",u[u.g=103]="g",u[u.h=104]="h",u[u.i=105]="i",u[u.j=106]="j",u[u.k=107]="k",u[u.l=108]="l",u[u.m=109]="m",u[u.n=110]="n",u[u.o=111]="o",u[u.p=112]="p",u[u.q=113]="q",u[u.r=114]="r",u[u.s=115]="s",u[u.t=116]="t",u[u.u=117]="u",u[u.v=118]="v",u[u.w=119]="w",u[u.x=120]="x",u[u.y=121]="y",u[u.z=122]="z",u[u.A=65]="A",u[u.B=66]="B",u[u.C=67]="C",u[u.D=68]="D",u[u.E=69]="E",u[u.F=70]="F",u[u.G=71]="G",u[u.H=72]="H",u[u.I=73]="I",u[u.J=74]="J",u[u.K=75]="K",u[u.L=76]="L",u[u.M=77]="M",u[u.N=78]="N",u[u.O=79]="O",u[u.P=80]="P",u[u.Q=81]="Q",u[u.R=82]="R",u[u.S=83]="S",u[u.T=84]="T",u[u.U=85]="U",u[u.V=86]="V",u[u.W=87]="W",u[u.X=88]="X",u[u.Y=89]="Y",u[u.Z=90]="Z",u[u.asterisk=42]="asterisk",u[u.backslash=92]="backslash",u[u.closeBrace=125]="closeBrace",u[u.closeBracket=93]="closeBracket",u[u.colon=58]="colon",u[u.comma=44]="comma",u[u.dot=46]="dot",u[u.doubleQuote=34]="doubleQuote",u[u.minus=45]="minus",u[u.openBrace=123]="openBrace",u[u.openBracket=91]="openBracket",u[u.plus=43]="plus",u[u.slash=47]="slash",u[u.formFeed=12]="formFeed",u[u.tab=9]="tab"})(nD||(nD={})),new Array(20).fill(0).map((u,e)=>" ".repeat(e));const L=200;new Array(L).fill(0).map((u,e)=>`
33
+ `+" ".repeat(e)),new Array(L).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(L).fill(0).map((u,e)=>`\r
34
+ `+" ".repeat(e)),new Array(L).fill(0).map((u,e)=>`
35
+ `+" ".repeat(e)),new Array(L).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(L).fill(0).map((u,e)=>`\r
36
+ `+" ".repeat(e));var Du;(function(u){u.DEFAULT={allowTrailingComma:!1}})(Du||(Du={}));function Bt(u,e=[],t=Du.DEFAULT){let D=null,n=[];const r=[];function o(s){Array.isArray(n)?n.push(s):D!==null&&(n[D]=s)}return i(o,"o"),At(u,{onObjectBegin:()=>{const s={};o(s),r.push(n),n=s,D=null},onObjectProperty:s=>{D=s},onObjectEnd:()=>{n=r.pop()},onArrayBegin:()=>{const s=[];o(s),r.push(n),n=s,D=null},onArrayEnd:()=>{n=r.pop()},onLiteralValue:o,onError:(s,a,l)=>{e.push({error:s,offset:a,length:l})}},t),n[0]}i(Bt,"we");function At(u,e,t=Du.DEFAULT){const D=mt(u,!1),n=[];function r(B){return B?()=>B(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}i(r,"s");function o(B){return B?()=>B(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(o,"o");function s(B){return B?b=>B(b,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}i(s,"m");function a(B){return B?b=>B(b,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(a,"u");const l=o(e.onObjectBegin),C=a(e.onObjectProperty),c=r(e.onObjectEnd),f=o(e.onArrayBegin),E=r(e.onArrayEnd),p=a(e.onLiteralValue),h=s(e.onSeparator),w=r(e.onComment),O=s(e.onError),v=t&&t.disallowComments,F=t&&t.allowTrailingComma;function m(){for(;;){const B=D.scan();switch(D.getTokenError()){case 4:d(14);break;case 5:d(15);break;case 3:d(13);break;case 1:v||d(11);break;case 2:d(12);break;case 6:d(16);break}switch(B){case 12:case 13:v?d(10):w();break;case 16:d(1);break;case 15:case 14:break;default:return B}}}i(m,"g");function d(B,b=[],yu=[]){if(O(B),b.length+yu.length>0){let Z=D.getToken();for(;Z!==17;){if(b.indexOf(Z)!==-1){m();break}else if(yu.indexOf(Z)!==-1)break;Z=m()}}}i(d,"c");function A(B){const b=D.getTokenValue();return B?p(b):(C(b),n.push(b)),m(),!0}i(A,"$");function y(){switch(D.getToken()){case 11:const B=D.getTokenValue();let b=Number(B);isNaN(b)&&(d(2),b=0),p(b);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return m(),!0}i(y,"A");function AD(){return D.getToken()!==10?(d(3,[],[2,5]),!1):(A(!1),D.getToken()===6?(h(":"),m(),tu()||d(4,[],[2,5])):d(5,[],[2,5]),n.pop(),!0)}i(AD,"ce");function bD(){l(),m();let B=!1;for(;D.getToken()!==2&&D.getToken()!==17;){if(D.getToken()===5){if(B||d(4,[],[]),h(","),m(),D.getToken()===2&&F)break}else B&&d(6,[],[]);AD()||d(4,[],[2,5]),B=!0}return c(),D.getToken()!==2?d(7,[2],[]):m(),!0}i(bD,"pe");function yD(){f(),m();let B=!0,b=!1;for(;D.getToken()!==4&&D.getToken()!==17;){if(D.getToken()===5){if(b||d(4,[],[]),h(","),m(),D.getToken()===4&&F)break}else b&&d(6,[],[]);B?(n.push(0),B=!1):n[n.length-1]++,tu()||d(4,[],[4,5]),b=!0}return E(),B||n.pop(),D.getToken()!==4?d(8,[4],[]):m(),!0}i(yD,"me");function tu(){switch(D.getToken()){case 3:return yD();case 1:return bD();case 10:return A(!0);default:return y()}}return i(tu,"S"),m(),D.getToken()===17?t.allowEmptyContent?!0:(d(4,[],[]),!1):tu()?(D.getToken()!==17&&d(9,[],[]),!0):(d(4,[],[]),!1)}i(At,"Te");var rD;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(rD||(rD={}));var oD;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(oD||(oD={}));const bt=Bt;var iD;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(iD||(iD={}));const sD=i((u,e)=>bt(gt(e,u,"utf8")),"te"),yt=Symbol("implicitBaseUrl"),wt=i(()=>{const{findPnpApi:u}=xu;return u&&u(process.cwd())},"Ae"),hu=i((u,e,t,D)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${t}`;if(D!=null&&D.has(n))return D.get(n);const r=sD(u,D);if(!r)return;let o=e||"tsconfig.json";if(!t&&r.exports)try{const[s]=dt(r.exports,e,["require","types"]);o=s}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=g.join(u,"..",o),D?.set(n,o),o},"G"),mu="package.json",Bu="tsconfig.json",$t=i((u,e,t)=>{let D=u;if(u===".."&&(D=g.join(D,Bu)),u[0]==="."&&(D=g.resolve(e,D)),g.isAbsolute(D)){if(x(t,D)){if(uu(t,D).isFile())return D}else if(!D.endsWith(".json")){const E=`${D}.json`;if(x(t,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,s=r.join("/"),a=wt();if(a){const{resolveRequest:E}=a;try{if(o===u){const p=E(g.join(o,mu),e);if(p){const h=hu(p,s,!1,t);if(h&&x(t,h))return h}}else{let p;try{p=E(u,e,{extensions:[".json"]})}catch{p=E(g.join(u,Bu),e)}if(p)return p}}catch{}}const l=tD(g.resolve(e),g.join("node_modules",o),t);if(!l||!uu(t,l).isDirectory())return;const C=g.join(l,mu);if(x(t,C)){const E=hu(C,s,!1,t);if(E===!1)return;if(E&&x(t,E)&&uu(t,E).isFile())return E}const c=g.join(l,s),f=c.endsWith(".json");if(!f){const E=`${c}.json`;if(x(t,E))return E}if(x(t,c)){if(uu(t,c).isDirectory()){const E=g.join(c,mu);if(x(t,E)){const h=hu(E,"",!0,t);if(h&&x(t,h))return h}const p=g.join(c,Bu);if(x(t,p))return p}else if(f)return c}},"Oe"),vt=i((u,e,t,D)=>{const n=$t(u,e,D);if(!n)throw new Error(`File '${u}' not found.`);if(t.has(n))throw new Error(`Circularity detected while resolving configuration: ${n}`);t.add(n);const r=g.dirname(n),o=aD(n,D,t);delete o.references;const{compilerOptions:s}=o;if(s){const a=["baseUrl","outDir"];for(const l of a){const C=s[l];C&&(s[l]=S(g.relative(e,g.join(r,C)))||"./")}}return o.files&&(o.files=o.files.map(a=>S(g.relative(e,g.join(r,a))))),o.include&&(o.include=o.include.map(a=>S(g.relative(e,g.join(r,a))))),o.exclude&&(o.exclude=o.exclude.map(a=>S(g.relative(e,g.join(r,a))))),o},"je"),aD=i((u,e,t=new Set)=>{let D;try{D=sD(u,e)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${u}`)}if(typeof D!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const n=g.dirname(u);if(D.compilerOptions){const{compilerOptions:r}=D;r.paths&&!r.baseUrl&&(r[yt]=n)}if(D.extends){const r=Array.isArray(D.extends)?D.extends:[D.extends];delete D.extends;for(const o of r.reverse()){const s=vt(o,n,new Set(t),e),a={...s,...D,compilerOptions:{...s.compilerOptions,...D.compilerOptions}};s.watchOptions&&(a.watchOptions={...s.watchOptions,...D.watchOptions}),D=a}}if(D.compilerOptions){const{compilerOptions:r}=D,o=["baseUrl","rootDir"];for(const a of o){const l=r[a];if(l){const C=g.resolve(n,l),c=du(g.relative(n,C));r[a]=c}}const{outDir:s}=r;s&&(Array.isArray(D.exclude)||(D.exclude=[]),D.exclude.includes(s)||D.exclude.push(s),r.outDir=du(s))}else D.compilerOptions={};if(D.files&&(D.files=D.files.map(du)),D.include&&(D.include=D.include.map(S)),D.watchOptions){const{watchOptions:r}=D;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>S(g.resolve(n,o))))}return D},"ie"),xt=i((u,e=new Map)=>aD(u,e),"le"),kt=i((u=process.cwd(),e="tsconfig.json",t=new Map)=>{const D=tD(S(u),e,t);if(!D)return null;const n=xt(D,t);return{path:D,config:n}},"$e");g.posix,process.platform;const lD=kt(),Ot=i(u=>{const e=TD.createFilter(/\.([cm]?ts|[jt]sx)$/);return{name:"esbuild-transform",transform:async(t,D)=>{if(!e(D))return null;const n=await vu.transform(t,{...u,loader:"default",sourcefile:D.replace(/\.[cm]ts/,".ts"),tsconfigRaw:lD?.config});return{code:n.code,map:n.map||null}}}},"esbuildTransform"),jt=i(u=>{if(u==="es")return"esm";if(u==="cjs"||u==="iife")return u},"getEsbuildFormat"),Tt=i(u=>({name:"esbuild-minify",renderChunk:async(e,t,D)=>{const n=await vu.transform(e,{...u,format:jt(D.format),minify:!0,keepNames:!0});return{code:n.code,map:n.map||null}}}),"esbuildMinify"),Au=i((u,e)=>u[0]-e[0]||u[1]-e[1]||u[2]-e[2],"compareSemver"),cD=i(({target:u})=>{const e=u.some(t=>{if(t=t.trim(),!t.startsWith("node"))return;const D=t.slice(4).split(".").map(Number),n=[D[0],D[1]??0,D[2]??0];return!(Au(n,[12,20,0])>=0&&Au(n,[13,0,0])<0||Au(n,[14,13,1])>=0)});return{name:"externalize-node-builtins",resolveId:t=>{const D=t.startsWith("node:");if(e&&D&&(t=t.slice(5)),xu.builtinModules.includes(t)||D)return{id:t,external:!0}}}},"externalizeNodeBuiltins"),St=i(u=>({name:"patch-binary",renderChunk:(e,t,D)=>{if(!t.isEntry||!t.facadeModuleId)return;const n=D.entryFileNames,r=`./${g.posix.join(D.dir,n(t))}`;if(u.includes(r)){const o=new ku(e);return o.prepend(`#!/usr/bin/env node
37
+ `),{code:o.toString(),map:D.sourcemap?o.generateMap({hires:!0}):void 0}}},writeBundle:async(e,t)=>{const D=e.entryFileNames,n=Object.values(t).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const s=`./${g.posix.join(e.dir,D(o))}`;await j.promises.chmod(s,493)}});await Promise.all(n)}}),"patchBinary"),FD=i(()=>{const u=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-typescript-mjs-cjs",resolveId(e,t,D){return u.test(e)&&t?this.resolve(e.replace(/js(x?)$/,"ts$1"),t,D):null}}},"resolveTypescriptMjsCts"),CD=/^#!.*/,Pt=i(()=>({name:"strip-hashbang",transform:u=>{if(!CD.test(u))return null;const e=new ku(u);return e.replace(CD,""),{code:e.toString(),map:e.generateMap({hires:!0})}}}),"stripHashbang"),Nt=["peerDependencies","dependencies","optionalDependencies"],bu="@types/",ED=i((u,e,t=!1)=>{const D=[],{devDependencies:n}=u;for(const r of Nt){const o=u[r];if(!o)continue;const s=Object.keys(o);for(const a of s)if(!(a in e))if(a.startsWith(bu)){if(t){let l=a.slice(bu.length);l.includes("__")&&(l=`@${l.replace("__","/")}`),D.push(l)}}else{if(n&&t){const l=bu+a.replace("@","").replace("/","__");n[l]&&!(l in o)&&console.warn(`Recommendation: "${l}" is externalized because "${a}" is in "${r}". Place "${l}" in "${r}" as well so users don't have missing types.`)}D.push(a)}}return D.flatMap(r=>[r,new RegExp(`^${r}/`)])},"getExternalDependencies"),fD=i(u=>u.split("?")[0],"stripQuery"),pD={type:async u=>{const e=await Promise.resolve().then(function(){return require("./rollup-plugin-dts-BzOer96X.js")});return{input:[],preserveEntrySignatures:"strict",plugins:[cD(u),FD(),e.default({respectExternal:!0,compilerOptions:{composite:!1}})],output:[],external:[]}},app:(u,e,t,D)=>{const n={target:u.target};return{input:[],preserveEntrySignatures:"strict",plugins:[cD(u),FD(),OD({entries:e}),vD({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),...Object.keys(t).length>0?[$u({preventAssignment:!0,objectGuards:!0,values:t})]:[],Pt(),xD(),kD(),Ot(n),it(),...u.minify?[Tt(n)]:[],St(D)],output:[],external:[]}}},It=i(async(u,e,t,D,n,r)=>{const o=t.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),s=Object.create(null),a=Object.fromEntries(D.env.map(({key:c,value:f})=>[`process.env.${c}`,JSON.stringify(f)])),l=ED(r,n),C=ED(r,n,!0);for(const{input:c,srcExtension:f,distExtension:E,exportEntry:p}of t){if(p.type==="types"){let F=s.type;F||(F=await pD.type(D),F.external=C,s.type=F),F.input.includes(c)||F.input.push(c),F.output.push({dir:e,entryFileNames:m=>j.realpathSync.native(fD(m.facadeModuleId)).slice(u.length,-f.length)+E,exports:"auto",format:"esm"});continue}let h=s.app;h||(h=pD.app(D,n,a,o),h.external=l,s.app=h),h.input.includes(c)||h.input.push(c);const w=h.output,O=g.extname(p.outputPath),v=`${p.type}-${O}`;if(!w[v]){const F={dir:e,exports:"auto",format:p.type,chunkFileNames:`[name]-[hash]${O}`,sourcemap:D.sourcemap,plugins:[st(p.type==="module")],entryFileNames:m=>{const A=j.realpathSync.native(fD(m.facadeModuleId)).slice(u.length),[y]=A.split(".");return y+E}};w.push(F),w[v]=F}}return s},"getRollupConfigs");let N=!0;const M=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let G=0;if(M.process&&M.process.env&&M.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:t,TERM:D,COLORTERM:n}=M.process.env;e||t||u==="0"?N=!1:u==="1"||u==="2"||u==="3"?N=!0:D==="dumb"?N=!1:"CI"in M.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in M.process.env)?N=!0:N=process.stdout.isTTY,N&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?G=3:D&&(D.endsWith("-256color")||D.endsWith("256"))?G=2:G=1)}let dD={enabled:N,supportLevel:G};function _t(u,e,t=1){const D=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>dD.enabled&&dD.supportLevel>=t?D+(""+o).replace(r,D)+n:""+o}i(_t,"kolorist");const Rt=_t(90,39),Lt=i(()=>new Date().toLocaleTimeString(),"currentTime"),eu=i((...u)=>console.log(`[${Rt(Lt())}]`,...u),"log"),Mt=i(async u=>{await cu(u)&&await j.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:gD}=JSON,U=Ye({name:"pkgroll",version:Qe,flags:{src:{type:String,description:"Source directory",default:"./src"},dist:{type:String,description:"Distribution directory",default:"./dist"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[u=>{const[e,t]=u.split("=");return{key:e,value:t}}],description:"Compile-time environment variables (eg. --env.NODE_ENV=production)"},exportCondition:{type:[String],description:"Export conditions for resolving dependency export and import maps (eg. --export-condition=node)"},sourcemap:{type:u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${gD(u)}`)},description:"Sourcemap generation. Provide `inline` option for inline sourcemap (eg. --sourcemap, --sourcemap=inline)"},cleanDist:{type:Boolean,description:"Clean dist before bundling",default:!1}},help:{description:"Minimalistic package bundler",render:(u,e)=>(e.flagOperator=t=>t.name==="env"?".key=":" ",e.render(u))}}),hD=process.cwd(),mD=X(U.flags.src,!0),K=X(U.flags.dist,!0),BD=lD?.config.compilerOptions?.target;BD&&U.flags.target.push(BD),(async()=>{const u=await Xe(hD);let e=Dt(u);if(e=e.filter(n=>{const r=n.outputPath.startsWith(K);return r||console.warn(`Ignoring entry outside of ${K} directory: package.json#${n.from}=${gD(n.outputPath)}`),r}),e.length===0)throw new Error("No export entries found in package.json");const t=await Promise.all(e.map(async n=>({...await ot(n,mD,K),exportEntry:n}))),D=await It(X(j.realpathSync.native(mD),!0),K,t,U.flags,et(u,hD),u);U.flags.cleanDist&&await Mt(K),U.flags.watch?(eu("Watch initialized"),Object.values(D).map(async n=>{wu.watch(n).on("event",async o=>{o.code==="BUNDLE_START"&&eu("Building",...Array.isArray(o.input)?o.input:[o.input]),o.code==="BUNDLE_END"&&(await Promise.all(n.output.map(s=>o.result.write(s))),eu("Built",...Array.isArray(o.input)?o.input:[o.input])),o.code==="ERROR"&&eu("Error:",o.error.message)})})):await Promise.all(Object.values(D).map(async n=>{const r=await wu.rollup(n);return Promise.all(n.output.map(o=>r.write(o)))}))})().catch(u=>{console.error(u),process.exit(1)});
@@ -0,0 +1,30 @@
1
+ "use strict";var st=Object.defineProperty;var g=(r,e)=>st(r,"name",{value:e,configurable:!0});var ut=require("module"),ot=require("path"),ct=require("tty"),lt=require("os"),ft=require("magic-string"),me=typeof document<"u"?document.currentScript:null;function pt(r){var e=Object.create(null);return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})}}),e.default=r,Object.freeze(e)}g(pt,"_interopNamespaceDefault");var T=pt(ot),W=require;const dt=g(()=>{const r=process.cwd();try{return W.resolve("typescript",{paths:[r]})}catch{throw new Error(`Could not find \`typescript\` in ${r}`)}},"getLocalTypescriptPath");var c=W(dt()),G={},P={},j={};Object.defineProperty(j,"__esModule",{value:!0}),j.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,j.matchToToken=function(r){var e={type:"invalid",value:r[0],closed:void 0};return r[1]?(e.type="string",e.closed=!!(r[3]||r[4])):r[5]?e.type="comment":r[6]?(e.type="comment",e.closed=!!r[7]):r[8]?e.type="regex":r[9]?e.type="number":r[10]?e.type="name":r[11]?e.type="punctuator":r[12]&&(e.type="whitespace"),e};var he={},$={};Object.defineProperty($,"__esModule",{value:!0}),$.isIdentifierChar=ve,$.isIdentifierName=gt,$.isIdentifierStart=ye;let z="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",be="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";const mt=new RegExp("["+z+"]"),ht=new RegExp("["+z+be+"]");z=be=null;const ge=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],bt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function V(r,e){let t=65536;for(let n=0,o=e.length;n<o;n+=2){if(t+=e[n],t>r)return!1;if(t+=e[n+1],t>=r)return!0}return!1}g(V,"isInAstralSet");function ye(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&mt.test(String.fromCharCode(r)):V(r,ge)}g(ye,"isIdentifierStart");function ve(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&ht.test(String.fromCharCode(r)):V(r,ge)||V(r,bt)}g(ve,"isIdentifierChar");function gt(r){let e=!0;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if((n&64512)===55296&&t+1<r.length){const o=r.charCodeAt(++t);(o&64512)===56320&&(n=65536+((n&1023)<<10)+(o&1023))}if(e){if(e=!1,!ye(n))return!1}else if(!ve(n))return!1}return!e}g(gt,"isIdentifierName");var M={};Object.defineProperty(M,"__esModule",{value:!0}),M.isKeyword=St,M.isReservedWord=xe,M.isStrictBindOnlyReservedWord=Se,M.isStrictBindReservedWord=wt,M.isStrictReservedWord=we;const U={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},yt=new Set(U.keyword),vt=new Set(U.strict),xt=new Set(U.strictBind);function xe(r,e){return e&&r==="await"||r==="enum"}g(xe,"isReservedWord");function we(r,e){return xe(r,e)||vt.has(r)}g(we,"isStrictReservedWord");function Se(r){return xt.has(r)}g(Se,"isStrictBindOnlyReservedWord");function wt(r,e){return we(r,e)||Se(r)}g(wt,"isStrictBindReservedWord");function St(r){return yt.has(r)}g(St,"isKeyword"),function(r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isIdentifierChar",{enumerable:!0,get:function(){return e.isIdentifierChar}}),Object.defineProperty(r,"isIdentifierName",{enumerable:!0,get:function(){return e.isIdentifierName}}),Object.defineProperty(r,"isIdentifierStart",{enumerable:!0,get:function(){return e.isIdentifierStart}}),Object.defineProperty(r,"isKeyword",{enumerable:!0,get:function(){return t.isKeyword}}),Object.defineProperty(r,"isReservedWord",{enumerable:!0,get:function(){return t.isReservedWord}}),Object.defineProperty(r,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return t.isStrictBindOnlyReservedWord}}),Object.defineProperty(r,"isStrictBindReservedWord",{enumerable:!0,get:function(){return t.isStrictBindReservedWord}}),Object.defineProperty(r,"isStrictReservedWord",{enumerable:!0,get:function(){return t.isStrictReservedWord}});var e=$,t=M}(he);function Ct(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}g(Ct,"commonjsRequire");var H={exports:{}};let Ce=process.argv||[],A=process.env,Et=!("NO_COLOR"in A||Ce.includes("--no-color"))&&("FORCE_COLOR"in A||Ce.includes("--color")||process.platform==="win32"||Ct!=null&&ct.isatty(1)&&A.TERM!=="dumb"||"CI"in A),Tt=g((r,e,t=r)=>n=>{let o=""+n,h=o.indexOf(e,r.length);return~h?r+Nt(o,e,t,h)+e:r+o+e},"formatter"),Nt=g((r,e,t,n)=>{let o="",h=0;do o+=r.substring(h,n)+t,h=n+e.length,n=r.indexOf(e,h);while(~n);return o+r.substring(h)},"replaceClose"),Ee=g((r=Et)=>{let e=r?Tt:()=>String;return{isColorSupported:r,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m")}},"createColors");H.exports=Ee(),H.exports.createColors=Ee;var Te=H.exports,X={exports:{}},Y,Ne;function Ot(){if(Ne)return Y;Ne=1;var r=/[|\\{}()[\]^$+*?.]/g;return Y=g(function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(r,"\\$&")},"escapeStringRegexp"),Y}g(Ot,"requireEscapeStringRegexp");var L={exports:{}},J={exports:{}},Q,Oe;function kt(){return Oe||(Oe=1,Q={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Q}g(kt,"requireColorName");var ke;function De(){if(ke)return J.exports;ke=1;var r=kt(),e={};for(var t in r)r.hasOwnProperty(t)&&(e[r[t]]=t);var n=J.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in n)if(n.hasOwnProperty(o)){if(!("channels"in n[o]))throw new Error("missing channels property: "+o);if(!("labels"in n[o]))throw new Error("missing channel labels property: "+o);if(n[o].labels.length!==n[o].channels)throw new Error("channel and label counts mismatch: "+o);var h=n[o].channels,p=n[o].labels;delete n[o].channels,delete n[o].labels,Object.defineProperty(n[o],"channels",{value:h}),Object.defineProperty(n[o],"labels",{value:p})}n.rgb.hsl=function(a){var i=a[0]/255,s=a[1]/255,u=a[2]/255,l=Math.min(i,s,u),m=Math.max(i,s,u),f=m-l,d,y,v;return m===l?d=0:i===m?d=(s-u)/f:s===m?d=2+(u-i)/f:u===m&&(d=4+(i-s)/f),d=Math.min(d*60,360),d<0&&(d+=360),v=(l+m)/2,m===l?y=0:v<=.5?y=f/(m+l):y=f/(2-m-l),[d,y*100,v*100]},n.rgb.hsv=function(a){var i,s,u,l,m,f=a[0]/255,d=a[1]/255,y=a[2]/255,v=Math.max(f,d,y),w=v-Math.min(f,d,y),x=g(function(S){return(v-S)/6/w+1/2},"diffc");return w===0?l=m=0:(m=w/v,i=x(f),s=x(d),u=x(y),f===v?l=u-s:d===v?l=1/3+i-u:y===v&&(l=2/3+s-i),l<0?l+=1:l>1&&(l-=1)),[l*360,m*100,v*100]},n.rgb.hwb=function(a){var i=a[0],s=a[1],u=a[2],l=n.rgb.hsl(a)[0],m=1/255*Math.min(i,Math.min(s,u));return u=1-1/255*Math.max(i,Math.max(s,u)),[l,m*100,u*100]},n.rgb.cmyk=function(a){var i=a[0]/255,s=a[1]/255,u=a[2]/255,l,m,f,d;return d=Math.min(1-i,1-s,1-u),l=(1-i-d)/(1-d)||0,m=(1-s-d)/(1-d)||0,f=(1-u-d)/(1-d)||0,[l*100,m*100,f*100,d*100]};function b(a,i){return Math.pow(a[0]-i[0],2)+Math.pow(a[1]-i[1],2)+Math.pow(a[2]-i[2],2)}return g(b,"comparativeDistance"),n.rgb.keyword=function(a){var i=e[a];if(i)return i;var s=1/0,u;for(var l in r)if(r.hasOwnProperty(l)){var m=r[l],f=b(a,m);f<s&&(s=f,u=l)}return u},n.keyword.rgb=function(a){return r[a]},n.rgb.xyz=function(a){var i=a[0]/255,s=a[1]/255,u=a[2]/255;i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92;var l=i*.4124+s*.3576+u*.1805,m=i*.2126+s*.7152+u*.0722,f=i*.0193+s*.1192+u*.9505;return[l*100,m*100,f*100]},n.rgb.lab=function(a){var i=n.rgb.xyz(a),s=i[0],u=i[1],l=i[2],m,f,d;return s/=95.047,u/=100,l/=108.883,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,l=l>.008856?Math.pow(l,1/3):7.787*l+16/116,m=116*u-16,f=500*(s-u),d=200*(u-l),[m,f,d]},n.hsl.rgb=function(a){var i=a[0]/360,s=a[1]/100,u=a[2]/100,l,m,f,d,y;if(s===0)return y=u*255,[y,y,y];u<.5?m=u*(1+s):m=u+s-u*s,l=2*u-m,d=[0,0,0];for(var v=0;v<3;v++)f=i+1/3*-(v-1),f<0&&f++,f>1&&f--,6*f<1?y=l+(m-l)*6*f:2*f<1?y=m:3*f<2?y=l+(m-l)*(2/3-f)*6:y=l,d[v]=y*255;return d},n.hsl.hsv=function(a){var i=a[0],s=a[1]/100,u=a[2]/100,l=s,m=Math.max(u,.01),f,d;return u*=2,s*=u<=1?u:2-u,l*=m<=1?m:2-m,d=(u+s)/2,f=u===0?2*l/(m+l):2*s/(u+s),[i,f*100,d*100]},n.hsv.rgb=function(a){var i=a[0]/60,s=a[1]/100,u=a[2]/100,l=Math.floor(i)%6,m=i-Math.floor(i),f=255*u*(1-s),d=255*u*(1-s*m),y=255*u*(1-s*(1-m));switch(u*=255,l){case 0:return[u,y,f];case 1:return[d,u,f];case 2:return[f,u,y];case 3:return[f,d,u];case 4:return[y,f,u];case 5:return[u,f,d]}},n.hsv.hsl=function(a){var i=a[0],s=a[1]/100,u=a[2]/100,l=Math.max(u,.01),m,f,d;return d=(2-s)*u,m=(2-s)*l,f=s*l,f/=m<=1?m:2-m,f=f||0,d/=2,[i,f*100,d*100]},n.hwb.rgb=function(a){var i=a[0]/360,s=a[1]/100,u=a[2]/100,l=s+u,m,f,d,y;l>1&&(s/=l,u/=l),m=Math.floor(6*i),f=1-u,d=6*i-m,m&1&&(d=1-d),y=s+d*(f-s);var v,w,x;switch(m){default:case 6:case 0:v=f,w=y,x=s;break;case 1:v=y,w=f,x=s;break;case 2:v=s,w=f,x=y;break;case 3:v=s,w=y,x=f;break;case 4:v=y,w=s,x=f;break;case 5:v=f,w=s,x=y;break}return[v*255,w*255,x*255]},n.cmyk.rgb=function(a){var i=a[0]/100,s=a[1]/100,u=a[2]/100,l=a[3]/100,m,f,d;return m=1-Math.min(1,i*(1-l)+l),f=1-Math.min(1,s*(1-l)+l),d=1-Math.min(1,u*(1-l)+l),[m*255,f*255,d*255]},n.xyz.rgb=function(a){var i=a[0]/100,s=a[1]/100,u=a[2]/100,l,m,f;return l=i*3.2406+s*-1.5372+u*-.4986,m=i*-.9689+s*1.8758+u*.0415,f=i*.0557+s*-.204+u*1.057,l=l>.0031308?1.055*Math.pow(l,1/2.4)-.055:l*12.92,m=m>.0031308?1.055*Math.pow(m,1/2.4)-.055:m*12.92,f=f>.0031308?1.055*Math.pow(f,1/2.4)-.055:f*12.92,l=Math.min(Math.max(0,l),1),m=Math.min(Math.max(0,m),1),f=Math.min(Math.max(0,f),1),[l*255,m*255,f*255]},n.xyz.lab=function(a){var i=a[0],s=a[1],u=a[2],l,m,f;return i/=95.047,s/=100,u/=108.883,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,l=116*s-16,m=500*(i-s),f=200*(s-u),[l,m,f]},n.lab.xyz=function(a){var i=a[0],s=a[1],u=a[2],l,m,f;m=(i+16)/116,l=s/500+m,f=m-u/200;var d=Math.pow(m,3),y=Math.pow(l,3),v=Math.pow(f,3);return m=d>.008856?d:(m-16/116)/7.787,l=y>.008856?y:(l-16/116)/7.787,f=v>.008856?v:(f-16/116)/7.787,l*=95.047,m*=100,f*=108.883,[l,m,f]},n.lab.lch=function(a){var i=a[0],s=a[1],u=a[2],l,m,f;return l=Math.atan2(u,s),m=l*360/2/Math.PI,m<0&&(m+=360),f=Math.sqrt(s*s+u*u),[i,f,m]},n.lch.lab=function(a){var i=a[0],s=a[1],u=a[2],l,m,f;return f=u/360*2*Math.PI,l=s*Math.cos(f),m=s*Math.sin(f),[i,l,m]},n.rgb.ansi16=function(a){var i=a[0],s=a[1],u=a[2],l=1 in arguments?arguments[1]:n.rgb.hsv(a)[2];if(l=Math.round(l/50),l===0)return 30;var m=30+(Math.round(u/255)<<2|Math.round(s/255)<<1|Math.round(i/255));return l===2&&(m+=60),m},n.hsv.ansi16=function(a){return n.rgb.ansi16(n.hsv.rgb(a),a[2])},n.rgb.ansi256=function(a){var i=a[0],s=a[1],u=a[2];if(i===s&&s===u)return i<8?16:i>248?231:Math.round((i-8)/247*24)+232;var l=16+36*Math.round(i/255*5)+6*Math.round(s/255*5)+Math.round(u/255*5);return l},n.ansi16.rgb=function(a){var i=a%10;if(i===0||i===7)return a>50&&(i+=3.5),i=i/10.5*255,[i,i,i];var s=(~~(a>50)+1)*.5,u=(i&1)*s*255,l=(i>>1&1)*s*255,m=(i>>2&1)*s*255;return[u,l,m]},n.ansi256.rgb=function(a){if(a>=232){var i=(a-232)*10+8;return[i,i,i]}a-=16;var s,u=Math.floor(a/36)/5*255,l=Math.floor((s=a%36)/6)/5*255,m=s%6/5*255;return[u,l,m]},n.rgb.hex=function(a){var i=((Math.round(a[0])&255)<<16)+((Math.round(a[1])&255)<<8)+(Math.round(a[2])&255),s=i.toString(16).toUpperCase();return"000000".substring(s.length)+s},n.hex.rgb=function(a){var i=a.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i)return[0,0,0];var s=i[0];i[0].length===3&&(s=s.split("").map(function(d){return d+d}).join(""));var u=parseInt(s,16),l=u>>16&255,m=u>>8&255,f=u&255;return[l,m,f]},n.rgb.hcg=function(a){var i=a[0]/255,s=a[1]/255,u=a[2]/255,l=Math.max(Math.max(i,s),u),m=Math.min(Math.min(i,s),u),f=l-m,d,y;return f<1?d=m/(1-f):d=0,f<=0?y=0:l===i?y=(s-u)/f%6:l===s?y=2+(u-i)/f:y=4+(i-s)/f+4,y/=6,y%=1,[y*360,f*100,d*100]},n.hsl.hcg=function(a){var i=a[1]/100,s=a[2]/100,u=1,l=0;return s<.5?u=2*i*s:u=2*i*(1-s),u<1&&(l=(s-.5*u)/(1-u)),[a[0],u*100,l*100]},n.hsv.hcg=function(a){var i=a[1]/100,s=a[2]/100,u=i*s,l=0;return u<1&&(l=(s-u)/(1-u)),[a[0],u*100,l*100]},n.hcg.rgb=function(a){var i=a[0]/360,s=a[1]/100,u=a[2]/100;if(s===0)return[u*255,u*255,u*255];var l=[0,0,0],m=i%1*6,f=m%1,d=1-f,y=0;switch(Math.floor(m)){case 0:l[0]=1,l[1]=f,l[2]=0;break;case 1:l[0]=d,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=f;break;case 3:l[0]=0,l[1]=d,l[2]=1;break;case 4:l[0]=f,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=d}return y=(1-s)*u,[(s*l[0]+y)*255,(s*l[1]+y)*255,(s*l[2]+y)*255]},n.hcg.hsv=function(a){var i=a[1]/100,s=a[2]/100,u=i+s*(1-i),l=0;return u>0&&(l=i/u),[a[0],l*100,u*100]},n.hcg.hsl=function(a){var i=a[1]/100,s=a[2]/100,u=s*(1-i)+.5*i,l=0;return u>0&&u<.5?l=i/(2*u):u>=.5&&u<1&&(l=i/(2*(1-u))),[a[0],l*100,u*100]},n.hcg.hwb=function(a){var i=a[1]/100,s=a[2]/100,u=i+s*(1-i);return[a[0],(u-i)*100,(1-u)*100]},n.hwb.hcg=function(a){var i=a[1]/100,s=a[2]/100,u=1-s,l=u-i,m=0;return l<1&&(m=(u-l)/(1-l)),[a[0],l*100,m*100]},n.apple.rgb=function(a){return[a[0]/65535*255,a[1]/65535*255,a[2]/65535*255]},n.rgb.apple=function(a){return[a[0]/255*65535,a[1]/255*65535,a[2]/255*65535]},n.gray.rgb=function(a){return[a[0]/100*255,a[0]/100*255,a[0]/100*255]},n.gray.hsl=n.gray.hsv=function(a){return[0,0,a[0]]},n.gray.hwb=function(a){return[0,100,a[0]]},n.gray.cmyk=function(a){return[0,0,0,a[0]]},n.gray.lab=function(a){return[a[0],0,0]},n.gray.hex=function(a){var i=Math.round(a[0]/100*255)&255,s=(i<<16)+(i<<8)+i,u=s.toString(16).toUpperCase();return"000000".substring(u.length)+u},n.rgb.gray=function(a){var i=(a[0]+a[1]+a[2])/3;return[i/255*100]},J.exports}g(De,"requireConversions");var Z,Re;function Dt(){if(Re)return Z;Re=1;var r=De();function e(){for(var h={},p=Object.keys(r),b=p.length,a=0;a<b;a++)h[p[a]]={distance:-1,parent:null};return h}g(e,"buildGraph");function t(h){var p=e(),b=[h];for(p[h].distance=0;b.length;)for(var a=b.pop(),i=Object.keys(r[a]),s=i.length,u=0;u<s;u++){var l=i[u],m=p[l];m.distance===-1&&(m.distance=p[a].distance+1,m.parent=a,b.unshift(l))}return p}g(t,"deriveBFS");function n(h,p){return function(b){return p(h(b))}}g(n,"link");function o(h,p){for(var b=[p[h].parent,h],a=r[p[h].parent][h],i=p[h].parent;p[i].parent;)b.unshift(p[i].parent),a=n(r[p[i].parent][i],a),i=p[i].parent;return a.conversion=b,a}return g(o,"wrapConversion"),Z=g(function(h){for(var p=t(h),b={},a=Object.keys(p),i=a.length,s=0;s<i;s++){var u=a[s],l=p[u];l.parent!==null&&(b[u]=o(u,p))}return b},"route"),Z}g(Dt,"requireRoute");var ee,Me;function Rt(){if(Me)return ee;Me=1;var r=De(),e=Dt(),t={},n=Object.keys(r);function o(p){var b=g(function(a){return a==null?a:(arguments.length>1&&(a=Array.prototype.slice.call(arguments)),p(a))},"wrappedFn");return"conversion"in p&&(b.conversion=p.conversion),b}g(o,"wrapRaw");function h(p){var b=g(function(a){if(a==null)return a;arguments.length>1&&(a=Array.prototype.slice.call(arguments));var i=p(a);if(typeof i=="object")for(var s=i.length,u=0;u<s;u++)i[u]=Math.round(i[u]);return i},"wrappedFn");return"conversion"in p&&(b.conversion=p.conversion),b}return g(h,"wrapRounded"),n.forEach(function(p){t[p]={},Object.defineProperty(t[p],"channels",{value:r[p].channels}),Object.defineProperty(t[p],"labels",{value:r[p].labels});var b=e(p),a=Object.keys(b);a.forEach(function(i){var s=b[i];t[p][i]=h(s),t[p][i].raw=o(s)})}),ee=t,ee}g(Rt,"requireColorConvert"),L.exports;var Ie;function Mt(){return Ie||(Ie=1,function(r){const e=Rt(),t=g((p,b)=>function(){return`\x1B[${p.apply(e,arguments)+b}m`},"wrapAnsi16"),n=g((p,b)=>function(){const a=p.apply(e,arguments);return`\x1B[${38+b};5;${a}m`},"wrapAnsi256"),o=g((p,b)=>function(){const a=p.apply(e,arguments);return`\x1B[${38+b};2;${a[0]};${a[1]};${a[2]}m`},"wrapAnsi16m");function h(){const p=new Map,b={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],gray:[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]}};b.color.grey=b.color.gray;for(const s of Object.keys(b)){const u=b[s];for(const l of Object.keys(u)){const m=u[l];b[l]={open:`\x1B[${m[0]}m`,close:`\x1B[${m[1]}m`},u[l]=b[l],p.set(m[0],m[1])}Object.defineProperty(b,s,{value:u,enumerable:!1}),Object.defineProperty(b,"codes",{value:p,enumerable:!1})}const a=g(s=>s,"ansi2ansi"),i=g((s,u,l)=>[s,u,l],"rgb2rgb");b.color.close="\x1B[39m",b.bgColor.close="\x1B[49m",b.color.ansi={ansi:t(a,0)},b.color.ansi256={ansi256:n(a,0)},b.color.ansi16m={rgb:o(i,0)},b.bgColor.ansi={ansi:t(a,10)},b.bgColor.ansi256={ansi256:n(a,10)},b.bgColor.ansi16m={rgb:o(i,10)};for(let s of Object.keys(e)){if(typeof e[s]!="object")continue;const u=e[s];s==="ansi16"&&(s="ansi"),"ansi16"in u&&(b.color.ansi[s]=t(u.ansi16,0),b.bgColor.ansi[s]=t(u.ansi16,10)),"ansi256"in u&&(b.color.ansi256[s]=n(u.ansi256,0),b.bgColor.ansi256[s]=n(u.ansi256,10)),"rgb"in u&&(b.color.ansi16m[s]=o(u.rgb,0),b.bgColor.ansi16m[s]=o(u.rgb,10))}return b}g(h,"assembleStyles"),Object.defineProperty(r,"exports",{enumerable:!0,get:h})}(L)),L.exports}g(Mt,"requireAnsiStyles");var te,Fe;function It(){return Fe||(Fe=1,te=g((r,e)=>{e=e||process.argv;const t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),o=e.indexOf("--");return n!==-1&&(o===-1?!0:n<o)},"hasFlag")),te}g(It,"requireHasFlag");var re,Pe;function Ft(){if(Pe)return re;Pe=1;const r=lt,e=It(),t=process.env;let n;e("no-color")||e("no-colors")||e("color=false")?n=!1:(e("color")||e("colors")||e("color=true")||e("color=always"))&&(n=!0),"FORCE_COLOR"in t&&(n=t.FORCE_COLOR.length===0||parseInt(t.FORCE_COLOR,10)!==0);function o(b){return b===0?!1:{level:b,hasBasic:!0,has256:b>=2,has16m:b>=3}}g(o,"translateLevel");function h(b){if(n===!1)return 0;if(e("color=16m")||e("color=full")||e("color=truecolor"))return 3;if(e("color=256"))return 2;if(b&&!b.isTTY&&n!==!0)return 0;const a=n?1:0;if(process.platform==="win32"){const i=r.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in t)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(i=>i in t)||t.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in t)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(t.TEAMCITY_VERSION)?1:0;if(t.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in t){const i=parseInt((t.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(t.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(t.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(t.TERM)||"COLORTERM"in t?1:(t.TERM==="dumb",a)}g(h,"supportsColor");function p(b){const a=h(b);return o(a)}return g(p,"getSupportLevel"),re={supportsColor:p,stdout:p(process.stdout),stderr:p(process.stderr)},re}g(Ft,"requireSupportsColor");var ne,$e;function Pt(){if($e)return ne;$e=1;const r=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,t=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n",`
2
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function h(i){return i[0]==="u"&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):o.get(i)||i}g(h,"unescape");function p(i,s){const u=[],l=s.trim().split(/\s*,\s*/g);let m;for(const f of l)if(!isNaN(f))u.push(Number(f));else if(m=f.match(t))u.push(m[2].replace(n,(d,y,v)=>y?h(y):v));else throw new Error(`Invalid Chalk template style argument: ${f} (in style '${i}')`);return u}g(p,"parseArguments");function b(i){e.lastIndex=0;const s=[];let u;for(;(u=e.exec(i))!==null;){const l=u[1];if(u[2]){const m=p(l,u[2]);s.push([l].concat(m))}else s.push([l])}return s}g(b,"parseStyle");function a(i,s){const u={};for(const m of s)for(const f of m.styles)u[f[0]]=m.inverse?null:f.slice(1);let l=i;for(const m of Object.keys(u))if(Array.isArray(u[m])){if(!(m in l))throw new Error(`Unknown Chalk style: ${m}`);u[m].length>0?l=l[m].apply(l,u[m]):l=l[m]}return l}return g(a,"buildStyle"),ne=g((i,s)=>{const u=[],l=[];let m=[];if(s.replace(r,(f,d,y,v,w,x)=>{if(d)m.push(h(d));else if(v){const S=m.join("");m=[],l.push(u.length===0?S:a(i,u)(S)),u.push({inverse:y,styles:b(v)})}else if(w){if(u.length===0)throw new Error("Found extraneous } in Chalk template literal");l.push(a(i,u)(m.join(""))),m=[],u.pop()}else m.push(x)}),l.push(m.join("")),u.length>0){const f=`Chalk template literal is missing ${u.length} closing bracket${u.length===1?"":"s"} (\`}\`)`;throw new Error(f)}return l.join("")},"templates"),ne}g(Pt,"requireTemplates");var _e;function $t(){return _e||(_e=1,function(r){const e=Ot(),t=Mt(),n=Ft().stdout,o=Pt(),h=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),p=["ansi","ansi","ansi256","ansi16m"],b=new Set(["gray"]),a=Object.create(null);function i(d,y){y=y||{};const v=n?n.level:0;d.level=y.level===void 0?v:y.level,d.enabled="enabled"in y?y.enabled:d.level>0}g(i,"applyOptions");function s(d){if(!this||!(this instanceof s)||this.template){const y={};return i(y,d),y.template=function(){const v=[].slice.call(arguments);return f.apply(null,[y.template].concat(v))},Object.setPrototypeOf(y,s.prototype),Object.setPrototypeOf(y.template,y),y.template.constructor=s,y.template}i(this,d)}g(s,"Chalk"),h&&(t.blue.open="\x1B[94m");for(const d of Object.keys(t))t[d].closeRe=new RegExp(e(t[d].close),"g"),a[d]={get(){const y=t[d];return l.call(this,this._styles?this._styles.concat(y):[y],this._empty,d)}};a.visible={get(){return l.call(this,this._styles||[],!0,"visible")}},t.color.closeRe=new RegExp(e(t.color.close),"g");for(const d of Object.keys(t.color.ansi))b.has(d)||(a[d]={get(){const y=this.level;return function(){const w={open:t.color[p[y]][d].apply(null,arguments),close:t.color.close,closeRe:t.color.closeRe};return l.call(this,this._styles?this._styles.concat(w):[w],this._empty,d)}}});t.bgColor.closeRe=new RegExp(e(t.bgColor.close),"g");for(const d of Object.keys(t.bgColor.ansi)){if(b.has(d))continue;const y="bg"+d[0].toUpperCase()+d.slice(1);a[y]={get(){const v=this.level;return function(){const x={open:t.bgColor[p[v]][d].apply(null,arguments),close:t.bgColor.close,closeRe:t.bgColor.closeRe};return l.call(this,this._styles?this._styles.concat(x):[x],this._empty,d)}}}}const u=Object.defineProperties(()=>{},a);function l(d,y,v){const w=g(function(){return m.apply(w,arguments)},"builder");w._styles=d,w._empty=y;const x=this;return Object.defineProperty(w,"level",{enumerable:!0,get(){return x.level},set(S){x.level=S}}),Object.defineProperty(w,"enabled",{enumerable:!0,get(){return x.enabled},set(S){x.enabled=S}}),w.hasGrey=this.hasGrey||v==="gray"||v==="grey",w.__proto__=u,w}g(l,"build");function m(){const d=arguments,y=d.length;let v=String(arguments[0]);if(y===0)return"";if(y>1)for(let x=1;x<y;x++)v+=" "+d[x];if(!this.enabled||this.level<=0||!v)return this._empty?"":v;const w=t.dim.open;h&&this.hasGrey&&(t.dim.open="");for(const x of this._styles.slice().reverse())v=x.open+v.replace(x.closeRe,x.open)+x.close,v=v.replace(/\r?\n/g,`${x.close}$&${x.open}`);return t.dim.open=w,v}g(m,"applyStyle");function f(d,y){if(!Array.isArray(y))return[].slice.call(arguments,1).join(" ");const v=[].slice.call(arguments,2),w=[y.raw[0]];for(let x=1;x<y.length;x++)w.push(String(v[x-1]).replace(/[{}\\]/g,"\\$&")),w.push(String(y.raw[x]));return o(d,w.join(""))}g(f,"chalkTag"),Object.defineProperties(s.prototype,a),r.exports=s(),r.exports.supportsColor=n,r.exports.default=r.exports}(X)),X.exports}g($t,"requireChalk"),Object.defineProperty(P,"__esModule",{value:!0}),P.default=Wt,P.shouldHighlight=We;var je=j,Ae=he,ae=_t(Te,!0);function Le(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(Le=g(function(n){return n?t:e},"_getRequireWildcardCache$1"))(r)}g(Le,"_getRequireWildcardCache$1");function _t(r,e){if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=Le(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in r)if(h!=="default"&&{}.hasOwnProperty.call(r,h)){var p=o?Object.getOwnPropertyDescriptor(r,h):null;p&&(p.get||p.set)?Object.defineProperty(n,h,p):n[h]=r[h]}return n.default=r,t&&t.set(r,n),n}g(_t,"_interopRequireWildcard$1");const Be=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,ae.createColors)(!1):ae.default,Ke=g((r,e)=>t=>r(e(t)),"compose$1"),jt=new Set(["as","async","from","get","of","set"]);function At(r){return{keyword:r.cyan,capitalized:r.yellow,jsxIdentifier:r.yellow,punctuator:r.yellow,number:r.magenta,string:r.green,regex:r.magenta,comment:r.gray,invalid:Ke(Ke(r.white,r.bgRed),r.bold)}}g(At,"getDefs$1");const Lt=/\r\n|[\n\r\u2028\u2029]/,Bt=/^[()[\]{}]$/;let qe;{const r=/^[a-z][\w-]*$/i,e=g(function(t,n,o){if(t.type==="name"){if((0,Ae.isKeyword)(t.value)||(0,Ae.isStrictReservedWord)(t.value,!0)||jt.has(t.value))return"keyword";if(r.test(t.value)&&(o[n-1]==="<"||o.slice(n-2,n)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&Bt.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type},"getTokenType");qe=g(function*(t){let n;for(;n=je.default.exec(t);){const o=je.matchToToken(n);yield{type:e(o,n.index,t),value:o.value}}},"tokenize")}function Kt(r,e){let t="";for(const{type:n,value:o}of qe(e)){const h=r[n];h?t+=o.split(Lt).map(p=>h(p)).join(`
3
+ `):t+=o}return t}g(Kt,"highlightTokens");function We(r){return Be.isColorSupported||r.forceColor}g(We,"shouldHighlight");let ie;function qt(r){if(r){var e;return(e=ie)!=null||(ie=(0,ae.createColors)(!0)),ie}return Be}g(qt,"getColors$1");function Wt(r,e={}){if(r!==""&&We(e)){const t=At(qt(e.forceColor));return Kt(t,r)}else return r}g(Wt,"highlight");{let r,e;P.getChalk=({forceColor:t})=>{var n;if((n=r)!=null||(r=$t()),t){var o;return(o=e)!=null||(e=new r.constructor({enabled:!0,level:1})),e}return r}}Object.defineProperty(G,"__esModule",{value:!0}),G.codeFrameColumns=Xe,G.default=Xt;var Ge=P,se=Gt(Te,!0);function ze(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(ze=g(function(n){return n?t:e},"_getRequireWildcardCache"))(r)}g(ze,"_getRequireWildcardCache");function Gt(r,e){if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=ze(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in r)if(h!=="default"&&Object.prototype.hasOwnProperty.call(r,h)){var p=o?Object.getOwnPropertyDescriptor(r,h):null;p&&(p.get||p.set)?Object.defineProperty(n,h,p):n[h]=r[h]}return n.default=r,t&&t.set(r,n),n}g(Gt,"_interopRequireWildcard");const zt=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,se.createColors)(!1):se.default,Ve=g((r,e)=>t=>r(e(t)),"compose");let ue;function Vt(r){if(r){var e;return(e=ue)!=null||(ue=(0,se.createColors)(!0)),ue}return zt}g(Vt,"getColors");let Ue=!1;function Ut(r){return{gutter:r.gray,marker:Ve(r.red,r.bold),message:Ve(r.red,r.bold)}}g(Ut,"getDefs");const He=/\r\n|[\n\r\u2028\u2029]/;function Ht(r,e,t){const n=Object.assign({column:0,line:-1},r.start),o=Object.assign({},n,r.end),{linesAbove:h=2,linesBelow:p=3}=t||{},b=n.line,a=n.column,i=o.line,s=o.column;let u=Math.max(b-(h+1),0),l=Math.min(e.length,i+p);b===-1&&(u=0),i===-1&&(l=e.length);const m=i-b,f={};if(m)for(let d=0;d<=m;d++){const y=d+b;if(!a)f[y]=!0;else if(d===0){const v=e[y-1].length;f[y]=[a,v-a+1]}else if(d===m)f[y]=[0,s];else{const v=e[y-d].length;f[y]=[0,v]}}else a===s?a?f[b]=[a,0]:f[b]=!0:f[b]=[a,s-a];return{start:u,end:l,markerLines:f}}g(Ht,"getMarkerLines");function Xe(r,e,t={}){const n=(t.highlightCode||t.forceColor)&&(0,Ge.shouldHighlight)(t),o=Vt(t.forceColor),h=Ut(o),p=g((d,y)=>n?d(y):y,"maybeHighlight"),b=r.split(He),{start:a,end:i,markerLines:s}=Ht(e,b,t),u=e.start&&typeof e.start.column=="number",l=String(i).length;let f=(n?(0,Ge.default)(r,t):r).split(He,i).slice(a,i).map((d,y)=>{const v=a+1+y,x=` ${` ${v}`.slice(-l)} |`,S=s[v],D=!s[v+1];if(S){let E="";if(Array.isArray(S)){const k=d.slice(0,Math.max(S[0]-1,0)).replace(/[^\t]/g," "),R=S[1]||1;E=[`
4
+ `,p(h.gutter,x.replace(/\d/g," "))," ",k,p(h.marker,"^").repeat(R)].join(""),D&&t.message&&(E+=" "+p(h.message,t.message))}return[p(h.marker,">"),p(h.gutter,x),d.length>0?` ${d}`:"",E].join("")}else return` ${p(h.gutter,x)}${d.length>0?` ${d}`:""}`}).join(`
5
+ `);return t.message&&!u&&(f=`${" ".repeat(l+1)}${t.message}
6
+ ${f}`),n?o.reset(f):f}g(Xe,"codeFrameColumns");function Xt(r,e,t,n={}){if(!Ue){Ue=!0;const h="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(h,"DeprecationWarning");else{const p=new Error(h);p.name="DeprecationWarning",console.warn(new Error(h))}}return t=Math.max(t,0),Xe(r,{start:{column:t,line:e}},n)}g(Xt,"_default");function Yt(r){return{...r,compilerOptions:r.compilerOptions??{},respectExternal:r.respectExternal??!1}}g(Yt,"resolveDefaultOptions");const B=/\.d\.(c|m)?tsx?$/,Ye=".d.ts",oe={getCurrentDirectory:()=>c.sys.getCurrentDirectory(),getNewLine:()=>c.sys.newLine,getCanonicalFileName:c.sys.useCaseSensitiveFileNames?r=>r:r=>r.toLowerCase()},Jt={declaration:!0,noEmit:!1,emitDeclarationOnly:!0,noEmitOnError:!0,checkJs:!1,declarationMap:!1,skipLibCheck:!0,preserveSymlinks:!0,target:c.ScriptTarget.ESNext},_=new Map,F=g((...r)=>process.env.DTS_LOG_CACHE?console.log("[cache]",...r):null,"logCache");function Je([r,e],t){for(F(r),_.set(r,t);r!==e&&r!==T.dirname(r);){if(r=T.dirname(r),F("up",r),_.has(r))return F("has",r);_.set(r,t)}}g(Je,"cacheConfig");function ce(r,e,t){const n={...Jt,...e};let o=T.dirname(r),h=[];const p=t||o;if(_.has(p))F("HIT",p);else{F("miss",p);const s=t?T.resolve(process.cwd(),t):c.findConfigFile(o,c.sys.fileExists);if(!s)return{dtsFiles:h,dirName:o,compilerOptions:n};let u=o;o=T.dirname(s);const{config:l,error:m}=c.readConfigFile(s,c.sys.readFile);if(m)return console.error(c.formatDiagnostic(m,oe)),{dtsFiles:h,dirName:o,compilerOptions:n};F("tsconfig",l);const f=c.parseJsonConfigFileContent(l,c.sys,o);Je(t?[t,t]:[u,o],f)}const{fileNames:b,options:a,errors:i}=_.get(p);return h=b.filter(s=>B.test(s)),i.length?(console.error(c.formatDiagnostics(i,oe)),{dtsFiles:h,dirName:o,compilerOptions:n}):{dtsFiles:h,dirName:o,compilerOptions:{...a,...n}}}g(ce,"getCompilerOptions");function Qt(r,e,t){const{dtsFiles:n,compilerOptions:o}=ce(r,e,t);return c.createProgram([r].concat(Array.from(n)),o,c.createCompilerHost(o,!0))}g(Qt,"createProgram$1");function Zt(r,e,t){const n=[];let o=[],h=new Set,p="",b={};for(let a of r){if(B.test(a))continue;a=T.resolve(a);const i=ce(a,e,t);if(i.dtsFiles.forEach(h.add,h),!o.length){o.push(a),{dirName:p,compilerOptions:b}=i;continue}if(i.dirName===p)o.push(a);else{const s=c.createCompilerHost(b,!0),u=c.createProgram(o.concat(Array.from(h)),b,s);n.push(u),o=[a],{dirName:p,compilerOptions:b}=i}}if(o.length){const a=c.createCompilerHost(b,!0),i=c.createProgram(o.concat(Array.from(h)),b,a);n.push(i)}return n}g(Zt,"createPrograms");function er(){let r;try{return{codeFrameColumns:r}=W("@babel/code-frame"),r}catch{try{return{codeFrameColumns:r}=ut.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:me&&me.src||new URL("rollup-plugin-dts-BzOer96X.js",document.baseURI).href)("@babel/code-frame"),r}catch{}}}g(er,"getCodeFrame");function tr(r){const e=r.getSourceFile(),t=e.getLineAndCharacterOfPosition(r.getStart()),n=e.getLineAndCharacterOfPosition(r.getEnd());return{start:{line:t.line+1,column:t.character+1},end:{line:n.line+1,column:n.character+1}}}g(tr,"getLocation");function rr(r){const e=er(),n=r.getSourceFile().getFullText(),o=tr(r);return e?`
7
+ `+e(n,o,{highlightCode:!0}):`
8
+ ${o.start.line}:${o.start.column}: \`${r.getFullText().trim()}\``}g(rr,"frameNode");class C extends Error{static{g(this,"UnsupportedSyntaxError")}constructor(e,t="Syntax not yet supported"){super(`${t}
9
+ ${rr(e)}`)}}class nr{static{g(this,"NamespaceFixer")}constructor(e){this.sourceFile=e}findNamespaces(){const e=[],t={};for(const n of this.sourceFile.statements){const o={start:n.getStart(),end:n.getEnd()};if(c.isEmptyStatement(n)){e.unshift({name:"",exports:[],location:o});continue}if((c.isImportDeclaration(n)||c.isExportDeclaration(n))&&n.moduleSpecifier&&c.isStringLiteral(n.moduleSpecifier)){let{text:s}=n.moduleSpecifier;if(s.startsWith(".")&&(s.endsWith(".d.ts")||s.endsWith(".d.cts")||s.endsWith(".d.mts"))){let u=n.moduleSpecifier.getStart()+1,l=n.moduleSpecifier.getEnd()-1;e.unshift({name:"",exports:[],location:{start:u,end:l},textBeforeCodeAfter:s.replace(/\.d\.ts$/,".js").replace(/\.d\.cts$/,".cjs").replace(/\.d\.mts$/,".mjs")})}}if(c.isModuleDeclaration(n)&&n.body&&c.isModuleBlock(n.body)){for(const s of n.body.statements)if(c.isExportDeclaration(s)&&s.exportClause){if(c.isNamespaceExport(s.exportClause))continue;for(const u of s.exportClause.elements)u.propertyName&&u.propertyName.getText()==u.name.getText()&&e.unshift({name:"",exports:[],location:{start:u.propertyName.getEnd(),end:u.name.getEnd()}})}}if(c.isClassDeclaration(n)?t[n.name.getText()]={type:"class",generics:n.typeParameters}:c.isFunctionDeclaration(n)?t[n.name.getText()]={type:"function"}:c.isInterfaceDeclaration(n)?t[n.name.getText()]={type:"interface",generics:n.typeParameters}:c.isTypeAliasDeclaration(n)?t[n.name.getText()]={type:"type",generics:n.typeParameters}:c.isModuleDeclaration(n)&&c.isIdentifier(n.name)?t[n.name.getText()]={type:"namespace"}:c.isEnumDeclaration(n)&&(t[n.name.getText()]={type:"enum"}),!c.isVariableStatement(n))continue;const{declarations:h}=n.declarationList;if(h.length!==1)continue;const p=h[0],b=p.name.getText();if(!p.initializer||!c.isCallExpression(p.initializer)){t[b]={type:"var"};continue}const a=p.initializer.arguments[0];if(!p.initializer.expression.getFullText().includes("/*#__PURE__*/Object.freeze")||!c.isObjectLiteralExpression(a))continue;const i=[];for(const s of a.properties){if(!c.isPropertyAssignment(s)||!(c.isIdentifier(s.name)||c.isStringLiteral(s.name))||s.name.text!=="__proto__"&&!c.isIdentifier(s.initializer))throw new C(s,"Expected a property assignment");s.name.text!=="__proto__"&&i.push({exportedName:s.name.text,localName:s.initializer.getText()})}e.unshift({name:b,exports:i,location:o})}return{namespaces:e,itemTypes:t}}fix(){let e=this.sourceFile.getFullText();const{namespaces:t,itemTypes:n}=this.findNamespaces();for(const o of t){const h=e.slice(o.location.end);e=e.slice(0,o.location.start);for(const{exportedName:p,localName:b}of o.exports)if(p===b){const{type:a,generics:i}=n[b]||{};if(a==="interface"||a==="type"){const s=Qe(i);e+=`type ${o.name}_${p}${s.in} = ${b}${s.out};
10
+ `}else if(a==="enum"||a==="class"){const s=Qe(i);e+=`type ${o.name}_${p}${s.in} = ${b}${s.out};
11
+ `,e+=`declare const ${o.name}_${p}: typeof ${b};
12
+ `}else e+=`declare const ${o.name}_${p}: typeof ${b};
13
+ `}if(o.name){e+=`declare namespace ${o.name} {
14
+ `,e+=` export {
15
+ `;for(const{exportedName:p,localName:b}of o.exports)p===b?e+=` ${o.name}_${p} as ${p},
16
+ `:e+=` ${b} as ${p},
17
+ `;e+=` };
18
+ `,e+="}"}e+=o.textBeforeCodeAfter??"",e+=h}return e}}function Qe(r){return!r||!r.length?{in:"",out:""}:{in:`<${r.map(e=>e.getText()).join(", ")}>`,out:`<${r.map(e=>e.name.getText()).join(", ")}>`}}g(Qe,"renderTypeParams");let Ze=1;function ar(r){return N({type:"Program",sourceType:"module",body:[]},{start:r.getFullStart(),end:r.getEnd()})}g(ar,"createProgram");function ir(r){const e={type:"Identifier",name:String(Ze++)};return{ident:e,expr:{type:"AssignmentPattern",left:e,right:r}}}g(ir,"createReference");function O(r){return N({type:"Identifier",name:r.getText()},r)}g(O,"createIdentifier");function sr(r){const e=N({type:"FunctionExpression",id:null,params:[],body:{type:"BlockStatement",body:[]}},r),t=N({type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:String(Ze++)},arguments:[e],optional:!1}},r);return{fn:e,iife:t}}g(sr,"createIIFE");function ur(){const r={type:"ArrayExpression",elements:[]};return{expr:r,stmt:{type:"ReturnStatement",argument:r}}}g(ur,"createReturn");function or(r,e){return N({type:"FunctionDeclaration",id:N({type:"Identifier",name:c.idText(r)},r),params:[],body:{type:"BlockStatement",body:[]}},e)}g(or,"createDeclaration");function I(r){if(c.isLiteralExpression(r))return{type:"Literal",value:r.text};if(c.isPropertyAccessExpression(r)){if(c.isPrivateIdentifier(r.name))throw new C(r.name);return N({type:"MemberExpression",computed:!1,optional:!1,object:I(r.expression),property:I(r.name)},{start:r.expression.getStart(),end:r.name.getEnd()})}if(c.isIdentifier(r))return O(r);if(r.kind==c.SyntaxKind.NullKeyword)return{type:"Literal",value:null};throw new C(r)}g(I,"convertExpression");function N(r,e){let t="start"in e?e:{start:e.getStart(),end:e.getEnd()};return Object.assign(r,t)}g(N,"withStartEnd");function K(r,e){return(c.getCombinedModifierFlags(r)&e)===e}g(K,"matchesModifier");function cr({sourceFile:r}){const e=new ft(r.getFullText()),t=new Set,n=new Set;let o="";const h=new Map,p=new Map;for(const f of r.statements){if(c.isEmptyStatement(f)){e.remove(f.getStart(),f.getEnd());continue}if(c.isEnumDeclaration(f)||c.isFunctionDeclaration(f)||c.isInterfaceDeclaration(f)||c.isClassDeclaration(f)||c.isTypeAliasDeclaration(f)||c.isModuleDeclaration(f)){if(f.name){const d=f.name.getText();t.add(d),K(f,c.ModifierFlags.ExportDefault)?o=d:K(f,c.ModifierFlags.Export)&&n.add(d),f.flags&c.NodeFlags.GlobalAugmentation||m(d,[le(f),tt(f)])}c.isModuleDeclaration(f)&&lr(e,f),et(e,f)}else if(c.isVariableStatement(f)){const{declarations:d}=f.declarationList,y=K(f,c.ModifierFlags.Export);for(const E of f.declarationList.declarations)if(c.isIdentifier(E.name)){const k=E.name.getText();t.add(k),y&&n.add(k)}if(et(e,f),d.length==1){const E=d[0];c.isIdentifier(E.name)&&m(E.name.getText(),[le(f),tt(f)])}else{const E=d.slice(),k=E.shift();m(k.name.getText(),[le(f),k.getEnd()]);for(const R of E)c.isIdentifier(R.name)&&m(R.name.getText(),[R.getFullStart(),R.getEnd()])}const{flags:v}=f.declarationList,x=`declare ${v&c.NodeFlags.Let?"let":v&c.NodeFlags.Const?"const":"var"} `,S=f.declarationList.getChildren().find(E=>E.kind===c.SyntaxKind.SyntaxList).getChildren();let D=0;for(const E of S)if(E.kind===c.SyntaxKind.CommaToken)D=E.getStart(),e.remove(D,E.getEnd());else if(D){e.appendLeft(D,`;
19
+ `);const k=E.getFullStart(),R=e.slice(k,E.getStart());let de=R.length-R.trimStart().length;de?e.overwrite(k,k+de,x):e.appendLeft(k,x)}}}for(const f of r.statements)if(s(f),!!K(f,c.ModifierFlags.ExportDefault)&&(c.isFunctionDeclaration(f)||c.isClassDeclaration(f))){if(f.name)continue;o||(o=l("export_default"));const d=f.getChildren(),y=d.findIndex(S=>S.kind===c.SyntaxKind.ClassKeyword||S.kind===c.SyntaxKind.FunctionKeyword),v=d[y],w=d[y+1];if(w.kind>=c.SyntaxKind.FirstPunctuation&&w.kind<=c.SyntaxKind.LastPunctuation){const S=e.slice(v.getEnd(),w.getStart())!=" ";e.appendLeft(w.getStart(),`${S?" ":""}${o}`)}else e.appendRight(v.getEnd(),` ${o}`)}for(const f of p.values()){const y=f.pop()[0];for(const v of f)e.move(v[0],v[1],y)}o&&e.append(`
20
+ export default ${o};
21
+ `),n.size&&e.append(`
22
+ export { ${[...n].join(", ")} };
23
+ `);for(const[f,d]of h.entries())e.prepend(`import * as ${d} from "${f}";
24
+ `);const b=r.getLineStarts(),a=new Set;for(const f of r.typeReferenceDirectives){a.add(f.fileName);const{line:d}=r.getLineAndCharacterOfPosition(f.pos),y=b[d];let v=r.getLineEndOfPosition(f.pos);e.slice(v,v+1)==`
25
+ `&&(v+=1),e.remove(y,v)}const i=new Set;for(const f of r.referencedFiles){i.add(f.fileName);const{line:d}=r.getLineAndCharacterOfPosition(f.pos),y=b[d];let v=r.getLineEndOfPosition(f.pos);e.slice(v,v+1)==`
26
+ `&&(v+=1),e.remove(y,v)}return{code:e,typeReferences:a,fileReferences:i};function s(f){if(c.forEachChild(f,s),c.isImportTypeNode(f)){if(!c.isLiteralTypeNode(f.argument)||!c.isStringLiteral(f.argument.literal))throw new C(f,"inline imports should have a literal argument");const d=f.argument.literal.text,y=f.getChildren(),v=y.find(D=>D.kind===c.SyntaxKind.ImportKeyword).getStart();let w=f.getEnd();const x=y.find(D=>D.kind===c.SyntaxKind.DotToken||D.kind===c.SyntaxKind.LessThanToken);x&&(w=x.getStart());const S=u(d);e.overwrite(v,w,S)}}function u(f){let d=h.get(f);return d||(d=l(f.replace(/[^a-zA-Z0-9_$]/g,()=>"_")),h.set(f,d)),d}function l(f){let d=f;for(;t.has(d);)d=`_${d}`;return t.add(d),d}function m(f,d){let y=p.get(f);if(!y)y=[d],p.set(f,y);else{const v=y[y.length-1];v[1]===d[0]?v[1]=d[1]:y.push(d)}}}g(cr,"preProcess");function et(r,e){if(!c.canHaveModifiers(e))return;let t=!1;const n=c.isEnumDeclaration(e)||c.isClassDeclaration(e)||c.isFunctionDeclaration(e)||c.isModuleDeclaration(e)||c.isVariableStatement(e);for(const o of e.modifiers??[])switch(o.kind){case c.SyntaxKind.ExportKeyword:case c.SyntaxKind.DefaultKeyword:r.remove(o.getStart(),o.getEnd()+1);break;case c.SyntaxKind.DeclareKeyword:t=!0}n&&!t&&r.appendRight(e.getStart(),"declare ")}g(et,"fixModifiers");function lr(r,e){if(!(!e.body||!c.isModuleBlock(e.body))){for(const t of e.body.statements)if(c.isExportDeclaration(t)&&t.exportClause){if(c.isNamespaceExport(t.exportClause))continue;for(const n of t.exportClause.elements)n.propertyName||r.appendLeft(n.name.getEnd(),` as ${n.name.getText()}`)}}}g(lr,"duplicateExports");function le(r){const e=r.getFullStart();return e+(rt(r,e)?1:0)}g(le,"getStart");function tt(r){const e=r.getEnd();return e+(rt(r,e)?1:0)}g(tt,"getEnd");function rt(r,e){return r.getSourceFile().getFullText()[e]==`
27
+ `}g(rt,"newlineAt");const fr=new Set([c.SyntaxKind.LiteralType,c.SyntaxKind.VoidKeyword,c.SyntaxKind.UnknownKeyword,c.SyntaxKind.AnyKeyword,c.SyntaxKind.BooleanKeyword,c.SyntaxKind.NumberKeyword,c.SyntaxKind.StringKeyword,c.SyntaxKind.ObjectKeyword,c.SyntaxKind.NullKeyword,c.SyntaxKind.UndefinedKeyword,c.SyntaxKind.SymbolKeyword,c.SyntaxKind.NeverKeyword,c.SyntaxKind.ThisKeyword,c.SyntaxKind.ThisType,c.SyntaxKind.BigIntKeyword]);class nt{static{g(this,"DeclarationScope")}constructor({id:e,range:t}){if(this.scopes=[],e)this.declaration=or(e,t);else{const{iife:o,fn:h}=sr(t);this.iife=o,this.declaration=h}const n=ur();this.declaration.body.body.push(n.stmt),this.returnExpr=n.expr}pushScope(){this.scopes.push(new Set)}popScope(e=1){for(let t=0;t<e;t++)this.scopes.pop()}pushTypeVariable(e){const t=e.getText();this.scopes[this.scopes.length-1]?.add(t)}pushReference(e){let t;if(e.type==="Identifier"?t=e.name:e.type==="MemberExpression"&&e.object.type==="Identifier"&&(t=e.object.name),t){for(const h of this.scopes)if(h.has(t))return}if(t==="this")return;const{ident:n,expr:o}=ir(e);this.declaration.params.push(o),this.returnExpr.elements.push(n)}pushIdentifierReference(e){this.pushReference(O(e))}convertEntityName(e){return c.isIdentifier(e)?O(e):N({type:"MemberExpression",computed:!1,optional:!1,object:this.convertEntityName(e.left),property:O(e.right)},e)}convertPropertyAccess(e){if(!c.isIdentifier(e.expression)&&!c.isPropertyAccessExpression(e.expression))throw new C(e.expression);if(c.isPrivateIdentifier(e.name))throw new C(e.name);let t=c.isIdentifier(e.expression)?O(e.expression):this.convertPropertyAccess(e.expression);return N({type:"MemberExpression",computed:!1,optional:!1,object:t,property:O(e.name)},e)}convertComputedPropertyName(e){if(!e.name||!c.isComputedPropertyName(e.name))return;const{expression:t}=e.name;if(!(c.isLiteralExpression(t)||c.isPrefixUnaryExpression(t))){if(c.isIdentifier(t))return this.pushReference(O(t));if(c.isPropertyAccessExpression(t))return this.pushReference(this.convertPropertyAccess(t));throw new C(t)}}convertParametersAndType(e){this.convertComputedPropertyName(e);const t=this.convertTypeParameters(e.typeParameters);for(const n of e.parameters)this.convertTypeNode(n.type);this.convertTypeNode(e.type),this.popScope(t)}convertHeritageClauses(e){for(const t of e.heritageClauses||[])for(const n of t.types)this.pushReference(I(n.expression)),this.convertTypeArguments(n)}convertTypeArguments(e){if(e.typeArguments)for(const t of e.typeArguments)this.convertTypeNode(t)}convertMembers(e){for(const t of e){if(c.isPropertyDeclaration(t)||c.isPropertySignature(t)||c.isIndexSignatureDeclaration(t)){c.isPropertyDeclaration(t)&&t.initializer&&c.isPropertyAccessExpression(t.initializer)&&this.pushReference(this.convertPropertyAccess(t.initializer)),this.convertComputedPropertyName(t),this.convertTypeNode(t.type);continue}if(c.isMethodDeclaration(t)||c.isMethodSignature(t)||c.isConstructorDeclaration(t)||c.isConstructSignatureDeclaration(t)||c.isCallSignatureDeclaration(t)||c.isGetAccessorDeclaration(t)||c.isSetAccessorDeclaration(t))this.convertParametersAndType(t);else throw new C(t)}}convertTypeParameters(e){if(!e)return 0;for(const t of e)this.convertTypeNode(t.constraint),this.convertTypeNode(t.default),this.pushScope(),this.pushTypeVariable(t.name);return e.length}convertTypeNode(e){if(e&&!fr.has(e.kind)){if(c.isTypeReferenceNode(e)){this.pushReference(this.convertEntityName(e.typeName)),this.convertTypeArguments(e);return}if(c.isTypeLiteralNode(e))return this.convertMembers(e.members);if(c.isArrayTypeNode(e))return this.convertTypeNode(e.elementType);if(c.isTupleTypeNode(e)){for(const t of e.elements)this.convertTypeNode(t);return}if(c.isNamedTupleMember(e)||c.isParenthesizedTypeNode(e)||c.isTypeOperatorNode(e)||c.isTypePredicateNode(e))return this.convertTypeNode(e.type);if(c.isUnionTypeNode(e)||c.isIntersectionTypeNode(e)){for(const t of e.types)this.convertTypeNode(t);return}if(c.isMappedTypeNode(e)){const{typeParameter:t,type:n,nameType:o}=e;this.convertTypeNode(t.constraint),this.pushScope(),this.pushTypeVariable(t.name),this.convertTypeNode(n),o&&this.convertTypeNode(o),this.popScope();return}if(c.isConditionalTypeNode(e)){this.convertTypeNode(e.checkType),this.pushScope(),this.convertTypeNode(e.extendsType),this.convertTypeNode(e.trueType),this.convertTypeNode(e.falseType),this.popScope();return}if(c.isIndexedAccessTypeNode(e)){this.convertTypeNode(e.objectType),this.convertTypeNode(e.indexType);return}if(c.isFunctionOrConstructorTypeNode(e)){this.convertParametersAndType(e);return}if(c.isTypeQueryNode(e)){this.pushReference(this.convertEntityName(e.exprName));return}if(c.isRestTypeNode(e)){this.convertTypeNode(e.type);return}if(c.isOptionalTypeNode(e)){this.convertTypeNode(e.type);return}if(c.isTemplateLiteralTypeNode(e)){for(const t of e.templateSpans)this.convertTypeNode(t.type);return}if(c.isInferTypeNode(e)){const{typeParameter:t}=e;this.convertTypeNode(t.constraint),this.pushTypeVariable(t.name);return}else throw new C(e)}}convertNamespace(e,t=!1){if(this.pushScope(),t&&e.body&&c.isModuleDeclaration(e.body)){this.convertNamespace(e.body,!0);return}if(!e.body||!c.isModuleBlock(e.body))throw new C(e,'namespace must have a "ModuleBlock" body.');const{statements:n}=e.body;for(const o of n){if(c.isEnumDeclaration(o)||c.isFunctionDeclaration(o)||c.isClassDeclaration(o)||c.isInterfaceDeclaration(o)||c.isTypeAliasDeclaration(o)||c.isModuleDeclaration(o)){if(o.name&&c.isIdentifier(o.name))this.pushTypeVariable(o.name);else throw new C(o,"non-Identifier name not supported");continue}if(c.isVariableStatement(o)){for(const h of o.declarationList.declarations)if(c.isIdentifier(h.name))this.pushTypeVariable(h.name);else throw new C(h,"non-Identifier name not supported");continue}if(!c.isExportDeclaration(o))throw new C(o,"namespace child (hoisting) not supported yet")}for(const o of n){if(c.isVariableStatement(o)){for(const h of o.declarationList.declarations)h.type&&this.convertTypeNode(h.type);continue}if(c.isFunctionDeclaration(o)){this.convertParametersAndType(o);continue}if(c.isInterfaceDeclaration(o)||c.isClassDeclaration(o)){const h=this.convertTypeParameters(o.typeParameters);this.convertHeritageClauses(o),this.convertMembers(o.members),this.popScope(h);continue}if(c.isTypeAliasDeclaration(o)){const h=this.convertTypeParameters(o.typeParameters);this.convertTypeNode(o.type),this.popScope(h);continue}if(c.isModuleDeclaration(o)){this.convertNamespace(o,t);continue}if(!c.isEnumDeclaration(o))if(c.isExportDeclaration(o)){if(o.exportClause){if(c.isNamespaceExport(o.exportClause))throw new C(o.exportClause);for(const h of o.exportClause.elements){const p=h.propertyName||h.name;this.pushIdentifierReference(p)}}}else throw new C(o,"namespace child (walking) not supported yet")}this.popScope()}}function pr({sourceFile:r}){return new dr(r).transform()}g(pr,"convert");class dr{static{g(this,"Transformer")}constructor(e){this.sourceFile=e,this.declarations=new Map,this.ast=ar(e);for(const t of e.statements)this.convertStatement(t)}transform(){return{ast:this.ast}}pushStatement(e){this.ast.body.push(e)}createDeclaration(e,t){const n={start:e.getFullStart(),end:e.getEnd()};if(!t){const b=new nt({range:n});return this.pushStatement(b.iife),b}const o=t.getText(),h=new nt({id:t,range:n}),p=this.declarations.get(o);if(p){p.pushIdentifierReference(t),p.declaration.end=n.end;let b=this.ast.body.findIndex(a=>a==p.declaration);for(let a=b+1;a<this.ast.body.length;a++){const i=this.ast.body[a];i.start=i.end=n.end}}else this.pushStatement(h.declaration),this.declarations.set(o,h);return p||h}convertStatement(e){if(c.isEnumDeclaration(e))return this.convertEnumDeclaration(e);if(c.isFunctionDeclaration(e))return this.convertFunctionDeclaration(e);if(c.isInterfaceDeclaration(e)||c.isClassDeclaration(e))return this.convertClassOrInterfaceDeclaration(e);if(c.isTypeAliasDeclaration(e))return this.convertTypeAliasDeclaration(e);if(c.isVariableStatement(e))return this.convertVariableStatement(e);if(c.isExportDeclaration(e)||c.isExportAssignment(e))return this.convertExportDeclaration(e);if(c.isModuleDeclaration(e))return this.convertNamespaceDeclaration(e);if(e.kind==c.SyntaxKind.NamespaceExportDeclaration)return this.removeStatement(e);if(c.isImportDeclaration(e)||c.isImportEqualsDeclaration(e))return this.convertImportDeclaration(e);throw new C(e)}removeStatement(e){this.pushStatement(N({type:"ExpressionStatement",expression:{type:"Literal",value:"pls remove me"}},e))}convertNamespaceDeclaration(e){if(e.flags&c.NodeFlags.GlobalAugmentation||!c.isIdentifier(e.name)){this.createDeclaration(e).convertNamespace(e,!0);return}const n=this.createDeclaration(e,e.name);n.pushIdentifierReference(e.name),n.convertNamespace(e)}convertEnumDeclaration(e){this.createDeclaration(e,e.name).pushIdentifierReference(e.name)}convertFunctionDeclaration(e){if(!e.name)throw new C(e,"FunctionDeclaration should have a name");const t=this.createDeclaration(e,e.name);t.pushIdentifierReference(e.name),t.convertParametersAndType(e)}convertClassOrInterfaceDeclaration(e){if(!e.name)throw new C(e,"ClassDeclaration / InterfaceDeclaration should have a name");const t=this.createDeclaration(e,e.name),n=t.convertTypeParameters(e.typeParameters);t.convertHeritageClauses(e),t.convertMembers(e.members),t.popScope(n)}convertTypeAliasDeclaration(e){const t=this.createDeclaration(e,e.name),n=t.convertTypeParameters(e.typeParameters);t.convertTypeNode(e.type),t.popScope(n)}convertVariableStatement(e){const{declarations:t}=e.declarationList;if(t.length!==1)throw new C(e,"VariableStatement with more than one declaration not yet supported");for(const n of t){if(!c.isIdentifier(n.name))throw new C(e,"VariableDeclaration must have a name");this.createDeclaration(e,n.name).convertTypeNode(n.type)}}convertExportDeclaration(e){if(c.isExportAssignment(e)){this.pushStatement(N({type:"ExportDefaultDeclaration",declaration:I(e.expression)},e));return}const t=e.moduleSpecifier?I(e.moduleSpecifier):void 0;if(!e.exportClause)this.pushStatement(N({type:"ExportAllDeclaration",source:t,exported:null},e));else if(c.isNamespaceExport(e.exportClause))this.pushStatement(N({type:"ExportAllDeclaration",source:t,exported:O(e.exportClause.name)},e));else{const n=[];for(const o of e.exportClause.elements)n.push(this.convertExportSpecifier(o));this.pushStatement(N({type:"ExportNamedDeclaration",declaration:null,specifiers:n,source:t},e))}}convertImportDeclaration(e){if(c.isImportEqualsDeclaration(e)){if(!c.isExternalModuleReference(e.moduleReference))throw new C(e,"ImportEquals should have a literal source.");this.pushStatement(N({type:"ImportDeclaration",specifiers:[{type:"ImportDefaultSpecifier",local:O(e.name)}],source:I(e.moduleReference.expression)},e));return}const t=I(e.moduleSpecifier),n=e.importClause&&e.importClause.namedBindings?this.convertNamedImportBindings(e.importClause.namedBindings):[];e.importClause&&e.importClause.name&&n.push({type:"ImportDefaultSpecifier",local:O(e.importClause.name)}),this.pushStatement(N({type:"ImportDeclaration",specifiers:n,source:t},e))}convertNamedImportBindings(e){return c.isNamedImports(e)?e.elements.map(t=>{const n=O(t.name),o=t.propertyName?O(t.propertyName):n;return{type:"ImportSpecifier",local:n,imported:o}}):[{type:"ImportNamespaceSpecifier",local:O(e.name)}]}convertExportSpecifier(e){const t=O(e.name);return{type:"ExportSpecifier",exported:t,local:e.propertyName?O(e.propertyName):t}}}class mr{static{g(this,"ExportsFixer")}constructor(e){this.source=e,this.DEBUG=!!process.env.DTS_EXPORTS_FIXER_DEBUG}fix(){const e=this.findExports();return e.sort((t,n)=>t.location.start-n.location.start),this.getCodeParts(e).join("")}findExports(){const{rawExports:e,values:t,types:n}=this.getExportsAndLocals();return e.map(o=>{const h=o.elements.map(p=>{const b=p.name.text,a=p.propertyName?.text??p.name.text,i=n.some(s=>s.getText()===a)&&!t.some(s=>s.getText()===a)?"type":"value";return this.DEBUG&&console.log(`export ${a} as ${b} is a ${i}`),{exportedName:b,localName:a,kind:i}});return{location:{start:o.getStart(),end:o.getEnd()},exports:h}})}getExportsAndLocals(e=this.source.statements){const t=[],n=[],o=[],h=g(p=>{const{rawExports:b,values:a,types:i}=this.getExportsAndLocals(p);t.push(...b),n.push(...a),o.push(...i)},"recurseInto");for(const p of e)if(this.DEBUG&&console.log(p.getText(),p.kind),!c.isImportDeclaration(p)){if(c.isInterfaceDeclaration(p)||c.isTypeAliasDeclaration(p)){this.DEBUG&&console.log(`${p.name.getFullText()} is a type`),o.push(p.name);continue}if(c.isEnumDeclaration(p)||c.isFunctionDeclaration(p)||c.isClassDeclaration(p)||c.isVariableStatement(p)){if(c.isVariableStatement(p))for(const b of p.declarationList.declarations)c.isIdentifier(b.name)&&(this.DEBUG&&console.log(`${b.name.getFullText()} is a value (from var statement)`),n.push(b.name));else p.name&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from declaration)`),n.push(p.name));continue}if(c.isModuleBlock(p)){const b=p.statements;h(b);continue}if(c.isModuleDeclaration(p)){p.name&&c.isIdentifier(p.name)&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from module declaration)`),n.push(p.name)),h(p.getChildren());continue}if(c.isExportDeclaration(p)){if(p.moduleSpecifier||p.isTypeOnly)continue;const b=p.exportClause;if(!b||!c.isNamedExports(b))continue;t.push(b);continue}this.DEBUG&&console.log("unhandled statement",p.getFullText(),p.kind)}return{rawExports:t,values:n,types:o}}createNamedExport(e,t=!1){return`${!t&&e.kind==="type"?"type ":""}${e.localName}${e.localName===e.exportedName?"":` as ${e.exportedName}`}`}getCodeParts(e){let t=0;const n=this.source.getFullText(),o=[];for(const h of e){const p=n.slice(t,h.location.start);p.length>0&&o.push(p),o.push(this.getExportStatement(h)),t=h.location.end}return t<n.length&&o.push(n.slice(t)),o}getExportStatement(e){const t=e.exports.every(n=>n.kind==="type")&&e.exports.length>0;return`${t?"type ":""}{ ${e.exports.map(n=>this.createNamedExport(n,t)).join(", ")} }`}}function q(r,e){return c.createSourceFile(r,e,c.ScriptTarget.Latest,!0)}g(q,"parse");const hr=g(()=>{const r=new Map,e=new Map;return{name:"dts-transform",options({onLog:t,...n}){return{...n,onLog(o,h,p){o==="warn"&&h.code=="CIRCULAR_DEPENDENCY"||(t?t(o,h,p):p(o,h))},treeshake:{moduleSideEffects:"no-external",propertyReadSideEffects:!0,unknownGlobalSideEffects:!1}}},outputOptions(t){return{...t,chunkFileNames:t.chunkFileNames||"[name]-[hash].d.ts",entryFileNames:t.entryFileNames||"[name].d.ts",format:"es",exports:"named",compact:!1,freeze:!0,interop:"esModule",generatedCode:Object.assign({symbols:!1},t.generatedCode),strict:!1}},transform(t,n){let o=q(n,t);const h=cr({sourceFile:o});r.set(o.fileName,h.typeReferences),e.set(o.fileName,h.fileReferences),t=h.code.toString(),o=q(n,t);const p=pr({sourceFile:o});return process.env.DTS_DUMP_AST&&(console.log(n),console.log(t),console.log(JSON.stringify(p.ast.body,void 0,2))),{code:t,ast:p.ast,map:h.code.generateMap()}},renderChunk(t,n,o){const h=q(n.fileName,t),p=new nr(h),b=new Set,a=new Set;for(const u of Object.keys(n.modules)){for(const l of r.get(u.split("\\").join("/"))||[])b.add(l);for(const l of e.get(u.split("\\").join("/"))||[])if(l.startsWith(".")){const m=T.join(T.dirname(u),l),f=o.file&&T.dirname(o.file)||n.facadeModuleId&&T.dirname(n.facadeModuleId)||".";let d=T.relative(f,m).split("\\").join("/");d[0]!=="."&&(d="./"+d),a.add(d)}else a.add(l)}let i=at(Array.from(a,u=>`/// <reference path="${u}" />`));return i+=at(Array.from(b,u=>`/// <reference types="${u}" />`)),i+=p.fix(),i||(i+=`
28
+ export { }`),{code:new mr(q(n.fileName,i)).fix(),map:{mappings:""}}}}},"transform");function at(r){return r.length?r.join(`
29
+ `)+`
30
+ `:""}g(at,"writeBlock");const fe=/\.([cm]ts|[tj]sx?)$/;function pe({programs:r,resolvedOptions:{compilerOptions:e,tsconfig:t}},n,o){if(!r.length&&B.test(n))return{code:o};const h=r.find(p=>!!p.getSourceFile(n));if(h){const p=h.getSourceFile(n);return{code:p?.getFullText(),source:p,program:h}}else if(c.sys.fileExists(n)){const p=Qt(n,e,t);r.push(p);const b=p.getSourceFile(n);return{code:b?.getFullText(),source:b,program:p}}else return null}g(pe,"getModule");const it=g((r={})=>{const e=hr(),t={programs:[],resolvedOptions:Yt(r)};return{name:"dts",outputOptions:e.outputOptions,renderChunk:e.renderChunk,options(n){let{input:o=[]}=n;if(!Array.isArray(o))o=typeof o=="string"?[o]:Object.values(o);else if(o.length>1){n.input={};for(const h of o){let p=h.replace(/((\.d)?\.(c|m)?(t|j)sx?)$/,"");T.isAbsolute(h)?p=T.basename(p):p=T.normalize(p),n.input[p]=h}}return t.programs=Zt(Object.values(o),t.resolvedOptions.compilerOptions,t.resolvedOptions.tsconfig),e.options.call(this,n)},transform(n,o){if(!fe.test(o))return null;const h=g(i=>{if(i.program){const s=T.dirname(o);i.program.getSourceFiles().map(l=>l.fileName).filter(l=>l.startsWith(s)).forEach(this.addWatchFile)}},"watchFiles"),p=g(()=>{const i=pe(t,o,n);return i?(h(i),e.transform.call(this,i.code,o)):null},"handleDtsFile"),b=g(()=>{const i=o.replace(fe,Ye);let s=pe(t,i,n);return s?(h(s),e.transform.call(this,s.code,i)):null},"treatTsAsDts"),a=g(()=>{const i=pe(t,o,n);if(!i||!i.source||!i.program)return null;h(i);const s=o.replace(fe,Ye);let u;const{emitSkipped:l,diagnostics:m}=i.program.emit(i.source,(f,d)=>{u=e.transform.call(this,d,s)},void 0,!0);if(l){const f=m.filter(d=>d.category===c.DiagnosticCategory.Error);f.length&&(console.error(c.formatDiagnostics(f,oe)),this.error("Failed to compile. Check the logs above."))}return u},"generateDtsFromTs");return B.test(o)?p():b()??a()},resolveId(n,o){if(!o)return;o=o.split("\\").join("/");let h=t.resolvedOptions.compilerOptions;if(t.resolvedOptions.tsconfig){const b=n.startsWith(".")?T.resolve(T.dirname(o),n):n;h=ce(b,t.resolvedOptions.compilerOptions,t.resolvedOptions.tsconfig).compilerOptions}const{resolvedModule:p}=c.resolveModuleName(n,o,h,c.sys);if(p)return!t.resolvedOptions.respectExternal&&p.isExternalLibraryImport?{id:n,external:!0}:{id:T.resolve(p.resolvedFileName)}}}},"plugin");exports.default=it,exports.dts=it;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pkgroll",
3
- "version": "2.0.2",
3
+ "version": "2.1.1",
4
4
  "description": "Zero-config rollup bundler",
5
5
  "keywords": [
6
6
  "zero config",
@@ -47,7 +47,7 @@
47
47
  "@rollup/plugin-replace": "^5.0.5",
48
48
  "@rollup/pluginutils": "^5.1.0",
49
49
  "esbuild": "^0.20.1",
50
- "magic-string": "^0.30.8",
51
- "rollup": "^4.12.1"
50
+ "magic-string": "^0.30.10",
51
+ "rollup": "^4.17.2"
52
52
  }
53
53
  }
@@ -1,30 +0,0 @@
1
- "use strict";var Je=require("module"),Qe=require("path"),Ze=require("os"),et=require("magic-string"),pe=typeof document<"u"?document.currentScript:null;function tt(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}),e.default=t,Object.freeze(e)}var T=tt(Qe),H=require;const rt=()=>{const t=process.cwd();try{return H.resolve("typescript",{paths:[t]})}catch{throw new Error(`Could not find \`typescript\` in ${t}`)}};var u=H(rt()),X={},B={},q={};Object.defineProperty(q,"__esModule",{value:!0}),q.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,q.matchToToken=function(t){var e={type:"invalid",value:t[0],closed:void 0};return t[1]?(e.type="string",e.closed=!!(t[3]||t[4])):t[5]?e.type="comment":t[6]?(e.type="comment",e.closed=!!t[7]):t[8]?e.type="regex":t[9]?e.type="number":t[10]?e.type="name":t[11]?e.type="punctuator":t[12]&&(e.type="whitespace"),e};var de={},K={};Object.defineProperty(K,"__esModule",{value:!0}),K.isIdentifierChar=ge,K.isIdentifierName=st,K.isIdentifierStart=be;let Y="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",me="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";const nt=new RegExp("["+Y+"]"),at=new RegExp("["+Y+me+"]");Y=me=null;const he=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],it=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function J(t,e){let r=65536;for(let n=0,a=e.length;n<a;n+=2){if(r+=e[n],r>t)return!1;if(r+=e[n+1],r>=t)return!0}return!1}function be(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&nt.test(String.fromCharCode(t)):J(t,he)}function ge(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&at.test(String.fromCharCode(t)):J(t,he)||J(t,it)}function st(t){let e=!0;for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);if((n&64512)===55296&&r+1<t.length){const a=t.charCodeAt(++r);(a&64512)===56320&&(n=65536+((n&1023)<<10)+(a&1023))}if(e){if(e=!1,!be(n))return!1}else if(!ge(n))return!1}return!e}var $={};Object.defineProperty($,"__esModule",{value:!0}),$.isKeyword=ft,$.isReservedWord=ye,$.isStrictBindOnlyReservedWord=xe,$.isStrictBindReservedWord=lt,$.isStrictReservedWord=ve;const Q={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ut=new Set(Q.keyword),ot=new Set(Q.strict),ct=new Set(Q.strictBind);function ye(t,e){return e&&t==="await"||t==="enum"}function ve(t,e){return ye(t,e)||ot.has(t)}function xe(t){return ct.has(t)}function lt(t,e){return ve(t,e)||xe(t)}function ft(t){return ut.has(t)}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isIdentifierChar",{enumerable:!0,get:function(){return e.isIdentifierChar}}),Object.defineProperty(t,"isIdentifierName",{enumerable:!0,get:function(){return e.isIdentifierName}}),Object.defineProperty(t,"isIdentifierStart",{enumerable:!0,get:function(){return e.isIdentifierStart}}),Object.defineProperty(t,"isKeyword",{enumerable:!0,get:function(){return r.isKeyword}}),Object.defineProperty(t,"isReservedWord",{enumerable:!0,get:function(){return r.isReservedWord}}),Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return r.isStrictBindOnlyReservedWord}}),Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:!0,get:function(){return r.isStrictBindReservedWord}}),Object.defineProperty(t,"isStrictReservedWord",{enumerable:!0,get:function(){return r.isStrictReservedWord}});var e=K,r=$})(de);var we={exports:{}},pt=/[|\\{}()[\]^$+*?.]/g,dt=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(pt,"\\$&")},Z={exports:{}},Se={exports:{}},mt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},P=mt,Ee={};for(var ee in P)P.hasOwnProperty(ee)&&(Ee[P[ee]]=ee);var b=Se.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var M in b)if(b.hasOwnProperty(M)){if(!("channels"in b[M]))throw new Error("missing channels property: "+M);if(!("labels"in b[M]))throw new Error("missing channel labels property: "+M);if(b[M].labels.length!==b[M].channels)throw new Error("channel and label counts mismatch: "+M);var ht=b[M].channels,bt=b[M].labels;delete b[M].channels,delete b[M].labels,Object.defineProperty(b[M],"channels",{value:ht}),Object.defineProperty(b[M],"labels",{value:bt})}b.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,a=Math.min(e,r,n),s=Math.max(e,r,n),i=s-a,o,c,f;return s===a?o=0:e===s?o=(r-n)/i:r===s?o=2+(n-e)/i:n===s&&(o=4+(e-r)/i),o=Math.min(o*60,360),o<0&&(o+=360),f=(a+s)/2,s===a?c=0:f<=.5?c=i/(s+a):c=i/(2-s-a),[o,c*100,f*100]},b.rgb.hsv=function(t){var e,r,n,a,s,i=t[0]/255,o=t[1]/255,c=t[2]/255,f=Math.max(i,o,c),l=f-Math.min(i,o,c),h=function(y){return(f-y)/6/l+1/2};return l===0?a=s=0:(s=l/f,e=h(i),r=h(o),n=h(c),i===f?a=n-r:o===f?a=1/3+e-n:c===f&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[a*360,s*100,f*100]},b.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],a=b.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[a,s*100,n*100]},b.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,a,s,i,o;return o=Math.min(1-e,1-r,1-n),a=(1-e-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,i=(1-n-o)/(1-o)||0,[a*100,s*100,i*100,o*100]};function gt(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}b.rgb.keyword=function(t){var e=Ee[t];if(e)return e;var r=1/0,n;for(var a in P)if(P.hasOwnProperty(a)){var s=P[a],i=gt(t,s);i<r&&(r=i,n=a)}return n},b.keyword.rgb=function(t){return P[t]},b.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var a=e*.4124+r*.3576+n*.1805,s=e*.2126+r*.7152+n*.0722,i=e*.0193+r*.1192+n*.9505;return[a*100,s*100,i*100]},b.rgb.lab=function(t){var e=b.rgb.xyz(t),r=e[0],n=e[1],a=e[2],s,i,o;return r/=95.047,n/=100,a/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,s=116*n-16,i=500*(r-n),o=200*(n-a),[s,i,o]},b.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,a,s,i,o,c;if(r===0)return c=n*255,[c,c,c];n<.5?s=n*(1+r):s=n+r-n*r,a=2*n-s,o=[0,0,0];for(var f=0;f<3;f++)i=e+1/3*-(f-1),i<0&&i++,i>1&&i--,6*i<1?c=a+(s-a)*6*i:2*i<1?c=s:3*i<2?c=a+(s-a)*(2/3-i)*6:c=a,o[f]=c*255;return o},b.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,a=r,s=Math.max(n,.01),i,o;return n*=2,r*=n<=1?n:2-n,a*=s<=1?s:2-s,o=(n+r)/2,i=n===0?2*a/(s+a):2*r/(n+r),[e,i*100,o*100]},b.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,s=e-Math.floor(e),i=255*n*(1-r),o=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,a){case 0:return[n,c,i];case 1:return[o,n,i];case 2:return[i,n,c];case 3:return[i,o,n];case 4:return[c,i,n];case 5:return[n,i,o]}},b.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,a=Math.max(n,.01),s,i,o;return o=(2-r)*n,s=(2-r)*a,i=r*a,i/=s<=1?s:2-s,i=i||0,o/=2,[e,i*100,o*100]},b.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,a=r+n,s,i,o,c;a>1&&(r/=a,n/=a),s=Math.floor(6*e),i=1-n,o=6*e-s,s&1&&(o=1-o),c=r+o*(i-r);var f,l,h;switch(s){default:case 6:case 0:f=i,l=c,h=r;break;case 1:f=c,l=i,h=r;break;case 2:f=r,l=i,h=c;break;case 3:f=r,l=c,h=i;break;case 4:f=c,l=r,h=i;break;case 5:f=i,l=r,h=c;break}return[f*255,l*255,h*255]},b.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,a=t[3]/100,s,i,o;return s=1-Math.min(1,e*(1-a)+a),i=1-Math.min(1,r*(1-a)+a),o=1-Math.min(1,n*(1-a)+a),[s*255,i*255,o*255]},b.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,a,s,i;return a=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,i=e*.0557+r*-.204+n*1.057,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),[a*255,s*255,i*255]},b.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],a,s,i;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,a=116*r-16,s=500*(e-r),i=200*(r-n),[a,s,i]},b.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],a,s,i;s=(e+16)/116,a=r/500+s,i=s-n/200;var o=Math.pow(s,3),c=Math.pow(a,3),f=Math.pow(i,3);return s=o>.008856?o:(s-16/116)/7.787,a=c>.008856?c:(a-16/116)/7.787,i=f>.008856?f:(i-16/116)/7.787,a*=95.047,s*=100,i*=108.883,[a,s,i]},b.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],a,s,i;return a=Math.atan2(n,r),s=a*360/2/Math.PI,s<0&&(s+=360),i=Math.sqrt(r*r+n*n),[e,i,s]},b.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],a,s,i;return i=n/360*2*Math.PI,a=r*Math.cos(i),s=r*Math.sin(i),[e,a,s]},b.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],a=1 in arguments?arguments[1]:b.rgb.hsv(t)[2];if(a=Math.round(a/50),a===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return a===2&&(s+=60),s},b.hsv.ansi16=function(t){return b.rgb.ansi16(b.hsv.rgb(t),t[2])},b.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];if(e===r&&r===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var a=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return a},b.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,a=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[n,a,s]},b.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,a=Math.floor((r=t%36)/6)/5*255,s=r%6/5*255;return[n,a,s]},b.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r},b.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var n=parseInt(r,16),a=n>>16&255,s=n>>8&255,i=n&255;return[a,s,i]},b.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,a=Math.max(Math.max(e,r),n),s=Math.min(Math.min(e,r),n),i=a-s,o,c;return i<1?o=s/(1-i):o=0,i<=0?c=0:a===e?c=(r-n)/i%6:a===r?c=2+(n-e)/i:c=4+(e-r)/i+4,c/=6,c%=1,[c*360,i*100,o*100]},b.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1,a=0;return r<.5?n=2*e*r:n=2*e*(1-r),n<1&&(a=(r-.5*n)/(1-n)),[t[0],n*100,a*100]},b.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,a=0;return n<1&&(a=(r-n)/(1-n)),[t[0],n*100,a*100]},b.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var a=[0,0,0],s=e%1*6,i=s%1,o=1-i,c=0;switch(Math.floor(s)){case 0:a[0]=1,a[1]=i,a[2]=0;break;case 1:a[0]=o,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=i;break;case 3:a[0]=0,a[1]=o,a[2]=1;break;case 4:a[0]=i,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=o}return c=(1-r)*n,[(r*a[0]+c)*255,(r*a[1]+c)*255,(r*a[2]+c)*255]},b.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e),a=0;return n>0&&(a=e/n),[t[0],a*100,n*100]},b.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,n=r*(1-e)+.5*e,a=0;return n>0&&n<.5?a=e/(2*n):n>=.5&&n<1&&(a=e/(2*(1-n))),[t[0],a*100,n*100]},b.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]},b.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,a=n-e,s=0;return a<1&&(s=(n-a)/(1-a)),[t[0],a*100,s*100]},b.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},b.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},b.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},b.gray.hsl=b.gray.hsv=function(t){return[0,0,t[0]]},b.gray.hwb=function(t){return[0,100,t[0]]},b.gray.cmyk=function(t){return[0,0,0,t[0]]},b.gray.lab=function(t){return[t[0],0,0]},b.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n},b.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]};var Te=Se.exports,G=Te;function yt(){for(var t={},e=Object.keys(G),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function vt(t){var e=yt(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),a=Object.keys(G[n]),s=a.length,i=0;i<s;i++){var o=a[i],c=e[o];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(o))}return e}function xt(t,e){return function(r){return e(t(r))}}function wt(t,e){for(var r=[e[t].parent,t],n=G[e[t].parent][t],a=e[t].parent;e[a].parent;)r.unshift(e[a].parent),n=xt(G[e[a].parent][a],n),a=e[a].parent;return n.conversion=r,n}var St=function(t){for(var e=vt(t),r={},n=Object.keys(e),a=n.length,s=0;s<a;s++){var i=n[s],o=e[i];o.parent!==null&&(r[i]=wt(i,e))}return r},te=Te,Et=St,j={},Tt=Object.keys(te);function Ct(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Nt(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var a=n.length,s=0;s<a;s++)n[s]=Math.round(n[s]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}Tt.forEach(function(t){j[t]={},Object.defineProperty(j[t],"channels",{value:te[t].channels}),Object.defineProperty(j[t],"labels",{value:te[t].labels});var e=Et(t),r=Object.keys(e);r.forEach(function(n){var a=e[n];j[t][n]=Nt(a),j[t][n].raw=Ct(a)})});var Dt=j;Z.exports,function(t){const e=Dt,r=(i,o)=>function(){return`\x1B[${i.apply(e,arguments)+o}m`},n=(i,o)=>function(){const c=i.apply(e,arguments);return`\x1B[${38+o};5;${c}m`},a=(i,o)=>function(){const c=i.apply(e,arguments);return`\x1B[${38+o};2;${c[0]};${c[1]};${c[2]}m`};function s(){const i=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],gray:[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]}};o.color.grey=o.color.gray;for(const l of Object.keys(o)){const h=o[l];for(const y of Object.keys(h)){const w=h[y];o[y]={open:`\x1B[${w[0]}m`,close:`\x1B[${w[1]}m`},h[y]=o[y],i.set(w[0],w[1])}Object.defineProperty(o,l,{value:h,enumerable:!1}),Object.defineProperty(o,"codes",{value:i,enumerable:!1})}const c=l=>l,f=(l,h,y)=>[l,h,y];o.color.close="\x1B[39m",o.bgColor.close="\x1B[49m",o.color.ansi={ansi:r(c,0)},o.color.ansi256={ansi256:n(c,0)},o.color.ansi16m={rgb:a(f,0)},o.bgColor.ansi={ansi:r(c,10)},o.bgColor.ansi256={ansi256:n(c,10)},o.bgColor.ansi16m={rgb:a(f,10)};for(let l of Object.keys(e)){if(typeof e[l]!="object")continue;const h=e[l];l==="ansi16"&&(l="ansi"),"ansi16"in h&&(o.color.ansi[l]=r(h.ansi16,0),o.bgColor.ansi[l]=r(h.ansi16,10)),"ansi256"in h&&(o.color.ansi256[l]=n(h.ansi256,0),o.bgColor.ansi256[l]=n(h.ansi256,10)),"rgb"in h&&(o.color.ansi16m[l]=a(h.rgb,0),o.bgColor.ansi16m[l]=a(h.rgb,10))}return o}Object.defineProperty(t,"exports",{enumerable:!0,get:s})}(Z);var Ot=Z.exports,Mt=(t,e)=>{e=e||process.argv;const r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),a=e.indexOf("--");return n!==-1&&(a===-1?!0:n<a)};const kt=Ze,F=Mt,C=process.env;let A;F("no-color")||F("no-colors")||F("color=false")?A=!1:(F("color")||F("colors")||F("color=true")||F("color=always"))&&(A=!0),"FORCE_COLOR"in C&&(A=C.FORCE_COLOR.length===0||parseInt(C.FORCE_COLOR,10)!==0);function It(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Ft(t){if(A===!1)return 0;if(F("color=16m")||F("color=full")||F("color=truecolor"))return 3;if(F("color=256"))return 2;if(t&&!t.isTTY&&A!==!0)return 0;const e=A?1:0;if(process.platform==="win32"){const r=kt.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in C)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in C)||C.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in C)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(C.TEAMCITY_VERSION)?1:0;if(C.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in C){const r=parseInt((C.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(C.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(C.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(C.TERM)||"COLORTERM"in C?1:(C.TERM==="dumb",e)}function re(t){const e=Ft(t);return It(e)}var Rt={supportsColor:re,stdout:re(process.stdout),stderr:re(process.stderr)};const $t=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Ce=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Pt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,_t=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,jt=new Map([["n",`
2
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Ne(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):jt.get(t)||t}function At(t,e){const r=[],n=e.trim().split(/\s*,\s*/g);let a;for(const s of n)if(!isNaN(s))r.push(Number(s));else if(a=s.match(Pt))r.push(a[2].replace(_t,(i,o,c)=>o?Ne(o):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`);return r}function Lt(t){Ce.lastIndex=0;const e=[];let r;for(;(r=Ce.exec(t))!==null;){const n=r[1];if(r[2]){const a=At(n,r[2]);e.push([n].concat(a))}else e.push([n])}return e}function De(t,e){const r={};for(const a of e)for(const s of a.styles)r[s[0]]=a.inverse?null:s.slice(1);let n=t;for(const a of Object.keys(r))if(Array.isArray(r[a])){if(!(a in n))throw new Error(`Unknown Chalk style: ${a}`);r[a].length>0?n=n[a].apply(n,r[a]):n=n[a]}return n}var Bt=(t,e)=>{const r=[],n=[];let a=[];if(e.replace($t,(s,i,o,c,f,l)=>{if(i)a.push(Ne(i));else if(c){const h=a.join("");a=[],n.push(r.length===0?h:De(t,r)(h)),r.push({inverse:o,styles:Lt(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(De(t,r)(a.join(""))),a=[],r.pop()}else a.push(l)}),n.push(a.join("")),r.length>0){const s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")};(function(t){const e=dt,r=Ot,n=Rt.stdout,a=Bt,s=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),i=["ansi","ansi","ansi256","ansi16m"],o=new Set(["gray"]),c=Object.create(null);function f(d,m){m=m||{};const g=n?n.level:0;d.level=m.level===void 0?g:m.level,d.enabled="enabled"in m?m.enabled:d.level>0}function l(d){if(!this||!(this instanceof l)||this.template){const m={};return f(m,d),m.template=function(){const g=[].slice.call(arguments);return p.apply(null,[m.template].concat(g))},Object.setPrototypeOf(m,l.prototype),Object.setPrototypeOf(m.template,m),m.template.constructor=l,m.template}f(this,d)}s&&(r.blue.open="\x1B[94m");for(const d of Object.keys(r))r[d].closeRe=new RegExp(e(r[d].close),"g"),c[d]={get(){const m=r[d];return y.call(this,this._styles?this._styles.concat(m):[m],this._empty,d)}};c.visible={get(){return y.call(this,this._styles||[],!0,"visible")}},r.color.closeRe=new RegExp(e(r.color.close),"g");for(const d of Object.keys(r.color.ansi))o.has(d)||(c[d]={get(){const m=this.level;return function(){const x={open:r.color[i[m]][d].apply(null,arguments),close:r.color.close,closeRe:r.color.closeRe};return y.call(this,this._styles?this._styles.concat(x):[x],this._empty,d)}}});r.bgColor.closeRe=new RegExp(e(r.bgColor.close),"g");for(const d of Object.keys(r.bgColor.ansi)){if(o.has(d))continue;const m="bg"+d[0].toUpperCase()+d.slice(1);c[m]={get(){const g=this.level;return function(){const v={open:r.bgColor[i[g]][d].apply(null,arguments),close:r.bgColor.close,closeRe:r.bgColor.closeRe};return y.call(this,this._styles?this._styles.concat(v):[v],this._empty,d)}}}}const h=Object.defineProperties(()=>{},c);function y(d,m,g){const x=function(){return w.apply(x,arguments)};x._styles=d,x._empty=m;const v=this;return Object.defineProperty(x,"level",{enumerable:!0,get(){return v.level},set(D){v.level=D}}),Object.defineProperty(x,"enabled",{enumerable:!0,get(){return v.enabled},set(D){v.enabled=D}}),x.hasGrey=this.hasGrey||g==="gray"||g==="grey",x.__proto__=h,x}function w(){const d=arguments,m=d.length;let g=String(arguments[0]);if(m===0)return"";if(m>1)for(let v=1;v<m;v++)g+=" "+d[v];if(!this.enabled||this.level<=0||!g)return this._empty?"":g;const x=r.dim.open;s&&this.hasGrey&&(r.dim.open="");for(const v of this._styles.slice().reverse())g=v.open+g.replace(v.closeRe,v.open)+v.close,g=g.replace(/\r?\n/g,`${v.close}$&${v.open}`);return r.dim.open=x,g}function p(d,m){if(!Array.isArray(m))return[].slice.call(arguments,1).join(" ");const g=[].slice.call(arguments,2),x=[m.raw[0]];for(let v=1;v<m.length;v++)x.push(String(g[v-1]).replace(/[{}\\]/g,"\\$&")),x.push(String(m.raw[v]));return a(d,x.join(""))}Object.defineProperties(l.prototype,c),t.exports=l(),t.exports.supportsColor=n,t.exports.default=t.exports})(we);var Oe=we.exports;Object.defineProperty(B,"__esModule",{value:!0}),B.default=Ut,B.shouldHighlight=Re;var Me=q,ke=de,ne=Kt(Oe,!0);function Ie(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(Ie=function(n){return n?r:e})(t)}function Kt(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=Ie(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var i=a?Object.getOwnPropertyDescriptor(t,s):null;i&&(i.get||i.set)?Object.defineProperty(n,s,i):n[s]=t[s]}return n.default=t,r&&r.set(t,n),n}const Wt=new Set(["as","async","from","get","of","set"]);function qt(t){return{keyword:t.cyan,capitalized:t.yellow,jsxIdentifier:t.yellow,punctuator:t.yellow,number:t.magenta,string:t.green,regex:t.magenta,comment:t.grey,invalid:t.white.bgRed.bold}}const Gt=/\r\n|[\n\r\u2028\u2029]/,zt=/^[()[\]{}]$/;let Fe;{const t=/^[a-z][\w-]*$/i,e=function(r,n,a){if(r.type==="name"){if((0,ke.isKeyword)(r.value)||(0,ke.isStrictReservedWord)(r.value,!0)||Wt.has(r.value))return"keyword";if(t.test(r.value)&&(a[n-1]==="<"||a.slice(n-2,n)=="</"))return"jsxIdentifier";if(r.value[0]!==r.value[0].toLowerCase())return"capitalized"}return r.type==="punctuator"&&zt.test(r.value)?"bracket":r.type==="invalid"&&(r.value==="@"||r.value==="#")?"punctuator":r.type};Fe=function*(r){let n;for(;n=Me.default.exec(r);){const a=Me.matchToToken(n);yield{type:e(a,n.index,r),value:a.value}}}}function Vt(t,e){let r="";for(const{type:n,value:a}of Fe(e)){const s=t[n];s?r+=a.split(Gt).map(i=>s(i)).join(`
3
- `):r+=a}return r}function Re(t){return ne.default.level>0||t.forceColor}let ae;function $e(t){if(t){var e;return(e=ae)!=null||(ae=new ne.default.constructor({enabled:!0,level:1})),ae}return ne.default}B.getChalk=t=>$e(t.forceColor);function Ut(t,e={}){if(t!==""&&Re(e)){const r=qt($e(e.forceColor));return Vt(r,t)}else return t}Object.defineProperty(X,"__esModule",{value:!0}),X.codeFrameColumns=Be,X.default=Qt;var Pe=B,_e=Ht(Oe,!0);function je(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(je=function(n){return n?r:e})(t)}function Ht(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=je(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var i=a?Object.getOwnPropertyDescriptor(t,s):null;i&&(i.get||i.set)?Object.defineProperty(n,s,i):n[s]=t[s]}return n.default=t,r&&r.set(t,n),n}let ie;function Xt(t){if(t){var e;return(e=ie)!=null||(ie=new _e.default.constructor({enabled:!0,level:1})),ie}return _e.default}let Ae=!1;function Yt(t){return{gutter:t.grey,marker:t.red.bold,message:t.red.bold}}const Le=/\r\n|[\n\r\u2028\u2029]/;function Jt(t,e,r){const n=Object.assign({column:0,line:-1},t.start),a=Object.assign({},n,t.end),{linesAbove:s=2,linesBelow:i=3}=r||{},o=n.line,c=n.column,f=a.line,l=a.column;let h=Math.max(o-(s+1),0),y=Math.min(e.length,f+i);o===-1&&(h=0),f===-1&&(y=e.length);const w=f-o,p={};if(w)for(let d=0;d<=w;d++){const m=d+o;if(!c)p[m]=!0;else if(d===0){const g=e[m-1].length;p[m]=[c,g-c+1]}else if(d===w)p[m]=[0,l];else{const g=e[m-d].length;p[m]=[0,g]}}else c===l?c?p[o]=[c,0]:p[o]=!0:p[o]=[c,l-c];return{start:h,end:y,markerLines:p}}function Be(t,e,r={}){const n=(r.highlightCode||r.forceColor)&&(0,Pe.shouldHighlight)(r),a=Xt(r.forceColor),s=Yt(a),i=(d,m)=>n?d(m):m,o=t.split(Le),{start:c,end:f,markerLines:l}=Jt(e,o,r),h=e.start&&typeof e.start.column=="number",y=String(f).length;let p=(n?(0,Pe.default)(t,r):t).split(Le,f).slice(c,f).map((d,m)=>{const g=c+1+m,v=` ${` ${g}`.slice(-y)} |`,D=l[g],I=!l[g+1];if(D){let E="";if(Array.isArray(D)){const k=d.slice(0,Math.max(D[0]-1,0)).replace(/[^\t]/g," "),R=D[1]||1;E=[`
4
- `,i(s.gutter,v.replace(/\d/g," "))," ",k,i(s.marker,"^").repeat(R)].join(""),I&&r.message&&(E+=" "+i(s.message,r.message))}return[i(s.marker,">"),i(s.gutter,v),d.length>0?` ${d}`:"",E].join("")}else return` ${i(s.gutter,v)}${d.length>0?` ${d}`:""}`}).join(`
5
- `);return r.message&&!h&&(p=`${" ".repeat(y+1)}${r.message}
6
- ${p}`),n?a.reset(p):p}function Qt(t,e,r,n={}){if(!Ae){Ae=!0;const s="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(s,"DeprecationWarning");else{const i=new Error(s);i.name="DeprecationWarning",console.warn(new Error(s))}}return r=Math.max(r,0),Be(t,{start:{column:r,line:e}},n)}function Zt(t){return{...t,compilerOptions:t.compilerOptions??{},respectExternal:t.respectExternal??!1}}const z=/\.d\.(c|m)?tsx?$/,Ke=".d.ts",se={getCurrentDirectory:()=>u.sys.getCurrentDirectory(),getNewLine:()=>u.sys.newLine,getCanonicalFileName:u.sys.useCaseSensitiveFileNames?t=>t:t=>t.toLowerCase()},er={declaration:!0,noEmit:!1,emitDeclarationOnly:!0,noEmitOnError:!0,checkJs:!1,declarationMap:!1,skipLibCheck:!0,preserveSymlinks:!0,target:u.ScriptTarget.ESNext},W=new Map,L=(...t)=>process.env.DTS_LOG_CACHE?console.log("[cache]",...t):null;function We([t,e],r){for(L(t),W.set(t,r);t!==e&&t!==T.dirname(t);){if(t=T.dirname(t),L("up",t),W.has(t))return L("has",t);W.set(t,r)}}function ue(t,e,r){const n={...er,...e};let a=T.dirname(t),s=[];const i=r||a;if(W.has(i))L("HIT",i);else{L("miss",i);const l=r?T.resolve(process.cwd(),r):u.findConfigFile(a,u.sys.fileExists);if(!l)return{dtsFiles:s,dirName:a,compilerOptions:n};let h=a;a=T.dirname(l);const{config:y,error:w}=u.readConfigFile(l,u.sys.readFile);if(w)return console.error(u.formatDiagnostic(w,se)),{dtsFiles:s,dirName:a,compilerOptions:n};L("tsconfig",y);const p=u.parseJsonConfigFileContent(y,u.sys,a);We(r?[r,r]:[h,a],p)}const{fileNames:o,options:c,errors:f}=W.get(i);return s=o.filter(l=>z.test(l)),f.length?(console.error(u.formatDiagnostics(f,se)),{dtsFiles:s,dirName:a,compilerOptions:n}):{dtsFiles:s,dirName:a,compilerOptions:{...c,...n}}}function tr(t,e,r){const{dtsFiles:n,compilerOptions:a}=ue(t,e,r);return u.createProgram([t].concat(Array.from(n)),a,u.createCompilerHost(a,!0))}function rr(t,e,r){const n=[];let a=[],s=new Set,i="",o={};for(let c of t){if(z.test(c))continue;c=T.resolve(c);const f=ue(c,e,r);if(f.dtsFiles.forEach(s.add,s),!a.length){a.push(c),{dirName:i,compilerOptions:o}=f;continue}if(f.dirName===i)a.push(c);else{const l=u.createCompilerHost(o,!0),h=u.createProgram(a.concat(Array.from(s)),o,l);n.push(h),a=[c],{dirName:i,compilerOptions:o}=f}}if(a.length){const c=u.createCompilerHost(o,!0),f=u.createProgram(a.concat(Array.from(s)),o,c);n.push(f)}return n}function nr(){let t;try{return{codeFrameColumns:t}=H("@babel/code-frame"),t}catch{try{return{codeFrameColumns:t}=Je.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:pe&&pe.src||new URL("rollup-plugin-dts-DRxj1yaY.js",document.baseURI).href)("@babel/code-frame"),t}catch{}}}function ar(t){const e=t.getSourceFile(),r=e.getLineAndCharacterOfPosition(t.getStart()),n=e.getLineAndCharacterOfPosition(t.getEnd());return{start:{line:r.line+1,column:r.character+1},end:{line:n.line+1,column:n.character+1}}}function ir(t){const e=nr(),n=t.getSourceFile().getFullText(),a=ar(t);return e?`
7
- `+e(n,a,{highlightCode:!0}):`
8
- ${a.start.line}:${a.start.column}: \`${t.getFullText().trim()}\``}class S extends Error{constructor(e,r="Syntax not yet supported"){super(`${r}
9
- ${ir(e)}`)}}class sr{constructor(e){this.sourceFile=e}findNamespaces(){const e=[],r={};for(const n of this.sourceFile.statements){const a={start:n.getStart(),end:n.getEnd()};if(u.isEmptyStatement(n)){e.unshift({name:"",exports:[],location:a});continue}if((u.isImportDeclaration(n)||u.isExportDeclaration(n))&&n.moduleSpecifier&&u.isStringLiteral(n.moduleSpecifier)){let{text:l}=n.moduleSpecifier;if(l.startsWith(".")&&(l.endsWith(".d.ts")||l.endsWith(".d.cts")||l.endsWith(".d.mts"))){let h=n.moduleSpecifier.getStart()+1,y=n.moduleSpecifier.getEnd()-1;e.unshift({name:"",exports:[],location:{start:h,end:y},textBeforeCodeAfter:l.replace(/\.d\.ts$/,".js").replace(/\.d\.cts$/,".cjs").replace(/\.d\.mts$/,".mjs")})}}if(u.isModuleDeclaration(n)&&n.body&&u.isModuleBlock(n.body)){for(const l of n.body.statements)if(u.isExportDeclaration(l)&&l.exportClause){if(u.isNamespaceExport(l.exportClause))continue;for(const h of l.exportClause.elements)h.propertyName&&h.propertyName.getText()==h.name.getText()&&e.unshift({name:"",exports:[],location:{start:h.propertyName.getEnd(),end:h.name.getEnd()}})}}if(u.isClassDeclaration(n)?r[n.name.getText()]={type:"class",generics:n.typeParameters}:u.isFunctionDeclaration(n)?r[n.name.getText()]={type:"function"}:u.isInterfaceDeclaration(n)?r[n.name.getText()]={type:"interface",generics:n.typeParameters}:u.isTypeAliasDeclaration(n)?r[n.name.getText()]={type:"type",generics:n.typeParameters}:u.isModuleDeclaration(n)&&u.isIdentifier(n.name)?r[n.name.getText()]={type:"namespace"}:u.isEnumDeclaration(n)&&(r[n.name.getText()]={type:"enum"}),!u.isVariableStatement(n))continue;const{declarations:s}=n.declarationList;if(s.length!==1)continue;const i=s[0],o=i.name.getText();if(!i.initializer||!u.isCallExpression(i.initializer)){r[o]={type:"var"};continue}const c=i.initializer.arguments[0];if(!i.initializer.expression.getFullText().includes("/*#__PURE__*/Object.freeze")||!u.isObjectLiteralExpression(c))continue;const f=[];for(const l of c.properties){if(!u.isPropertyAssignment(l)||!(u.isIdentifier(l.name)||u.isStringLiteral(l.name))||l.name.text!=="__proto__"&&!u.isIdentifier(l.initializer))throw new S(l,"Expected a property assignment");l.name.text!=="__proto__"&&f.push({exportedName:l.name.text,localName:l.initializer.getText()})}e.unshift({name:o,exports:f,location:a})}return{namespaces:e,itemTypes:r}}fix(){let e=this.sourceFile.getFullText();const{namespaces:r,itemTypes:n}=this.findNamespaces();for(const a of r){const s=e.slice(a.location.end);e=e.slice(0,a.location.start);for(const{exportedName:i,localName:o}of a.exports)if(i===o){const{type:c,generics:f}=n[o]||{};if(c==="interface"||c==="type"){const l=qe(f);e+=`type ${a.name}_${i}${l.in} = ${o}${l.out};
10
- `}else if(c==="enum"||c==="class"){const l=qe(f);e+=`type ${a.name}_${i}${l.in} = ${o}${l.out};
11
- `,e+=`declare const ${a.name}_${i}: typeof ${o};
12
- `}else e+=`declare const ${a.name}_${i}: typeof ${o};
13
- `}if(a.name){e+=`declare namespace ${a.name} {
14
- `,e+=` export {
15
- `;for(const{exportedName:i,localName:o}of a.exports)i===o?e+=` ${a.name}_${i} as ${i},
16
- `:e+=` ${o} as ${i},
17
- `;e+=` };
18
- `,e+="}"}e+=a.textBeforeCodeAfter??"",e+=s}return e}}function qe(t){return!t||!t.length?{in:"",out:""}:{in:`<${t.map(e=>e.getText()).join(", ")}>`,out:`<${t.map(e=>e.name.getText()).join(", ")}>`}}let Ge=1;function ur(t){return N({type:"Program",sourceType:"module",body:[]},{start:t.getFullStart(),end:t.getEnd()})}function or(t){const e={type:"Identifier",name:String(Ge++)};return{ident:e,expr:{type:"AssignmentPattern",left:e,right:t}}}function O(t){return N({type:"Identifier",name:t.getText()},t)}function cr(t){const e=N({type:"FunctionExpression",id:null,params:[],body:{type:"BlockStatement",body:[]}},t),r=N({type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:String(Ge++)},arguments:[e],optional:!1}},t);return{fn:e,iife:r}}function lr(){const t={type:"ArrayExpression",elements:[]};return{expr:t,stmt:{type:"ReturnStatement",argument:t}}}function fr(t,e){return N({type:"FunctionDeclaration",id:N({type:"Identifier",name:u.idText(t)},t),params:[],body:{type:"BlockStatement",body:[]}},e)}function _(t){if(u.isLiteralExpression(t))return{type:"Literal",value:t.text};if(u.isPropertyAccessExpression(t)){if(u.isPrivateIdentifier(t.name))throw new S(t.name);return N({type:"MemberExpression",computed:!1,optional:!1,object:_(t.expression),property:_(t.name)},{start:t.expression.getStart(),end:t.name.getEnd()})}if(u.isIdentifier(t))return O(t);if(t.kind==u.SyntaxKind.NullKeyword)return{type:"Literal",value:null};throw new S(t)}function N(t,e){let r="start"in e?e:{start:e.getStart(),end:e.getEnd()};return Object.assign(t,r)}function V(t,e){return(u.getCombinedModifierFlags(t)&e)===e}function pr({sourceFile:t}){const e=new et(t.getFullText()),r=new Set,n=new Set;let a="";const s=new Map,i=new Map;for(const p of t.statements){if(u.isEmptyStatement(p)){e.remove(p.getStart(),p.getEnd());continue}if(u.isEnumDeclaration(p)||u.isFunctionDeclaration(p)||u.isInterfaceDeclaration(p)||u.isClassDeclaration(p)||u.isTypeAliasDeclaration(p)||u.isModuleDeclaration(p)){if(p.name){const d=p.name.getText();r.add(d),V(p,u.ModifierFlags.ExportDefault)?a=d:V(p,u.ModifierFlags.Export)&&n.add(d),p.flags&u.NodeFlags.GlobalAugmentation||w(d,[oe(p),Ve(p)])}u.isModuleDeclaration(p)&&dr(e,p),ze(e,p)}else if(u.isVariableStatement(p)){const{declarations:d}=p.declarationList,m=V(p,u.ModifierFlags.Export);for(const E of p.declarationList.declarations)if(u.isIdentifier(E.name)){const k=E.name.getText();r.add(k),m&&n.add(k)}if(ze(e,p),d.length==1){const E=d[0];u.isIdentifier(E.name)&&w(E.name.getText(),[oe(p),Ve(p)])}else{const E=d.slice(),k=E.shift();w(k.name.getText(),[oe(p),k.getEnd()]);for(const R of E)u.isIdentifier(R.name)&&w(R.name.getText(),[R.getFullStart(),R.getEnd()])}const{flags:g}=p.declarationList,v=`declare ${g&u.NodeFlags.Let?"let":g&u.NodeFlags.Const?"const":"var"} `,D=p.declarationList.getChildren().find(E=>E.kind===u.SyntaxKind.SyntaxList).getChildren();let I=0;for(const E of D)if(E.kind===u.SyntaxKind.CommaToken)I=E.getStart(),e.remove(I,E.getEnd());else if(I){e.appendLeft(I,`;
19
- `);const k=E.getFullStart(),R=e.slice(k,E.getStart());let fe=R.length-R.trimStart().length;fe?e.overwrite(k,k+fe,v):e.appendLeft(k,v)}}}for(const p of t.statements)if(l(p),!!V(p,u.ModifierFlags.ExportDefault)&&(u.isFunctionDeclaration(p)||u.isClassDeclaration(p))){if(p.name)continue;a||(a=y("export_default"));const d=p.getChildren(),m=d.findIndex(D=>D.kind===u.SyntaxKind.ClassKeyword||D.kind===u.SyntaxKind.FunctionKeyword),g=d[m],x=d[m+1];x.kind>=u.SyntaxKind.FirstPunctuation&&x.kind<=u.SyntaxKind.LastPunctuation?e.appendLeft(x.getStart(),a):e.appendRight(g.getEnd(),` ${a}`)}for(const p of i.values()){const m=p.pop()[0];for(const g of p)e.move(g[0],g[1],m)}a&&e.append(`
20
- export default ${a};
21
- `),n.size&&e.append(`
22
- export { ${[...n].join(", ")} };
23
- `);for(const[p,d]of s.entries())e.prepend(`import * as ${d} from "${p}";
24
- `);const o=t.getLineStarts(),c=new Set;for(const p of t.typeReferenceDirectives){c.add(p.fileName);const{line:d}=t.getLineAndCharacterOfPosition(p.pos),m=o[d];let g=t.getLineEndOfPosition(p.pos);e.slice(g,g+1)==`
25
- `&&(g+=1),e.remove(m,g)}const f=new Set;for(const p of t.referencedFiles){f.add(p.fileName);const{line:d}=t.getLineAndCharacterOfPosition(p.pos),m=o[d];let g=t.getLineEndOfPosition(p.pos);e.slice(g,g+1)==`
26
- `&&(g+=1),e.remove(m,g)}return{code:e,typeReferences:c,fileReferences:f};function l(p){if(u.forEachChild(p,l),u.isImportTypeNode(p)){if(!u.isLiteralTypeNode(p.argument)||!u.isStringLiteral(p.argument.literal))throw new S(p,"inline imports should have a literal argument");const d=p.argument.literal.text,m=p.getChildren(),g=m.find(I=>I.kind===u.SyntaxKind.ImportKeyword).getStart();let x=p.getEnd();const v=m.find(I=>I.kind===u.SyntaxKind.DotToken||I.kind===u.SyntaxKind.LessThanToken);v&&(x=v.getStart());const D=h(d);e.overwrite(g,x,D)}}function h(p){let d=s.get(p);return d||(d=y(p.replace(/[^a-zA-Z0-9_$]/g,()=>"_")),s.set(p,d)),d}function y(p){let d=p;for(;r.has(d);)d=`_${d}`;return r.add(d),d}function w(p,d){let m=i.get(p);if(!m)m=[d],i.set(p,m);else{const g=m[m.length-1];g[1]===d[0]?g[1]=d[1]:m.push(d)}}}function ze(t,e){if(!u.canHaveModifiers(e))return;let r=!1;const n=u.isEnumDeclaration(e)||u.isClassDeclaration(e)||u.isFunctionDeclaration(e)||u.isModuleDeclaration(e)||u.isVariableStatement(e);for(const a of e.modifiers??[])switch(a.kind){case u.SyntaxKind.ExportKeyword:case u.SyntaxKind.DefaultKeyword:t.remove(a.getStart(),a.getEnd()+1);break;case u.SyntaxKind.DeclareKeyword:r=!0}n&&!r&&t.appendRight(e.getStart(),"declare ")}function dr(t,e){if(!(!e.body||!u.isModuleBlock(e.body))){for(const r of e.body.statements)if(u.isExportDeclaration(r)&&r.exportClause){if(u.isNamespaceExport(r.exportClause))continue;for(const n of r.exportClause.elements)n.propertyName||t.appendLeft(n.name.getEnd(),` as ${n.name.getText()}`)}}}function oe(t){const e=t.getFullStart();return e+(Ue(t,e)?1:0)}function Ve(t){const e=t.getEnd();return e+(Ue(t,e)?1:0)}function Ue(t,e){return t.getSourceFile().getFullText()[e]==`
27
- `}const mr=new Set([u.SyntaxKind.LiteralType,u.SyntaxKind.VoidKeyword,u.SyntaxKind.UnknownKeyword,u.SyntaxKind.AnyKeyword,u.SyntaxKind.BooleanKeyword,u.SyntaxKind.NumberKeyword,u.SyntaxKind.StringKeyword,u.SyntaxKind.ObjectKeyword,u.SyntaxKind.NullKeyword,u.SyntaxKind.UndefinedKeyword,u.SyntaxKind.SymbolKeyword,u.SyntaxKind.NeverKeyword,u.SyntaxKind.ThisKeyword,u.SyntaxKind.ThisType,u.SyntaxKind.BigIntKeyword]);class He{constructor({id:e,range:r}){if(this.scopes=[],e)this.declaration=fr(e,r);else{const{iife:a,fn:s}=cr(r);this.iife=a,this.declaration=s}const n=lr();this.declaration.body.body.push(n.stmt),this.returnExpr=n.expr}pushScope(){this.scopes.push(new Set)}popScope(e=1){for(let r=0;r<e;r++)this.scopes.pop()}pushTypeVariable(e){const r=e.getText();this.scopes[this.scopes.length-1]?.add(r)}pushReference(e){let r;if(e.type==="Identifier"?r=e.name:e.type==="MemberExpression"&&e.object.type==="Identifier"&&(r=e.object.name),r){for(const s of this.scopes)if(s.has(r))return}if(r==="this")return;const{ident:n,expr:a}=or(e);this.declaration.params.push(a),this.returnExpr.elements.push(n)}pushIdentifierReference(e){this.pushReference(O(e))}convertEntityName(e){return u.isIdentifier(e)?O(e):N({type:"MemberExpression",computed:!1,optional:!1,object:this.convertEntityName(e.left),property:O(e.right)},e)}convertPropertyAccess(e){if(!u.isIdentifier(e.expression)&&!u.isPropertyAccessExpression(e.expression))throw new S(e.expression);if(u.isPrivateIdentifier(e.name))throw new S(e.name);let r=u.isIdentifier(e.expression)?O(e.expression):this.convertPropertyAccess(e.expression);return N({type:"MemberExpression",computed:!1,optional:!1,object:r,property:O(e.name)},e)}convertComputedPropertyName(e){if(!e.name||!u.isComputedPropertyName(e.name))return;const{expression:r}=e.name;if(!(u.isLiteralExpression(r)||u.isPrefixUnaryExpression(r))){if(u.isIdentifier(r))return this.pushReference(O(r));if(u.isPropertyAccessExpression(r))return this.pushReference(this.convertPropertyAccess(r));throw new S(r)}}convertParametersAndType(e){this.convertComputedPropertyName(e);const r=this.convertTypeParameters(e.typeParameters);for(const n of e.parameters)this.convertTypeNode(n.type);this.convertTypeNode(e.type),this.popScope(r)}convertHeritageClauses(e){for(const r of e.heritageClauses||[])for(const n of r.types)this.pushReference(_(n.expression)),this.convertTypeArguments(n)}convertTypeArguments(e){if(e.typeArguments)for(const r of e.typeArguments)this.convertTypeNode(r)}convertMembers(e){for(const r of e){if(u.isPropertyDeclaration(r)||u.isPropertySignature(r)||u.isIndexSignatureDeclaration(r)){u.isPropertyDeclaration(r)&&r.initializer&&u.isPropertyAccessExpression(r.initializer)&&this.pushReference(this.convertPropertyAccess(r.initializer)),this.convertComputedPropertyName(r),this.convertTypeNode(r.type);continue}if(u.isMethodDeclaration(r)||u.isMethodSignature(r)||u.isConstructorDeclaration(r)||u.isConstructSignatureDeclaration(r)||u.isCallSignatureDeclaration(r)||u.isGetAccessorDeclaration(r)||u.isSetAccessorDeclaration(r))this.convertParametersAndType(r);else throw new S(r)}}convertTypeParameters(e){if(!e)return 0;for(const r of e)this.convertTypeNode(r.constraint),this.convertTypeNode(r.default),this.pushScope(),this.pushTypeVariable(r.name);return e.length}convertTypeNode(e){if(e&&!mr.has(e.kind)){if(u.isTypeReferenceNode(e)){this.pushReference(this.convertEntityName(e.typeName)),this.convertTypeArguments(e);return}if(u.isTypeLiteralNode(e))return this.convertMembers(e.members);if(u.isArrayTypeNode(e))return this.convertTypeNode(e.elementType);if(u.isTupleTypeNode(e)){for(const r of e.elements)this.convertTypeNode(r);return}if(u.isNamedTupleMember(e)||u.isParenthesizedTypeNode(e)||u.isTypeOperatorNode(e)||u.isTypePredicateNode(e))return this.convertTypeNode(e.type);if(u.isUnionTypeNode(e)||u.isIntersectionTypeNode(e)){for(const r of e.types)this.convertTypeNode(r);return}if(u.isMappedTypeNode(e)){const{typeParameter:r,type:n,nameType:a}=e;this.convertTypeNode(r.constraint),this.pushScope(),this.pushTypeVariable(r.name),this.convertTypeNode(n),a&&this.convertTypeNode(a),this.popScope();return}if(u.isConditionalTypeNode(e)){this.convertTypeNode(e.checkType),this.pushScope(),this.convertTypeNode(e.extendsType),this.convertTypeNode(e.trueType),this.convertTypeNode(e.falseType),this.popScope();return}if(u.isIndexedAccessTypeNode(e)){this.convertTypeNode(e.objectType),this.convertTypeNode(e.indexType);return}if(u.isFunctionOrConstructorTypeNode(e)){this.convertParametersAndType(e);return}if(u.isTypeQueryNode(e)){this.pushReference(this.convertEntityName(e.exprName));return}if(u.isRestTypeNode(e)){this.convertTypeNode(e.type);return}if(u.isOptionalTypeNode(e)){this.convertTypeNode(e.type);return}if(u.isTemplateLiteralTypeNode(e)){for(const r of e.templateSpans)this.convertTypeNode(r.type);return}if(u.isInferTypeNode(e)){const{typeParameter:r}=e;this.convertTypeNode(r.constraint),this.pushTypeVariable(r.name);return}else throw new S(e)}}convertNamespace(e,r=!1){if(this.pushScope(),r&&e.body&&u.isModuleDeclaration(e.body)){this.convertNamespace(e.body,!0);return}if(!e.body||!u.isModuleBlock(e.body))throw new S(e,'namespace must have a "ModuleBlock" body.');const{statements:n}=e.body;for(const a of n){if(u.isEnumDeclaration(a)||u.isFunctionDeclaration(a)||u.isClassDeclaration(a)||u.isInterfaceDeclaration(a)||u.isTypeAliasDeclaration(a)||u.isModuleDeclaration(a)){if(a.name&&u.isIdentifier(a.name))this.pushTypeVariable(a.name);else throw new S(a,"non-Identifier name not supported");continue}if(u.isVariableStatement(a)){for(const s of a.declarationList.declarations)if(u.isIdentifier(s.name))this.pushTypeVariable(s.name);else throw new S(s,"non-Identifier name not supported");continue}if(!u.isExportDeclaration(a))throw new S(a,"namespace child (hoisting) not supported yet")}for(const a of n){if(u.isVariableStatement(a)){for(const s of a.declarationList.declarations)s.type&&this.convertTypeNode(s.type);continue}if(u.isFunctionDeclaration(a)){this.convertParametersAndType(a);continue}if(u.isInterfaceDeclaration(a)||u.isClassDeclaration(a)){const s=this.convertTypeParameters(a.typeParameters);this.convertHeritageClauses(a),this.convertMembers(a.members),this.popScope(s);continue}if(u.isTypeAliasDeclaration(a)){const s=this.convertTypeParameters(a.typeParameters);this.convertTypeNode(a.type),this.popScope(s);continue}if(u.isModuleDeclaration(a)){this.convertNamespace(a,r);continue}if(!u.isEnumDeclaration(a))if(u.isExportDeclaration(a)){if(a.exportClause){if(u.isNamespaceExport(a.exportClause))throw new S(a.exportClause);for(const s of a.exportClause.elements){const i=s.propertyName||s.name;this.pushIdentifierReference(i)}}}else throw new S(a,"namespace child (walking) not supported yet")}this.popScope()}}function hr({sourceFile:t}){return new br(t).transform()}class br{constructor(e){this.sourceFile=e,this.declarations=new Map,this.ast=ur(e);for(const r of e.statements)this.convertStatement(r)}transform(){return{ast:this.ast}}pushStatement(e){this.ast.body.push(e)}createDeclaration(e,r){const n={start:e.getFullStart(),end:e.getEnd()};if(!r){const o=new He({range:n});return this.pushStatement(o.iife),o}const a=r.getText(),s=new He({id:r,range:n}),i=this.declarations.get(a);if(i){i.pushIdentifierReference(r),i.declaration.end=n.end;let o=this.ast.body.findIndex(c=>c==i.declaration);for(let c=o+1;c<this.ast.body.length;c++){const f=this.ast.body[c];f.start=f.end=n.end}}else this.pushStatement(s.declaration),this.declarations.set(a,s);return i||s}convertStatement(e){if(u.isEnumDeclaration(e))return this.convertEnumDeclaration(e);if(u.isFunctionDeclaration(e))return this.convertFunctionDeclaration(e);if(u.isInterfaceDeclaration(e)||u.isClassDeclaration(e))return this.convertClassOrInterfaceDeclaration(e);if(u.isTypeAliasDeclaration(e))return this.convertTypeAliasDeclaration(e);if(u.isVariableStatement(e))return this.convertVariableStatement(e);if(u.isExportDeclaration(e)||u.isExportAssignment(e))return this.convertExportDeclaration(e);if(u.isModuleDeclaration(e))return this.convertNamespaceDeclaration(e);if(e.kind==u.SyntaxKind.NamespaceExportDeclaration)return this.removeStatement(e);if(u.isImportDeclaration(e)||u.isImportEqualsDeclaration(e))return this.convertImportDeclaration(e);throw new S(e)}removeStatement(e){this.pushStatement(N({type:"ExpressionStatement",expression:{type:"Literal",value:"pls remove me"}},e))}convertNamespaceDeclaration(e){if(e.flags&u.NodeFlags.GlobalAugmentation||!u.isIdentifier(e.name)){this.createDeclaration(e).convertNamespace(e,!0);return}const n=this.createDeclaration(e,e.name);n.pushIdentifierReference(e.name),n.convertNamespace(e)}convertEnumDeclaration(e){this.createDeclaration(e,e.name).pushIdentifierReference(e.name)}convertFunctionDeclaration(e){if(!e.name)throw new S(e,"FunctionDeclaration should have a name");const r=this.createDeclaration(e,e.name);r.pushIdentifierReference(e.name),r.convertParametersAndType(e)}convertClassOrInterfaceDeclaration(e){if(!e.name)throw new S(e,"ClassDeclaration / InterfaceDeclaration should have a name");const r=this.createDeclaration(e,e.name),n=r.convertTypeParameters(e.typeParameters);r.convertHeritageClauses(e),r.convertMembers(e.members),r.popScope(n)}convertTypeAliasDeclaration(e){const r=this.createDeclaration(e,e.name),n=r.convertTypeParameters(e.typeParameters);r.convertTypeNode(e.type),r.popScope(n)}convertVariableStatement(e){const{declarations:r}=e.declarationList;if(r.length!==1)throw new S(e,"VariableStatement with more than one declaration not yet supported");for(const n of r){if(!u.isIdentifier(n.name))throw new S(e,"VariableDeclaration must have a name");this.createDeclaration(e,n.name).convertTypeNode(n.type)}}convertExportDeclaration(e){if(u.isExportAssignment(e)){this.pushStatement(N({type:"ExportDefaultDeclaration",declaration:_(e.expression)},e));return}const r=e.moduleSpecifier?_(e.moduleSpecifier):void 0;if(!e.exportClause)this.pushStatement(N({type:"ExportAllDeclaration",source:r,exported:null},e));else if(u.isNamespaceExport(e.exportClause))this.pushStatement(N({type:"ExportAllDeclaration",source:r,exported:O(e.exportClause.name)},e));else{const n=[];for(const a of e.exportClause.elements)n.push(this.convertExportSpecifier(a));this.pushStatement(N({type:"ExportNamedDeclaration",declaration:null,specifiers:n,source:r},e))}}convertImportDeclaration(e){if(u.isImportEqualsDeclaration(e)){if(!u.isExternalModuleReference(e.moduleReference))throw new S(e,"ImportEquals should have a literal source.");this.pushStatement(N({type:"ImportDeclaration",specifiers:[{type:"ImportDefaultSpecifier",local:O(e.name)}],source:_(e.moduleReference.expression)},e));return}const r=_(e.moduleSpecifier),n=e.importClause&&e.importClause.namedBindings?this.convertNamedImportBindings(e.importClause.namedBindings):[];e.importClause&&e.importClause.name&&n.push({type:"ImportDefaultSpecifier",local:O(e.importClause.name)}),this.pushStatement(N({type:"ImportDeclaration",specifiers:n,source:r},e))}convertNamedImportBindings(e){return u.isNamedImports(e)?e.elements.map(r=>{const n=O(r.name),a=r.propertyName?O(r.propertyName):n;return{type:"ImportSpecifier",local:n,imported:a}}):[{type:"ImportNamespaceSpecifier",local:O(e.name)}]}convertExportSpecifier(e){const r=O(e.name);return{type:"ExportSpecifier",exported:r,local:e.propertyName?O(e.propertyName):r}}}class gr{constructor(e){this.source=e,this.DEBUG=!!process.env.DTS_EXPORTS_FIXER_DEBUG}fix(){const e=this.findExports();return e.sort((r,n)=>r.location.start-n.location.start),this.getCodeParts(e).join("")}findExports(){const{rawExports:e,values:r,types:n}=this.getExportsAndLocals();return e.map(a=>{const s=a.elements.map(i=>{const o=i.name.text,c=i.propertyName?.text??i.name.text,f=n.some(l=>l.getText()===c)&&!r.some(l=>l.getText()===c)?"type":"value";return this.DEBUG&&console.log(`export ${c} as ${o} is a ${f}`),{exportedName:o,localName:c,kind:f}});return{location:{start:a.getStart(),end:a.getEnd()},exports:s}})}getExportsAndLocals(e=this.source.statements){const r=[],n=[],a=[],s=i=>{const{rawExports:o,values:c,types:f}=this.getExportsAndLocals(i);r.push(...o),n.push(...c),a.push(...f)};for(const i of e)if(this.DEBUG&&console.log(i.getText(),i.kind),!u.isImportDeclaration(i)){if(u.isInterfaceDeclaration(i)||u.isTypeAliasDeclaration(i)){this.DEBUG&&console.log(`${i.name.getFullText()} is a type`),a.push(i.name);continue}if(u.isEnumDeclaration(i)||u.isFunctionDeclaration(i)||u.isClassDeclaration(i)||u.isVariableStatement(i)){if(u.isVariableStatement(i))for(const o of i.declarationList.declarations)u.isIdentifier(o.name)&&(this.DEBUG&&console.log(`${o.name.getFullText()} is a value (from var statement)`),n.push(o.name));else i.name&&(this.DEBUG&&console.log(`${i.name.getFullText()} is a value (from declaration)`),n.push(i.name));continue}if(u.isModuleBlock(i)){const o=i.statements;s(o);continue}if(u.isModuleDeclaration(i)){i.name&&u.isIdentifier(i.name)&&(this.DEBUG&&console.log(`${i.name.getFullText()} is a value (from module declaration)`),n.push(i.name)),s(i.getChildren());continue}if(u.isExportDeclaration(i)){if(i.moduleSpecifier||i.isTypeOnly)continue;const o=i.exportClause;if(!o||!u.isNamedExports(o))continue;r.push(o);continue}this.DEBUG&&console.log("unhandled statement",i.getFullText(),i.kind)}return{rawExports:r,values:n,types:a}}createNamedExport(e,r=!1){return`${!r&&e.kind==="type"?"type ":""}${e.localName}${e.localName===e.exportedName?"":` as ${e.exportedName}`}`}getCodeParts(e){let r=0;const n=this.source.getFullText(),a=[];for(const s of e){const i=n.slice(r,s.location.start);i.length>0&&a.push(i),a.push(this.getExportStatement(s)),r=s.location.end}return r<n.length&&a.push(n.slice(r)),a}getExportStatement(e){const r=e.exports.every(n=>n.kind==="type")&&e.exports.length>0;return`${r?"type ":""}{ ${e.exports.map(n=>this.createNamedExport(n,r)).join(", ")} }`}}function U(t,e){return u.createSourceFile(t,e,u.ScriptTarget.Latest,!0)}const yr=()=>{const t=new Map,e=new Map;return{name:"dts-transform",options({onLog:r,...n}){return{...n,onLog(a,s,i){a==="warn"&&s.code=="CIRCULAR_DEPENDENCY"||(r?r(a,s,i):i(a,s))},treeshake:{moduleSideEffects:"no-external",propertyReadSideEffects:!0,unknownGlobalSideEffects:!1}}},outputOptions(r){return{...r,chunkFileNames:r.chunkFileNames||"[name]-[hash].d.ts",entryFileNames:r.entryFileNames||"[name].d.ts",format:"es",exports:"named",compact:!1,freeze:!0,interop:"esModule",generatedCode:Object.assign({symbols:!1},r.generatedCode),strict:!1}},transform(r,n){let a=U(n,r);const s=pr({sourceFile:a});t.set(a.fileName,s.typeReferences),e.set(a.fileName,s.fileReferences),r=s.code.toString(),a=U(n,r);const i=hr({sourceFile:a});return process.env.DTS_DUMP_AST&&(console.log(n),console.log(r),console.log(JSON.stringify(i.ast.body,void 0,2))),{code:r,ast:i.ast,map:s.code.generateMap()}},renderChunk(r,n,a){const s=U(n.fileName,r),i=new sr(s),o=new Set,c=new Set;for(const h of Object.keys(n.modules)){for(const y of t.get(h.split("\\").join("/"))||[])o.add(y);for(const y of e.get(h.split("\\").join("/"))||[])if(y.startsWith(".")){const w=T.join(T.dirname(h),y),p=a.file&&T.dirname(a.file)||n.facadeModuleId&&T.dirname(n.facadeModuleId)||".";let d=T.relative(p,w).split("\\").join("/");d[0]!=="."&&(d="./"+d),c.add(d)}else c.add(y)}let f=Xe(Array.from(c,h=>`/// <reference path="${h}" />`));return f+=Xe(Array.from(o,h=>`/// <reference types="${h}" />`)),f+=i.fix(),f||(f+=`
28
- export { }`),{code:new gr(U(n.fileName,f)).fix(),map:{mappings:""}}}}};function Xe(t){return t.length?t.join(`
29
- `)+`
30
- `:""}const ce=/\.([cm]ts|[tj]sx?)$/;function le({programs:t,resolvedOptions:{compilerOptions:e,tsconfig:r}},n,a){if(!t.length&&z.test(n))return{code:a};const s=t.find(i=>!!i.getSourceFile(n));if(s){const i=s.getSourceFile(n);return{code:i?.getFullText(),source:i,program:s}}else if(u.sys.fileExists(n)){const i=tr(n,e,r);t.push(i);const o=i.getSourceFile(n);return{code:o?.getFullText(),source:o,program:i}}else return null}const Ye=(t={})=>{const e=yr(),r={programs:[],resolvedOptions:Zt(t)};return{name:"dts",outputOptions:e.outputOptions,renderChunk:e.renderChunk,options(n){let{input:a=[]}=n;if(!Array.isArray(a))a=typeof a=="string"?[a]:Object.values(a);else if(a.length>1){n.input={};for(const s of a){let i=s.replace(/((\.d)?\.(c|m)?(t|j)sx?)$/,"");T.isAbsolute(s)?i=T.basename(i):i=T.normalize(i),n.input[i]=s}}return r.programs=rr(Object.values(a),r.resolvedOptions.compilerOptions,r.resolvedOptions.tsconfig),e.options.call(this,n)},transform(n,a){if(!ce.test(a))return null;const s=f=>{if(f.program){const l=T.dirname(a);f.program.getSourceFiles().map(y=>y.fileName).filter(y=>y.startsWith(l)).forEach(this.addWatchFile)}},i=()=>{const f=le(r,a,n);return f?(s(f),e.transform.call(this,f.code,a)):null},o=()=>{const f=a.replace(ce,Ke);let l=le(r,f,n);return l?(s(l),e.transform.call(this,l.code,f)):null},c=()=>{const f=le(r,a,n);if(!f||!f.source||!f.program)return null;s(f);const l=a.replace(ce,Ke);let h;const{emitSkipped:y,diagnostics:w}=f.program.emit(f.source,(p,d)=>{h=e.transform.call(this,d,l)},void 0,!0);if(y){const p=w.filter(d=>d.category===u.DiagnosticCategory.Error);p.length&&(console.error(u.formatDiagnostics(p,se)),this.error("Failed to compile. Check the logs above."))}return h};return z.test(a)?i():o()??c()},resolveId(n,a){if(!a)return;a=a.split("\\").join("/");let s=r.resolvedOptions.compilerOptions;if(r.resolvedOptions.tsconfig){const o=n.startsWith(".")?T.resolve(T.dirname(a),n):n;s=ue(o,r.resolvedOptions.compilerOptions,r.resolvedOptions.tsconfig).compilerOptions}const{resolvedModule:i}=u.resolveModuleName(n,a,s,u.sys);if(i)return!r.resolvedOptions.respectExternal&&i.isExternalLibraryImport?{id:n,external:!0}:{id:T.resolve(i.resolvedFileName)}}}};exports.default=Ye,exports.dts=Ye;