pkgroll 2.5.1 → 2.6.0
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.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var VD=Object.defineProperty;var s=(u,e)=>VD(u,"name",{value:e,configurable:!0});var T=require("fs"),zD=require("tty"),Iu=require("rollup"),h=require("path"),GD=require("@rollup/plugin-node-resolve"),KD=require("@rollup/plugin-commonjs"),JD=require("@rollup/plugin-json"),ZD=require("@rollup/plugin-alias"),_u=require("@rollup/plugin-replace"),HD=require("@rollup/plugin-inject"),YD=require("@rollup/pluginutils"),Ru=require("esbuild"),Lu=require("module"),Mu=require("magic-string");const QD="known-flag",XD="unknown-flag",ue="argument",{stringify:V}=JSON,De=/\B([A-Z])/g,ee=s(u=>u.replace(De,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:te}=Object.prototype,z=s((u,e)=>te.call(u,e),"w$3"),ne=s(u=>Array.isArray(u),"L$3"),Uu=s(u=>typeof u=="function"?[u,!1]:ne(u)?[u[0],!0]:Uu(u.type),"b$2"),re=s((u,e)=>u===Boolean?e!=="false":e,"d$3"),oe=s((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"m$2"),se=/[\s.:=]/,ie=s(u=>{const e=`Flag name ${V(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(se);if(t)throw new Error(`${e} cannot contain ${V(t?.[0])}`)},"B"),ae=s(u=>{const e={},t=s((D,n)=>{if(z(e,D))throw new Error(`Duplicate flags named ${V(D)}`);e[D]=n},"r");for(const D in u){if(!z(u,D))continue;ie(D);const n=u[D],r=[[],...Uu(n),n];t(D,r);const o=ee(D);if(D!==o&&t(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:i}=n,a=`Flag alias ${V(i)} for flag ${V(D)}`;if(i.length===0)throw new Error(`${a} cannot be empty`);if(i.length>1)throw new Error(`${a} must be a single character`);t(i,r)}}return e},"K$2"),le=s((u,e)=>{const t={};for(const D in u){if(!z(u,D))continue;const[n,,r,o]=e[D];if(n.length===0&&"default"in o){let{default:i}=o;typeof i=="function"&&(i=i()),t[D]=i}else t[D]=r?n:n.pop()}return t},"_$3"),Y="--",ce=/[.:=]/,Fe=/^-{1,2}\w/,Ce=s(u=>{if(!Fe.test(u))return;const e=!u.startsWith(Y);let t=u.slice(e?1:2),D;const n=t.match(ce);if(n){const{index:r}=n;D=t.slice(r+1),t=t.slice(0,r)}return[t,D,e]},"N$1"),fe=s((u,{onFlag:e,onArgument:t})=>{let D;const n=s((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===Y){n();const a=u.slice(r+1);t?.(a,[r],!0);break}const i=Ce(o);if(i){if(n(),!e)continue;const[a,l,f]=i;if(f)for(let F=0;F<a.length;F+=1){n();const c=F===a.length-1;D=e(a[F],c?l:void 0,[r,F+1,c])}else D=e(a,l,[r])}else n(o,[r])&&t?.([o],[r])}n()},"$$1"),pe=s((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$2"),Ee=s((u,e=process.argv.slice(2),{ignore:t}={})=>{const D=[],n=ae(u),r={},o=[];return o[Y]=[],fe(e,{onFlag(i,a,l){const f=z(n,i);if(!t?.(f?QD:XD,i,a)){if(f){const[F,c]=n[i],E=re(c,a),p=s((g,y)=>{D.push(l),y&&D.push(y),F.push(oe(c,g||""))},"p");return E===void 0?p:p(E)}z(r,i)||(r[i]=[]),r[i].push(a===void 0?!0:a),D.push(l)}},onArgument(i,a,l){t?.(ue,e[a[0]])||(o.push(...i),l?(o[Y]=i,e.splice(a[0])):D.push(a))}}),pe(e,D),{flags:le(u,n),unknownFlags:r,_:o}},"U$2");var de=Object.create,Q=Object.defineProperty,he=Object.defineProperties,ge=Object.getOwnPropertyDescriptor,me=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertyNames,Wu=Object.getOwnPropertySymbols,Ae=Object.getPrototypeOf,qu=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,Vu=s((u,e,t)=>e in u?Q(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,"W$1"),X=s((u,e)=>{for(var t in e||(e={}))qu.call(e,t)&&Vu(u,t,e[t]);if(Wu)for(var t of Wu(e))ye.call(e,t)&&Vu(u,t,e[t]);return u},"p$1"),au=s((u,e)=>he(u,me(e)),"c"),be=s(u=>Q(u,"__esModule",{value:!0}),"nD"),we=s((u,e)=>()=>(u&&(e=u(u=0)),e),"rD"),$e=s((u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),"iD"),ve=s((u,e,t,D)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Be(e))!qu.call(u,n)&&n!=="default"&&Q(u,n,{get:s(()=>e[n],"get"),enumerable:!(D=ge(e,n))||D.enumerable});return u},"oD"),xe=s((u,e)=>ve(be(Q(u!=null?de(Ae(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),x=we(()=>{}),ke=$e((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 je=s(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 Oe({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")}s(Oe,"w$2");function zu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Oe(),"")}s(zu,"d$2"),x();function Te(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}s(Te,"y$1");var Pe=xe(ke());function N(u){if(typeof u!="string"||u.length===0||(u=zu(u),u.length===0))return 0;u=u.replace((0,Pe.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+=Te(D)?2:1)}return e}s(N,"g");var Gu=s(u=>Math.max(...u.split(`
|
|
3
|
-
`).map(
|
|
4
|
-
`)];for(let[l,f]of a.entries()){if(D+=f,
|
|
5
|
-
`?(r&&(D+=
|
|
6
|
-
`&&(n&&
|
|
2
|
+
"use strict";var JD=Object.defineProperty;var s=(u,e)=>JD(u,"name",{value:e,configurable:!0});var S=require("node:fs"),ZD=require("tty"),Lu=require("rollup"),h=require("node:path"),HD=require("@rollup/plugin-node-resolve"),YD=require("@rollup/plugin-commonjs"),QD=require("@rollup/plugin-json"),XD=require("@rollup/plugin-alias"),Mu=require("@rollup/plugin-replace"),ue=require("@rollup/plugin-dynamic-import-vars"),De=require("@rollup/plugin-inject"),ee=require("@rollup/pluginutils"),Wu=require("esbuild"),Uu=require("node:module"),qu=require("magic-string"),te=require("fs");const ne="known-flag",re="unknown-flag",oe="argument",{stringify:z}=JSON,se=/\B([A-Z])/g,ie=s(u=>u.replace(se,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:ae}=Object.prototype,G=s((u,e)=>ae.call(u,e),"w$3"),le=s(u=>Array.isArray(u),"L$3"),Vu=s(u=>typeof u=="function"?[u,!1]:le(u)?[u[0],!0]:Vu(u.type),"b$2"),ce=s((u,e)=>u===Boolean?e!=="false":e,"d$3"),Fe=s((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"m$2"),Ce=/[\s.:=]/,fe=s(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(Ce);if(t)throw new Error(`${e} cannot contain ${z(t?.[0])}`)},"B$1"),pe=s(u=>{const e={},t=s((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=[[],...Vu(n),n];t(D,r);const o=ie(D);if(D!==o&&t(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:i}=n,a=`Flag alias ${z(i)} for flag ${z(D)}`;if(i.length===0)throw new Error(`${a} cannot be empty`);if(i.length>1)throw new Error(`${a} must be a single character`);t(i,r)}}return e},"K$2"),Ee=s((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:i}=o;typeof i=="function"&&(i=i()),t[D]=i}else t[D]=r?n:n.pop()}return t},"_$3"),Q="--",de=/[.:=]/,he=/^-{1,2}\w/,ge=s(u=>{if(!he.test(u))return;const e=!u.startsWith(Q);let t=u.slice(e?1:2),D;const n=t.match(de);if(n){const{index:r}=n;D=t.slice(r+1),t=t.slice(0,r)}return[t,D,e]},"N$1"),me=s((u,{onFlag:e,onArgument:t})=>{let D;const n=s((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===Q){n();const a=u.slice(r+1);t?.(a,[r],!0);break}const i=ge(o);if(i){if(n(),!e)continue;const[a,l,f]=i;if(f)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"),Be=s((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"),Ae=s((u,e=process.argv.slice(2),{ignore:t}={})=>{const D=[],n=pe(u),r={},o=[];return o[Q]=[],me(e,{onFlag(i,a,l){const f=G(n,i);if(!t?.(f?ne:re,i,a)){if(f){const[C,c]=n[i],d=ce(c,a),E=s((g,b)=>{D.push(l),b&&D.push(b),C.push(Fe(c,g||""))},"p");return d===void 0?E:E(d)}G(r,i)||(r[i]=[]),r[i].push(a===void 0?!0:a),D.push(l)}},onArgument(i,a,l){t?.(oe,e[a[0]])||(o.push(...i),l?(o[Q]=i,e.splice(a[0])):D.push(a))}}),Be(e,D),{flags:Ee(u,n),unknownFlags:r,_:o}},"U$2");var be=Object.create,X=Object.defineProperty,ye=Object.defineProperties,we=Object.getOwnPropertyDescriptor,$e=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertyNames,zu=Object.getOwnPropertySymbols,xe=Object.getPrototypeOf,Gu=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Ku=s((u,e,t)=>e in u?X(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,"W$2"),uu=s((u,e)=>{for(var t in e||(e={}))Gu.call(e,t)&&Ku(u,t,e[t]);if(zu)for(var t of zu(e))ke.call(e,t)&&Ku(u,t,e[t]);return u},"p$1"),cu=s((u,e)=>ye(u,$e(e)),"c"),Oe=s(u=>X(u,"__esModule",{value:!0}),"nD"),je=s((u,e)=>()=>(u&&(e=u(u=0)),e),"rD"),Te=s((u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),"iD"),Se=s((u,e,t,D)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ve(e))!Gu.call(u,n)&&n!=="default"&&X(u,n,{get:s(()=>e[n],"get"),enumerable:!(D=we(e,n))||D.enumerable});return u},"oD"),Pe=s((u,e)=>Se(Oe(X(u!=null?be(xe(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),x=je(()=>{}),Ne=Te((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 Ie=s(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")}s(Re,"w$2");function Ju(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Re(),"")}s(Ju,"d$2"),x();function _e(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}s(_e,"y$1");var Le=Pe(Ne());function I(u){if(typeof u!="string"||u.length===0||(u=Ju(u),u.length===0))return 0;u=u.replace((0,Le.default)()," ");let e=0;for(let t=0;t<u.length;t++){let D=u.codePointAt(t);D<=31||D>=127&&D<=159||D>=768&&D<=879||(D>65535&&t++,e+=_e(D)?2:1)}return e}s(I,"g");var Zu=s(u=>Math.max(...u.split(`
|
|
3
|
+
`).map(I)),"b$1"),Me=s(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=Zu(t[r]);o>e[r]&&(e[r]=o)}}return e},"k$1");x();var Hu=/^\d+%$/,Yu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},We=s((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"&&Hu.test(r)){D.push(cu(uu({},Yu),{width:r,contentWidth:u[n]}));continue}if(r&&typeof r=="object"){let o=cu(uu(uu({},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 Ue(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"&&Hu.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),f=a-l;t.paddingLeft-=l,t.paddingRight-=f,t.horizontalPadding=t.paddingLeft+t.paddingRight}t.paddingLeftString=t.paddingLeft?" ".repeat(t.paddingLeft):"",t.paddingRightString=t.paddingRight?" ".repeat(t.paddingRight):"";let i=e-t.horizontalPadding;t.width=Math.max(Math.min(t.width,i),r)}}s(Ue,"aD");var Qu=s(()=>Object.assign([],{columns:0}),"G$1");function qe(u,e){let t=[Qu()],[D]=t;for(let n of u){let r=n.width+n.horizontalPadding;D.columns+r>e&&(D=Qu(),t.push(D)),D.push(n),D.columns+=r}for(let n of t){let r=n.reduce((c,d)=>c+d.width+d.horizontalPadding,0),o=e-r;if(o===0)continue;let i=n.filter(c=>"autoOverflow"in c),a=i.filter(c=>c.autoOverflow>0),l=a.reduce((c,d)=>c+d.autoOverflow,0),f=Math.min(l,o);for(let c of a){let d=Math.floor(c.autoOverflow/l*f);c.width+=d,o-=d}let C=Math.floor(o/i.length);for(let c=0;c<i.length;c+=1){let d=i[c];c===i.length-1?d.width+=o:d.width+=C,o-=C}}return t}s(qe,"lD");function Ve(u,e,t){let D=We(t,e);return Ue(D,u),qe(D,u)}s(Ve,"Z$2"),x(),x(),x();var Fu=10,Xu=s((u=0)=>e=>`\x1B[${e+u}m`,"U$1"),uD=s((u=0)=>e=>`\x1B[${38+u};5;${e}m`,"V$1"),DD=s((u=0)=>(e,t,D)=>`\x1B[${38+u};2;${e};${t};${D}m`,"Y$1");function ze(){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=Xu(),e.color.ansi256=uD(),e.color.ansi16m=DD(),e.bgColor.ansi=Xu(Fu),e.bgColor.ansi256=uD(Fu),e.bgColor.ansi16m=DD(Fu),Object.defineProperties(e,{rgbToAnsi256:{value:s((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:s(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:s(t=>e.rgbToAnsi256(...e.hexToRgb(t)),"value"),enumerable:!1},ansi256ToAnsi:{value:s(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 i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(D));return o===2&&(i+=60),i},"value"),enumerable:!1},rgbToAnsi:{value:s((t,D,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(t,D,n)),"value"),enumerable:!1},hexToAnsi:{value:s(t=>e.ansi256ToAnsi(e.hexToAnsi256(t)),"value"),enumerable:!1}}),e}s(ze,"AD");var Ge=ze(),Ke=Ge,Du=new Set(["\x1B","\x9B"]),Je=39,Cu="\x07",eD="[",Ze="]",tD="m",fu=`${Ze}8;;`,nD=s(u=>`${Du.values().next().value}${eD}${u}${tD}`,"J$2"),rD=s(u=>`${Du.values().next().value}${fu}${u}${Cu}`,"Q$1"),He=s(u=>u.split(" ").map(e=>I(e)),"hD"),pu=s((u,e,t)=>{let D=[...e],n=!1,r=!1,o=I(Ju(u[u.length-1]));for(let[i,a]of D.entries()){let l=I(a);if(o+l<=t?u[u.length-1]+=a:(u.push(a),o=0),Du.has(a)&&(n=!0,r=D.slice(i+1).join("").startsWith(fu)),n){r?a===Cu&&(n=!1,r=!1):a===tD&&(n=!1);continue}o+=l,o===t&&i<D.length-1&&(u.push(""),o=0)}!o&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"S$2"),Ye=s(u=>{let e=u.split(" "),t=e.length;for(;t>0&&!(I(e[t-1])>0);)t--;return t===e.length?u:e.slice(0,t).join(" ")+e.slice(t).join("")},"cD"),Qe=s((u,e,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let D="",n,r,o=He(u),i=[""];for(let[l,f]of u.split(" ").entries()){t.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let C=I(i[i.length-1]);if(l!==0&&(C>=e&&(t.wordWrap===!1||t.trim===!1)&&(i.push(""),C=0),(C>0||t.trim===!1)&&(i[i.length-1]+=" ",C++)),t.hard&&o[l]>e){let c=e-C,d=1+Math.floor((o[l]-c-1)/e);Math.floor((o[l]-1)/e)<d&&i.push(""),pu(i,f,e);continue}if(C+o[l]>e&&C>0&&o[l]>0){if(t.wordWrap===!1&&C<e){pu(i,f,e);continue}i.push("")}if(C+o[l]>e&&t.wordWrap===!1){pu(i,f,e);continue}i[i.length-1]+=f}t.trim!==!1&&(i=i.map(l=>Ye(l)));let a=[...i.join(`
|
|
4
|
+
`)];for(let[l,f]of a.entries()){if(D+=f,Du.has(f)){let{groups:c}=new RegExp(`(?:\\${eD}(?<code>\\d+)m|\\${fu}(?<uri>.*)${Cu})`).exec(a.slice(l).join(""))||{groups:{}};if(c.code!==void 0){let d=Number.parseFloat(c.code);n=d===Je?void 0:d}else c.uri!==void 0&&(r=c.uri.length===0?void 0:c.uri)}let C=Ke.codes.get(Number(n));a[l+1]===`
|
|
5
|
+
`?(r&&(D+=rD("")),n&&C&&(D+=nD(C))):f===`
|
|
6
|
+
`&&(n&&C&&(D+=nD(n)),r&&(D+=rD(r)))}return D},"dD");function Xe(u,e,t){return String(u).normalize().replace(/\r\n/g,`
|
|
7
7
|
`).split(`
|
|
8
|
-
`).map(D=>
|
|
9
|
-
`)}s(
|
|
10
|
-
`);if(a.postprocess){let{postprocess:c}=a;
|
|
8
|
+
`).map(D=>Qe(D,e,t)).join(`
|
|
9
|
+
`)}s(Xe,"T$1");var oD=s(u=>Array.from({length:u}).fill(""),"X$1");function ut(u,e){let t=[],D=0;for(let n of u){let r=0,o=n.map(a=>{var l;let f=(l=e[D])!=null?l:"";D+=1,a.preprocess&&(f=a.preprocess(f)),Zu(f)>a.width&&(f=Xe(f,a.width,{hard:!0}));let C=f.split(`
|
|
10
|
+
`);if(a.postprocess){let{postprocess:c}=a;C=C.map((d,E)=>c.call(a,d,E))}return a.paddingTop&&C.unshift(...oD(a.paddingTop)),a.paddingBottom&&C.push(...oD(a.paddingBottom)),C.length>r&&(r=C.length),cu(uu({},a),{lines:C})}),i=[];for(let a=0;a<r;a+=1){let l=o.map(f=>{var C;let c=(C=f.lines[a])!=null?C:"",d=Number.isFinite(f.width)?" ".repeat(f.width-I(c)):"",E=f.paddingLeftString;return f.align==="right"&&(E+=d),E+=c,f.align==="left"&&(E+=d),E+f.paddingRightString}).join("");i.push(l)}t.push(i.join(`
|
|
11
11
|
`))}return t.join(`
|
|
12
|
-
`)}s(
|
|
13
|
-
`)}s(
|
|
14
|
-
`}}s(
|
|
15
|
-
`}}s(
|
|
16
|
-
`):e.usage}}:void 0;if(u.name){const t=[],D=[
|
|
17
|
-
`)}}}}s(
|
|
18
|
-
`)),t)return{id:"examples",type:"section",data:{title:"Examples:",body:t}}}s(
|
|
12
|
+
`)}s(ut,"P$1");function Dt(u,e){if(!u||u.length===0)return"";let t=Me(u),D=t.length;if(D===0)return"";let{stdoutColumns:n,columns:r}=Ie(e);if(r.length>D)throw new Error(`${r.length} columns defined, but only ${D} columns found`);let o=Ve(n,r,t);return u.map(i=>ut(o,i)).join(`
|
|
13
|
+
`)}s(Dt,"mD"),x();var et=["<",">","=",">=","<="];function tt(u){if(!et.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}s(tt,"xD");function nt(u){let e=Object.keys(u).map(t=>{let[D,n]=t.split(" ");tt(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}}s(nt,"wD");const rt=s(u=>u.replace(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),"S$1"),ot=s(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q$1"),st={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:s(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 it(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:`--${ot(t)}`,aliasesEnabled:e,aliasFormatted:n?`-${D.alias}`:void 0}}).map(t=>(t.aliasesEnabled=e,[{type:"flagName",data:t},{type:"flagDescription",data:t}])),tableBreakpoints:st}}}s(it,"D$1");const sD=s(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A$1"),iD=s(u=>{const e="parent"in u&&u.parent?.name;return(e?`${e} `:"")+u.name},"C");function at(u){const e=[];u.name&&e.push(iD(u));const t=sD(u)??("parent"in u&&sD(u.parent));if(t&&e.push(`v${t}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
|
|
14
|
+
`}}s(at,"R$2");function lt(u){const{help:e}=u;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
|
|
15
|
+
`}}s(lt,"L$1");function ct(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=[iD(u)];if(u.flags&&Object.keys(u.flags).length>0&&D.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:n}=u,r=n.indexOf("--"),o=r>-1&&n.slice(r+1).some(i=>i.startsWith("<"));D.push(n.map(i=>i!=="--"?i:o?"--":"[--]").join(" "))}if(D.length>1&&t.push(D.join(" ")),"commands"in u&&u.commands?.length&&t.push(`${u.name} <command>`),t.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:t.join(`
|
|
17
|
+
`)}}}}s(ct,"T");function Ft(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}}}s(Ft,"_$1");function Ct(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:it(u.flags),indentBody:0}}}s(Ct,"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}}}s(ft,"F$1");function pt(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}}}s(pt,"H$1");const Et=s(u=>[at,lt,ct,Ft,Ct,ft,pt].map(e=>e(u)).filter(Boolean),"U"),dt=ZD.WriteStream.prototype.hasColors();let ht=class{static{s(this,"M")}text(e){return e}bold(e){return dt?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:t}){return e.replace(/^/gm," ".repeat(t))}heading(e){return this.bold(e)}section({title:e,body:t,indentBody:D=2}){return`${(e?`${this.heading(e)}
|
|
19
19
|
`:"")+(t?this.indentText({text:this.render(t),spaces:D}):"")}
|
|
20
|
-
`}table({tableData:e,tableOptions:t,tableBreakpoints:D}){return
|
|
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
|
|
22
|
-
`),D(),process.exit(1);u[a]=l}}s(
|
|
20
|
+
`}table({tableData:e,tableOptions:t,tableBreakpoints:D}){return Dt(e.map(n=>n.map(r=>this.render(r))),D?nt(D):t)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:t,flagFormatted:D,aliasesEnabled:n,aliasFormatted:r}=e;let o="";if(r?o+=`${r}, `:n&&(o+=" "),o+=D,"placeholder"in t&&typeof t.placeholder=="string")o+=`${this.flagOperator(e)}${t.placeholder}`;else{const i=this.flagParameter("type"in t?t.type:t);i&&(o+=`${this.flagOperator(e)}${i}`)}return o}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let t="description"in e?e.description??"":"";if("default"in e){let{default:D}=e;typeof D=="function"&&(D=D()),D&&(t+=` (default: ${this.flagDefault(D)})`)}return t}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>this.render(t)).join(`
|
|
21
|
+
`);if("type"in e&&this[e.type]){const t=this[e.type];if(typeof t=="function")return t.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}};const aD=/^[\w.-]+$/,{stringify:T}=JSON,gt=/[|\\{}()[\]^$+*?.]/;function Eu(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 i;if(r==="<"&&o===">"&&(i=!0,t))throw new Error(`Invalid parameter: Required parameter ${T(n)} cannot come after optional parameter ${T(t)}`);if(r==="["&&o==="]"&&(i=!1,t=n),i===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 f=a.match(gt);if(f)throw new Error(`Invalid parameter: ${T(n)}. Invalid character found ${T(f[0])}`);e.push({name:a,required:i,spread:l})}return e}s(Eu,"w$1");function du(u,e,t,D){for(let n=0;n<e.length;n+=1){const{name:r,required:o,spread:i}=e[n],a=rt(r);if(a in u)throw new Error(`Invalid parameter: ${T(r)} is used more than once.`);const l=i?t.slice(n):t[n];if(i&&(n=e.length),o&&(!l||i&&l.length===0))return console.error(`Error: Missing required parameter ${T(r)}
|
|
22
|
+
`),D(),process.exit(1);u[a]=l}}s(du,"b");function mt(u){return u===void 0||u!==!1}s(mt,"W$1");function lD(u,e,t,D){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=e,i=mt(o);i&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const a=Ae(n,D,{ignore:e.ignoreArgv}),l=s(()=>{console.log(e.version)},"f");if(r&&a.flags.version===!0)return l(),process.exit(0);const f=new ht,C=i&&o?.render?o.render:E=>f.render(E),c=s(E=>{const g=Et({...e,...E?{help:E}:{},flags:n});console.log(C(g,f))},"u");if(i&&a.flags.help===!0)return c(),process.exit(0);if(e.parameters){let{parameters:E}=e,g=a._;const b=E.indexOf("--"),O=E.slice(b+1),v=Object.create(null);if(b>-1&&O.length>0){E=E.slice(0,b);const p=a._["--"];g=g.slice(0,-p.length||void 0),du(v,Eu(E),g,c),du(v,Eu(O),p,c)}else du(v,Eu(E),g,c);Object.assign(a._,v)}const d={...a,showVersion:l,showHelp:c};return typeof t=="function"&&t(d),{command:u,...d}}s(lD,"x$1");function Bt(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)}s(Bt,"z$1");function At(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!aD.test(u.name)))throw new Error(`Invalid script name: ${T(u.name)}`);const D=t[0];if(u.commands&&aD.test(D)){const n=Bt(D,u.commands);if(n)return lD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return lD(void 0,u,e,t)}s(At,"Z$1");var bt="2.6.0";const hu=s(u=>S.promises.access(u).then(()=>!0,()=>!1),"fsExists"),yt=s(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"),wt=/^[/.]/,eu=s((u,e)=>(!h.isAbsolute(u)&&!wt.test(u)&&(u=`./${u}`),e&&!u.endsWith("/")&&(u+="/"),u),"normalizePath"),P=s(u=>{if(u.endsWith(".mjs"))return"module";if(u.endsWith(".cjs"))return"commonjs"},"getFileType"),cD=s(u=>u.startsWith("."),"isPath"),gu=s((u,e,t="exports")=>{if(u){if(typeof u=="string")return cD(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"?cD(D)?{outputPath:D,type:P(D)||e,from:r}:[]:gu(D,e,r)});if(typeof u=="object")return Object.entries(u).flatMap(([D,n])=>{if(typeof n=="string"){const r={outputPath:n,from:`${t}.${D}`};if(D==="require")return{...r,type:"commonjs"};if(D==="import")return{...r,type:P(n)||e};if(D==="types")return{...r,type:"types"};if(D==="node")return{...r,type:P(n)||e,platform:"node"};if(D==="default")return{...r,type:P(n)||e}}return gu(n,e,`${t}.${D}`)})}return[]},"parseExportsMap"),M=s((u,e)=>{e.outputPath=eu(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"),$t=s(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))M(e,{outputPath:r,type:P(r)??t,isExecutable:!0,from:`bin.${n}`})}if(u.exports){const D=gu(u.exports,t);for(const n of D)M(e,n)}return Object.values(e)},"getExportEntries"),vt=s(({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:xt}=JSON,kt=s(async(u,e)=>{for(const t of e){const D=u+t;if(await hu(D))return{extension:t,path:D}}},"tryExtensions"),FD={".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"]},Ot=Object.keys(FD),jt=s(async(u,e,t)=>{const D=e+u.outputPath.slice(t.length);for(const n of Ot)if(u.outputPath.endsWith(n)){const r=await kt(D.slice(0,-n.length),FD[n]);if(r)return{input:r.path,srcExtension:r.extension,distExtension:n}}throw new Error(`Could not find matching source file for export path ${xt(u.outputPath)}`)},"getSourcePath"),mu="pkgroll:create-require",CD=`IS_ESM${Math.random().toString(36).slice(2)}`,Tt=s(()=>({...De({require:mu}),name:"create-require",resolveId:s(u=>u===mu?u:null,"resolveId"),load:s(u=>u!==mu?null:`
|
|
23
23
|
import { createRequire } from 'module';
|
|
24
24
|
|
|
25
25
|
export default (
|
|
26
|
-
${
|
|
26
|
+
${CD}
|
|
27
27
|
? /* @__PURE__ */ createRequire(import.meta.url)
|
|
28
28
|
: require
|
|
29
29
|
);
|
|
30
|
-
`,"load")}),"createRequire"),
|
|
31
|
-
`),{code:o.toString(),map:D.sourcemap?o.generateMap({hires:!0}):void 0}}},"renderChunk"),writeBundle:s(async(e,t)=>{const D=e.entryFileNames,n=Object.values(t).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const i=`./${h.posix.join(e.dir,D(o))}`;await
|
|
32
|
-
`;break;case 114:
|
|
33
|
-
`),i++,l=D,o=14;switch(
|
|
34
|
-
`+" ".repeat(e)),new Array(
|
|
35
|
-
`+" ".repeat(e)),new Array(
|
|
36
|
-
`+" ".repeat(e)),new Array(
|
|
37
|
-
`+" ".repeat(e));var nu;(function(u){u.DEFAULT={allowTrailingComma:!1}})(nu||(nu={}));function gD(u,e=[],t=nu.DEFAULT){let D=null,n=[];const r=[];function o(i){Array.isArray(n)?n.push(i):D!==null&&(n[D]=i)}return s(o,"s"),d(o,"onValue"),mD(u,{onObjectBegin:s(()=>{const i={};o(i),r.push(n),n=i,D=null},"onObjectBegin"),onObjectProperty:s(i=>{D=i},"onObjectProperty"),onObjectEnd:s(()=>{n=r.pop()},"onObjectEnd"),onArrayBegin:s(()=>{const i=[];o(i),r.push(n),n=i,D=null},"onArrayBegin"),onArrayEnd:s(()=>{n=r.pop()},"onArrayEnd"),onLiteralValue:o,onError:s((i,a,l)=>{e.push({error:i,offset:a,length:l})},"onError")},t),n[0]}s(gD,"ve"),d(gD,"parse$1");function mD(u,e,t=nu.DEFAULT){const D=dD(u,!1),n=[];function r(A){return A?()=>A(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}s(r,"o"),d(r,"toNoArgVisit");function o(A){return A?()=>A(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}s(o,"s"),d(o,"toNoArgVisitWithPath");function i(A){return A?$=>A($,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}s(i,"c"),d(i,"toOneArgVisit");function a(A){return A?$=>A($,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}s(a,"f"),d(a,"toOneArgVisitWithPath");const l=o(e.onObjectBegin),f=a(e.onObjectProperty),F=r(e.onObjectEnd),c=o(e.onArrayBegin),E=r(e.onArrayEnd),p=a(e.onLiteralValue),g=i(e.onSeparator),y=r(e.onComment),j=i(e.onError),v=t&&t.disallowComments,C=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}}}s(B,"g"),d(B,"scanNext");function m(A,$=[],Nu=[]){if(j(A),$.length+Nu.length>0){let H=D.getToken();for(;H!==17;){if($.indexOf(H)!==-1){B();break}else if(Nu.indexOf(H)!==-1)break;H=B()}}}s(m,"m"),d(m,"handleError");function b(A){const $=D.getTokenValue();return A?p($):(f($),n.push($)),B(),!0}s(b,"_"),d(b,"parseString");function w(){switch(D.getToken()){case 11:const A=D.getTokenValue();let $=Number(A);isNaN($)&&(m(2),$=0),p($);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return B(),!0}s(w,"j"),d(w,"parseLiteral");function iu(){return D.getToken()!==10?(m(3,[],[2,5]),!1):(b(!1),D.getToken()===6?(g(":"),B(),Z()||m(4,[],[2,5])):m(5,[],[2,5]),n.pop(),!0)}s(iu,"pe"),d(iu,"parseProperty");function Pu(){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&&C)break}else A&&m(6,[],[]);iu()||m(4,[],[2,5]),A=!0}return F(),D.getToken()!==2?m(7,[2],[]):B(),!0}s(Pu,"me"),d(Pu,"parseObject");function Su(){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&&C)break}else $&&m(6,[],[]);A?(n.push(0),A=!1):n[n.length-1]++,Z()||m(4,[],[4,5]),$=!0}return E(),A||n.pop(),D.getToken()!==4?m(8,[4],[]):B(),!0}s(Su,"ge"),d(Su,"parseArray");function Z(){switch(D.getToken()){case 3:return Su();case 1:return Pu();case 10:return b(!0);default:return w()}}return s(Z,"d"),d(Z,"parseValue"),B(),D.getToken()===17?t.allowEmptyContent?!0:(m(4,[],[]),!1):Z()?(D.getToken()!==17&&m(9,[],[]),!0):(m(4,[],[]),!1)}s(mD,"Ae"),d(mD,"visit");var BD;(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"})(BD||(BD={}));var AD;(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"})(AD||(AD={}));const qt=gD;var yD;(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"})(yD||(yD={}));const bD=d((u,e)=>qt(Wt(e,u,"utf8")),"readJsonc"),wu=Symbol("implicitBaseUrl"),Vt=d(()=>{const{findPnpApi:u}=Lu;return u&&u(process.cwd())},"getPnpApi"),$u=d((u,e,t,D)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${t}`;if(D!=null&&D.has(n))return D.get(n);const r=bD(u,D);if(!r)return;let o=e||"tsconfig.json";if(!t&&r.exports)try{const[i]=Mt(r.exports,e,["require","types"]);o=i}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=h.join(u,"..",o),D?.set(n,o),o},"resolveFromPackageJsonPath"),vu="package.json",xu="tsconfig.json",zt=d((u,e,t)=>{let D=u;if(u===".."&&(D=h.join(D,xu)),u[0]==="."&&(D=h.resolve(e,D)),h.isAbsolute(D)){if(O(t,D)){if(eu(t,D).isFile())return D}else if(!D.endsWith(".json")){const E=`${D}.json`;if(O(t,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,i=r.join("/"),a=Vt();if(a){const{resolveRequest:E}=a;try{if(o===u){const p=E(h.join(o,vu),e);if(p){const g=$u(p,i,!1,t);if(g&&O(t,g))return g}}else{let p;try{p=E(u,e,{extensions:[".json"]})}catch{p=E(h.join(u,xu),e)}if(p)return p}}catch{}}const l=ED(h.resolve(e),h.join("node_modules",o),t);if(!l||!eu(t,l).isDirectory())return;const f=h.join(l,vu);if(O(t,f)){const E=$u(f,i,!1,t);if(E===!1)return;if(E&&O(t,E)&&eu(t,E).isFile())return E}const F=h.join(l,i),c=F.endsWith(".json");if(!c){const E=`${F}.json`;if(O(t,E))return E}if(O(t,F)){if(eu(t,F).isDirectory()){const E=h.join(F,vu);if(O(t,E)){const g=$u(E,"",!0,t);if(g&&O(t,g))return g}const p=h.join(F,xu);if(O(t,p))return p}else if(c)return F}},"resolveExtendsPath"),Gt=d((u,e,t,D)=>{const n=zt(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=wD(n,D,t);delete o.references;const{compilerOptions:i}=o;if(i){const a=["baseUrl","outDir"];for(const l of a){const f=i[l];f&&(i[l]=k(h.relative(e,h.join(r,f)))||"./")}}return o.files&&(o.files=o.files.map(a=>k(h.relative(e,h.join(r,a))))),o.include&&(o.include=o.include.map(a=>k(h.relative(e,h.join(r,a))))),o.exclude&&(o.exclude=o.exclude.map(a=>k(h.relative(e,h.join(r,a))))),o},"resolveExtends"),wD=d((u,e,t=new Set)=>{let D;try{D=bD(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[wu]=n)}if(D.extends){const r=Array.isArray(D.extends)?D.extends:[D.extends];delete D.extends;for(const o of r.reverse()){const i=Gt(o,n,new Set(t),e),a={...i,...D,compilerOptions:{...i.compilerOptions,...D.compilerOptions}};i.watchOptions&&(a.watchOptions={...i.watchOptions,...D.watchOptions}),D=a}}if(D.compilerOptions){const{compilerOptions:r}=D,o=["baseUrl","rootDir"];for(const a of o){const l=r[a];if(l){const f=h.resolve(n,l),F=bu(h.relative(n,f));r[a]=F}}const{outDir:i}=r;i&&(Array.isArray(D.exclude)||(D.exclude=[]),D.exclude.includes(i)||D.exclude.push(i),r.outDir=bu(i))}else D.compilerOptions={};if(D.files&&(D.files=D.files.map(bu)),D.include&&(D.include=D.include.map(k)),D.watchOptions){const{watchOptions:r}=D;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>k(h.resolve(n,o))))}return D},"_parseTsconfig"),$D=d((u,e=new Map)=>wD(h.resolve(u),e),"parseTsconfig"),Kt=d((u=process.cwd(),e="tsconfig.json",t=new Map)=>{const D=ED(k(u),e,t);if(!D)return null;const n=$D(D,t);return{path:D,config:n}},"getTsconfig"),Jt=/\*/g,vD=d((u,e)=>{const t=u.match(Jt);if(t&&t.length>1)throw new Error(e)},"assertStarCount"),Zt=d(u=>{if(u.includes("*")){const[e,t]=u.split("*");return{prefix:e,suffix:t}}return u},"parsePattern"),Ht=d(({prefix:u,suffix:e},t)=>t.startsWith(u)&&t.endsWith(e),"isPatternMatch"),Yt=d((u,e,t)=>Object.entries(u).map(([D,n])=>(vD(D,`Pattern '${D}' can have at most one '*' character.`),{pattern:Zt(D),substitutions:n.map(r=>{if(vD(r,`Substitution '${r}' in pattern '${D}' can have at most one '*' character.`),!e&&!yu.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"),Qt=d(u=>{const{compilerOptions:e}=u.config;if(!e)return null;const{baseUrl:t,paths:D}=e;if(!t&&!D)return null;const n=wu in e&&e[wu],r=h.resolve(h.dirname(u.path),t||n||"."),o=D?Yt(D,t,r):[];return i=>{if(yu.test(i))return[];const a=[];for(const c of o){if(c.pattern===i)return c.substitutions.map(k);typeof c.pattern!="string"&&a.push(c)}let l,f=-1;for(const c of a)Ht(c.pattern,i)&&c.pattern.prefix.length>f&&(f=c.pattern.prefix.length,l=c);if(!l)return t?[k(h.join(r,i))]:[];const F=i.slice(l.pattern.prefix.length,i.length-l.pattern.suffix.length);return l.substitutions.map(c=>k(c.replace("*",F)))}},"createPathsMatcher"),xD=d(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"),Xt=65,un=97,Dn=d(()=>Math.floor(Math.random()*26),"m"),en=d(u=>Array.from({length:u},()=>String.fromCodePoint(Dn()+(Math.random()>.5?Xt:un))).join(""),"S"),tn=d((u=T)=>{const e=process.execPath;if(u.existsSync(e))return!u.existsSync(xD(e));const t=`/${en(10)}`;u.writeFileSync(t,"");const D=!u.existsSync(xD(t));return u.unlinkSync(t),D},"l"),{join:ru}=h.posix,ku={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},nn=d(u=>{const e=[...ku.ts],t=[...ku.cts],D=[...ku.mts];return u!=null&&u.allowJs&&(e.push(".js",".jsx"),t.push(".cjs"),D.push(".mjs")),[...e,...t,...D]},"getSupportedExtensions"),rn=d(u=>{const e=[];if(!u)return e;const{outDir:t,declarationDir:D}=u;return t&&e.push(t),D&&e.push(D),e},"getDefaultExcludeSpec"),kD=d(u=>u.replaceAll(/[.*+?^${}()|[\]\\]/g,"\\$&"),"escapeForRegexp"),on=["node_modules","bower_components","jspm_packages"],ju=`(?!(${on.join("|")})(/|$))`,sn=/(?:^|\/)[^.*?]+$/,jD="**/*",ou="[^/]",Ou="[^./]",OD=process.platform==="win32";d(({config:u,path:e},t=tn())=>{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");OD&&(e=k(e));const D=h.dirname(e),{files:n,include:r,exclude:o,compilerOptions:i}=u,a=n?.map(p=>ru(D,p)),l=nn(i),f=t?"":"i",F=(o||rn(i)).map(p=>{const g=ru(D,p),y=kD(g).replaceAll("\\*\\*/","(.+/)?").replaceAll("\\*",`${ou}*`).replaceAll("\\?",ou);return new RegExp(`^${y}($|/)`,f)}),c=n||r?r:[jD],E=c?c.map(p=>{let g=ru(D,p);sn.test(g)&&(g=ru(g,jD));const y=kD(g).replaceAll("/\\*\\*",`(/${ju}${Ou}${ou}*)*?`).replaceAll(/(\/)?\\\*/g,(j,v)=>{const C=`(${Ou}|(\\.(?!min\\.js$))?)*`;return v?`/${ju}${Ou}${C}`:C}).replaceAll(/(\/)?\\\?/g,(j,v)=>{const C=ou;return v?`/${ju}${C}`:C});return new RegExp(`^${y}$`,f)}):void 0;return p=>{if(!h.isAbsolute(p))throw new Error("filePath must be absolute");if(OD&&(p=k(p)),a!=null&&a.includes(p)||!(!l.some(g=>p.endsWith(g))||F.some(g=>g.test(p)))&&E&&E.some(g=>g.test(p)))return u}},"createFilesMatcher");const TD="resolve-tsconfig-paths",an=s(u=>u[0]===".","isRelative"),ln=s(u=>u[0]==="/"||/^[\s\S]:/.test(u),"isAbsolute"),cn=s(u=>u[0]==="#","isImports"),PD=s(u=>{const e=Qt(u);return e?{name:TD,async resolveId(t,D,n){if(!D||an(t)||ln(t)||cn(t)||t.startsWith("\0"))return null;const r=e(t);for(const o of r){const i=await this.resolve(o,D,{skipSelf:!0,...n});if(i)return i}return null}}:{name:TD}},"resolveTsconfigPaths"),SD=/^#!.*/,Fn=s(()=>({name:"strip-hashbang",transform:s(u=>{if(!SD.test(u))return null;const e=new Mu(u);return e.replace(SD,""),{code:e.toString(),map:e.generateMap({hires:!0})}},"transform")}),"stripHashbang"),Cn=["peerDependencies","dependencies","optionalDependencies"],Tu="@types/",ND=s((u,e,t=!1)=>{const D=[],{devDependencies:n}=u;for(const r of Cn){const o=u[r];if(!o)continue;const i=Object.keys(o);for(const a of i)if(!(a in e))if(a.startsWith(Tu)){if(t){let l=a.slice(Tu.length);l.includes("__")&&(l=`@${l.replace("__","/")}`),D.push(l)}}else{if(n&&t){const l=Tu+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"),ID=s(u=>u.split("?")[0],"stripQuery"),_D={type:s(async(u,e)=>{const[t,D]=await Promise.all([Promise.resolve().then(function(){return require("./rollup-plugin-dts-Bhb-wA8a.js")}),Promise.resolve().then(function(){return require("./local-typescript-loader-CmIewcVg.js")}).then(function(n){return n.localTypescriptLoader})]);return{input:[],preserveEntrySignatures:"strict",plugins:[cD(u),...e?[PD(e)]:[],FD(),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:s((u,e,t,D,n)=>{const r={target:u.target,tsconfigRaw:n?.config};return{input:[],preserveEntrySignatures:"strict",plugins:[cD(u),...n?[PD(n)]:[],FD(),ZD({entries:e}),GD({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),...Object.keys(t).length>0?[_u({preventAssignment:!0,objectGuards:!0,values:t})]:[],Fn(),KD(),JD(),xt(r),$t(),...u.minify?[jt(r)]:[],Ot(D)],output:[],external:[]}},"app")},fn=s(async(u,e,t,D,n,r,o)=>{const i=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)])),f=ND(r,n),F=ND(r,n,!0);for(const{input:c,srcExtension:E,distExtension:p,exportEntry:g}of t){if(g.type==="types"){let B=a.type;B||(B=await _D.type(D,o),B.external=F,a.type=B),B.input.includes(c)||B.input.push(c),B.output.push({dir:e,entryFileNames:s(m=>T.realpathSync.native(ID(m.facadeModuleId)).slice(u.length,-E.length)+p,"entryFileNames"),exports:"auto",format:"esm"});continue}let y=a.app;y||(y=_D.app(D,n,l,i,o),y.external=f,a.app=y),y.input.includes(c)||y.input.push(c);const j=y.output,v=h.extname(g.outputPath),C=`${g.type}-${v}`;if(!j[C]){const B={dir:e,exports:"auto",format:g.type,chunkFileNames:`[name]-[hash]${v}`,sourcemap:D.sourcemap,plugins:[vt(g.type==="module")],entryFileNames:s(m=>{const w=T.realpathSync.native(ID(m.facadeModuleId)).slice(u.length);return h.join(h.dirname(w),m.name)+p},"entryFileNames")};j.push(B),j[C]=B}}return a},"getRollupConfigs"),pn=s(u=>{if(!u)return Kt();const e=h.resolve(u),t=$D(e);return{path:e,config:t}},"getTsconfig");let _=!0;const q=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let K=0;if(q.process&&q.process.env&&q.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:t,TERM:D,COLORTERM:n}=q.process.env;e||t||u==="0"?_=!1:u==="1"||u==="2"||u==="3"?_=!0:D==="dumb"?_=!1:"CI"in q.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in q.process.env)?_=!0:_=process.stdout.isTTY,_&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?K=3:D&&(D.endsWith("-256color")||D.endsWith("256"))?K=2:K=1)}let RD={enabled:_,supportLevel:K};function En(u,e,t=1){const D=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>RD.enabled&&RD.supportLevel>=t?D+(""+o).replace(r,D)+n:""+o}s(En,"kolorist");const dn=En(90,39),hn=s(()=>new Date().toLocaleTimeString(),"currentTime"),su=s((...u)=>console.log(`[${dn(hn())}]`,...u),"log"),gn=s(async u=>{await Eu(u)&&await T.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:LD}=JSON,R=Et({name:"pkgroll",version:dt,flags:{src:{type:String,description:"Source directory",default:"./src"},dist:{type:String,description:"Distribution directory",default:"./dist"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},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:s(u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${LD(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:s((u,e)=>(e.flagOperator=t=>t.name==="env"?".key=":" ",e.render(u)),"render")}}),MD=process.cwd(),UD=Du(R.flags.src,!0),J=Du(R.flags.dist,!0),WD=pn(R.flags.tsconfig),qD=WD?.config.compilerOptions?.target;qD&&R.flags.target.push(qD),(async()=>{const u=await ht(MD);let e=mt(u);if(e=e.filter(n=>{const r=n.outputPath.startsWith(J);return r||console.warn(`Ignoring entry outside of ${J} directory: package.json#${n.from}=${LD(n.outputPath)}`),r}),e.length===0)throw new Error("No export entries found in package.json");const t=await Promise.all(e.map(async n=>({...await wt(n,UD,J),exportEntry:n}))),D=await fn(Du(T.realpathSync.native(UD),!0),J,t,R.flags,Bt(u,MD),u,WD);R.flags.cleanDist&&await gn(J),R.flags.watch?(su("Watch initialized"),Object.values(D).map(async n=>{Iu.watch(n).on("event",async o=>{o.code==="BUNDLE_START"&&su("Building",...Array.isArray(o.input)?o.input:[o.input]),o.code==="BUNDLE_END"&&(await Promise.all(n.output.map(i=>o.result.write(i))),su("Built",...Array.isArray(o.input)?o.input:[o.input])),o.code==="ERROR"&&su("Error:",o.error.message)})})):await Promise.all(Object.values(D).map(async n=>{const r=await Iu.rollup(n);return Promise.all(n.output.map(o=>r.write(o)))}))})().catch(u=>{console.error(u),process.exit(1)});
|
|
30
|
+
`,"load")}),"createRequire"),St=s(u=>{const e=Mu({[CD]:u}).renderChunk;return{name:"create-require-insert-format",renderChunk:{order:"pre",handler:typeof e=="function"?e:e.handler}}},"isFormatEsm"),Pt=s(u=>{const e=ee.createFilter(/\.([cm]?ts|[jt]sx)$/);return{name:"esbuild-transform",transform:s(async(t,D)=>{if(!e(D))return null;const n=await Wu.transform(t,{...u,loader:"default",sourcefile:D.replace(/\.[cm]ts/,".ts")});return{code:n.code,map:n.map||null}},"transform")}},"esbuildTransform"),Nt=s(u=>{if(u==="es")return"esm";if(u==="cjs"||u==="iife")return u},"getEsbuildFormat"),It=s(u=>({name:"esbuild-minify",renderChunk:s(async(e,t,D)=>{const n=await Wu.transform(e,{...u,format:Nt(D.format),minify:!0,keepNames:!0});return{code:n.code,map:n.map||null}},"renderChunk")}),"esbuildMinify"),Bu=s((u,e)=>u[0]-e[0]||u[1]-e[1]||u[2]-e[2],"compareSemver"),fD=s(({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!(Bu(n,[12,20,0])>=0&&Bu(n,[13,0,0])<0||Bu(n,[14,13,1])>=0)});return{name:"externalize-node-builtins",resolveId:s(t=>{const D=t.startsWith("node:");if(e&&D&&(t=t.slice(5)),Uu.builtinModules.includes(t)||D)return{id:t,external:!0}},"resolveId")}},"externalizeNodeBuiltins"),Rt=s(u=>({name:"patch-binary",renderChunk:s((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 qu(e);return o.prepend(`#!/usr/bin/env node
|
|
31
|
+
`),{code:o.toString(),map:D.sourcemap?o.generateMap({hires:!0}):void 0}}},"renderChunk"),writeBundle:s(async(e,t)=>{const D=e.entryFileNames,n=Object.values(t).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const i=`./${h.posix.join(e.dir,D(o))}`;await S.promises.chmod(i,493)}});await Promise.all(n)},"writeBundle")}),"patchBinary"),pD=s(()=>{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=s(u=>u!==null&&typeof u=="object","A"),W=s((u,e)=>Object.assign(new Error(`[${u}]: ${e}`),{code:u}),"a"),dD="ERR_INVALID_PACKAGE_CONFIG",Au="ERR_INVALID_PACKAGE_TARGET",_t="ERR_PACKAGE_PATH_NOT_EXPORTED",Lt=/^\d+$/,Mt=/^(\.{1,2}|node_modules)$/i,Wt=/\/|\\/;var hD=(u=>(u.Export="exports",u.Import="imports",u))(hD||{});const bu=s((u,e,t,D,n)=>{if(e==null)return[];if(typeof e=="string"){const[r,...o]=e.split(Wt);if(r===".."||o.some(i=>Mt.test(i)))throw W(Au,`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(Lt.test(r))throw W(dD,"Cannot contain numeric property keys");if(r==="default"||D.includes(r))return bu(u,e[r],t,D,n)}return[]}throw W(Au,`Invalid "${u}" target "${e}"`)},"f"),K="*",Ut=s((u,e)=>{const t=u.indexOf(K),D=e.indexOf(K);return t===D?e.length>u.length:D>t},"m");function qt(u,e){if(!e.includes(K)&&u.hasOwnProperty(e))return[e];let t,D;for(const n of Object.keys(u))if(n.includes(K)){const[r,o,i]=n.split(K);if(i===void 0&&e.startsWith(r)&&e.endsWith(o)){const a=e.slice(r.length,-o.length||void 0);a&&(!t||Ut(t,n))&&(t=n,D=a)}}return[t,D]}s(qt,"d");const Vt=s(u=>Object.keys(u).reduce((e,t)=>{const D=t===""||t[0]!==".";if(e===void 0||e===D)return D;throw W(dD,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),zt=/^\w+:/,Gt=s((u,e,t)=>{if(!u)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof u=="string"||Array.isArray(u)||ED(u)&&Vt(u))&&(u={".":u});const[D,n]=qt(u,e),r=bu(hD.Export,u[D],e,t,n);if(r.length===0)throw W(_t,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(Au,`Invalid "exports" target "${o}" defined in the package config`);return r},"v");var Kt=Object.defineProperty,F=s((u,e)=>Kt(u,"name",{value:e,configurable:!0}),"l");function k(u){return u.startsWith("\\\\?\\")?u:u.replace(/\\/g,"/")}s(k,"B"),F(k,"slash");const yu=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"),j=yu("existsSync"),Jt=yu("readFileSync"),tu=yu("statSync"),gD=F((u,e,t)=>{for(;;){const D=h.posix.join(u,e);if(j(t,D))return D;const n=h.dirname(u);if(n===u)return;u=n}},"findUp"),wu=/^\.{1,2}(\/.*)?$/,$u=F(u=>{const e=k(u);return wu.test(e)?e:`./${e}`},"normalizeRelativePath");function mD(u,e=!1){const t=u.length;let D=0,n="",r=0,o=16,i=0,a=0,l=0,f=0,C=0;function c(p,B){let m=0,y=0;for(;m<p||!B;){let w=u.charCodeAt(D);if(w>=48&&w<=57)y=y*16+w-48;else if(w>=65&&w<=70)y=y*16+w-65+10;else if(w>=97&&w<=102)y=y*16+w-97+10;else break;D++,m++}return m<p&&(y=-1),y}s(c,"O"),F(c,"scanHexDigits");function d(p){D=p,n="",r=0,o=16,C=0}s(d,"v"),F(d,"setPosition");function E(){let p=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(p,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(p,B)}s(E,"A"),F(E,"scanNumber");function g(){let p="",B=D;for(;;){if(D>=t){p+=u.substring(B,D),C=2;break}const m=u.charCodeAt(D);if(m===34){p+=u.substring(B,D),D++;break}if(m===92){if(p+=u.substring(B,D),D++,D>=t){C=2;break}switch(u.charCodeAt(D++)){case 34:p+='"';break;case 92:p+="\\";break;case 47:p+="/";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+=`
|
|
32
|
+
`;break;case 114:p+="\r";break;case 116:p+=" ";break;case 117:const y=c(4,!0);y>=0?p+=String.fromCharCode(y):C=4;break;default:C=5}B=D;continue}if(m>=0&&m<=31)if(U(m)){p+=u.substring(B,D),C=2;break}else C=6;D++}return p}s(g,"b"),F(g,"scanString");function b(){if(n="",C=0,r=D,a=i,f=l,D>=t)return r=t,o=17;let p=u.charCodeAt(D);if(nu(p)){do D++,n+=String.fromCharCode(p),p=u.charCodeAt(D);while(nu(p));return o=15}if(U(p))return D++,n+=String.fromCharCode(p),p===13&&u.charCodeAt(D)===10&&(D++,n+=`
|
|
33
|
+
`),i++,l=D,o=14;switch(p){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 y=!1;for(;D<m;){const w=u.charCodeAt(D);if(w===42&&u.charCodeAt(D+1)===47){D+=2,y=!0;break}D++,U(w)&&(w===13&&u.charCodeAt(D)===10&&D++,i++,l=D)}return y||(D++,C=1),n=u.substring(B,D),o=13}return n+=String.fromCharCode(p),D++,o=16;case 45:if(n+=String.fromCharCode(p),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+=E(),o=11;default:for(;D<t&&O(p);)D++,p=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(p),D++,o=16}}s(b,"$"),F(b,"scanNext");function O(p){if(nu(p)||U(p))return!1;switch(p){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}s(O,"U"),F(O,"isUnknownContentCharacter");function v(){let p;do p=b();while(p>=12&&p<=15);return p}return s(v,"E"),F(v,"scanNextNonTrivia"),{setPosition:d,getPosition:F(()=>D,"getPosition"),scan:e?v:b,getToken:F(()=>o,"getToken"),getTokenValue:F(()=>n,"getTokenValue"),getTokenOffset:F(()=>r,"getTokenOffset"),getTokenLength:F(()=>D-r,"getTokenLength"),getTokenStartLine:F(()=>a,"getTokenStartLine"),getTokenStartCharacter:F(()=>r-f,"getTokenStartCharacter"),getTokenError:F(()=>C,"getTokenError")}}s(mD,"_e"),F(mD,"createScanner");function nu(u){return u===32||u===9}s(nu,"G"),F(nu,"isWhiteSpace");function U(u){return u===10||u===13}s(U,"h"),F(U,"isLineBreak");function R(u){return u>=48&&u<=57}s(R,"N"),F(R,"isDigit");var BD;(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"})(BD||(BD={})),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 AD(u,e=[],t=ru.DEFAULT){let D=null,n=[];const r=[];function o(i){Array.isArray(n)?n.push(i):D!==null&&(n[D]=i)}return s(o,"r"),F(o,"onValue"),bD(u,{onObjectBegin:F(()=>{const i={};o(i),r.push(n),n=i,D=null},"onObjectBegin"),onObjectProperty:F(i=>{D=i},"onObjectProperty"),onObjectEnd:F(()=>{n=r.pop()},"onObjectEnd"),onArrayBegin:F(()=>{const i=[];o(i),r.push(n),n=i,D=null},"onArrayBegin"),onArrayEnd:F(()=>{n=r.pop()},"onArrayEnd"),onLiteralValue:o,onError:F((i,a,l)=>{e.push({error:i,offset:a,length:l})},"onError")},t),n[0]}s(AD,"$e"),F(AD,"parse$1");function bD(u,e,t=ru.DEFAULT){const D=mD(u,!1),n=[];function r(A){return A?()=>A(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}s(r,"s"),F(r,"toNoArgVisit");function o(A){return A?()=>A(D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}s(o,"r"),F(o,"toNoArgVisitWithPath");function i(A){return A?$=>A($,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter()):()=>!0}s(i,"f"),F(i,"toOneArgVisit");function a(A){return A?$=>A($,D.getTokenOffset(),D.getTokenLength(),D.getTokenStartLine(),D.getTokenStartCharacter(),()=>n.slice()):()=>!0}s(a,"u"),F(a,"toOneArgVisitWithPath");const l=o(e.onObjectBegin),f=a(e.onObjectProperty),C=r(e.onObjectEnd),c=o(e.onArrayBegin),d=r(e.onArrayEnd),E=a(e.onLiteralValue),g=i(e.onSeparator),b=r(e.onComment),O=i(e.onError),v=t&&t.disallowComments,p=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):b();break;case 16:m(1);break;case 15:case 14:break;default:return A}}}s(B,"m"),F(B,"scanNext");function m(A,$=[],_u=[]){if(O(A),$.length+_u.length>0){let Y=D.getToken();for(;Y!==17;){if($.indexOf(Y)!==-1){B();break}else if(_u.indexOf(Y)!==-1)break;Y=B()}}}s(m,"g"),F(m,"handleError");function y(A){const $=D.getTokenValue();return A?E($):(f($),n.push($)),B(),!0}s(y,"y"),F(y,"parseString");function w(){switch(D.getToken()){case 11:const A=D.getTokenValue();let $=Number(A);isNaN($)&&(m(2),$=0),E($);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return B(),!0}s(w,"j"),F(w,"parseLiteral");function lu(){return D.getToken()!==10?(m(3,[],[2,5]),!1):(y(!1),D.getToken()===6?(g(":"),B(),H()||m(4,[],[2,5])):m(5,[],[2,5]),n.pop(),!0)}s(lu,"ke"),F(lu,"parseProperty");function Iu(){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&&p)break}else A&&m(6,[],[]);lu()||m(4,[],[2,5]),A=!0}return C(),D.getToken()!==2?m(7,[2],[]):B(),!0}s(Iu,"be"),F(Iu,"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&&p)break}else $&&m(6,[],[]);A?(n.push(0),A=!1):n[n.length-1]++,H()||m(4,[],[4,5]),$=!0}return d(),A||n.pop(),D.getToken()!==4?m(8,[4],[]):B(),!0}s(Ru,"we"),F(Ru,"parseArray");function H(){switch(D.getToken()){case 3:return Ru();case 1:return Iu();case 10:return y(!0);default:return w()}}return s(H,"V"),F(H,"parseValue"),B(),D.getToken()===17?t.allowEmptyContent?!0:(m(4,[],[]),!1):H()?(D.getToken()!==17&&m(9,[],[]),!0):(m(4,[],[]),!1)}s(bD,"ye"),F(bD,"visit");var yD;(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"})(yD||(yD={}));var wD;(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"})(wD||(wD={}));const Zt=AD;var $D;(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"})($D||($D={}));const vD=F((u,e)=>Zt(Jt(e,u,"utf8")),"readJsonc"),vu=Symbol("implicitBaseUrl"),N="${configDir}",Ht=F(()=>{const{findPnpApi:u}=Uu;return u&&u(process.cwd())},"getPnpApi"),xu=F((u,e,t,D)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${t}`;if(D!=null&&D.has(n))return D.get(n);const r=vD(u,D);if(!r)return;let o=e||"tsconfig.json";if(!t&&r.exports)try{const[i]=Gt(r.exports,e,["require","types"]);o=i}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=h.join(u,"..",o),D?.set(n,o),o},"resolveFromPackageJsonPath"),ku="package.json",Ou="tsconfig.json",Yt=F((u,e,t)=>{let D=u;if(u===".."&&(D=h.join(D,Ou)),u[0]==="."&&(D=h.resolve(e,D)),h.isAbsolute(D)){if(j(t,D)){if(tu(t,D).isFile())return D}else if(!D.endsWith(".json")){const d=`${D}.json`;if(j(t,d))return d}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,i=r.join("/"),a=Ht();if(a){const{resolveRequest:d}=a;try{if(o===u){const E=d(h.join(o,ku),e);if(E){const g=xu(E,i,!1,t);if(g&&j(t,g))return g}}else{let E;try{E=d(u,e,{extensions:[".json"]})}catch{E=d(h.join(u,Ou),e)}if(E)return E}}catch{}}const l=gD(h.resolve(e),h.join("node_modules",o),t);if(!l||!tu(t,l).isDirectory())return;const f=h.join(l,ku);if(j(t,f)){const d=xu(f,i,!1,t);if(d===!1)return;if(d&&j(t,d)&&tu(t,d).isFile())return d}const C=h.join(l,i),c=C.endsWith(".json");if(!c){const d=`${C}.json`;if(j(t,d))return d}if(j(t,C)){if(tu(t,C).isDirectory()){const d=h.join(C,ku);if(j(t,d)){const g=xu(d,"",!0,t);if(g&&j(t,g))return g}const E=h.join(C,Ou);if(j(t,E))return E}else if(c)return C}},"resolveExtendsPath"),ju=F((u,e)=>$u(h.relative(u,e)),"pathRelative"),xD=["files","include","exclude"],Qt=F((u,e,t,D)=>{const n=Yt(u,e,D);if(!n)throw new Error(`File '${u}' not found.`);if(t.has(n))throw new Error(`Circularity detected while resolving configuration: ${n}`);t.add(n);const r=h.dirname(n),o=kD(n,D,t);delete o.references;const{compilerOptions:i}=o;if(i){const{baseUrl:a}=i;a&&!a.startsWith(N)&&(i.baseUrl=k(h.relative(e,h.join(r,a)))||"./");let{outDir:l}=i;l&&(l.startsWith(N)||(l=h.relative(e,h.join(r,l))),i.outDir=k(l)||"./")}for(const a of xD){const l=o[a];l&&(o[a]=l.map(f=>f.startsWith(N)?f:k(h.relative(e,h.join(r,f)))))}return o},"resolveExtends"),Xt=["outDir","declarationDir"],kD=F((u,e,t=new Set)=>{let D;try{D=vD(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[vu]=n)}if(D.extends){const r=Array.isArray(D.extends)?D.extends:[D.extends];delete D.extends;for(const o of r.reverse()){const i=Qt(o,n,new Set(t),e),a={...i,...D,compilerOptions:{...i.compilerOptions,...D.compilerOptions}};i.watchOptions&&(a.watchOptions={...i.watchOptions,...D.watchOptions}),D=a}}if(D.compilerOptions){const{compilerOptions:r}=D,o=["baseUrl","rootDir"];for(const i of o){const a=r[i];if(a&&!a.startsWith(N)){const l=h.resolve(n,a),f=ju(n,l);r[i]=f}}for(const i of Xt){let a=r[i];a&&(Array.isArray(D.exclude)||(D.exclude=[]),D.exclude.includes(a)||D.exclude.push(a),a.startsWith(N)||(a=$u(a)),r[i]=a)}}else D.compilerOptions={};if(D.include?(D.include=D.include.map(k),D.files&&delete D.files):D.files&&(D.files=D.files.map(r=>r.startsWith(N)?r:$u(r))),D.watchOptions){const{watchOptions:r}=D;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>k(h.resolve(n,o))))}return D},"_parseTsconfig"),ou=F((u,e)=>{if(u.startsWith(N))return k(h.join(e,u.slice(N.length)))},"interpolateConfigDir"),un=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],OD=F((u,e=new Map)=>{const t=h.resolve(u),D=kD(t,e),n=h.dirname(t),{compilerOptions:r}=D;if(r){for(const i of un){const a=r[i];if(a){const l=ou(a,n);r[i]=l?ju(n,l):a}}for(const i of["rootDirs","typeRoots"]){const a=r[i];a&&(r[i]=a.map(l=>{const f=ou(l,n);return f?ju(n,f):l}))}const{paths:o}=r;if(o)for(const i of Object.keys(o))o[i]=o[i].map(a=>{var l;return(l=ou(a,n))!=null?l:a})}for(const o of xD){const i=D[o];i&&(D[o]=i.map(a=>{var l;return(l=ou(a,n))!=null?l:a}))}return D},"parseTsconfig"),Dn=F((u=process.cwd(),e="tsconfig.json",t=new Map)=>{const D=gD(k(u),e,t);if(!D)return null;const n=OD(D,t);return{path:D,config:n}},"getTsconfig"),en=/\*/g,jD=F((u,e)=>{const t=u.match(en);if(t&&t.length>1)throw new Error(e)},"assertStarCount"),tn=F(u=>{if(u.includes("*")){const[e,t]=u.split("*");return{prefix:e,suffix:t}}return u},"parsePattern"),nn=F(({prefix:u,suffix:e},t)=>t.startsWith(u)&&t.endsWith(e),"isPatternMatch"),rn=F((u,e,t)=>Object.entries(u).map(([D,n])=>(jD(D,`Pattern '${D}' can have at most one '*' character.`),{pattern:tn(D),substitutions:n.map(r=>{if(jD(r,`Substitution '${r}' in pattern '${D}' can have at most one '*' character.`),!e&&!wu.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"),on=F(u=>{const{compilerOptions:e}=u.config;if(!e)return null;const{baseUrl:t,paths:D}=e;if(!t&&!D)return null;const n=vu in e&&e[vu],r=h.resolve(h.dirname(u.path),t||n||"."),o=D?rn(D,t,r):[];return i=>{if(wu.test(i))return[];const a=[];for(const c of o){if(c.pattern===i)return c.substitutions.map(k);typeof c.pattern!="string"&&a.push(c)}let l,f=-1;for(const c of a)nn(c.pattern,i)&&c.pattern.prefix.length>f&&(f=c.pattern.prefix.length,l=c);if(!l)return t?[k(h.join(r,i))]:[];const C=i.slice(l.pattern.prefix.length,i.length-l.pattern.suffix.length);return l.substitutions.map(c=>k(c.replace("*",C)))}},"createPathsMatcher"),TD=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"),sn=65,an=97,ln=F(()=>Math.floor(Math.random()*26),"m"),cn=F(u=>Array.from({length:u},()=>String.fromCodePoint(ln()+(Math.random()>.5?sn:an))).join(""),"S"),Fn=F((u=te)=>{const e=process.execPath;if(u.existsSync(e))return!u.existsSync(TD(e));const t=`/${cn(10)}`;u.writeFileSync(t,"");const D=!u.existsSync(TD(t));return u.unlinkSync(t),D},"l"),{join:su}=h.posix,Tu={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Cn=F(u=>{const e=[...Tu.ts],t=[...Tu.cts],D=[...Tu.mts];return u!=null&&u.allowJs&&(e.push(".js",".jsx"),t.push(".cjs"),D.push(".mjs")),[...e,...t,...D]},"getSupportedExtensions"),fn=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"),SD=F(u=>u.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),pn=["node_modules","bower_components","jspm_packages"],Su=`(?!(${pn.join("|")})(/|$))`,En=/(?:^|\/)[^.*?]+$/,PD="**/*",iu="[^/]",Pu="[^./]",ND=process.platform==="win32";F(({config:u,path:e},t=Fn())=>{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");ND&&(e=k(e));const D=h.dirname(e),{files:n,include:r,exclude:o,compilerOptions:i}=u,a=n?.map(E=>su(D,E)),l=Cn(i),f=t?"":"i",C=(o||fn(i)).map(E=>{const g=su(D,E),b=SD(g).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${iu}*`).replaceAll(String.raw`\?`,iu);return new RegExp(`^${b}($|/)`,f)}),c=n||r?r:[PD],d=c?c.map(E=>{let g=su(D,E);En.test(g)&&(g=su(g,PD));const b=SD(g).replaceAll(String.raw`/\*\*`,`(/${Su}${Pu}${iu}*)*?`).replaceAll(/(\/)?\\\*/g,(O,v)=>{const p=`(${Pu}|(\\.(?!min\\.js$))?)*`;return v?`/${Su}${Pu}${p}`:p}).replaceAll(/(\/)?\\\?/g,(O,v)=>{const p=iu;return v?`/${Su}${p}`:p});return new RegExp(`^${b}$`,f)}):void 0;return E=>{if(!h.isAbsolute(E))throw new Error("filePath must be absolute");if(ND&&(E=k(E)),a!=null&&a.includes(E)||!(!l.some(g=>E.endsWith(g))||C.some(g=>g.test(E)))&&d&&d.some(g=>g.test(E)))return u}},"createFilesMatcher");const ID="resolve-tsconfig-paths",dn=s(u=>u[0]===".","isRelative"),hn=s(u=>u[0]==="/"||/^[\s\S]:/.test(u),"isAbsolute"),gn=s(u=>u[0]==="#","isImports"),RD=s(u=>{const e=on(u);return e?{name:ID,async resolveId(t,D,n){if(!D||dn(t)||hn(t)||gn(t)||t.startsWith("\0"))return null;const r=e(t);for(const o of r){const i=await this.resolve(o,D,{skipSelf:!0,...n});if(i)return i}return null}}:{name:ID}},"resolveTsconfigPaths"),_D=/^#!.*/,mn=s(()=>({name:"strip-hashbang",transform:s(u=>{if(!_D.test(u))return null;const e=new qu(u);return e.replace(_D,""),{code:e.toString(),map:e.generateMap({hires:!0})}},"transform")}),"stripHashbang"),Bn=["peerDependencies","dependencies","optionalDependencies"],Nu="@types/",LD=s((u,e,t=!1)=>{const D=[],{devDependencies:n}=u;for(const r of Bn){const o=u[r];if(!o)continue;const i=Object.keys(o);for(const a of i)if(!(a in e))if(a.startsWith(Nu)){if(t){let l=a.slice(Nu.length);l.includes("__")&&(l=`@${l.replace("__","/")}`),D.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.`)}D.push(a)}}return D.flatMap(r=>[r,new RegExp(`^${r}/`)])},"getExternalDependencies"),MD=s(u=>u.split("?")[0],"stripQuery"),WD={type:s(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)]:[],pD(),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:s((u,e,t,D,n)=>{const r={target:u.target,tsconfigRaw:n?.config};return{input:[],preserveEntrySignatures:"strict",plugins:[fD(u),...n?[RD(n)]:[],pD(),XD({entries:e}),HD({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),...Object.keys(t).length>0?[Mu({preventAssignment:!0,objectGuards:!0,values:t})]:[],mn(),YD(),QD(),Pt(r),Tt(),ue(),...u.minify?[It(r)]:[],Rt(D)],output:[],external:[]}},"app")},An=s(async(u,e,t,D,n,r,o)=>{const i=t.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),a=Object.create(null),l=Object.fromEntries(D.env.map(({key:c,value:d})=>[`process.env.${c}`,JSON.stringify(d)])),f=LD(r,n),C=LD(r,n,!0);for(const{input:c,srcExtension:d,distExtension:E,exportEntry:g}of t){if(g.type==="types"){let B=a.type;B||(B=await WD.type(D,o),B.external=C,a.type=B),B.input.includes(c)||B.input.push(c),B.output.push({dir:e,entryFileNames:s(m=>S.realpathSync.native(MD(m.facadeModuleId)).slice(u.length,-d.length)+E,"entryFileNames"),exports:"auto",format:"esm"});continue}let b=a.app;b||(b=WD.app(D,n,l,i,o),b.external=f,a.app=b),b.input.includes(c)||b.input.push(c);const O=b.output,v=h.extname(g.outputPath),p=`${g.type}-${v}`;if(!O[p]){const B={dir:e,exports:"auto",format:g.type,chunkFileNames:`[name]-[hash]${v}`,sourcemap:D.sourcemap,plugins:[St(g.type==="module")],entryFileNames:s(m=>{const w=S.realpathSync.native(MD(m.facadeModuleId)).slice(u.length);return h.join(h.dirname(w),m.name)+E},"entryFileNames")};O.push(B),O[p]=B}}return a},"getRollupConfigs"),bn=s(u=>{if(!u)return Dn();const e=h.resolve(u),t=OD(e);return{path:e,config:t}},"getTsconfig");let _=!0;const V=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let J=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"?_=!1:u==="1"||u==="2"||u==="3"?_=!0:D==="dumb"?_=!1:"CI"in V.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in V.process.env)?_=!0:_=process.stdout.isTTY,_&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?J=3:D&&(D.endsWith("-256color")||D.endsWith("256"))?J=2:J=1)}let UD={enabled:_,supportLevel:J};function yn(u,e,t=1){const D=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>UD.enabled&&UD.supportLevel>=t?D+(""+o).replace(r,D)+n:""+o}s(yn,"kolorist");const wn=yn(90,39),$n=s(()=>new Date().toLocaleTimeString(),"currentTime"),au=s((...u)=>console.log(`[${wn($n())}]`,...u),"log"),vn=s(async u=>{await hu(u)&&await S.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:qD}=JSON,L=At({name:"pkgroll",version:bt,flags:{src:{type:String,description:"Source directory",default:"./src"},dist:{type:String,description:"Distribution directory",default:"./dist"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},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:s(u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${qD(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:s((u,e)=>(e.flagOperator=t=>t.name==="env"?".key=":" ",e.render(u)),"render")}}),VD=process.cwd(),zD=eu(L.flags.src,!0),Z=eu(L.flags.dist,!0),GD=bn(L.flags.tsconfig),KD=GD?.config.compilerOptions?.target;KD&&L.flags.target.push(KD),(async()=>{const u=await yt(VD);let e=$t(u);if(e=e.filter(n=>{const r=n.outputPath.startsWith(Z);return r||console.warn(`Ignoring entry outside of ${Z} directory: package.json#${n.from}=${qD(n.outputPath)}`),r}),e.length===0)throw new Error("No export entries found in package.json");const t=await Promise.all(e.map(async n=>({...await jt(n,zD,Z),exportEntry:n}))),D=await An(eu(S.realpathSync.native(zD),!0),Z,t,L.flags,vt(u,VD),u,GD);L.flags.cleanDist&&await vn(Z),L.flags.watch?(au("Watch initialized"),Object.values(D).map(async n=>{Lu.watch(n).on("event",async o=>{o.code==="BUNDLE_START"&&au("Building",...Array.isArray(o.input)?o.input:[o.input]),o.code==="BUNDLE_END"&&(await Promise.all(n.output.map(i=>o.result.write(i))),au("Built",...Array.isArray(o.input)?o.input:[o.input])),o.code==="ERROR"&&au("Error:",o.error.message)})})):await Promise.all(Object.values(D).map(async n=>{const r=await Lu.rollup(n);return Promise.all(n.output.map(o=>r.write(o)))}))})().catch(u=>{console.error(u),process.exit(1)});
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,30 @@
|
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pkgroll",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Zero-config rollup bundler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zero config",
|
|
@@ -39,15 +39,16 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@rollup/plugin-alias": "^5.1.
|
|
43
|
-
"@rollup/plugin-commonjs": "^
|
|
42
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
43
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
44
|
+
"@rollup/plugin-dynamic-import-vars": "^2.1.5",
|
|
44
45
|
"@rollup/plugin-inject": "^5.0.5",
|
|
45
46
|
"@rollup/plugin-json": "^6.1.0",
|
|
46
|
-
"@rollup/plugin-node-resolve": "^
|
|
47
|
-
"@rollup/plugin-replace": "^
|
|
48
|
-
"@rollup/pluginutils": "^5.1.
|
|
49
|
-
"esbuild": "^0.
|
|
50
|
-
"magic-string": "^0.30.
|
|
51
|
-
"rollup": "^4.
|
|
47
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
48
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
49
|
+
"@rollup/pluginutils": "^5.1.4",
|
|
50
|
+
"esbuild": "^0.24.2",
|
|
51
|
+
"magic-string": "^0.30.17",
|
|
52
|
+
"rollup": "^4.29.1"
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var t=(e,o)=>n(e,"name",{value:o,configurable:!0});var a=require("module"),s=typeof document<"u"?document.currentScript:null,r=require;const u=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(u()),i=Object.freeze({__proto__:null,default:c});exports.localTypescriptLoader=i,exports.require=r,exports.ts=c;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";var st=Object.defineProperty;var b=(r,e)=>st(r,"name",{value:e,configurable:!0});var c=require("./local-typescript-loader-CmIewcVg.js"),it=require("path"),ut=require("tty"),ot=require("os"),ct=require("module"),lt=require("magic-string"),de=typeof document<"u"?document.currentScript:null;function ft(r){var e=Object.create(null);return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:b(function(){return r[t]},"get")})}}),e.default=r,Object.freeze(e)}b(ft,"_interopNamespaceDefault");var T=ft(it),W={},P={},j={};Object.defineProperty(j,"__esModule",{value:!0}),j.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,j.matchToToken=function(r){var e={type:"invalid",value:r[0],closed:void 0};return r[1]?(e.type="string",e.closed=!!(r[3]||r[4])):r[5]?e.type="comment":r[6]?(e.type="comment",e.closed=!!r[7]):r[8]?e.type="regex":r[9]?e.type="number":r[10]?e.type="name":r[11]?e.type="punctuator":r[12]&&(e.type="whitespace"),e};var me={},$={};Object.defineProperty($,"__esModule",{value:!0}),$.isIdentifierChar=ye,$.isIdentifierName=ht,$.isIdentifierStart=ge;let G="\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",he="\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 pt=new RegExp("["+G+"]"),dt=new RegExp("["+G+he+"]");G=he=null;const be=[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],mt=[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 z(r,e){let t=65536;for(let n=0,o=e.length;n<o;n+=2){if(t+=e[n],t>r)return!1;if(t+=e[n+1],t>=r)return!0}return!1}b(z,"isInAstralSet");function ge(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&pt.test(String.fromCharCode(r)):z(r,be)}b(ge,"isIdentifierStart");function ye(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&&dt.test(String.fromCharCode(r)):z(r,be)||z(r,mt)}b(ye,"isIdentifierChar");function ht(r){let e=!0;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if((n&64512)===55296&&t+1<r.length){const o=r.charCodeAt(++t);(o&64512)===56320&&(n=65536+((n&1023)<<10)+(o&1023))}if(e){if(e=!1,!ge(n))return!1}else if(!ye(n))return!1}return!e}b(ht,"isIdentifierName");var M={};Object.defineProperty(M,"__esModule",{value:!0}),M.isKeyword=xt,M.isReservedWord=ve,M.isStrictBindOnlyReservedWord=we,M.isStrictBindReservedWord=vt,M.isStrictReservedWord=xe;const V={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"]},bt=new Set(V.keyword),gt=new Set(V.strict),yt=new Set(V.strictBind);function ve(r,e){return e&&r==="await"||r==="enum"}b(ve,"isReservedWord");function xe(r,e){return ve(r,e)||gt.has(r)}b(xe,"isStrictReservedWord");function we(r){return yt.has(r)}b(we,"isStrictBindOnlyReservedWord");function vt(r,e){return xe(r,e)||we(r)}b(vt,"isStrictBindReservedWord");function xt(r){return bt.has(r)}b(xt,"isKeyword"),function(r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isIdentifierChar",{enumerable:!0,get:b(function(){return e.isIdentifierChar},"get")}),Object.defineProperty(r,"isIdentifierName",{enumerable:!0,get:b(function(){return e.isIdentifierName},"get")}),Object.defineProperty(r,"isIdentifierStart",{enumerable:!0,get:b(function(){return e.isIdentifierStart},"get")}),Object.defineProperty(r,"isKeyword",{enumerable:!0,get:b(function(){return t.isKeyword},"get")}),Object.defineProperty(r,"isReservedWord",{enumerable:!0,get:b(function(){return t.isReservedWord},"get")}),Object.defineProperty(r,"isStrictBindOnlyReservedWord",{enumerable:!0,get:b(function(){return t.isStrictBindOnlyReservedWord},"get")}),Object.defineProperty(r,"isStrictBindReservedWord",{enumerable:!0,get:b(function(){return t.isStrictBindReservedWord},"get")}),Object.defineProperty(r,"isStrictReservedWord",{enumerable:!0,get:b(function(){return t.isStrictReservedWord},"get")});var e=$,t=M}(me);function wt(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}b(wt,"commonjsRequire");var U={exports:{}};let Se=process.argv||[],A=process.env,St=!("NO_COLOR"in A||Se.includes("--no-color"))&&("FORCE_COLOR"in A||Se.includes("--color")||process.platform==="win32"||wt!=null&&ut.isatty(1)&&A.TERM!=="dumb"||"CI"in A),Et=b((r,e,t=r)=>n=>{let o=""+n,h=o.indexOf(e,r.length);return~h?r+Ct(o,e,t,h)+e:r+o+e},"formatter"),Ct=b((r,e,t,n)=>{let o="",h=0;do o+=r.substring(h,n)+t,h=n+e.length,n=r.indexOf(e,h);while(~n);return o+r.substring(h)},"replaceClose"),Ee=b((r=St)=>{let e=r?Et:()=>String;return{isColorSupported:r,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m")}},"createColors");U.exports=Ee(),U.exports.createColors=Ee;var Ce=U.exports,H={exports:{}},X,Te;function Tt(){if(Te)return X;Te=1;var r=/[|\\{}()[\]^$+*?.]/g;return X=b(function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(r,"\\$&")},"escapeStringRegexp"),X}b(Tt,"requireEscapeStringRegexp");var L={exports:{}},Y={exports:{}},J,Ne;function Nt(){return Ne||(Ne=1,J={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]}),J}b(Nt,"requireColorName");var Oe;function ke(){if(Oe)return Y.exports;Oe=1;var r=Nt(),e={};for(var t in r)r.hasOwnProperty(t)&&(e[r[t]]=t);var n=Y.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in n)if(n.hasOwnProperty(o)){if(!("channels"in n[o]))throw new Error("missing channels property: "+o);if(!("labels"in n[o]))throw new Error("missing channel labels property: "+o);if(n[o].labels.length!==n[o].channels)throw new Error("channel and label counts mismatch: "+o);var h=n[o].channels,p=n[o].labels;delete n[o].channels,delete n[o].labels,Object.defineProperty(n[o],"channels",{value:h}),Object.defineProperty(n[o],"labels",{value:p})}n.rgb.hsl=function(a){var s=a[0]/255,i=a[1]/255,u=a[2]/255,l=Math.min(s,i,u),m=Math.max(s,i,u),f=m-l,d,y,v;return m===l?d=0:s===m?d=(i-u)/f:i===m?d=2+(u-s)/f:u===m&&(d=4+(s-i)/f),d=Math.min(d*60,360),d<0&&(d+=360),v=(l+m)/2,m===l?y=0:v<=.5?y=f/(m+l):y=f/(2-m-l),[d,y*100,v*100]},n.rgb.hsv=function(a){var s,i,u,l,m,f=a[0]/255,d=a[1]/255,y=a[2]/255,v=Math.max(f,d,y),w=v-Math.min(f,d,y),x=b(function(S){return(v-S)/6/w+1/2},"diffc");return w===0?l=m=0:(m=w/v,s=x(f),i=x(d),u=x(y),f===v?l=u-i:d===v?l=1/3+s-u:y===v&&(l=2/3+i-s),l<0?l+=1:l>1&&(l-=1)),[l*360,m*100,v*100]},n.rgb.hwb=function(a){var s=a[0],i=a[1],u=a[2],l=n.rgb.hsl(a)[0],m=1/255*Math.min(s,Math.min(i,u));return u=1-1/255*Math.max(s,Math.max(i,u)),[l,m*100,u*100]},n.rgb.cmyk=function(a){var s=a[0]/255,i=a[1]/255,u=a[2]/255,l,m,f,d;return d=Math.min(1-s,1-i,1-u),l=(1-s-d)/(1-d)||0,m=(1-i-d)/(1-d)||0,f=(1-u-d)/(1-d)||0,[l*100,m*100,f*100,d*100]};function g(a,s){return Math.pow(a[0]-s[0],2)+Math.pow(a[1]-s[1],2)+Math.pow(a[2]-s[2],2)}return b(g,"comparativeDistance"),n.rgb.keyword=function(a){var s=e[a];if(s)return s;var i=1/0,u;for(var l in r)if(r.hasOwnProperty(l)){var m=r[l],f=g(a,m);f<i&&(i=f,u=l)}return u},n.keyword.rgb=function(a){return r[a]},n.rgb.xyz=function(a){var s=a[0]/255,i=a[1]/255,u=a[2]/255;s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92;var l=s*.4124+i*.3576+u*.1805,m=s*.2126+i*.7152+u*.0722,f=s*.0193+i*.1192+u*.9505;return[l*100,m*100,f*100]},n.rgb.lab=function(a){var s=n.rgb.xyz(a),i=s[0],u=s[1],l=s[2],m,f,d;return i/=95.047,u/=100,l/=108.883,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,l=l>.008856?Math.pow(l,1/3):7.787*l+16/116,m=116*u-16,f=500*(i-u),d=200*(u-l),[m,f,d]},n.hsl.rgb=function(a){var s=a[0]/360,i=a[1]/100,u=a[2]/100,l,m,f,d,y;if(i===0)return y=u*255,[y,y,y];u<.5?m=u*(1+i):m=u+i-u*i,l=2*u-m,d=[0,0,0];for(var v=0;v<3;v++)f=s+1/3*-(v-1),f<0&&f++,f>1&&f--,6*f<1?y=l+(m-l)*6*f:2*f<1?y=m:3*f<2?y=l+(m-l)*(2/3-f)*6:y=l,d[v]=y*255;return d},n.hsl.hsv=function(a){var s=a[0],i=a[1]/100,u=a[2]/100,l=i,m=Math.max(u,.01),f,d;return u*=2,i*=u<=1?u:2-u,l*=m<=1?m:2-m,d=(u+i)/2,f=u===0?2*l/(m+l):2*i/(u+i),[s,f*100,d*100]},n.hsv.rgb=function(a){var s=a[0]/60,i=a[1]/100,u=a[2]/100,l=Math.floor(s)%6,m=s-Math.floor(s),f=255*u*(1-i),d=255*u*(1-i*m),y=255*u*(1-i*(1-m));switch(u*=255,l){case 0:return[u,y,f];case 1:return[d,u,f];case 2:return[f,u,y];case 3:return[f,d,u];case 4:return[y,f,u];case 5:return[u,f,d]}},n.hsv.hsl=function(a){var s=a[0],i=a[1]/100,u=a[2]/100,l=Math.max(u,.01),m,f,d;return d=(2-i)*u,m=(2-i)*l,f=i*l,f/=m<=1?m:2-m,f=f||0,d/=2,[s,f*100,d*100]},n.hwb.rgb=function(a){var s=a[0]/360,i=a[1]/100,u=a[2]/100,l=i+u,m,f,d,y;l>1&&(i/=l,u/=l),m=Math.floor(6*s),f=1-u,d=6*s-m,m&1&&(d=1-d),y=i+d*(f-i);var v,w,x;switch(m){default:case 6:case 0:v=f,w=y,x=i;break;case 1:v=y,w=f,x=i;break;case 2:v=i,w=f,x=y;break;case 3:v=i,w=y,x=f;break;case 4:v=y,w=i,x=f;break;case 5:v=f,w=i,x=y;break}return[v*255,w*255,x*255]},n.cmyk.rgb=function(a){var s=a[0]/100,i=a[1]/100,u=a[2]/100,l=a[3]/100,m,f,d;return m=1-Math.min(1,s*(1-l)+l),f=1-Math.min(1,i*(1-l)+l),d=1-Math.min(1,u*(1-l)+l),[m*255,f*255,d*255]},n.xyz.rgb=function(a){var s=a[0]/100,i=a[1]/100,u=a[2]/100,l,m,f;return l=s*3.2406+i*-1.5372+u*-.4986,m=s*-.9689+i*1.8758+u*.0415,f=s*.0557+i*-.204+u*1.057,l=l>.0031308?1.055*Math.pow(l,1/2.4)-.055:l*12.92,m=m>.0031308?1.055*Math.pow(m,1/2.4)-.055:m*12.92,f=f>.0031308?1.055*Math.pow(f,1/2.4)-.055:f*12.92,l=Math.min(Math.max(0,l),1),m=Math.min(Math.max(0,m),1),f=Math.min(Math.max(0,f),1),[l*255,m*255,f*255]},n.xyz.lab=function(a){var s=a[0],i=a[1],u=a[2],l,m,f;return s/=95.047,i/=100,u/=108.883,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,l=116*i-16,m=500*(s-i),f=200*(i-u),[l,m,f]},n.lab.xyz=function(a){var s=a[0],i=a[1],u=a[2],l,m,f;m=(s+16)/116,l=i/500+m,f=m-u/200;var d=Math.pow(m,3),y=Math.pow(l,3),v=Math.pow(f,3);return m=d>.008856?d:(m-16/116)/7.787,l=y>.008856?y:(l-16/116)/7.787,f=v>.008856?v:(f-16/116)/7.787,l*=95.047,m*=100,f*=108.883,[l,m,f]},n.lab.lch=function(a){var s=a[0],i=a[1],u=a[2],l,m,f;return l=Math.atan2(u,i),m=l*360/2/Math.PI,m<0&&(m+=360),f=Math.sqrt(i*i+u*u),[s,f,m]},n.lch.lab=function(a){var s=a[0],i=a[1],u=a[2],l,m,f;return f=u/360*2*Math.PI,l=i*Math.cos(f),m=i*Math.sin(f),[s,l,m]},n.rgb.ansi16=function(a){var s=a[0],i=a[1],u=a[2],l=1 in arguments?arguments[1]:n.rgb.hsv(a)[2];if(l=Math.round(l/50),l===0)return 30;var m=30+(Math.round(u/255)<<2|Math.round(i/255)<<1|Math.round(s/255));return l===2&&(m+=60),m},n.hsv.ansi16=function(a){return n.rgb.ansi16(n.hsv.rgb(a),a[2])},n.rgb.ansi256=function(a){var s=a[0],i=a[1],u=a[2];if(s===i&&i===u)return s<8?16:s>248?231:Math.round((s-8)/247*24)+232;var l=16+36*Math.round(s/255*5)+6*Math.round(i/255*5)+Math.round(u/255*5);return l},n.ansi16.rgb=function(a){var s=a%10;if(s===0||s===7)return a>50&&(s+=3.5),s=s/10.5*255,[s,s,s];var i=(~~(a>50)+1)*.5,u=(s&1)*i*255,l=(s>>1&1)*i*255,m=(s>>2&1)*i*255;return[u,l,m]},n.ansi256.rgb=function(a){if(a>=232){var s=(a-232)*10+8;return[s,s,s]}a-=16;var i,u=Math.floor(a/36)/5*255,l=Math.floor((i=a%36)/6)/5*255,m=i%6/5*255;return[u,l,m]},n.rgb.hex=function(a){var s=((Math.round(a[0])&255)<<16)+((Math.round(a[1])&255)<<8)+(Math.round(a[2])&255),i=s.toString(16).toUpperCase();return"000000".substring(i.length)+i},n.hex.rgb=function(a){var s=a.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!s)return[0,0,0];var i=s[0];s[0].length===3&&(i=i.split("").map(function(d){return d+d}).join(""));var u=parseInt(i,16),l=u>>16&255,m=u>>8&255,f=u&255;return[l,m,f]},n.rgb.hcg=function(a){var s=a[0]/255,i=a[1]/255,u=a[2]/255,l=Math.max(Math.max(s,i),u),m=Math.min(Math.min(s,i),u),f=l-m,d,y;return f<1?d=m/(1-f):d=0,f<=0?y=0:l===s?y=(i-u)/f%6:l===i?y=2+(u-s)/f:y=4+(s-i)/f+4,y/=6,y%=1,[y*360,f*100,d*100]},n.hsl.hcg=function(a){var s=a[1]/100,i=a[2]/100,u=1,l=0;return i<.5?u=2*s*i:u=2*s*(1-i),u<1&&(l=(i-.5*u)/(1-u)),[a[0],u*100,l*100]},n.hsv.hcg=function(a){var s=a[1]/100,i=a[2]/100,u=s*i,l=0;return u<1&&(l=(i-u)/(1-u)),[a[0],u*100,l*100]},n.hcg.rgb=function(a){var s=a[0]/360,i=a[1]/100,u=a[2]/100;if(i===0)return[u*255,u*255,u*255];var l=[0,0,0],m=s%1*6,f=m%1,d=1-f,y=0;switch(Math.floor(m)){case 0:l[0]=1,l[1]=f,l[2]=0;break;case 1:l[0]=d,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=f;break;case 3:l[0]=0,l[1]=d,l[2]=1;break;case 4:l[0]=f,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=d}return y=(1-i)*u,[(i*l[0]+y)*255,(i*l[1]+y)*255,(i*l[2]+y)*255]},n.hcg.hsv=function(a){var s=a[1]/100,i=a[2]/100,u=s+i*(1-s),l=0;return u>0&&(l=s/u),[a[0],l*100,u*100]},n.hcg.hsl=function(a){var s=a[1]/100,i=a[2]/100,u=i*(1-s)+.5*s,l=0;return u>0&&u<.5?l=s/(2*u):u>=.5&&u<1&&(l=s/(2*(1-u))),[a[0],l*100,u*100]},n.hcg.hwb=function(a){var s=a[1]/100,i=a[2]/100,u=s+i*(1-s);return[a[0],(u-s)*100,(1-u)*100]},n.hwb.hcg=function(a){var s=a[1]/100,i=a[2]/100,u=1-i,l=u-s,m=0;return l<1&&(m=(u-l)/(1-l)),[a[0],l*100,m*100]},n.apple.rgb=function(a){return[a[0]/65535*255,a[1]/65535*255,a[2]/65535*255]},n.rgb.apple=function(a){return[a[0]/255*65535,a[1]/255*65535,a[2]/255*65535]},n.gray.rgb=function(a){return[a[0]/100*255,a[0]/100*255,a[0]/100*255]},n.gray.hsl=n.gray.hsv=function(a){return[0,0,a[0]]},n.gray.hwb=function(a){return[0,100,a[0]]},n.gray.cmyk=function(a){return[0,0,0,a[0]]},n.gray.lab=function(a){return[a[0],0,0]},n.gray.hex=function(a){var s=Math.round(a[0]/100*255)&255,i=(s<<16)+(s<<8)+s,u=i.toString(16).toUpperCase();return"000000".substring(u.length)+u},n.rgb.gray=function(a){var s=(a[0]+a[1]+a[2])/3;return[s/255*100]},Y.exports}b(ke,"requireConversions");var Q,De;function Ot(){if(De)return Q;De=1;var r=ke();function e(){for(var h={},p=Object.keys(r),g=p.length,a=0;a<g;a++)h[p[a]]={distance:-1,parent:null};return h}b(e,"buildGraph");function t(h){var p=e(),g=[h];for(p[h].distance=0;g.length;)for(var a=g.pop(),s=Object.keys(r[a]),i=s.length,u=0;u<i;u++){var l=s[u],m=p[l];m.distance===-1&&(m.distance=p[a].distance+1,m.parent=a,g.unshift(l))}return p}b(t,"deriveBFS");function n(h,p){return function(g){return p(h(g))}}b(n,"link");function o(h,p){for(var g=[p[h].parent,h],a=r[p[h].parent][h],s=p[h].parent;p[s].parent;)g.unshift(p[s].parent),a=n(r[p[s].parent][s],a),s=p[s].parent;return a.conversion=g,a}return b(o,"wrapConversion"),Q=b(function(h){for(var p=t(h),g={},a=Object.keys(p),s=a.length,i=0;i<s;i++){var u=a[i],l=p[u];l.parent!==null&&(g[u]=o(u,p))}return g},"route"),Q}b(Ot,"requireRoute");var Z,Re;function kt(){if(Re)return Z;Re=1;var r=ke(),e=Ot(),t={},n=Object.keys(r);function o(p){var g=b(function(a){return a==null?a:(arguments.length>1&&(a=Array.prototype.slice.call(arguments)),p(a))},"wrappedFn");return"conversion"in p&&(g.conversion=p.conversion),g}b(o,"wrapRaw");function h(p){var g=b(function(a){if(a==null)return a;arguments.length>1&&(a=Array.prototype.slice.call(arguments));var s=p(a);if(typeof s=="object")for(var i=s.length,u=0;u<i;u++)s[u]=Math.round(s[u]);return s},"wrappedFn");return"conversion"in p&&(g.conversion=p.conversion),g}return b(h,"wrapRounded"),n.forEach(function(p){t[p]={},Object.defineProperty(t[p],"channels",{value:r[p].channels}),Object.defineProperty(t[p],"labels",{value:r[p].labels});var g=e(p),a=Object.keys(g);a.forEach(function(s){var i=g[s];t[p][s]=h(i),t[p][s].raw=o(i)})}),Z=t,Z}b(kt,"requireColorConvert"),L.exports;var Me;function Dt(){return Me||(Me=1,function(r){const e=kt(),t=b((p,g)=>function(){return`\x1B[${p.apply(e,arguments)+g}m`},"wrapAnsi16"),n=b((p,g)=>function(){const a=p.apply(e,arguments);return`\x1B[${38+g};5;${a}m`},"wrapAnsi256"),o=b((p,g)=>function(){const a=p.apply(e,arguments);return`\x1B[${38+g};2;${a[0]};${a[1]};${a[2]}m`},"wrapAnsi16m");function h(){const p=new Map,g={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]}};g.color.grey=g.color.gray;for(const i of Object.keys(g)){const u=g[i];for(const l of Object.keys(u)){const m=u[l];g[l]={open:`\x1B[${m[0]}m`,close:`\x1B[${m[1]}m`},u[l]=g[l],p.set(m[0],m[1])}Object.defineProperty(g,i,{value:u,enumerable:!1}),Object.defineProperty(g,"codes",{value:p,enumerable:!1})}const a=b(i=>i,"ansi2ansi"),s=b((i,u,l)=>[i,u,l],"rgb2rgb");g.color.close="\x1B[39m",g.bgColor.close="\x1B[49m",g.color.ansi={ansi:t(a,0)},g.color.ansi256={ansi256:n(a,0)},g.color.ansi16m={rgb:o(s,0)},g.bgColor.ansi={ansi:t(a,10)},g.bgColor.ansi256={ansi256:n(a,10)},g.bgColor.ansi16m={rgb:o(s,10)};for(let i of Object.keys(e)){if(typeof e[i]!="object")continue;const u=e[i];i==="ansi16"&&(i="ansi"),"ansi16"in u&&(g.color.ansi[i]=t(u.ansi16,0),g.bgColor.ansi[i]=t(u.ansi16,10)),"ansi256"in u&&(g.color.ansi256[i]=n(u.ansi256,0),g.bgColor.ansi256[i]=n(u.ansi256,10)),"rgb"in u&&(g.color.ansi16m[i]=o(u.rgb,0),g.bgColor.ansi16m[i]=o(u.rgb,10))}return g}b(h,"assembleStyles"),Object.defineProperty(r,"exports",{enumerable:!0,get:h})}(L)),L.exports}b(Dt,"requireAnsiStyles");var ee,Ie;function Rt(){return Ie||(Ie=1,ee=b((r,e)=>{e=e||process.argv;const t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),o=e.indexOf("--");return n!==-1&&(o===-1?!0:n<o)},"hasFlag")),ee}b(Rt,"requireHasFlag");var te,Fe;function Mt(){if(Fe)return te;Fe=1;const r=ot,e=Rt(),t=process.env;let n;e("no-color")||e("no-colors")||e("color=false")?n=!1:(e("color")||e("colors")||e("color=true")||e("color=always"))&&(n=!0),"FORCE_COLOR"in t&&(n=t.FORCE_COLOR.length===0||parseInt(t.FORCE_COLOR,10)!==0);function o(g){return g===0?!1:{level:g,hasBasic:!0,has256:g>=2,has16m:g>=3}}b(o,"translateLevel");function h(g){if(n===!1)return 0;if(e("color=16m")||e("color=full")||e("color=truecolor"))return 3;if(e("color=256"))return 2;if(g&&!g.isTTY&&n!==!0)return 0;const a=n?1:0;if(process.platform==="win32"){const s=r.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in t)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(s=>s in t)||t.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in t)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(t.TEAMCITY_VERSION)?1:0;if(t.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in t){const s=parseInt((t.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(t.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(t.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(t.TERM)||"COLORTERM"in t?1:(t.TERM==="dumb",a)}b(h,"supportsColor");function p(g){const a=h(g);return o(a)}return b(p,"getSupportLevel"),te={supportsColor:p,stdout:p(process.stdout),stderr:p(process.stderr)},te}b(Mt,"requireSupportsColor");var re,Pe;function It(){if(Pe)return re;Pe=1;const r=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,t=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n",`
|
|
2
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function h(s){return s[0]==="u"&&s.length===5||s[0]==="x"&&s.length===3?String.fromCharCode(parseInt(s.slice(1),16)):o.get(s)||s}b(h,"unescape");function p(s,i){const u=[],l=i.trim().split(/\s*,\s*/g);let m;for(const f of l)if(!isNaN(f))u.push(Number(f));else if(m=f.match(t))u.push(m[2].replace(n,(d,y,v)=>y?h(y):v));else throw new Error(`Invalid Chalk template style argument: ${f} (in style '${s}')`);return u}b(p,"parseArguments");function g(s){e.lastIndex=0;const i=[];let u;for(;(u=e.exec(s))!==null;){const l=u[1];if(u[2]){const m=p(l,u[2]);i.push([l].concat(m))}else i.push([l])}return i}b(g,"parseStyle");function a(s,i){const u={};for(const m of i)for(const f of m.styles)u[f[0]]=m.inverse?null:f.slice(1);let l=s;for(const m of Object.keys(u))if(Array.isArray(u[m])){if(!(m in l))throw new Error(`Unknown Chalk style: ${m}`);u[m].length>0?l=l[m].apply(l,u[m]):l=l[m]}return l}return b(a,"buildStyle"),re=b((s,i)=>{const u=[],l=[];let m=[];if(i.replace(r,(f,d,y,v,w,x)=>{if(d)m.push(h(d));else if(v){const S=m.join("");m=[],l.push(u.length===0?S:a(s,u)(S)),u.push({inverse:y,styles:g(v)})}else if(w){if(u.length===0)throw new Error("Found extraneous } in Chalk template literal");l.push(a(s,u)(m.join(""))),m=[],u.pop()}else m.push(x)}),l.push(m.join("")),u.length>0){const f=`Chalk template literal is missing ${u.length} closing bracket${u.length===1?"":"s"} (\`}\`)`;throw new Error(f)}return l.join("")},"templates"),re}b(It,"requireTemplates");var $e;function Ft(){return $e||($e=1,function(r){const e=Tt(),t=Dt(),n=Mt().stdout,o=It(),h=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),p=["ansi","ansi","ansi256","ansi16m"],g=new Set(["gray"]),a=Object.create(null);function s(d,y){y=y||{};const v=n?n.level:0;d.level=y.level===void 0?v:y.level,d.enabled="enabled"in y?y.enabled:d.level>0}b(s,"applyOptions");function i(d){if(!this||!(this instanceof i)||this.template){const y={};return s(y,d),y.template=function(){const v=[].slice.call(arguments);return f.apply(null,[y.template].concat(v))},Object.setPrototypeOf(y,i.prototype),Object.setPrototypeOf(y.template,y),y.template.constructor=i,y.template}s(this,d)}b(i,"Chalk"),h&&(t.blue.open="\x1B[94m");for(const d of Object.keys(t))t[d].closeRe=new RegExp(e(t[d].close),"g"),a[d]={get(){const y=t[d];return l.call(this,this._styles?this._styles.concat(y):[y],this._empty,d)}};a.visible={get(){return l.call(this,this._styles||[],!0,"visible")}},t.color.closeRe=new RegExp(e(t.color.close),"g");for(const d of Object.keys(t.color.ansi))g.has(d)||(a[d]={get(){const y=this.level;return function(){const w={open:t.color[p[y]][d].apply(null,arguments),close:t.color.close,closeRe:t.color.closeRe};return l.call(this,this._styles?this._styles.concat(w):[w],this._empty,d)}}});t.bgColor.closeRe=new RegExp(e(t.bgColor.close),"g");for(const d of Object.keys(t.bgColor.ansi)){if(g.has(d))continue;const y="bg"+d[0].toUpperCase()+d.slice(1);a[y]={get(){const v=this.level;return function(){const x={open:t.bgColor[p[v]][d].apply(null,arguments),close:t.bgColor.close,closeRe:t.bgColor.closeRe};return l.call(this,this._styles?this._styles.concat(x):[x],this._empty,d)}}}}const u=Object.defineProperties(()=>{},a);function l(d,y,v){const w=b(function(){return m.apply(w,arguments)},"builder");w._styles=d,w._empty=y;const x=this;return Object.defineProperty(w,"level",{enumerable:!0,get(){return x.level},set(S){x.level=S}}),Object.defineProperty(w,"enabled",{enumerable:!0,get(){return x.enabled},set(S){x.enabled=S}}),w.hasGrey=this.hasGrey||v==="gray"||v==="grey",w.__proto__=u,w}b(l,"build");function m(){const d=arguments,y=d.length;let v=String(arguments[0]);if(y===0)return"";if(y>1)for(let x=1;x<y;x++)v+=" "+d[x];if(!this.enabled||this.level<=0||!v)return this._empty?"":v;const w=t.dim.open;h&&this.hasGrey&&(t.dim.open="");for(const x of this._styles.slice().reverse())v=x.open+v.replace(x.closeRe,x.open)+x.close,v=v.replace(/\r?\n/g,`${x.close}$&${x.open}`);return t.dim.open=w,v}b(m,"applyStyle");function f(d,y){if(!Array.isArray(y))return[].slice.call(arguments,1).join(" ");const v=[].slice.call(arguments,2),w=[y.raw[0]];for(let x=1;x<y.length;x++)w.push(String(v[x-1]).replace(/[{}\\]/g,"\\$&")),w.push(String(y.raw[x]));return o(d,w.join(""))}b(f,"chalkTag"),Object.defineProperties(i.prototype,a),r.exports=i(),r.exports.supportsColor=n,r.exports.default=r.exports}(H)),H.exports}b(Ft,"requireChalk"),Object.defineProperty(P,"__esModule",{value:!0}),P.default=Kt,P.shouldHighlight=qe;var _e=j,je=me,ne=Pt(Ce,!0);function Ae(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(Ae=b(function(n){return n?t:e},"_getRequireWildcardCache$1"))(r)}b(Ae,"_getRequireWildcardCache$1");function Pt(r,e){if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=Ae(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in r)if(h!=="default"&&{}.hasOwnProperty.call(r,h)){var p=o?Object.getOwnPropertyDescriptor(r,h):null;p&&(p.get||p.set)?Object.defineProperty(n,h,p):n[h]=r[h]}return n.default=r,t&&t.set(r,n),n}b(Pt,"_interopRequireWildcard$1");const Le=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,ne.createColors)(!1):ne.default,Be=b((r,e)=>t=>r(e(t)),"compose$1"),$t=new Set(["as","async","from","get","of","set"]);function _t(r){return{keyword:r.cyan,capitalized:r.yellow,jsxIdentifier:r.yellow,punctuator:r.yellow,number:r.magenta,string:r.green,regex:r.magenta,comment:r.gray,invalid:Be(Be(r.white,r.bgRed),r.bold)}}b(_t,"getDefs$1");const jt=/\r\n|[\n\r\u2028\u2029]/,At=/^[()[\]{}]$/;let Ke;{const r=/^[a-z][\w-]*$/i,e=b(function(t,n,o){if(t.type==="name"){if((0,je.isKeyword)(t.value)||(0,je.isStrictReservedWord)(t.value,!0)||$t.has(t.value))return"keyword";if(r.test(t.value)&&(o[n-1]==="<"||o.slice(n-2,n)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&At.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type},"getTokenType");Ke=b(function*(t){let n;for(;n=_e.default.exec(t);){const o=_e.matchToToken(n);yield{type:e(o,n.index,t),value:o.value}}},"tokenize")}function Lt(r,e){let t="";for(const{type:n,value:o}of Ke(e)){const h=r[n];h?t+=o.split(jt).map(p=>h(p)).join(`
|
|
3
|
-
`):t+=o}return t}b(Lt,"highlightTokens");function qe(r){return Le.isColorSupported||r.forceColor}b(qe,"shouldHighlight");let ae;function Bt(r){if(r){var e;return(e=ae)!=null||(ae=(0,ne.createColors)(!0)),ae}return Le}b(Bt,"getColors$1");function Kt(r,e={}){if(r!==""&&qe(e)){const t=_t(Bt(e.forceColor));return Lt(t,r)}else return r}b(Kt,"highlight");{let r,e;P.getChalk=({forceColor:t})=>{var n;if((n=r)!=null||(r=Ft()),t){var o;return(o=e)!=null||(e=new r.constructor({enabled:!0,level:1})),e}return r}}Object.defineProperty(W,"__esModule",{value:!0}),W.codeFrameColumns=He,W.default=Ut;var We=P,se=qt(Ce,!0);function Ge(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(Ge=b(function(n){return n?t:e},"_getRequireWildcardCache"))(r)}b(Ge,"_getRequireWildcardCache");function qt(r,e){if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=Ge(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in r)if(h!=="default"&&Object.prototype.hasOwnProperty.call(r,h)){var p=o?Object.getOwnPropertyDescriptor(r,h):null;p&&(p.get||p.set)?Object.defineProperty(n,h,p):n[h]=r[h]}return n.default=r,t&&t.set(r,n),n}b(qt,"_interopRequireWildcard");const Wt=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,se.createColors)(!1):se.default,ze=b((r,e)=>t=>r(e(t)),"compose");let ie;function Gt(r){if(r){var e;return(e=ie)!=null||(ie=(0,se.createColors)(!0)),ie}return Wt}b(Gt,"getColors");let Ve=!1;function zt(r){return{gutter:r.gray,marker:ze(r.red,r.bold),message:ze(r.red,r.bold)}}b(zt,"getDefs");const Ue=/\r\n|[\n\r\u2028\u2029]/;function Vt(r,e,t){const n=Object.assign({column:0,line:-1},r.start),o=Object.assign({},n,r.end),{linesAbove:h=2,linesBelow:p=3}=t||{},g=n.line,a=n.column,s=o.line,i=o.column;let u=Math.max(g-(h+1),0),l=Math.min(e.length,s+p);g===-1&&(u=0),s===-1&&(l=e.length);const m=s-g,f={};if(m)for(let d=0;d<=m;d++){const y=d+g;if(!a)f[y]=!0;else if(d===0){const v=e[y-1].length;f[y]=[a,v-a+1]}else if(d===m)f[y]=[0,i];else{const v=e[y-d].length;f[y]=[0,v]}}else a===i?a?f[g]=[a,0]:f[g]=!0:f[g]=[a,i-a];return{start:u,end:l,markerLines:f}}b(Vt,"getMarkerLines");function He(r,e,t={}){const n=(t.highlightCode||t.forceColor)&&(0,We.shouldHighlight)(t),o=Gt(t.forceColor),h=zt(o),p=b((d,y)=>n?d(y):y,"maybeHighlight"),g=r.split(Ue),{start:a,end:s,markerLines:i}=Vt(e,g,t),u=e.start&&typeof e.start.column=="number",l=String(s).length;let f=(n?(0,We.default)(r,t):r).split(Ue,s).slice(a,s).map((d,y)=>{const v=a+1+y,x=` ${` ${v}`.slice(-l)} |`,S=i[v],D=!i[v+1];if(S){let C="";if(Array.isArray(S)){const k=d.slice(0,Math.max(S[0]-1,0)).replace(/[^\t]/g," "),R=S[1]||1;C=[`
|
|
4
|
-
`,p(h.gutter,x.replace(/\d/g," "))," ",k,p(h.marker,"^").repeat(R)].join(""),D&&t.message&&(C+=" "+p(h.message,t.message))}return[p(h.marker,">"),p(h.gutter,x),d.length>0?` ${d}`:"",C].join("")}else return` ${p(h.gutter,x)}${d.length>0?` ${d}`:""}`}).join(`
|
|
5
|
-
`);return t.message&&!u&&(f=`${" ".repeat(l+1)}${t.message}
|
|
6
|
-
${f}`),n?o.reset(f):f}b(He,"codeFrameColumns");function Ut(r,e,t,n={}){if(!Ve){Ve=!0;const h="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(h,"DeprecationWarning");else{const p=new Error(h);p.name="DeprecationWarning",console.warn(new Error(h))}}return t=Math.max(t,0),He(r,{start:{column:t,line:e}},n)}b(Ut,"_default");function Ht(r){return{...r,compilerOptions:r.compilerOptions??{},respectExternal:r.respectExternal??!1}}b(Ht,"resolveDefaultOptions");const B=/\.d\.(c|m)?tsx?$/,Xe=".d.ts",ue={getCurrentDirectory:b(()=>c.ts.sys.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:b(()=>c.ts.sys.newLine,"getNewLine"),getCanonicalFileName:c.ts.sys.useCaseSensitiveFileNames?r=>r:r=>r.toLowerCase()},Xt={declaration:!0,noEmit:!1,emitDeclarationOnly:!0,noEmitOnError:!0,checkJs:!1,declarationMap:!1,skipLibCheck:!0,preserveSymlinks:!0,target:c.ts.ScriptTarget.ESNext},_=new Map,F=b((...r)=>process.env.DTS_LOG_CACHE?console.log("[cache]",...r):null,"logCache");function Ye([r,e],t){for(F(r),_.set(r,t);r!==e&&r!==T.dirname(r);){if(r=T.dirname(r),F("up",r),_.has(r))return F("has",r);_.set(r,t)}}b(Ye,"cacheConfig");function oe(r,e,t){const n={...Xt,...e};let o=T.dirname(r),h=[];const p=t||o;if(_.has(p))F("HIT",p);else{F("miss",p);const i=t?T.resolve(process.cwd(),t):c.ts.findConfigFile(o,c.ts.sys.fileExists);if(!i)return{dtsFiles:h,dirName:o,compilerOptions:n};let u=o;o=T.dirname(i);const{config:l,error:m}=c.ts.readConfigFile(i,c.ts.sys.readFile);if(m)return console.error(c.ts.formatDiagnostic(m,ue)),{dtsFiles:h,dirName:o,compilerOptions:n};F("tsconfig",l);const f=c.ts.parseJsonConfigFileContent(l,c.ts.sys,o);Ye(t?[t,t]:[u,o],f)}const{fileNames:g,options:a,errors:s}=_.get(p);return h=g.filter(i=>B.test(i)),s.length?(console.error(c.ts.formatDiagnostics(s,ue)),{dtsFiles:h,dirName:o,compilerOptions:n}):{dtsFiles:h,dirName:o,compilerOptions:{...a,...n}}}b(oe,"getCompilerOptions");function Yt(r,e,t){const{dtsFiles:n,compilerOptions:o}=oe(r,e,t);return c.ts.createProgram([r].concat(Array.from(n)),o,c.ts.createCompilerHost(o,!0))}b(Yt,"createProgram$1");function Jt(r,e,t){const n=[];let o=[],h=new Set,p="",g={};for(let a of r){if(B.test(a))continue;a=T.resolve(a);const s=oe(a,e,t);if(s.dtsFiles.forEach(h.add,h),!o.length){o.push(a),{dirName:p,compilerOptions:g}=s;continue}if(s.dirName===p)o.push(a);else{const i=c.ts.createCompilerHost(g,!0),u=c.ts.createProgram(o.concat(Array.from(h)),g,i);n.push(u),o=[a],{dirName:p,compilerOptions:g}=s}}if(o.length){const a=c.ts.createCompilerHost(g,!0),s=c.ts.createProgram(o.concat(Array.from(h)),g,a);n.push(s)}return n}b(Jt,"createPrograms");function Qt(){let r;try{return{codeFrameColumns:r}=c.require("@babel/code-frame"),r}catch{try{return{codeFrameColumns:r}=ct.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:de&&de.src||new URL("rollup-plugin-dts-Bhb-wA8a.js",document.baseURI).href)("@babel/code-frame"),r}catch{}}}b(Qt,"getCodeFrame");function Zt(r){const e=r.getSourceFile(),t=e.getLineAndCharacterOfPosition(r.getStart()),n=e.getLineAndCharacterOfPosition(r.getEnd());return{start:{line:t.line+1,column:t.character+1},end:{line:n.line+1,column:n.character+1}}}b(Zt,"getLocation");function er(r){const e=Qt(),n=r.getSourceFile().getFullText(),o=Zt(r);return e?`
|
|
7
|
-
`+e(n,o,{highlightCode:!0}):`
|
|
8
|
-
${o.start.line}:${o.start.column}: \`${r.getFullText().trim()}\``}b(er,"frameNode");class E extends Error{static{b(this,"UnsupportedSyntaxError")}constructor(e,t="Syntax not yet supported"){super(`${t}
|
|
9
|
-
${er(e)}`)}}class tr{static{b(this,"NamespaceFixer")}constructor(e){this.sourceFile=e}findNamespaces(){const e=[],t={};for(const n of this.sourceFile.statements){const o={start:n.getStart(),end:n.getEnd()};if(c.ts.isEmptyStatement(n)){e.unshift({name:"",exports:[],location:o});continue}if((c.ts.isImportDeclaration(n)||c.ts.isExportDeclaration(n))&&n.moduleSpecifier&&c.ts.isStringLiteral(n.moduleSpecifier)){let{text:i}=n.moduleSpecifier;if(i.startsWith(".")&&(i.endsWith(".d.ts")||i.endsWith(".d.cts")||i.endsWith(".d.mts"))){let u=n.moduleSpecifier.getStart()+1,l=n.moduleSpecifier.getEnd()-1;e.unshift({name:"",exports:[],location:{start:u,end:l},textBeforeCodeAfter:i.replace(/\.d\.ts$/,".js").replace(/\.d\.cts$/,".cjs").replace(/\.d\.mts$/,".mjs")})}}if(c.ts.isModuleDeclaration(n)&&n.body&&c.ts.isModuleBlock(n.body)){for(const i of n.body.statements)if(c.ts.isExportDeclaration(i)&&i.exportClause){if(c.ts.isNamespaceExport(i.exportClause))continue;for(const u of i.exportClause.elements)u.propertyName&&u.propertyName.getText()==u.name.getText()&&e.unshift({name:"",exports:[],location:{start:u.propertyName.getEnd(),end:u.name.getEnd()}})}}if(c.ts.isClassDeclaration(n)?t[n.name.getText()]={type:"class",generics:n.typeParameters}:c.ts.isFunctionDeclaration(n)?t[n.name.getText()]={type:"function"}:c.ts.isInterfaceDeclaration(n)?t[n.name.getText()]={type:"interface",generics:n.typeParameters}:c.ts.isTypeAliasDeclaration(n)?t[n.name.getText()]={type:"type",generics:n.typeParameters}:c.ts.isModuleDeclaration(n)&&c.ts.isIdentifier(n.name)?t[n.name.getText()]={type:"namespace"}:c.ts.isEnumDeclaration(n)&&(t[n.name.getText()]={type:"enum"}),!c.ts.isVariableStatement(n))continue;const{declarations:h}=n.declarationList;if(h.length!==1)continue;const p=h[0],g=p.name.getText();if(!p.initializer||!c.ts.isCallExpression(p.initializer)){t[g]={type:"var"};continue}const a=p.initializer.arguments[0];if(!p.initializer.expression.getFullText().includes("/*#__PURE__*/Object.freeze")||!c.ts.isObjectLiteralExpression(a))continue;const s=[];for(const i of a.properties){if(!c.ts.isPropertyAssignment(i)||!(c.ts.isIdentifier(i.name)||c.ts.isStringLiteral(i.name))||i.name.text!=="__proto__"&&!c.ts.isIdentifier(i.initializer))throw new E(i,"Expected a property assignment");i.name.text!=="__proto__"&&s.push({exportedName:i.name.text,localName:i.initializer.getText()})}e.unshift({name:g,exports:s,location:o})}return{namespaces:e,itemTypes:t}}fix(){let e=this.sourceFile.getFullText();const{namespaces:t,itemTypes:n}=this.findNamespaces();for(const o of t){const h=e.slice(o.location.end);e=e.slice(0,o.location.start);for(const{exportedName:p,localName:g}of o.exports)if(p===g){const{type:a,generics:s}=n[g]||{};if(a==="interface"||a==="type"){const i=Je(s);e+=`type ${o.name}_${p}${i.in} = ${g}${i.out};
|
|
10
|
-
`}else if(a==="enum"||a==="class"){const i=Je(s);e+=`type ${o.name}_${p}${i.in} = ${g}${i.out};
|
|
11
|
-
`,e+=`declare const ${o.name}_${p}: typeof ${g};
|
|
12
|
-
`}else e+=`declare const ${o.name}_${p}: typeof ${g};
|
|
13
|
-
`}if(o.name){e+=`declare namespace ${o.name} {
|
|
14
|
-
`,e+=` export {
|
|
15
|
-
`;for(const{exportedName:p,localName:g}of o.exports)p===g?e+=` ${o.name}_${p} as ${p},
|
|
16
|
-
`:e+=` ${g} as ${p},
|
|
17
|
-
`;e+=` };
|
|
18
|
-
`,e+="}"}e+=o.textBeforeCodeAfter??"",e+=h}return e}}function Je(r){return!r||!r.length?{in:"",out:""}:{in:`<${r.map(e=>e.getText()).join(", ")}>`,out:`<${r.map(e=>e.name.getText()).join(", ")}>`}}b(Je,"renderTypeParams");let Qe=1;function rr(r){return N({type:"Program",sourceType:"module",body:[]},{start:r.getFullStart(),end:r.getEnd()})}b(rr,"createProgram");function nr(r){const e={type:"Identifier",name:String(Qe++)};return{ident:e,expr:{type:"AssignmentPattern",left:e,right:r}}}b(nr,"createReference");function O(r){return N({type:"Identifier",name:r.getText()},r)}b(O,"createIdentifier");function ar(r){const e=N({type:"FunctionExpression",id:null,params:[],body:{type:"BlockStatement",body:[]}},r),t=N({type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:String(Qe++)},arguments:[e],optional:!1}},r);return{fn:e,iife:t}}b(ar,"createIIFE");function sr(){const r={type:"ArrayExpression",elements:[]};return{expr:r,stmt:{type:"ReturnStatement",argument:r}}}b(sr,"createReturn");function ir(r,e){return N({type:"FunctionDeclaration",id:N({type:"Identifier",name:c.ts.idText(r)},r),params:[],body:{type:"BlockStatement",body:[]}},e)}b(ir,"createDeclaration");function I(r){if(c.ts.isLiteralExpression(r))return{type:"Literal",value:r.text};if(c.ts.isPropertyAccessExpression(r)){if(c.ts.isPrivateIdentifier(r.name))throw new E(r.name);return N({type:"MemberExpression",computed:!1,optional:!1,object:I(r.expression),property:I(r.name)},{start:r.expression.getStart(),end:r.name.getEnd()})}if(c.ts.isIdentifier(r))return O(r);if(r.kind==c.ts.SyntaxKind.NullKeyword)return{type:"Literal",value:null};throw new E(r)}b(I,"convertExpression");function N(r,e){let t="start"in e?e:{start:e.getStart(),end:e.getEnd()};return Object.assign(r,t)}b(N,"withStartEnd");function K(r,e){return(c.ts.getCombinedModifierFlags(r)&e)===e}b(K,"matchesModifier");function ur({sourceFile:r}){const e=new lt(r.getFullText()),t=new Set,n=new Set;let o="";const h=new Map,p=new Map;for(const f of r.statements){if(c.ts.isEmptyStatement(f)){e.remove(f.getStart(),f.getEnd());continue}if(c.ts.isEnumDeclaration(f)||c.ts.isFunctionDeclaration(f)||c.ts.isInterfaceDeclaration(f)||c.ts.isClassDeclaration(f)||c.ts.isTypeAliasDeclaration(f)||c.ts.isModuleDeclaration(f)){if(f.name){const d=f.name.getText();t.add(d),K(f,c.ts.ModifierFlags.ExportDefault)?o=d:K(f,c.ts.ModifierFlags.Export)&&n.add(d),f.flags&c.ts.NodeFlags.GlobalAugmentation||m(d,[ce(f),et(f)])}c.ts.isModuleDeclaration(f)&&or(e,f),Ze(e,f)}else if(c.ts.isVariableStatement(f)){const{declarations:d}=f.declarationList,y=K(f,c.ts.ModifierFlags.Export);for(const C of f.declarationList.declarations)if(c.ts.isIdentifier(C.name)){const k=C.name.getText();t.add(k),y&&n.add(k)}if(Ze(e,f),d.length==1){const C=d[0];c.ts.isIdentifier(C.name)&&m(C.name.getText(),[ce(f),et(f)])}else{const C=d.slice(),k=C.shift();m(k.name.getText(),[ce(f),k.getEnd()]);for(const R of C)c.ts.isIdentifier(R.name)&&m(R.name.getText(),[R.getFullStart(),R.getEnd()])}const{flags:v}=f.declarationList,x=`declare ${v&c.ts.NodeFlags.Let?"let":v&c.ts.NodeFlags.Const?"const":"var"} `,S=f.declarationList.getChildren().find(C=>C.kind===c.ts.SyntaxKind.SyntaxList).getChildren();let D=0;for(const C of S)if(C.kind===c.ts.SyntaxKind.CommaToken)D=C.getStart(),e.remove(D,C.getEnd());else if(D){e.appendLeft(D,`;
|
|
19
|
-
`);const k=C.getFullStart(),R=e.slice(k,C.getStart());let pe=R.length-R.trimStart().length;pe?e.overwrite(k,k+pe,x):e.appendLeft(k,x)}}}for(const f of r.statements)if(i(f),!!K(f,c.ts.ModifierFlags.ExportDefault)&&(c.ts.isFunctionDeclaration(f)||c.ts.isClassDeclaration(f))){if(f.name)continue;o||(o=l("export_default"));const d=f.getChildren(),y=d.findIndex(S=>S.kind===c.ts.SyntaxKind.ClassKeyword||S.kind===c.ts.SyntaxKind.FunctionKeyword),v=d[y],w=d[y+1];if(w.kind>=c.ts.SyntaxKind.FirstPunctuation&&w.kind<=c.ts.SyntaxKind.LastPunctuation){const S=e.slice(v.getEnd(),w.getStart())!=" ";e.appendLeft(w.getStart(),`${S?" ":""}${o}`)}else e.appendRight(v.getEnd(),` ${o}`)}for(const f of p.values()){const y=f.pop()[0];for(const v of f)e.move(v[0],v[1],y)}o&&e.append(`
|
|
20
|
-
export default ${o};
|
|
21
|
-
`),n.size&&e.append(`
|
|
22
|
-
export { ${[...n].join(", ")} };
|
|
23
|
-
`);for(const[f,d]of h.entries())e.prepend(`import * as ${d} from "${f}";
|
|
24
|
-
`);const g=r.getLineStarts(),a=new Set;for(const f of r.typeReferenceDirectives){a.add(f.fileName);const{line:d}=r.getLineAndCharacterOfPosition(f.pos),y=g[d];let v=r.getLineEndOfPosition(f.pos);e.slice(v,v+1)==`
|
|
25
|
-
`&&(v+=1),e.remove(y,v)}const s=new Set;for(const f of r.referencedFiles){s.add(f.fileName);const{line:d}=r.getLineAndCharacterOfPosition(f.pos),y=g[d];let v=r.getLineEndOfPosition(f.pos);e.slice(v,v+1)==`
|
|
26
|
-
`&&(v+=1),e.remove(y,v)}return{code:e,typeReferences:a,fileReferences:s};function i(f){if(c.ts.forEachChild(f,i),c.ts.isImportTypeNode(f)){if(!c.ts.isLiteralTypeNode(f.argument)||!c.ts.isStringLiteral(f.argument.literal))throw new E(f,"inline imports should have a literal argument");const d=f.argument.literal.text,y=f.getChildren(),v=y.find(D=>D.kind===c.ts.SyntaxKind.ImportKeyword).getStart();let w=f.getEnd();const x=y.find(D=>D.kind===c.ts.SyntaxKind.DotToken||D.kind===c.ts.SyntaxKind.LessThanToken);x&&(w=x.getStart());const S=u(d);e.overwrite(v,w,S)}}function u(f){let d=h.get(f);return d||(d=l(f.replace(/[^a-zA-Z0-9_$]/g,()=>"_")),h.set(f,d)),d}function l(f){let d=f;for(;t.has(d);)d=`_${d}`;return t.add(d),d}function m(f,d){let y=p.get(f);if(!y)y=[d],p.set(f,y);else{const v=y[y.length-1];v[1]===d[0]?v[1]=d[1]:y.push(d)}}}b(ur,"preProcess");function Ze(r,e){if(!c.ts.canHaveModifiers(e))return;let t=!1;const n=c.ts.isEnumDeclaration(e)||c.ts.isClassDeclaration(e)||c.ts.isFunctionDeclaration(e)||c.ts.isModuleDeclaration(e)||c.ts.isVariableStatement(e);for(const o of e.modifiers??[])switch(o.kind){case c.ts.SyntaxKind.ExportKeyword:case c.ts.SyntaxKind.DefaultKeyword:r.remove(o.getStart(),o.getEnd()+1);break;case c.ts.SyntaxKind.DeclareKeyword:t=!0}n&&!t&&r.appendRight(e.getStart(),"declare ")}b(Ze,"fixModifiers");function or(r,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 n of t.exportClause.elements)n.propertyName||r.appendLeft(n.name.getEnd(),` as ${n.name.getText()}`)}}}b(or,"duplicateExports");function ce(r){const e=r.getFullStart();return e+(tt(r,e)?1:0)}b(ce,"getStart");function et(r){const e=r.getEnd();return e+(tt(r,e)?1:0)}b(et,"getEnd");function tt(r,e){return r.getSourceFile().getFullText()[e]==`
|
|
27
|
-
`}b(tt,"newlineAt");const cr=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 rt{static{b(this,"DeclarationScope")}constructor({id:e,range:t}){if(this.scopes=[],e)this.declaration=ir(e,t);else{const{iife:o,fn:h}=ar(t);this.iife=o,this.declaration=h}const n=sr();this.declaration.body.body.push(n.stmt),this.returnExpr=n.expr}pushScope(){this.scopes.push(new Set)}popScope(e=1){for(let t=0;t<e;t++)this.scopes.pop()}pushTypeVariable(e){const t=e.getText();this.scopes[this.scopes.length-1]?.add(t)}pushReference(e){let t;if(e.type==="Identifier"?t=e.name:e.type==="MemberExpression"&&e.object.type==="Identifier"&&(t=e.object.name),t){for(const h of this.scopes)if(h.has(t))return}if(t==="this")return;const{ident:n,expr:o}=nr(e);this.declaration.params.push(o),this.returnExpr.elements.push(n)}pushIdentifierReference(e){this.pushReference(O(e))}convertEntityName(e){return c.ts.isIdentifier(e)?O(e):N({type:"MemberExpression",computed:!1,optional:!1,object:this.convertEntityName(e.left),property:O(e.right)},e)}convertPropertyAccess(e){if(!c.ts.isIdentifier(e.expression)&&!c.ts.isPropertyAccessExpression(e.expression))throw new E(e.expression);if(c.ts.isPrivateIdentifier(e.name))throw new E(e.name);let t=c.ts.isIdentifier(e.expression)?O(e.expression):this.convertPropertyAccess(e.expression);return N({type:"MemberExpression",computed:!1,optional:!1,object:t,property:O(e.name)},e)}convertComputedPropertyName(e){if(!e.name||!c.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(O(t));if(c.ts.isPropertyAccessExpression(t))return this.pushReference(this.convertPropertyAccess(t));throw new E(t)}}convertParametersAndType(e){this.convertComputedPropertyName(e);const t=this.convertTypeParameters(e.typeParameters);for(const n of e.parameters)this.convertTypeNode(n.type);this.convertTypeNode(e.type),this.popScope(t)}convertHeritageClauses(e){for(const t of e.heritageClauses||[])for(const n of t.types)this.pushReference(I(n.expression)),this.convertTypeArguments(n)}convertTypeArguments(e){if(e.typeArguments)for(const t of e.typeArguments)this.convertTypeNode(t)}convertMembers(e){for(const t of e){if(c.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 E(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&&!cr.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:n,nameType:o}=e;this.convertTypeNode(t.constraint),this.pushScope(),this.pushTypeVariable(t.name),this.convertTypeNode(n),o&&this.convertTypeNode(o),this.popScope();return}if(c.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 E(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 E(e,'namespace must have a "ModuleBlock" body.');const{statements:n}=e.body;for(const o of n){if(c.ts.isEnumDeclaration(o)||c.ts.isFunctionDeclaration(o)||c.ts.isClassDeclaration(o)||c.ts.isInterfaceDeclaration(o)||c.ts.isTypeAliasDeclaration(o)||c.ts.isModuleDeclaration(o)){if(o.name&&c.ts.isIdentifier(o.name))this.pushTypeVariable(o.name);else throw new E(o,"non-Identifier name not supported");continue}if(c.ts.isVariableStatement(o)){for(const h of o.declarationList.declarations)if(c.ts.isIdentifier(h.name))this.pushTypeVariable(h.name);else throw new E(h,"non-Identifier name not supported");continue}if(!c.ts.isExportDeclaration(o))throw new E(o,"namespace child (hoisting) not supported yet")}for(const o of n){if(c.ts.isVariableStatement(o)){for(const h of o.declarationList.declarations)h.type&&this.convertTypeNode(h.type);continue}if(c.ts.isFunctionDeclaration(o)){this.convertParametersAndType(o);continue}if(c.ts.isInterfaceDeclaration(o)||c.ts.isClassDeclaration(o)){const h=this.convertTypeParameters(o.typeParameters);this.convertHeritageClauses(o),this.convertMembers(o.members),this.popScope(h);continue}if(c.ts.isTypeAliasDeclaration(o)){const h=this.convertTypeParameters(o.typeParameters);this.convertTypeNode(o.type),this.popScope(h);continue}if(c.ts.isModuleDeclaration(o)){this.convertNamespace(o,t);continue}if(!c.ts.isEnumDeclaration(o))if(c.ts.isExportDeclaration(o)){if(o.exportClause){if(c.ts.isNamespaceExport(o.exportClause))throw new E(o.exportClause);for(const h of o.exportClause.elements){const p=h.propertyName||h.name;this.pushIdentifierReference(p)}}}else throw new E(o,"namespace child (walking) not supported yet")}this.popScope()}}function lr({sourceFile:r}){return new fr(r).transform()}b(lr,"convert");class fr{static{b(this,"Transformer")}constructor(e){this.sourceFile=e,this.declarations=new Map,this.ast=rr(e);for(const t of e.statements)this.convertStatement(t)}transform(){return{ast:this.ast}}pushStatement(e){this.ast.body.push(e)}createDeclaration(e,t){const n={start:e.getFullStart(),end:e.getEnd()};if(!t){const g=new rt({range:n});return this.pushStatement(g.iife),g}const o=t.getText(),h=new rt({id:t,range:n}),p=this.declarations.get(o);if(p){p.pushIdentifierReference(t),p.declaration.end=n.end;let g=this.ast.body.findIndex(a=>a==p.declaration);for(let a=g+1;a<this.ast.body.length;a++){const s=this.ast.body[a];s.start=s.end=n.end}}else this.pushStatement(h.declaration),this.declarations.set(o,h);return p||h}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 E(e)}removeStatement(e){this.pushStatement(N({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 n=this.createDeclaration(e,e.name);n.pushIdentifierReference(e.name),n.convertNamespace(e)}convertEnumDeclaration(e){this.createDeclaration(e,e.name).pushIdentifierReference(e.name)}convertFunctionDeclaration(e){if(!e.name)throw new E(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 E(e,"ClassDeclaration / InterfaceDeclaration should have a name");const t=this.createDeclaration(e,e.name),n=t.convertTypeParameters(e.typeParameters);t.convertHeritageClauses(e),t.convertMembers(e.members),t.popScope(n)}convertTypeAliasDeclaration(e){const t=this.createDeclaration(e,e.name),n=t.convertTypeParameters(e.typeParameters);t.convertTypeNode(e.type),t.popScope(n)}convertVariableStatement(e){const{declarations:t}=e.declarationList;if(t.length!==1)throw new E(e,"VariableStatement with more than one declaration not yet supported");for(const n of t){if(!c.ts.isIdentifier(n.name))throw new E(e,"VariableDeclaration must have a name");this.createDeclaration(e,n.name).convertTypeNode(n.type)}}convertExportDeclaration(e){if(c.ts.isExportAssignment(e)){this.pushStatement(N({type:"ExportDefaultDeclaration",declaration:I(e.expression)},e));return}const t=e.moduleSpecifier?I(e.moduleSpecifier):void 0;if(!e.exportClause)this.pushStatement(N({type:"ExportAllDeclaration",source:t,exported:null},e));else if(c.ts.isNamespaceExport(e.exportClause))this.pushStatement(N({type:"ExportAllDeclaration",source:t,exported:O(e.exportClause.name)},e));else{const n=[];for(const o of e.exportClause.elements)n.push(this.convertExportSpecifier(o));this.pushStatement(N({type:"ExportNamedDeclaration",declaration:null,specifiers:n,source:t},e))}}convertImportDeclaration(e){if(c.ts.isImportEqualsDeclaration(e)){if(!c.ts.isExternalModuleReference(e.moduleReference))throw new E(e,"ImportEquals should have a literal source.");this.pushStatement(N({type:"ImportDeclaration",specifiers:[{type:"ImportDefaultSpecifier",local:O(e.name)}],source:I(e.moduleReference.expression)},e));return}const t=I(e.moduleSpecifier),n=e.importClause&&e.importClause.namedBindings?this.convertNamedImportBindings(e.importClause.namedBindings):[];e.importClause&&e.importClause.name&&n.push({type:"ImportDefaultSpecifier",local:O(e.importClause.name)}),this.pushStatement(N({type:"ImportDeclaration",specifiers:n,source:t},e))}convertNamedImportBindings(e){return c.ts.isNamedImports(e)?e.elements.map(t=>{const n=O(t.name),o=t.propertyName?O(t.propertyName):n;return{type:"ImportSpecifier",local:n,imported:o}}):[{type:"ImportNamespaceSpecifier",local:O(e.name)}]}convertExportSpecifier(e){const t=O(e.name);return{type:"ExportSpecifier",exported:t,local:e.propertyName?O(e.propertyName):t}}}class pr{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,n)=>t.location.start-n.location.start),this.getCodeParts(e).join("")}findExports(){const{rawExports:e,values:t,types:n}=this.getExportsAndLocals();return e.map(o=>{const h=o.elements.map(p=>{const g=p.name.text,a=p.propertyName?.text??p.name.text,s=n.some(i=>i.getText()===a)&&!t.some(i=>i.getText()===a)?"type":"value";return this.DEBUG&&console.log(`export ${a} as ${g} is a ${s}`),{exportedName:g,localName:a,kind:s}});return{location:{start:o.getStart(),end:o.getEnd()},exports:h}})}getExportsAndLocals(e=this.source.statements){const t=[],n=[],o=[],h=b(p=>{const{rawExports:g,values:a,types:s}=this.getExportsAndLocals(p);t.push(...g),n.push(...a),o.push(...s)},"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`),o.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 g of p.declarationList.declarations)c.ts.isIdentifier(g.name)&&(this.DEBUG&&console.log(`${g.name.getFullText()} is a value (from var statement)`),n.push(g.name));else p.name&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from declaration)`),n.push(p.name));continue}if(c.ts.isModuleBlock(p)){const g=p.statements;h(g);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)`),n.push(p.name)),h(p.getChildren());continue}if(c.ts.isExportDeclaration(p)){if(p.moduleSpecifier||p.isTypeOnly)continue;const g=p.exportClause;if(!g||!c.ts.isNamedExports(g))continue;t.push(g);continue}this.DEBUG&&console.log("unhandled statement",p.getFullText(),p.kind)}return{rawExports:t,values:n,types:o}}createNamedExport(e,t=!1){return`${!t&&e.kind==="type"?"type ":""}${e.localName}${e.localName===e.exportedName?"":` as ${e.exportedName}`}`}getCodeParts(e){let t=0;const n=this.source.getFullText(),o=[];for(const h of e){const p=n.slice(t,h.location.start);p.length>0&&o.push(p),o.push(this.getExportStatement(h)),t=h.location.end}return t<n.length&&o.push(n.slice(t)),o}getExportStatement(e){const t=e.exports.every(n=>n.kind==="type")&&e.exports.length>0;return`${t?"type ":""}{ ${e.exports.map(n=>this.createNamedExport(n,t)).join(", ")} }`}}function q(r,e){return c.ts.createSourceFile(r,e,c.ts.ScriptTarget.Latest,!0)}b(q,"parse");const dr=b(()=>{const r=new Map,e=new Map;return{name:"dts-transform",options({onLog:t,...n}){return{...n,onLog(o,h,p){o==="warn"&&h.code=="CIRCULAR_DEPENDENCY"||(t?t(o,h,p):p(o,h))},treeshake:{moduleSideEffects:"no-external",propertyReadSideEffects:!0,unknownGlobalSideEffects:!1}}},outputOptions(t){return{...t,chunkFileNames:t.chunkFileNames||"[name]-[hash].d.ts",entryFileNames:t.entryFileNames||"[name].d.ts",format:"es",exports:"named",compact:!1,freeze:!0,interop:"esModule",generatedCode:Object.assign({symbols:!1},t.generatedCode),strict:!1}},transform(t,n){let o=q(n,t);const h=ur({sourceFile:o});r.set(o.fileName,h.typeReferences),e.set(o.fileName,h.fileReferences),t=h.code.toString(),o=q(n,t);const p=lr({sourceFile:o});return process.env.DTS_DUMP_AST&&(console.log(n),console.log(t),console.log(JSON.stringify(p.ast.body,void 0,2))),{code:t,ast:p.ast,map:h.code.generateMap()}},renderChunk(t,n,o){const h=q(n.fileName,t),p=new tr(h),g=new Set,a=new Set;for(const u of Object.keys(n.modules)){for(const l of r.get(u.split("\\").join("/"))||[])g.add(l);for(const l of e.get(u.split("\\").join("/"))||[])if(l.startsWith(".")){const m=T.join(T.dirname(u),l),f=o.file&&T.dirname(o.file)||n.facadeModuleId&&T.dirname(n.facadeModuleId)||".";let d=T.relative(f,m).split("\\").join("/");d[0]!=="."&&(d="./"+d),a.add(d)}else a.add(l)}let s=nt(Array.from(a,u=>`/// <reference path="${u}" />`));return s+=nt(Array.from(g,u=>`/// <reference types="${u}" />`)),s+=p.fix(),s||(s+=`
|
|
28
|
-
export { }`),{code:new pr(q(n.fileName,s)).fix(),map:{mappings:""}}}}},"transform");function nt(r){return r.length?r.join(`
|
|
29
|
-
`)+`
|
|
30
|
-
`:""}b(nt,"writeBlock");const le=/\.([cm]ts|[tj]sx?)$/;function fe({programs:r,resolvedOptions:{compilerOptions:e,tsconfig:t}},n,o){if(!r.length&&B.test(n))return{code:o};const h=r.find(p=>!!p.getSourceFile(n));if(h){const p=h.getSourceFile(n);return{code:p?.getFullText(),source:p,program:h}}else if(c.ts.sys.fileExists(n)){const p=Yt(n,e,t);r.push(p);const g=p.getSourceFile(n);return{code:g?.getFullText(),source:g,program:p}}else return null}b(fe,"getModule");const at=b((r={})=>{const e=dr(),t={programs:[],resolvedOptions:Ht(r)};return{name:"dts",outputOptions:e.outputOptions,renderChunk:e.renderChunk,options(n){let{input:o=[]}=n;if(!Array.isArray(o))o=typeof o=="string"?[o]:Object.values(o);else if(o.length>1){n.input={};for(const h of o){let p=h.replace(/((\.d)?\.(c|m)?(t|j)sx?)$/,"");T.isAbsolute(h)?p=T.basename(p):p=T.normalize(p),n.input[p]=h}}return t.programs=Jt(Object.values(o),t.resolvedOptions.compilerOptions,t.resolvedOptions.tsconfig),e.options.call(this,n)},transform(n,o){if(!le.test(o))return null;const h=b(s=>{if(s.program){const i=T.dirname(o);s.program.getSourceFiles().map(l=>l.fileName).filter(l=>l.startsWith(i)).forEach(this.addWatchFile)}},"watchFiles"),p=b(()=>{const s=fe(t,o,n);return s?(h(s),e.transform.call(this,s.code,o)):null},"handleDtsFile"),g=b(()=>{const s=o.replace(le,Xe);let i=fe(t,s,n);return i?(h(i),e.transform.call(this,i.code,s)):null},"treatTsAsDts"),a=b(()=>{const s=fe(t,o,n);if(!s||!s.source||!s.program)return null;h(s);const i=o.replace(le,Xe);let u;const{emitSkipped:l,diagnostics:m}=s.program.emit(s.source,(f,d)=>{u=e.transform.call(this,d,i)},void 0,!0);if(l){const f=m.filter(d=>d.category===c.ts.DiagnosticCategory.Error);f.length&&(console.error(c.ts.formatDiagnostics(f,ue)),this.error("Failed to compile. Check the logs above."))}return u},"generateDtsFromTs");return B.test(o)?p():g()??a()},resolveId(n,o){if(!o)return;o=o.split("\\").join("/");let h=t.resolvedOptions.compilerOptions;if(t.resolvedOptions.tsconfig){const g=n.startsWith(".")?T.resolve(T.dirname(o),n):n;h=oe(g,t.resolvedOptions.compilerOptions,t.resolvedOptions.tsconfig).compilerOptions}const{resolvedModule:p}=c.ts.resolveModuleName(n,o,h,c.ts.sys);if(p)return!t.resolvedOptions.respectExternal&&p.isExternalLibraryImport?{id:n,external:!0}:{id:T.resolve(p.resolvedFileName)}}}},"plugin");exports.default=at,exports.dts=at;
|