pkgroll 2.8.0 → 2.8.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/dist/cli.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var zD=Object.defineProperty;var i=(u,D)=>zD(u,"name",{value:D,configurable:!0});import S from"node:fs";import GD from"tty";import{watch as KD,rollup as JD}from"rollup";import h from"node:path";import ZD from"@rollup/plugin-node-resolve";import HD from"@rollup/plugin-commonjs";import QD from"@rollup/plugin-json";import YD from"@rollup/plugin-alias";import XD from"@rollup/plugin-replace";import ue from"@rollup/plugin-dynamic-import-vars";import{createFilter as De}from"@rollup/pluginutils";import{transform as Mu}from"esbuild";import ee,{builtinModules as te}from"node:module";import cu from"magic-string";import ne from"fs";import{attachScopes as re}from"rollup-pluginutils";const oe="known-flag",se="unknown-flag",ie="argument",{stringify:z}=JSON,ae=/\B([A-Z])/g,le=i(u=>u.replace(ae,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:ce}=Object.prototype,G=i((u,D)=>ce.call(u,D),"w$3"),Fe=i(u=>Array.isArray(u),"L$3"),Wu=i(u=>typeof u=="function"?[u,!1]:Fe(u)?[u[0],!0]:Wu(u.type),"b$2"),fe=i((u,D)=>u===Boolean?D!=="false":D,"d$3"),pe=i((u,D)=>typeof D=="boolean"?D:u===Number&&D===""?Number.NaN:u(D),"m$2"),Ce=/[\s.:=]/,de=i(u=>{const D=`Flag name ${z(u)}`;if(u.length===0)throw new Error(`${D} cannot be empty`);if(u.length===1)throw new Error(`${D} must be longer than a character`);const t=u.match(Ce);if(t)throw new Error(`${D} cannot contain ${z(t?.[0])}`)},"B$1"),Ee=i(u=>{const D={},t=i((e,n)=>{if(G(D,e))throw new Error(`Duplicate flags named ${z(e)}`);D[e]=n},"r");for(const e in u){if(!G(u,e))continue;de(e);const n=u[e],r=[[],...Wu(n),n];t(e,r);const o=le(e);if(e!==o&&t(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:s}=n,a=`Flag alias ${z(s)} for flag ${z(e)}`;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 D},"K$2"),he=i((u,D)=>{const t={};for(const e in u){if(!G(u,e))continue;const[n,,r,o]=D[e];if(n.length===0&&"default"in o){let{default:s}=o;typeof s=="function"&&(s=s()),t[e]=s}else t[e]=r?n:n.pop()}return t},"_$3"),X="--",ge=/[.:=]/,me=/^-{1,2}\w/,Be=i(u=>{if(!me.test(u))return;const D=!u.startsWith(X);let t=u.slice(D?1:2),e;const n=t.match(ge);if(n){const{index:r}=n;e=t.slice(r+1),t=t.slice(0,r)}return[t,e,D]},"N$1"),Ae=i((u,{onFlag:D,onArgument:t})=>{let e;const n=i((r,o)=>{if(typeof e!="function")return!0;e(r,o),e=void 0},"o");for(let r=0;r<u.length;r+=1){const o=u[r];if(o===X){n();const a=u.slice(r+1);t?.(a,[r],!0);break}const s=Be(o);if(s){if(n(),!D)continue;const[a,l,p]=s;if(p)for(let f=0;f<a.length;f+=1){n();const c=f===a.length-1;e=D(a[f],c?l:void 0,[r,f+1,c])}else e=D(a,l,[r])}else n(o,[r])&&t?.([o],[r])}n()},"$$1"),ye=i((u,D)=>{for(const[t,e,n]of D.reverse()){if(e){const r=u[t];let o=r.slice(0,e);if(n||(o+=r.slice(e+1)),o!=="-"){u[t]=o;continue}}u.splice(t,1)}},"E$1"),be=i((u,D=process.argv.slice(2),{ignore:t}={})=>{const e=[],n=Ee(u),r={},o=[];return o[X]=[],Ae(D,{onFlag(s,a,l){const p=G(n,s);if(!t?.(p?oe:se,s,a)){if(p){const[f,c]=n[s],E=fe(c,a),d=i((g,y)=>{e.push(l),y&&e.push(y),f.push(pe(c,g||""))},"p");return E===void 0?d:d(E)}G(r,s)||(r[s]=[]),r[s].push(a===void 0?!0:a),e.push(l)}},onArgument(s,a,l){t?.(ie,D[a[0]])||(o.push(...s),l?(o[X]=s,D.splice(a[0])):e.push(a))}}),ye(D,e),{flags:he(u,n),unknownFlags:r,_:o}},"U$2");var we=Object.create,uu=Object.defineProperty,ve=Object.defineProperties,$e=Object.getOwnPropertyDescriptor,xe=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertyNames,Uu=Object.getOwnPropertySymbols,je=Object.getPrototypeOf,Vu=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,qu=i((u,D,t)=>D in u?uu(u,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[D]=t,"W$2"),Du=i((u,D)=>{for(var t in D||(D={}))Vu.call(D,t)&&qu(u,t,D[t]);if(Uu)for(var t of Uu(D))Oe.call(D,t)&&qu(u,t,D[t]);return u},"p$1"),Fu=i((u,D)=>ve(u,xe(D)),"c"),Te=i(u=>uu(u,"__esModule",{value:!0}),"nD"),Se=i((u,D)=>()=>(u&&(D=u(u=0)),D),"rD"),Pe=i((u,D)=>()=>(D||u((D={exports:{}}).exports,D),D.exports),"iD"),_e=i((u,D,t,e)=>{if(D&&typeof D=="object"||typeof D=="function")for(let n of ke(D))!Vu.call(u,n)&&n!=="default"&&uu(u,n,{get:i(()=>D[n],"get"),enumerable:!(e=$e(D,n))||e.enumerable});return u},"oD"),Ne=i((u,D)=>_e(Te(uu(u!=null?we(je(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),x=Se(()=>{}),Ie=Pe((u,D)=>{x(),D.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}});x(),x(),x();var Re=i(u=>{var D,t,e;let n=(D=process.stdout.columns)!=null?D: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:(e=u.stdoutColumns)!=null?e:n}},"v$1");x(),x(),x(),x(),x();function Le({onlyFirst:u=!1}={}){let D=["[\\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(D,u?void 0:"g")}i(Le,"w$2");function zu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Le(),"")}i(zu,"d$2"),x();function Me(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(Me,"y$1");var We=Ne(Ie());function I(u){if(typeof u!="string"||u.length===0||(u=zu(u),u.length===0))return 0;u=u.replace((0,We.default)()," ");let D=0;for(let t=0;t<u.length;t++){let e=u.codePointAt(t);e<=31||e>=127&&e<=159||e>=768&&e<=879||(e>65535&&t++,D+=Me(e)?2:1)}return D}i(I,"g");var Gu=i(u=>Math.max(...u.split(`
|
|
3
|
+
`).map(I)),"b$1"),Ue=i(u=>{let D=[];for(let t of u){let{length:e}=t,n=e-D.length;for(let r=0;r<n;r+=1)D.push(0);for(let r=0;r<e;r+=1){let o=Gu(t[r]);o>D[r]&&(D[r]=o)}}return D},"k$1");x();var Ku=/^\d+%$/,Ju={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Ve=i((u,D)=>{var t;let e=[];for(let n=0;n<u.length;n+=1){let r=(t=D[n])!=null?t:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&Ku.test(r)){e.push(Fu(Du({},Ju),{width:r,contentWidth:u[n]}));continue}if(r&&typeof r=="object"){let o=Fu(Du(Du({},Ju),r),{contentWidth:u[n]});o.horizontalPadding=o.paddingLeft+o.paddingRight,e.push(o);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return e},"sD");function qe(u,D){for(let t of u){let{width:e}=t;if(e==="content-width"&&(t.width=t.contentWidth),e==="auto"){let a=Math.min(20,t.contentWidth);t.width=a,t.autoOverflow=t.contentWidth-a}if(typeof e=="string"&&Ku.test(e)){let a=Number.parseFloat(e.slice(0,-1))/100;t.width=Math.floor(D*a)-(t.paddingLeft+t.paddingRight)}let{horizontalPadding:n}=t,r=1,o=r+n;if(o>=D){let a=o-D,l=Math.ceil(t.paddingLeft/n*a),p=a-l;t.paddingLeft-=l,t.paddingRight-=p,t.horizontalPadding=t.paddingLeft+t.paddingRight}t.paddingLeftString=t.paddingLeft?" ".repeat(t.paddingLeft):"",t.paddingRightString=t.paddingRight?" ".repeat(t.paddingRight):"";let s=D-t.horizontalPadding;t.width=Math.max(Math.min(t.width,s),r)}}i(qe,"aD");var Zu=i(()=>Object.assign([],{columns:0}),"G$1");function ze(u,D){let t=[Zu()],[e]=t;for(let n of u){let r=n.width+n.horizontalPadding;e.columns+r>D&&(e=Zu(),t.push(e)),e.push(n),e.columns+=r}for(let n of t){let r=n.reduce((c,E)=>c+E.width+E.horizontalPadding,0),o=D-r;if(o===0)continue;let s=n.filter(c=>"autoOverflow"in c),a=s.filter(c=>c.autoOverflow>0),l=a.reduce((c,E)=>c+E.autoOverflow,0),p=Math.min(l,o);for(let c of a){let E=Math.floor(c.autoOverflow/l*p);c.width+=E,o-=E}let f=Math.floor(o/s.length);for(let c=0;c<s.length;c+=1){let E=s[c];c===s.length-1?E.width+=o:E.width+=f,o-=f}}return t}i(ze,"lD");function Ge(u,D,t){let e=Ve(t,D);return qe(e,u),ze(e,u)}i(Ge,"Z$2"),x(),x(),x();var fu=10,Hu=i((u=0)=>D=>`\x1B[${D+u}m`,"U$1"),Qu=i((u=0)=>D=>`\x1B[${38+u};5;${D}m`,"V$1"),Yu=i((u=0)=>(D,t,e)=>`\x1B[${38+u};2;${D};${t};${e}m`,"Y$1");function Ke(){let u=new Map,D={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]}};D.color.gray=D.color.blackBright,D.bgColor.bgGray=D.bgColor.bgBlackBright,D.color.grey=D.color.blackBright,D.bgColor.bgGrey=D.bgColor.bgBlackBright;for(let[t,e]of Object.entries(D)){for(let[n,r]of Object.entries(e))D[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[n]=D[n],u.set(r[0],r[1]);Object.defineProperty(D,t,{value:e,enumerable:!1})}return Object.defineProperty(D,"codes",{value:u,enumerable:!1}),D.color.close="\x1B[39m",D.bgColor.close="\x1B[49m",D.color.ansi=Hu(),D.color.ansi256=Qu(),D.color.ansi16m=Yu(),D.bgColor.ansi=Hu(fu),D.bgColor.ansi256=Qu(fu),D.bgColor.ansi16m=Yu(fu),Object.defineProperties(D,{rgbToAnsi256:{value:i((t,e,n)=>t===e&&e===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(n/255*5),"value"),enumerable:!1},hexToRgb:{value:i(t=>{let e=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(t.toString(16));if(!e)return[0,0,0];let{colorString:n}=e.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]},"value"),enumerable:!1},hexToAnsi256:{value:i(t=>D.rgbToAnsi256(...D.hexToRgb(t)),"value"),enumerable:!1},ansi256ToAnsi:{value:i(t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,n,r;if(t>=232)e=((t-232)*10+8)/255,n=e,r=e;else{t-=16;let a=t%36;e=Math.floor(t/36)/5,n=Math.floor(a/6)/5,r=a%6/5}let o=Math.max(e,n,r)*2;if(o===0)return 30;let s=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(e));return o===2&&(s+=60),s},"value"),enumerable:!1},rgbToAnsi:{value:i((t,e,n)=>D.ansi256ToAnsi(D.rgbToAnsi256(t,e,n)),"value"),enumerable:!1},hexToAnsi:{value:i(t=>D.ansi256ToAnsi(D.hexToAnsi256(t)),"value"),enumerable:!1}}),D}i(Ke,"AD");var Je=Ke(),Ze=Je,eu=new Set(["\x1B","\x9B"]),He=39,pu="\x07",Xu="[",Qe="]",uD="m",Cu=`${Qe}8;;`,DD=i(u=>`${eu.values().next().value}${Xu}${u}${uD}`,"J$2"),eD=i(u=>`${eu.values().next().value}${Cu}${u}${pu}`,"Q$1"),Ye=i(u=>u.split(" ").map(D=>I(D)),"hD"),du=i((u,D,t)=>{let e=[...D],n=!1,r=!1,o=I(zu(u[u.length-1]));for(let[s,a]of e.entries()){let l=I(a);if(o+l<=t?u[u.length-1]+=a:(u.push(a),o=0),eu.has(a)&&(n=!0,r=e.slice(s+1).join("").startsWith(Cu)),n){r?a===pu&&(n=!1,r=!1):a===uD&&(n=!1);continue}o+=l,o===t&&s<e.length-1&&(u.push(""),o=0)}!o&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"S$2"),Xe=i(u=>{let D=u.split(" "),t=D.length;for(;t>0&&!(I(D[t-1])>0);)t--;return t===D.length?u:D.slice(0,t).join(" ")+D.slice(t).join("")},"cD"),ut=i((u,D,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let e="",n,r,o=Ye(u),s=[""];for(let[l,p]of u.split(" ").entries()){t.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let f=I(s[s.length-1]);if(l!==0&&(f>=D&&(t.wordWrap===!1||t.trim===!1)&&(s.push(""),f=0),(f>0||t.trim===!1)&&(s[s.length-1]+=" ",f++)),t.hard&&o[l]>D){let c=D-f,E=1+Math.floor((o[l]-c-1)/D);Math.floor((o[l]-1)/D)<E&&s.push(""),du(s,p,D);continue}if(f+o[l]>D&&f>0&&o[l]>0){if(t.wordWrap===!1&&f<D){du(s,p,D);continue}s.push("")}if(f+o[l]>D&&t.wordWrap===!1){du(s,p,D);continue}s[s.length-1]+=p}t.trim!==!1&&(s=s.map(l=>Xe(l)));let a=[...s.join(`
|
|
4
|
+
`)];for(let[l,p]of a.entries()){if(e+=p,eu.has(p)){let{groups:c}=new RegExp(`(?:\\${Xu}(?<code>\\d+)m|\\${Cu}(?<uri>.*)${pu})`).exec(a.slice(l).join(""))||{groups:{}};if(c.code!==void 0){let E=Number.parseFloat(c.code);n=E===He?void 0:E}else c.uri!==void 0&&(r=c.uri.length===0?void 0:c.uri)}let f=Ze.codes.get(Number(n));a[l+1]===`
|
|
5
|
+
`?(r&&(e+=eD("")),n&&f&&(e+=DD(f))):p===`
|
|
6
|
+
`&&(n&&f&&(e+=DD(n)),r&&(e+=eD(r)))}return e},"dD");function Dt(u,D,t){return String(u).normalize().replace(/\r\n/g,`
|
|
7
|
+
`).split(`
|
|
8
|
+
`).map(e=>ut(e,D,t)).join(`
|
|
9
|
+
`)}i(Dt,"T$1");var tD=i(u=>Array.from({length:u}).fill(""),"X$1");function et(u,D){let t=[],e=0;for(let n of u){let r=0,o=n.map(a=>{var l;let p=(l=D[e])!=null?l:"";e+=1,a.preprocess&&(p=a.preprocess(p)),Gu(p)>a.width&&(p=Dt(p,a.width,{hard:!0}));let f=p.split(`
|
|
10
|
+
`);if(a.postprocess){let{postprocess:c}=a;f=f.map((E,d)=>c.call(a,E,d))}return a.paddingTop&&f.unshift(...tD(a.paddingTop)),a.paddingBottom&&f.push(...tD(a.paddingBottom)),f.length>r&&(r=f.length),Fu(Du({},a),{lines:f})}),s=[];for(let a=0;a<r;a+=1){let l=o.map(p=>{var f;let c=(f=p.lines[a])!=null?f:"",E=Number.isFinite(p.width)?" ".repeat(p.width-I(c)):"",d=p.paddingLeftString;return p.align==="right"&&(d+=E),d+=c,p.align==="left"&&(d+=E),d+p.paddingRightString}).join("");s.push(l)}t.push(s.join(`
|
|
11
|
+
`))}return t.join(`
|
|
12
|
+
`)}i(et,"P$1");function tt(u,D){if(!u||u.length===0)return"";let t=Ue(u),e=t.length;if(e===0)return"";let{stdoutColumns:n,columns:r}=Re(D);if(r.length>e)throw new Error(`${r.length} columns defined, but only ${e} columns found`);let o=Ge(n,r,t);return u.map(s=>et(o,s)).join(`
|
|
13
|
+
`)}i(tt,"mD"),x();var nt=["<",">","=",">=","<="];function rt(u){if(!nt.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}i(rt,"xD");function ot(u){let D=Object.keys(u).map(t=>{let[e,n]=t.split(" ");rt(e);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let o=u[t];return{operator:e,breakpoint:r,value:o}}).sort((t,e)=>e.breakpoint-t.breakpoint);return t=>{var e;return(e=D.find(({operator:n,breakpoint:r})=>n==="="&&t===r||n===">"&&t>r||n==="<"&&t<r||n===">="&&t>=r||n==="<="&&t<=r))==null?void 0:e.value}}i(ot,"wD");const st=i(u=>u.replace(/[\W_]([a-z\d])?/gi,(D,t)=>t?t.toUpperCase():""),"S$1"),it=i(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q$1"),at={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:i(u=>u.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function lt(u){let D=!1;return{type:"table",data:{tableData:Object.keys(u).sort((t,e)=>t.localeCompare(e)).map(t=>{const e=u[t],n="alias"in e;return n&&(D=!0),{name:t,flag:e,flagFormatted:`--${it(t)}`,aliasesEnabled:D,aliasFormatted:n?`-${e.alias}`:void 0}}).map(t=>(t.aliasesEnabled=D,[{type:"flagName",data:t},{type:"flagDescription",data:t}])),tableBreakpoints:at}}}i(lt,"D$1");const nD=i(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A$1"),rD=i(u=>{const D="parent"in u&&u.parent?.name;return(D?`${D} `:"")+u.name},"C");function ct(u){const D=[];u.name&&D.push(rD(u));const t=nD(u)??("parent"in u&&nD(u.parent));if(t&&D.push(`v${t}`),D.length!==0)return{id:"name",type:"text",data:`${D.join(" ")}
|
|
14
|
+
`}}i(ct,"R$2");function Ft(u){const{help:D}=u;if(!(!D||!D.description))return{id:"description",type:"text",data:`${D.description}
|
|
15
|
+
`}}i(Ft,"L$1");function ft(u){const D=u.help||{};if("usage"in D)return D.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(D.usage)?D.usage.join(`
|
|
16
|
+
`):D.usage}}:void 0;if(u.name){const t=[],e=[rD(u)];if(u.flags&&Object.keys(u.flags).length>0&&e.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("<"));e.push(n.map(s=>s!=="--"?s:o?"--":"[--]").join(" "))}if(e.length>1&&t.push(e.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(ft,"T");function pt(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(D=>[D.options.name,D.options.help?D.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}i(pt,"_$1");function Ct(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:lt(u.flags),indentBody:0}}}i(Ct,"k");function dt(u){const{help:D}=u;if(!D||!D.examples||D.examples.length===0)return;let{examples:t}=D;if(Array.isArray(t)&&(t=t.join(`
|
|
18
|
+
`)),t)return{id:"examples",type:"section",data:{title:"Examples:",body:t}}}i(dt,"F$1");function Et(u){if(!("alias"in u)||!u.alias)return;const{alias:D}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(D)?D.join(", "):D}}}i(Et,"H$1");const ht=i(u=>[ct,Ft,ft,pt,Ct,dt,Et].map(D=>D(u)).filter(Boolean),"U"),gt=GD.WriteStream.prototype.hasColors();let mt=class{static{i(this,"M")}text(D){return D}bold(D){return gt?`\x1B[1m${D}\x1B[22m`:D.toLocaleUpperCase()}indentText({text:D,spaces:t}){return D.replace(/^/gm," ".repeat(t))}heading(D){return this.bold(D)}section({title:D,body:t,indentBody:e=2}){return`${(D?`${this.heading(D)}
|
|
19
|
+
`:"")+(t?this.indentText({text:this.render(t),spaces:e}):"")}
|
|
20
|
+
`}table({tableData:D,tableOptions:t,tableBreakpoints:e}){return tt(D.map(n=>n.map(r=>this.render(r))),e?ot(e):t)}flagParameter(D){return D===Boolean?"":D===String?"<string>":D===Number?"<number>":Array.isArray(D)?this.flagParameter(D[0]):"<value>"}flagOperator(D){return" "}flagName(D){const{flag:t,flagFormatted:e,aliasesEnabled:n,aliasFormatted:r}=D;let o="";if(r?o+=`${r}, `:n&&(o+=" "),o+=e,"placeholder"in t&&typeof t.placeholder=="string")o+=`${this.flagOperator(D)}${t.placeholder}`;else{const s=this.flagParameter("type"in t?t.type:t);s&&(o+=`${this.flagOperator(D)}${s}`)}return o}flagDefault(D){return JSON.stringify(D)}flagDescription({flag:D}){let t="description"in D?D.description??"":"";if("default"in D){let{default:e}=D;typeof e=="function"&&(e=e()),e&&(t+=` (default: ${this.flagDefault(e)})`)}return t}render(D){if(typeof D=="string")return D;if(Array.isArray(D))return D.map(t=>this.render(t)).join(`
|
|
21
|
+
`);if("type"in D&&this[D.type]){const t=this[D.type];if(typeof t=="function")return t.call(this,D.data)}throw new Error(`Invalid node type: ${JSON.stringify(D)}`)}};const oD=/^[\w.-]+$/,{stringify:T}=JSON,Bt=/[|\\{}()[\]^$+*?.]/;function Eu(u){const D=[];let t,e;for(const n of u){if(e)throw new Error(`Invalid parameter: Spread parameter ${T(e)} 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 ${T(n)} cannot come after optional parameter ${T(t)}`);if(r==="["&&o==="]"&&(s=!1,t=n),s===void 0)throw new Error(`Invalid parameter: ${T(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=n.slice(1,-1);const l=a.slice(-3)==="...";l&&(e=n,a=a.slice(0,-3));const p=a.match(Bt);if(p)throw new Error(`Invalid parameter: ${T(n)}. Invalid character found ${T(p[0])}`);D.push({name:a,required:s,spread:l})}return D}i(Eu,"w$1");function hu(u,D,t,e){for(let n=0;n<D.length;n+=1){const{name:r,required:o,spread:s}=D[n],a=st(r);if(a in u)throw new Error(`Invalid parameter: ${T(r)} is used more than once.`);const l=s?t.slice(n):t[n];if(s&&(n=D.length),o&&(!l||s&&l.length===0))return console.error(`Error: Missing required parameter ${T(r)}
|
|
22
|
+
`),e(),process.exit(1);u[a]=l}}i(hu,"b");function At(u){return u===void 0||u!==!1}i(At,"W$1");function sD(u,D,t,e){const n={...D.flags},r=D.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=D,s=At(o);s&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const a=be(n,e,{ignore:D.ignoreArgv}),l=i(()=>{console.log(D.version)},"f");if(r&&a.flags.version===!0)return l(),process.exit(0);const p=new mt,f=s&&o?.render?o.render:d=>p.render(d),c=i(d=>{const g=ht({...D,...d?{help:d}:{},flags:n});console.log(f(g,p))},"u");if(s&&a.flags.help===!0)return c(),process.exit(0);if(D.parameters){let{parameters:d}=D,g=a._;const y=d.indexOf("--"),j=d.slice(y+1),$=Object.create(null);if(y>-1&&j.length>0){d=d.slice(0,y);const C=a._["--"];g=g.slice(0,-C.length||void 0),hu($,Eu(d),g,c),hu($,Eu(j),C,c)}else hu($,Eu(d),g,c);Object.assign(a._,$)}const E={...a,showVersion:l,showHelp:c};return typeof t=="function"&&t(E),{command:u,...E}}i(sD,"x$1");function yt(u,D){const t=new Map;for(const e of D){const n=[e.options.name],{alias:r}=e.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: ${T(o)}`);t.set(o,e)}}return t.get(u)}i(yt,"z$1");function bt(u,D,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!oD.test(u.name)))throw new Error(`Invalid script name: ${T(u.name)}`);const e=t[0];if(u.commands&&oD.test(e)){const n=yt(e,u.commands);if(n)return sD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return sD(void 0,u,D,t)}i(bt,"Z$1");var wt="2.8.1";const gu=i(u=>S.promises.access(u).then(()=>!0,()=>!1),"fsExists"),vt=i(async u=>{const D=h.join(u,"package.json");if(!await gu(D))throw new Error(`package.json not found at: ${D}`);const e=await S.promises.readFile(D,"utf8");try{return JSON.parse(e)}catch(n){throw new Error(`Cannot parse package.json: ${n.message}`)}},"readPackageJson"),$t=/^[/.]/,K=i((u,D)=>(!h.isAbsolute(u)&&!$t.test(u)&&(u=`./${u}`),D&&!u.endsWith("/")&&(u+="/"),u),"normalizePath"),xt=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,kt=new Set(["do","if","in","for","int","new","try","var","byte","case","char","else","enum","goto","long","null","this","true","void","with","break","catch","class","const","false","final","float","short","super","throw","while","delete","double","export","import","native","public","return","static","switch","throws","typeof","boolean","default","extends","finally","package","private","abstract","continue","debugger","function","volatile","interface","protected","transient","implements","instanceof","synchronized"]),mu=i(u=>!xt.test(u)||kt.has(u),"propertyNeedsQuotes"),P=i(u=>{if(u.endsWith(".mjs"))return"module";if(u.endsWith(".cjs"))return"commonjs"},"getFileType"),iD=i(u=>u.startsWith("."),"isPath"),Bu=i((u,D,t="exports")=>{if(u){if(typeof u=="string")return iD(u)?[{outputPath:u,type:P(u)||D,from:t}]:[];if(Array.isArray(u))return u.flatMap((e,n)=>{const r=`${t}[${n}]`;return typeof e=="string"?iD(e)?{outputPath:e,type:P(e)||D,from:r}:[]:Bu(e,D,r)});if(typeof u=="object")return Object.entries(u).flatMap(([e,n])=>{if(typeof n=="string"){const o=mu(e)?`["${e}"]`:`.${e}`,s={outputPath:n,from:`${t}${o}`};if(e==="require")return{...s,type:"commonjs"};if(e==="import")return{...s,type:P(n)||D};if(e==="types")return{...s,type:"types"};if(e==="node")return{...s,type:P(n)||D,platform:"node"};if(e==="default")return{...s,type:P(n)||D}}const r=mu(e)?`["${e}"]`:`.${e}`;return Bu(n,D,`${t}${r}`)})}return[]},"parseExportsMap"),M=i((u,D)=>{D.outputPath=K(D.outputPath);const{outputPath:t,type:e,platform:n}=D,r=u[t];if(r){if(r.type!==e)throw new Error(`Conflicting export types "${r.type}" & "${e}" found for ${t}`);if(r.platform!==n)throw new Error(`Conflicting export platforms "${r.platform}" & "${n}" found for ${t}`);Object.assign(r,D)}else u[t]=D},"addExportPath"),jt=i(u=>{const D={},t=u.type??"commonjs";if(u.main){const e=u.main;M(D,{outputPath:e,type:P(e)??t,from:"main"})}if(u.module&&M(D,{outputPath:u.module,type:"module",from:"module"}),u.types&&M(D,{outputPath:u.types,type:"types",from:"types"}),u.bin){const{bin:e}=u;if(typeof e=="string")M(D,{outputPath:e,type:P(e)??t,isExecutable:!0,from:"bin"});else for(const[n,r]of Object.entries(e)){const o=mu(n)?`["${n}"]`:`.${n}`;M(D,{outputPath:r,type:P(r)??t,isExecutable:!0,from:`bin${o}`})}}if(u.exports){const e=Bu(u.exports,t);for(const n of e)M(D,n)}return Object.values(D)},"getExportEntries"),Ot=i(u=>{let D=!1;if(u.includes("=")){const[t,e]=u.split("=");u=e,D=t==="bin"||t==="binary"}return{outputPath:K(u),type:P(u),isExecutable:D,from:"cli"}},"parseCliInputFlag"),Tt=i(({imports:u},D)=>{const t={};if(u)for(const e in u){if(e.startsWith("#"))continue;const n=u[e];typeof n=="string"&&(t[e]=h.join(D,n))}return t},"getAliases"),{stringify:St}=JSON,Pt=i(async(u,D)=>{for(const t of D){const e=u+t;if(await gu(e))return{extension:t,path:e}}},"tryExtensions"),aD={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".tsx",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".tsx",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".tsx",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts",".tsx"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts",".tsx"]},_t=Object.keys(aD),Nt=i(async(u,D,t)=>{const e=D+u.outputPath.slice(t.length);for(const n of _t)if(u.outputPath.endsWith(n)){const r=await Pt(e.slice(0,-n.length),aD[n]);if(r)return{input:r.path,srcExtension:r.extension,distExtension:n}}throw new Error(`Could not find matching source file for export path ${St(u.outputPath)}`)},"getSourcePath"),It=i(u=>{const D=De(/\.([cm]?ts|[jt]sx)$/);return{name:"esbuild-transform",transform:i(async(t,e)=>{if(!D(e))return null;const n=await Mu(t,{...u,loader:"default",sourcefile:e.replace(/\.[cm]ts/,".ts")});return{code:n.code,map:n.map||null}},"transform")}},"esbuildTransform"),Rt=i(u=>{if(u==="es")return"esm";if(u==="cjs"||u==="iife")return u},"getEsbuildFormat"),Lt=i(u=>({name:"esbuild-minify",renderChunk:i(async(D,t,e)=>{const n=await Mu(D,{...u,format:Rt(e.format),minify:!0,keepNames:!0});return{code:n.code,map:n.map||null}},"renderChunk")}),"esbuildMinify"),Au=i((u,D)=>u[0]-D[0]||u[1]-D[1]||u[2]-D[2],"compareSemver"),lD=i(({target:u})=>{const D=u.some(t=>{if(t=t.trim(),!t.startsWith("node"))return;const e=t.slice(4).split(".").map(Number),n=[e[0],e[1]??0,e[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:i(t=>{const e=t.startsWith("node:");if(D&&e&&(t=t.slice(5)),te.includes(t)||e)return{id:t,external:!0}},"resolveId")}},"externalizeNodeBuiltins"),Mt=i(u=>({name:"patch-binary",renderChunk:i((D,t,e)=>{if(!t.isEntry||!t.facadeModuleId)return;const n=e.entryFileNames,r=`./${h.posix.join(e.dir,n(t))}`;if(u.includes(r)){const o=new cu(D);return o.prepend(`#!/usr/bin/env node
|
|
23
|
+
`),{code:o.toString(),map:e.sourcemap?o.generateMap({hires:!0}):void 0}}},"renderChunk"),writeBundle:i(async(D,t)=>{const e=D.entryFileNames,n=Object.values(t).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const s=`./${h.posix.join(D.dir,e(o))}`;await S.promises.chmod(s,493)}});await Promise.all(n)},"writeBundle")}),"patchBinary"),cD=i(()=>{const u=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-typescript-mjs-cjs",resolveId(D,t,e){return u.test(D)&&t?this.resolve(D.replace(/js(x?)$/,"ts$1"),t,e):null}}},"resolveTypescriptMjsCts"),FD=i(u=>u!==null&&typeof u=="object","A"),W=i((u,D)=>Object.assign(new Error(`[${u}]: ${D}`),{code:u}),"a"),fD="ERR_INVALID_PACKAGE_CONFIG",yu="ERR_INVALID_PACKAGE_TARGET",Wt="ERR_PACKAGE_PATH_NOT_EXPORTED",Ut=/^\d+$/,Vt=/^(\.{1,2}|node_modules)$/i,qt=/\/|\\/;var pD=(u=>(u.Export="exports",u.Import="imports",u))(pD||{});const bu=i((u,D,t,e,n)=>{if(D==null)return[];if(typeof D=="string"){const[r,...o]=D.split(qt);if(r===".."||o.some(s=>Vt.test(s)))throw W(yu,`Invalid "${u}" target "${D}" defined in the package config`);return[n?D.replace(/\*/g,n):D]}if(Array.isArray(D))return D.flatMap(r=>bu(u,r,t,e,n));if(FD(D)){for(const r of Object.keys(D)){if(Ut.test(r))throw W(fD,"Cannot contain numeric property keys");if(r==="default"||e.includes(r))return bu(u,D[r],t,e,n)}return[]}throw W(yu,`Invalid "${u}" target "${D}"`)},"f"),J="*",zt=i((u,D)=>{const t=u.indexOf(J),e=D.indexOf(J);return t===e?D.length>u.length:e>t},"m");function Gt(u,D){if(!D.includes(J)&&u.hasOwnProperty(D))return[D];let t,e;for(const n of Object.keys(u))if(n.includes(J)){const[r,o,s]=n.split(J);if(s===void 0&&D.startsWith(r)&&D.endsWith(o)){const a=D.slice(r.length,-o.length||void 0);a&&(!t||zt(t,n))&&(t=n,e=a)}}return[t,e]}i(Gt,"d");const Kt=i(u=>Object.keys(u).reduce((D,t)=>{const e=t===""||t[0]!==".";if(D===void 0||D===e)return e;throw W(fD,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),Jt=/^\w+:/,Zt=i((u,D,t)=>{if(!u)throw new Error('"exports" is required');D=D===""?".":`./${D}`,(typeof u=="string"||Array.isArray(u)||FD(u)&&Kt(u))&&(u={".":u});const[e,n]=Gt(u,D),r=bu(pD.Export,u[e],D,t,n);if(r.length===0)throw W(Wt,D==="."?'No "exports" main defined':`Package subpath '${D}' is not defined by "exports"`);for(const o of r)if(!o.startsWith("./")&&!Jt.test(o))throw W(yu,`Invalid "exports" target "${o}" defined in the package config`);return r},"v");var Ht=Object.defineProperty,F=i((u,D)=>Ht(u,"name",{value:D,configurable:!0}),"l");function k(u){return u.startsWith("\\\\?\\")?u:u.replace(/\\/g,"/")}i(k,"B"),F(k,"slash");const wu=F(u=>{const D=S[u];return(t,...e)=>{const n=`${u}:${e.join(":")}`;let r=t?.get(n);return r===void 0&&(r=Reflect.apply(D,S,e),t?.set(n,r)),r}},"cacheFs"),O=wu("existsSync"),Qt=wu("readFileSync"),tu=wu("statSync"),CD=F((u,D,t)=>{for(;;){const e=h.posix.join(u,D);if(O(t,e))return e;const n=h.dirname(u);if(n===u)return;u=n}},"findUp"),vu=/^\.{1,2}(\/.*)?$/,$u=F(u=>{const D=k(u);return vu.test(D)?D:`./${D}`},"normalizeRelativePath");function dD(u,D=!1){const t=u.length;let e=0,n="",r=0,o=16,s=0,a=0,l=0,p=0,f=0;function c(C,B){let m=0,b=0;for(;m<C||!B;){let w=u.charCodeAt(e);if(w>=48&&w<=57)b=b*16+w-48;else if(w>=65&&w<=70)b=b*16+w-65+10;else if(w>=97&&w<=102)b=b*16+w-97+10;else break;e++,m++}return m<C&&(b=-1),b}i(c,"O"),F(c,"scanHexDigits");function E(C){e=C,n="",r=0,o=16,f=0}i(E,"v"),F(E,"setPosition");function d(){let C=e;if(u.charCodeAt(e)===48)e++;else for(e++;e<u.length&&R(u.charCodeAt(e));)e++;if(e<u.length&&u.charCodeAt(e)===46)if(e++,e<u.length&&R(u.charCodeAt(e)))for(e++;e<u.length&&R(u.charCodeAt(e));)e++;else return f=3,u.substring(C,e);let B=e;if(e<u.length&&(u.charCodeAt(e)===69||u.charCodeAt(e)===101))if(e++,(e<u.length&&u.charCodeAt(e)===43||u.charCodeAt(e)===45)&&e++,e<u.length&&R(u.charCodeAt(e))){for(e++;e<u.length&&R(u.charCodeAt(e));)e++;B=e}else f=3;return u.substring(C,B)}i(d,"A"),F(d,"scanNumber");function g(){let C="",B=e;for(;;){if(e>=t){C+=u.substring(B,e),f=2;break}const m=u.charCodeAt(e);if(m===34){C+=u.substring(B,e),e++;break}if(m===92){if(C+=u.substring(B,e),e++,e>=t){f=2;break}switch(u.charCodeAt(e++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=`
|
|
24
|
+
`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:const b=c(4,!0);b>=0?C+=String.fromCharCode(b):f=4;break;default:f=5}B=e;continue}if(m>=0&&m<=31)if(U(m)){C+=u.substring(B,e),f=2;break}else f=6;e++}return C}i(g,"b"),F(g,"scanString");function y(){if(n="",f=0,r=e,a=s,p=l,e>=t)return r=t,o=17;let C=u.charCodeAt(e);if(nu(C)){do e++,n+=String.fromCharCode(C),C=u.charCodeAt(e);while(nu(C));return o=15}if(U(C))return e++,n+=String.fromCharCode(C),C===13&&u.charCodeAt(e)===10&&(e++,n+=`
|
|
25
|
+
`),s++,l=e,o=14;switch(C){case 123:return e++,o=1;case 125:return e++,o=2;case 91:return e++,o=3;case 93:return e++,o=4;case 58:return e++,o=6;case 44:return e++,o=5;case 34:return e++,n=g(),o=10;case 47:const B=e-1;if(u.charCodeAt(e+1)===47){for(e+=2;e<t&&!U(u.charCodeAt(e));)e++;return n=u.substring(B,e),o=12}if(u.charCodeAt(e+1)===42){e+=2;const m=t-1;let b=!1;for(;e<m;){const w=u.charCodeAt(e);if(w===42&&u.charCodeAt(e+1)===47){e+=2,b=!0;break}e++,U(w)&&(w===13&&u.charCodeAt(e)===10&&e++,s++,l=e)}return b||(e++,f=1),n=u.substring(B,e),o=13}return n+=String.fromCharCode(C),e++,o=16;case 45:if(n+=String.fromCharCode(C),e++,e===t||!R(u.charCodeAt(e)))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+=d(),o=11;default:for(;e<t&&j(C);)e++,C=u.charCodeAt(e);if(r!==e){switch(n=u.substring(r,e),n){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return n+=String.fromCharCode(C),e++,o=16}}i(y,"$"),F(y,"scanNext");function j(C){if(nu(C)||U(C))return!1;switch(C){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}i(j,"U"),F(j,"isUnknownContentCharacter");function $(){let C;do C=y();while(C>=12&&C<=15);return C}return i($,"E"),F($,"scanNextNonTrivia"),{setPosition:E,getPosition:F(()=>e,"getPosition"),scan:D?$:y,getToken:F(()=>o,"getToken"),getTokenValue:F(()=>n,"getTokenValue"),getTokenOffset:F(()=>r,"getTokenOffset"),getTokenLength:F(()=>e-r,"getTokenLength"),getTokenStartLine:F(()=>a,"getTokenStartLine"),getTokenStartCharacter:F(()=>r-p,"getTokenStartCharacter"),getTokenError:F(()=>f,"getTokenError")}}i(dD,"_e"),F(dD,"createScanner");function nu(u){return u===32||u===9}i(nu,"G"),F(nu,"isWhiteSpace");function U(u){return u===10||u===13}i(U,"h"),F(U,"isLineBreak");function R(u){return u>=48&&u<=57}i(R,"N"),F(R,"isDigit");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={})),new Array(20).fill(0).map((u,D)=>" ".repeat(D));const V=200;new Array(V).fill(0).map((u,D)=>`
|
|
26
|
+
`+" ".repeat(D)),new Array(V).fill(0).map((u,D)=>"\r"+" ".repeat(D)),new Array(V).fill(0).map((u,D)=>`\r
|
|
27
|
+
`+" ".repeat(D)),new Array(V).fill(0).map((u,D)=>`
|
|
28
|
+
`+" ".repeat(D)),new Array(V).fill(0).map((u,D)=>"\r"+" ".repeat(D)),new Array(V).fill(0).map((u,D)=>`\r
|
|
29
|
+
`+" ".repeat(D));var ru;(function(u){u.DEFAULT={allowTrailingComma:!1}})(ru||(ru={}));function hD(u,D=[],t=ru.DEFAULT){let e=null,n=[];const r=[];function o(s){Array.isArray(n)?n.push(s):e!==null&&(n[e]=s)}return i(o,"r"),F(o,"onValue"),gD(u,{onObjectBegin:F(()=>{const s={};o(s),r.push(n),n=s,e=null},"onObjectBegin"),onObjectProperty:F(s=>{e=s},"onObjectProperty"),onObjectEnd:F(()=>{n=r.pop()},"onObjectEnd"),onArrayBegin:F(()=>{const s=[];o(s),r.push(n),n=s,e=null},"onArrayBegin"),onArrayEnd:F(()=>{n=r.pop()},"onArrayEnd"),onLiteralValue:o,onError:F((s,a,l)=>{D.push({error:s,offset:a,length:l})},"onError")},t),n[0]}i(hD,"$e"),F(hD,"parse$1");function gD(u,D,t=ru.DEFAULT){const e=dD(u,!1),n=[];function r(A){return A?()=>A(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter()):()=>!0}i(r,"s"),F(r,"toNoArgVisit");function o(A){return A?()=>A(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(o,"r"),F(o,"toNoArgVisitWithPath");function s(A){return A?v=>A(v,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter()):()=>!0}i(s,"f"),F(s,"toOneArgVisit");function a(A){return A?v=>A(v,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(a,"u"),F(a,"toOneArgVisitWithPath");const l=o(D.onObjectBegin),p=a(D.onObjectProperty),f=r(D.onObjectEnd),c=o(D.onArrayBegin),E=r(D.onArrayEnd),d=a(D.onLiteralValue),g=s(D.onSeparator),y=r(D.onComment),j=s(D.onError),$=t&&t.disallowComments,C=t&&t.allowTrailingComma;function B(){for(;;){const A=e.scan();switch(e.getTokenError()){case 4:m(14);break;case 5:m(15);break;case 3:m(13);break;case 1:$||m(11);break;case 2:m(12);break;case 6:m(16);break}switch(A){case 12:case 13:$?m(10):y();break;case 16:m(1);break;case 15:case 14:break;default:return A}}}i(B,"m"),F(B,"scanNext");function m(A,v=[],Lu=[]){if(j(A),v.length+Lu.length>0){let Y=e.getToken();for(;Y!==17;){if(v.indexOf(Y)!==-1){B();break}else if(Lu.indexOf(Y)!==-1)break;Y=B()}}}i(m,"g"),F(m,"handleError");function b(A){const v=e.getTokenValue();return A?d(v):(p(v),n.push(v)),B(),!0}i(b,"y"),F(b,"parseString");function w(){switch(e.getToken()){case 11:const A=e.getTokenValue();let v=Number(A);isNaN(v)&&(m(2),v=0),d(v);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return B(),!0}i(w,"j"),F(w,"parseLiteral");function lu(){return e.getToken()!==10?(m(3,[],[2,5]),!1):(b(!1),e.getToken()===6?(g(":"),B(),Q()||m(4,[],[2,5])):m(5,[],[2,5]),n.pop(),!0)}i(lu,"ke"),F(lu,"parseProperty");function Iu(){l(),B();let A=!1;for(;e.getToken()!==2&&e.getToken()!==17;){if(e.getToken()===5){if(A||m(4,[],[]),g(","),B(),e.getToken()===2&&C)break}else A&&m(6,[],[]);lu()||m(4,[],[2,5]),A=!0}return f(),e.getToken()!==2?m(7,[2],[]):B(),!0}i(Iu,"be"),F(Iu,"parseObject");function Ru(){c(),B();let A=!0,v=!1;for(;e.getToken()!==4&&e.getToken()!==17;){if(e.getToken()===5){if(v||m(4,[],[]),g(","),B(),e.getToken()===4&&C)break}else v&&m(6,[],[]);A?(n.push(0),A=!1):n[n.length-1]++,Q()||m(4,[],[4,5]),v=!0}return E(),A||n.pop(),e.getToken()!==4?m(8,[4],[]):B(),!0}i(Ru,"we"),F(Ru,"parseArray");function Q(){switch(e.getToken()){case 3:return Ru();case 1:return Iu();case 10:return b(!0);default:return w()}}return i(Q,"V"),F(Q,"parseValue"),B(),e.getToken()===17?t.allowEmptyContent?!0:(m(4,[],[]),!1):Q()?(e.getToken()!==17&&m(9,[],[]),!0):(m(4,[],[]),!1)}i(gD,"ye"),F(gD,"visit");var mD;(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"})(mD||(mD={}));var BD;(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"})(BD||(BD={}));const Yt=hD;var AD;(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"})(AD||(AD={}));const yD=F((u,D)=>Yt(Qt(D,u,"utf8")),"readJsonc"),xu=Symbol("implicitBaseUrl"),_="${configDir}",Xt=F(()=>{const{findPnpApi:u}=ee;return u&&u(process.cwd())},"getPnpApi"),ku=F((u,D,t,e)=>{const n=`resolveFromPackageJsonPath:${u}:${D}:${t}`;if(e!=null&&e.has(n))return e.get(n);const r=yD(u,e);if(!r)return;let o=D||"tsconfig.json";if(!t&&r.exports)try{const[s]=Zt(r.exports,D,["require","types"]);o=s}catch{return!1}else!D&&r.tsconfig&&(o=r.tsconfig);return o=h.join(u,"..",o),e?.set(n,o),o},"resolveFromPackageJsonPath"),ju="package.json",Ou="tsconfig.json",un=F((u,D,t)=>{let e=u;if(u===".."&&(e=h.join(e,Ou)),u[0]==="."&&(e=h.resolve(D,e)),h.isAbsolute(e)){if(O(t,e)){if(tu(t,e).isFile())return e}else if(!e.endsWith(".json")){const E=`${e}.json`;if(O(t,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,s=r.join("/"),a=Xt();if(a){const{resolveRequest:E}=a;try{if(o===u){const d=E(h.join(o,ju),D);if(d){const g=ku(d,s,!1,t);if(g&&O(t,g))return g}}else{let d;try{d=E(u,D,{extensions:[".json"]})}catch{d=E(h.join(u,Ou),D)}if(d)return d}}catch{}}const l=CD(h.resolve(D),h.join("node_modules",o),t);if(!l||!tu(t,l).isDirectory())return;const p=h.join(l,ju);if(O(t,p)){const E=ku(p,s,!1,t);if(E===!1)return;if(E&&O(t,E)&&tu(t,E).isFile())return E}const f=h.join(l,s),c=f.endsWith(".json");if(!c){const E=`${f}.json`;if(O(t,E))return E}if(O(t,f)){if(tu(t,f).isDirectory()){const E=h.join(f,ju);if(O(t,E)){const g=ku(E,"",!0,t);if(g&&O(t,g))return g}const d=h.join(f,Ou);if(O(t,d))return d}else if(c)return f}},"resolveExtendsPath"),Tu=F((u,D)=>$u(h.relative(u,D)),"pathRelative"),bD=["files","include","exclude"],Dn=F((u,D,t,e)=>{const n=un(u,D,e);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=h.dirname(n),o=wD(n,e,t);delete o.references;const{compilerOptions:s}=o;if(s){const{baseUrl:a}=s;a&&!a.startsWith(_)&&(s.baseUrl=k(h.relative(D,h.join(r,a)))||"./");let{outDir:l}=s;l&&(l.startsWith(_)||(l=h.relative(D,h.join(r,l))),s.outDir=k(l)||"./")}for(const a of bD){const l=o[a];l&&(o[a]=l.map(p=>p.startsWith(_)?p:k(h.relative(D,h.join(r,p)))))}return o},"resolveExtends"),en=["outDir","declarationDir"],wD=F((u,D,t=new Set)=>{let e;try{e=yD(u,D)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${u}`)}if(typeof e!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const n=h.dirname(u);if(e.compilerOptions){const{compilerOptions:r}=e;r.paths&&!r.baseUrl&&(r[xu]=n)}if(e.extends){const r=Array.isArray(e.extends)?e.extends:[e.extends];delete e.extends;for(const o of r.reverse()){const s=Dn(o,n,new Set(t),D),a={...s,...e,compilerOptions:{...s.compilerOptions,...e.compilerOptions}};s.watchOptions&&(a.watchOptions={...s.watchOptions,...e.watchOptions}),e=a}}if(e.compilerOptions){const{compilerOptions:r}=e,o=["baseUrl","rootDir"];for(const s of o){const a=r[s];if(a&&!a.startsWith(_)){const l=h.resolve(n,a),p=Tu(n,l);r[s]=p}}for(const s of en){let a=r[s];a&&(Array.isArray(e.exclude)||(e.exclude=[]),e.exclude.includes(a)||e.exclude.push(a),a.startsWith(_)||(a=$u(a)),r[s]=a)}}else e.compilerOptions={};if(e.include?(e.include=e.include.map(k),e.files&&delete e.files):e.files&&(e.files=e.files.map(r=>r.startsWith(_)?r:$u(r))),e.watchOptions){const{watchOptions:r}=e;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>k(h.resolve(n,o))))}return e},"_parseTsconfig"),ou=F((u,D)=>{if(u.startsWith(_))return k(h.join(D,u.slice(_.length)))},"interpolateConfigDir"),tn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],vD=F((u,D=new Map)=>{const t=h.resolve(u),e=wD(t,D),n=h.dirname(t),{compilerOptions:r}=e;if(r){for(const s of tn){const a=r[s];if(a){const l=ou(a,n);r[s]=l?Tu(n,l):a}}for(const s of["rootDirs","typeRoots"]){const a=r[s];a&&(r[s]=a.map(l=>{const p=ou(l,n);return p?Tu(n,p):l}))}const{paths:o}=r;if(o)for(const s of Object.keys(o))o[s]=o[s].map(a=>{var l;return(l=ou(a,n))!=null?l:a})}for(const o of bD){const s=e[o];s&&(e[o]=s.map(a=>{var l;return(l=ou(a,n))!=null?l:a}))}return e},"parseTsconfig"),nn=F((u=process.cwd(),D="tsconfig.json",t=new Map)=>{const e=CD(k(u),D,t);if(!e)return null;const n=vD(e,t);return{path:e,config:n}},"getTsconfig"),rn=/\*/g,$D=F((u,D)=>{const t=u.match(rn);if(t&&t.length>1)throw new Error(D)},"assertStarCount"),on=F(u=>{if(u.includes("*")){const[D,t]=u.split("*");return{prefix:D,suffix:t}}return u},"parsePattern"),sn=F(({prefix:u,suffix:D},t)=>t.startsWith(u)&&t.endsWith(D),"isPatternMatch"),an=F((u,D,t)=>Object.entries(u).map(([e,n])=>($D(e,`Pattern '${e}' can have at most one '*' character.`),{pattern:on(e),substitutions:n.map(r=>{if($D(r,`Substitution '${r}' in pattern '${e}' can have at most one '*' character.`),!D&&!vu.test(r))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return h.resolve(t,r)})})),"parsePaths"),ln=F(u=>{const{compilerOptions:D}=u.config;if(!D)return null;const{baseUrl:t,paths:e}=D;if(!t&&!e)return null;const n=xu in D&&D[xu],r=h.resolve(h.dirname(u.path),t||n||"."),o=e?an(e,t,r):[];return s=>{if(vu.test(s))return[];const a=[];for(const c of o){if(c.pattern===s)return c.substitutions.map(k);typeof c.pattern!="string"&&a.push(c)}let l,p=-1;for(const c of a)sn(c.pattern,s)&&c.pattern.prefix.length>p&&(p=c.pattern.prefix.length,l=c);if(!l)return t?[k(h.join(r,s))]:[];const f=s.slice(l.pattern.prefix.length,s.length-l.pattern.suffix.length);return l.substitutions.map(c=>k(c.replace("*",f)))}},"createPathsMatcher"),xD=F(u=>{let D="";for(let t=0;t<u.length;t+=1){const e=u[t],n=e.toUpperCase();D+=e===n?e.toLowerCase():n}return D},"s"),cn=65,Fn=97,fn=F(()=>Math.floor(Math.random()*26),"m"),pn=F(u=>Array.from({length:u},()=>String.fromCodePoint(fn()+(Math.random()>.5?cn:Fn))).join(""),"S"),Cn=F((u=ne)=>{const D=process.execPath;if(u.existsSync(D))return!u.existsSync(xD(D));const t=`/${pn(10)}`;u.writeFileSync(t,"");const e=!u.existsSync(xD(t));return u.unlinkSync(t),e},"l"),{join:su}=h.posix,Su={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},dn=F(u=>{const D=[...Su.ts],t=[...Su.cts],e=[...Su.mts];return u!=null&&u.allowJs&&(D.push(".js",".jsx"),t.push(".cjs"),e.push(".mjs")),[...D,...t,...e]},"getSupportedExtensions"),En=F(u=>{const D=[];if(!u)return D;const{outDir:t,declarationDir:e}=u;return t&&D.push(t),e&&D.push(e),D},"getDefaultExcludeSpec"),kD=F(u=>u.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),hn=["node_modules","bower_components","jspm_packages"],Pu=`(?!(${hn.join("|")})(/|$))`,gn=/(?:^|\/)[^.*?]+$/,jD="**/*",iu="[^/]",_u="[^./]",OD=process.platform==="win32";F(({config:u,path:D},t=Cn())=>{if("extends"in u)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!h.isAbsolute(D))throw new Error("The tsconfig path must be absolute");OD&&(D=k(D));const e=h.dirname(D),{files:n,include:r,exclude:o,compilerOptions:s}=u,a=n?.map(d=>su(e,d)),l=dn(s),p=t?"":"i",f=(o||En(s)).map(d=>{const g=su(e,d),y=kD(g).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${iu}*`).replaceAll(String.raw`\?`,iu);return new RegExp(`^${y}($|/)`,p)}),c=n||r?r:[jD],E=c?c.map(d=>{let g=su(e,d);gn.test(g)&&(g=su(g,jD));const y=kD(g).replaceAll(String.raw`/\*\*`,`(/${Pu}${_u}${iu}*)*?`).replaceAll(/(\/)?\\\*/g,(j,$)=>{const C=`(${_u}|(\\.(?!min\\.js$))?)*`;return $?`/${Pu}${_u}${C}`:C}).replaceAll(/(\/)?\\\?/g,(j,$)=>{const C=iu;return $?`/${Pu}${C}`:C});return new RegExp(`^${y}$`,p)}):void 0;return d=>{if(!h.isAbsolute(d))throw new Error("filePath must be absolute");if(OD&&(d=k(d)),a!=null&&a.includes(d)||!(!l.some(g=>d.endsWith(g))||f.some(g=>g.test(d)))&&E&&E.some(g=>g.test(d)))return u}},"createFilesMatcher");const TD="resolve-tsconfig-paths",mn=i(u=>u[0]===".","isRelative"),Bn=i(u=>u[0]==="/"||/^[\s\S]:/.test(u),"isAbsolute"),An=i(u=>u[0]==="#","isImports"),SD=i(u=>{const D=ln(u);return D?{name:TD,async resolveId(t,e,n){if(!e||mn(t)||Bn(t)||An(t)||t.startsWith("\0"))return null;const r=D(t);for(const o of r){const s=await this.resolve(o,e,{skipSelf:!0,...n});if(s)return s}return null}}:{name:TD}},"resolveTsconfigPaths"),PD=/^#!.*/,yn=i(()=>({name:"strip-hashbang",transform:i(u=>{if(!PD.test(u))return null;const D=new cu(u);return D.replace(PD,""),{code:D.toString(),map:D.generateMap({hires:!0})}},"transform")}),"stripHashbang");class bn{static{i(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(D=>this.replacement=D,"replace")}}replace(D,t,e,n){D&&t&&(e!=null?D[t][e]=n:D[t]=n)}remove(D,t,e){D&&t&&(e!=null?D[t].splice(e,1):delete D[t])}}class wn extends bn{static{i(this,"SyncWalker")}constructor(D,t){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(e=>this.replacement=e,"replace")},this.enter=D,this.leave=t}visit(D,t,e,n){if(D){if(this.enter){const o=this.should_skip,s=this.should_remove,a=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,D,t,e,n),this.replacement&&(D=this.replacement,this.replace(t,e,n,D)),this.should_remove&&this.remove(t,e,n);const l=this.should_skip,p=this.should_remove;if(this.should_skip=o,this.should_remove=s,this.replacement=a,l)return D;if(p)return null}let r;for(r in D){const o=D[r];if(o&&typeof o=="object")if(Array.isArray(o)){const s=o;for(let a=0;a<s.length;a+=1){const l=s[a];_D(l)&&(this.visit(l,D,r,a)||a--)}}else _D(o)&&this.visit(o,D,r,null)}if(this.leave){const o=this.replacement,s=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,D,t,e,n),this.replacement&&(D=this.replacement,this.replace(t,e,n,D)),this.should_remove&&this.remove(t,e,n);const a=this.should_remove;if(this.replacement=o,this.should_remove=s,a)return null}}return D}}function _D(u){return u!==null&&typeof u=="object"&&"type"in u&&typeof u.type=="string"}i(_D,"isNode");function vn(u,{enter:D,leave:t}){return new wn(D,t).visit(u,null)}i(vn,"walk");const $n=i(()=>{const u='import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);';return{name:"esmInjectCreateRequire",renderChunk(D,t,e){if(e.format!=="es"||!/\brequire\b/.test(D))return null;const n=this.parse(D);let r=re(n,"scope"),o=!1;if(vn(n,{enter(a){a.scope&&(r=a.scope),a.type==="Identifier"&&a.name==="require"&&!r.contains("require")&&(o=!0,this.skip())},leave:i(a=>{a.scope&&(r=r.parent)},"leave")}),!o)return null;const s=new cu(D);return s.prepend(u),{code:s.toString(),map:s.generateMap({hires:!0})}}}},"esmInjectCreateRequire"),xn=["peerDependencies","dependencies","optionalDependencies"],Nu="@types/",ND=i((u,D,t=!1)=>{const e=[],{devDependencies:n}=u;for(const r of xn){const o=u[r];if(!o)continue;const s=Object.keys(o);for(const a of s)if(!(a in D))if(a.startsWith(Nu)){if(t){let l=a.slice(Nu.length);l.includes("__")&&(l=`@${l.replace("__","/")}`),e.push(l)}}else{if(n&&t){const l=Nu+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.`)}e.push(a)}}return e.flatMap(r=>[r,new RegExp(`^${r}/`)])},"getExternalDependencies"),ID=i(u=>u.split("?")[0],"stripQuery"),RD={type:i(async(u,D)=>{const[t,e]=await Promise.all([import("./rollup-plugin-dts-DB_DHewM.mjs"),import("./local-typescript-loader-CNJ4NZni.mjs")]);return{input:[],preserveEntrySignatures:"strict",plugins:[lD(u),...D?[SD(D)]:[],cD(),t.default({respectExternal:!0,compilerOptions:{composite:!1,preserveSymlinks:!1,module:e.default.ModuleKind.Preserve,moduleResolution:e.default.ModuleResolutionKind.Bundler},tsconfig:D?.path})],output:[],external:[]}},"type"),app:i((u,D,t,e,n)=>{const r={target:u.target,tsconfigRaw:n?.config};return{input:[],preserveEntrySignatures:"strict",plugins:[lD(u),...n?[SD(n)]:[],cD(),YD({entries:D}),ZD({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),...Object.keys(t).length>0?[XD({preventAssignment:!0,objectGuards:!0,values:t})]:[],yn(),QD(),It(r),HD({ignoreDynamicRequires:!0,extensions:[".js",".ts",".jsx",".tsx"],transformMixedEsModules:!0}),ue({warnOnError:!0}),...u.minify?[Lt(r)]:[],Mt(e),$n()],output:[],external:[]}},"app")},kn=i(async(u,D,t,e,n,r,o)=>{const s=t.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),a=Object.create(null),l=Object.fromEntries(e.env.map(({key:c,value:E})=>[`process.env.${c}`,JSON.stringify(E)])),p=ND(r,n),f=ND(r,n,!0);for(const{input:c,srcExtension:E,distExtension:d,exportEntry:g}of t){if(g.type==="types"){let B=a.type;B||(B=await RD.type(e,o),B.external=f,a.type=B),B.input.includes(c)||B.input.push(c),B.output.push({dir:D,entryFileNames:i(m=>S.realpathSync.native(ID(m.facadeModuleId)).slice(u.length,-E.length)+d,"entryFileNames"),exports:"auto",format:"esm"});continue}let y=a.app;y||(y=RD.app(e,n,l,s,o),y.external=p,a.app=y),y.input.includes(c)||y.input.push(c);const j=y.output,$=h.extname(g.outputPath),C=`${g.type}-${$}`;if(!j[C]){const B={dir:D,exports:"auto",format:g.type,chunkFileNames:`[name]-[hash]${$}`,sourcemap:e.sourcemap,entryFileNames:i(m=>{const w=S.realpathSync.native(ID(m.facadeModuleId)).slice(u.length);return h.join(h.dirname(w),m.name)+d},"entryFileNames")};j.push(B),j[C]=B}}return a},"getRollupConfigs"),jn=i(u=>{if(!u)return nn();const D=h.resolve(u),t=vD(D);return{path:D,config:t}},"getTsconfig");let L=!0;const q=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Z=0;if(q.process&&q.process.env&&q.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:D,NO_COLOR:t,TERM:e,COLORTERM:n}=q.process.env;D||t||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:e==="dumb"?L=!1:"CI"in q.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in q.process.env)?L=!0:L=process.stdout.isTTY,L&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?Z=3:e&&(e.endsWith("-256color")||e.endsWith("256"))?Z=2:Z=1)}let LD={enabled:L,supportLevel:Z};function On(u,D,t=1){const e=`\x1B[${u}m`,n=`\x1B[${D}m`,r=new RegExp(`\\x1b\\[${D}m`,"g");return o=>LD.enabled&&LD.supportLevel>=t?e+(""+o).replace(r,e)+n:""+o}i(On,"kolorist");const Tn=On(90,39),Sn=i(()=>new Date().toLocaleTimeString(),"currentTime"),au=i((...u)=>console.log(`[${Tn(Sn())}]`,...u),"log"),Pn=i(async u=>{await gu(u)&&await S.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:MD}=JSON,N=bt({name:"pkgroll",version:wt,flags:{input:{type:[Ot],alias:"i",description:"Dist paths for source files to bundle (Only use if you cannot use package.json entries)"},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"},tsconfig:{type:String,description:"Custom tsconfig.json file path",alias:"p"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[u=>{const[D,t]=u.split("=");return{key:D,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:i(u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${MD(u)}`)},"type"),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:i((u,D)=>(D.flagOperator=t=>t.name==="env"?".key=":" ",D.render(u)),"render")}}),WD=process.cwd(),UD=K(N.flags.src,!0),H=K(N.flags.dist,!0),VD=jn(N.flags.tsconfig),qD=VD?.config.compilerOptions?.target;qD&&N.flags.target.push(qD),(async()=>{const u=await vt(WD);let D=jt(u);const t=N.flags.input;if(t.length>0){const r=u.type??"commonjs";D.push(...t.map(o=>(o.type||(o.type=r),o)))}if(D=D.filter(r=>{const o=r.outputPath.startsWith(H);return o||console.warn(`Ignoring entry outside of ${H} directory: package.json#${r.from}=${MD(r.outputPath)}`),o}),D.length===0)throw new Error("No export entries found in package.json");const e=await Promise.all(D.map(async r=>({...await Nt(r,UD,H),exportEntry:r}))),n=await kn(K(S.realpathSync.native(UD),!0),H,e,N.flags,Tt(u,WD),u,VD);N.flags.cleanDist&&await Pn(H),N.flags.watch?(au("Watch initialized"),Object.values(n).map(async r=>{KD(r).on("event",async s=>{s.code==="BUNDLE_START"&&au("Building",...Array.isArray(s.input)?s.input:[s.input]),s.code==="BUNDLE_END"&&(await Promise.all(r.output.map(a=>s.result.write(a))),au("Built",...Array.isArray(s.input)?s.input:[s.input])),s.code==="ERROR"&&au("Error:",s.error.message)})})):await Promise.all(Object.values(n).map(async r=>{const o=await JD(r);return Promise.all(r.output.map(s=>o.write(s)))}))})().catch(u=>{console.error(u),process.exit(1)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);var c=Object.defineProperty;var t=(r,e)=>c(r,"name",{value:e,configurable:!0});const s=t(()=>{const r=process.cwd();try{return require.resolve("typescript",{paths:[r]})}catch{throw new Error(`Could not find \`typescript\` in ${r}`)}},"getLocalTypescriptPath");var o=require(s());export{o as default};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);var Ue=Object.defineProperty;var g=(f,e)=>Ue(f,"name",{value:e,configurable:!0});import*as O from"path";import c from"./local-typescript-loader-CNJ4NZni.mjs";import He from"tty";import Xe from"os";import{createRequire as Ye}from"module";import Je from"magic-string";var q={},j={},W={},he;function Qe(){return he||(he=1,Object.defineProperty(W,"__esModule",{value:!0}),W.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,W.matchToToken=function(f){var e={type:"invalid",value:f[0],closed:void 0};return f[1]?(e.type="string",e.closed=!!(f[3]||f[4])):f[5]?e.type="comment":f[6]?(e.type="comment",e.closed=!!f[7]):f[8]?e.type="regex":f[9]?e.type="number":f[10]?e.type="name":f[11]?e.type="punctuator":f[12]&&(e.type="whitespace"),e}),W}g(Qe,"requireJsTokens");var ee={},L={},be;function Ze(){if(be)return L;be=1,Object.defineProperty(L,"__esModule",{value:!0}),L.isIdentifierChar=n,L.isIdentifierName=a,L.isIdentifierStart=d;let f="\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",e="\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 r=new RegExp("["+f+"]"),s=new RegExp("["+f+e+"]");f=e=null;const l=[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],v=[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 p(t,i){let o=65536;for(let h=0,u=i.length;h<u;h+=2){if(o+=i[h],o>t)return!1;if(o+=i[h+1],o>=t)return!0}return!1}g(p,"isInAstralSet");function d(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&r.test(String.fromCharCode(t)):p(t,l)}g(d,"isIdentifierStart");function n(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&&s.test(String.fromCharCode(t)):p(t,l)||p(t,v)}g(n,"isIdentifierChar");function a(t){let i=!0;for(let o=0;o<t.length;o++){let h=t.charCodeAt(o);if((h&64512)===55296&&o+1<t.length){const u=t.charCodeAt(++o);(u&64512)===56320&&(h=65536+((h&1023)<<10)+(u&1023))}if(i){if(i=!1,!d(h))return!1}else if(!n(h))return!1}return!i}return g(a,"isIdentifierName"),L}g(Ze,"requireIdentifier");var P={},ge;function et(){if(ge)return P;ge=1,Object.defineProperty(P,"__esModule",{value:!0}),P.isKeyword=n,P.isReservedWord=l,P.isStrictBindOnlyReservedWord=p,P.isStrictBindReservedWord=d,P.isStrictReservedWord=v;const f={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"]},e=new Set(f.keyword),r=new Set(f.strict),s=new Set(f.strictBind);function l(a,t){return t&&a==="await"||a==="enum"}g(l,"isReservedWord");function v(a,t){return l(a,t)||r.has(a)}g(v,"isStrictReservedWord");function p(a){return s.has(a)}g(p,"isStrictBindOnlyReservedWord");function d(a,t){return v(a,t)||p(a)}g(d,"isStrictBindReservedWord");function n(a){return e.has(a)}return g(n,"isKeyword"),P}g(et,"requireKeyword");var ye;function tt(){return ye||(ye=1,function(f){Object.defineProperty(f,"__esModule",{value:!0}),Object.defineProperty(f,"isIdentifierChar",{enumerable:!0,get:g(function(){return e.isIdentifierChar},"get")}),Object.defineProperty(f,"isIdentifierName",{enumerable:!0,get:g(function(){return e.isIdentifierName},"get")}),Object.defineProperty(f,"isIdentifierStart",{enumerable:!0,get:g(function(){return e.isIdentifierStart},"get")}),Object.defineProperty(f,"isKeyword",{enumerable:!0,get:g(function(){return r.isKeyword},"get")}),Object.defineProperty(f,"isReservedWord",{enumerable:!0,get:g(function(){return r.isReservedWord},"get")}),Object.defineProperty(f,"isStrictBindOnlyReservedWord",{enumerable:!0,get:g(function(){return r.isStrictBindOnlyReservedWord},"get")}),Object.defineProperty(f,"isStrictBindReservedWord",{enumerable:!0,get:g(function(){return r.isStrictBindReservedWord},"get")}),Object.defineProperty(f,"isStrictReservedWord",{enumerable:!0,get:g(function(){return r.isStrictReservedWord},"get")});var e=Ze(),r=et()}(ee)),ee}g(tt,"requireLib$2");var U={exports:{}},ve;function xe(){if(ve)return U.exports;ve=1;let f=process.argv||[],e=process.env,r=!("NO_COLOR"in e||f.includes("--no-color"))&&("FORCE_COLOR"in e||f.includes("--color")||process.platform==="win32"||require!=null&&He.isatty(1)&&e.TERM!=="dumb"||"CI"in e),s=g((p,d,n=p)=>a=>{let t=""+a,i=t.indexOf(d,p.length);return~i?p+l(t,d,n,i)+d:p+t+d},"formatter"),l=g((p,d,n,a)=>{let t="",i=0;do t+=p.substring(i,a)+n,i=a+d.length,a=p.indexOf(d,i);while(~a);return t+p.substring(i)},"replaceClose"),v=g((p=r)=>{let d=p?s:()=>String;return{isColorSupported:p,reset:d("\x1B[0m","\x1B[0m"),bold:d("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:d("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:d("\x1B[3m","\x1B[23m"),underline:d("\x1B[4m","\x1B[24m"),inverse:d("\x1B[7m","\x1B[27m"),hidden:d("\x1B[8m","\x1B[28m"),strikethrough:d("\x1B[9m","\x1B[29m"),black:d("\x1B[30m","\x1B[39m"),red:d("\x1B[31m","\x1B[39m"),green:d("\x1B[32m","\x1B[39m"),yellow:d("\x1B[33m","\x1B[39m"),blue:d("\x1B[34m","\x1B[39m"),magenta:d("\x1B[35m","\x1B[39m"),cyan:d("\x1B[36m","\x1B[39m"),white:d("\x1B[37m","\x1B[39m"),gray:d("\x1B[90m","\x1B[39m"),bgBlack:d("\x1B[40m","\x1B[49m"),bgRed:d("\x1B[41m","\x1B[49m"),bgGreen:d("\x1B[42m","\x1B[49m"),bgYellow:d("\x1B[43m","\x1B[49m"),bgBlue:d("\x1B[44m","\x1B[49m"),bgMagenta:d("\x1B[45m","\x1B[49m"),bgCyan:d("\x1B[46m","\x1B[49m"),bgWhite:d("\x1B[47m","\x1B[49m")}},"createColors");return U.exports=v(),U.exports.createColors=v,U.exports}g(xe,"requirePicocolors");var te={exports:{}},re,we;function rt(){if(we)return re;we=1;var f=/[|\\{}()[\]^$+*?.]/g;return re=g(function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(f,"\\$&")},"escapeStringRegexp"),re}g(rt,"requireEscapeStringRegexp");var H={exports:{}},ne={exports:{}},ae,Se;function nt(){return Se||(Se=1,ae={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]}),ae}g(nt,"requireColorName");var Ee;function Ce(){if(Ee)return ne.exports;Ee=1;var f=nt(),e={};for(var r in f)f.hasOwnProperty(r)&&(e[f[r]]=r);var s=ne.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 l in s)if(s.hasOwnProperty(l)){if(!("channels"in s[l]))throw new Error("missing channels property: "+l);if(!("labels"in s[l]))throw new Error("missing channel labels property: "+l);if(s[l].labels.length!==s[l].channels)throw new Error("channel and label counts mismatch: "+l);var v=s[l].channels,p=s[l].labels;delete s[l].channels,delete s[l].labels,Object.defineProperty(s[l],"channels",{value:v}),Object.defineProperty(s[l],"labels",{value:p})}s.rgb.hsl=function(n){var a=n[0]/255,t=n[1]/255,i=n[2]/255,o=Math.min(a,t,i),h=Math.max(a,t,i),u=h-o,m,y,b;return h===o?m=0:a===h?m=(t-i)/u:t===h?m=2+(i-a)/u:i===h&&(m=4+(a-t)/u),m=Math.min(m*60,360),m<0&&(m+=360),b=(o+h)/2,h===o?y=0:b<=.5?y=u/(h+o):y=u/(2-h-o),[m,y*100,b*100]},s.rgb.hsv=function(n){var a,t,i,o,h,u=n[0]/255,m=n[1]/255,y=n[2]/255,b=Math.max(u,m,y),w=b-Math.min(u,m,y),x=g(function(S){return(b-S)/6/w+1/2},"diffc");return w===0?o=h=0:(h=w/b,a=x(u),t=x(m),i=x(y),u===b?o=i-t:m===b?o=1/3+a-i:y===b&&(o=2/3+t-a),o<0?o+=1:o>1&&(o-=1)),[o*360,h*100,b*100]},s.rgb.hwb=function(n){var a=n[0],t=n[1],i=n[2],o=s.rgb.hsl(n)[0],h=1/255*Math.min(a,Math.min(t,i));return i=1-1/255*Math.max(a,Math.max(t,i)),[o,h*100,i*100]},s.rgb.cmyk=function(n){var a=n[0]/255,t=n[1]/255,i=n[2]/255,o,h,u,m;return m=Math.min(1-a,1-t,1-i),o=(1-a-m)/(1-m)||0,h=(1-t-m)/(1-m)||0,u=(1-i-m)/(1-m)||0,[o*100,h*100,u*100,m*100]};function d(n,a){return Math.pow(n[0]-a[0],2)+Math.pow(n[1]-a[1],2)+Math.pow(n[2]-a[2],2)}return g(d,"comparativeDistance"),s.rgb.keyword=function(n){var a=e[n];if(a)return a;var t=1/0,i;for(var o in f)if(f.hasOwnProperty(o)){var h=f[o],u=d(n,h);u<t&&(t=u,i=o)}return i},s.keyword.rgb=function(n){return f[n]},s.rgb.xyz=function(n){var a=n[0]/255,t=n[1]/255,i=n[2]/255;a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var o=a*.4124+t*.3576+i*.1805,h=a*.2126+t*.7152+i*.0722,u=a*.0193+t*.1192+i*.9505;return[o*100,h*100,u*100]},s.rgb.lab=function(n){var a=s.rgb.xyz(n),t=a[0],i=a[1],o=a[2],h,u,m;return t/=95.047,i/=100,o/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,h=116*i-16,u=500*(t-i),m=200*(i-o),[h,u,m]},s.hsl.rgb=function(n){var a=n[0]/360,t=n[1]/100,i=n[2]/100,o,h,u,m,y;if(t===0)return y=i*255,[y,y,y];i<.5?h=i*(1+t):h=i+t-i*t,o=2*i-h,m=[0,0,0];for(var b=0;b<3;b++)u=a+1/3*-(b-1),u<0&&u++,u>1&&u--,6*u<1?y=o+(h-o)*6*u:2*u<1?y=h:3*u<2?y=o+(h-o)*(2/3-u)*6:y=o,m[b]=y*255;return m},s.hsl.hsv=function(n){var a=n[0],t=n[1]/100,i=n[2]/100,o=t,h=Math.max(i,.01),u,m;return i*=2,t*=i<=1?i:2-i,o*=h<=1?h:2-h,m=(i+t)/2,u=i===0?2*o/(h+o):2*t/(i+t),[a,u*100,m*100]},s.hsv.rgb=function(n){var a=n[0]/60,t=n[1]/100,i=n[2]/100,o=Math.floor(a)%6,h=a-Math.floor(a),u=255*i*(1-t),m=255*i*(1-t*h),y=255*i*(1-t*(1-h));switch(i*=255,o){case 0:return[i,y,u];case 1:return[m,i,u];case 2:return[u,i,y];case 3:return[u,m,i];case 4:return[y,u,i];case 5:return[i,u,m]}},s.hsv.hsl=function(n){var a=n[0],t=n[1]/100,i=n[2]/100,o=Math.max(i,.01),h,u,m;return m=(2-t)*i,h=(2-t)*o,u=t*o,u/=h<=1?h:2-h,u=u||0,m/=2,[a,u*100,m*100]},s.hwb.rgb=function(n){var a=n[0]/360,t=n[1]/100,i=n[2]/100,o=t+i,h,u,m,y;o>1&&(t/=o,i/=o),h=Math.floor(6*a),u=1-i,m=6*a-h,h&1&&(m=1-m),y=t+m*(u-t);var b,w,x;switch(h){default:case 6:case 0:b=u,w=y,x=t;break;case 1:b=y,w=u,x=t;break;case 2:b=t,w=u,x=y;break;case 3:b=t,w=y,x=u;break;case 4:b=y,w=t,x=u;break;case 5:b=u,w=t,x=y;break}return[b*255,w*255,x*255]},s.cmyk.rgb=function(n){var a=n[0]/100,t=n[1]/100,i=n[2]/100,o=n[3]/100,h,u,m;return h=1-Math.min(1,a*(1-o)+o),u=1-Math.min(1,t*(1-o)+o),m=1-Math.min(1,i*(1-o)+o),[h*255,u*255,m*255]},s.xyz.rgb=function(n){var a=n[0]/100,t=n[1]/100,i=n[2]/100,o,h,u;return o=a*3.2406+t*-1.5372+i*-.4986,h=a*-.9689+t*1.8758+i*.0415,u=a*.0557+t*-.204+i*1.057,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:h*12.92,u=u>.0031308?1.055*Math.pow(u,1/2.4)-.055:u*12.92,o=Math.min(Math.max(0,o),1),h=Math.min(Math.max(0,h),1),u=Math.min(Math.max(0,u),1),[o*255,h*255,u*255]},s.xyz.lab=function(n){var a=n[0],t=n[1],i=n[2],o,h,u;return a/=95.047,t/=100,i/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*t-16,h=500*(a-t),u=200*(t-i),[o,h,u]},s.lab.xyz=function(n){var a=n[0],t=n[1],i=n[2],o,h,u;h=(a+16)/116,o=t/500+h,u=h-i/200;var m=Math.pow(h,3),y=Math.pow(o,3),b=Math.pow(u,3);return h=m>.008856?m:(h-16/116)/7.787,o=y>.008856?y:(o-16/116)/7.787,u=b>.008856?b:(u-16/116)/7.787,o*=95.047,h*=100,u*=108.883,[o,h,u]},s.lab.lch=function(n){var a=n[0],t=n[1],i=n[2],o,h,u;return o=Math.atan2(i,t),h=o*360/2/Math.PI,h<0&&(h+=360),u=Math.sqrt(t*t+i*i),[a,u,h]},s.lch.lab=function(n){var a=n[0],t=n[1],i=n[2],o,h,u;return u=i/360*2*Math.PI,o=t*Math.cos(u),h=t*Math.sin(u),[a,o,h]},s.rgb.ansi16=function(n){var a=n[0],t=n[1],i=n[2],o=1 in arguments?arguments[1]:s.rgb.hsv(n)[2];if(o=Math.round(o/50),o===0)return 30;var h=30+(Math.round(i/255)<<2|Math.round(t/255)<<1|Math.round(a/255));return o===2&&(h+=60),h},s.hsv.ansi16=function(n){return s.rgb.ansi16(s.hsv.rgb(n),n[2])},s.rgb.ansi256=function(n){var a=n[0],t=n[1],i=n[2];if(a===t&&t===i)return a<8?16:a>248?231:Math.round((a-8)/247*24)+232;var o=16+36*Math.round(a/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5);return o},s.ansi16.rgb=function(n){var a=n%10;if(a===0||a===7)return n>50&&(a+=3.5),a=a/10.5*255,[a,a,a];var t=(~~(n>50)+1)*.5,i=(a&1)*t*255,o=(a>>1&1)*t*255,h=(a>>2&1)*t*255;return[i,o,h]},s.ansi256.rgb=function(n){if(n>=232){var a=(n-232)*10+8;return[a,a,a]}n-=16;var t,i=Math.floor(n/36)/5*255,o=Math.floor((t=n%36)/6)/5*255,h=t%6/5*255;return[i,o,h]},s.rgb.hex=function(n){var a=((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255),t=a.toString(16).toUpperCase();return"000000".substring(t.length)+t},s.hex.rgb=function(n){var a=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!a)return[0,0,0];var t=a[0];a[0].length===3&&(t=t.split("").map(function(m){return m+m}).join(""));var i=parseInt(t,16),o=i>>16&255,h=i>>8&255,u=i&255;return[o,h,u]},s.rgb.hcg=function(n){var a=n[0]/255,t=n[1]/255,i=n[2]/255,o=Math.max(Math.max(a,t),i),h=Math.min(Math.min(a,t),i),u=o-h,m,y;return u<1?m=h/(1-u):m=0,u<=0?y=0:o===a?y=(t-i)/u%6:o===t?y=2+(i-a)/u:y=4+(a-t)/u+4,y/=6,y%=1,[y*360,u*100,m*100]},s.hsl.hcg=function(n){var a=n[1]/100,t=n[2]/100,i=1,o=0;return t<.5?i=2*a*t:i=2*a*(1-t),i<1&&(o=(t-.5*i)/(1-i)),[n[0],i*100,o*100]},s.hsv.hcg=function(n){var a=n[1]/100,t=n[2]/100,i=a*t,o=0;return i<1&&(o=(t-i)/(1-i)),[n[0],i*100,o*100]},s.hcg.rgb=function(n){var a=n[0]/360,t=n[1]/100,i=n[2]/100;if(t===0)return[i*255,i*255,i*255];var o=[0,0,0],h=a%1*6,u=h%1,m=1-u,y=0;switch(Math.floor(h)){case 0:o[0]=1,o[1]=u,o[2]=0;break;case 1:o[0]=m,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=u;break;case 3:o[0]=0,o[1]=m,o[2]=1;break;case 4:o[0]=u,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=m}return y=(1-t)*i,[(t*o[0]+y)*255,(t*o[1]+y)*255,(t*o[2]+y)*255]},s.hcg.hsv=function(n){var a=n[1]/100,t=n[2]/100,i=a+t*(1-a),o=0;return i>0&&(o=a/i),[n[0],o*100,i*100]},s.hcg.hsl=function(n){var a=n[1]/100,t=n[2]/100,i=t*(1-a)+.5*a,o=0;return i>0&&i<.5?o=a/(2*i):i>=.5&&i<1&&(o=a/(2*(1-i))),[n[0],o*100,i*100]},s.hcg.hwb=function(n){var a=n[1]/100,t=n[2]/100,i=a+t*(1-a);return[n[0],(i-a)*100,(1-i)*100]},s.hwb.hcg=function(n){var a=n[1]/100,t=n[2]/100,i=1-t,o=i-a,h=0;return o<1&&(h=(i-o)/(1-o)),[n[0],o*100,h*100]},s.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]},s.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]},s.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]},s.gray.hsl=s.gray.hsv=function(n){return[0,0,n[0]]},s.gray.hwb=function(n){return[0,100,n[0]]},s.gray.cmyk=function(n){return[0,0,0,n[0]]},s.gray.lab=function(n){return[n[0],0,0]},s.gray.hex=function(n){var a=Math.round(n[0]/100*255)&255,t=(a<<16)+(a<<8)+a,i=t.toString(16).toUpperCase();return"000000".substring(i.length)+i},s.rgb.gray=function(n){var a=(n[0]+n[1]+n[2])/3;return[a/255*100]},ne.exports}g(Ce,"requireConversions");var ie,Te;function at(){if(Te)return ie;Te=1;var f=Ce();function e(){for(var v={},p=Object.keys(f),d=p.length,n=0;n<d;n++)v[p[n]]={distance:-1,parent:null};return v}g(e,"buildGraph");function r(v){var p=e(),d=[v];for(p[v].distance=0;d.length;)for(var n=d.pop(),a=Object.keys(f[n]),t=a.length,i=0;i<t;i++){var o=a[i],h=p[o];h.distance===-1&&(h.distance=p[n].distance+1,h.parent=n,d.unshift(o))}return p}g(r,"deriveBFS");function s(v,p){return function(d){return p(v(d))}}g(s,"link");function l(v,p){for(var d=[p[v].parent,v],n=f[p[v].parent][v],a=p[v].parent;p[a].parent;)d.unshift(p[a].parent),n=s(f[p[a].parent][a],n),a=p[a].parent;return n.conversion=d,n}return g(l,"wrapConversion"),ie=g(function(v){for(var p=r(v),d={},n=Object.keys(p),a=n.length,t=0;t<a;t++){var i=n[t],o=p[i];o.parent!==null&&(d[i]=l(i,p))}return d},"route"),ie}g(at,"requireRoute");var se,Ne;function it(){if(Ne)return se;Ne=1;var f=Ce(),e=at(),r={},s=Object.keys(f);function l(p){var d=g(function(n){return n==null?n:(arguments.length>1&&(n=Array.prototype.slice.call(arguments)),p(n))},"wrappedFn");return"conversion"in p&&(d.conversion=p.conversion),d}g(l,"wrapRaw");function v(p){var d=g(function(n){if(n==null)return n;arguments.length>1&&(n=Array.prototype.slice.call(arguments));var a=p(n);if(typeof a=="object")for(var t=a.length,i=0;i<t;i++)a[i]=Math.round(a[i]);return a},"wrappedFn");return"conversion"in p&&(d.conversion=p.conversion),d}return g(v,"wrapRounded"),s.forEach(function(p){r[p]={},Object.defineProperty(r[p],"channels",{value:f[p].channels}),Object.defineProperty(r[p],"labels",{value:f[p].labels});var d=e(p),n=Object.keys(d);n.forEach(function(a){var t=d[a];r[p][a]=v(t),r[p][a].raw=l(t)})}),se=r,se}g(it,"requireColorConvert"),H.exports;var Oe;function st(){return Oe||(Oe=1,function(f){const e=it(),r=g((p,d)=>function(){return`\x1B[${p.apply(e,arguments)+d}m`},"wrapAnsi16"),s=g((p,d)=>function(){const n=p.apply(e,arguments);return`\x1B[${38+d};5;${n}m`},"wrapAnsi256"),l=g((p,d)=>function(){const n=p.apply(e,arguments);return`\x1B[${38+d};2;${n[0]};${n[1]};${n[2]}m`},"wrapAnsi16m");function v(){const p=new Map,d={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]}};d.color.grey=d.color.gray;for(const t of Object.keys(d)){const i=d[t];for(const o of Object.keys(i)){const h=i[o];d[o]={open:`\x1B[${h[0]}m`,close:`\x1B[${h[1]}m`},i[o]=d[o],p.set(h[0],h[1])}Object.defineProperty(d,t,{value:i,enumerable:!1}),Object.defineProperty(d,"codes",{value:p,enumerable:!1})}const n=g(t=>t,"ansi2ansi"),a=g((t,i,o)=>[t,i,o],"rgb2rgb");d.color.close="\x1B[39m",d.bgColor.close="\x1B[49m",d.color.ansi={ansi:r(n,0)},d.color.ansi256={ansi256:s(n,0)},d.color.ansi16m={rgb:l(a,0)},d.bgColor.ansi={ansi:r(n,10)},d.bgColor.ansi256={ansi256:s(n,10)},d.bgColor.ansi16m={rgb:l(a,10)};for(let t of Object.keys(e)){if(typeof e[t]!="object")continue;const i=e[t];t==="ansi16"&&(t="ansi"),"ansi16"in i&&(d.color.ansi[t]=r(i.ansi16,0),d.bgColor.ansi[t]=r(i.ansi16,10)),"ansi256"in i&&(d.color.ansi256[t]=s(i.ansi256,0),d.bgColor.ansi256[t]=s(i.ansi256,10)),"rgb"in i&&(d.color.ansi16m[t]=l(i.rgb,0),d.bgColor.ansi16m[t]=l(i.rgb,10))}return d}g(v,"assembleStyles"),Object.defineProperty(f,"exports",{enumerable:!0,get:v})}(H)),H.exports}g(st,"requireAnsiStyles");var ue,ke;function ut(){return ke||(ke=1,ue=g((f,e)=>{e=e||process.argv;const r=f.startsWith("-")?"":f.length===1?"-":"--",s=e.indexOf(r+f),l=e.indexOf("--");return s!==-1&&(l===-1?!0:s<l)},"hasFlag")),ue}g(ut,"requireHasFlag");var oe,De;function ot(){if(De)return oe;De=1;const f=Xe,e=ut(),r=process.env;let s;e("no-color")||e("no-colors")||e("color=false")?s=!1:(e("color")||e("colors")||e("color=true")||e("color=always"))&&(s=!0),"FORCE_COLOR"in r&&(s=r.FORCE_COLOR.length===0||parseInt(r.FORCE_COLOR,10)!==0);function l(d){return d===0?!1:{level:d,hasBasic:!0,has256:d>=2,has16m:d>=3}}g(l,"translateLevel");function v(d){if(s===!1)return 0;if(e("color=16m")||e("color=full")||e("color=truecolor"))return 3;if(e("color=256"))return 2;if(d&&!d.isTTY&&s!==!0)return 0;const n=s?1:0;if(process.platform==="win32"){const a=f.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(a=>a in r)||r.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in r){const a=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:(r.TERM==="dumb",n)}g(v,"supportsColor");function p(d){const n=v(d);return l(n)}return g(p,"getSupportLevel"),oe={supportsColor:p,stdout:p(process.stdout),stderr:p(process.stderr)},oe}g(ot,"requireSupportsColor");var ce,Re;function ct(){if(Re)return ce;Re=1;const f=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,s=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,l=new Map([["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function v(a){return a[0]==="u"&&a.length===5||a[0]==="x"&&a.length===3?String.fromCharCode(parseInt(a.slice(1),16)):l.get(a)||a}g(v,"unescape");function p(a,t){const i=[],o=t.trim().split(/\s*,\s*/g);let h;for(const u of o)if(!isNaN(u))i.push(Number(u));else if(h=u.match(r))i.push(h[2].replace(s,(m,y,b)=>y?v(y):b));else throw new Error(`Invalid Chalk template style argument: ${u} (in style '${a}')`);return i}g(p,"parseArguments");function d(a){e.lastIndex=0;const t=[];let i;for(;(i=e.exec(a))!==null;){const o=i[1];if(i[2]){const h=p(o,i[2]);t.push([o].concat(h))}else t.push([o])}return t}g(d,"parseStyle");function n(a,t){const i={};for(const h of t)for(const u of h.styles)i[u[0]]=h.inverse?null:u.slice(1);let o=a;for(const h of Object.keys(i))if(Array.isArray(i[h])){if(!(h in o))throw new Error(`Unknown Chalk style: ${h}`);i[h].length>0?o=o[h].apply(o,i[h]):o=o[h]}return o}return g(n,"buildStyle"),ce=g((a,t)=>{const i=[],o=[];let h=[];if(t.replace(f,(u,m,y,b,w,x)=>{if(m)h.push(v(m));else if(b){const S=h.join("");h=[],o.push(i.length===0?S:n(a,i)(S)),i.push({inverse:y,styles:d(b)})}else if(w){if(i.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(n(a,i)(h.join(""))),h=[],i.pop()}else h.push(x)}),o.push(h.join("")),i.length>0){const u=`Chalk template literal is missing ${i.length} closing bracket${i.length===1?"":"s"} (\`}\`)`;throw new Error(u)}return o.join("")},"templates"),ce}g(ct,"requireTemplates");var Me;function lt(){return Me||(Me=1,function(f){const e=rt(),r=st(),s=ot().stdout,l=ct(),v=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),p=["ansi","ansi","ansi256","ansi16m"],d=new Set(["gray"]),n=Object.create(null);function a(m,y){y=y||{};const b=s?s.level:0;m.level=y.level===void 0?b:y.level,m.enabled="enabled"in y?y.enabled:m.level>0}g(a,"applyOptions");function t(m){if(!this||!(this instanceof t)||this.template){const y={};return a(y,m),y.template=function(){const b=[].slice.call(arguments);return u.apply(null,[y.template].concat(b))},Object.setPrototypeOf(y,t.prototype),Object.setPrototypeOf(y.template,y),y.template.constructor=t,y.template}a(this,m)}g(t,"Chalk"),v&&(r.blue.open="\x1B[94m");for(const m of Object.keys(r))r[m].closeRe=new RegExp(e(r[m].close),"g"),n[m]={get(){const y=r[m];return o.call(this,this._styles?this._styles.concat(y):[y],this._empty,m)}};n.visible={get(){return o.call(this,this._styles||[],!0,"visible")}},r.color.closeRe=new RegExp(e(r.color.close),"g");for(const m of Object.keys(r.color.ansi))d.has(m)||(n[m]={get(){const y=this.level;return function(){const w={open:r.color[p[y]][m].apply(null,arguments),close:r.color.close,closeRe:r.color.closeRe};return o.call(this,this._styles?this._styles.concat(w):[w],this._empty,m)}}});r.bgColor.closeRe=new RegExp(e(r.bgColor.close),"g");for(const m of Object.keys(r.bgColor.ansi)){if(d.has(m))continue;const y="bg"+m[0].toUpperCase()+m.slice(1);n[y]={get(){const b=this.level;return function(){const x={open:r.bgColor[p[b]][m].apply(null,arguments),close:r.bgColor.close,closeRe:r.bgColor.closeRe};return o.call(this,this._styles?this._styles.concat(x):[x],this._empty,m)}}}}const i=Object.defineProperties(()=>{},n);function o(m,y,b){const w=g(function(){return h.apply(w,arguments)},"builder");w._styles=m,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||b==="gray"||b==="grey",w.__proto__=i,w}g(o,"build");function h(){const m=arguments,y=m.length;let b=String(arguments[0]);if(y===0)return"";if(y>1)for(let x=1;x<y;x++)b+=" "+m[x];if(!this.enabled||this.level<=0||!b)return this._empty?"":b;const w=r.dim.open;v&&this.hasGrey&&(r.dim.open="");for(const x of this._styles.slice().reverse())b=x.open+b.replace(x.closeRe,x.open)+x.close,b=b.replace(/\r?\n/g,`${x.close}$&${x.open}`);return r.dim.open=w,b}g(h,"applyStyle");function u(m,y){if(!Array.isArray(y))return[].slice.call(arguments,1).join(" ");const b=[].slice.call(arguments,2),w=[y.raw[0]];for(let x=1;x<y.length;x++)w.push(String(b[x-1]).replace(/[{}\\]/g,"\\$&")),w.push(String(y.raw[x]));return l(m,w.join(""))}g(u,"chalkTag"),Object.defineProperties(t.prototype,n),f.exports=t(),f.exports.supportsColor=s,f.exports.default=f.exports}(te)),te.exports}g(lt,"requireChalk");var Ie;function ft(){if(Ie)return j;Ie=1,Object.defineProperty(j,"__esModule",{value:!0}),j.default=y,j.shouldHighlight=h;var f=Qe(),e=tt(),r=l(xe(),!0);function s(b){if(typeof WeakMap!="function")return null;var w=new WeakMap,x=new WeakMap;return(s=g(function(S){return S?x:w},"_getRequireWildcardCache"))(b)}g(s,"_getRequireWildcardCache");function l(b,w){if(b===null||typeof b!="object"&&typeof b!="function")return{default:b};var x=s(w);if(x&&x.has(b))return x.get(b);var S={__proto__:null},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in b)if(E!=="default"&&{}.hasOwnProperty.call(b,E)){var T=C?Object.getOwnPropertyDescriptor(b,E):null;T&&(T.get||T.set)?Object.defineProperty(S,E,T):S[E]=b[E]}return S.default=b,x&&x.set(b,S),S}g(l,"_interopRequireWildcard");const v=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,r.createColors)(!1):r.default,p=g((b,w)=>x=>b(w(x)),"compose"),d=new Set(["as","async","from","get","of","set"]);function n(b){return{keyword:b.cyan,capitalized:b.yellow,jsxIdentifier:b.yellow,punctuator:b.yellow,number:b.magenta,string:b.green,regex:b.magenta,comment:b.gray,invalid:p(p(b.white,b.bgRed),b.bold)}}g(n,"getDefs");const a=/\r\n|[\n\r\u2028\u2029]/,t=/^[()[\]{}]$/;let i;{const b=/^[a-z][\w-]*$/i,w=g(function(x,S,C){if(x.type==="name"){if((0,e.isKeyword)(x.value)||(0,e.isStrictReservedWord)(x.value,!0)||d.has(x.value))return"keyword";if(b.test(x.value)&&(C[S-1]==="<"||C.slice(S-2,S)==="</"))return"jsxIdentifier";if(x.value[0]!==x.value[0].toLowerCase())return"capitalized"}return x.type==="punctuator"&&t.test(x.value)?"bracket":x.type==="invalid"&&(x.value==="@"||x.value==="#")?"punctuator":x.type},"getTokenType");i=g(function*(x){let S;for(;S=f.default.exec(x);){const C=f.matchToToken(S);yield{type:w(C,S.index,x),value:C.value}}},"tokenize")}function o(b,w){let x="";for(const{type:S,value:C}of i(w)){const E=b[S];E?x+=C.split(a).map(T=>E(T)).join(`
|
|
3
|
+
`):x+=C}return x}g(o,"highlightTokens");function h(b){return v.isColorSupported||b.forceColor}g(h,"shouldHighlight");let u;function m(b){if(b){var w;return(w=u)!=null||(u=(0,r.createColors)(!0)),u}return v}g(m,"getColors");function y(b,w={}){if(b!==""&&h(w)){const x=n(m(w.forceColor));return o(x,b)}else return b}g(y,"highlight");{let b,w;j.getChalk=({forceColor:x})=>{var S;if((S=b)!=null||(b=lt()),x){var C;return(C=w)!=null||(w=new b.constructor({enabled:!0,level:1})),w}return b}}return j}g(ft,"requireLib$1");var Fe;function pt(){if(Fe)return q;Fe=1,Object.defineProperty(q,"__esModule",{value:!0}),q.codeFrameColumns=o,q.default=h;var f=ft(),e=s(xe(),!0);function r(u){if(typeof WeakMap!="function")return null;var m=new WeakMap,y=new WeakMap;return(r=g(function(b){return b?y:m},"_getRequireWildcardCache"))(u)}g(r,"_getRequireWildcardCache");function s(u,m){if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var y=r(m);if(y&&y.has(u))return y.get(u);var b={__proto__:null},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in u)if(x!=="default"&&Object.prototype.hasOwnProperty.call(u,x)){var S=w?Object.getOwnPropertyDescriptor(u,x):null;S&&(S.get||S.set)?Object.defineProperty(b,x,S):b[x]=u[x]}return b.default=u,y&&y.set(u,b),b}g(s,"_interopRequireWildcard");const l=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,e.createColors)(!1):e.default,v=g((u,m)=>y=>u(m(y)),"compose");let p;function d(u){if(u){var m;return(m=p)!=null||(p=(0,e.createColors)(!0)),p}return l}g(d,"getColors");let n=!1;function a(u){return{gutter:u.gray,marker:v(u.red,u.bold),message:v(u.red,u.bold)}}g(a,"getDefs");const t=/\r\n|[\n\r\u2028\u2029]/;function i(u,m,y){const b=Object.assign({column:0,line:-1},u.start),w=Object.assign({},b,u.end),{linesAbove:x=2,linesBelow:S=3}=y||{},C=b.line,E=b.column,T=w.line,R=w.column;let $=Math.max(C-(x+1),0),K=Math.min(m.length,T+S);C===-1&&($=0),T===-1&&(K=m.length);const z=T-C,I={};if(z)for(let M=0;M<=z;M++){const F=M+C;if(!E)I[F]=!0;else if(M===0){const A=m[F-1].length;I[F]=[E,A-E+1]}else if(M===z)I[F]=[0,R];else{const A=m[F-M].length;I[F]=[0,A]}}else E===R?E?I[C]=[E,0]:I[C]=!0:I[C]=[E,R-E];return{start:$,end:K,markerLines:I}}g(i,"getMarkerLines");function o(u,m,y={}){const b=(y.highlightCode||y.forceColor)&&(0,f.shouldHighlight)(y),w=d(y.forceColor),x=a(w),S=g((M,F)=>b?M(F):F,"maybeHighlight"),C=u.split(t),{start:E,end:T,markerLines:R}=i(m,C,y),$=m.start&&typeof m.start.column=="number",K=String(T).length;let I=(b?(0,f.default)(u,y):u).split(t,T).slice(E,T).map((M,F)=>{const A=E+1+F,Q=` ${` ${A}`.slice(-K)} |`,V=R[A],Ge=!R[A+1];if(V){let Z="";if(Array.isArray(V)){const ze=M.slice(0,Math.max(V[0]-1,0)).replace(/[^\t]/g," "),Ve=V[1]||1;Z=[`
|
|
4
|
+
`,S(x.gutter,Q.replace(/\d/g," "))," ",ze,S(x.marker,"^").repeat(Ve)].join(""),Ge&&y.message&&(Z+=" "+S(x.message,y.message))}return[S(x.marker,">"),S(x.gutter,Q),M.length>0?` ${M}`:"",Z].join("")}else return` ${S(x.gutter,Q)}${M.length>0?` ${M}`:""}`}).join(`
|
|
5
|
+
`);return y.message&&!$&&(I=`${" ".repeat(K+1)}${y.message}
|
|
6
|
+
${I}`),b?w.reset(I):I}g(o,"codeFrameColumns");function h(u,m,y,b={}){if(!n){n=!0;const x="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(x,"DeprecationWarning");else{const S=new Error(x);S.name="DeprecationWarning",console.warn(new Error(x))}}return y=Math.max(y,0),o(u,{start:{column:y,line:m}},b)}return g(h,"_default"),q}g(pt,"requireLib"),pt();function dt(f){return{...f,compilerOptions:f.compilerOptions??{},respectExternal:f.respectExternal??!1}}g(dt,"resolveDefaultOptions");const X=/\.d\.(c|m)?tsx?$/,Pe=".d.ts",le={getCurrentDirectory:g(()=>c.sys.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:g(()=>c.sys.newLine,"getNewLine"),getCanonicalFileName:c.sys.useCaseSensitiveFileNames?f=>f:f=>f.toLowerCase()},mt={declaration:!0,noEmit:!1,emitDeclarationOnly:!0,noEmitOnError:!0,checkJs:!1,declarationMap:!1,skipLibCheck:!0,preserveSymlinks:!0,target:c.ScriptTarget.ESNext},G=new Map,B=g((...f)=>process.env.DTS_LOG_CACHE?console.log("[cache]",...f):null,"logCache");function $e([f,e],r){for(B(f),G.set(f,r);f!==e&&f!==O.dirname(f);){if(f=O.dirname(f),B("up",f),G.has(f))return B("has",f);G.set(f,r)}}g($e,"cacheConfig");function fe(f,e,r){const s={...mt,...e};let l=O.dirname(f),v=[];const p=r||l;if(G.has(p))B("HIT",p);else{B("miss",p);const t=r?O.resolve(process.cwd(),r):c.findConfigFile(l,c.sys.fileExists);if(!t)return{dtsFiles:v,dirName:l,compilerOptions:s};let i=l;l=O.dirname(t);const{config:o,error:h}=c.readConfigFile(t,c.sys.readFile);if(h)return console.error(c.formatDiagnostic(h,le)),{dtsFiles:v,dirName:l,compilerOptions:s};B("tsconfig",o);const u=c.parseJsonConfigFileContent(o,c.sys,l);$e(r?[r,r]:[i,l],u)}const{fileNames:d,options:n,errors:a}=G.get(p);return v=d.filter(t=>X.test(t)),a.length?(console.error(c.formatDiagnostics(a,le)),{dtsFiles:v,dirName:l,compilerOptions:s}):{dtsFiles:v,dirName:l,compilerOptions:{...n,...s}}}g(fe,"getCompilerOptions");function ht(f,e,r){const{dtsFiles:s,compilerOptions:l}=fe(f,e,r);return c.createProgram([f].concat(Array.from(s)),l,c.createCompilerHost(l,!0))}g(ht,"createProgram$1");function bt(f,e,r){const s=[];let l=[],v=new Set,p="",d={};for(let n of f){if(X.test(n))continue;n=O.resolve(n);const a=fe(n,e,r);if(a.dtsFiles.forEach(v.add,v),!l.length){l.push(n),{dirName:p,compilerOptions:d}=a;continue}if(a.dirName===p)l.push(n);else{const t=c.createCompilerHost(d,!0),i=c.createProgram(l.concat(Array.from(v)),d,t);s.push(i),l=[n],{dirName:p,compilerOptions:d}=a}}if(l.length){const n=c.createCompilerHost(d,!0),a=c.createProgram(l.concat(Array.from(v)),d,n);s.push(a)}return s}g(bt,"createPrograms");function gt(){let f;try{return{codeFrameColumns:f}=require("@babel/code-frame"),f}catch{try{return{codeFrameColumns:f}=Ye(import.meta.url)("@babel/code-frame"),f}catch{}}}g(gt,"getCodeFrame");function yt(f){const e=f.getSourceFile(),r=e.getLineAndCharacterOfPosition(f.getStart()),s=e.getLineAndCharacterOfPosition(f.getEnd());return{start:{line:r.line+1,column:r.character+1},end:{line:s.line+1,column:s.character+1}}}g(yt,"getLocation");function vt(f){const e=gt(),s=f.getSourceFile().getFullText(),l=yt(f);return e?`
|
|
7
|
+
`+e(s,l,{highlightCode:!0}):`
|
|
8
|
+
${l.start.line}:${l.start.column}: \`${f.getFullText().trim()}\``}g(vt,"frameNode");class N extends Error{static{g(this,"UnsupportedSyntaxError")}constructor(e,r="Syntax not yet supported"){super(`${r}
|
|
9
|
+
${vt(e)}`)}}class xt{static{g(this,"NamespaceFixer")}constructor(e){this.sourceFile=e}findNamespaces(){const e=[],r={};for(const s of this.sourceFile.statements){const l={start:s.getStart(),end:s.getEnd()};if(c.isEmptyStatement(s)){e.unshift({name:"",exports:[],location:l});continue}if((c.isImportDeclaration(s)||c.isExportDeclaration(s))&&s.moduleSpecifier&&c.isStringLiteral(s.moduleSpecifier)){let{text:t}=s.moduleSpecifier;if(t.startsWith(".")&&(t.endsWith(".d.ts")||t.endsWith(".d.cts")||t.endsWith(".d.mts"))){let i=s.moduleSpecifier.getStart()+1,o=s.moduleSpecifier.getEnd()-1;e.unshift({name:"",exports:[],location:{start:i,end:o},textBeforeCodeAfter:t.replace(/\.d\.ts$/,".js").replace(/\.d\.cts$/,".cjs").replace(/\.d\.mts$/,".mjs")})}}if(c.isModuleDeclaration(s)&&s.body&&c.isModuleBlock(s.body)){for(const t of s.body.statements)if(c.isExportDeclaration(t)&&t.exportClause){if(c.isNamespaceExport(t.exportClause))continue;for(const i of t.exportClause.elements)i.propertyName&&i.propertyName.getText()==i.name.getText()&&e.unshift({name:"",exports:[],location:{start:i.propertyName.getEnd(),end:i.name.getEnd()}})}}if(c.isClassDeclaration(s)?r[s.name.getText()]={type:"class",generics:s.typeParameters}:c.isFunctionDeclaration(s)?r[s.name.getText()]={type:"function"}:c.isInterfaceDeclaration(s)?r[s.name.getText()]={type:"interface",generics:s.typeParameters}:c.isTypeAliasDeclaration(s)?r[s.name.getText()]={type:"type",generics:s.typeParameters}:c.isModuleDeclaration(s)&&c.isIdentifier(s.name)?r[s.name.getText()]={type:"namespace"}:c.isEnumDeclaration(s)&&(r[s.name.getText()]={type:"enum"}),!c.isVariableStatement(s))continue;const{declarations:v}=s.declarationList;if(v.length!==1)continue;const p=v[0],d=p.name.getText();if(!p.initializer||!c.isCallExpression(p.initializer)){r[d]={type:"var"};continue}const n=p.initializer.arguments[0];if(!p.initializer.expression.getFullText().includes("/*#__PURE__*/Object.freeze")||!c.isObjectLiteralExpression(n))continue;const a=[];for(const t of n.properties){if(!c.isPropertyAssignment(t)||!(c.isIdentifier(t.name)||c.isStringLiteral(t.name))||t.name.text!=="__proto__"&&!c.isIdentifier(t.initializer))throw new N(t,"Expected a property assignment");t.name.text!=="__proto__"&&a.push({exportedName:t.name.text,localName:t.initializer.getText()})}e.unshift({name:d,exports:a,location:l})}return{namespaces:e,itemTypes:r}}fix(){let e=this.sourceFile.getFullText();const{namespaces:r,itemTypes:s}=this.findNamespaces();for(const l of r){const v=e.slice(l.location.end);e=e.slice(0,l.location.start);for(const{exportedName:p,localName:d}of l.exports)if(p===d){const{type:n,generics:a}=s[d]||{};if(n==="interface"||n==="type"){const t=Ae(a);e+=`type ${l.name}_${p}${t.in} = ${d}${t.out};
|
|
10
|
+
`}else if(n==="enum"||n==="class"){const t=Ae(a);e+=`type ${l.name}_${p}${t.in} = ${d}${t.out};
|
|
11
|
+
`,e+=`declare const ${l.name}_${p}: typeof ${d};
|
|
12
|
+
`}else e+=`declare const ${l.name}_${p}: typeof ${d};
|
|
13
|
+
`}if(l.name){e+=`declare namespace ${l.name} {
|
|
14
|
+
`,e+=` export {
|
|
15
|
+
`;for(const{exportedName:p,localName:d}of l.exports)p===d?e+=` ${l.name}_${p} as ${p},
|
|
16
|
+
`:e+=` ${d} as ${p},
|
|
17
|
+
`;e+=` };
|
|
18
|
+
`,e+="}"}e+=l.textBeforeCodeAfter??"",e+=v}return e}}function Ae(f){return!f||!f.length?{in:"",out:""}:{in:`<${f.map(e=>e.getText()).join(", ")}>`,out:`<${f.map(e=>e.name.getText()).join(", ")}>`}}g(Ae,"renderTypeParams");let _e=1;function wt(f){return k({type:"Program",sourceType:"module",body:[]},{start:f.getFullStart(),end:f.getEnd()})}g(wt,"createProgram");function St(f){const e={type:"Identifier",name:String(_e++)};return{ident:e,expr:{type:"AssignmentPattern",left:e,right:f}}}g(St,"createReference");function D(f){return k({type:"Identifier",name:f.getText()},f)}g(D,"createIdentifier");function Et(f){const e=k({type:"FunctionExpression",id:null,params:[],body:{type:"BlockStatement",body:[]}},f),r=k({type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:String(_e++)},arguments:[e],optional:!1}},f);return{fn:e,iife:r}}g(Et,"createIIFE");function Ct(){const f={type:"ArrayExpression",elements:[]};return{expr:f,stmt:{type:"ReturnStatement",argument:f}}}g(Ct,"createReturn");function Tt(f,e){return k({type:"FunctionDeclaration",id:k({type:"Identifier",name:c.idText(f)},f),params:[],body:{type:"BlockStatement",body:[]}},e)}g(Tt,"createDeclaration");function _(f){if(c.isLiteralExpression(f))return{type:"Literal",value:f.text};if(c.isPropertyAccessExpression(f)){if(c.isPrivateIdentifier(f.name))throw new N(f.name);return k({type:"MemberExpression",computed:!1,optional:!1,object:_(f.expression),property:_(f.name)},{start:f.expression.getStart(),end:f.name.getEnd()})}if(c.isIdentifier(f))return D(f);if(f.kind==c.SyntaxKind.NullKeyword)return{type:"Literal",value:null};throw new N(f)}g(_,"convertExpression");function k(f,e){let r="start"in e?e:{start:e.getStart(),end:e.getEnd()};return Object.assign(f,r)}g(k,"withStartEnd");function Y(f,e){return(c.getCombinedModifierFlags(f)&e)===e}g(Y,"matchesModifier");function Nt({sourceFile:f}){const e=new Je(f.getFullText()),r=new Set,s=new Set;let l="";const v=new Map,p=new Map;for(const u of f.statements){if(c.isEmptyStatement(u)){e.remove(u.getStart(),u.getEnd());continue}if(c.isEnumDeclaration(u)||c.isFunctionDeclaration(u)||c.isInterfaceDeclaration(u)||c.isClassDeclaration(u)||c.isTypeAliasDeclaration(u)||c.isModuleDeclaration(u)){if(u.name){const m=u.name.getText();r.add(m),Y(u,c.ModifierFlags.ExportDefault)?l=m:Y(u,c.ModifierFlags.Export)&&s.add(m),u.flags&c.NodeFlags.GlobalAugmentation||h(m,[pe(u),Le(u)])}c.isModuleDeclaration(u)&&Ot(e,u),je(e,u)}else if(c.isVariableStatement(u)){const{declarations:m}=u.declarationList,y=Y(u,c.ModifierFlags.Export);for(const E of u.declarationList.declarations)if(c.isIdentifier(E.name)){const T=E.name.getText();r.add(T),y&&s.add(T)}if(je(e,u),m.length==1){const E=m[0];c.isIdentifier(E.name)&&h(E.name.getText(),[pe(u),Le(u)])}else{const E=m.slice(),T=E.shift();h(T.name.getText(),[pe(u),T.getEnd()]);for(const R of E)c.isIdentifier(R.name)&&h(R.name.getText(),[R.getFullStart(),R.getEnd()])}const{flags:b}=u.declarationList,x=`declare ${b&c.NodeFlags.Let?"let":b&c.NodeFlags.Const?"const":"var"} `,S=u.declarationList.getChildren().find(E=>E.kind===c.SyntaxKind.SyntaxList).getChildren();let C=0;for(const E of S)if(E.kind===c.SyntaxKind.CommaToken)C=E.getStart(),e.remove(C,E.getEnd());else if(C){e.appendLeft(C,`;
|
|
19
|
+
`);const T=E.getFullStart(),R=e.slice(T,E.getStart());let $=R.length-R.trimStart().length;$?e.overwrite(T,T+$,x):e.appendLeft(T,x)}}}for(const u of f.statements)if(t(u),!!Y(u,c.ModifierFlags.ExportDefault)&&(c.isFunctionDeclaration(u)||c.isClassDeclaration(u))){if(u.name)continue;l||(l=o("export_default"));const m=u.getChildren(),y=m.findIndex(S=>S.kind===c.SyntaxKind.ClassKeyword||S.kind===c.SyntaxKind.FunctionKeyword),b=m[y],w=m[y+1];if(w.kind>=c.SyntaxKind.FirstPunctuation&&w.kind<=c.SyntaxKind.LastPunctuation){const S=e.slice(b.getEnd(),w.getStart())!=" ";e.appendLeft(w.getStart(),`${S?" ":""}${l}`)}else e.appendRight(b.getEnd(),` ${l}`)}for(const u of p.values()){const y=u.pop()[0];for(const b of u)e.move(b[0],b[1],y)}l&&e.append(`
|
|
20
|
+
export default ${l};
|
|
21
|
+
`),s.size&&e.append(`
|
|
22
|
+
export { ${[...s].join(", ")} };
|
|
23
|
+
`);for(const[u,m]of v.entries())e.prepend(`import * as ${m} from "${u}";
|
|
24
|
+
`);const d=f.getLineStarts(),n=new Set;for(const u of f.typeReferenceDirectives){n.add(u.fileName);const{line:m}=f.getLineAndCharacterOfPosition(u.pos),y=d[m];let b=f.getLineEndOfPosition(u.pos);e.slice(b,b+1)==`
|
|
25
|
+
`&&(b+=1),e.remove(y,b)}const a=new Set;for(const u of f.referencedFiles){a.add(u.fileName);const{line:m}=f.getLineAndCharacterOfPosition(u.pos),y=d[m];let b=f.getLineEndOfPosition(u.pos);e.slice(b,b+1)==`
|
|
26
|
+
`&&(b+=1),e.remove(y,b)}return{code:e,typeReferences:n,fileReferences:a};function t(u){if(c.forEachChild(u,t),c.isImportTypeNode(u)){if(!c.isLiteralTypeNode(u.argument)||!c.isStringLiteral(u.argument.literal))throw new N(u,"inline imports should have a literal argument");const m=u.argument.literal.text,y=u.getChildren(),b=y.find(C=>C.kind===c.SyntaxKind.ImportKeyword).getStart();let w=u.getEnd();const x=y.find(C=>C.kind===c.SyntaxKind.DotToken||C.kind===c.SyntaxKind.LessThanToken);x&&(w=x.getStart());const S=i(m);e.overwrite(b,w,S)}}function i(u){let m=v.get(u);return m||(m=o(u.replace(/[^a-zA-Z0-9_$]/g,()=>"_")),v.set(u,m)),m}function o(u){let m=u;for(;r.has(m);)m=`_${m}`;return r.add(m),m}function h(u,m){let y=p.get(u);if(!y)y=[m],p.set(u,y);else{const b=y[y.length-1];b[1]===m[0]?b[1]=m[1]:y.push(m)}}}g(Nt,"preProcess");function je(f,e){if(!c.canHaveModifiers(e))return;let r=!1;const s=c.isEnumDeclaration(e)||c.isClassDeclaration(e)||c.isFunctionDeclaration(e)||c.isModuleDeclaration(e)||c.isVariableStatement(e);for(const l of e.modifiers??[])switch(l.kind){case c.SyntaxKind.ExportKeyword:case c.SyntaxKind.DefaultKeyword:f.remove(l.getStart(),l.getEnd()+1);break;case c.SyntaxKind.DeclareKeyword:r=!0}s&&!r&&f.appendRight(e.getStart(),"declare ")}g(je,"fixModifiers");function Ot(f,e){if(!(!e.body||!c.isModuleBlock(e.body))){for(const r of e.body.statements)if(c.isExportDeclaration(r)&&r.exportClause){if(c.isNamespaceExport(r.exportClause))continue;for(const s of r.exportClause.elements)s.propertyName||f.appendLeft(s.name.getEnd(),` as ${s.name.getText()}`)}}}g(Ot,"duplicateExports");function pe(f){const e=f.getFullStart();return e+(Be(f,e)?1:0)}g(pe,"getStart");function Le(f){const e=f.getEnd();return e+(Be(f,e)?1:0)}g(Le,"getEnd");function Be(f,e){return f.getSourceFile().getFullText()[e]==`
|
|
27
|
+
`}g(Be,"newlineAt");const kt=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 Ke{static{g(this,"DeclarationScope")}constructor({id:e,range:r}){if(this.scopes=[],e)this.declaration=Tt(e,r);else{const{iife:l,fn:v}=Et(r);this.iife=l,this.declaration=v}const s=Ct();this.declaration.body.body.push(s.stmt),this.returnExpr=s.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 v of this.scopes)if(v.has(r))return}if(r==="this")return;const{ident:s,expr:l}=St(e);this.declaration.params.push(l),this.returnExpr.elements.push(s)}pushIdentifierReference(e){this.pushReference(D(e))}convertEntityName(e){return c.isIdentifier(e)?D(e):k({type:"MemberExpression",computed:!1,optional:!1,object:this.convertEntityName(e.left),property:D(e.right)},e)}convertPropertyAccess(e){if(!c.isIdentifier(e.expression)&&!c.isPropertyAccessExpression(e.expression))throw new N(e.expression);if(c.isPrivateIdentifier(e.name))throw new N(e.name);let r=c.isIdentifier(e.expression)?D(e.expression):this.convertPropertyAccess(e.expression);return k({type:"MemberExpression",computed:!1,optional:!1,object:r,property:D(e.name)},e)}convertComputedPropertyName(e){if(!e.name||!c.isComputedPropertyName(e.name))return;const{expression:r}=e.name;if(!(c.isLiteralExpression(r)||c.isPrefixUnaryExpression(r))){if(c.isIdentifier(r))return this.pushReference(D(r));if(c.isPropertyAccessExpression(r))return this.pushReference(this.convertPropertyAccess(r));throw new N(r)}}convertParametersAndType(e){this.convertComputedPropertyName(e);const r=this.convertTypeParameters(e.typeParameters);for(const s of e.parameters)this.convertTypeNode(s.type);this.convertTypeNode(e.type),this.popScope(r)}convertHeritageClauses(e){for(const r of e.heritageClauses||[])for(const s of r.types)this.pushReference(_(s.expression)),this.convertTypeArguments(s)}convertTypeArguments(e){if(e.typeArguments)for(const r of e.typeArguments)this.convertTypeNode(r)}convertMembers(e){for(const r of e){if(c.isPropertyDeclaration(r)||c.isPropertySignature(r)||c.isIndexSignatureDeclaration(r)){c.isPropertyDeclaration(r)&&r.initializer&&c.isPropertyAccessExpression(r.initializer)&&this.pushReference(this.convertPropertyAccess(r.initializer)),this.convertComputedPropertyName(r),this.convertTypeNode(r.type);continue}if(c.isMethodDeclaration(r)||c.isMethodSignature(r)||c.isConstructorDeclaration(r)||c.isConstructSignatureDeclaration(r)||c.isCallSignatureDeclaration(r)||c.isGetAccessorDeclaration(r)||c.isSetAccessorDeclaration(r))this.convertParametersAndType(r);else throw new N(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&&!kt.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 r of e.elements)this.convertTypeNode(r);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 r of e.types)this.convertTypeNode(r);return}if(c.isMappedTypeNode(e)){const{typeParameter:r,type:s,nameType:l}=e;this.convertTypeNode(r.constraint),this.pushScope(),this.pushTypeVariable(r.name),this.convertTypeNode(s),l&&this.convertTypeNode(l),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 r of e.templateSpans)this.convertTypeNode(r.type);return}if(c.isInferTypeNode(e)){const{typeParameter:r}=e;this.convertTypeNode(r.constraint),this.pushTypeVariable(r.name);return}else throw new N(e)}}convertNamespace(e,r=!1){if(this.pushScope(),r&&e.body&&c.isModuleDeclaration(e.body)){this.convertNamespace(e.body,!0);return}if(!e.body||!c.isModuleBlock(e.body))throw new N(e,'namespace must have a "ModuleBlock" body.');const{statements:s}=e.body;for(const l of s){if(c.isEnumDeclaration(l)||c.isFunctionDeclaration(l)||c.isClassDeclaration(l)||c.isInterfaceDeclaration(l)||c.isTypeAliasDeclaration(l)||c.isModuleDeclaration(l)){if(l.name&&c.isIdentifier(l.name))this.pushTypeVariable(l.name);else throw new N(l,"non-Identifier name not supported");continue}if(c.isVariableStatement(l)){for(const v of l.declarationList.declarations)if(c.isIdentifier(v.name))this.pushTypeVariable(v.name);else throw new N(v,"non-Identifier name not supported");continue}if(!c.isExportDeclaration(l))throw new N(l,"namespace child (hoisting) not supported yet")}for(const l of s){if(c.isVariableStatement(l)){for(const v of l.declarationList.declarations)v.type&&this.convertTypeNode(v.type);continue}if(c.isFunctionDeclaration(l)){this.convertParametersAndType(l);continue}if(c.isInterfaceDeclaration(l)||c.isClassDeclaration(l)){const v=this.convertTypeParameters(l.typeParameters);this.convertHeritageClauses(l),this.convertMembers(l.members),this.popScope(v);continue}if(c.isTypeAliasDeclaration(l)){const v=this.convertTypeParameters(l.typeParameters);this.convertTypeNode(l.type),this.popScope(v);continue}if(c.isModuleDeclaration(l)){this.convertNamespace(l,r);continue}if(!c.isEnumDeclaration(l))if(c.isExportDeclaration(l)){if(l.exportClause){if(c.isNamespaceExport(l.exportClause))throw new N(l.exportClause);for(const v of l.exportClause.elements){const p=v.propertyName||v.name;this.pushIdentifierReference(p)}}}else throw new N(l,"namespace child (walking) not supported yet")}this.popScope()}}function Dt({sourceFile:f}){return new Rt(f).transform()}g(Dt,"convert");class Rt{static{g(this,"Transformer")}constructor(e){this.sourceFile=e,this.declarations=new Map,this.ast=wt(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 s={start:e.getFullStart(),end:e.getEnd()};if(!r){const d=new Ke({range:s});return this.pushStatement(d.iife),d}const l=r.getText(),v=new Ke({id:r,range:s}),p=this.declarations.get(l);if(p){p.pushIdentifierReference(r),p.declaration.end=s.end;let d=this.ast.body.findIndex(n=>n==p.declaration);for(let n=d+1;n<this.ast.body.length;n++){const a=this.ast.body[n];a.start=a.end=s.end}}else this.pushStatement(v.declaration),this.declarations.set(l,v);return p||v}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 N(e)}removeStatement(e){this.pushStatement(k({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 s=this.createDeclaration(e,e.name);s.pushIdentifierReference(e.name),s.convertNamespace(e)}convertEnumDeclaration(e){this.createDeclaration(e,e.name).pushIdentifierReference(e.name)}convertFunctionDeclaration(e){if(!e.name)throw new N(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 N(e,"ClassDeclaration / InterfaceDeclaration should have a name");const r=this.createDeclaration(e,e.name),s=r.convertTypeParameters(e.typeParameters);r.convertHeritageClauses(e),r.convertMembers(e.members),r.popScope(s)}convertTypeAliasDeclaration(e){const r=this.createDeclaration(e,e.name),s=r.convertTypeParameters(e.typeParameters);r.convertTypeNode(e.type),r.popScope(s)}convertVariableStatement(e){const{declarations:r}=e.declarationList;if(r.length!==1)throw new N(e,"VariableStatement with more than one declaration not yet supported");for(const s of r){if(!c.isIdentifier(s.name))throw new N(e,"VariableDeclaration must have a name");this.createDeclaration(e,s.name).convertTypeNode(s.type)}}convertExportDeclaration(e){if(c.isExportAssignment(e)){this.pushStatement(k({type:"ExportDefaultDeclaration",declaration:_(e.expression)},e));return}const r=e.moduleSpecifier?_(e.moduleSpecifier):void 0;if(!e.exportClause)this.pushStatement(k({type:"ExportAllDeclaration",source:r,exported:null},e));else if(c.isNamespaceExport(e.exportClause))this.pushStatement(k({type:"ExportAllDeclaration",source:r,exported:D(e.exportClause.name)},e));else{const s=[];for(const l of e.exportClause.elements)s.push(this.convertExportSpecifier(l));this.pushStatement(k({type:"ExportNamedDeclaration",declaration:null,specifiers:s,source:r},e))}}convertImportDeclaration(e){if(c.isImportEqualsDeclaration(e)){if(!c.isExternalModuleReference(e.moduleReference))throw new N(e,"ImportEquals should have a literal source.");this.pushStatement(k({type:"ImportDeclaration",specifiers:[{type:"ImportDefaultSpecifier",local:D(e.name)}],source:_(e.moduleReference.expression)},e));return}const r=_(e.moduleSpecifier),s=e.importClause&&e.importClause.namedBindings?this.convertNamedImportBindings(e.importClause.namedBindings):[];e.importClause&&e.importClause.name&&s.push({type:"ImportDefaultSpecifier",local:D(e.importClause.name)}),this.pushStatement(k({type:"ImportDeclaration",specifiers:s,source:r},e))}convertNamedImportBindings(e){return c.isNamedImports(e)?e.elements.map(r=>{const s=D(r.name),l=r.propertyName?D(r.propertyName):s;return{type:"ImportSpecifier",local:s,imported:l}}):[{type:"ImportNamespaceSpecifier",local:D(e.name)}]}convertExportSpecifier(e){const r=D(e.name);return{type:"ExportSpecifier",exported:r,local:e.propertyName?D(e.propertyName):r}}}class Mt{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((r,s)=>r.location.start-s.location.start),this.getCodeParts(e).join("")}findExports(){const{rawExports:e,values:r,types:s}=this.getExportsAndLocals();return e.map(l=>{const v=l.elements.map(p=>{const d=p.name.text,n=p.propertyName?.text??p.name.text,a=s.some(t=>t.getText()===n)&&!r.some(t=>t.getText()===n)?"type":"value";return this.DEBUG&&console.log(`export ${n} as ${d} is a ${a}`),{exportedName:d,localName:n,kind:a}});return{location:{start:l.getStart(),end:l.getEnd()},exports:v}})}getExportsAndLocals(e=this.source.statements){const r=[],s=[],l=[],v=g(p=>{const{rawExports:d,values:n,types:a}=this.getExportsAndLocals(p);r.push(...d),s.push(...n),l.push(...a)},"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`),l.push(p.name);continue}if(c.isEnumDeclaration(p)||c.isFunctionDeclaration(p)||c.isClassDeclaration(p)||c.isVariableStatement(p)){if(c.isVariableStatement(p))for(const d of p.declarationList.declarations)c.isIdentifier(d.name)&&(this.DEBUG&&console.log(`${d.name.getFullText()} is a value (from var statement)`),s.push(d.name));else p.name&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from declaration)`),s.push(p.name));continue}if(c.isModuleBlock(p)){const d=p.statements;v(d);continue}if(c.isModuleDeclaration(p)){p.name&&c.isIdentifier(p.name)&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from module declaration)`),s.push(p.name)),v(p.getChildren());continue}if(c.isExportDeclaration(p)){if(p.moduleSpecifier||p.isTypeOnly)continue;const d=p.exportClause;if(!d||!c.isNamedExports(d))continue;r.push(d);continue}this.DEBUG&&console.log("unhandled statement",p.getFullText(),p.kind)}return{rawExports:r,values:s,types:l}}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 s=this.source.getFullText(),l=[];for(const v of e){const p=s.slice(r,v.location.start);p.length>0&&l.push(p),l.push(this.getExportStatement(v)),r=v.location.end}return r<s.length&&l.push(s.slice(r)),l}getExportStatement(e){const r=e.exports.every(s=>s.kind==="type")&&e.exports.length>0;return`${r?"type ":""}{ ${e.exports.map(s=>this.createNamedExport(s,r)).join(", ")} }`}}function J(f,e){return c.createSourceFile(f,e,c.ScriptTarget.Latest,!0)}g(J,"parse");const It=g(()=>{const f=new Map,e=new Map;return{name:"dts-transform",options({onLog:r,...s}){return{...s,onLog(l,v,p){l==="warn"&&v.code=="CIRCULAR_DEPENDENCY"||(r?r(l,v,p):p(l,v))},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,s){let l=J(s,r);const v=Nt({sourceFile:l});f.set(l.fileName,v.typeReferences),e.set(l.fileName,v.fileReferences),r=v.code.toString(),l=J(s,r);const p=Dt({sourceFile:l});return process.env.DTS_DUMP_AST&&(console.log(s),console.log(r),console.log(JSON.stringify(p.ast.body,void 0,2))),{code:r,ast:p.ast,map:v.code.generateMap()}},renderChunk(r,s,l){const v=J(s.fileName,r),p=new xt(v),d=new Set,n=new Set;for(const i of Object.keys(s.modules)){for(const o of f.get(i.split("\\").join("/"))||[])d.add(o);for(const o of e.get(i.split("\\").join("/"))||[])if(o.startsWith(".")){const h=O.join(O.dirname(i),o),u=l.file&&O.dirname(l.file)||s.facadeModuleId&&O.dirname(s.facadeModuleId)||".";let m=O.relative(u,h).split("\\").join("/");m[0]!=="."&&(m="./"+m),n.add(m)}else n.add(o)}let a=qe(Array.from(n,i=>`/// <reference path="${i}" />`));return a+=qe(Array.from(d,i=>`/// <reference types="${i}" />`)),a+=p.fix(),a||(a+=`
|
|
28
|
+
export { }`),{code:new Mt(J(s.fileName,a)).fix(),map:{mappings:""}}}}},"transform");function qe(f){return f.length?f.join(`
|
|
29
|
+
`)+`
|
|
30
|
+
`:""}g(qe,"writeBlock");const de=/\.([cm]ts|[tj]sx?)$/;function me({programs:f,resolvedOptions:{compilerOptions:e,tsconfig:r}},s,l){if(!f.length&&X.test(s))return{code:l};const v=f.find(p=>!!p.getSourceFile(s));if(v){const p=v.getSourceFile(s);return{code:p?.getFullText(),source:p,program:v}}else if(c.sys.fileExists(s)){const p=ht(s,e,r);f.push(p);const d=p.getSourceFile(s);return{code:d?.getFullText(),source:d,program:p}}else return null}g(me,"getModule");const We=g((f={})=>{const e=It(),r={programs:[],resolvedOptions:dt(f)};return{name:"dts",outputOptions:e.outputOptions,renderChunk:e.renderChunk,options(s){let{input:l=[]}=s;if(!Array.isArray(l))l=typeof l=="string"?[l]:Object.values(l);else if(l.length>1){s.input={};for(const v of l){let p=v.replace(/((\.d)?\.(c|m)?(t|j)sx?)$/,"");O.isAbsolute(v)?p=O.basename(p):p=O.normalize(p),s.input[p]=v}}return r.programs=bt(Object.values(l),r.resolvedOptions.compilerOptions,r.resolvedOptions.tsconfig),e.options.call(this,s)},transform(s,l){if(!de.test(l))return null;const v=g(a=>{if(a.program){const t=O.dirname(l);a.program.getSourceFiles().map(o=>o.fileName).filter(o=>o.startsWith(t)).forEach(this.addWatchFile)}},"watchFiles"),p=g(()=>{const a=me(r,l,s);return a?(v(a),e.transform.call(this,a.code,l)):null},"handleDtsFile"),d=g(()=>{const a=l.replace(de,Pe);let t=me(r,a,s);return t?(v(t),e.transform.call(this,t.code,a)):null},"treatTsAsDts"),n=g(()=>{const a=me(r,l,s);if(!a||!a.source||!a.program)return null;v(a);const t=l.replace(de,Pe);let i;const{emitSkipped:o,diagnostics:h}=a.program.emit(a.source,(u,m)=>{i=e.transform.call(this,m,t)},void 0,!0);if(o){const u=h.filter(m=>m.category===c.DiagnosticCategory.Error);u.length&&(console.error(c.formatDiagnostics(u,le)),this.error("Failed to compile. Check the logs above."))}return i},"generateDtsFromTs");return X.test(l)?p():d()??n()},resolveId(s,l){if(!l)return;l=l.split("\\").join("/");let v=r.resolvedOptions.compilerOptions;if(r.resolvedOptions.tsconfig){const d=s.startsWith(".")?O.resolve(O.dirname(l),s):s;v=fe(d,r.resolvedOptions.compilerOptions,r.resolvedOptions.tsconfig).compilerOptions}const{resolvedModule:p}=c.resolveModuleName(s,l,v,c.sys);if(p)return!r.resolvedOptions.respectExternal&&p.isExternalLibraryImport?{id:s,external:!0}:{id:O.resolve(p.resolvedFileName)}}}},"plugin");export{We as default,We as dts};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pkgroll",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "Zero-config rollup bundler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zero config",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
|
-
"
|
|
26
|
+
"type": "module",
|
|
27
|
+
"bin": "./dist/cli.mjs",
|
|
27
28
|
"imports": {
|
|
28
29
|
"typescript": "./src/local-typescript-loader.ts"
|
|
29
30
|
},
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
"@rollup/pluginutils": "^5.1.4",
|
|
50
51
|
"esbuild": "^0.24.2",
|
|
51
52
|
"magic-string": "^0.30.17",
|
|
52
|
-
"rollup": "^4.29.1"
|
|
53
|
+
"rollup": "^4.29.1",
|
|
54
|
+
"rollup-pluginutils": "^2.8.2"
|
|
53
55
|
}
|
|
54
56
|
}
|
package/dist/cli.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";var ZD=Object.defineProperty;var i=(u,e)=>ZD(u,"name",{value:e,configurable:!0});var S=require("node:fs"),HD=require("tty"),Mu=require("rollup"),h=require("node:path"),QD=require("@rollup/plugin-node-resolve"),YD=require("@rollup/plugin-commonjs"),XD=require("@rollup/plugin-json"),ue=require("@rollup/plugin-alias"),Wu=require("@rollup/plugin-replace"),De=require("@rollup/plugin-dynamic-import-vars"),ee=require("@rollup/plugin-inject"),te=require("@rollup/pluginutils"),Uu=require("esbuild"),qu=require("node:module"),Vu=require("magic-string"),ne=require("fs");const re="known-flag",oe="unknown-flag",se="argument",{stringify:z}=JSON,ie=/\B([A-Z])/g,ae=i(u=>u.replace(ie,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:le}=Object.prototype,G=i((u,e)=>le.call(u,e),"w$3"),ce=i(u=>Array.isArray(u),"L$3"),zu=i(u=>typeof u=="function"?[u,!1]:ce(u)?[u[0],!0]:zu(u.type),"b$2"),Fe=i((u,e)=>u===Boolean?e!=="false":e,"d$3"),Ce=i((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"m$2"),pe=/[\s.:=]/,fe=i(u=>{const e=`Flag name ${z(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(pe);if(t)throw new Error(`${e} cannot contain ${z(t?.[0])}`)},"B$1"),de=i(u=>{const e={},t=i((D,n)=>{if(G(e,D))throw new Error(`Duplicate flags named ${z(D)}`);e[D]=n},"r");for(const D in u){if(!G(u,D))continue;fe(D);const n=u[D],r=[[],...zu(n),n];t(D,r);const o=ae(D);if(D!==o&&t(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:s}=n,a=`Flag alias ${z(s)} for flag ${z(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"),Ee=i((u,e)=>{const t={};for(const D in u){if(!G(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},"_$3"),X="--",he=/[.:=]/,ge=/^-{1,2}\w/,me=i(u=>{if(!ge.test(u))return;const e=!u.startsWith(X);let t=u.slice(e?1:2),D;const n=t.match(he);if(n){const{index:r}=n;D=t.slice(r+1),t=t.slice(0,r)}return[t,D,e]},"N$1"),Be=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===X){n();const a=u.slice(r+1);t?.(a,[r],!0);break}const s=me(o);if(s){if(n(),!e)continue;const[a,l,p]=s;if(p)for(let C=0;C<a.length;C+=1){n();const c=C===a.length-1;D=e(a[C],c?l:void 0,[r,C+1,c])}else D=e(a,l,[r])}else n(o,[r])&&t?.([o],[r])}n()},"$$1"),Ae=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"),ye=i((u,e=process.argv.slice(2),{ignore:t}={})=>{const D=[],n=de(u),r={},o=[];return o[X]=[],Be(e,{onFlag(s,a,l){const p=G(n,s);if(!t?.(p?re:oe,s,a)){if(p){const[C,c]=n[s],E=Fe(c,a),d=i((g,y)=>{D.push(l),y&&D.push(y),C.push(Ce(c,g||""))},"p");return E===void 0?d:d(E)}G(r,s)||(r[s]=[]),r[s].push(a===void 0?!0:a),D.push(l)}},onArgument(s,a,l){t?.(se,e[a[0]])||(o.push(...s),l?(o[X]=s,e.splice(a[0])):D.push(a))}}),Ae(e,D),{flags:Ee(u,n),unknownFlags:r,_:o}},"U$2");var be=Object.create,uu=Object.defineProperty,we=Object.defineProperties,$e=Object.getOwnPropertyDescriptor,ve=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertyNames,Gu=Object.getOwnPropertySymbols,Oe=Object.getPrototypeOf,Ku=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Ju=i((u,e,t)=>e in u?uu(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,"W$2"),Du=i((u,e)=>{for(var t in e||(e={}))Ku.call(e,t)&&Ju(u,t,e[t]);if(Gu)for(var t of Gu(e))je.call(e,t)&&Ju(u,t,e[t]);return u},"p$1"),cu=i((u,e)=>we(u,ve(e)),"c"),ke=i(u=>uu(u,"__esModule",{value:!0}),"nD"),Te=i((u,e)=>()=>(u&&(e=u(u=0)),e),"rD"),Se=i((u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),"iD"),Pe=i((u,e,t,D)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of xe(e))!Ku.call(u,n)&&n!=="default"&&uu(u,n,{get:i(()=>e[n],"get"),enumerable:!(D=$e(e,n))||D.enumerable});return u},"oD"),Ne=i((u,e)=>Pe(ke(uu(u!=null?be(Oe(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),x=Te(()=>{}),Ie=Se((u,e)=>{x(),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}});x(),x(),x();var _e=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");x(),x(),x(),x(),x();function Re({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(Re,"w$2");function Zu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Re(),"")}i(Zu,"d$2"),x();function Le(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(Le,"y$1");var Me=Ne(Ie());function _(u){if(typeof u!="string"||u.length===0||(u=Zu(u),u.length===0))return 0;u=u.replace((0,Me.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+=Le(D)?2:1)}return e}i(_,"g");var Hu=i(u=>Math.max(...u.split(`
|
|
3
|
-
`).map(_)),"b$1"),We=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=Hu(t[r]);o>e[r]&&(e[r]=o)}}return e},"k$1");x();var Qu=/^\d+%$/,Yu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Ue=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"&&Qu.test(r)){D.push(cu(Du({},Yu),{width:r,contentWidth:u[n]}));continue}if(r&&typeof r=="object"){let o=cu(Du(Du({},Yu),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 qe(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"&&Qu.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),p=a-l;t.paddingLeft-=l,t.paddingRight-=p,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(qe,"aD");var Xu=i(()=>Object.assign([],{columns:0}),"G$1");function Ve(u,e){let t=[Xu()],[D]=t;for(let n of u){let r=n.width+n.horizontalPadding;D.columns+r>e&&(D=Xu(),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 s=n.filter(c=>"autoOverflow"in c),a=s.filter(c=>c.autoOverflow>0),l=a.reduce((c,E)=>c+E.autoOverflow,0),p=Math.min(l,o);for(let c of a){let E=Math.floor(c.autoOverflow/l*p);c.width+=E,o-=E}let C=Math.floor(o/s.length);for(let c=0;c<s.length;c+=1){let E=s[c];c===s.length-1?E.width+=o:E.width+=C,o-=C}}return t}i(Ve,"lD");function ze(u,e,t){let D=Ue(t,e);return qe(D,u),Ve(D,u)}i(ze,"Z$2"),x(),x(),x();var Fu=10,uD=i((u=0)=>e=>`\x1B[${e+u}m`,"U$1"),DD=i((u=0)=>e=>`\x1B[${38+u};5;${e}m`,"V$1"),eD=i((u=0)=>(e,t,D)=>`\x1B[${38+u};2;${e};${t};${D}m`,"Y$1");function Ge(){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=uD(),e.color.ansi256=DD(),e.color.ansi16m=eD(),e.bgColor.ansi=uD(Fu),e.bgColor.ansi256=DD(Fu),e.bgColor.ansi16m=eD(Fu),Object.defineProperties(e,{rgbToAnsi256:{value:i((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),"value"),enumerable:!1},hexToRgb:{value:i(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]},"value"),enumerable:!1},hexToAnsi256:{value:i(t=>e.rgbToAnsi256(...e.hexToRgb(t)),"value"),enumerable:!1},ansi256ToAnsi:{value:i(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},"value"),enumerable:!1},rgbToAnsi:{value:i((t,D,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(t,D,n)),"value"),enumerable:!1},hexToAnsi:{value:i(t=>e.ansi256ToAnsi(e.hexToAnsi256(t)),"value"),enumerable:!1}}),e}i(Ge,"AD");var Ke=Ge(),Je=Ke,eu=new Set(["\x1B","\x9B"]),Ze=39,Cu="\x07",tD="[",He="]",nD="m",pu=`${He}8;;`,rD=i(u=>`${eu.values().next().value}${tD}${u}${nD}`,"J$2"),oD=i(u=>`${eu.values().next().value}${pu}${u}${Cu}`,"Q$1"),Qe=i(u=>u.split(" ").map(e=>_(e)),"hD"),fu=i((u,e,t)=>{let D=[...e],n=!1,r=!1,o=_(Zu(u[u.length-1]));for(let[s,a]of D.entries()){let l=_(a);if(o+l<=t?u[u.length-1]+=a:(u.push(a),o=0),eu.has(a)&&(n=!0,r=D.slice(s+1).join("").startsWith(pu)),n){r?a===Cu&&(n=!1,r=!1):a===nD&&(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$2"),Ye=i(u=>{let e=u.split(" "),t=e.length;for(;t>0&&!(_(e[t-1])>0);)t--;return t===e.length?u:e.slice(0,t).join(" ")+e.slice(t).join("")},"cD"),Xe=i((u,e,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let D="",n,r,o=Qe(u),s=[""];for(let[l,p]of u.split(" ").entries()){t.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let C=_(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 c=e-C,E=1+Math.floor((o[l]-c-1)/e);Math.floor((o[l]-1)/e)<E&&s.push(""),fu(s,p,e);continue}if(C+o[l]>e&&C>0&&o[l]>0){if(t.wordWrap===!1&&C<e){fu(s,p,e);continue}s.push("")}if(C+o[l]>e&&t.wordWrap===!1){fu(s,p,e);continue}s[s.length-1]+=p}t.trim!==!1&&(s=s.map(l=>Ye(l)));let a=[...s.join(`
|
|
4
|
-
`)];for(let[l,p]of a.entries()){if(D+=p,eu.has(p)){let{groups:c}=new RegExp(`(?:\\${tD}(?<code>\\d+)m|\\${pu}(?<uri>.*)${Cu})`).exec(a.slice(l).join(""))||{groups:{}};if(c.code!==void 0){let E=Number.parseFloat(c.code);n=E===Ze?void 0:E}else c.uri!==void 0&&(r=c.uri.length===0?void 0:c.uri)}let C=Je.codes.get(Number(n));a[l+1]===`
|
|
5
|
-
`?(r&&(D+=oD("")),n&&C&&(D+=rD(C))):p===`
|
|
6
|
-
`&&(n&&C&&(D+=rD(n)),r&&(D+=oD(r)))}return D},"dD");function ut(u,e,t){return String(u).normalize().replace(/\r\n/g,`
|
|
7
|
-
`).split(`
|
|
8
|
-
`).map(D=>Xe(D,e,t)).join(`
|
|
9
|
-
`)}i(ut,"T$1");var sD=i(u=>Array.from({length:u}).fill(""),"X$1");function Dt(u,e){let t=[],D=0;for(let n of u){let r=0,o=n.map(a=>{var l;let p=(l=e[D])!=null?l:"";D+=1,a.preprocess&&(p=a.preprocess(p)),Hu(p)>a.width&&(p=ut(p,a.width,{hard:!0}));let C=p.split(`
|
|
10
|
-
`);if(a.postprocess){let{postprocess:c}=a;C=C.map((E,d)=>c.call(a,E,d))}return a.paddingTop&&C.unshift(...sD(a.paddingTop)),a.paddingBottom&&C.push(...sD(a.paddingBottom)),C.length>r&&(r=C.length),cu(Du({},a),{lines:C})}),s=[];for(let a=0;a<r;a+=1){let l=o.map(p=>{var C;let c=(C=p.lines[a])!=null?C:"",E=Number.isFinite(p.width)?" ".repeat(p.width-_(c)):"",d=p.paddingLeftString;return p.align==="right"&&(d+=E),d+=c,p.align==="left"&&(d+=E),d+p.paddingRightString}).join("");s.push(l)}t.push(s.join(`
|
|
11
|
-
`))}return t.join(`
|
|
12
|
-
`)}i(Dt,"P$1");function et(u,e){if(!u||u.length===0)return"";let t=We(u),D=t.length;if(D===0)return"";let{stdoutColumns:n,columns:r}=_e(e);if(r.length>D)throw new Error(`${r.length} columns defined, but only ${D} columns found`);let o=ze(n,r,t);return u.map(s=>Dt(o,s)).join(`
|
|
13
|
-
`)}i(et,"mD"),x();var tt=["<",">","=",">=","<="];function nt(u){if(!tt.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}i(nt,"xD");function rt(u){let e=Object.keys(u).map(t=>{let[D,n]=t.split(" ");nt(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(rt,"wD");const ot=i(u=>u.replace(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),"S$1"),st=i(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q$1"),it={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:i(u=>u.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function at(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:`--${st(t)}`,aliasesEnabled:e,aliasFormatted:n?`-${D.alias}`:void 0}}).map(t=>(t.aliasesEnabled=e,[{type:"flagName",data:t},{type:"flagDescription",data:t}])),tableBreakpoints:it}}}i(at,"D$1");const iD=i(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A$1"),aD=i(u=>{const e="parent"in u&&u.parent?.name;return(e?`${e} `:"")+u.name},"C");function lt(u){const e=[];u.name&&e.push(aD(u));const t=iD(u)??("parent"in u&&iD(u.parent));if(t&&e.push(`v${t}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
|
|
14
|
-
`}}i(lt,"R$2");function ct(u){const{help:e}=u;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
|
|
15
|
-
`}}i(ct,"L$1");function Ft(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=[aD(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(Ft,"T");function Ct(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(Ct,"_$1");function pt(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:at(u.flags),indentBody:0}}}i(pt,"k");function ft(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(ft,"F$1");function dt(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(dt,"H$1");const Et=i(u=>[lt,ct,Ft,Ct,pt,ft,dt].map(e=>e(u)).filter(Boolean),"U"),ht=HD.WriteStream.prototype.hasColors();let gt=class{static{i(this,"M")}text(e){return e}bold(e){return ht?`\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
|
-
`:"")+(t?this.indentText({text:this.render(t),spaces:D}):"")}
|
|
20
|
-
`}table({tableData:e,tableOptions:t,tableBreakpoints:D}){return et(e.map(n=>n.map(r=>this.render(r))),D?rt(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 lD=/^[\w.-]+$/,{stringify:T}=JSON,mt=/[|\\{}()[\]^$+*?.]/;function du(u){const e=[];let t,D;for(const n of u){if(D)throw new Error(`Invalid parameter: Spread parameter ${T(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 ${T(n)} cannot come after optional parameter ${T(t)}`);if(r==="["&&o==="]"&&(s=!1,t=n),s===void 0)throw new Error(`Invalid parameter: ${T(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 p=a.match(mt);if(p)throw new Error(`Invalid parameter: ${T(n)}. Invalid character found ${T(p[0])}`);e.push({name:a,required:s,spread:l})}return e}i(du,"w$1");function Eu(u,e,t,D){for(let n=0;n<e.length;n+=1){const{name:r,required:o,spread:s}=e[n],a=ot(r);if(a in u)throw new Error(`Invalid parameter: ${T(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 ${T(r)}
|
|
22
|
-
`),D(),process.exit(1);u[a]=l}}i(Eu,"b");function Bt(u){return u===void 0||u!==!1}i(Bt,"W$1");function cD(u,e,t,D){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=e,s=Bt(o);s&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const a=ye(n,D,{ignore:e.ignoreArgv}),l=i(()=>{console.log(e.version)},"f");if(r&&a.flags.version===!0)return l(),process.exit(0);const p=new gt,C=s&&o?.render?o.render:d=>p.render(d),c=i(d=>{const g=Et({...e,...d?{help:d}:{},flags:n});console.log(C(g,p))},"u");if(s&&a.flags.help===!0)return c(),process.exit(0);if(e.parameters){let{parameters:d}=e,g=a._;const y=d.indexOf("--"),j=d.slice(y+1),v=Object.create(null);if(y>-1&&j.length>0){d=d.slice(0,y);const f=a._["--"];g=g.slice(0,-f.length||void 0),Eu(v,du(d),g,c),Eu(v,du(j),f,c)}else Eu(v,du(d),g,c);Object.assign(a._,v)}const E={...a,showVersion:l,showHelp:c};return typeof t=="function"&&t(E),{command:u,...E}}i(cD,"x$1");function At(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: ${T(o)}`);t.set(o,D)}}return t.get(u)}i(At,"z$1");function yt(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!lD.test(u.name)))throw new Error(`Invalid script name: ${T(u.name)}`);const D=t[0];if(u.commands&&lD.test(D)){const n=At(D,u.commands);if(n)return cD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return cD(void 0,u,e,t)}i(yt,"Z$1");var bt="2.8.0";const hu=i(u=>S.promises.access(u).then(()=>!0,()=>!1),"fsExists"),wt=i(async u=>{const e=h.join(u,"package.json");if(!await hu(e))throw new Error(`package.json not found at: ${e}`);const D=await S.promises.readFile(e,"utf8");try{return JSON.parse(D)}catch(n){throw new Error(`Cannot parse package.json: ${n.message}`)}},"readPackageJson"),$t=/^[/.]/,K=i((u,e)=>(!h.isAbsolute(u)&&!$t.test(u)&&(u=`./${u}`),e&&!u.endsWith("/")&&(u+="/"),u),"normalizePath"),vt=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,xt=new Set(["do","if","in","for","int","new","try","var","byte","case","char","else","enum","goto","long","null","this","true","void","with","break","catch","class","const","false","final","float","short","super","throw","while","delete","double","export","import","native","public","return","static","switch","throws","typeof","boolean","default","extends","finally","package","private","abstract","continue","debugger","function","volatile","interface","protected","transient","implements","instanceof","synchronized"]),gu=i(u=>!vt.test(u)||xt.has(u),"propertyNeedsQuotes"),P=i(u=>{if(u.endsWith(".mjs"))return"module";if(u.endsWith(".cjs"))return"commonjs"},"getFileType"),FD=i(u=>u.startsWith("."),"isPath"),mu=i((u,e,t="exports")=>{if(u){if(typeof u=="string")return FD(u)?[{outputPath:u,type:P(u)||e,from:t}]:[];if(Array.isArray(u))return u.flatMap((D,n)=>{const r=`${t}[${n}]`;return typeof D=="string"?FD(D)?{outputPath:D,type:P(D)||e,from:r}:[]:mu(D,e,r)});if(typeof u=="object")return Object.entries(u).flatMap(([D,n])=>{if(typeof n=="string"){const o=gu(D)?`["${D}"]`:`.${D}`,s={outputPath:n,from:`${t}${o}`};if(D==="require")return{...s,type:"commonjs"};if(D==="import")return{...s,type:P(n)||e};if(D==="types")return{...s,type:"types"};if(D==="node")return{...s,type:P(n)||e,platform:"node"};if(D==="default")return{...s,type:P(n)||e}}const r=gu(D)?`["${D}"]`:`.${D}`;return mu(n,e,`${t}${r}`)})}return[]},"parseExportsMap"),M=i((u,e)=>{e.outputPath=K(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"),Ot=i(u=>{const e={},t=u.type??"commonjs";if(u.main){const D=u.main;M(e,{outputPath:D,type:P(D)??t,from:"main"})}if(u.module&&M(e,{outputPath:u.module,type:"module",from:"module"}),u.types&&M(e,{outputPath:u.types,type:"types",from:"types"}),u.bin){const{bin:D}=u;if(typeof D=="string")M(e,{outputPath:D,type:P(D)??t,isExecutable:!0,from:"bin"});else for(const[n,r]of Object.entries(D)){const o=gu(n)?`["${n}"]`:`.${n}`;M(e,{outputPath:r,type:P(r)??t,isExecutable:!0,from:`bin${o}`})}}if(u.exports){const D=mu(u.exports,t);for(const n of D)M(e,n)}return Object.values(e)},"getExportEntries"),jt=i(u=>{let e=!1;if(u.includes("=")){const[t,D]=u.split("=");u=D,e=t==="bin"||t==="binary"}return{outputPath:K(u),type:P(u),isExecutable:e,from:"cli"}},"parseCliInputFlag"),kt=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]=h.join(e,n))}return t},"getAliases"),{stringify:Tt}=JSON,St=i(async(u,e)=>{for(const t of e){const D=u+t;if(await hu(D))return{extension:t,path:D}}},"tryExtensions"),CD={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".tsx",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".tsx",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".tsx",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts",".tsx"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts",".tsx"]},Pt=Object.keys(CD),Nt=i(async(u,e,t)=>{const D=e+u.outputPath.slice(t.length);for(const n of Pt)if(u.outputPath.endsWith(n)){const r=await St(D.slice(0,-n.length),CD[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"),Bu="pkgroll:create-require",pD=`IS_ESM${Math.random().toString(36).slice(2)}`,It=i(()=>({...ee({require:Bu}),name:"create-require",resolveId:i(u=>u===Bu?u:null,"resolveId"),load:i(u=>u!==Bu?null:`
|
|
23
|
-
import { createRequire } from 'module';
|
|
24
|
-
|
|
25
|
-
export default (
|
|
26
|
-
${pD}
|
|
27
|
-
? /* @__PURE__ */ createRequire(import.meta.url)
|
|
28
|
-
: require
|
|
29
|
-
);
|
|
30
|
-
`,"load")}),"createRequire"),_t=i(u=>{const e=Wu({[pD]:u}).renderChunk;return{name:"create-require-insert-format",renderChunk:{order:"pre",handler:typeof e=="function"?e:e.handler}}},"isFormatEsm"),Rt=i(u=>{const e=te.createFilter(/\.([cm]?ts|[jt]sx)$/);return{name:"esbuild-transform",transform:i(async(t,D)=>{if(!e(D))return null;const n=await Uu.transform(t,{...u,loader:"default",sourcefile:D.replace(/\.[cm]ts/,".ts")});return{code:n.code,map:n.map||null}},"transform")}},"esbuildTransform"),Lt=i(u=>{if(u==="es")return"esm";if(u==="cjs"||u==="iife")return u},"getEsbuildFormat"),Mt=i(u=>({name:"esbuild-minify",renderChunk:i(async(e,t,D)=>{const n=await Uu.transform(e,{...u,format:Lt(D.format),minify:!0,keepNames:!0});return{code:n.code,map:n.map||null}},"renderChunk")}),"esbuildMinify"),Au=i((u,e)=>u[0]-e[0]||u[1]-e[1]||u[2]-e[2],"compareSemver"),fD=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:i(t=>{const D=t.startsWith("node:");if(e&&D&&(t=t.slice(5)),qu.builtinModules.includes(t)||D)return{id:t,external:!0}},"resolveId")}},"externalizeNodeBuiltins"),Wt=i(u=>({name:"patch-binary",renderChunk:i((e,t,D)=>{if(!t.isEntry||!t.facadeModuleId)return;const n=D.entryFileNames,r=`./${h.posix.join(D.dir,n(t))}`;if(u.includes(r)){const o=new Vu(e);return o.prepend(`#!/usr/bin/env node
|
|
31
|
-
`),{code:o.toString(),map:D.sourcemap?o.generateMap({hires:!0}):void 0}}},"renderChunk"),writeBundle:i(async(e,t)=>{const D=e.entryFileNames,n=Object.values(t).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const s=`./${h.posix.join(e.dir,D(o))}`;await S.promises.chmod(s,493)}});await Promise.all(n)},"writeBundle")}),"patchBinary"),dD=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"),ED=i(u=>u!==null&&typeof u=="object","A"),W=i((u,e)=>Object.assign(new Error(`[${u}]: ${e}`),{code:u}),"a"),hD="ERR_INVALID_PACKAGE_CONFIG",yu="ERR_INVALID_PACKAGE_TARGET",Ut="ERR_PACKAGE_PATH_NOT_EXPORTED",qt=/^\d+$/,Vt=/^(\.{1,2}|node_modules)$/i,zt=/\/|\\/;var gD=(u=>(u.Export="exports",u.Import="imports",u))(gD||{});const bu=i((u,e,t,D,n)=>{if(e==null)return[];if(typeof e=="string"){const[r,...o]=e.split(zt);if(r===".."||o.some(s=>Vt.test(s)))throw W(yu,`Invalid "${u}" target "${e}" defined in the package config`);return[n?e.replace(/\*/g,n):e]}if(Array.isArray(e))return e.flatMap(r=>bu(u,r,t,D,n));if(ED(e)){for(const r of Object.keys(e)){if(qt.test(r))throw W(hD,"Cannot contain numeric property keys");if(r==="default"||D.includes(r))return bu(u,e[r],t,D,n)}return[]}throw W(yu,`Invalid "${u}" target "${e}"`)},"f"),J="*",Gt=i((u,e)=>{const t=u.indexOf(J),D=e.indexOf(J);return t===D?e.length>u.length:D>t},"m");function Kt(u,e){if(!e.includes(J)&&u.hasOwnProperty(e))return[e];let t,D;for(const n of Object.keys(u))if(n.includes(J)){const[r,o,s]=n.split(J);if(s===void 0&&e.startsWith(r)&&e.endsWith(o)){const a=e.slice(r.length,-o.length||void 0);a&&(!t||Gt(t,n))&&(t=n,D=a)}}return[t,D]}i(Kt,"d");const Jt=i(u=>Object.keys(u).reduce((e,t)=>{const D=t===""||t[0]!==".";if(e===void 0||e===D)return D;throw W(hD,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),Zt=/^\w+:/,Ht=i((u,e,t)=>{if(!u)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof u=="string"||Array.isArray(u)||ED(u)&&Jt(u))&&(u={".":u});const[D,n]=Kt(u,e),r=bu(gD.Export,u[D],e,t,n);if(r.length===0)throw W(Ut,e==="."?'No "exports" main defined':`Package subpath '${e}' is not defined by "exports"`);for(const o of r)if(!o.startsWith("./")&&!Zt.test(o))throw W(yu,`Invalid "exports" target "${o}" defined in the package config`);return r},"v");var Qt=Object.defineProperty,F=i((u,e)=>Qt(u,"name",{value:e,configurable:!0}),"l");function O(u){return u.startsWith("\\\\?\\")?u:u.replace(/\\/g,"/")}i(O,"B"),F(O,"slash");const wu=F(u=>{const e=S[u];return(t,...D)=>{const n=`${u}:${D.join(":")}`;let r=t?.get(n);return r===void 0&&(r=Reflect.apply(e,S,D),t?.set(n,r)),r}},"cacheFs"),k=wu("existsSync"),Yt=wu("readFileSync"),tu=wu("statSync"),mD=F((u,e,t)=>{for(;;){const D=h.posix.join(u,e);if(k(t,D))return D;const n=h.dirname(u);if(n===u)return;u=n}},"findUp"),$u=/^\.{1,2}(\/.*)?$/,vu=F(u=>{const e=O(u);return $u.test(e)?e:`./${e}`},"normalizeRelativePath");function BD(u,e=!1){const t=u.length;let D=0,n="",r=0,o=16,s=0,a=0,l=0,p=0,C=0;function c(f,B){let m=0,b=0;for(;m<f||!B;){let w=u.charCodeAt(D);if(w>=48&&w<=57)b=b*16+w-48;else if(w>=65&&w<=70)b=b*16+w-65+10;else if(w>=97&&w<=102)b=b*16+w-97+10;else break;D++,m++}return m<f&&(b=-1),b}i(c,"O"),F(c,"scanHexDigits");function E(f){D=f,n="",r=0,o=16,C=0}i(E,"v"),F(E,"setPosition");function d(){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 B=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++;B=D}else C=3;return u.substring(f,B)}i(d,"A"),F(d,"scanNumber");function g(){let f="",B=D;for(;;){if(D>=t){f+=u.substring(B,D),C=2;break}const m=u.charCodeAt(D);if(m===34){f+=u.substring(B,D),D++;break}if(m===92){if(f+=u.substring(B,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+=`
|
|
32
|
-
`;break;case 114:f+="\r";break;case 116:f+=" ";break;case 117:const b=c(4,!0);b>=0?f+=String.fromCharCode(b):C=4;break;default:C=5}B=D;continue}if(m>=0&&m<=31)if(U(m)){f+=u.substring(B,D),C=2;break}else C=6;D++}return f}i(g,"b"),F(g,"scanString");function y(){if(n="",C=0,r=D,a=s,p=l,D>=t)return r=t,o=17;let f=u.charCodeAt(D);if(nu(f)){do D++,n+=String.fromCharCode(f),f=u.charCodeAt(D);while(nu(f));return o=15}if(U(f))return D++,n+=String.fromCharCode(f),f===13&&u.charCodeAt(D)===10&&(D++,n+=`
|
|
33
|
-
`),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=g(),o=10;case 47:const B=D-1;if(u.charCodeAt(D+1)===47){for(D+=2;D<t&&!U(u.charCodeAt(D));)D++;return n=u.substring(B,D),o=12}if(u.charCodeAt(D+1)===42){D+=2;const m=t-1;let b=!1;for(;D<m;){const w=u.charCodeAt(D);if(w===42&&u.charCodeAt(D+1)===47){D+=2,b=!0;break}D++,U(w)&&(w===13&&u.charCodeAt(D)===10&&D++,s++,l=D)}return b||(D++,C=1),n=u.substring(B,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+=d(),o=11;default:for(;D<t&&j(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(y,"$"),F(y,"scanNext");function j(f){if(nu(f)||U(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(j,"U"),F(j,"isUnknownContentCharacter");function v(){let f;do f=y();while(f>=12&&f<=15);return f}return i(v,"E"),F(v,"scanNextNonTrivia"),{setPosition:E,getPosition:F(()=>D,"getPosition"),scan:e?v:y,getToken:F(()=>o,"getToken"),getTokenValue:F(()=>n,"getTokenValue"),getTokenOffset:F(()=>r,"getTokenOffset"),getTokenLength:F(()=>D-r,"getTokenLength"),getTokenStartLine:F(()=>a,"getTokenStartLine"),getTokenStartCharacter:F(()=>r-p,"getTokenStartCharacter"),getTokenError:F(()=>C,"getTokenError")}}i(BD,"_e"),F(BD,"createScanner");function nu(u){return u===32||u===9}i(nu,"G"),F(nu,"isWhiteSpace");function U(u){return u===10||u===13}i(U,"h"),F(U,"isLineBreak");function R(u){return u>=48&&u<=57}i(R,"N"),F(R,"isDigit");var AD;(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"})(AD||(AD={})),new Array(20).fill(0).map((u,e)=>" ".repeat(e));const q=200;new Array(q).fill(0).map((u,e)=>`
|
|
34
|
-
`+" ".repeat(e)),new Array(q).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(q).fill(0).map((u,e)=>`\r
|
|
35
|
-
`+" ".repeat(e)),new Array(q).fill(0).map((u,e)=>`
|
|
36
|
-
`+" ".repeat(e)),new Array(q).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(q).fill(0).map((u,e)=>`\r
|
|
37
|
-
`+" ".repeat(e));var ru;(function(u){u.DEFAULT={allowTrailingComma:!1}})(ru||(ru={}));function yD(u,e=[],t=ru.DEFAULT){let D=null,n=[];const r=[];function o(s){Array.isArray(n)?n.push(s):D!==null&&(n[D]=s)}return i(o,"r"),F(o,"onValue"),bD(u,{onObjectBegin:F(()=>{const s={};o(s),r.push(n),n=s,D=null},"onObjectBegin"),onObjectProperty:F(s=>{D=s},"onObjectProperty"),onObjectEnd:F(()=>{n=r.pop()},"onObjectEnd"),onArrayBegin:F(()=>{const s=[];o(s),r.push(n),n=s,D=null},"onArrayBegin"),onArrayEnd:F(()=>{n=r.pop()},"onArrayEnd"),onLiteralValue:o,onError:F((s,a,l)=>{e.push({error:s,offset:a,length:l})},"onError")},t),n[0]}i(yD,"$e"),F(yD,"parse$1");function bD(u,e,t=ru.DEFAULT){const D=BD(u,!1),n=[];function r(A){return A?()=>A(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}i(r,"s"),F(r,"toNoArgVisit");function o(A){return A?()=>A(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(o,"r"),F(o,"toNoArgVisitWithPath");function s(A){return A?$=>A($,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}i(s,"f"),F(s,"toOneArgVisit");function a(A){return A?$=>A($,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(a,"u"),F(a,"toOneArgVisitWithPath");const l=o(e.onObjectBegin),p=a(e.onObjectProperty),C=r(e.onObjectEnd),c=o(e.onArrayBegin),E=r(e.onArrayEnd),d=a(e.onLiteralValue),g=s(e.onSeparator),y=r(e.onComment),j=s(e.onError),v=t&&t.disallowComments,f=t&&t.allowTrailingComma;function B(){for(;;){const A=D.scan();switch(D.getTokenError()){case 4:m(14);break;case 5:m(15);break;case 3:m(13);break;case 1:v||m(11);break;case 2:m(12);break;case 6:m(16);break}switch(A){case 12:case 13:v?m(10):y();break;case 16:m(1);break;case 15:case 14:break;default:return A}}}i(B,"m"),F(B,"scanNext");function m(A,$=[],Lu=[]){if(j(A),$.length+Lu.length>0){let Y=D.getToken();for(;Y!==17;){if($.indexOf(Y)!==-1){B();break}else if(Lu.indexOf(Y)!==-1)break;Y=B()}}}i(m,"g"),F(m,"handleError");function b(A){const $=D.getTokenValue();return A?d($):(p($),n.push($)),B(),!0}i(b,"y"),F(b,"parseString");function w(){switch(D.getToken()){case 11:const A=D.getTokenValue();let $=Number(A);isNaN($)&&(m(2),$=0),d($);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return B(),!0}i(w,"j"),F(w,"parseLiteral");function lu(){return D.getToken()!==10?(m(3,[],[2,5]),!1):(b(!1),D.getToken()===6?(g(":"),B(),Q()||m(4,[],[2,5])):m(5,[],[2,5]),n.pop(),!0)}i(lu,"ke"),F(lu,"parseProperty");function _u(){l(),B();let A=!1;for(;D.getToken()!==2&&D.getToken()!==17;){if(D.getToken()===5){if(A||m(4,[],[]),g(","),B(),D.getToken()===2&&f)break}else A&&m(6,[],[]);lu()||m(4,[],[2,5]),A=!0}return C(),D.getToken()!==2?m(7,[2],[]):B(),!0}i(_u,"be"),F(_u,"parseObject");function Ru(){c(),B();let A=!0,$=!1;for(;D.getToken()!==4&&D.getToken()!==17;){if(D.getToken()===5){if($||m(4,[],[]),g(","),B(),D.getToken()===4&&f)break}else $&&m(6,[],[]);A?(n.push(0),A=!1):n[n.length-1]++,Q()||m(4,[],[4,5]),$=!0}return E(),A||n.pop(),D.getToken()!==4?m(8,[4],[]):B(),!0}i(Ru,"we"),F(Ru,"parseArray");function Q(){switch(D.getToken()){case 3:return Ru();case 1:return _u();case 10:return b(!0);default:return w()}}return i(Q,"V"),F(Q,"parseValue"),B(),D.getToken()===17?t.allowEmptyContent?!0:(m(4,[],[]),!1):Q()?(D.getToken()!==17&&m(9,[],[]),!0):(m(4,[],[]),!1)}i(bD,"ye"),F(bD,"visit");var wD;(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"})(wD||(wD={}));var $D;(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"})($D||($D={}));const Xt=yD;var vD;(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"})(vD||(vD={}));const xD=F((u,e)=>Xt(Yt(e,u,"utf8")),"readJsonc"),xu=Symbol("implicitBaseUrl"),N="${configDir}",un=F(()=>{const{findPnpApi:u}=qu;return u&&u(process.cwd())},"getPnpApi"),Ou=F((u,e,t,D)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${t}`;if(D!=null&&D.has(n))return D.get(n);const r=xD(u,D);if(!r)return;let o=e||"tsconfig.json";if(!t&&r.exports)try{const[s]=Ht(r.exports,e,["require","types"]);o=s}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=h.join(u,"..",o),D?.set(n,o),o},"resolveFromPackageJsonPath"),ju="package.json",ku="tsconfig.json",Dn=F((u,e,t)=>{let D=u;if(u===".."&&(D=h.join(D,ku)),u[0]==="."&&(D=h.resolve(e,D)),h.isAbsolute(D)){if(k(t,D)){if(tu(t,D).isFile())return D}else if(!D.endsWith(".json")){const E=`${D}.json`;if(k(t,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,s=r.join("/"),a=un();if(a){const{resolveRequest:E}=a;try{if(o===u){const d=E(h.join(o,ju),e);if(d){const g=Ou(d,s,!1,t);if(g&&k(t,g))return g}}else{let d;try{d=E(u,e,{extensions:[".json"]})}catch{d=E(h.join(u,ku),e)}if(d)return d}}catch{}}const l=mD(h.resolve(e),h.join("node_modules",o),t);if(!l||!tu(t,l).isDirectory())return;const p=h.join(l,ju);if(k(t,p)){const E=Ou(p,s,!1,t);if(E===!1)return;if(E&&k(t,E)&&tu(t,E).isFile())return E}const C=h.join(l,s),c=C.endsWith(".json");if(!c){const E=`${C}.json`;if(k(t,E))return E}if(k(t,C)){if(tu(t,C).isDirectory()){const E=h.join(C,ju);if(k(t,E)){const g=Ou(E,"",!0,t);if(g&&k(t,g))return g}const d=h.join(C,ku);if(k(t,d))return d}else if(c)return C}},"resolveExtendsPath"),Tu=F((u,e)=>vu(h.relative(u,e)),"pathRelative"),OD=["files","include","exclude"],en=F((u,e,t,D)=>{const n=Dn(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=h.dirname(n),o=jD(n,D,t);delete o.references;const{compilerOptions:s}=o;if(s){const{baseUrl:a}=s;a&&!a.startsWith(N)&&(s.baseUrl=O(h.relative(e,h.join(r,a)))||"./");let{outDir:l}=s;l&&(l.startsWith(N)||(l=h.relative(e,h.join(r,l))),s.outDir=O(l)||"./")}for(const a of OD){const l=o[a];l&&(o[a]=l.map(p=>p.startsWith(N)?p:O(h.relative(e,h.join(r,p)))))}return o},"resolveExtends"),tn=["outDir","declarationDir"],jD=F((u,e,t=new Set)=>{let D;try{D=xD(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=h.dirname(u);if(D.compilerOptions){const{compilerOptions:r}=D;r.paths&&!r.baseUrl&&(r[xu]=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=en(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 s of o){const a=r[s];if(a&&!a.startsWith(N)){const l=h.resolve(n,a),p=Tu(n,l);r[s]=p}}for(const s of tn){let a=r[s];a&&(Array.isArray(D.exclude)||(D.exclude=[]),D.exclude.includes(a)||D.exclude.push(a),a.startsWith(N)||(a=vu(a)),r[s]=a)}}else D.compilerOptions={};if(D.include?(D.include=D.include.map(O),D.files&&delete D.files):D.files&&(D.files=D.files.map(r=>r.startsWith(N)?r:vu(r))),D.watchOptions){const{watchOptions:r}=D;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>O(h.resolve(n,o))))}return D},"_parseTsconfig"),ou=F((u,e)=>{if(u.startsWith(N))return O(h.join(e,u.slice(N.length)))},"interpolateConfigDir"),nn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],kD=F((u,e=new Map)=>{const t=h.resolve(u),D=jD(t,e),n=h.dirname(t),{compilerOptions:r}=D;if(r){for(const s of nn){const a=r[s];if(a){const l=ou(a,n);r[s]=l?Tu(n,l):a}}for(const s of["rootDirs","typeRoots"]){const a=r[s];a&&(r[s]=a.map(l=>{const p=ou(l,n);return p?Tu(n,p):l}))}const{paths:o}=r;if(o)for(const s of Object.keys(o))o[s]=o[s].map(a=>{var l;return(l=ou(a,n))!=null?l:a})}for(const o of OD){const s=D[o];s&&(D[o]=s.map(a=>{var l;return(l=ou(a,n))!=null?l:a}))}return D},"parseTsconfig"),rn=F((u=process.cwd(),e="tsconfig.json",t=new Map)=>{const D=mD(O(u),e,t);if(!D)return null;const n=kD(D,t);return{path:D,config:n}},"getTsconfig"),on=/\*/g,TD=F((u,e)=>{const t=u.match(on);if(t&&t.length>1)throw new Error(e)},"assertStarCount"),sn=F(u=>{if(u.includes("*")){const[e,t]=u.split("*");return{prefix:e,suffix:t}}return u},"parsePattern"),an=F(({prefix:u,suffix:e},t)=>t.startsWith(u)&&t.endsWith(e),"isPatternMatch"),ln=F((u,e,t)=>Object.entries(u).map(([D,n])=>(TD(D,`Pattern '${D}' can have at most one '*' character.`),{pattern:sn(D),substitutions:n.map(r=>{if(TD(r,`Substitution '${r}' in pattern '${D}' can have at most one '*' character.`),!e&&!$u.test(r))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return h.resolve(t,r)})})),"parsePaths"),cn=F(u=>{const{compilerOptions:e}=u.config;if(!e)return null;const{baseUrl:t,paths:D}=e;if(!t&&!D)return null;const n=xu in e&&e[xu],r=h.resolve(h.dirname(u.path),t||n||"."),o=D?ln(D,t,r):[];return s=>{if($u.test(s))return[];const a=[];for(const c of o){if(c.pattern===s)return c.substitutions.map(O);typeof c.pattern!="string"&&a.push(c)}let l,p=-1;for(const c of a)an(c.pattern,s)&&c.pattern.prefix.length>p&&(p=c.pattern.prefix.length,l=c);if(!l)return t?[O(h.join(r,s))]:[];const C=s.slice(l.pattern.prefix.length,s.length-l.pattern.suffix.length);return l.substitutions.map(c=>O(c.replace("*",C)))}},"createPathsMatcher"),SD=F(u=>{let e="";for(let t=0;t<u.length;t+=1){const D=u[t],n=D.toUpperCase();e+=D===n?D.toLowerCase():n}return e},"s"),Fn=65,Cn=97,pn=F(()=>Math.floor(Math.random()*26),"m"),fn=F(u=>Array.from({length:u},()=>String.fromCodePoint(pn()+(Math.random()>.5?Fn:Cn))).join(""),"S"),dn=F((u=ne)=>{const e=process.execPath;if(u.existsSync(e))return!u.existsSync(SD(e));const t=`/${fn(10)}`;u.writeFileSync(t,"");const D=!u.existsSync(SD(t));return u.unlinkSync(t),D},"l"),{join:su}=h.posix,Su={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},En=F(u=>{const e=[...Su.ts],t=[...Su.cts],D=[...Su.mts];return u!=null&&u.allowJs&&(e.push(".js",".jsx"),t.push(".cjs"),D.push(".mjs")),[...e,...t,...D]},"getSupportedExtensions"),hn=F(u=>{const e=[];if(!u)return e;const{outDir:t,declarationDir:D}=u;return t&&e.push(t),D&&e.push(D),e},"getDefaultExcludeSpec"),PD=F(u=>u.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),gn=["node_modules","bower_components","jspm_packages"],Pu=`(?!(${gn.join("|")})(/|$))`,mn=/(?:^|\/)[^.*?]+$/,ND="**/*",iu="[^/]",Nu="[^./]",ID=process.platform==="win32";F(({config:u,path:e},t=dn())=>{if("extends"in u)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!h.isAbsolute(e))throw new Error("The tsconfig path must be absolute");ID&&(e=O(e));const D=h.dirname(e),{files:n,include:r,exclude:o,compilerOptions:s}=u,a=n?.map(d=>su(D,d)),l=En(s),p=t?"":"i",C=(o||hn(s)).map(d=>{const g=su(D,d),y=PD(g).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${iu}*`).replaceAll(String.raw`\?`,iu);return new RegExp(`^${y}($|/)`,p)}),c=n||r?r:[ND],E=c?c.map(d=>{let g=su(D,d);mn.test(g)&&(g=su(g,ND));const y=PD(g).replaceAll(String.raw`/\*\*`,`(/${Pu}${Nu}${iu}*)*?`).replaceAll(/(\/)?\\\*/g,(j,v)=>{const f=`(${Nu}|(\\.(?!min\\.js$))?)*`;return v?`/${Pu}${Nu}${f}`:f}).replaceAll(/(\/)?\\\?/g,(j,v)=>{const f=iu;return v?`/${Pu}${f}`:f});return new RegExp(`^${y}$`,p)}):void 0;return d=>{if(!h.isAbsolute(d))throw new Error("filePath must be absolute");if(ID&&(d=O(d)),a!=null&&a.includes(d)||!(!l.some(g=>d.endsWith(g))||C.some(g=>g.test(d)))&&E&&E.some(g=>g.test(d)))return u}},"createFilesMatcher");const _D="resolve-tsconfig-paths",Bn=i(u=>u[0]===".","isRelative"),An=i(u=>u[0]==="/"||/^[\s\S]:/.test(u),"isAbsolute"),yn=i(u=>u[0]==="#","isImports"),RD=i(u=>{const e=cn(u);return e?{name:_D,async resolveId(t,D,n){if(!D||Bn(t)||An(t)||yn(t)||t.startsWith("\0"))return null;const r=e(t);for(const o of r){const s=await this.resolve(o,D,{skipSelf:!0,...n});if(s)return s}return null}}:{name:_D}},"resolveTsconfigPaths"),LD=/^#!.*/,bn=i(()=>({name:"strip-hashbang",transform:i(u=>{if(!LD.test(u))return null;const e=new Vu(u);return e.replace(LD,""),{code:e.toString(),map:e.generateMap({hires:!0})}},"transform")}),"stripHashbang"),wn=["peerDependencies","dependencies","optionalDependencies"],Iu="@types/",MD=i((u,e,t=!1)=>{const D=[],{devDependencies:n}=u;for(const r of wn){const o=u[r];if(!o)continue;const s=Object.keys(o);for(const a of s)if(!(a in e))if(a.startsWith(Iu)){if(t){let l=a.slice(Iu.length);l.includes("__")&&(l=`@${l.replace("__","/")}`),D.push(l)}}else{if(n&&t){const l=Iu+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"),WD=i(u=>u.split("?")[0],"stripQuery"),UD={type:i(async(u,e)=>{const[t,D]=await Promise.all([Promise.resolve().then(function(){return require("./rollup-plugin-dts-wFwILfkI.js")}),Promise.resolve().then(function(){return require("./local-typescript-loader-DFqhlpcR.js")}).then(function(n){return n.localTypescriptLoader})]);return{input:[],preserveEntrySignatures:"strict",plugins:[fD(u),...e?[RD(e)]:[],dD(),t.default({respectExternal:!0,compilerOptions:{composite:!1,preserveSymlinks:!1,module:D.default.ModuleKind.Preserve,moduleResolution:D.default.ModuleResolutionKind.Bundler},tsconfig:e?.path})],output:[],external:[]}},"type"),app:i((u,e,t,D,n)=>{const r={target:u.target,tsconfigRaw:n?.config};return{input:[],preserveEntrySignatures:"strict",plugins:[fD(u),...n?[RD(n)]:[],dD(),ue({entries:e}),QD({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),...Object.keys(t).length>0?[Wu({preventAssignment:!0,objectGuards:!0,values:t})]:[],bn(),YD(),XD(),Rt(r),It(),De({warnOnError:!0}),...u.minify?[Mt(r)]:[],Wt(D)],output:[],external:[]}},"app")},$n=i(async(u,e,t,D,n,r,o)=>{const s=t.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),a=Object.create(null),l=Object.fromEntries(D.env.map(({key:c,value:E})=>[`process.env.${c}`,JSON.stringify(E)])),p=MD(r,n),C=MD(r,n,!0);for(const{input:c,srcExtension:E,distExtension:d,exportEntry:g}of t){if(g.type==="types"){let B=a.type;B||(B=await UD.type(D,o),B.external=C,a.type=B),B.input.includes(c)||B.input.push(c),B.output.push({dir:e,entryFileNames:i(m=>S.realpathSync.native(WD(m.facadeModuleId)).slice(u.length,-E.length)+d,"entryFileNames"),exports:"auto",format:"esm"});continue}let y=a.app;y||(y=UD.app(D,n,l,s,o),y.external=p,a.app=y),y.input.includes(c)||y.input.push(c);const j=y.output,v=h.extname(g.outputPath),f=`${g.type}-${v}`;if(!j[f]){const B={dir:e,exports:"auto",format:g.type,chunkFileNames:`[name]-[hash]${v}`,sourcemap:D.sourcemap,plugins:[_t(g.type==="module")],entryFileNames:i(m=>{const w=S.realpathSync.native(WD(m.facadeModuleId)).slice(u.length);return h.join(h.dirname(w),m.name)+d},"entryFileNames")};j.push(B),j[f]=B}}return a},"getRollupConfigs"),vn=i(u=>{if(!u)return rn();const e=h.resolve(u),t=kD(e);return{path:e,config:t}},"getTsconfig");let L=!0;const V=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Z=0;if(V.process&&V.process.env&&V.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:t,TERM:D,COLORTERM:n}=V.process.env;e||t||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:D==="dumb"?L=!1:"CI"in V.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in V.process.env)?L=!0:L=process.stdout.isTTY,L&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?Z=3:D&&(D.endsWith("-256color")||D.endsWith("256"))?Z=2:Z=1)}let qD={enabled:L,supportLevel:Z};function xn(u,e,t=1){const D=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>qD.enabled&&qD.supportLevel>=t?D+(""+o).replace(r,D)+n:""+o}i(xn,"kolorist");const On=xn(90,39),jn=i(()=>new Date().toLocaleTimeString(),"currentTime"),au=i((...u)=>console.log(`[${On(jn())}]`,...u),"log"),kn=i(async u=>{await hu(u)&&await S.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:VD}=JSON,I=yt({name:"pkgroll",version:bt,flags:{input:{type:[jt],alias:"i",description:"Dist paths for source files to bundle (Only use if you cannot use package.json entries)"},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"},tsconfig:{type:String,description:"Custom tsconfig.json file path",alias:"p"},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:i(u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${VD(u)}`)},"type"),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:i((u,e)=>(e.flagOperator=t=>t.name==="env"?".key=":" ",e.render(u)),"render")}}),zD=process.cwd(),GD=K(I.flags.src,!0),H=K(I.flags.dist,!0),KD=vn(I.flags.tsconfig),JD=KD?.config.compilerOptions?.target;JD&&I.flags.target.push(JD),(async()=>{const u=await wt(zD);let e=Ot(u);const t=I.flags.input;if(t.length>0){const r=u.type??"commonjs";e.push(...t.map(o=>(o.type||(o.type=r),o)))}if(e=e.filter(r=>{const o=r.outputPath.startsWith(H);return o||console.warn(`Ignoring entry outside of ${H} directory: package.json#${r.from}=${VD(r.outputPath)}`),o}),e.length===0)throw new Error("No export entries found in package.json");const D=await Promise.all(e.map(async r=>({...await Nt(r,GD,H),exportEntry:r}))),n=await $n(K(S.realpathSync.native(GD),!0),H,D,I.flags,kt(u,zD),u,KD);I.flags.cleanDist&&await kn(H),I.flags.watch?(au("Watch initialized"),Object.values(n).map(async r=>{Mu.watch(r).on("event",async s=>{s.code==="BUNDLE_START"&&au("Building",...Array.isArray(s.input)?s.input:[s.input]),s.code==="BUNDLE_END"&&(await Promise.all(r.output.map(a=>s.result.write(a))),au("Built",...Array.isArray(s.input)?s.input:[s.input])),s.code==="ERROR"&&au("Error:",s.error.message)})})):await Promise.all(Object.values(n).map(async r=>{const o=await Mu.rollup(r);return Promise.all(r.output.map(s=>o.write(s)))}))})().catch(u=>{console.error(u),process.exit(1)});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var t=(e,o)=>u(e,"name",{value:o,configurable:!0});var i=require("module"),d=typeof document<"u"?document.currentScript:null,r=require;const n=t(()=>{const e=process.cwd();try{return r.resolve("typescript",{paths:[e]})}catch{throw new Error(`Could not find \`typescript\` in ${e}`)}},"getLocalTypescriptPath");var c=r(n()),p=Object.freeze({__proto__:null,default:c});exports.localTypescriptLoader=p,exports.require=r,exports.ts=c;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";var He=Object.defineProperty;var b=(l,e)=>He(l,"name",{value:e,configurable:!0});var c=require("./local-typescript-loader-DFqhlpcR.js"),Xe=require("path"),Ye=require("tty"),Je=require("os"),Qe=require("module"),Ze=require("magic-string"),ee=typeof document<"u"?document.currentScript:null;function et(l){var e=Object.create(null);return l&&Object.keys(l).forEach(function(t){if(t!=="default"){var s=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:b(function(){return l[t]},"get")})}}),e.default=l,Object.freeze(e)}b(et,"_interopNamespaceDefault");var O=et(Xe),K={},A={},W={},be;function tt(){return be||(be=1,Object.defineProperty(W,"__esModule",{value:!0}),W.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,W.matchToToken=function(l){var e={type:"invalid",value:l[0],closed:void 0};return l[1]?(e.type="string",e.closed=!!(l[3]||l[4])):l[5]?e.type="comment":l[6]?(e.type="comment",e.closed=!!l[7]):l[8]?e.type="regex":l[9]?e.type="number":l[10]?e.type="name":l[11]?e.type="punctuator":l[12]&&(e.type="whitespace"),e}),W}b(tt,"requireJsTokens");var te={},L={},ge;function rt(){if(ge)return L;ge=1,Object.defineProperty(L,"__esModule",{value:!0}),L.isIdentifierChar=n,L.isIdentifierName=a,L.isIdentifierStart=d;let l="\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",e="\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 t=new RegExp("["+l+"]"),s=new RegExp("["+l+e+"]");l=e=null;const f=[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],v=[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 p(r,i){let o=65536;for(let h=0,u=i.length;h<u;h+=2){if(o+=i[h],o>r)return!1;if(o+=i[h+1],o>=r)return!0}return!1}b(p,"isInAstralSet");function d(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&t.test(String.fromCharCode(r)):p(r,f)}b(d,"isIdentifierStart");function n(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&&s.test(String.fromCharCode(r)):p(r,f)||p(r,v)}b(n,"isIdentifierChar");function a(r){let i=!0;for(let o=0;o<r.length;o++){let h=r.charCodeAt(o);if((h&64512)===55296&&o+1<r.length){const u=r.charCodeAt(++o);(u&64512)===56320&&(h=65536+((h&1023)<<10)+(u&1023))}if(i){if(i=!1,!d(h))return!1}else if(!n(h))return!1}return!i}return b(a,"isIdentifierName"),L}b(rt,"requireIdentifier");var P={},ye;function nt(){if(ye)return P;ye=1,Object.defineProperty(P,"__esModule",{value:!0}),P.isKeyword=n,P.isReservedWord=f,P.isStrictBindOnlyReservedWord=p,P.isStrictBindReservedWord=d,P.isStrictReservedWord=v;const l={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"]},e=new Set(l.keyword),t=new Set(l.strict),s=new Set(l.strictBind);function f(a,r){return r&&a==="await"||a==="enum"}b(f,"isReservedWord");function v(a,r){return f(a,r)||t.has(a)}b(v,"isStrictReservedWord");function p(a){return s.has(a)}b(p,"isStrictBindOnlyReservedWord");function d(a,r){return v(a,r)||p(a)}b(d,"isStrictBindReservedWord");function n(a){return e.has(a)}return b(n,"isKeyword"),P}b(nt,"requireKeyword");var ve;function at(){return ve||(ve=1,function(l){Object.defineProperty(l,"__esModule",{value:!0}),Object.defineProperty(l,"isIdentifierChar",{enumerable:!0,get:b(function(){return e.isIdentifierChar},"get")}),Object.defineProperty(l,"isIdentifierName",{enumerable:!0,get:b(function(){return e.isIdentifierName},"get")}),Object.defineProperty(l,"isIdentifierStart",{enumerable:!0,get:b(function(){return e.isIdentifierStart},"get")}),Object.defineProperty(l,"isKeyword",{enumerable:!0,get:b(function(){return t.isKeyword},"get")}),Object.defineProperty(l,"isReservedWord",{enumerable:!0,get:b(function(){return t.isReservedWord},"get")}),Object.defineProperty(l,"isStrictBindOnlyReservedWord",{enumerable:!0,get:b(function(){return t.isStrictBindOnlyReservedWord},"get")}),Object.defineProperty(l,"isStrictBindReservedWord",{enumerable:!0,get:b(function(){return t.isStrictBindReservedWord},"get")}),Object.defineProperty(l,"isStrictReservedWord",{enumerable:!0,get:b(function(){return t.isStrictReservedWord},"get")});var e=rt(),t=nt()}(te)),te}b(at,"requireLib$2");function st(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}b(st,"commonjsRequire");var U={exports:{}},xe;function we(){if(xe)return U.exports;xe=1;let l=process.argv||[],e=process.env,t=!("NO_COLOR"in e||l.includes("--no-color"))&&("FORCE_COLOR"in e||l.includes("--color")||process.platform==="win32"||st!=null&&Ye.isatty(1)&&e.TERM!=="dumb"||"CI"in e),s=b((p,d,n=p)=>a=>{let r=""+a,i=r.indexOf(d,p.length);return~i?p+f(r,d,n,i)+d:p+r+d},"formatter"),f=b((p,d,n,a)=>{let r="",i=0;do r+=p.substring(i,a)+n,i=a+d.length,a=p.indexOf(d,i);while(~a);return r+p.substring(i)},"replaceClose"),v=b((p=t)=>{let d=p?s:()=>String;return{isColorSupported:p,reset:d("\x1B[0m","\x1B[0m"),bold:d("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:d("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:d("\x1B[3m","\x1B[23m"),underline:d("\x1B[4m","\x1B[24m"),inverse:d("\x1B[7m","\x1B[27m"),hidden:d("\x1B[8m","\x1B[28m"),strikethrough:d("\x1B[9m","\x1B[29m"),black:d("\x1B[30m","\x1B[39m"),red:d("\x1B[31m","\x1B[39m"),green:d("\x1B[32m","\x1B[39m"),yellow:d("\x1B[33m","\x1B[39m"),blue:d("\x1B[34m","\x1B[39m"),magenta:d("\x1B[35m","\x1B[39m"),cyan:d("\x1B[36m","\x1B[39m"),white:d("\x1B[37m","\x1B[39m"),gray:d("\x1B[90m","\x1B[39m"),bgBlack:d("\x1B[40m","\x1B[49m"),bgRed:d("\x1B[41m","\x1B[49m"),bgGreen:d("\x1B[42m","\x1B[49m"),bgYellow:d("\x1B[43m","\x1B[49m"),bgBlue:d("\x1B[44m","\x1B[49m"),bgMagenta:d("\x1B[45m","\x1B[49m"),bgCyan:d("\x1B[46m","\x1B[49m"),bgWhite:d("\x1B[47m","\x1B[49m")}},"createColors");return U.exports=v(),U.exports.createColors=v,U.exports}b(we,"requirePicocolors");var re={exports:{}},ne,Se;function it(){if(Se)return ne;Se=1;var l=/[|\\{}()[\]^$+*?.]/g;return ne=b(function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(l,"\\$&")},"escapeStringRegexp"),ne}b(it,"requireEscapeStringRegexp");var H={exports:{}},ae={exports:{}},se,Ce;function ut(){return Ce||(Ce=1,se={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]}),se}b(ut,"requireColorName");var Ee;function Te(){if(Ee)return ae.exports;Ee=1;var l=ut(),e={};for(var t in l)l.hasOwnProperty(t)&&(e[l[t]]=t);var s=ae.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 f in s)if(s.hasOwnProperty(f)){if(!("channels"in s[f]))throw new Error("missing channels property: "+f);if(!("labels"in s[f]))throw new Error("missing channel labels property: "+f);if(s[f].labels.length!==s[f].channels)throw new Error("channel and label counts mismatch: "+f);var v=s[f].channels,p=s[f].labels;delete s[f].channels,delete s[f].labels,Object.defineProperty(s[f],"channels",{value:v}),Object.defineProperty(s[f],"labels",{value:p})}s.rgb.hsl=function(n){var a=n[0]/255,r=n[1]/255,i=n[2]/255,o=Math.min(a,r,i),h=Math.max(a,r,i),u=h-o,m,y,g;return h===o?m=0:a===h?m=(r-i)/u:r===h?m=2+(i-a)/u:i===h&&(m=4+(a-r)/u),m=Math.min(m*60,360),m<0&&(m+=360),g=(o+h)/2,h===o?y=0:g<=.5?y=u/(h+o):y=u/(2-h-o),[m,y*100,g*100]},s.rgb.hsv=function(n){var a,r,i,o,h,u=n[0]/255,m=n[1]/255,y=n[2]/255,g=Math.max(u,m,y),w=g-Math.min(u,m,y),x=b(function(S){return(g-S)/6/w+1/2},"diffc");return w===0?o=h=0:(h=w/g,a=x(u),r=x(m),i=x(y),u===g?o=i-r:m===g?o=1/3+a-i:y===g&&(o=2/3+r-a),o<0?o+=1:o>1&&(o-=1)),[o*360,h*100,g*100]},s.rgb.hwb=function(n){var a=n[0],r=n[1],i=n[2],o=s.rgb.hsl(n)[0],h=1/255*Math.min(a,Math.min(r,i));return i=1-1/255*Math.max(a,Math.max(r,i)),[o,h*100,i*100]},s.rgb.cmyk=function(n){var a=n[0]/255,r=n[1]/255,i=n[2]/255,o,h,u,m;return m=Math.min(1-a,1-r,1-i),o=(1-a-m)/(1-m)||0,h=(1-r-m)/(1-m)||0,u=(1-i-m)/(1-m)||0,[o*100,h*100,u*100,m*100]};function d(n,a){return Math.pow(n[0]-a[0],2)+Math.pow(n[1]-a[1],2)+Math.pow(n[2]-a[2],2)}return b(d,"comparativeDistance"),s.rgb.keyword=function(n){var a=e[n];if(a)return a;var r=1/0,i;for(var o in l)if(l.hasOwnProperty(o)){var h=l[o],u=d(n,h);u<r&&(r=u,i=o)}return i},s.keyword.rgb=function(n){return l[n]},s.rgb.xyz=function(n){var a=n[0]/255,r=n[1]/255,i=n[2]/255;a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var o=a*.4124+r*.3576+i*.1805,h=a*.2126+r*.7152+i*.0722,u=a*.0193+r*.1192+i*.9505;return[o*100,h*100,u*100]},s.rgb.lab=function(n){var a=s.rgb.xyz(n),r=a[0],i=a[1],o=a[2],h,u,m;return r/=95.047,i/=100,o/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,h=116*i-16,u=500*(r-i),m=200*(i-o),[h,u,m]},s.hsl.rgb=function(n){var a=n[0]/360,r=n[1]/100,i=n[2]/100,o,h,u,m,y;if(r===0)return y=i*255,[y,y,y];i<.5?h=i*(1+r):h=i+r-i*r,o=2*i-h,m=[0,0,0];for(var g=0;g<3;g++)u=a+1/3*-(g-1),u<0&&u++,u>1&&u--,6*u<1?y=o+(h-o)*6*u:2*u<1?y=h:3*u<2?y=o+(h-o)*(2/3-u)*6:y=o,m[g]=y*255;return m},s.hsl.hsv=function(n){var a=n[0],r=n[1]/100,i=n[2]/100,o=r,h=Math.max(i,.01),u,m;return i*=2,r*=i<=1?i:2-i,o*=h<=1?h:2-h,m=(i+r)/2,u=i===0?2*o/(h+o):2*r/(i+r),[a,u*100,m*100]},s.hsv.rgb=function(n){var a=n[0]/60,r=n[1]/100,i=n[2]/100,o=Math.floor(a)%6,h=a-Math.floor(a),u=255*i*(1-r),m=255*i*(1-r*h),y=255*i*(1-r*(1-h));switch(i*=255,o){case 0:return[i,y,u];case 1:return[m,i,u];case 2:return[u,i,y];case 3:return[u,m,i];case 4:return[y,u,i];case 5:return[i,u,m]}},s.hsv.hsl=function(n){var a=n[0],r=n[1]/100,i=n[2]/100,o=Math.max(i,.01),h,u,m;return m=(2-r)*i,h=(2-r)*o,u=r*o,u/=h<=1?h:2-h,u=u||0,m/=2,[a,u*100,m*100]},s.hwb.rgb=function(n){var a=n[0]/360,r=n[1]/100,i=n[2]/100,o=r+i,h,u,m,y;o>1&&(r/=o,i/=o),h=Math.floor(6*a),u=1-i,m=6*a-h,h&1&&(m=1-m),y=r+m*(u-r);var g,w,x;switch(h){default:case 6:case 0:g=u,w=y,x=r;break;case 1:g=y,w=u,x=r;break;case 2:g=r,w=u,x=y;break;case 3:g=r,w=y,x=u;break;case 4:g=y,w=r,x=u;break;case 5:g=u,w=r,x=y;break}return[g*255,w*255,x*255]},s.cmyk.rgb=function(n){var a=n[0]/100,r=n[1]/100,i=n[2]/100,o=n[3]/100,h,u,m;return h=1-Math.min(1,a*(1-o)+o),u=1-Math.min(1,r*(1-o)+o),m=1-Math.min(1,i*(1-o)+o),[h*255,u*255,m*255]},s.xyz.rgb=function(n){var a=n[0]/100,r=n[1]/100,i=n[2]/100,o,h,u;return o=a*3.2406+r*-1.5372+i*-.4986,h=a*-.9689+r*1.8758+i*.0415,u=a*.0557+r*-.204+i*1.057,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:h*12.92,u=u>.0031308?1.055*Math.pow(u,1/2.4)-.055:u*12.92,o=Math.min(Math.max(0,o),1),h=Math.min(Math.max(0,h),1),u=Math.min(Math.max(0,u),1),[o*255,h*255,u*255]},s.xyz.lab=function(n){var a=n[0],r=n[1],i=n[2],o,h,u;return a/=95.047,r/=100,i/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*r-16,h=500*(a-r),u=200*(r-i),[o,h,u]},s.lab.xyz=function(n){var a=n[0],r=n[1],i=n[2],o,h,u;h=(a+16)/116,o=r/500+h,u=h-i/200;var m=Math.pow(h,3),y=Math.pow(o,3),g=Math.pow(u,3);return h=m>.008856?m:(h-16/116)/7.787,o=y>.008856?y:(o-16/116)/7.787,u=g>.008856?g:(u-16/116)/7.787,o*=95.047,h*=100,u*=108.883,[o,h,u]},s.lab.lch=function(n){var a=n[0],r=n[1],i=n[2],o,h,u;return o=Math.atan2(i,r),h=o*360/2/Math.PI,h<0&&(h+=360),u=Math.sqrt(r*r+i*i),[a,u,h]},s.lch.lab=function(n){var a=n[0],r=n[1],i=n[2],o,h,u;return u=i/360*2*Math.PI,o=r*Math.cos(u),h=r*Math.sin(u),[a,o,h]},s.rgb.ansi16=function(n){var a=n[0],r=n[1],i=n[2],o=1 in arguments?arguments[1]:s.rgb.hsv(n)[2];if(o=Math.round(o/50),o===0)return 30;var h=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(a/255));return o===2&&(h+=60),h},s.hsv.ansi16=function(n){return s.rgb.ansi16(s.hsv.rgb(n),n[2])},s.rgb.ansi256=function(n){var a=n[0],r=n[1],i=n[2];if(a===r&&r===i)return a<8?16:a>248?231:Math.round((a-8)/247*24)+232;var o=16+36*Math.round(a/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return o},s.ansi16.rgb=function(n){var a=n%10;if(a===0||a===7)return n>50&&(a+=3.5),a=a/10.5*255,[a,a,a];var r=(~~(n>50)+1)*.5,i=(a&1)*r*255,o=(a>>1&1)*r*255,h=(a>>2&1)*r*255;return[i,o,h]},s.ansi256.rgb=function(n){if(n>=232){var a=(n-232)*10+8;return[a,a,a]}n-=16;var r,i=Math.floor(n/36)/5*255,o=Math.floor((r=n%36)/6)/5*255,h=r%6/5*255;return[i,o,h]},s.rgb.hex=function(n){var a=((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255),r=a.toString(16).toUpperCase();return"000000".substring(r.length)+r},s.hex.rgb=function(n){var a=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!a)return[0,0,0];var r=a[0];a[0].length===3&&(r=r.split("").map(function(m){return m+m}).join(""));var i=parseInt(r,16),o=i>>16&255,h=i>>8&255,u=i&255;return[o,h,u]},s.rgb.hcg=function(n){var a=n[0]/255,r=n[1]/255,i=n[2]/255,o=Math.max(Math.max(a,r),i),h=Math.min(Math.min(a,r),i),u=o-h,m,y;return u<1?m=h/(1-u):m=0,u<=0?y=0:o===a?y=(r-i)/u%6:o===r?y=2+(i-a)/u:y=4+(a-r)/u+4,y/=6,y%=1,[y*360,u*100,m*100]},s.hsl.hcg=function(n){var a=n[1]/100,r=n[2]/100,i=1,o=0;return r<.5?i=2*a*r:i=2*a*(1-r),i<1&&(o=(r-.5*i)/(1-i)),[n[0],i*100,o*100]},s.hsv.hcg=function(n){var a=n[1]/100,r=n[2]/100,i=a*r,o=0;return i<1&&(o=(r-i)/(1-i)),[n[0],i*100,o*100]},s.hcg.rgb=function(n){var a=n[0]/360,r=n[1]/100,i=n[2]/100;if(r===0)return[i*255,i*255,i*255];var o=[0,0,0],h=a%1*6,u=h%1,m=1-u,y=0;switch(Math.floor(h)){case 0:o[0]=1,o[1]=u,o[2]=0;break;case 1:o[0]=m,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=u;break;case 3:o[0]=0,o[1]=m,o[2]=1;break;case 4:o[0]=u,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=m}return y=(1-r)*i,[(r*o[0]+y)*255,(r*o[1]+y)*255,(r*o[2]+y)*255]},s.hcg.hsv=function(n){var a=n[1]/100,r=n[2]/100,i=a+r*(1-a),o=0;return i>0&&(o=a/i),[n[0],o*100,i*100]},s.hcg.hsl=function(n){var a=n[1]/100,r=n[2]/100,i=r*(1-a)+.5*a,o=0;return i>0&&i<.5?o=a/(2*i):i>=.5&&i<1&&(o=a/(2*(1-i))),[n[0],o*100,i*100]},s.hcg.hwb=function(n){var a=n[1]/100,r=n[2]/100,i=a+r*(1-a);return[n[0],(i-a)*100,(1-i)*100]},s.hwb.hcg=function(n){var a=n[1]/100,r=n[2]/100,i=1-r,o=i-a,h=0;return o<1&&(h=(i-o)/(1-o)),[n[0],o*100,h*100]},s.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]},s.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]},s.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]},s.gray.hsl=s.gray.hsv=function(n){return[0,0,n[0]]},s.gray.hwb=function(n){return[0,100,n[0]]},s.gray.cmyk=function(n){return[0,0,0,n[0]]},s.gray.lab=function(n){return[n[0],0,0]},s.gray.hex=function(n){var a=Math.round(n[0]/100*255)&255,r=(a<<16)+(a<<8)+a,i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i},s.rgb.gray=function(n){var a=(n[0]+n[1]+n[2])/3;return[a/255*100]},ae.exports}b(Te,"requireConversions");var ie,Ne;function ot(){if(Ne)return ie;Ne=1;var l=Te();function e(){for(var v={},p=Object.keys(l),d=p.length,n=0;n<d;n++)v[p[n]]={distance:-1,parent:null};return v}b(e,"buildGraph");function t(v){var p=e(),d=[v];for(p[v].distance=0;d.length;)for(var n=d.pop(),a=Object.keys(l[n]),r=a.length,i=0;i<r;i++){var o=a[i],h=p[o];h.distance===-1&&(h.distance=p[n].distance+1,h.parent=n,d.unshift(o))}return p}b(t,"deriveBFS");function s(v,p){return function(d){return p(v(d))}}b(s,"link");function f(v,p){for(var d=[p[v].parent,v],n=l[p[v].parent][v],a=p[v].parent;p[a].parent;)d.unshift(p[a].parent),n=s(l[p[a].parent][a],n),a=p[a].parent;return n.conversion=d,n}return b(f,"wrapConversion"),ie=b(function(v){for(var p=t(v),d={},n=Object.keys(p),a=n.length,r=0;r<a;r++){var i=n[r],o=p[i];o.parent!==null&&(d[i]=f(i,p))}return d},"route"),ie}b(ot,"requireRoute");var ue,Oe;function ct(){if(Oe)return ue;Oe=1;var l=Te(),e=ot(),t={},s=Object.keys(l);function f(p){var d=b(function(n){return n==null?n:(arguments.length>1&&(n=Array.prototype.slice.call(arguments)),p(n))},"wrappedFn");return"conversion"in p&&(d.conversion=p.conversion),d}b(f,"wrapRaw");function v(p){var d=b(function(n){if(n==null)return n;arguments.length>1&&(n=Array.prototype.slice.call(arguments));var a=p(n);if(typeof a=="object")for(var r=a.length,i=0;i<r;i++)a[i]=Math.round(a[i]);return a},"wrappedFn");return"conversion"in p&&(d.conversion=p.conversion),d}return b(v,"wrapRounded"),s.forEach(function(p){t[p]={},Object.defineProperty(t[p],"channels",{value:l[p].channels}),Object.defineProperty(t[p],"labels",{value:l[p].labels});var d=e(p),n=Object.keys(d);n.forEach(function(a){var r=d[a];t[p][a]=v(r),t[p][a].raw=f(r)})}),ue=t,ue}b(ct,"requireColorConvert"),H.exports;var ke;function lt(){return ke||(ke=1,function(l){const e=ct(),t=b((p,d)=>function(){return`\x1B[${p.apply(e,arguments)+d}m`},"wrapAnsi16"),s=b((p,d)=>function(){const n=p.apply(e,arguments);return`\x1B[${38+d};5;${n}m`},"wrapAnsi256"),f=b((p,d)=>function(){const n=p.apply(e,arguments);return`\x1B[${38+d};2;${n[0]};${n[1]};${n[2]}m`},"wrapAnsi16m");function v(){const p=new Map,d={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]}};d.color.grey=d.color.gray;for(const r of Object.keys(d)){const i=d[r];for(const o of Object.keys(i)){const h=i[o];d[o]={open:`\x1B[${h[0]}m`,close:`\x1B[${h[1]}m`},i[o]=d[o],p.set(h[0],h[1])}Object.defineProperty(d,r,{value:i,enumerable:!1}),Object.defineProperty(d,"codes",{value:p,enumerable:!1})}const n=b(r=>r,"ansi2ansi"),a=b((r,i,o)=>[r,i,o],"rgb2rgb");d.color.close="\x1B[39m",d.bgColor.close="\x1B[49m",d.color.ansi={ansi:t(n,0)},d.color.ansi256={ansi256:s(n,0)},d.color.ansi16m={rgb:f(a,0)},d.bgColor.ansi={ansi:t(n,10)},d.bgColor.ansi256={ansi256:s(n,10)},d.bgColor.ansi16m={rgb:f(a,10)};for(let r of Object.keys(e)){if(typeof e[r]!="object")continue;const i=e[r];r==="ansi16"&&(r="ansi"),"ansi16"in i&&(d.color.ansi[r]=t(i.ansi16,0),d.bgColor.ansi[r]=t(i.ansi16,10)),"ansi256"in i&&(d.color.ansi256[r]=s(i.ansi256,0),d.bgColor.ansi256[r]=s(i.ansi256,10)),"rgb"in i&&(d.color.ansi16m[r]=f(i.rgb,0),d.bgColor.ansi16m[r]=f(i.rgb,10))}return d}b(v,"assembleStyles"),Object.defineProperty(l,"exports",{enumerable:!0,get:v})}(H)),H.exports}b(lt,"requireAnsiStyles");var oe,Re;function ft(){return Re||(Re=1,oe=b((l,e)=>{e=e||process.argv;const t=l.startsWith("-")?"":l.length===1?"-":"--",s=e.indexOf(t+l),f=e.indexOf("--");return s!==-1&&(f===-1?!0:s<f)},"hasFlag")),oe}b(ft,"requireHasFlag");var ce,De;function pt(){if(De)return ce;De=1;const l=Je,e=ft(),t=process.env;let s;e("no-color")||e("no-colors")||e("color=false")?s=!1:(e("color")||e("colors")||e("color=true")||e("color=always"))&&(s=!0),"FORCE_COLOR"in t&&(s=t.FORCE_COLOR.length===0||parseInt(t.FORCE_COLOR,10)!==0);function f(d){return d===0?!1:{level:d,hasBasic:!0,has256:d>=2,has16m:d>=3}}b(f,"translateLevel");function v(d){if(s===!1)return 0;if(e("color=16m")||e("color=full")||e("color=truecolor"))return 3;if(e("color=256"))return 2;if(d&&!d.isTTY&&s!==!0)return 0;const n=s?1:0;if(process.platform==="win32"){const a=l.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in t)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(a=>a in t)||t.CI_NAME==="codeship"?1:n;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 a=parseInt((t.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(t.TERM_PROGRAM){case"iTerm.app":return a>=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",n)}b(v,"supportsColor");function p(d){const n=v(d);return f(n)}return b(p,"getSupportLevel"),ce={supportsColor:p,stdout:p(process.stdout),stderr:p(process.stderr)},ce}b(pt,"requireSupportsColor");var le,Me;function dt(){if(Me)return le;Me=1;const l=/(?:\\(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$/,s=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,f=new Map([["n",`
|
|
2
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function v(a){return a[0]==="u"&&a.length===5||a[0]==="x"&&a.length===3?String.fromCharCode(parseInt(a.slice(1),16)):f.get(a)||a}b(v,"unescape");function p(a,r){const i=[],o=r.trim().split(/\s*,\s*/g);let h;for(const u of o)if(!isNaN(u))i.push(Number(u));else if(h=u.match(t))i.push(h[2].replace(s,(m,y,g)=>y?v(y):g));else throw new Error(`Invalid Chalk template style argument: ${u} (in style '${a}')`);return i}b(p,"parseArguments");function d(a){e.lastIndex=0;const r=[];let i;for(;(i=e.exec(a))!==null;){const o=i[1];if(i[2]){const h=p(o,i[2]);r.push([o].concat(h))}else r.push([o])}return r}b(d,"parseStyle");function n(a,r){const i={};for(const h of r)for(const u of h.styles)i[u[0]]=h.inverse?null:u.slice(1);let o=a;for(const h of Object.keys(i))if(Array.isArray(i[h])){if(!(h in o))throw new Error(`Unknown Chalk style: ${h}`);i[h].length>0?o=o[h].apply(o,i[h]):o=o[h]}return o}return b(n,"buildStyle"),le=b((a,r)=>{const i=[],o=[];let h=[];if(r.replace(l,(u,m,y,g,w,x)=>{if(m)h.push(v(m));else if(g){const S=h.join("");h=[],o.push(i.length===0?S:n(a,i)(S)),i.push({inverse:y,styles:d(g)})}else if(w){if(i.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(n(a,i)(h.join(""))),h=[],i.pop()}else h.push(x)}),o.push(h.join("")),i.length>0){const u=`Chalk template literal is missing ${i.length} closing bracket${i.length===1?"":"s"} (\`}\`)`;throw new Error(u)}return o.join("")},"templates"),le}b(dt,"requireTemplates");var Ie;function mt(){return Ie||(Ie=1,function(l){const e=it(),t=lt(),s=pt().stdout,f=dt(),v=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),p=["ansi","ansi","ansi256","ansi16m"],d=new Set(["gray"]),n=Object.create(null);function a(m,y){y=y||{};const g=s?s.level:0;m.level=y.level===void 0?g:y.level,m.enabled="enabled"in y?y.enabled:m.level>0}b(a,"applyOptions");function r(m){if(!this||!(this instanceof r)||this.template){const y={};return a(y,m),y.template=function(){const g=[].slice.call(arguments);return u.apply(null,[y.template].concat(g))},Object.setPrototypeOf(y,r.prototype),Object.setPrototypeOf(y.template,y),y.template.constructor=r,y.template}a(this,m)}b(r,"Chalk"),v&&(t.blue.open="\x1B[94m");for(const m of Object.keys(t))t[m].closeRe=new RegExp(e(t[m].close),"g"),n[m]={get(){const y=t[m];return o.call(this,this._styles?this._styles.concat(y):[y],this._empty,m)}};n.visible={get(){return o.call(this,this._styles||[],!0,"visible")}},t.color.closeRe=new RegExp(e(t.color.close),"g");for(const m of Object.keys(t.color.ansi))d.has(m)||(n[m]={get(){const y=this.level;return function(){const w={open:t.color[p[y]][m].apply(null,arguments),close:t.color.close,closeRe:t.color.closeRe};return o.call(this,this._styles?this._styles.concat(w):[w],this._empty,m)}}});t.bgColor.closeRe=new RegExp(e(t.bgColor.close),"g");for(const m of Object.keys(t.bgColor.ansi)){if(d.has(m))continue;const y="bg"+m[0].toUpperCase()+m.slice(1);n[y]={get(){const g=this.level;return function(){const x={open:t.bgColor[p[g]][m].apply(null,arguments),close:t.bgColor.close,closeRe:t.bgColor.closeRe};return o.call(this,this._styles?this._styles.concat(x):[x],this._empty,m)}}}}const i=Object.defineProperties(()=>{},n);function o(m,y,g){const w=b(function(){return h.apply(w,arguments)},"builder");w._styles=m,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||g==="gray"||g==="grey",w.__proto__=i,w}b(o,"build");function h(){const m=arguments,y=m.length;let g=String(arguments[0]);if(y===0)return"";if(y>1)for(let x=1;x<y;x++)g+=" "+m[x];if(!this.enabled||this.level<=0||!g)return this._empty?"":g;const w=t.dim.open;v&&this.hasGrey&&(t.dim.open="");for(const x of this._styles.slice().reverse())g=x.open+g.replace(x.closeRe,x.open)+x.close,g=g.replace(/\r?\n/g,`${x.close}$&${x.open}`);return t.dim.open=w,g}b(h,"applyStyle");function u(m,y){if(!Array.isArray(y))return[].slice.call(arguments,1).join(" ");const g=[].slice.call(arguments,2),w=[y.raw[0]];for(let x=1;x<y.length;x++)w.push(String(g[x-1]).replace(/[{}\\]/g,"\\$&")),w.push(String(y.raw[x]));return f(m,w.join(""))}b(u,"chalkTag"),Object.defineProperties(r.prototype,n),l.exports=r(),l.exports.supportsColor=s,l.exports.default=l.exports}(re)),re.exports}b(mt,"requireChalk");var Fe;function ht(){if(Fe)return A;Fe=1,Object.defineProperty(A,"__esModule",{value:!0}),A.default=y,A.shouldHighlight=h;var l=tt(),e=at(),t=f(we(),!0);function s(g){if(typeof WeakMap!="function")return null;var w=new WeakMap,x=new WeakMap;return(s=b(function(S){return S?x:w},"_getRequireWildcardCache"))(g)}b(s,"_getRequireWildcardCache");function f(g,w){if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var x=s(w);if(x&&x.has(g))return x.get(g);var S={__proto__:null},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in g)if(C!=="default"&&{}.hasOwnProperty.call(g,C)){var T=E?Object.getOwnPropertyDescriptor(g,C):null;T&&(T.get||T.set)?Object.defineProperty(S,C,T):S[C]=g[C]}return S.default=g,x&&x.set(g,S),S}b(f,"_interopRequireWildcard");const v=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,t.createColors)(!1):t.default,p=b((g,w)=>x=>g(w(x)),"compose"),d=new Set(["as","async","from","get","of","set"]);function n(g){return{keyword:g.cyan,capitalized:g.yellow,jsxIdentifier:g.yellow,punctuator:g.yellow,number:g.magenta,string:g.green,regex:g.magenta,comment:g.gray,invalid:p(p(g.white,g.bgRed),g.bold)}}b(n,"getDefs");const a=/\r\n|[\n\r\u2028\u2029]/,r=/^[()[\]{}]$/;let i;{const g=/^[a-z][\w-]*$/i,w=b(function(x,S,E){if(x.type==="name"){if((0,e.isKeyword)(x.value)||(0,e.isStrictReservedWord)(x.value,!0)||d.has(x.value))return"keyword";if(g.test(x.value)&&(E[S-1]==="<"||E.slice(S-2,S)==="</"))return"jsxIdentifier";if(x.value[0]!==x.value[0].toLowerCase())return"capitalized"}return x.type==="punctuator"&&r.test(x.value)?"bracket":x.type==="invalid"&&(x.value==="@"||x.value==="#")?"punctuator":x.type},"getTokenType");i=b(function*(x){let S;for(;S=l.default.exec(x);){const E=l.matchToToken(S);yield{type:w(E,S.index,x),value:E.value}}},"tokenize")}function o(g,w){let x="";for(const{type:S,value:E}of i(w)){const C=g[S];C?x+=E.split(a).map(T=>C(T)).join(`
|
|
3
|
-
`):x+=E}return x}b(o,"highlightTokens");function h(g){return v.isColorSupported||g.forceColor}b(h,"shouldHighlight");let u;function m(g){if(g){var w;return(w=u)!=null||(u=(0,t.createColors)(!0)),u}return v}b(m,"getColors");function y(g,w={}){if(g!==""&&h(w)){const x=n(m(w.forceColor));return o(x,g)}else return g}b(y,"highlight");{let g,w;A.getChalk=({forceColor:x})=>{var S;if((S=g)!=null||(g=mt()),x){var E;return(E=w)!=null||(w=new g.constructor({enabled:!0,level:1})),w}return g}}return A}b(ht,"requireLib$1");var Pe;function bt(){if(Pe)return K;Pe=1,Object.defineProperty(K,"__esModule",{value:!0}),K.codeFrameColumns=o,K.default=h;var l=ht(),e=s(we(),!0);function t(u){if(typeof WeakMap!="function")return null;var m=new WeakMap,y=new WeakMap;return(t=b(function(g){return g?y:m},"_getRequireWildcardCache"))(u)}b(t,"_getRequireWildcardCache");function s(u,m){if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var y=t(m);if(y&&y.has(u))return y.get(u);var g={__proto__:null},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in u)if(x!=="default"&&Object.prototype.hasOwnProperty.call(u,x)){var S=w?Object.getOwnPropertyDescriptor(u,x):null;S&&(S.get||S.set)?Object.defineProperty(g,x,S):g[x]=u[x]}return g.default=u,y&&y.set(u,g),g}b(s,"_interopRequireWildcard");const f=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,e.createColors)(!1):e.default,v=b((u,m)=>y=>u(m(y)),"compose");let p;function d(u){if(u){var m;return(m=p)!=null||(p=(0,e.createColors)(!0)),p}return f}b(d,"getColors");let n=!1;function a(u){return{gutter:u.gray,marker:v(u.red,u.bold),message:v(u.red,u.bold)}}b(a,"getDefs");const r=/\r\n|[\n\r\u2028\u2029]/;function i(u,m,y){const g=Object.assign({column:0,line:-1},u.start),w=Object.assign({},g,u.end),{linesAbove:x=2,linesBelow:S=3}=y||{},E=g.line,C=g.column,T=w.line,D=w.column;let _=Math.max(E-(x+1),0),q=Math.min(m.length,T+S);E===-1&&(_=0),T===-1&&(q=m.length);const z=T-E,I={};if(z)for(let M=0;M<=z;M++){const F=M+E;if(!C)I[F]=!0;else if(M===0){const $=m[F-1].length;I[F]=[C,$-C+1]}else if(M===z)I[F]=[0,D];else{const $=m[F-M].length;I[F]=[0,$]}}else C===D?C?I[E]=[C,0]:I[E]=!0:I[E]=[C,D-C];return{start:_,end:q,markerLines:I}}b(i,"getMarkerLines");function o(u,m,y={}){const g=(y.highlightCode||y.forceColor)&&(0,l.shouldHighlight)(y),w=d(y.forceColor),x=a(w),S=b((M,F)=>g?M(F):F,"maybeHighlight"),E=u.split(r),{start:C,end:T,markerLines:D}=i(m,E,y),_=m.start&&typeof m.start.column=="number",q=String(T).length;let I=(g?(0,l.default)(u,y):u).split(r,T).slice(C,T).map((M,F)=>{const $=C+1+F,Q=` ${` ${$}`.slice(-q)} |`,V=D[$],ze=!D[$+1];if(V){let Z="";if(Array.isArray(V)){const Ve=M.slice(0,Math.max(V[0]-1,0)).replace(/[^\t]/g," "),Ue=V[1]||1;Z=[`
|
|
4
|
-
`,S(x.gutter,Q.replace(/\d/g," "))," ",Ve,S(x.marker,"^").repeat(Ue)].join(""),ze&&y.message&&(Z+=" "+S(x.message,y.message))}return[S(x.marker,">"),S(x.gutter,Q),M.length>0?` ${M}`:"",Z].join("")}else return` ${S(x.gutter,Q)}${M.length>0?` ${M}`:""}`}).join(`
|
|
5
|
-
`);return y.message&&!_&&(I=`${" ".repeat(q+1)}${y.message}
|
|
6
|
-
${I}`),g?w.reset(I):I}b(o,"codeFrameColumns");function h(u,m,y,g={}){if(!n){n=!0;const x="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(x,"DeprecationWarning");else{const S=new Error(x);S.name="DeprecationWarning",console.warn(new Error(x))}}return y=Math.max(y,0),o(u,{start:{column:y,line:m}},g)}return b(h,"_default"),K}b(bt,"requireLib"),bt();function gt(l){return{...l,compilerOptions:l.compilerOptions??{},respectExternal:l.respectExternal??!1}}b(gt,"resolveDefaultOptions");const X=/\.d\.(c|m)?tsx?$/,_e=".d.ts",fe={getCurrentDirectory:b(()=>c.ts.sys.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:b(()=>c.ts.sys.newLine,"getNewLine"),getCanonicalFileName:c.ts.sys.useCaseSensitiveFileNames?l=>l:l=>l.toLowerCase()},yt={declaration:!0,noEmit:!1,emitDeclarationOnly:!0,noEmitOnError:!0,checkJs:!1,declarationMap:!1,skipLibCheck:!0,preserveSymlinks:!0,target:c.ts.ScriptTarget.ESNext},G=new Map,B=b((...l)=>process.env.DTS_LOG_CACHE?console.log("[cache]",...l):null,"logCache");function $e([l,e],t){for(B(l),G.set(l,t);l!==e&&l!==O.dirname(l);){if(l=O.dirname(l),B("up",l),G.has(l))return B("has",l);G.set(l,t)}}b($e,"cacheConfig");function pe(l,e,t){const s={...yt,...e};let f=O.dirname(l),v=[];const p=t||f;if(G.has(p))B("HIT",p);else{B("miss",p);const r=t?O.resolve(process.cwd(),t):c.ts.findConfigFile(f,c.ts.sys.fileExists);if(!r)return{dtsFiles:v,dirName:f,compilerOptions:s};let i=f;f=O.dirname(r);const{config:o,error:h}=c.ts.readConfigFile(r,c.ts.sys.readFile);if(h)return console.error(c.ts.formatDiagnostic(h,fe)),{dtsFiles:v,dirName:f,compilerOptions:s};B("tsconfig",o);const u=c.ts.parseJsonConfigFileContent(o,c.ts.sys,f);$e(t?[t,t]:[i,f],u)}const{fileNames:d,options:n,errors:a}=G.get(p);return v=d.filter(r=>X.test(r)),a.length?(console.error(c.ts.formatDiagnostics(a,fe)),{dtsFiles:v,dirName:f,compilerOptions:s}):{dtsFiles:v,dirName:f,compilerOptions:{...n,...s}}}b(pe,"getCompilerOptions");function vt(l,e,t){const{dtsFiles:s,compilerOptions:f}=pe(l,e,t);return c.ts.createProgram([l].concat(Array.from(s)),f,c.ts.createCompilerHost(f,!0))}b(vt,"createProgram$1");function xt(l,e,t){const s=[];let f=[],v=new Set,p="",d={};for(let n of l){if(X.test(n))continue;n=O.resolve(n);const a=pe(n,e,t);if(a.dtsFiles.forEach(v.add,v),!f.length){f.push(n),{dirName:p,compilerOptions:d}=a;continue}if(a.dirName===p)f.push(n);else{const r=c.ts.createCompilerHost(d,!0),i=c.ts.createProgram(f.concat(Array.from(v)),d,r);s.push(i),f=[n],{dirName:p,compilerOptions:d}=a}}if(f.length){const n=c.ts.createCompilerHost(d,!0),a=c.ts.createProgram(f.concat(Array.from(v)),d,n);s.push(a)}return s}b(xt,"createPrograms");function wt(){let l;try{return{codeFrameColumns:l}=c.require("@babel/code-frame"),l}catch{try{return{codeFrameColumns:l}=Qe.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:ee&&ee.tagName.toUpperCase()==="SCRIPT"&&ee.src||new URL("rollup-plugin-dts-wFwILfkI.js",document.baseURI).href)("@babel/code-frame"),l}catch{}}}b(wt,"getCodeFrame");function St(l){const e=l.getSourceFile(),t=e.getLineAndCharacterOfPosition(l.getStart()),s=e.getLineAndCharacterOfPosition(l.getEnd());return{start:{line:t.line+1,column:t.character+1},end:{line:s.line+1,column:s.character+1}}}b(St,"getLocation");function Ct(l){const e=wt(),s=l.getSourceFile().getFullText(),f=St(l);return e?`
|
|
7
|
-
`+e(s,f,{highlightCode:!0}):`
|
|
8
|
-
${f.start.line}:${f.start.column}: \`${l.getFullText().trim()}\``}b(Ct,"frameNode");class N extends Error{static{b(this,"UnsupportedSyntaxError")}constructor(e,t="Syntax not yet supported"){super(`${t}
|
|
9
|
-
${Ct(e)}`)}}class Et{static{b(this,"NamespaceFixer")}constructor(e){this.sourceFile=e}findNamespaces(){const e=[],t={};for(const s of this.sourceFile.statements){const f={start:s.getStart(),end:s.getEnd()};if(c.ts.isEmptyStatement(s)){e.unshift({name:"",exports:[],location:f});continue}if((c.ts.isImportDeclaration(s)||c.ts.isExportDeclaration(s))&&s.moduleSpecifier&&c.ts.isStringLiteral(s.moduleSpecifier)){let{text:r}=s.moduleSpecifier;if(r.startsWith(".")&&(r.endsWith(".d.ts")||r.endsWith(".d.cts")||r.endsWith(".d.mts"))){let i=s.moduleSpecifier.getStart()+1,o=s.moduleSpecifier.getEnd()-1;e.unshift({name:"",exports:[],location:{start:i,end:o},textBeforeCodeAfter:r.replace(/\.d\.ts$/,".js").replace(/\.d\.cts$/,".cjs").replace(/\.d\.mts$/,".mjs")})}}if(c.ts.isModuleDeclaration(s)&&s.body&&c.ts.isModuleBlock(s.body)){for(const r of s.body.statements)if(c.ts.isExportDeclaration(r)&&r.exportClause){if(c.ts.isNamespaceExport(r.exportClause))continue;for(const i of r.exportClause.elements)i.propertyName&&i.propertyName.getText()==i.name.getText()&&e.unshift({name:"",exports:[],location:{start:i.propertyName.getEnd(),end:i.name.getEnd()}})}}if(c.ts.isClassDeclaration(s)?t[s.name.getText()]={type:"class",generics:s.typeParameters}:c.ts.isFunctionDeclaration(s)?t[s.name.getText()]={type:"function"}:c.ts.isInterfaceDeclaration(s)?t[s.name.getText()]={type:"interface",generics:s.typeParameters}:c.ts.isTypeAliasDeclaration(s)?t[s.name.getText()]={type:"type",generics:s.typeParameters}:c.ts.isModuleDeclaration(s)&&c.ts.isIdentifier(s.name)?t[s.name.getText()]={type:"namespace"}:c.ts.isEnumDeclaration(s)&&(t[s.name.getText()]={type:"enum"}),!c.ts.isVariableStatement(s))continue;const{declarations:v}=s.declarationList;if(v.length!==1)continue;const p=v[0],d=p.name.getText();if(!p.initializer||!c.ts.isCallExpression(p.initializer)){t[d]={type:"var"};continue}const n=p.initializer.arguments[0];if(!p.initializer.expression.getFullText().includes("/*#__PURE__*/Object.freeze")||!c.ts.isObjectLiteralExpression(n))continue;const a=[];for(const r of n.properties){if(!c.ts.isPropertyAssignment(r)||!(c.ts.isIdentifier(r.name)||c.ts.isStringLiteral(r.name))||r.name.text!=="__proto__"&&!c.ts.isIdentifier(r.initializer))throw new N(r,"Expected a property assignment");r.name.text!=="__proto__"&&a.push({exportedName:r.name.text,localName:r.initializer.getText()})}e.unshift({name:d,exports:a,location:f})}return{namespaces:e,itemTypes:t}}fix(){let e=this.sourceFile.getFullText();const{namespaces:t,itemTypes:s}=this.findNamespaces();for(const f of t){const v=e.slice(f.location.end);e=e.slice(0,f.location.start);for(const{exportedName:p,localName:d}of f.exports)if(p===d){const{type:n,generics:a}=s[d]||{};if(n==="interface"||n==="type"){const r=je(a);e+=`type ${f.name}_${p}${r.in} = ${d}${r.out};
|
|
10
|
-
`}else if(n==="enum"||n==="class"){const r=je(a);e+=`type ${f.name}_${p}${r.in} = ${d}${r.out};
|
|
11
|
-
`,e+=`declare const ${f.name}_${p}: typeof ${d};
|
|
12
|
-
`}else e+=`declare const ${f.name}_${p}: typeof ${d};
|
|
13
|
-
`}if(f.name){e+=`declare namespace ${f.name} {
|
|
14
|
-
`,e+=` export {
|
|
15
|
-
`;for(const{exportedName:p,localName:d}of f.exports)p===d?e+=` ${f.name}_${p} as ${p},
|
|
16
|
-
`:e+=` ${d} as ${p},
|
|
17
|
-
`;e+=` };
|
|
18
|
-
`,e+="}"}e+=f.textBeforeCodeAfter??"",e+=v}return e}}function je(l){return!l||!l.length?{in:"",out:""}:{in:`<${l.map(e=>e.getText()).join(", ")}>`,out:`<${l.map(e=>e.name.getText()).join(", ")}>`}}b(je,"renderTypeParams");let Ae=1;function Tt(l){return k({type:"Program",sourceType:"module",body:[]},{start:l.getFullStart(),end:l.getEnd()})}b(Tt,"createProgram");function Nt(l){const e={type:"Identifier",name:String(Ae++)};return{ident:e,expr:{type:"AssignmentPattern",left:e,right:l}}}b(Nt,"createReference");function R(l){return k({type:"Identifier",name:l.getText()},l)}b(R,"createIdentifier");function Ot(l){const e=k({type:"FunctionExpression",id:null,params:[],body:{type:"BlockStatement",body:[]}},l),t=k({type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:String(Ae++)},arguments:[e],optional:!1}},l);return{fn:e,iife:t}}b(Ot,"createIIFE");function kt(){const l={type:"ArrayExpression",elements:[]};return{expr:l,stmt:{type:"ReturnStatement",argument:l}}}b(kt,"createReturn");function Rt(l,e){return k({type:"FunctionDeclaration",id:k({type:"Identifier",name:c.ts.idText(l)},l),params:[],body:{type:"BlockStatement",body:[]}},e)}b(Rt,"createDeclaration");function j(l){if(c.ts.isLiteralExpression(l))return{type:"Literal",value:l.text};if(c.ts.isPropertyAccessExpression(l)){if(c.ts.isPrivateIdentifier(l.name))throw new N(l.name);return k({type:"MemberExpression",computed:!1,optional:!1,object:j(l.expression),property:j(l.name)},{start:l.expression.getStart(),end:l.name.getEnd()})}if(c.ts.isIdentifier(l))return R(l);if(l.kind==c.ts.SyntaxKind.NullKeyword)return{type:"Literal",value:null};throw new N(l)}b(j,"convertExpression");function k(l,e){let t="start"in e?e:{start:e.getStart(),end:e.getEnd()};return Object.assign(l,t)}b(k,"withStartEnd");function Y(l,e){return(c.ts.getCombinedModifierFlags(l)&e)===e}b(Y,"matchesModifier");function Dt({sourceFile:l}){const e=new Ze(l.getFullText()),t=new Set,s=new Set;let f="";const v=new Map,p=new Map;for(const u of l.statements){if(c.ts.isEmptyStatement(u)){e.remove(u.getStart(),u.getEnd());continue}if(c.ts.isEnumDeclaration(u)||c.ts.isFunctionDeclaration(u)||c.ts.isInterfaceDeclaration(u)||c.ts.isClassDeclaration(u)||c.ts.isTypeAliasDeclaration(u)||c.ts.isModuleDeclaration(u)){if(u.name){const m=u.name.getText();t.add(m),Y(u,c.ts.ModifierFlags.ExportDefault)?f=m:Y(u,c.ts.ModifierFlags.Export)&&s.add(m),u.flags&c.ts.NodeFlags.GlobalAugmentation||h(m,[de(u),Be(u)])}c.ts.isModuleDeclaration(u)&&Mt(e,u),Le(e,u)}else if(c.ts.isVariableStatement(u)){const{declarations:m}=u.declarationList,y=Y(u,c.ts.ModifierFlags.Export);for(const C of u.declarationList.declarations)if(c.ts.isIdentifier(C.name)){const T=C.name.getText();t.add(T),y&&s.add(T)}if(Le(e,u),m.length==1){const C=m[0];c.ts.isIdentifier(C.name)&&h(C.name.getText(),[de(u),Be(u)])}else{const C=m.slice(),T=C.shift();h(T.name.getText(),[de(u),T.getEnd()]);for(const D of C)c.ts.isIdentifier(D.name)&&h(D.name.getText(),[D.getFullStart(),D.getEnd()])}const{flags:g}=u.declarationList,x=`declare ${g&c.ts.NodeFlags.Let?"let":g&c.ts.NodeFlags.Const?"const":"var"} `,S=u.declarationList.getChildren().find(C=>C.kind===c.ts.SyntaxKind.SyntaxList).getChildren();let E=0;for(const C of S)if(C.kind===c.ts.SyntaxKind.CommaToken)E=C.getStart(),e.remove(E,C.getEnd());else if(E){e.appendLeft(E,`;
|
|
19
|
-
`);const T=C.getFullStart(),D=e.slice(T,C.getStart());let _=D.length-D.trimStart().length;_?e.overwrite(T,T+_,x):e.appendLeft(T,x)}}}for(const u of l.statements)if(r(u),!!Y(u,c.ts.ModifierFlags.ExportDefault)&&(c.ts.isFunctionDeclaration(u)||c.ts.isClassDeclaration(u))){if(u.name)continue;f||(f=o("export_default"));const m=u.getChildren(),y=m.findIndex(S=>S.kind===c.ts.SyntaxKind.ClassKeyword||S.kind===c.ts.SyntaxKind.FunctionKeyword),g=m[y],w=m[y+1];if(w.kind>=c.ts.SyntaxKind.FirstPunctuation&&w.kind<=c.ts.SyntaxKind.LastPunctuation){const S=e.slice(g.getEnd(),w.getStart())!=" ";e.appendLeft(w.getStart(),`${S?" ":""}${f}`)}else e.appendRight(g.getEnd(),` ${f}`)}for(const u of p.values()){const y=u.pop()[0];for(const g of u)e.move(g[0],g[1],y)}f&&e.append(`
|
|
20
|
-
export default ${f};
|
|
21
|
-
`),s.size&&e.append(`
|
|
22
|
-
export { ${[...s].join(", ")} };
|
|
23
|
-
`);for(const[u,m]of v.entries())e.prepend(`import * as ${m} from "${u}";
|
|
24
|
-
`);const d=l.getLineStarts(),n=new Set;for(const u of l.typeReferenceDirectives){n.add(u.fileName);const{line:m}=l.getLineAndCharacterOfPosition(u.pos),y=d[m];let g=l.getLineEndOfPosition(u.pos);e.slice(g,g+1)==`
|
|
25
|
-
`&&(g+=1),e.remove(y,g)}const a=new Set;for(const u of l.referencedFiles){a.add(u.fileName);const{line:m}=l.getLineAndCharacterOfPosition(u.pos),y=d[m];let g=l.getLineEndOfPosition(u.pos);e.slice(g,g+1)==`
|
|
26
|
-
`&&(g+=1),e.remove(y,g)}return{code:e,typeReferences:n,fileReferences:a};function r(u){if(c.ts.forEachChild(u,r),c.ts.isImportTypeNode(u)){if(!c.ts.isLiteralTypeNode(u.argument)||!c.ts.isStringLiteral(u.argument.literal))throw new N(u,"inline imports should have a literal argument");const m=u.argument.literal.text,y=u.getChildren(),g=y.find(E=>E.kind===c.ts.SyntaxKind.ImportKeyword).getStart();let w=u.getEnd();const x=y.find(E=>E.kind===c.ts.SyntaxKind.DotToken||E.kind===c.ts.SyntaxKind.LessThanToken);x&&(w=x.getStart());const S=i(m);e.overwrite(g,w,S)}}function i(u){let m=v.get(u);return m||(m=o(u.replace(/[^a-zA-Z0-9_$]/g,()=>"_")),v.set(u,m)),m}function o(u){let m=u;for(;t.has(m);)m=`_${m}`;return t.add(m),m}function h(u,m){let y=p.get(u);if(!y)y=[m],p.set(u,y);else{const g=y[y.length-1];g[1]===m[0]?g[1]=m[1]:y.push(m)}}}b(Dt,"preProcess");function Le(l,e){if(!c.ts.canHaveModifiers(e))return;let t=!1;const s=c.ts.isEnumDeclaration(e)||c.ts.isClassDeclaration(e)||c.ts.isFunctionDeclaration(e)||c.ts.isModuleDeclaration(e)||c.ts.isVariableStatement(e);for(const f of e.modifiers??[])switch(f.kind){case c.ts.SyntaxKind.ExportKeyword:case c.ts.SyntaxKind.DefaultKeyword:l.remove(f.getStart(),f.getEnd()+1);break;case c.ts.SyntaxKind.DeclareKeyword:t=!0}s&&!t&&l.appendRight(e.getStart(),"declare ")}b(Le,"fixModifiers");function Mt(l,e){if(!(!e.body||!c.ts.isModuleBlock(e.body))){for(const t of e.body.statements)if(c.ts.isExportDeclaration(t)&&t.exportClause){if(c.ts.isNamespaceExport(t.exportClause))continue;for(const s of t.exportClause.elements)s.propertyName||l.appendLeft(s.name.getEnd(),` as ${s.name.getText()}`)}}}b(Mt,"duplicateExports");function de(l){const e=l.getFullStart();return e+(qe(l,e)?1:0)}b(de,"getStart");function Be(l){const e=l.getEnd();return e+(qe(l,e)?1:0)}b(Be,"getEnd");function qe(l,e){return l.getSourceFile().getFullText()[e]==`
|
|
27
|
-
`}b(qe,"newlineAt");const It=new Set([c.ts.SyntaxKind.LiteralType,c.ts.SyntaxKind.VoidKeyword,c.ts.SyntaxKind.UnknownKeyword,c.ts.SyntaxKind.AnyKeyword,c.ts.SyntaxKind.BooleanKeyword,c.ts.SyntaxKind.NumberKeyword,c.ts.SyntaxKind.StringKeyword,c.ts.SyntaxKind.ObjectKeyword,c.ts.SyntaxKind.NullKeyword,c.ts.SyntaxKind.UndefinedKeyword,c.ts.SyntaxKind.SymbolKeyword,c.ts.SyntaxKind.NeverKeyword,c.ts.SyntaxKind.ThisKeyword,c.ts.SyntaxKind.ThisType,c.ts.SyntaxKind.BigIntKeyword]);class Ke{static{b(this,"DeclarationScope")}constructor({id:e,range:t}){if(this.scopes=[],e)this.declaration=Rt(e,t);else{const{iife:f,fn:v}=Ot(t);this.iife=f,this.declaration=v}const s=kt();this.declaration.body.body.push(s.stmt),this.returnExpr=s.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 v of this.scopes)if(v.has(t))return}if(t==="this")return;const{ident:s,expr:f}=Nt(e);this.declaration.params.push(f),this.returnExpr.elements.push(s)}pushIdentifierReference(e){this.pushReference(R(e))}convertEntityName(e){return c.ts.isIdentifier(e)?R(e):k({type:"MemberExpression",computed:!1,optional:!1,object:this.convertEntityName(e.left),property:R(e.right)},e)}convertPropertyAccess(e){if(!c.ts.isIdentifier(e.expression)&&!c.ts.isPropertyAccessExpression(e.expression))throw new N(e.expression);if(c.ts.isPrivateIdentifier(e.name))throw new N(e.name);let t=c.ts.isIdentifier(e.expression)?R(e.expression):this.convertPropertyAccess(e.expression);return k({type:"MemberExpression",computed:!1,optional:!1,object:t,property:R(e.name)},e)}convertComputedPropertyName(e){if(!e.name||!c.ts.isComputedPropertyName(e.name))return;const{expression:t}=e.name;if(!(c.ts.isLiteralExpression(t)||c.ts.isPrefixUnaryExpression(t))){if(c.ts.isIdentifier(t))return this.pushReference(R(t));if(c.ts.isPropertyAccessExpression(t))return this.pushReference(this.convertPropertyAccess(t));throw new N(t)}}convertParametersAndType(e){this.convertComputedPropertyName(e);const t=this.convertTypeParameters(e.typeParameters);for(const s of e.parameters)this.convertTypeNode(s.type);this.convertTypeNode(e.type),this.popScope(t)}convertHeritageClauses(e){for(const t of e.heritageClauses||[])for(const s of t.types)this.pushReference(j(s.expression)),this.convertTypeArguments(s)}convertTypeArguments(e){if(e.typeArguments)for(const t of e.typeArguments)this.convertTypeNode(t)}convertMembers(e){for(const t of e){if(c.ts.isPropertyDeclaration(t)||c.ts.isPropertySignature(t)||c.ts.isIndexSignatureDeclaration(t)){c.ts.isPropertyDeclaration(t)&&t.initializer&&c.ts.isPropertyAccessExpression(t.initializer)&&this.pushReference(this.convertPropertyAccess(t.initializer)),this.convertComputedPropertyName(t),this.convertTypeNode(t.type);continue}if(c.ts.isMethodDeclaration(t)||c.ts.isMethodSignature(t)||c.ts.isConstructorDeclaration(t)||c.ts.isConstructSignatureDeclaration(t)||c.ts.isCallSignatureDeclaration(t)||c.ts.isGetAccessorDeclaration(t)||c.ts.isSetAccessorDeclaration(t))this.convertParametersAndType(t);else throw new N(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&&!It.has(e.kind)){if(c.ts.isTypeReferenceNode(e)){this.pushReference(this.convertEntityName(e.typeName)),this.convertTypeArguments(e);return}if(c.ts.isTypeLiteralNode(e))return this.convertMembers(e.members);if(c.ts.isArrayTypeNode(e))return this.convertTypeNode(e.elementType);if(c.ts.isTupleTypeNode(e)){for(const t of e.elements)this.convertTypeNode(t);return}if(c.ts.isNamedTupleMember(e)||c.ts.isParenthesizedTypeNode(e)||c.ts.isTypeOperatorNode(e)||c.ts.isTypePredicateNode(e))return this.convertTypeNode(e.type);if(c.ts.isUnionTypeNode(e)||c.ts.isIntersectionTypeNode(e)){for(const t of e.types)this.convertTypeNode(t);return}if(c.ts.isMappedTypeNode(e)){const{typeParameter:t,type:s,nameType:f}=e;this.convertTypeNode(t.constraint),this.pushScope(),this.pushTypeVariable(t.name),this.convertTypeNode(s),f&&this.convertTypeNode(f),this.popScope();return}if(c.ts.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.ts.isIndexedAccessTypeNode(e)){this.convertTypeNode(e.objectType),this.convertTypeNode(e.indexType);return}if(c.ts.isFunctionOrConstructorTypeNode(e)){this.convertParametersAndType(e);return}if(c.ts.isTypeQueryNode(e)){this.pushReference(this.convertEntityName(e.exprName));return}if(c.ts.isRestTypeNode(e)){this.convertTypeNode(e.type);return}if(c.ts.isOptionalTypeNode(e)){this.convertTypeNode(e.type);return}if(c.ts.isTemplateLiteralTypeNode(e)){for(const t of e.templateSpans)this.convertTypeNode(t.type);return}if(c.ts.isInferTypeNode(e)){const{typeParameter:t}=e;this.convertTypeNode(t.constraint),this.pushTypeVariable(t.name);return}else throw new N(e)}}convertNamespace(e,t=!1){if(this.pushScope(),t&&e.body&&c.ts.isModuleDeclaration(e.body)){this.convertNamespace(e.body,!0);return}if(!e.body||!c.ts.isModuleBlock(e.body))throw new N(e,'namespace must have a "ModuleBlock" body.');const{statements:s}=e.body;for(const f of s){if(c.ts.isEnumDeclaration(f)||c.ts.isFunctionDeclaration(f)||c.ts.isClassDeclaration(f)||c.ts.isInterfaceDeclaration(f)||c.ts.isTypeAliasDeclaration(f)||c.ts.isModuleDeclaration(f)){if(f.name&&c.ts.isIdentifier(f.name))this.pushTypeVariable(f.name);else throw new N(f,"non-Identifier name not supported");continue}if(c.ts.isVariableStatement(f)){for(const v of f.declarationList.declarations)if(c.ts.isIdentifier(v.name))this.pushTypeVariable(v.name);else throw new N(v,"non-Identifier name not supported");continue}if(!c.ts.isExportDeclaration(f))throw new N(f,"namespace child (hoisting) not supported yet")}for(const f of s){if(c.ts.isVariableStatement(f)){for(const v of f.declarationList.declarations)v.type&&this.convertTypeNode(v.type);continue}if(c.ts.isFunctionDeclaration(f)){this.convertParametersAndType(f);continue}if(c.ts.isInterfaceDeclaration(f)||c.ts.isClassDeclaration(f)){const v=this.convertTypeParameters(f.typeParameters);this.convertHeritageClauses(f),this.convertMembers(f.members),this.popScope(v);continue}if(c.ts.isTypeAliasDeclaration(f)){const v=this.convertTypeParameters(f.typeParameters);this.convertTypeNode(f.type),this.popScope(v);continue}if(c.ts.isModuleDeclaration(f)){this.convertNamespace(f,t);continue}if(!c.ts.isEnumDeclaration(f))if(c.ts.isExportDeclaration(f)){if(f.exportClause){if(c.ts.isNamespaceExport(f.exportClause))throw new N(f.exportClause);for(const v of f.exportClause.elements){const p=v.propertyName||v.name;this.pushIdentifierReference(p)}}}else throw new N(f,"namespace child (walking) not supported yet")}this.popScope()}}function Ft({sourceFile:l}){return new Pt(l).transform()}b(Ft,"convert");class Pt{static{b(this,"Transformer")}constructor(e){this.sourceFile=e,this.declarations=new Map,this.ast=Tt(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 s={start:e.getFullStart(),end:e.getEnd()};if(!t){const d=new Ke({range:s});return this.pushStatement(d.iife),d}const f=t.getText(),v=new Ke({id:t,range:s}),p=this.declarations.get(f);if(p){p.pushIdentifierReference(t),p.declaration.end=s.end;let d=this.ast.body.findIndex(n=>n==p.declaration);for(let n=d+1;n<this.ast.body.length;n++){const a=this.ast.body[n];a.start=a.end=s.end}}else this.pushStatement(v.declaration),this.declarations.set(f,v);return p||v}convertStatement(e){if(c.ts.isEnumDeclaration(e))return this.convertEnumDeclaration(e);if(c.ts.isFunctionDeclaration(e))return this.convertFunctionDeclaration(e);if(c.ts.isInterfaceDeclaration(e)||c.ts.isClassDeclaration(e))return this.convertClassOrInterfaceDeclaration(e);if(c.ts.isTypeAliasDeclaration(e))return this.convertTypeAliasDeclaration(e);if(c.ts.isVariableStatement(e))return this.convertVariableStatement(e);if(c.ts.isExportDeclaration(e)||c.ts.isExportAssignment(e))return this.convertExportDeclaration(e);if(c.ts.isModuleDeclaration(e))return this.convertNamespaceDeclaration(e);if(e.kind==c.ts.SyntaxKind.NamespaceExportDeclaration)return this.removeStatement(e);if(c.ts.isImportDeclaration(e)||c.ts.isImportEqualsDeclaration(e))return this.convertImportDeclaration(e);throw new N(e)}removeStatement(e){this.pushStatement(k({type:"ExpressionStatement",expression:{type:"Literal",value:"pls remove me"}},e))}convertNamespaceDeclaration(e){if(e.flags&c.ts.NodeFlags.GlobalAugmentation||!c.ts.isIdentifier(e.name)){this.createDeclaration(e).convertNamespace(e,!0);return}const s=this.createDeclaration(e,e.name);s.pushIdentifierReference(e.name),s.convertNamespace(e)}convertEnumDeclaration(e){this.createDeclaration(e,e.name).pushIdentifierReference(e.name)}convertFunctionDeclaration(e){if(!e.name)throw new N(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 N(e,"ClassDeclaration / InterfaceDeclaration should have a name");const t=this.createDeclaration(e,e.name),s=t.convertTypeParameters(e.typeParameters);t.convertHeritageClauses(e),t.convertMembers(e.members),t.popScope(s)}convertTypeAliasDeclaration(e){const t=this.createDeclaration(e,e.name),s=t.convertTypeParameters(e.typeParameters);t.convertTypeNode(e.type),t.popScope(s)}convertVariableStatement(e){const{declarations:t}=e.declarationList;if(t.length!==1)throw new N(e,"VariableStatement with more than one declaration not yet supported");for(const s of t){if(!c.ts.isIdentifier(s.name))throw new N(e,"VariableDeclaration must have a name");this.createDeclaration(e,s.name).convertTypeNode(s.type)}}convertExportDeclaration(e){if(c.ts.isExportAssignment(e)){this.pushStatement(k({type:"ExportDefaultDeclaration",declaration:j(e.expression)},e));return}const t=e.moduleSpecifier?j(e.moduleSpecifier):void 0;if(!e.exportClause)this.pushStatement(k({type:"ExportAllDeclaration",source:t,exported:null},e));else if(c.ts.isNamespaceExport(e.exportClause))this.pushStatement(k({type:"ExportAllDeclaration",source:t,exported:R(e.exportClause.name)},e));else{const s=[];for(const f of e.exportClause.elements)s.push(this.convertExportSpecifier(f));this.pushStatement(k({type:"ExportNamedDeclaration",declaration:null,specifiers:s,source:t},e))}}convertImportDeclaration(e){if(c.ts.isImportEqualsDeclaration(e)){if(!c.ts.isExternalModuleReference(e.moduleReference))throw new N(e,"ImportEquals should have a literal source.");this.pushStatement(k({type:"ImportDeclaration",specifiers:[{type:"ImportDefaultSpecifier",local:R(e.name)}],source:j(e.moduleReference.expression)},e));return}const t=j(e.moduleSpecifier),s=e.importClause&&e.importClause.namedBindings?this.convertNamedImportBindings(e.importClause.namedBindings):[];e.importClause&&e.importClause.name&&s.push({type:"ImportDefaultSpecifier",local:R(e.importClause.name)}),this.pushStatement(k({type:"ImportDeclaration",specifiers:s,source:t},e))}convertNamedImportBindings(e){return c.ts.isNamedImports(e)?e.elements.map(t=>{const s=R(t.name),f=t.propertyName?R(t.propertyName):s;return{type:"ImportSpecifier",local:s,imported:f}}):[{type:"ImportNamespaceSpecifier",local:R(e.name)}]}convertExportSpecifier(e){const t=R(e.name);return{type:"ExportSpecifier",exported:t,local:e.propertyName?R(e.propertyName):t}}}class _t{static{b(this,"ExportsFixer")}constructor(e){this.source=e,this.DEBUG=!!process.env.DTS_EXPORTS_FIXER_DEBUG}fix(){const e=this.findExports();return e.sort((t,s)=>t.location.start-s.location.start),this.getCodeParts(e).join("")}findExports(){const{rawExports:e,values:t,types:s}=this.getExportsAndLocals();return e.map(f=>{const v=f.elements.map(p=>{const d=p.name.text,n=p.propertyName?.text??p.name.text,a=s.some(r=>r.getText()===n)&&!t.some(r=>r.getText()===n)?"type":"value";return this.DEBUG&&console.log(`export ${n} as ${d} is a ${a}`),{exportedName:d,localName:n,kind:a}});return{location:{start:f.getStart(),end:f.getEnd()},exports:v}})}getExportsAndLocals(e=this.source.statements){const t=[],s=[],f=[],v=b(p=>{const{rawExports:d,values:n,types:a}=this.getExportsAndLocals(p);t.push(...d),s.push(...n),f.push(...a)},"recurseInto");for(const p of e)if(this.DEBUG&&console.log(p.getText(),p.kind),!c.ts.isImportDeclaration(p)){if(c.ts.isInterfaceDeclaration(p)||c.ts.isTypeAliasDeclaration(p)){this.DEBUG&&console.log(`${p.name.getFullText()} is a type`),f.push(p.name);continue}if(c.ts.isEnumDeclaration(p)||c.ts.isFunctionDeclaration(p)||c.ts.isClassDeclaration(p)||c.ts.isVariableStatement(p)){if(c.ts.isVariableStatement(p))for(const d of p.declarationList.declarations)c.ts.isIdentifier(d.name)&&(this.DEBUG&&console.log(`${d.name.getFullText()} is a value (from var statement)`),s.push(d.name));else p.name&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from declaration)`),s.push(p.name));continue}if(c.ts.isModuleBlock(p)){const d=p.statements;v(d);continue}if(c.ts.isModuleDeclaration(p)){p.name&&c.ts.isIdentifier(p.name)&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from module declaration)`),s.push(p.name)),v(p.getChildren());continue}if(c.ts.isExportDeclaration(p)){if(p.moduleSpecifier||p.isTypeOnly)continue;const d=p.exportClause;if(!d||!c.ts.isNamedExports(d))continue;t.push(d);continue}this.DEBUG&&console.log("unhandled statement",p.getFullText(),p.kind)}return{rawExports:t,values:s,types:f}}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 s=this.source.getFullText(),f=[];for(const v of e){const p=s.slice(t,v.location.start);p.length>0&&f.push(p),f.push(this.getExportStatement(v)),t=v.location.end}return t<s.length&&f.push(s.slice(t)),f}getExportStatement(e){const t=e.exports.every(s=>s.kind==="type")&&e.exports.length>0;return`${t?"type ":""}{ ${e.exports.map(s=>this.createNamedExport(s,t)).join(", ")} }`}}function J(l,e){return c.ts.createSourceFile(l,e,c.ts.ScriptTarget.Latest,!0)}b(J,"parse");const $t=b(()=>{const l=new Map,e=new Map;return{name:"dts-transform",options({onLog:t,...s}){return{...s,onLog(f,v,p){f==="warn"&&v.code=="CIRCULAR_DEPENDENCY"||(t?t(f,v,p):p(f,v))},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,s){let f=J(s,t);const v=Dt({sourceFile:f});l.set(f.fileName,v.typeReferences),e.set(f.fileName,v.fileReferences),t=v.code.toString(),f=J(s,t);const p=Ft({sourceFile:f});return process.env.DTS_DUMP_AST&&(console.log(s),console.log(t),console.log(JSON.stringify(p.ast.body,void 0,2))),{code:t,ast:p.ast,map:v.code.generateMap()}},renderChunk(t,s,f){const v=J(s.fileName,t),p=new Et(v),d=new Set,n=new Set;for(const i of Object.keys(s.modules)){for(const o of l.get(i.split("\\").join("/"))||[])d.add(o);for(const o of e.get(i.split("\\").join("/"))||[])if(o.startsWith(".")){const h=O.join(O.dirname(i),o),u=f.file&&O.dirname(f.file)||s.facadeModuleId&&O.dirname(s.facadeModuleId)||".";let m=O.relative(u,h).split("\\").join("/");m[0]!=="."&&(m="./"+m),n.add(m)}else n.add(o)}let a=We(Array.from(n,i=>`/// <reference path="${i}" />`));return a+=We(Array.from(d,i=>`/// <reference types="${i}" />`)),a+=p.fix(),a||(a+=`
|
|
28
|
-
export { }`),{code:new _t(J(s.fileName,a)).fix(),map:{mappings:""}}}}},"transform");function We(l){return l.length?l.join(`
|
|
29
|
-
`)+`
|
|
30
|
-
`:""}b(We,"writeBlock");const me=/\.([cm]ts|[tj]sx?)$/;function he({programs:l,resolvedOptions:{compilerOptions:e,tsconfig:t}},s,f){if(!l.length&&X.test(s))return{code:f};const v=l.find(p=>!!p.getSourceFile(s));if(v){const p=v.getSourceFile(s);return{code:p?.getFullText(),source:p,program:v}}else if(c.ts.sys.fileExists(s)){const p=vt(s,e,t);l.push(p);const d=p.getSourceFile(s);return{code:d?.getFullText(),source:d,program:p}}else return null}b(he,"getModule");const Ge=b((l={})=>{const e=$t(),t={programs:[],resolvedOptions:gt(l)};return{name:"dts",outputOptions:e.outputOptions,renderChunk:e.renderChunk,options(s){let{input:f=[]}=s;if(!Array.isArray(f))f=typeof f=="string"?[f]:Object.values(f);else if(f.length>1){s.input={};for(const v of f){let p=v.replace(/((\.d)?\.(c|m)?(t|j)sx?)$/,"");O.isAbsolute(v)?p=O.basename(p):p=O.normalize(p),s.input[p]=v}}return t.programs=xt(Object.values(f),t.resolvedOptions.compilerOptions,t.resolvedOptions.tsconfig),e.options.call(this,s)},transform(s,f){if(!me.test(f))return null;const v=b(a=>{if(a.program){const r=O.dirname(f);a.program.getSourceFiles().map(o=>o.fileName).filter(o=>o.startsWith(r)).forEach(this.addWatchFile)}},"watchFiles"),p=b(()=>{const a=he(t,f,s);return a?(v(a),e.transform.call(this,a.code,f)):null},"handleDtsFile"),d=b(()=>{const a=f.replace(me,_e);let r=he(t,a,s);return r?(v(r),e.transform.call(this,r.code,a)):null},"treatTsAsDts"),n=b(()=>{const a=he(t,f,s);if(!a||!a.source||!a.program)return null;v(a);const r=f.replace(me,_e);let i;const{emitSkipped:o,diagnostics:h}=a.program.emit(a.source,(u,m)=>{i=e.transform.call(this,m,r)},void 0,!0);if(o){const u=h.filter(m=>m.category===c.ts.DiagnosticCategory.Error);u.length&&(console.error(c.ts.formatDiagnostics(u,fe)),this.error("Failed to compile. Check the logs above."))}return i},"generateDtsFromTs");return X.test(f)?p():d()??n()},resolveId(s,f){if(!f)return;f=f.split("\\").join("/");let v=t.resolvedOptions.compilerOptions;if(t.resolvedOptions.tsconfig){const d=s.startsWith(".")?O.resolve(O.dirname(f),s):s;v=pe(d,t.resolvedOptions.compilerOptions,t.resolvedOptions.tsconfig).compilerOptions}const{resolvedModule:p}=c.ts.resolveModuleName(s,f,v,c.ts.sys);if(p)return!t.resolvedOptions.respectExternal&&p.isExternalLibraryImport?{id:s,external:!0}:{id:O.resolve(p.resolvedFileName)}}}},"plugin");exports.default=Ge,exports.dts=Ge;
|