@onmyway133/asc-cli 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +299 -0
  2. package/bun.lock +231 -0
  3. package/dist/index.js +179 -0
  4. package/docs/API_COVERAGE.md +355 -0
  5. package/docs/openapi/latest.json +230597 -0
  6. package/docs/openapi/paths.txt +1208 -0
  7. package/openapi-ts.config.ts +25 -0
  8. package/package.json +32 -0
  9. package/scripts/gen-paths-index.py +24 -0
  10. package/src/api/client.ts +132 -0
  11. package/src/api/generated/client/client.gen.ts +298 -0
  12. package/src/api/generated/client/index.ts +25 -0
  13. package/src/api/generated/client/types.gen.ts +214 -0
  14. package/src/api/generated/client/utils.gen.ts +316 -0
  15. package/src/api/generated/client.gen.ts +16 -0
  16. package/src/api/generated/core/auth.gen.ts +41 -0
  17. package/src/api/generated/core/bodySerializer.gen.ts +82 -0
  18. package/src/api/generated/core/params.gen.ts +169 -0
  19. package/src/api/generated/core/pathSerializer.gen.ts +171 -0
  20. package/src/api/generated/core/queryKeySerializer.gen.ts +117 -0
  21. package/src/api/generated/core/serverSentEvents.gen.ts +242 -0
  22. package/src/api/generated/core/types.gen.ts +104 -0
  23. package/src/api/generated/core/utils.gen.ts +140 -0
  24. package/src/api/generated/index.ts +4 -0
  25. package/src/api/generated/sdk.gen.ts +11701 -0
  26. package/src/api/generated/types.gen.ts +92035 -0
  27. package/src/api/hey-api-client.ts +20 -0
  28. package/src/api/types.ts +160 -0
  29. package/src/auth/credentials.ts +125 -0
  30. package/src/auth/jwt.ts +118 -0
  31. package/src/commands/app-info.ts +110 -0
  32. package/src/commands/apps.ts +44 -0
  33. package/src/commands/auth.ts +327 -0
  34. package/src/commands/availability.ts +52 -0
  35. package/src/commands/beta-review.ts +145 -0
  36. package/src/commands/builds.ts +97 -0
  37. package/src/commands/game-center.ts +114 -0
  38. package/src/commands/iap.ts +105 -0
  39. package/src/commands/metadata.ts +81 -0
  40. package/src/commands/pricing.ts +110 -0
  41. package/src/commands/reports.ts +116 -0
  42. package/src/commands/reviews.ts +93 -0
  43. package/src/commands/screenshots.ts +139 -0
  44. package/src/commands/signing.ts +214 -0
  45. package/src/commands/subscriptions.ts +144 -0
  46. package/src/commands/testflight.ts +110 -0
  47. package/src/commands/versions.ts +76 -0
  48. package/src/commands/xcode-cloud.ts +207 -0
  49. package/src/index.ts +1661 -0
  50. package/src/utils/help-spec.ts +835 -0
  51. package/src/utils/output.ts +79 -0
  52. package/tests/auth.test.ts +105 -0
  53. package/tests/client.test.ts +22 -0
  54. package/tests/output.test.ts +36 -0
  55. package/tsconfig.json +15 -0
package/dist/index.js ADDED
@@ -0,0 +1,179 @@
1
+ #!/usr/bin/env bun
2
+ // @bun
3
+ var EE=Object.create;var{getPrototypeOf:CE,defineProperty:e0,getOwnPropertyNames:rE}=Object;var BE=Object.prototype.hasOwnProperty;var y0=(D,u,F)=>{F=D!=null?EE(CE(D)):{};let E=u||!D||!D.__esModule?e0(F,"default",{value:D,enumerable:!0}):F;for(let r of rE(D))if(!BE.call(E,r))e0(E,r,{get:()=>D[r],enumerable:!0});return E};var L=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var zu=(D,u)=>{for(var F in u)e0(D,F,{get:u[F],enumerable:!0,configurable:!0,set:(E)=>u[F]=()=>E})};var Q=(D,u)=>()=>(D&&(u=D(D=0)),u);var l2=import.meta.require;function S0(D){if(D===null||typeof D!=="object")return!1;let u=Object.getPrototypeOf(D);if(u!==null&&u!==Object.prototype&&Object.getPrototypeOf(u)!==null)return!1;if(Symbol.iterator in D)return!1;if(Symbol.toStringTag in D)return Object.prototype.toString.call(D)==="[object Module]";return!0}function w0(D,u,F=".",E){if(!S0(u))return w0(D,{},F,E);let r=Object.assign({},u);for(let B in D){if(B==="__proto__"||B==="constructor")continue;let C=D[B];if(C===null||C===void 0)continue;if(E&&E(r,B,C,F))continue;if(Array.isArray(C)&&Array.isArray(r[B]))r[B]=[...C,...r[B]];else if(S0(C)&&S0(r[B]))r[B]=w0(C,r[B],(F?`${F}.`:"")+B.toString(),E);else r[B]=C}return r}function nE(D){return(...u)=>u.reduce((F,E)=>w0(F,E,"",D),{})}function iE(D){return Object.prototype.toString.call(D)==="[object Object]"}function hE(D){if(!iE(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}class g{options;_lastLog;_mockFn;constructor(D={}){let u=D.types||mu;this.options=fE({...D,defaults:{...D.defaults},level:v0(D.level,u),reporters:[...D.reporters||[]]},{types:mu,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let F in u){let E={type:F,...this.options.defaults,...u[F]};this[F]=this._wrapLogFn(E),this[F].raw=this._wrapLogFn(E,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=v0(D,this.options.types,this.options.level)}prompt(D,u){if(!this.options.prompt)throw Error("prompt is not supported!");return this.options.prompt(D,u)}create(D){let u=new g({...this.options,...D});if(this._mockFn)u.mockTypes(this._mockFn);return u}withDefaults(D){return this.create({...this.options,defaults:{...this.options.defaults,...D}})}withTag(D){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+D:D})}addReporter(D){return this.options.reporters.push(D),this}removeReporter(D){if(D){let u=this.options.reporters.indexOf(D);if(u!==-1)return this.options.reporters.splice(u,1)}else this.options.reporters.splice(0);return this}setReporters(D){return this.options.reporters=Array.isArray(D)?D:[D],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let D in this.options.types){if(!console["__"+D])console["__"+D]=console[D];console[D]=this[D].raw}}restoreConsole(){for(let D in this.options.types)if(console["__"+D])console[D]=console["__"+D],delete console["__"+D]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(D,u){if(!D)return;if(!D.__write)D.__write=D.write;D.write=(F)=>{this[u].raw(String(F).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(D){if(!D)return;if(D.__write)D.write=D.__write,delete D.__write}pauseLogs(){K0=!0}resumeLogs(){K0=!1;let D=d2.splice(0);for(let u of D)u[0]._logFn(u[1],u[2])}mockTypes(D){let u=D||this.options.mockFn;if(this._mockFn=u,typeof u!=="function")return;for(let F in this.options.types)this[F]=u(F,this.options.types[F])||this[F],this[F].raw=this[F]}_wrapLogFn(D,u){return(...F)=>{if(K0){d2.push([this,D,F,u]);return}return this._logFn(D,F,u)}}_logFn(D,u,F){if((D.level||0)>this.level)return!1;let E={date:new Date,args:[],...D,level:v0(D.level,this.options.types)};if(!F&&u.length===1&&hE(u[0]))Object.assign(E,u[0]);else E.args=[...u];if(E.message)E.args.unshift(E.message),delete E.message;if(E.additional){if(!Array.isArray(E.additional))E.additional=E.additional.split(`
4
+ `);E.args.push(`
5
+ `+E.additional.join(`
6
+ `)),delete E.additional}E.type=typeof E.type==="string"?E.type.toLowerCase():"log",E.tag=typeof E.tag==="string"?E.tag:"";let r=(C=!1)=>{let n=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&n>0){let f=[...this._lastLog.object.args];if(n>1)f.push(`(repeated ${n} times)`);this._log({...this._lastLog.object,args:f}),this._lastLog.count=1}if(C)this._lastLog.object=E,this._log(E)};clearTimeout(this._lastLog.timeout);let B=this._lastLog.time&&E.date?E.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=E.date,B<this.options.throttle)try{let C=JSON.stringify([E.type,E.tag,E.args]),n=this._lastLog.serialized===C;if(this._lastLog.serialized=C,n){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout(r,this.options.throttle);return}}}catch{}r(!0)}_log(D){for(let u of this.options.reporters)u.log(D,{options:this.options})}}function v0(D,u={},F=3){if(D===void 0)return F;if(typeof D==="number")return D;if(u[D]&&u[D].level!==void 0)return u[D].level;return F}function x2(D={}){return new g(D)}var l,mu,fE,K0=!1,d2;var H0=Q(()=>{l={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},mu={silent:{level:-1},fatal:{level:l.fatal},error:{level:l.error},warn:{level:l.warn},log:{level:l.log},info:{level:l.info},success:{level:l.success},fail:{level:l.fail},ready:{level:l.info},start:{level:l.info},box:{level:l.info},debug:{level:l.debug},trace:{level:l.trace},verbose:{level:l.verbose}};fE=nE();d2=[];g.prototype.add=g.prototype.addReporter;g.prototype.remove=g.prototype.removeReporter;g.prototype.clear=g.prototype.removeReporter;g.prototype.withScope=g.prototype.withTag;g.prototype.mock=g.prototype.mockTypes;g.prototype.pause=g.prototype.pauseLogs;g.prototype.resume=g.prototype.resumeLogs});import{formatWithOptions as DF}from"util";import{sep as tE}from"path";function W0(D,u){let F=process.cwd()+tE;return D.split(`
7
+ `).splice(u.split(`
8
+ `).length).map((r)=>r.trim().replace("file://","").replace(F,""))}function AE(D,u){return(u.__write||u.write).call(u,D)}class Zu{formatStack(D,u,F){let E=" ".repeat((F?.errorLevel||0)+1);return E+W0(D,u).join(`
9
+ ${E}`)}formatError(D,u){let F=D.message??DF(u,D),E=D.stack?this.formatStack(D.stack,F,u):"",r=u?.errorLevel||0,B=r>0?`${" ".repeat(r)}[cause]: `:"",C=D.cause?`
10
+
11
+ `+this.formatError(D.cause,{...u,errorLevel:r+1}):"";return B+F+`
12
+ `+E+C}formatArgs(D,u){let F=D.map((E)=>{if(E&&typeof E.stack==="string")return this.formatError(E,u);return E});return DF(u,...F)}formatDate(D,u){return u.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,u){let F=this.formatArgs(D.args,u);if(D.type==="box")return`
13
+ `+[a0(D.tag),D.title&&D.title,...F.split(`
14
+ `)].filter(Boolean).map((E)=>" > "+E).join(`
15
+ `)+`
16
+ `;return this.filterAndJoin([a0(D.type),a0(D.tag),F])}log(D,u){let F=this.formatLogObj(D,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return AE(F+`
17
+ `,D.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}}var a0=(D)=>D?`[${D}]`:"";var uF=()=>{};import*as Nu from"tty";function BF(D,u,F,E,r=u.slice(0,Math.max(0,D))+E,B=u.slice(Math.max(0,D+F.length)),C=B.indexOf(F)){return r+(C<0?B:BF(C,B,F,E))}function vE(D,u,F,E,r){return D<0?F+u+E:F+BF(D,u,E,r)+E}function wE(D,u,F=D,E=D.length+1){return(r)=>r||!(r===""||r===void 0)?vE((""+r).indexOf(u,E),r,D,u,F):""}function q(D,u,F){return wE(`\x1B[${D}m`,`\x1B[${u}m`,F)}function HE(D=KE){return D?FF:Object.fromEntries(Object.keys(FF).map((u)=>[u,String]))}function nF(D,u="reset"){return R[D]||R[u]}function JD(D){return D.replace(new RegExp(aE,"g"),"")}function M0(D,u={}){let F={...u,style:{...WE,...u.style}},E=D.split(`
18
+ `),r=[],B=nF(F.style.borderColor),C={...typeof F.style.borderStyle==="string"?EF[F.style.borderStyle]||EF.solid:F.style.borderStyle};if(B)for(let h in C)C[h]=B(C[h]);let n=F.style.padding%2===0?F.style.padding:F.style.padding+1,f=E.length+n,i=Math.max(...E.map((h)=>JD(h).length),F.title?JD(F.title).length:0)+n,t=i+n,b=F.style.marginLeft>0?" ".repeat(F.style.marginLeft):"";if(F.style.marginTop>0)r.push("".repeat(F.style.marginTop));if(F.title){let h=B?B(F.title):F.title,A=C.h.repeat(Math.floor((i-JD(F.title).length)/2)),$=C.h.repeat(i-JD(F.title).length-JD(A).length+n);r.push(`${b}${C.tl}${A}${h}${$}${C.tr}`)}else r.push(`${b}${C.tl}${C.h.repeat(t)}${C.tr}`);let e=F.style.valign==="center"?Math.floor((f-E.length)/2):F.style.valign==="top"?f-E.length-n:f-E.length;for(let h=0;h<f;h++)if(h<e||h>=e+E.length)r.push(`${b}${C.v}${" ".repeat(t)}${C.v}`);else{let A=E[h-e],$=" ".repeat(n),S=" ".repeat(i-JD(A).length);r.push(`${b}${C.v}${$}${A}${S}${C.v}`)}if(r.push(`${b}${C.bl}${C.h.repeat(t)}${C.br}`),F.style.marginBottom>0)r.push("".repeat(F.style.marginBottom));return r.join(`
19
+ `)}var mD,CF,cE,bE,$E,eE,rF,yE,SE,KE,FF,R,aE,EF,WE;var Xu=Q(()=>{({env:mD={},argv:CF=[],platform:cE=""}=typeof process>"u"?{}:process),bE="NO_COLOR"in mD||CF.includes("--no-color"),$E="FORCE_COLOR"in mD||CF.includes("--color"),eE=cE==="win32",rF=mD.TERM==="dumb",yE=Nu&&Nu.isatty&&Nu.isatty(1)&&mD.TERM&&!rF,SE="CI"in mD&&(("GITHUB_ACTIONS"in mD)||("GITLAB_CI"in mD)||("CIRCLECI"in mD)),KE=!bE&&($E||eE&&!rF||yE||SE);FF={reset:q(0,0),bold:q(1,22,"\x1B[22m\x1B[1m"),dim:q(2,22,"\x1B[22m\x1B[2m"),italic:q(3,23),underline:q(4,24),inverse:q(7,27),hidden:q(8,28),strikethrough:q(9,29),black:q(30,39),red:q(31,39),green:q(32,39),yellow:q(33,39),blue:q(34,39),magenta:q(35,39),cyan:q(36,39),white:q(37,39),gray:q(90,39),bgBlack:q(40,49),bgRed:q(41,49),bgGreen:q(42,49),bgYellow:q(43,49),bgBlue:q(44,49),bgMagenta:q(45,49),bgCyan:q(46,49),bgWhite:q(47,49),blackBright:q(90,39),redBright:q(91,39),greenBright:q(92,39),yellowBright:q(93,39),blueBright:q(94,39),magentaBright:q(95,39),cyanBright:q(96,39),whiteBright:q(97,39),bgBlackBright:q(100,49),bgRedBright:q(101,49),bgGreenBright:q(102,49),bgYellowBright:q(103,49),bgBlueBright:q(104,49),bgMagentaBright:q(105,49),bgCyanBright:q(106,49),bgWhiteBright:q(107,49)};R=HE();aE=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");EF={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},WE={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}});var ZF={};zu(ZF,{prompt:()=>mF,kCancel:()=>zF});import AD,{stdin as ME,stdout as VE}from"process";import fF from"readline";import{WriteStream as JE}from"tty";function oE(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function qE(){if(iF)return V0;iF=1;let D="\x1B",u=`${D}[`,F="\x07",E={to(C,n){if(!n)return`${u}${C+1}G`;return`${u}${n+1};${C+1}H`},move(C,n){let f="";if(C<0)f+=`${u}${-C}D`;else if(C>0)f+=`${u}${C}C`;if(n<0)f+=`${u}${-n}A`;else if(n>0)f+=`${u}${n}B`;return f},up:(C=1)=>`${u}${C}A`,down:(C=1)=>`${u}${C}B`,forward:(C=1)=>`${u}${C}C`,backward:(C=1)=>`${u}${C}D`,nextLine:(C=1)=>`${u}E`.repeat(C),prevLine:(C=1)=>`${u}F`.repeat(C),left:`${u}G`,hide:`${u}?25l`,show:`${u}?25h`,save:`${D}7`,restore:`${D}8`},r={up:(C=1)=>`${u}S`.repeat(C),down:(C=1)=>`${u}T`.repeat(C)},B={screen:`${u}2J`,up:(C=1)=>`${u}1J`.repeat(C),down:(C=1)=>`${u}J`.repeat(C),line:`${u}2K`,lineEnd:`${u}K`,lineStart:`${u}1K`,lines(C){let n="";for(let f=0;f<C;f++)n+=this.line+(f<C-1?E.up():"");if(C)n+=E.left;return n}};return V0={cursor:E,scroll:r,erase:B,beep:F},V0}function zE(){if(hF)return Yu.exports;hF=1;let D=process||{},u=D.argv||[],F=D.env||{},E=!(!!F.NO_COLOR||u.includes("--no-color"))&&(!!F.FORCE_COLOR||u.includes("--color")||D.platform==="win32"||(D.stdout||{}).isTTY&&F.TERM!=="dumb"||!!F.CI),r=(n,f,i=n)=>(t)=>{let b=""+t,e=b.indexOf(f,n.length);return~e?n+B(b,f,i,e)+f:n+b+f},B=(n,f,i,t)=>{let b="",e=0;do b+=n.substring(e,t)+i,e=t+f.length,t=n.indexOf(f,e);while(~t);return b+n.substring(e)},C=(n=E)=>{let f=n?r:()=>String;return{isColorSupported:n,reset:f("\x1B[0m","\x1B[0m"),bold:f("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:f("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:f("\x1B[3m","\x1B[23m"),underline:f("\x1B[4m","\x1B[24m"),inverse:f("\x1B[7m","\x1B[27m"),hidden:f("\x1B[8m","\x1B[28m"),strikethrough:f("\x1B[9m","\x1B[29m"),black:f("\x1B[30m","\x1B[39m"),red:f("\x1B[31m","\x1B[39m"),green:f("\x1B[32m","\x1B[39m"),yellow:f("\x1B[33m","\x1B[39m"),blue:f("\x1B[34m","\x1B[39m"),magenta:f("\x1B[35m","\x1B[39m"),cyan:f("\x1B[36m","\x1B[39m"),white:f("\x1B[37m","\x1B[39m"),gray:f("\x1B[90m","\x1B[39m"),bgBlack:f("\x1B[40m","\x1B[49m"),bgRed:f("\x1B[41m","\x1B[49m"),bgGreen:f("\x1B[42m","\x1B[49m"),bgYellow:f("\x1B[43m","\x1B[49m"),bgBlue:f("\x1B[44m","\x1B[49m"),bgMagenta:f("\x1B[45m","\x1B[49m"),bgCyan:f("\x1B[46m","\x1B[49m"),bgWhite:f("\x1B[47m","\x1B[49m"),blackBright:f("\x1B[90m","\x1B[39m"),redBright:f("\x1B[91m","\x1B[39m"),greenBright:f("\x1B[92m","\x1B[39m"),yellowBright:f("\x1B[93m","\x1B[39m"),blueBright:f("\x1B[94m","\x1B[39m"),magentaBright:f("\x1B[95m","\x1B[39m"),cyanBright:f("\x1B[96m","\x1B[39m"),whiteBright:f("\x1B[97m","\x1B[39m"),bgBlackBright:f("\x1B[100m","\x1B[49m"),bgRedBright:f("\x1B[101m","\x1B[49m"),bgGreenBright:f("\x1B[102m","\x1B[49m"),bgYellowBright:f("\x1B[103m","\x1B[49m"),bgBlueBright:f("\x1B[104m","\x1B[49m"),bgMagentaBright:f("\x1B[105m","\x1B[49m"),bgCyanBright:f("\x1B[106m","\x1B[49m"),bgWhiteBright:f("\x1B[107m","\x1B[49m")}};return Yu.exports=C(),Yu.exports.createColors=C,Yu.exports}function ZE({onlyFirst:D=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function wF(D){if(typeof D!="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(NE,"")}function HF(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function Au(D,u={}){if(typeof D!="string"||D.length===0||(u={ambiguousIsNarrow:!0,...u},D=wF(D),D.length===0))return 0;D=D.replace(IE()," ");let F=u.ambiguousIsNarrow?1:2,E=0;for(let r of D){let B=r.codePointAt(0);if(B<=31||B>=127&&B<=159||B>=768&&B<=879)continue;switch(YE.eastAsianWidth(r)){case"F":case"W":E+=2;break;case"A":E+=F;break;default:E+=1}}return E}function _E(){let D=new Map;for(let[u,F]of Object.entries(U)){for(let[E,r]of Object.entries(F))U[E]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},F[E]=U[E],D.set(r[0],r[1]);Object.defineProperty(U,u,{value:F,enumerable:!1})}return Object.defineProperty(U,"codes",{value:D,enumerable:!1}),U.color.close="\x1B[39m",U.bgColor.close="\x1B[49m",U.color.ansi=tF(),U.color.ansi256=AF(),U.color.ansi16m=cF(),U.bgColor.ansi=tF(J0),U.bgColor.ansi256=AF(J0),U.bgColor.ansi16m=cF(J0),Object.defineProperties(U,{rgbToAnsi256:{value:(u,F,E)=>u===F&&F===E?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(E/255*5),enumerable:!1},hexToRgb:{value:(u)=>{let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[E]=F;E.length===3&&(E=[...E].map((B)=>B+B).join(""));let r=Number.parseInt(E,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:(u)=>U.rgbToAnsi256(...U.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:(u)=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,E,r;if(u>=232)F=((u-232)*10+8)/255,E=F,r=F;else{u-=16;let n=u%36;F=Math.floor(u/36)/5,E=Math.floor(n/6)/5,r=n%6/5}let B=Math.max(F,E,r)*2;if(B===0)return 30;let C=30+(Math.round(r)<<2|Math.round(E)<<1|Math.round(F));return B===2&&(C+=60),C},enumerable:!1},rgbToAnsi:{value:(u,F,E)=>U.ansi256ToAnsi(U.rgbToAnsi256(u,F,E)),enumerable:!1},hexToAnsi:{value:(u)=>U.ansi256ToAnsi(U.hexToAnsi256(u)),enumerable:!1}}),U}function eF(D,u,F){return String(D).normalize().replace(/\r\n/g,`
20
+ `).split(`
21
+ `).map((E)=>OE(E,u,F)).join(`
22
+ `)}function VF(D,u){if(typeof D=="string")return Iu.aliases.get(D)===u;for(let F of D)if(F!==void 0&&VF(F,u))return!0;return!1}function pE(D,u){if(D===u)return;let F=D.split(`
23
+ `),E=u.split(`
24
+ `),r=[];for(let B=0;B<Math.max(F.length,E.length);B++)F[B]!==E[B]&&r.push(B);return r}function Qu(D,u){let F=D;F.isTTY&&F.setRawMode(u)}class cu{constructor(D,u=!0){BD(this,"input"),BD(this,"output"),BD(this,"_abortSignal"),BD(this,"rl"),BD(this,"opts"),BD(this,"_render"),BD(this,"_track",!1),BD(this,"_prevFrame",""),BD(this,"_subscribers",new Map),BD(this,"_cursor",0),BD(this,"state","initial"),BD(this,"error",""),BD(this,"value");let{input:F=ME,output:E=VE,render:r,signal:B,...C}=D;this.opts=C,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=r.bind(this),this._track=u,this._abortSignal=B,this.input=F,this.output=E}unsubscribe(){this._subscribers.clear()}setSubscriber(D,u){let F=this._subscribers.get(D)??[];F.push(u),this._subscribers.set(D,F)}on(D,u){this.setSubscriber(D,{cb:u})}once(D,u){this.setSubscriber(D,{cb:u,once:!0})}emit(D,...u){let F=this._subscribers.get(D)??[],E=[];for(let r of F)r.cb(...u),r.once&&E.push(()=>F.splice(F.indexOf(r),1));for(let r of E)r()}prompt(){return new Promise((D,u)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),D(yF);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let F=new JE(0);F._write=(E,r,B)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),B()},this.input.pipe(F),this.rl=fF.createInterface({input:this.input,output:F,tabSize:2,prompt:"",escapeCodeTimeout:50}),fF.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),Qu(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(cD.cursor.show),this.output.off("resize",this.render),Qu(this.input,!1),D(this.value)}),this.once("cancel",()=>{this.output.write(cD.cursor.show),this.output.off("resize",this.render),Qu(this.input,!1),D(yF)})})}onKeypress(D,u){if(this.state==="error"&&(this.state="active"),u?.name&&(!this._track&&Iu.aliases.has(u.name)&&this.emit("cursor",Iu.aliases.get(u.name)),Iu.actions.has(u.name)&&this.emit("cursor",u.name)),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),u?.name==="return"){if(this.opts.validate){let F=this.opts.validate(this.value);F&&(this.error=F instanceof Error?F.message:F,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}VF([D,u?.name,u?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
25
+ `),Qu(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let D=eF(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
26
+ `).length-1;this.output.write(cD.cursor.move(-999,D*-1))}render(){let D=eF(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(cD.cursor.hide);else{let u=pE(this._prevFrame,D);if(this.restoreCursor(),u&&u?.length===1){let F=u[0];this.output.write(cD.cursor.move(0,F)),this.output.write(cD.erase.lines(1));let E=D.split(`
27
+ `);this.output.write(E[F]),this._prevFrame=D,this.output.write(cD.cursor.move(0,E.length-F-1));return}if(u&&u?.length>1){let F=u[0];this.output.write(cD.cursor.move(0,F)),this.output.write(cD.erase.down());let E=D.split(`
28
+ `).slice(F);this.output.write(E.join(`
29
+ `)),this._prevFrame=D;return}this.output.write(cD.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}function FC(){return AD.platform!=="win32"?AD.env.TERM!=="linux":!!AD.env.CI||!!AD.env.WT_SESSION||!!AD.env.TERMINUS_SUBLIME||AD.env.ConEmuTask==="{cmd::Cmder}"||AD.env.TERM_PROGRAM==="Terminus-Sublime"||AD.env.TERM_PROGRAM==="vscode"||AD.env.TERM==="xterm-256color"||AD.env.TERM==="alacritty"||AD.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function mF(D,u={}){let F=(E)=>{if(typeof E!=="symbol"||E.toString()!=="Symbol(clack:cancel)")return E;switch(u.cancel){case"reject":{let r=Error("Prompt cancelled.");if(r.name="ConsolaPromptCancelledError",Error.captureStackTrace)Error.captureStackTrace(r,mF);throw r}case"undefined":return;case"null":return null;case"symbol":return zF;default:case"default":return u.default??u.initial}};if(!u.type||u.type==="text")return await hC({message:D,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial}).then(F);if(u.type==="confirm")return await tC({message:D,initialValue:u.initial}).then(F);if(u.type==="select")return await AC({message:D,options:u.options.map((E)=>typeof E==="string"?{value:E,label:E}:E),initialValue:u.initial}).then(F);if(u.type==="multiselect")return await cC({message:D,options:u.options.map((E)=>typeof E==="string"?{value:E,label:E}:E),required:u.required,initialValues:u.initial}).then(F);throw Error(`Unknown prompt type: ${u.type}`)}var V0,iF,cD,Yu,hF,mE,y,NE,aF,XE,YE,QE=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},IE,J0=10,tF=(D=0)=>(u)=>`\x1B[${u+D}m`,AF=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,cF=(D=0)=>(u,F,E)=>`\x1B[${38+D};2;${u};${F};${E}m`,U,TE,RE,UE,Tu,jE=39,Z0="\x07",WF="[",GE="]",MF="m",N0,bF=(D)=>`${Tu.values().next().value}${WF}${D}${MF}`,$F=(D)=>`${Tu.values().next().value}${N0}${D}${Z0}`,kE=(D)=>D.split(" ").map((u)=>Au(u)),o0=(D,u,F)=>{let E=[...u],r=!1,B=!1,C=Au(wF(D[D.length-1]));for(let[n,f]of E.entries()){let i=Au(f);if(C+i<=F?D[D.length-1]+=f:(D.push(f),C=0),Tu.has(f)&&(r=!0,B=E.slice(n+1).join("").startsWith(N0)),r){B?f===Z0&&(r=!1,B=!1):f===MF&&(r=!1);continue}C+=i,C===F&&n<E.length-1&&(D.push(""),C=0)}!C&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},PE=(D)=>{let u=D.split(" "),F=u.length;for(;F>0&&!(Au(u[F-1])>0);)F--;return F===u.length?D:u.slice(0,F).join(" ")+u.slice(F).join("")},OE=(D,u,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let E="",r,B,C=kE(D),n=[""];for(let[i,t]of D.split(" ").entries()){F.trim!==!1&&(n[n.length-1]=n[n.length-1].trimStart());let b=Au(n[n.length-1]);if(i!==0&&(b>=u&&(F.wordWrap===!1||F.trim===!1)&&(n.push(""),b=0),(b>0||F.trim===!1)&&(n[n.length-1]+=" ",b++)),F.hard&&C[i]>u){let e=u-b,h=1+Math.floor((C[i]-e-1)/u);Math.floor((C[i]-1)/u)<h&&n.push(""),o0(n,t,u);continue}if(b+C[i]>u&&b>0&&C[i]>0){if(F.wordWrap===!1&&b<u){o0(n,t,u);continue}n.push("")}if(b+C[i]>u&&F.wordWrap===!1){o0(n,t,u);continue}n[n.length-1]+=t}F.trim!==!1&&(n=n.map((i)=>PE(i)));let f=[...n.join(`
30
+ `)];for(let[i,t]of f.entries()){if(E+=t,Tu.has(t)){let{groups:e}=new RegExp(`(?:\\${WF}(?<code>\\d+)m|\\${N0}(?<uri>.*)${Z0})`).exec(f.slice(i).join(""))||{groups:{}};if(e.code!==void 0){let h=Number.parseFloat(e.code);r=h===jE?void 0:h}else e.uri!==void 0&&(B=e.uri.length===0?void 0:e.uri)}let b=UE.codes.get(Number(r));f[i+1]===`
31
+ `?(B&&(E+=$F("")),r&&b&&(E+=bF(b))):t===`
32
+ `&&(r&&b&&(E+=bF(r)),B&&(E+=$F(B)))}return E},LE,Iu,yF,gE,sE=(D,u,F)=>(u in D)?gE(D,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[u]=F,BD=(D,u,F)=>(sE(D,typeof u!="symbol"?u+"":u,F),F),JF,lE,dE=(D,u,F)=>(u in D)?lE(D,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[u]=F,SF=(D,u,F)=>(dE(D,typeof u!="symbol"?u+"":u,F),F),xE,DC,uC=(D,u,F)=>(u in D)?DC(D,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[u]=F,KF=(D,u,F)=>(uC(D,typeof u!="symbol"?u+"":u,F),F),oF,qF,EC,bD=(D,u)=>EC?D:u,CC,rC,BC,nC,_,sD,q0,z0,fC,vF,iC,Ru=(D)=>{switch(D){case"initial":case"active":return y.cyan(CC);case"cancel":return y.red(rC);case"error":return y.yellow(BC);case"submit":return y.green(nC)}},m0=(D)=>{let{cursor:u,options:F,style:E}=D,r=D.maxItems??Number.POSITIVE_INFINITY,B=Math.max(process.stdout.rows-4,0),C=Math.min(B,Math.max(r,5)),n=0;u>=n+C-3?n=Math.max(Math.min(u-C+3,F.length-C),0):u<n+2&&(n=Math.max(u-2,0));let f=C<F.length&&n>0,i=C<F.length&&n+C<F.length;return F.slice(n,n+C).map((t,b,e)=>{let h=b===0&&f,A=b===e.length-1&&i;return h||A?y.dim("..."):E(t,b+n===u)})},hC=(D)=>new qF({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){let u=`${y.gray(_)}
33
+ ${Ru(this.state)} ${D.message}
34
+ `,F=D.placeholder?y.inverse(D.placeholder[0])+y.dim(D.placeholder.slice(1)):y.inverse(y.hidden("_")),E=this.value?this.valueWithCursor:F;switch(this.state){case"error":return`${u.trim()}
35
+ ${y.yellow(_)} ${E}
36
+ ${y.yellow(sD)} ${y.yellow(this.error)}
37
+ `;case"submit":return`${u}${y.gray(_)} ${y.dim(this.value||D.placeholder)}`;case"cancel":return`${u}${y.gray(_)} ${y.strikethrough(y.dim(this.value??""))}${this.value?.trim()?`
38
+ ${y.gray(_)}`:""}`;default:return`${u}${y.cyan(_)} ${E}
39
+ ${y.cyan(sD)}
40
+ `}}}).prompt(),tC=(D)=>{let u=D.active??"Yes",F=D.inactive??"No";return new JF({active:u,inactive:F,initialValue:D.initialValue??!0,render(){let E=`${y.gray(_)}
41
+ ${Ru(this.state)} ${D.message}
42
+ `,r=this.value?u:F;switch(this.state){case"submit":return`${E}${y.gray(_)} ${y.dim(r)}`;case"cancel":return`${E}${y.gray(_)} ${y.strikethrough(y.dim(r))}
43
+ ${y.gray(_)}`;default:return`${E}${y.cyan(_)} ${this.value?`${y.green(q0)} ${u}`:`${y.dim(z0)} ${y.dim(u)}`} ${y.dim("/")} ${this.value?`${y.dim(z0)} ${y.dim(F)}`:`${y.green(q0)} ${F}`}
44
+ ${y.cyan(sD)}
45
+ `}}}).prompt()},AC=(D)=>{let u=(F,E)=>{let r=F.label??String(F.value);switch(E){case"selected":return`${y.dim(r)}`;case"active":return`${y.green(q0)} ${r} ${F.hint?y.dim(`(${F.hint})`):""}`;case"cancelled":return`${y.strikethrough(y.dim(r))}`;default:return`${y.dim(z0)} ${y.dim(r)}`}};return new oF({options:D.options,initialValue:D.initialValue,render(){let F=`${y.gray(_)}
46
+ ${Ru(this.state)} ${D.message}
47
+ `;switch(this.state){case"submit":return`${F}${y.gray(_)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${F}${y.gray(_)} ${u(this.options[this.cursor],"cancelled")}
48
+ ${y.gray(_)}`;default:return`${F}${y.cyan(_)} ${m0({cursor:this.cursor,options:this.options,maxItems:D.maxItems,style:(E,r)=>u(E,r?"active":"inactive")}).join(`
49
+ ${y.cyan(_)} `)}
50
+ ${y.cyan(sD)}
51
+ `}}}).prompt()},cC=(D)=>{let u=(F,E)=>{let r=F.label??String(F.value);return E==="active"?`${y.cyan(fC)} ${r} ${F.hint?y.dim(`(${F.hint})`):""}`:E==="selected"?`${y.green(vF)} ${y.dim(r)}`:E==="cancelled"?`${y.strikethrough(y.dim(r))}`:E==="active-selected"?`${y.green(vF)} ${r} ${F.hint?y.dim(`(${F.hint})`):""}`:E==="submitted"?`${y.dim(r)}`:`${y.dim(iC)} ${y.dim(r)}`};return new xE({options:D.options,initialValues:D.initialValues,required:D.required??!0,cursorAt:D.cursorAt,validate(F){if(this.required&&F.length===0)return`Please select at least one option.
52
+ ${y.reset(y.dim(`Press ${y.gray(y.bgWhite(y.inverse(" space ")))} to select, ${y.gray(y.bgWhite(y.inverse(" enter ")))} to submit`))}`},render(){let F=`${y.gray(_)}
53
+ ${Ru(this.state)} ${D.message}
54
+ `,E=(r,B)=>{let C=this.value.includes(r.value);return B&&C?u(r,"active-selected"):C?u(r,"selected"):u(r,B?"active":"inactive")};switch(this.state){case"submit":return`${F}${y.gray(_)} ${this.options.filter(({value:r})=>this.value.includes(r)).map((r)=>u(r,"submitted")).join(y.dim(", "))||y.dim("none")}`;case"cancel":{let r=this.options.filter(({value:B})=>this.value.includes(B)).map((B)=>u(B,"cancelled")).join(y.dim(", "));return`${F}${y.gray(_)} ${r.trim()?`${r}
55
+ ${y.gray(_)}`:""}`}case"error":{let r=this.error.split(`
56
+ `).map((B,C)=>C===0?`${y.yellow(sD)} ${y.yellow(B)}`:` ${B}`).join(`
57
+ `);return`${F+y.yellow(_)} ${m0({options:this.options,cursor:this.cursor,maxItems:D.maxItems,style:E}).join(`
58
+ ${y.yellow(_)} `)}
59
+ ${r}
60
+ `}default:return`${F}${y.cyan(_)} ${m0({options:this.options,cursor:this.cursor,maxItems:D.maxItems,style:E}).join(`
61
+ ${y.cyan(_)} `)}
62
+ ${y.cyan(sD)}
63
+ `}}}).prompt()},zF;var NF=Q(()=>{cD=qE(),Yu={exports:{}};mE=zE(),y=oE(mE);NE=ZE();aF={exports:{}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function(E){var r=E.charCodeAt(0),B=E.length==2?E.charCodeAt(1):0,C=r;return 55296<=r&&r<=56319&&56320<=B&&B<=57343&&(r&=1023,B&=1023,C=r<<10|B,C+=65536),C==12288||65281<=C&&C<=65376||65504<=C&&C<=65510?"F":C==8361||65377<=C&&C<=65470||65474<=C&&C<=65479||65482<=C&&C<=65487||65490<=C&&C<=65495||65498<=C&&C<=65500||65512<=C&&C<=65518?"H":4352<=C&&C<=4447||4515<=C&&C<=4519||4602<=C&&C<=4607||9001<=C&&C<=9002||11904<=C&&C<=11929||11931<=C&&C<=12019||12032<=C&&C<=12245||12272<=C&&C<=12283||12289<=C&&C<=12350||12353<=C&&C<=12438||12441<=C&&C<=12543||12549<=C&&C<=12589||12593<=C&&C<=12686||12688<=C&&C<=12730||12736<=C&&C<=12771||12784<=C&&C<=12830||12832<=C&&C<=12871||12880<=C&&C<=13054||13056<=C&&C<=19903||19968<=C&&C<=42124||42128<=C&&C<=42182||43360<=C&&C<=43388||44032<=C&&C<=55203||55216<=C&&C<=55238||55243<=C&&C<=55291||63744<=C&&C<=64255||65040<=C&&C<=65049||65072<=C&&C<=65106||65108<=C&&C<=65126||65128<=C&&C<=65131||110592<=C&&C<=110593||127488<=C&&C<=127490||127504<=C&&C<=127546||127552<=C&&C<=127560||127568<=C&&C<=127569||131072<=C&&C<=194367||177984<=C&&C<=196605||196608<=C&&C<=262141?"W":32<=C&&C<=126||162<=C&&C<=163||165<=C&&C<=166||C==172||C==175||10214<=C&&C<=10221||10629<=C&&C<=10630?"Na":C==161||C==164||167<=C&&C<=168||C==170||173<=C&&C<=174||176<=C&&C<=180||182<=C&&C<=186||188<=C&&C<=191||C==198||C==208||215<=C&&C<=216||222<=C&&C<=225||C==230||232<=C&&C<=234||236<=C&&C<=237||C==240||242<=C&&C<=243||247<=C&&C<=250||C==252||C==254||C==257||C==273||C==275||C==283||294<=C&&C<=295||C==299||305<=C&&C<=307||C==312||319<=C&&C<=322||C==324||328<=C&&C<=331||C==333||338<=C&&C<=339||358<=C&&C<=359||C==363||C==462||C==464||C==466||C==468||C==470||C==472||C==474||C==476||C==593||C==609||C==708||C==711||713<=C&&C<=715||C==717||C==720||728<=C&&C<=731||C==733||C==735||768<=C&&C<=879||913<=C&&C<=929||931<=C&&C<=937||945<=C&&C<=961||963<=C&&C<=969||C==1025||1040<=C&&C<=1103||C==1105||C==8208||8211<=C&&C<=8214||8216<=C&&C<=8217||8220<=C&&C<=8221||8224<=C&&C<=8226||8228<=C&&C<=8231||C==8240||8242<=C&&C<=8243||C==8245||C==8251||C==8254||C==8308||C==8319||8321<=C&&C<=8324||C==8364||C==8451||C==8453||C==8457||C==8467||C==8470||8481<=C&&C<=8482||C==8486||C==8491||8531<=C&&C<=8532||8539<=C&&C<=8542||8544<=C&&C<=8555||8560<=C&&C<=8569||C==8585||8592<=C&&C<=8601||8632<=C&&C<=8633||C==8658||C==8660||C==8679||C==8704||8706<=C&&C<=8707||8711<=C&&C<=8712||C==8715||C==8719||C==8721||C==8725||C==8730||8733<=C&&C<=8736||C==8739||C==8741||8743<=C&&C<=8748||C==8750||8756<=C&&C<=8759||8764<=C&&C<=8765||C==8776||C==8780||C==8786||8800<=C&&C<=8801||8804<=C&&C<=8807||8810<=C&&C<=8811||8814<=C&&C<=8815||8834<=C&&C<=8835||8838<=C&&C<=8839||C==8853||C==8857||C==8869||C==8895||C==8978||9312<=C&&C<=9449||9451<=C&&C<=9547||9552<=C&&C<=9587||9600<=C&&C<=9615||9618<=C&&C<=9621||9632<=C&&C<=9633||9635<=C&&C<=9641||9650<=C&&C<=9651||9654<=C&&C<=9655||9660<=C&&C<=9661||9664<=C&&C<=9665||9670<=C&&C<=9672||C==9675||9678<=C&&C<=9681||9698<=C&&C<=9701||C==9711||9733<=C&&C<=9734||C==9737||9742<=C&&C<=9743||9748<=C&&C<=9749||C==9756||C==9758||C==9792||C==9794||9824<=C&&C<=9825||9827<=C&&C<=9829||9831<=C&&C<=9834||9836<=C&&C<=9837||C==9839||9886<=C&&C<=9887||9918<=C&&C<=9919||9924<=C&&C<=9933||9935<=C&&C<=9953||C==9955||9960<=C&&C<=9983||C==10045||C==10071||10102<=C&&C<=10111||11093<=C&&C<=11097||12872<=C&&C<=12879||57344<=C&&C<=63743||65024<=C&&C<=65039||C==65533||127232<=C&&C<=127242||127248<=C&&C<=127277||127280<=C&&C<=127337||127344<=C&&C<=127386||917760<=C&&C<=917999||983040<=C&&C<=1048573||1048576<=C&&C<=1114109?"A":"N"},u.characterLength=function(E){var r=this.eastAsianWidth(E);return r=="F"||r=="W"||r=="A"?2:1};function F(E){return E.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(E){for(var r=F(E),B=0,C=0;C<r.length;C++)B=B+this.characterLength(r[C]);return B},u.slice=function(E,r,B){textLen=u.length(E),r=r||0,B=B||1,r<0&&(r=textLen+r),B<0&&(B=textLen+B);for(var C="",n=0,f=F(E),i=0;i<f.length;i++){var t=f[i],b=u.length(t);if(n>=r-(b==2?1:0))if(n+b<=B)C+=t;else break;n+=b}return C}})(aF);XE=aF.exports,YE=HF(XE),IE=HF(QE);U={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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(U.modifier);TE=Object.keys(U.color),RE=Object.keys(U.bgColor);[...TE,...RE];UE=_E(),Tu=new Set(["\x1B","\x9B"]),N0=`${GE}8;;`;LE=["up","down","left","right","space","enter","cancel"],Iu={actions:new Set(LE),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");yF=Symbol("clack:cancel");gE=Object.defineProperty;JF=class JF extends cu{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(u)=>{this.output.write(cD.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};lE=Object.defineProperty,xE=class extends cu{constructor(D){super(D,!1),SF(this,"options"),SF(this,"cursor",0),this.options=D.options,this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:u})=>u===D.cursorAt),0),this.on("key",(u)=>{u==="a"&&this.toggleAll()}),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let D=this.value.length===this.options.length;this.value=D?[]:this.options.map((u)=>u.value)}toggleValue(){let D=this.value.includes(this._value);this.value=D?this.value.filter((u)=>u!==this._value):[...this.value,this._value]}},DC=Object.defineProperty;oF=class oF extends cu{constructor(D){super(D,!1),KF(this,"options"),KF(this,"cursor",0),this.options=D.options,this.cursor=this.options.findIndex(({value:u})=>u===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};qF=class qF extends cu{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let D=this.value.slice(0,this.cursor),[u,...F]=this.value.slice(this.cursor);return`${D}${y.inverse(u)}${F.join("")}`}get cursor(){return this._cursor}constructor(D){super(D),this.on("finalize",()=>{this.value||(this.value=D.defaultValue)})}};EC=FC(),CC=bD("\u276F",">"),rC=bD("\u25A0","x"),BC=bD("\u25B2","x"),nC=bD("\u2714","\u221A"),_=bD(""),sD=bD(""),q0=bD("\u25CF",">"),z0=bD("\u25CB"," "),fC=bD("\u25FB","[\u2022]"),vF=bD("\u25FC","[+]"),iC=bD("\u25FB","[ ]");`${y.gray(_)} `;zF=Symbol.for("cancel")});var jF={};zu(jF,{default:()=>GD,createConsola:()=>UF,consola:()=>GD,LogTypes:()=>mu,LogLevels:()=>l,Consola:()=>g});import XF from"process";function eC(){if(globalThis.process?.env)for(let D of $C){let u=D[1]||D[0];if(globalThis.process?.env[u])return{name:D[0].toLowerCase(),...D[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}function jD(D){return D?D!=="false":!1}function zC(){let D=qC.find((u)=>u[0]);if(D)return{name:D[1]}}function ZC({onlyFirst:D=!1}={}){let F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(F,D?void 0:"g")}function XC(D){if(typeof D!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(NC,"")}function YC(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function QC(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function IC(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9776&&D<=9783||D>=9800&&D<=9811||D===9855||D>=9866&&D<=9871||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12773||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101631&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D>=119552&&D<=119638||D>=119648&&D<=119670||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129673||D>=129679&&D<=129734||D>=129742&&D<=129756||D>=129759&&D<=129769||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function TC(D){if(!Number.isSafeInteger(D))throw TypeError(`Expected a code point, got \`${typeof D}\`.`)}function RC(D,{ambiguousAsWide:u=!1}={}){if(TC(D),QC(D)||IC(D)||u&&YC(D))return 2;return 1}function GC(D,u={}){if(typeof D!=="string"||D.length===0)return 0;let{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:E=!1}=u;if(!E)D=XC(D);if(D.length===0)return 0;let r=0,B={ambiguousAsWide:!F};for(let{segment:C}of UC.segment(D)){let n=C.codePointAt(0);if(n<=31||n>=127&&n<=159)continue;if(n>=8203&&n<=8207||n===65279)continue;if(n>=768&&n<=879||n>=6832&&n<=6911||n>=7616&&n<=7679||n>=8400&&n<=8447||n>=65056&&n<=65071)continue;if(n>=55296&&n<=57343)continue;if(n>=65024&&n<=65039)continue;if(jC.test(C))continue;if(_C().test(C)){r+=2;continue}r+=RC(n,B)}return r}function kC(){let{env:D}=XF,{TERM:u,TERM_PROGRAM:F}=D;if(XF.platform!=="win32")return u!=="linux";return Boolean(D.WT_SESSION)||Boolean(D.TERMINUS_SUBLIME)||D.ConEmuTask==="{cmd::Cmder}"||F==="Terminus-Sublime"||F==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||D.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function IF(D){if(typeof Intl!=="object"||!Intl.Segmenter)return JD(D).length;return GC(D)}function _u(D){return D.replace(/`([^`]+)`/gm,(u,F)=>R.cyan(F)).replace(/\s+_([^_]+)_\s+/gm,(u,F)=>` ${R.underline(F)} `)}function pC(D="white"){return R[D]||R.white}function gC(D="bgWhite"){return R[`bg${D[0].toUpperCase()}${D.slice(1)}`]||R.bgWhite}function UF(D={}){let u=sC();if(process.env.CONSOLA_LEVEL)u=Number.parseInt(process.env.CONSOLA_LEVEL)??u;return x2({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...E)=>Promise.resolve().then(() => (NF(),ZF)).then((r)=>r.prompt(...E)),reporters:D.reporters||[D.fancy??!(X0||Y0)?new _F:new Zu],...D})}function sC(){if(SC)return l.debug;if(Y0)return l.warn;return l.info}var Uu,bu=(D)=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(D?Uu:globalThis),ZD,bC,$C,TF,yC,X0,RF,SC,Y0,KC,vC,wC,YF,HC,aC,WC,MC,VC,JC,oC,qC,mC,NC,_C=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\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?|[\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](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},UC,jC,PC,OC,LC,KD=(D,u)=>LC?D:u,QF,_F,GD;var Q0=Q(()=>{H0();H0();uF();Xu();Uu=Object.create(null),ZD=new Proxy(Uu,{get(D,u){return bu()[u]??Uu[u]},has(D,u){let F=bu();return u in F||u in Uu},set(D,u,F){let E=bu(!0);return E[u]=F,!0},deleteProperty(D,u){if(!u)return!1;let F=bu(!0);return delete F[u],!0},ownKeys(){let D=bu(!0);return Object.keys(D)}}),bC=typeof process<"u"&&process.env&&"development"||"",$C=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];TF=eC();TF.name;yC=globalThis.process?.platform||"",X0=jD(ZD.CI)||TF.ci!==!1,RF=jD(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),SC=jD(ZD.DEBUG),Y0=bC==="test"||jD(ZD.TEST);jD(ZD.MINIMAL);KC=/^win/i.test(yC);!jD(ZD.NO_COLOR)&&(jD(ZD.FORCE_COLOR)||(RF||KC)&&ZD.TERM);vC=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(vC?.split(".")[0]);wC=globalThis.process||Object.create(null),YF={versions:{}};new Proxy(wC,{get(D,u){if(u==="env")return ZD;if(u in D)return D[u];if(u in YF)return YF[u]}});HC=globalThis.process?.release?.name==="node",aC=!!globalThis.Bun||!!globalThis.process?.versions?.bun,WC=!!globalThis.Deno,MC=!!globalThis.fastly,VC=!!globalThis.Netlify,JC=!!globalThis.EdgeRuntime,oC=globalThis.navigator?.userAgent==="Cloudflare-Workers",qC=[[VC,"netlify"],[JC,"edge-light"],[oC,"workerd"],[MC,"fastly"],[WC,"deno"],[aC,"bun"],[HC,"node"]];mC=zC();mC?.name;NC=ZC();UC=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:(D)=>D.split("")},jC=/^\p{Default_Ignorable_Code_Point}$/u;PC={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},OC={0:"red",1:"yellow"},LC=kC(),QF={error:KD("\u2716","\xD7"),fatal:KD("\u2716","\xD7"),ready:KD("\u2714","\u221A"),warn:KD("\u26A0","\u203C"),info:KD("\u2139","i"),success:KD("\u2714","\u221A"),debug:KD("\u2699","D"),trace:KD("\u2192","\u2192"),fail:KD("\u2716","\xD7"),start:KD("\u25D0","o"),log:""};_F=class _F extends Zu{formatStack(D,u,F){let E=" ".repeat((F?.errorLevel||0)+1);return`
64
+ ${E}`+W0(D,u).map((r)=>" "+r.replace(/^at +/,(B)=>R.gray(B)).replace(/\((.+)\)/,(B,C)=>`(${R.cyan(C)})`)).join(`
65
+ ${E}`)}formatType(D,u,F){let E=PC[D.type]||OC[D.level]||"gray";if(u)return gC(E)(R.black(` ${D.type.toUpperCase()} `));let r=typeof QF[D.type]==="string"?QF[D.type]:D.icon||D.type;return r?pC(E)(r):""}formatLogObj(D,u){let[F,...E]=this.formatArgs(D.args,u).split(`
66
+ `);if(D.type==="box")return M0(_u(F+(E.length>0?`
67
+ `+E.join(`
68
+ `):"")),{title:D.title?_u(D.title):void 0,style:D.style});let r=this.formatDate(D.date,u),B=r&&R.gray(r),C=D.badge??D.level<2,n=this.formatType(D,C,u),f=D.tag?R.gray(D.tag):"",i,t=this.filterAndJoin([n,_u(F)]),b=this.filterAndJoin(u.columns?[f,B]:[f]),e=(u.columns||0)-IF(t)-IF(b)-2;if(i=e>0&&(u.columns||0)>=80?t+" ".repeat(e)+b:(b?`${R.gray(`[${b}]`)} `:"")+t,i+=_u(E.length>0?`
69
+ `+E.join(`
70
+ `):""),D.type==="trace"){let h=Error("Trace: "+D.message);i+=this.formatStack(h.stack||"",h.message)}return C?`
71
+ `+i+`
72
+ `:i}};GD=UF()});var ku=L((uB,r3)=>{var k0=[],C3=0,DD=(D,u)=>{if(C3>=u)k0.push(D)};DD.WARN=1;DD.INFO=2;DD.DEBUG=3;DD.reset=()=>{k0=[]};DD.setDebugLevel=(D)=>{C3=D};DD.warn=(D)=>DD(D,DD.WARN);DD.info=(D)=>DD(D,DD.INFO);DD.debug=(D)=>DD(D,DD.DEBUG);DD.debugMessages=()=>k0;r3.exports=DD});var n3=L((FB,B3)=>{B3.exports=({onlyFirst:D=!1}={})=>{let u=["[\\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(u,D?void 0:"g")}});var i3=L((EB,f3)=>{var Vr=n3();f3.exports=(D)=>typeof D==="string"?D.replace(Vr(),""):D});var t3=L((CB,P0)=>{var h3=(D)=>{if(Number.isNaN(D))return!1;if(D>=4352&&(D<=4447||D===9001||D===9002||11904<=D&&D<=12871&&D!==12351||12880<=D&&D<=19903||19968<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65131||65281<=D&&D<=65376||65504<=D&&D<=65510||110592<=D&&D<=110593||127488<=D&&D<=127569||131072<=D&&D<=262141))return!0;return!1};P0.exports=h3;P0.exports.default=h3});var c3=L((rB,A3)=>{A3.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var $3=L((BB,O0)=>{var Jr=i3(),or=t3(),qr=c3(),b3=(D)=>{if(typeof D!=="string"||D.length===0)return 0;if(D=Jr(D),D.length===0)return 0;D=D.replace(qr()," ");let u=0;for(let F=0;F<D.length;F++){let E=D.codePointAt(F);if(E<=31||E>=127&&E<=159)continue;if(E>=768&&E<=879)continue;if(E>65535)F++;u+=or(E)?2:1}return u};O0.exports=b3;O0.exports.default=b3});var L0=L((nB,K3)=>{var e3=$3();function Pu(D){return D?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function vD(D){let u=Pu();return(""+D).replace(u,"").split(`
73
+ `).reduce(function(r,B){return e3(B)>r?e3(B):r},0)}function yu(D,u){return Array(u+1).join(D)}function zr(D,u,F,E){let r=vD(D);if(u+1>=r){let B=u-r;switch(E){case"right":{D=yu(F,B)+D;break}case"center":{let C=Math.ceil(B/2),n=B-C;D=yu(F,n)+D+yu(F,C);break}default:{D=D+yu(F,B);break}}}return D}var xD={};function Su(D,u,F){u="\x1B["+u+"m",F="\x1B["+F+"m",xD[u]={set:D,to:!0},xD[F]={set:D,to:!1},xD[D]={on:u,off:F}}Su("bold",1,22);Su("italics",3,23);Su("underline",4,24);Su("inverse",7,27);Su("strikethrough",9,29);function y3(D,u){let F=u[1]?parseInt(u[1].split(";")[0]):0;if(F>=30&&F<=39||F>=90&&F<=97){D.lastForegroundAdded=u[0];return}if(F>=40&&F<=49||F>=100&&F<=107){D.lastBackgroundAdded=u[0];return}if(F===0){for(let r in D)if(Object.prototype.hasOwnProperty.call(D,r))delete D[r];return}let E=xD[u[0]];if(E)D[E.set]=E.to}function mr(D){let u=Pu(!0),F=u.exec(D),E={};while(F!==null)y3(E,F),F=u.exec(D);return E}function S3(D,u){let{lastBackgroundAdded:F,lastForegroundAdded:E}=D;if(delete D.lastBackgroundAdded,delete D.lastForegroundAdded,Object.keys(D).forEach(function(r){if(D[r])u+=xD[r].off}),F&&F!="\x1B[49m")u+="\x1B[49m";if(E&&E!="\x1B[39m")u+="\x1B[39m";return u}function Zr(D,u){let{lastBackgroundAdded:F,lastForegroundAdded:E}=D;if(delete D.lastBackgroundAdded,delete D.lastForegroundAdded,Object.keys(D).forEach(function(r){if(D[r])u=xD[r].on+u}),F&&F!="\x1B[49m")u=F+u;if(E&&E!="\x1B[39m")u=E+u;return u}function Nr(D,u){if(D.length===vD(D))return D.substr(0,u);while(vD(D)>u)D=D.slice(0,-1);return D}function Xr(D,u){let F=Pu(!0),E=D.split(Pu()),r=0,B=0,C="",n,f={};while(B<u){n=F.exec(D);let i=E[r];if(r++,B+vD(i)>u)i=Nr(i,u-B);if(C+=i,B+=vD(i),B<u){if(!n)break;C+=n[0],y3(f,n)}}return S3(f,C)}function Yr(D,u,F){if(F=F||"\u2026",vD(D)<=u)return D;u-=vD(F);let r=Xr(D,u);r+=F;let B="\x1B]8;;\x07";if(D.includes(B)&&!r.includes(B))r+=B;return r}function Qr(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function Ir(D,u){D=D||{},u=u||Qr();let F=Object.assign({},u,D);return F.chars=Object.assign({},u.chars,D.chars),F.style=Object.assign({},u.style,D.style),F}function Tr(D,u){let F=[],E=u.split(/(\s+)/g),r=[],B=0,C;for(let n=0;n<E.length;n+=2){let f=E[n],i=B+vD(f);if(B>0&&C)i+=C.length;if(i>D){if(B!==0)F.push(r.join(""));r=[f],B=vD(f)}else r.push(C||"",f),B=i;C=E[n+1]}if(B)F.push(r.join(""));return F}function Rr(D,u){let F=[],E="";function r(C,n){if(E.length&&n)E+=n;E+=C;while(E.length>D)F.push(E.slice(0,D)),E=E.slice(D)}let B=u.split(/(\s+)/g);for(let C=0;C<B.length;C+=2)r(B[C],C&&B[C-1]);if(E.length)F.push(E);return F}function _r(D,u,F=!0){let E=[];u=u.split(`
74
+ `);let r=F?Tr:Rr;for(let B=0;B<u.length;B++)E.push.apply(E,r(D,u[B]));return E}function Ur(D){let u={},F=[];for(let E=0;E<D.length;E++){let r=Zr(u,D[E]);u=mr(r);let B=Object.assign({},u);F.push(S3(B,r))}return F}function jr(D,u){return["\x1B]","8",";",";",D||u,"\x07",u,"\x1B]","8",";",";","\x07"].join("")}K3.exports={strlen:vD,repeat:yu,pad:zr,truncate:Yr,mergeOptions:Ir,wordWrap:_r,colorizeLines:Ur,hyperlink:jr}});var a3=L((fB,H3)=>{var w3={};H3.exports=w3;var v3={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],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],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(v3).forEach(function(D){var u=v3[D],F=w3[D]=[];F.open="\x1B["+u[0]+"m",F.close="\x1B["+u[1]+"m"})});var M3=L((iB,W3)=>{W3.exports=function(D,u){u=u||process.argv;var F=u.indexOf("--"),E=/^-{1,2}/.test(D)?"":"--",r=u.indexOf(E+D);return r!==-1&&(F===-1?!0:r<F)}});var J3=L((hB,V3)=>{var Gr=l2("os"),yD=M3(),ED=process.env,Du=void 0;if(yD("no-color")||yD("no-colors")||yD("color=false"))Du=!1;else if(yD("color")||yD("colors")||yD("color=true")||yD("color=always"))Du=!0;if("FORCE_COLOR"in ED)Du=ED.FORCE_COLOR.length===0||parseInt(ED.FORCE_COLOR,10)!==0;function kr(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function Pr(D){if(Du===!1)return 0;if(yD("color=16m")||yD("color=full")||yD("color=truecolor"))return 3;if(yD("color=256"))return 2;if(D&&!D.isTTY&&Du!==!0)return 0;var u=Du?1:0;if(process.platform==="win32"){var F=Gr.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(F[0])>=10&&Number(F[2])>=10586)return Number(F[2])>=14931?3:2;return 1}if("CI"in ED){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(r){return r in ED})||ED.CI_NAME==="codeship")return 1;return u}if("TEAMCITY_VERSION"in ED)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ED.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in ED){var E=parseInt((ED.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ED.TERM_PROGRAM){case"iTerm.app":return E>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(ED.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(ED.TERM))return 1;if("COLORTERM"in ED)return 1;if(ED.TERM==="dumb")return u;return u}function p0(D){var u=Pr(D);return kr(u)}V3.exports={supportsColor:p0,stdout:p0(process.stdout),stderr:p0(process.stderr)}});var q3=L((tB,o3)=>{o3.exports=function(u,F){var E="";u=u||"Run the trap, drop the bass",u=u.split("");var r={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return u.forEach(function(B){B=B.toLowerCase();var C=r[B]||[" "],n=Math.floor(Math.random()*C.length);if(typeof r[B]<"u")E+=r[B][n];else E+=B}),E}});var m3=L((AB,z3)=>{z3.exports=function(u,F){u=u||" he is here ";var E={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},r=[].concat(E.up,E.down,E.mid);function B(f){var i=Math.floor(Math.random()*f);return i}function C(f){var i=!1;return r.filter(function(t){i=t===f}),i}function n(f,i){var t="",b,e;i=i||{},i.up=typeof i.up<"u"?i.up:!0,i.mid=typeof i.mid<"u"?i.mid:!0,i.down=typeof i.down<"u"?i.down:!0,i.size=typeof i.size<"u"?i.size:"maxi",f=f.split("");for(e in f){if(C(e))continue;switch(t=t+f[e],b={up:0,down:0,mid:0},i.size){case"mini":b.up=B(8),b.mid=B(2),b.down=B(8);break;case"maxi":b.up=B(16)+3,b.mid=B(4)+1,b.down=B(64)+3;break;default:b.up=B(8)+1,b.mid=B(6)/2,b.down=B(8)+1;break}var h=["up","mid","down"];for(var A in h){var $=h[A];for(var S=0;S<=b[$];S++)if(i[$])t=t+E[$][B(E[$].length)]}}return t}return n(u,F)}});var N3=L((cB,Z3)=>{Z3.exports=function(D){return function(u,F,E){if(u===" ")return u;switch(F%3){case 0:return D.red(u);case 1:return D.white(u);case 2:return D.blue(u)}}}});var Y3=L((bB,X3)=>{X3.exports=function(D){return function(u,F,E){return F%2===0?u:D.inverse(u)}}});var I3=L(($B,Q3)=>{Q3.exports=function(D){var u=["red","yellow","green","blue","magenta"];return function(F,E,r){if(F===" ")return F;else return D[u[E++%u.length]](F)}}});var R3=L((eB,T3)=>{T3.exports=function(D){var u=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(F,E,r){return F===" "?F:D[u[Math.round(Math.random()*(u.length-2))]](F)}}});var k3=L((SB,G3)=>{var z={};G3.exports=z;z.themes={};var Or=l2("util"),PD=z.styles=a3(),_3=Object.defineProperties,Lr=new RegExp(/[\r\n]+/g);z.supportsColor=J3().supportsColor;if(typeof z.enabled>"u")z.enabled=z.supportsColor()!==!1;z.enable=function(){z.enabled=!0};z.disable=function(){z.enabled=!1};z.stripColors=z.strip=function(D){return(""+D).replace(/\x1B\[\d+m/g,"")};var yB=z.stylize=function(u,F){if(!z.enabled)return u+"";var E=PD[F];if(!E&&F in z)return z[F](u);return E.open+u+E.close},pr=/[|\\{}()[\]^$+*?.]/g,gr=function(D){if(typeof D!=="string")throw TypeError("Expected a string");return D.replace(pr,"\\$&")};function U3(D){var u=function F(){return lr.apply(F,arguments)};return u._styles=D,u.__proto__=sr,u}var j3=function(){var D={};return PD.grey=PD.gray,Object.keys(PD).forEach(function(u){PD[u].closeRe=new RegExp(gr(PD[u].close),"g"),D[u]={get:function(){return U3(this._styles.concat(u))}}}),D}(),sr=_3(function(){},j3);function lr(){var D=Array.prototype.slice.call(arguments),u=D.map(function(C){if(C!=null&&C.constructor===String)return C;else return Or.inspect(C)}).join(" ");if(!z.enabled||!u)return u;var F=u.indexOf(`
75
+ `)!=-1,E=this._styles,r=E.length;while(r--){var B=PD[E[r]];if(u=B.open+u.replace(B.closeRe,B.open)+B.close,F)u=u.replace(Lr,function(C){return B.close+C+B.open})}return u}z.setTheme=function(D){if(typeof D==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var u in D)(function(F){z[F]=function(E){if(typeof D[F]==="object"){var r=E;for(var B in D[F])r=z[D[F][B]](r);return r}return z[D[F]](E)}})(u)};function dr(){var D={};return Object.keys(j3).forEach(function(u){D[u]={get:function(){return U3([u])}}}),D}var xr=function(u,F){var E=F.split("");return E=E.map(u),E.join("")};z.trap=q3();z.zalgo=m3();z.maps={};z.maps.america=N3()(z);z.maps.zebra=Y3()(z);z.maps.rainbow=I3()(z);z.maps.random=R3()(z);for(g0 in z.maps)(function(D){z[D]=function(u){return xr(z.maps[D],u)}})(g0);var g0;_3(z,dr())});var O3=L((KB,P3)=>{var D9=k3();P3.exports=D9});var s3=L((vB,pu)=>{var{info:u9,debug:g3}=ku(),nD=L0();class Ku{constructor(D){this.setOptions(D),this.x=null,this.y=null}setOptions(D){if(["boolean","number","bigint","string"].indexOf(typeof D)!==-1)D={content:""+D};D=D||{},this.options=D;let u=D.content;if(["boolean","number","bigint","string"].indexOf(typeof u)!==-1)this.content=String(u);else if(!u)this.content=this.options.href||"";else throw Error("Content needs to be a primitive, got: "+typeof u);if(this.colSpan=D.colSpan||1,this.rowSpan=D.rowSpan||1,this.options.href)Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(D,u){this.cells=u;let F=this.options.chars||{},E=D.chars,r=this.chars={};E9.forEach(function(n){s0(F,E,n,r)}),this.truncate=this.options.truncate||D.truncate;let B=this.options.style=this.options.style||{},C=D.style;s0(B,C,"padding-left",this),s0(B,C,"padding-right",this),this.head=B.head||C.head,this.border=B.border||C.border,this.fixedWidth=D.colWidths[this.x],this.lines=this.computeLines(D),this.desiredWidth=nD.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(D){let u=D.wordWrap||D.textWrap,{wordWrap:F=u}=this.options;if(this.fixedWidth&&F){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let B=1;while(B<this.colSpan)this.fixedWidth+=D.colWidths[this.x+B],B++}let{wrapOnWordBoundary:E=!0}=D,{wrapOnWordBoundary:r=E}=this.options;return this.wrapLines(nD.wordWrap(this.fixedWidth,this.content,r))}return this.wrapLines(this.content.split(`
76
+ `))}wrapLines(D){let u=nD.colorizeLines(D);if(this.href)return u.map((F)=>nD.hyperlink(this.href,F));return u}init(D){let u=this.x,F=this.y;this.widths=D.colWidths.slice(u,u+this.colSpan),this.heights=D.rowHeights.slice(F,F+this.rowSpan),this.width=this.widths.reduce(p3,-1),this.height=this.heights.reduce(p3,-1),this.hAlign=this.options.hAlign||D.colAligns[u],this.vAlign=this.options.vAlign||D.rowAligns[F],this.drawRight=u+this.colSpan==D.colWidths.length}draw(D,u){if(D=="top")return this.drawTop(this.drawRight);if(D=="bottom")return this.drawBottom(this.drawRight);let F=nD.truncate(this.content,10,this.truncate);if(!D)u9(`${this.y}-${this.x}: ${this.rowSpan-D}x${this.colSpan} Cell ${F}`);let E=Math.max(this.height-this.lines.length,0),r;switch(this.vAlign){case"center":r=Math.ceil(E/2);break;case"bottom":r=E;break;default:r=0}if(D<r||D>=r+this.lines.length)return this.drawEmpty(this.drawRight,u);let B=this.lines.length>this.height&&D+1>=this.height;return this.drawLine(D-r,this.drawRight,B,u)}drawTop(D){let u=[];if(this.cells)this.widths.forEach(function(F,E){u.push(this._topLeftChar(E)),u.push(nD.repeat(this.chars[this.y==0?"top":"mid"],F))},this);else u.push(this._topLeftChar(0)),u.push(nD.repeat(this.chars[this.y==0?"top":"mid"],this.width));if(D)u.push(this.chars[this.y==0?"topRight":"rightMid"]);return this.wrapWithStyleColors("border",u.join(""))}_topLeftChar(D){let u=this.x+D,F;if(this.y==0)F=u==0?"topLeft":D==0?"topMid":"top";else if(u==0)F="leftMid";else if(F=D==0?"midMid":"bottomMid",this.cells){if(this.cells[this.y-1][u]instanceof Ku.ColSpanCell)F=D==0?"topMid":"mid";if(D==0){let r=1;while(this.cells[this.y][u-r]instanceof Ku.ColSpanCell)r++;if(this.cells[this.y][u-r]instanceof Ku.RowSpanCell)F="leftMid"}}return this.chars[F]}wrapWithStyleColors(D,u){if(this[D]&&this[D].length)try{let F=O3();for(let E=this[D].length-1;E>=0;E--)F=F[this[D][E]];return F(u)}catch(F){return u}else return u}drawLine(D,u,F,E){let r=this.chars[this.x==0?"left":"middle"];if(this.x&&E&&this.cells){let b=this.cells[this.y+E][this.x-1];while(b instanceof Ou)b=this.cells[b.y][b.x-1];if(!(b instanceof Lu))r=this.chars.rightMid}let B=nD.repeat(" ",this.paddingLeft),C=u?this.chars.right:"",n=nD.repeat(" ",this.paddingRight),f=this.lines[D],i=this.width-(this.paddingLeft+this.paddingRight);if(F)f+=this.truncate||"\u2026";let t=nD.truncate(f,i,this.truncate);return t=nD.pad(t,i," ",this.hAlign),t=B+t+n,this.stylizeLine(r,t,C)}stylizeLine(D,u,F){if(D=this.wrapWithStyleColors("border",D),F=this.wrapWithStyleColors("border",F),this.y===0)u=this.wrapWithStyleColors("head",u);return D+u+F}drawBottom(D){let u=this.chars[this.x==0?"bottomLeft":"bottomMid"],F=nD.repeat(this.chars.bottom,this.width),E=D?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",u+F+E)}drawEmpty(D,u){let F=this.chars[this.x==0?"left":"middle"];if(this.x&&u&&this.cells){let B=this.cells[this.y+u][this.x-1];while(B instanceof Ou)B=this.cells[B.y][B.x-1];if(!(B instanceof Lu))F=this.chars.rightMid}let E=D?this.chars.right:"",r=nD.repeat(" ",this.width);return this.stylizeLine(F,r,E)}}class Ou{constructor(){}draw(D){if(typeof D==="number")g3(`${this.y}-${this.x}: 1x1 ColSpanCell`);return""}init(){}mergeTableOptions(){}}class Lu{constructor(D){this.originalCell=D}init(D){let u=this.y,F=this.originalCell.y;this.cellOffset=u-F,this.offset=F9(D.rowHeights,F,this.cellOffset)}draw(D){if(D=="top")return this.originalCell.draw(this.offset,this.cellOffset);if(D=="bottom")return this.originalCell.draw("bottom");return g3(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+D)}mergeTableOptions(){}}function L3(...D){return D.filter((u)=>u!==void 0&&u!==null).shift()}function s0(D,u,F,E){let r=F.split("-");if(r.length>1)r[1]=r[1].charAt(0).toUpperCase()+r[1].substr(1),r=r.join(""),E[r]=L3(D[r],D[F],u[r],u[F]);else E[F]=L3(D[F],u[F])}function F9(D,u,F){let E=D[u];for(let r=1;r<F;r++)E+=1+D[u+r];return E}function p3(D,u){return D+u+1}var E9=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];pu.exports=Ku;pu.exports.ColSpanCell=Ou;pu.exports.RowSpanCell=Lu});var x3=L((wB,d3)=>{var{warn:C9,debug:r9}=ku(),l0=s3(),{ColSpanCell:B9,RowSpanCell:n9}=l0;(function(){function D(h,A){if(h[A]>0)return D(h,A+1);return A}function u(h){let A={};h.forEach(function($,S){let V=0;$.forEach(function(a){a.y=S,a.x=S?D(A,V):V;let m=a.rowSpan||1,Z=a.colSpan||1;if(m>1)for(let X=0;X<Z;X++)A[a.x+X]=m;V=a.x+Z}),Object.keys(A).forEach((a)=>{if(A[a]--,A[a]<1)delete A[a]})})}function F(h){let A=0;return h.forEach(function($){$.forEach(function(S){A=Math.max(A,S.x+(S.colSpan||1))})}),A}function E(h){return h.length}function r(h,A){let $=h.y,S=h.y-1+(h.rowSpan||1),V=A.y,a=A.y-1+(A.rowSpan||1),m=!($>a||V>S),Z=h.x,X=h.x-1+(h.colSpan||1),P=A.x,Y=A.x-1+(A.colSpan||1),I=!(Z>Y||P>X);return m&&I}function B(h,A,$){let S=Math.min(h.length-1,$),V={x:A,y:$};for(let a=0;a<=S;a++){let m=h[a];for(let Z=0;Z<m.length;Z++)if(r(V,m[Z]))return!0}return!1}function C(h,A,$,S){for(let V=$;V<S;V++)if(B(h,V,A))return!1;return!0}function n(h){h.forEach(function(A,$){A.forEach(function(S){for(let V=1;V<S.rowSpan;V++){let a=new n9(S);a.x=S.x,a.y=S.y+V,a.colSpan=S.colSpan,i(a,h[$+V])}})})}function f(h){for(let A=h.length-1;A>=0;A--){let $=h[A];for(let S=0;S<$.length;S++){let V=$[S];for(let a=1;a<V.colSpan;a++){let m=new B9;m.x=V.x+a,m.y=V.y,$.splice(S+1,0,m)}}}}function i(h,A){let $=0;while($<A.length&&A[$].x<h.x)$++;A.splice($,0,h)}function t(h){let A=E(h),$=F(h);r9(`Max rows: ${A}; Max cols: ${$}`);for(let S=0;S<A;S++)for(let V=0;V<$;V++)if(!B(h,V,S)){let a={x:V,y:S,colSpan:1,rowSpan:1};V++;while(V<$&&!B(h,V,S))a.colSpan++,V++;let m=S+1;while(m<A&&C(h,m,a.x,a.x+a.colSpan))a.rowSpan++,m++;let Z=new l0(a);Z.x=a.x,Z.y=a.y,C9(`Missing cell at ${Z.y}-${Z.x}.`),i(Z,h[S])}}function b(h){return h.map(function(A){if(!Array.isArray(A)){let $=Object.keys(A)[0];if(A=A[$],Array.isArray(A))A=A.slice(),A.unshift($);else A=[$,A]}return A.map(function($){return new l0($)})})}function e(h){let A=b(h);return u(A),t(A),n(A),f(A),A}d3.exports={makeTableLayout:e,layoutTable:u,addRowSpanCells:n,maxWidth:F,fillInTable:t,computeWidths:l3("colSpan","desiredWidth","x",1),computeHeights:l3("rowSpan","desiredHeight","y",1)}})();function l3(D,u,F,E){return function(r,B){let C=[],n=[],f={};B.forEach(function(i){i.forEach(function(t){if((t[D]||1)>1)n.push(t);else C[t[F]]=Math.max(C[t[F]]||0,t[u]||0,E)})}),r.forEach(function(i,t){if(typeof i==="number")C[t]=i});for(let i=n.length-1;i>=0;i--){let t=n[i],b=t[D],e=t[F],h=C[e],A=typeof r[e]==="number"?0:1;if(typeof h==="number"){for(let $=1;$<b;$++)if(h+=1+C[e+$],typeof r[e+$]!=="number")A++}else if(h=u==="desiredWidth"?t.desiredWidth-1:1,!f[e]||f[e]<h)f[e]=h;if(t[u]>h){let $=0;while(A>0&&t[u]>h){if(typeof r[e+$]!=="number"){let S=Math.round((t[u]-h)/A);h+=S,C[e+$]+=S,A--}$++}}}Object.assign(r,C,f);for(let i=0;i<r.length;i++)r[i]=Math.max(E,r[i]||0)}}});var u8=L((HB,D8)=>{var oD=ku(),f9=L0(),d0=x3();class D2 extends Array{constructor(D){super();let u=f9.mergeOptions(D);if(Object.defineProperty(this,"options",{value:u,enumerable:u.debug}),u.debug){switch(typeof u.debug){case"boolean":oD.setDebugLevel(oD.WARN);break;case"number":oD.setDebugLevel(u.debug);break;case"string":oD.setDebugLevel(parseInt(u.debug,10));break;default:oD.setDebugLevel(oD.WARN),oD.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof u.debug}`)}Object.defineProperty(this,"messages",{get(){return oD.debugMessages()}})}}toString(){let D=this,u=this.options.head&&this.options.head.length;if(u){if(D=[this.options.head],this.length)D.push.apply(D,this)}else this.options.style.head=[];let F=d0.makeTableLayout(D);F.forEach(function(r){r.forEach(function(B){B.mergeTableOptions(this.options,F)},this)},this),d0.computeWidths(this.options.colWidths,F),d0.computeHeights(this.options.rowHeights,F),F.forEach(function(r){r.forEach(function(B){B.init(this.options)},this)},this);let E=[];for(let r=0;r<F.length;r++){let B=F[r],C=this.options.rowHeights[r];if(r===0||!this.options.style.compact||r==1&&u)x0(B,"top",E);for(let n=0;n<C;n++)x0(B,n,E);if(r+1==F.length)x0(B,"bottom",E)}return E.join(`
77
+ `)}get width(){return this.toString().split(`
78
+ `)[0].length}}D2.reset=()=>oD.reset();function x0(D,u,F){let E=[];D.forEach(function(B){E.push(B.draw(u))});let r=E.join("");if(r.length)F.push(r)}D8.exports=D2});var i2=L((XB,y8)=>{var f2={to(D,u){if(!u)return`\x1B[${D+1}G`;return`\x1B[${u+1};${D+1}H`},move(D,u){let F="";if(D<0)F+=`\x1B[${-D}D`;else if(D>0)F+=`\x1B[${D}C`;if(u<0)F+=`\x1B[${-u}A`;else if(u>0)F+=`\x1B[${u}B`;return F},up:(D=1)=>`\x1B[${D}A`,down:(D=1)=>`\x1B[${D}B`,forward:(D=1)=>`\x1B[${D}C`,backward:(D=1)=>`\x1B[${D}D`,nextLine:(D=1)=>"\x1B[E".repeat(D),prevLine:(D=1)=>"\x1B[F".repeat(D),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},v9={up:(D=1)=>"\x1B[S".repeat(D),down:(D=1)=>"\x1B[T".repeat(D)},w9={screen:"\x1B[2J",up:(D=1)=>"\x1B[1J".repeat(D),down:(D=1)=>"\x1B[J".repeat(D),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(D){let u="";for(let F=0;F<D;F++)u+=this.line+(F<D-1?f2.up():"");if(D)u+=f2.left;return u}};y8.exports={cursor:f2,scroll:v9,erase:w9,beep:"\x07"}});var z2={};zu(z2,{updateProfile:()=>q2,setActiveProfile:()=>o2,saveCredentials:()=>LD,removeProfile:()=>J2,loadCredentials:()=>CD,getActiveProfile:()=>Hu,credentialsPath:()=>C0,addOrUpdateProfile:()=>V2});import{existsSync as N8,mkdirSync as j9,readFileSync as G9,writeFileSync as k9,chmodSync as P9}from"fs";import{homedir as O9}from"os";import{join as X8}from"path";function Y8(){return X8(process.env.HOME??O9(),".asc")}function M2(){return X8(Y8(),"credentials.json")}function L9(){let D=Y8();if(!N8(D))j9(D,{recursive:!0,mode:448})}function CD(){let D=M2();if(!N8(D))return{activeProfile:"default",profiles:[]};try{let u=G9(D,"utf8");return JSON.parse(u)}catch{return{activeProfile:"default",profiles:[]}}}function LD(D){L9();let u=M2();k9(u,JSON.stringify(D,null,2),"utf8"),P9(u,384)}function Hu(){let D=process.env.ASC_KEY_ID,u=process.env.ASC_ISSUER_ID,F=process.env.ASC_PRIVATE_KEY_PATH,E=process.env.ASC_PRIVATE_KEY;if(D&&u&&(F||E))return{name:"env",keyId:D,issuerId:u,privateKeyPath:F,privateKeyPem:E,isDefault:!0};let r=CD(),B=process.env.ASC_PROFILE??r.activeProfile??"default";return r.profiles.find((C)=>C.name===B)}function V2(D){let u=CD(),F=u.profiles.findIndex((E)=>E.name===D.name);if(F>=0)u.profiles[F]=D;else u.profiles.push(D);if(u.profiles.length===1)u.activeProfile=D.name;LD(u)}function J2(D){let u=CD(),F=u.profiles.findIndex((E)=>E.name===D);if(F<0)return!1;if(u.profiles.splice(F,1),u.activeProfile===D)u.activeProfile=u.profiles[0]?.name??"default";return LD(u),!0}function o2(D){let u=CD();if(!u.profiles.find((F)=>F.name===D))return!1;return u.activeProfile=D,LD(u),!0}function q2(D,u){let F=CD(),E=F.profiles.findIndex((r)=>r.name===D);if(E<0)return!1;return F.profiles[E]={...F.profiles[E],...u},LD(F),!0}function C0(){return M2()}var au=()=>{};var YD,Wu=(D)=>D instanceof CryptoKey;var Cu=Q(()=>{YD=crypto});function Q8(...D){let u=D.reduce((r,{length:B})=>r+B,0),F=new Uint8Array(u),E=0;for(let r of D)F.set(r,E),E+=r.length;return F}var qD,Mu;var r0=Q(()=>{qD=new TextEncoder,Mu=new TextDecoder});var p9=(D)=>{let u=D;if(typeof u==="string")u=qD.encode(u);let F=32768,E=[];for(let r=0;r<u.length;r+=F)E.push(String.fromCharCode.apply(null,u.subarray(r,r+F)));return btoa(E.join(""))},B0=(D)=>{return p9(D).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},g9=(D)=>{let u=atob(D),F=new Uint8Array(u.length);for(let E=0;E<u.length;E++)F[E]=u.charCodeAt(E);return F},n0=(D)=>{let u=D;if(u instanceof Uint8Array)u=Mu.decode(u);u=u.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return g9(u)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}};var m2=Q(()=>{r0()});var FD,I8,T8,R8,rD,_8,U8,QD,f0,j8,G8,k8,P8,O8,L8;var ID=Q(()=>{FD=class FD extends Error{constructor(D,u){super(D,u);this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}};FD.code="ERR_JOSE_GENERIC";I8=class I8 extends FD{constructor(D,u,F="unspecified",E="unspecified"){super(D,{cause:{claim:F,reason:E,payload:u}});this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=F,this.reason=E,this.payload=u}};I8.code="ERR_JWT_CLAIM_VALIDATION_FAILED";T8=class T8 extends FD{constructor(D,u,F="unspecified",E="unspecified"){super(D,{cause:{claim:F,reason:E,payload:u}});this.code="ERR_JWT_EXPIRED",this.claim=F,this.reason=E,this.payload=u}};T8.code="ERR_JWT_EXPIRED";R8=class R8 extends FD{constructor(){super(...arguments);this.code="ERR_JOSE_ALG_NOT_ALLOWED"}};R8.code="ERR_JOSE_ALG_NOT_ALLOWED";rD=class rD extends FD{constructor(){super(...arguments);this.code="ERR_JOSE_NOT_SUPPORTED"}};rD.code="ERR_JOSE_NOT_SUPPORTED";_8=class _8 extends FD{constructor(D="decryption operation failed",u){super(D,u);this.code="ERR_JWE_DECRYPTION_FAILED"}};_8.code="ERR_JWE_DECRYPTION_FAILED";U8=class U8 extends FD{constructor(){super(...arguments);this.code="ERR_JWE_INVALID"}};U8.code="ERR_JWE_INVALID";QD=class QD extends FD{constructor(){super(...arguments);this.code="ERR_JWS_INVALID"}};QD.code="ERR_JWS_INVALID";f0=class f0 extends FD{constructor(){super(...arguments);this.code="ERR_JWT_INVALID"}};f0.code="ERR_JWT_INVALID";j8=class j8 extends FD{constructor(){super(...arguments);this.code="ERR_JWK_INVALID"}};j8.code="ERR_JWK_INVALID";G8=class G8 extends FD{constructor(){super(...arguments);this.code="ERR_JWKS_INVALID"}};G8.code="ERR_JWKS_INVALID";k8=class k8 extends FD{constructor(D="no applicable key found in the JSON Web Key Set",u){super(D,u);this.code="ERR_JWKS_NO_MATCHING_KEY"}};k8.code="ERR_JWKS_NO_MATCHING_KEY";P8=class P8 extends FD{constructor(D="multiple matching keys found in the JSON Web Key Set",u){super(D,u);this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}};P8.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";O8=class O8 extends FD{constructor(D="request timed out",u){super(D,u);this.code="ERR_JWKS_TIMEOUT"}};O8.code="ERR_JWKS_TIMEOUT";L8=class L8 extends FD{constructor(D="signature verification failed",u){super(D,u);this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}};L8.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"});function aD(D,u="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${u} must be ${D}`)}function Vu(D,u){return D.name===u}function Z2(D){return parseInt(D.name.slice(4),10)}function l9(D){switch(D){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}function d9(D,u){if(u.length&&!u.some((F)=>D.usages.includes(F))){let F="CryptoKey does not support this operation, its usages must include ";if(u.length>2){let E=u.pop();F+=`one of ${u.join(", ")}, or ${E}.`}else if(u.length===2)F+=`one of ${u[0]} or ${u[1]}.`;else F+=`${u[0]}.`;throw TypeError(F)}}function p8(D,u,...F){switch(u){case"HS256":case"HS384":case"HS512":{if(!Vu(D.algorithm,"HMAC"))throw aD("HMAC");let E=parseInt(u.slice(2),10);if(Z2(D.algorithm.hash)!==E)throw aD(`SHA-${E}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Vu(D.algorithm,"RSASSA-PKCS1-v1_5"))throw aD("RSASSA-PKCS1-v1_5");let E=parseInt(u.slice(2),10);if(Z2(D.algorithm.hash)!==E)throw aD(`SHA-${E}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Vu(D.algorithm,"RSA-PSS"))throw aD("RSA-PSS");let E=parseInt(u.slice(2),10);if(Z2(D.algorithm.hash)!==E)throw aD(`SHA-${E}`,"algorithm.hash");break}case"EdDSA":{if(D.algorithm.name!=="Ed25519"&&D.algorithm.name!=="Ed448")throw aD("Ed25519 or Ed448");break}case"Ed25519":{if(!Vu(D.algorithm,"Ed25519"))throw aD("Ed25519");break}case"ES256":case"ES384":case"ES512":{if(!Vu(D.algorithm,"ECDSA"))throw aD("ECDSA");let E=l9(u);if(D.algorithm.namedCurve!==E)throw aD(E,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}d9(D,F)}function g8(D,u,...F){if(F=F.filter(Boolean),F.length>2){let E=F.pop();D+=`one of type ${F.join(", ")}, or ${E}.`}else if(F.length===2)D+=`one of type ${F[0]} or ${F[1]}.`;else D+=`of type ${F[0]}.`;if(u==null)D+=` Received ${u}`;else if(typeof u==="function"&&u.name)D+=` Received function ${u.name}`;else if(typeof u==="object"&&u!=null){if(u.constructor?.name)D+=` Received an instance of ${u.constructor.name}`}return D}function X2(D,u,...F){return g8(`Key for the ${D} algorithm must be `,u,...F)}var N2=(D,...u)=>{return g8("Key must be ",D,...u)};var Y2=(D)=>{if(Wu(D))return!0;return D?.[Symbol.toStringTag]==="KeyObject"},ru;var Q2=Q(()=>{Cu();ru=["CryptoKey"]});var x9=(...D)=>{let u=D.filter(Boolean);if(u.length===0||u.length===1)return!0;let F;for(let E of u){let r=Object.keys(E);if(!F||F.size===0){F=new Set(r);continue}for(let B of r){if(F.has(B))return!1;F.add(B)}}return!0},s8;var l8=Q(()=>{s8=x9});function D7(D){return typeof D==="object"&&D!==null}function Ju(D){if(!D7(D)||Object.prototype.toString.call(D)!=="[object Object]")return!1;if(Object.getPrototypeOf(D)===null)return!0;let u=D;while(Object.getPrototypeOf(u)!==null)u=Object.getPrototypeOf(u);return Object.getPrototypeOf(D)===u}var d8=(D,u)=>{if(D.startsWith("RS")||D.startsWith("PS")){let{modulusLength:F}=u.algorithm;if(typeof F!=="number"||F<2048)throw TypeError(`${D} requires key modulusLength to be 2048 bits or larger`)}};function pD(D){return Ju(D)&&typeof D.kty==="string"}function x8(D){return D.kty!=="oct"&&typeof D.d==="string"}function D1(D){return D.kty!=="oct"&&typeof D.d>"u"}function u1(D){return pD(D)&&D.kty==="oct"&&typeof D.k==="string"}var I2=()=>{};function F7(D){let u,F;switch(D.kty){case"RSA":{switch(D.alg){case"PS256":case"PS384":case"PS512":u={name:"RSA-PSS",hash:`SHA-${D.alg.slice(-3)}`},F=D.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":u={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${D.alg.slice(-3)}`},F=D.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":u={name:"RSA-OAEP",hash:`SHA-${parseInt(D.alg.slice(-3),10)||1}`},F=D.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new rD('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(D.alg){case"ES256":u={name:"ECDSA",namedCurve:"P-256"},F=D.d?["sign"]:["verify"];break;case"ES384":u={name:"ECDSA",namedCurve:"P-384"},F=D.d?["sign"]:["verify"];break;case"ES512":u={name:"ECDSA",namedCurve:"P-521"},F=D.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":u={name:"ECDH",namedCurve:D.crv},F=D.d?["deriveBits"]:[];break;default:throw new rD('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(D.alg){case"Ed25519":u={name:"Ed25519"},F=D.d?["sign"]:["verify"];break;case"EdDSA":u={name:D.crv},F=D.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":u={name:D.crv},F=D.d?["deriveBits"]:[];break;default:throw new rD('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new rD('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:u,keyUsages:F}}var E7=async(D)=>{if(!D.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:u,keyUsages:F}=F7(D),E=[u,D.ext??!1,D.key_ops??F],r={...D};return delete r.alg,delete r.use,YD.subtle.importKey("jwk",r,...E)},F1;var E1=Q(()=>{Cu();ID();F1=E7});var C1=(D)=>n0(D),Bu,nu,r1=(D)=>{return D?.[Symbol.toStringTag]==="KeyObject"},i0=async(D,u,F,E,r=!1)=>{let B=D.get(u);if(B?.[E])return B[E];let C=await F1({...F,alg:E});if(r)Object.freeze(u);if(!B)D.set(u,{[E]:C});else B[E]=C;return C},C7=(D,u)=>{if(r1(D)){let F=D.export({format:"jwk"});if(delete F.d,delete F.dp,delete F.dq,delete F.p,delete F.q,delete F.qi,F.k)return C1(F.k);return nu||(nu=new WeakMap),i0(nu,D,F,u)}if(pD(D)){if(D.k)return n0(D.k);return nu||(nu=new WeakMap),i0(nu,D,D,u,!0)}return D},r7=(D,u)=>{if(r1(D)){let F=D.export({format:"jwk"});if(F.k)return C1(F.k);return Bu||(Bu=new WeakMap),i0(Bu,D,F,u)}if(pD(D)){if(D.k)return n0(D.k);return Bu||(Bu=new WeakMap),i0(Bu,D,D,u,!0)}return D},T2;var B1=Q(()=>{I2();m2();E1();T2={normalizePublicKey:C7,normalizePrivateKey:r7}});var TD=(D,u,F=0)=>{if(F===0)u.unshift(u.length),u.unshift(6);let E=D.indexOf(u[0],F);if(E===-1)return!1;let r=D.subarray(E,E+u.length);if(r.length!==u.length)return!1;return r.every((B,C)=>B===u[C])||TD(D,u,E+1)},n1=(D)=>{switch(!0){case TD(D,[42,134,72,206,61,3,1,7]):return"P-256";case TD(D,[43,129,4,0,34]):return"P-384";case TD(D,[43,129,4,0,35]):return"P-521";case TD(D,[43,101,110]):return"X25519";case TD(D,[43,101,111]):return"X448";case TD(D,[43,101,112]):return"Ed25519";case TD(D,[43,101,113]):return"Ed448";default:throw new rD("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},B7=async(D,u,F,E,r)=>{let B,C,n=new Uint8Array(atob(F.replace(D,"")).split("").map((i)=>i.charCodeAt(0))),f=u==="spki";switch(E){case"PS256":case"PS384":case"PS512":B={name:"RSA-PSS",hash:`SHA-${E.slice(-3)}`},C=f?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":B={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${E.slice(-3)}`},C=f?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":B={name:"RSA-OAEP",hash:`SHA-${parseInt(E.slice(-3),10)||1}`},C=f?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":B={name:"ECDSA",namedCurve:"P-256"},C=f?["verify"]:["sign"];break;case"ES384":B={name:"ECDSA",namedCurve:"P-384"},C=f?["verify"]:["sign"];break;case"ES512":B={name:"ECDSA",namedCurve:"P-521"},C=f?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let i=n1(n);B=i.startsWith("P-")?{name:"ECDH",namedCurve:i}:{name:i},C=f?[]:["deriveBits"];break}case"Ed25519":B={name:"Ed25519"},C=f?["verify"]:["sign"];break;case"EdDSA":B={name:n1(n)},C=f?["verify"]:["sign"];break;default:throw new rD('Invalid or unsupported "alg" (Algorithm) value')}return YD.subtle.importKey(u,n,B,r?.extractable??!1,C)},f1=(D,u,F)=>{return B7(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",D,u,F)};var i1=Q(()=>{Cu();ID()});async function R2(D,u,F){if(typeof D!=="string"||D.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw TypeError('"pkcs8" must be PKCS#8 formatted string');return f1(D,u,F)}var h1=Q(()=>{i1()});function t1(D,u,F,E){if(u.startsWith("HS")||u==="dir"||u.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(u))n7(u,F,E,D);else f7(u,F,E,D)}var fu=(D)=>D?.[Symbol.toStringTag],_2=(D,u,F)=>{if(u.use!==void 0&&u.use!=="sig")throw TypeError("Invalid key for this operation, when present its use must be sig");if(u.key_ops!==void 0&&u.key_ops.includes?.(F)!==!0)throw TypeError(`Invalid key for this operation, when present its key_ops must include ${F}`);if(u.alg!==void 0&&u.alg!==D)throw TypeError(`Invalid key for this operation, when present its alg must be ${D}`);return!0},n7=(D,u,F,E)=>{if(u instanceof Uint8Array)return;if(E&&pD(u)){if(u1(u)&&_2(D,u,F))return;throw TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!Y2(u))throw TypeError(X2(D,u,...ru,"Uint8Array",E?"JSON Web Key":null));if(u.type!=="secret")throw TypeError(`${fu(u)} instances for symmetric algorithms must be of type "secret"`)},f7=(D,u,F,E)=>{if(E&&pD(u))switch(F){case"sign":if(x8(u)&&_2(D,u,F))return;throw TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(D1(u)&&_2(D,u,F))return;throw TypeError("JSON Web Key for this operation be a public JWK")}if(!Y2(u))throw TypeError(X2(D,u,...ru,E?"JSON Web Key":null));if(u.type==="secret")throw TypeError(`${fu(u)} instances for asymmetric algorithms must not be of type "secret"`);if(F==="sign"&&u.type==="public")throw TypeError(`${fu(u)} instances for asymmetric algorithm signing must be of type "private"`);if(F==="decrypt"&&u.type==="public")throw TypeError(`${fu(u)} instances for asymmetric algorithm decryption must be of type "private"`);if(u.algorithm&&F==="verify"&&u.type==="private")throw TypeError(`${fu(u)} instances for asymmetric algorithm verifying must be of type "public"`);if(u.algorithm&&F==="encrypt"&&u.type==="private")throw TypeError(`${fu(u)} instances for asymmetric algorithm encryption must be of type "public"`)},sn,A1;var c1=Q(()=>{Q2();I2();sn=t1.bind(void 0,!1),A1=t1.bind(void 0,!0)});function i7(D,u,F,E,r){if(r.crit!==void 0&&E?.crit===void 0)throw new D('"crit" (Critical) Header Parameter MUST be integrity protected');if(!E||E.crit===void 0)return new Set;if(!Array.isArray(E.crit)||E.crit.length===0||E.crit.some((C)=>typeof C!=="string"||C.length===0))throw new D('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let B;if(F!==void 0)B=new Map([...Object.entries(F),...u.entries()]);else B=u;for(let C of E.crit){if(!B.has(C))throw new rD(`Extension Header Parameter "${C}" is not recognized`);if(r[C]===void 0)throw new D(`Extension Header Parameter "${C}" is missing`);if(B.get(C)&&E[C]===void 0)throw new D(`Extension Header Parameter "${C}" MUST be integrity protected`)}return new Set(E.crit)}var b1;var $1=Q(()=>{ID();b1=i7});function U2(D,u){let F=`SHA-${D.slice(-3)}`;switch(D){case"HS256":case"HS384":case"HS512":return{hash:F,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:F,name:"RSA-PSS",saltLength:D.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:F,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:F,name:"ECDSA",namedCurve:u.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:u.name};default:throw new rD(`alg ${D} is not supported either by JOSE or your javascript runtime`)}}var e1=Q(()=>{ID()});async function j2(D,u,F){if(F==="sign")u=await T2.normalizePrivateKey(u,D);if(F==="verify")u=await T2.normalizePublicKey(u,D);if(Wu(u))return p8(u,D,F),u;if(u instanceof Uint8Array){if(!D.startsWith("HS"))throw TypeError(N2(u,...ru));return YD.subtle.importKey("raw",u,{hash:`SHA-${D.slice(-3)}`,name:"HMAC"},!1,[F])}throw TypeError(N2(u,...ru,"Uint8Array","JSON Web Key"))}var y1=Q(()=>{Cu();Q2();B1()});var RD=(D)=>Math.floor(D.getTime()/1000);var h7,h0=(D)=>{let u=h7.exec(D);if(!u||u[4]&&u[1])throw TypeError("Invalid time period format");let F=parseFloat(u[2]),E=u[3].toLowerCase(),r;switch(E){case"sec":case"secs":case"second":case"seconds":case"s":r=Math.round(F);break;case"minute":case"minutes":case"min":case"mins":case"m":r=Math.round(F*60);break;case"hour":case"hours":case"hr":case"hrs":case"h":r=Math.round(F*3600);break;case"day":case"days":case"d":r=Math.round(F*86400);break;case"week":case"weeks":case"w":r=Math.round(F*604800);break;default:r=Math.round(F*31557600);break}if(u[1]==="-"||u[4]==="ago")return-r;return r};var S1=Q(()=>{h7=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i});var t7=async(D,u,F)=>{let E=await j2(D,u,"sign");d8(D,E);let r=await YD.subtle.sign(U2(D,E.algorithm),E,F);return new Uint8Array(r)},K1;var v1=Q(()=>{e1();Cu();y1();K1=t7});class G2{constructor(D){if(!(D instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=D}setProtectedHeader(D){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=D,this}setUnprotectedHeader(D){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=D,this}async sign(D,u){if(!this._protectedHeader&&!this._unprotectedHeader)throw new QD("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!s8(this._protectedHeader,this._unprotectedHeader))throw new QD("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let F={...this._protectedHeader,...this._unprotectedHeader},E=b1(QD,new Map([["b64",!0]]),u?.crit,this._protectedHeader,F),r=!0;if(E.has("b64")){if(r=this._protectedHeader.b64,typeof r!=="boolean")throw new QD('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}let{alg:B}=F;if(typeof B!=="string"||!B)throw new QD('JWS "alg" (Algorithm) Header Parameter missing or invalid');A1(B,D,"sign");let C=this._payload;if(r)C=qD.encode(B0(C));let n;if(this._protectedHeader)n=qD.encode(B0(JSON.stringify(this._protectedHeader)));else n=qD.encode("");let f=Q8(n,qD.encode("."),C),i=await K1(B,D,f),t={signature:B0(i),payload:""};if(r)t.payload=Mu.decode(C);if(this._unprotectedHeader)t.header=this._unprotectedHeader;if(this._protectedHeader)t.protected=Mu.decode(n);return t}}var w1=Q(()=>{m2();v1();l8();ID();r0();c1();$1()});class k2{constructor(D){this._flattened=new G2(D)}setProtectedHeader(D){return this._flattened.setProtectedHeader(D),this}async sign(D,u){let F=await this._flattened.sign(D,u);if(F.payload===void 0)throw TypeError("use the flattened module for creating JWS with b64: false");return`${F.protected}.${F.payload}.${F.signature}`}}var H1=Q(()=>{w1()});function gD(D,u){if(!Number.isFinite(u))throw TypeError(`Invalid ${D} input`);return u}class P2{constructor(D={}){if(!Ju(D))throw TypeError("JWT Claims Set MUST be an object");this._payload=D}setIssuer(D){return this._payload={...this._payload,iss:D},this}setSubject(D){return this._payload={...this._payload,sub:D},this}setAudience(D){return this._payload={...this._payload,aud:D},this}setJti(D){return this._payload={...this._payload,jti:D},this}setNotBefore(D){if(typeof D==="number")this._payload={...this._payload,nbf:gD("setNotBefore",D)};else if(D instanceof Date)this._payload={...this._payload,nbf:gD("setNotBefore",RD(D))};else this._payload={...this._payload,nbf:RD(new Date)+h0(D)};return this}setExpirationTime(D){if(typeof D==="number")this._payload={...this._payload,exp:gD("setExpirationTime",D)};else if(D instanceof Date)this._payload={...this._payload,exp:gD("setExpirationTime",RD(D))};else this._payload={...this._payload,exp:RD(new Date)+h0(D)};return this}setIssuedAt(D){if(typeof D>"u")this._payload={...this._payload,iat:RD(new Date)};else if(D instanceof Date)this._payload={...this._payload,iat:gD("setIssuedAt",RD(D))};else if(typeof D==="string")this._payload={...this._payload,iat:gD("setIssuedAt",RD(new Date)+h0(D))};else this._payload={...this._payload,iat:gD("setIssuedAt",D)};return this}}var a1=Q(()=>{S1()});var t0;var W1=Q(()=>{H1();ID();r0();a1();t0=class t0 extends P2{setProtectedHeader(D){return this._protectedHeader=D,this}async sign(D,u){let F=new k2(qD.encode(JSON.stringify(this._payload)));if(F.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===!1)throw new f0("JWTs MUST NOT use unencoded payload");return F.sign(D,u)}}});var M1=()=>{};var V1=Q(()=>{W1();h1();ID();M1()});var c0={};zu(c0,{saveToKeychain:()=>A0,loadFromKeychain:()=>J1,generateJWT:()=>iu,deleteFromKeychain:()=>p2,clearTokenCache:()=>e7});import{existsSync as c7,readFileSync as b7}from"fs";import{spawnSync as O2}from"child_process";async function iu(D){let u=`${D.name}:${D.keyId}`,F=ou.get(u);if(F&&F.expiresAt-Date.now()>120000)return F.token;let E=await $7(D),r=await R2(E,"ES256"),B=Math.floor(Date.now()/1000),C=B+1200,n=await new t0({}).setProtectedHeader({alg:"ES256",kid:D.keyId,typ:"JWT"}).setIssuer(D.issuerId).setIssuedAt(B).setExpirationTime(C).setAudience("appstoreconnect-v1").sign(r);return ou.set(u,{token:n,expiresAt:C*1000}),n}async function $7(D){let u=J1(D.name);if(u)return u;if(D.privateKeyPem)return D.privateKeyPem;if(D.privateKeyPath){let F=D.privateKeyPath.trim().replace(/^~/,process.env.HOME??"");if(!c7(F))throw Error(`Private key file not found: ${F}`);return b7(F,"utf8")}throw Error(`No private key found for profile "${D.name}". Run: asc auth login`)}function J1(D){try{let u=O2("security",["find-generic-password","-a",D,"-s",L2,"-w"],{encoding:"utf8"});if(u.status!==0||!u.stdout)return;let F=u.stdout.trim();if(!F)return;let E=Buffer.from(F,"base64").toString("utf8");return E.includes("BEGIN")?E:F}catch{return}}function A0(D,u){try{let F=Buffer.from(u).toString("base64");return O2("security",["add-generic-password","-U","-a",D,"-s",L2,"-w",F],{encoding:"utf8"}).status===0}catch{return!1}}function p2(D){try{O2("security",["delete-generic-password","-a",D,"-s",L2],{encoding:"utf8"})}catch{}}function e7(D){if(D){for(let u of ou.keys())if(u.startsWith(`${D}:`))ou.delete(u)}else ou.clear()}var ou,L2="asc-cli";var hu=Q(()=>{V1();ou=new Map});Q0();Xu();Xu();function lC(D){if(Array.isArray(D))return D;return D===void 0?[]:[D]}function I0(D,u=""){let F=[];for(let E of D)for(let[r,B]of E.entries())F[r]=Math.max(F[r]||0,B.length);return D.map((E)=>E.map((r,B)=>u+r[B===0?"padStart":"padEnd"](F[B])).join(" ")).join(`
79
+ `)}function $D(D){return typeof D==="function"?D():D}class kD extends Error{constructor(D,u){super(D);this.code=u,this.name="CLIError"}}var dC=/\d/,xC=["-","_","/","."];function Dr(D=""){if(dC.test(D))return;return D!==D.toLowerCase()}function GF(D,u){let F=u??xC,E=[];if(!D||typeof D!=="string")return E;let r="",B,C;for(let n of D){let f=F.includes(n);if(f===!0){E.push(r),r="",B=void 0;continue}let i=Dr(n);if(C===!1){if(B===!1&&i===!0){E.push(r),r=n,B=i;continue}if(B===!0&&i===!1&&r.length>1){let t=r.at(-1);E.push(r.slice(0,Math.max(0,r.length-1))),r=t+n,B=i;continue}}r+=n,B=i,C=f}return E.push(r),E}function ur(D){return D?D[0].toUpperCase()+D.slice(1):""}function Fr(D){return D?D[0].toLowerCase()+D.slice(1):""}function Er(D,u){return D?(Array.isArray(D)?D:GF(D)).map((F)=>ur(u?.normalize?F.toLowerCase():F)).join(""):""}function Cr(D,u){return Fr(Er(D||"",u))}function rr(D,u){return D?(Array.isArray(D)?D:GF(D)).map((F)=>F.toLowerCase()).join(u??"-"):""}function T0(D){return D==null?[]:Array.isArray(D)?D:[D]}function Br(D,u,F,E){let r,B=D[u],C=~E.string.indexOf(u)?F==null||F===!0?"":String(F):typeof F==="boolean"?F:~E.boolean.indexOf(u)?F==="false"?!1:F==="true"||(D._.push((r=+F,r*0===0)?r:F),!!F):(r=+F,r*0===0)?r:F;D[u]=B==null?C:Array.isArray(B)?B.concat(C):[B,C]}function nr(D=[],u={}){let F,E,r,B,C,n={_:[]},f=0,i=0,t=0,b=D.length,e=u.alias!==void 0,h=u.unknown!==void 0,A=u.default!==void 0;if(u.alias=u.alias||{},u.string=T0(u.string),u.boolean=T0(u.boolean),e)for(F in u.alias){E=u.alias[F]=T0(u.alias[F]);for(f=0;f<E.length;f++)(u.alias[E[f]]=E.concat(F)).splice(f,1)}for(f=u.boolean.length;f-- >0;){E=u.alias[u.boolean[f]]||[];for(i=E.length;i-- >0;)u.boolean.push(E[i])}for(f=u.string.length;f-- >0;){E=u.alias[u.string[f]]||[];for(i=E.length;i-- >0;)u.string.push(E[i])}if(A){for(F in u.default)if(B=typeof u.default[F],E=u.alias[F]=u.alias[F]||[],u[B]!==void 0){u[B].push(F);for(f=0;f<E.length;f++)u[B].push(E[f])}}let $=h?Object.keys(u.alias):[];for(f=0;f<b;f++){if(r=D[f],r==="--"){n._=n._.concat(D.slice(++f));break}for(i=0;i<r.length;i++)if(r.charCodeAt(i)!==45)break;if(i===0)n._.push(r);else if(r.substring(i,i+3)==="no-"){if(B=r.slice(Math.max(0,i+3)),h&&!~$.indexOf(B))return u.unknown(r);n[B]=!1}else{for(t=i+1;t<r.length;t++)if(r.charCodeAt(t)===61)break;B=r.substring(i,t),C=r.slice(Math.max(0,++t))||f+1===b||(""+D[f+1]).charCodeAt(0)===45||D[++f],E=i===2?[B]:B;for(t=0;t<E.length;t++){if(B=E[t],h&&!~$.indexOf(B))return u.unknown("-".repeat(i)+B);Br(n,B,t+1<E.length||C,u)}}}if(A){for(F in u.default)if(n[F]===void 0)n[F]=u.default[F]}if(e)for(F in n){E=u.alias[F]||[];while(E.length>0)n[E.shift()]=n[F]}return n}function fr(D,u){let F={boolean:[],string:[],mixed:[],alias:{},default:{}},E=kF(u);for(let n of E){if(n.type==="positional")continue;if(n.type==="string")F.string.push(n.name);else if(n.type==="boolean")F.boolean.push(n.name);if(n.default!==void 0)F.default[n.name]=n.default;if(n.alias)F.alias[n.name]=n.alias}let r=nr(D,F),[...B]=r._,C=new Proxy(r,{get(n,f){return n[f]??n[Cr(f)]??n[rr(f)]}});for(let[,n]of E.entries())if(n.type==="positional"){let f=B.shift();if(f!==void 0)C[n.name]=f;else if(n.default===void 0&&n.required!==!1)throw new kD(`Missing required positional argument: ${n.name.toUpperCase()}`,"EARG");else C[n.name]=n.default}else if(n.required&&C[n.name]===void 0)throw new kD(`Missing required argument: --${n.name}`,"EARG");return C}function kF(D){let u=[];for(let[F,E]of Object.entries(D||{}))u.push({...E,name:F,alias:lC(E.alias)});return u}function c(D){return D}async function PF(D,u){let F=await $D(D.args||{}),E=fr(u.rawArgs,F),r={rawArgs:u.rawArgs,args:E,data:u.data,cmd:D};if(typeof D.setup==="function")await D.setup(r);let B;try{let C=await $D(D.subCommands);if(C&&Object.keys(C).length>0){let n=u.rawArgs.findIndex((i)=>!i.startsWith("-")),f=u.rawArgs[n];if(f){if(!C[f])throw new kD(`Unknown command \`${f}\``,"E_UNKNOWN_COMMAND");let i=await $D(C[f]);if(i)await PF(i,{rawArgs:u.rawArgs.slice(n+1)})}else if(!D.run)throw new kD("No command specified.","E_NO_COMMAND")}if(typeof D.run==="function")B=await D.run(r)}finally{if(typeof D.cleanup==="function")await D.cleanup(r)}return{result:B}}async function R0(D,u,F){let E=await $D(D.subCommands);if(E&&Object.keys(E).length>0){let r=u.findIndex((n)=>!n.startsWith("-")),B=u[r],C=await $D(E[B]);if(C)return R0(C,u.slice(r+1),D)}return[D,F]}async function ir(D,u){try{GD.log(await hr(D,u)+`
80
+ `)}catch(F){GD.error(F)}}async function hr(D,u){let F=await $D(D.meta||{}),E=kF(await $D(D.args||{})),r=await $D(u?.meta||{}),B=`${r.name?`${r.name} `:""}`+(F.name||process.argv[1]),C=[],n=[],f=[],i=[];for(let h of E)if(h.type==="positional"){let A=h.name.toUpperCase(),$=h.required!==!1&&h.default===void 0,S=h.default?`="${h.default}"`:"";n.push(["`"+A+S+"`",h.description||"",h.valueHint?`<${h.valueHint}>`:""]),i.push($?`<${A}>`:`[${A}]`)}else{let A=h.required===!0&&h.default===void 0,$=(h.type==="boolean"&&h.default===!0?[...(h.alias||[]).map((S)=>`--no-${S}`),`--no-${h.name}`].join(", "):[...(h.alias||[]).map((S)=>`-${S}`),`--${h.name}`].join(", "))+(h.type==="string"&&(h.valueHint||h.default)?`=${h.valueHint?`<${h.valueHint}>`:`"${h.default||""}"`}`:"");if(C.push(["`"+$+(A?" (required)":"")+"`",h.description||""]),A)i.push($)}if(D.subCommands){let h=[],A=await $D(D.subCommands);for(let[$,S]of Object.entries(A)){let V=await $D(S),a=await $D(V?.meta);f.push([`\`${$}\``,a?.description||""]),h.push($)}i.push(h.join("|"))}let t=[],b=F.version||r.version;t.push(R.gray(`${F.description} (${B+(b?` v${b}`:"")})`),"");let e=C.length>0||n.length>0;if(t.push(`${R.underline(R.bold("USAGE"))} \`${B}${e?" [OPTIONS]":""} ${i.join(" ")}\``,""),n.length>0)t.push(R.underline(R.bold("ARGUMENTS")),""),t.push(I0(n," ")),t.push("");if(C.length>0)t.push(R.underline(R.bold("OPTIONS")),""),t.push(I0(C," ")),t.push("");if(f.length>0)t.push(R.underline(R.bold("COMMANDS")),""),t.push(I0(f," ")),t.push("",`Use \`${B} <command> --help\` for more information about a command.`);return t.filter((h)=>typeof h==="string").join(`
81
+ `)}async function OF(D,u={}){let F=u.rawArgs||process.argv.slice(2),E=u.showUsage||ir;try{if(F.includes("--help")||F.includes("-h"))await E(...await R0(D,F)),process.exit(0);else if(F.length===1&&F[0]==="--version"){let r=typeof D.meta==="function"?await D.meta():await D.meta;if(!r?.version)throw new kD("No version specified","E_NO_VERSION");GD.log(r.version)}else await PF(D,{rawArgs:F})}catch(r){let B=r instanceof kD;if(!B)GD.error(r,`
82
+ `);if(B)await E(...await R0(D,F));GD.error(r.message),process.exit(1)}}var LF=(D=0)=>(u)=>`\x1B[${u+D}m`,pF=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,gF=(D=0)=>(u,F,E)=>`\x1B[${38+D};2;${u};${F};${E}m`,j={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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},j5=Object.keys(j.modifier),tr=Object.keys(j.color),Ar=Object.keys(j.bgColor),G5=[...tr,...Ar];function cr(){let D=new Map;for(let[u,F]of Object.entries(j)){for(let[E,r]of Object.entries(F))j[E]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},F[E]=j[E],D.set(r[0],r[1]);Object.defineProperty(j,u,{value:F,enumerable:!1})}return Object.defineProperty(j,"codes",{value:D,enumerable:!1}),j.color.close="\x1B[39m",j.bgColor.close="\x1B[49m",j.color.ansi=LF(),j.color.ansi256=pF(),j.color.ansi16m=gF(),j.bgColor.ansi=LF(10),j.bgColor.ansi256=pF(10),j.bgColor.ansi16m=gF(10),Object.defineProperties(j,{rgbToAnsi256:{value(u,F,E){if(u===F&&F===E){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(E/255*5)},enumerable:!1},hexToRgb:{value(u){let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[E]=F;if(E.length===3)E=[...E].map((B)=>B+B).join("");let r=Number.parseInt(E,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:(u)=>j.rgbToAnsi256(...j.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,E,r;if(u>=232)F=((u-232)*10+8)/255,E=F,r=F;else{u-=16;let n=u%36;F=Math.floor(u/36)/5,E=Math.floor(n/6)/5,r=n%6/5}let B=Math.max(F,E,r)*2;if(B===0)return 30;let C=30+(Math.round(r)<<2|Math.round(E)<<1|Math.round(F));if(B===2)C+=60;return C},enumerable:!1},rgbToAnsi:{value:(u,F,E)=>j.ansi256ToAnsi(j.rgbToAnsi256(u,F,E)),enumerable:!1},hexToAnsi:{value:(u)=>j.ansi256ToAnsi(j.hexToAnsi256(u)),enumerable:!1}}),j}var br=cr(),eD=br;import _0 from"process";import $r from"os";import sF from"tty";function hD(D,u=globalThis.Deno?globalThis.Deno.args:_0.argv){let F=D.startsWith("-")?"":D.length===1?"-":"--",E=u.indexOf(F+D),r=u.indexOf("--");return E!==-1&&(r===-1||E<r)}var{env:G}=_0,ju;if(hD("no-color")||hD("no-colors")||hD("color=false")||hD("color=never"))ju=0;else if(hD("color")||hD("colors")||hD("color=true")||hD("color=always"))ju=1;function er(){if("FORCE_COLOR"in G){if(G.FORCE_COLOR==="true")return 1;if(G.FORCE_COLOR==="false")return 0;return G.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(G.FORCE_COLOR,10),3)}}function yr(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function Sr(D,{streamIsTTY:u,sniffFlags:F=!0}={}){let E=er();if(E!==void 0)ju=E;let r=F?ju:E;if(r===0)return 0;if(F){if(hD("color=16m")||hD("color=full")||hD("color=truecolor"))return 3;if(hD("color=256"))return 2}if("TF_BUILD"in G&&"AGENT_NAME"in G)return 1;if(D&&!u&&r===void 0)return 0;let B=r||0;if(G.TERM==="dumb")return B;if(_0.platform==="win32"){let C=$r.release().split(".");if(Number(C[0])>=10&&Number(C[2])>=10586)return Number(C[2])>=14931?3:2;return 1}if("CI"in G){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((C)=>(C in G)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((C)=>(C in G))||G.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if(G.TERM==="xterm-kitty")return 3;if(G.TERM==="xterm-ghostty")return 3;if(G.TERM==="wezterm")return 3;if("TERM_PROGRAM"in G){let C=Number.parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return C>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(G.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM))return 1;if("COLORTERM"in G)return 1;return B}function lF(D,u={}){let F=Sr(D,{streamIsTTY:D&&D.isTTY,...u});return yr(F)}var Kr={stdout:lF({isTTY:sF.isatty(1)}),stderr:lF({isTTY:sF.isatty(2)})},dF=Kr;function xF(D,u,F){let E=D.indexOf(u);if(E===-1)return D;let r=u.length,B=0,C="";do C+=D.slice(B,E)+u+F,B=E+r,E=D.indexOf(u,B);while(E!==-1);return C+=D.slice(B),C}function D3(D,u,F,E){let r=0,B="";do{let C=D[E-1]==="\r";B+=D.slice(r,C?E-1:E)+u+(C?`\r
83
+ `:`
84
+ `)+F,r=E+1,E=D.indexOf(`
85
+ `,r)}while(E!==-1);return B+=D.slice(r),B}var{stdout:u3,stderr:F3}=dF,U0=Symbol("GENERATOR"),lD=Symbol("STYLER"),$u=Symbol("IS_EMPTY"),E3=["ansi","ansi","ansi256","ansi16m"],dD=Object.create(null),vr=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let F=u3?u3.level:0;D.level=u.level===void 0?F:u.level};var wr=(D)=>{let u=(...F)=>F.join(" ");return vr(u,D),Object.setPrototypeOf(u,eu.prototype),u};function eu(D){return wr(D)}Object.setPrototypeOf(eu.prototype,Function.prototype);for(let[D,u]of Object.entries(eD))dD[D]={get(){let F=Gu(this,G0(u.open,u.close,this[lD]),this[$u]);return Object.defineProperty(this,D,{value:F}),F}};dD.visible={get(){let D=Gu(this,this[lD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var j0=(D,u,F,...E)=>{if(D==="rgb"){if(u==="ansi16m")return eD[F].ansi16m(...E);if(u==="ansi256")return eD[F].ansi256(eD.rgbToAnsi256(...E));return eD[F].ansi(eD.rgbToAnsi(...E))}if(D==="hex")return j0("rgb",u,F,...eD.hexToRgb(...E));return eD[F][D](...E)},Hr=["rgb","hex","ansi256"];for(let D of Hr){dD[D]={get(){let{level:F}=this;return function(...E){let r=G0(j0(D,E3[F],"color",...E),eD.color.close,this[lD]);return Gu(this,r,this[$u])}}};let u="bg"+D[0].toUpperCase()+D.slice(1);dD[u]={get(){let{level:F}=this;return function(...E){let r=G0(j0(D,E3[F],"bgColor",...E),eD.bgColor.close,this[lD]);return Gu(this,r,this[$u])}}}}var ar=Object.defineProperties(()=>{},{...dD,level:{enumerable:!0,get(){return this[U0].level},set(D){this[U0].level=D}}}),G0=(D,u,F)=>{let E,r;if(F===void 0)E=D,r=u;else E=F.openAll+D,r=u+F.closeAll;return{open:D,close:u,openAll:E,closeAll:r,parent:F}},Gu=(D,u,F)=>{let E=(...r)=>Wr(E,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(E,ar),E[U0]=D,E[lD]=u,E[$u]=F,E},Wr=(D,u)=>{if(D.level<=0||!u)return D[$u]?"":u;let F=D[lD];if(F===void 0)return u;let{openAll:E,closeAll:r}=F;if(u.includes("\x1B"))while(F!==void 0)u=xF(u,F.close,F.open),F=F.parent;let B=u.indexOf(`
86
+ `);if(B!==-1)u=D3(u,r,E,B);return E+u+r};Object.defineProperties(eu.prototype,dD);var Mr=eu(),x5=eu({level:F3?F3.level:0});var N=Mr;var F8=y0(u8(),1);function v(D){if(D==="json"||D==="table"||D==="plain")return D;return process.stdout.isTTY?"table":"json"}function w(D){console.log(JSON.stringify(D,null,2))}function W(D,u,F){if(F)console.log(N.bold(F));let E=new F8.default({head:D.map((r)=>N.cyan(r)),style:{head:[],border:[]}});for(let r of u)E.push(r);console.log(E.toString())}function o(D){console.log(N.green("\u2713")+" "+D)}function fD(D){if(i9(D)){if(console.error(N.red("Error")+` [${D.status}]: ${D.message}`),D.errors&&D.errors.length>0){for(let u of D.errors)if(u.detail&&u.detail!==D.message)console.error(N.dim(` ${u.code}: ${u.detail}`))}}else if(D instanceof Error)console.error(N.red("Error: ")+D.message);else console.error(N.red("Error: ")+String(D))}function i9(D){return D instanceof Error&&D.name==="ASCError"}function d(D,u){if(D.length<=u)return D;return D.slice(0,u-1)+"\u2026"}function s(D){if(!D)return"-";return new Date(D).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}var J={type:"string",alias:"o",description:"Output format: table (default in TTY) | json (default when piped)",values:["table","json"]},p={type:"string",description:"App ID (numeric string). Use: asc apps list",required:!0},u2={type:"string",description:"Build ID (UUID). Use: asc builds list",required:!0},F2={type:"string",description:"Version ID (UUID). Use: asc versions list --app-id <id>",required:!0};function E8(){return{tool:"asc",version:"1.0.0",description:"App Store Connect CLI \u2014 manage apps, builds, TestFlight, metadata, signing, and more.",auth:{description:"All API commands require a configured profile. Set up with: asc auth login",env_vars:{ASC_KEY_ID:"App Store Connect API Key ID (overrides active profile)",ASC_ISSUER_ID:"Issuer ID UUID (overrides active profile)",ASC_PRIVATE_KEY_PATH:"Path to .p8 private key file (overrides active profile)",ASC_BYPASS_KEYCHAIN:"Set to '1' to skip macOS Keychain storage"},workflow:["asc auth login --key-id <KEY_ID> --issuer-id <ISSUER_ID> --private-key <PATH_TO_P8>","asc auth status --validate","asc apps list"]},output_formats:{table:"Default when stdout is a TTY. Human-readable table with borders.",json:"Default when stdout is piped. Use --output json to force JSON output. JSON:API format."},id_discovery:{"App ID":"asc apps list","Build ID":"asc builds list --app-id <APP_ID>","Version ID":"asc versions list --app-id <APP_ID>","Version Localization ID":"asc metadata list --version-id <VERSION_ID>","Screenshot Set ID":"asc screenshots sets list --localization-id <LOCALIZATION_ID>","Beta Group ID":"asc testflight groups list --app-id <APP_ID>","Tester ID":"asc testflight testers list --group-id <GROUP_ID>","App Info ID":"asc app-info get --app-id <APP_ID>","Subscription Group ID":"asc subscriptions groups list --app-id <APP_ID>","Subscription ID":"asc subscriptions list --group-id <GROUP_ID>","IAP ID":"asc iap list --app-id <APP_ID>","Certificate ID":"asc signing certs list","Device ID":"asc signing devices list","Bundle ID":"asc signing bundle-ids list","Profile ID":"asc signing profiles list","Xcode Cloud Product ID":"asc xcode-cloud products list --app-id <APP_ID>","Workflow ID":"asc xcode-cloud workflows list --product-id <PRODUCT_ID>","Build Run ID":"asc xcode-cloud builds list --workflow-id <WORKFLOW_ID>"},regenerate_sdk:"bun run generate # Re-generates src/api/generated/ from the latest Apple OpenAPI spec",commands:{auth:{name:"auth",description:"Manage authentication profiles. Run login first before any other command.",subcommands:{login:{name:"login",description:"Add or update an API key profile. Creates an API key at: App Store Connect \u2192 Users \u2192 Keys.",args:{name:{type:"string",alias:"n",description:"Profile name (default: 'default'). Use named profiles to manage multiple accounts."},"key-id":{type:"string",alias:"k",description:"10-character API Key ID"},"issuer-id":{type:"string",alias:"i",description:"Issuer ID (UUID format)"},"private-key":{type:"string",alias:"p",description:"Path to the downloaded .p8 private key file"},"bypass-keychain":{type:"boolean",description:"Skip macOS Keychain \u2014 store key path in credentials file instead"}},examples:["asc auth login --key-id ABC123DEF0 --issuer-id 12345678-1234-1234-1234-123456789012 --private-key ~/Downloads/AuthKey_ABC123DEF0.p8","asc auth login --name work --key-id XYZ --issuer-id <uuid> --private-key ~/keys/work.p8"]},list:{name:"list",description:"List all saved profiles with their key IDs and which is active."},use:{name:"use",description:"Switch the active profile.",args:{name:{type:"positional",description:"Profile name to activate"}},examples:["asc auth use work","asc auth use default"]},status:{name:"status",description:"Show current profile. Use --validate to test it with a live API call.",args:{validate:{type:"boolean",description:"Generate and validate a JWT against the API"}}},logout:{name:"logout",description:"Remove a profile and its Keychain entry.",args:{name:{type:"string",alias:"n",description:"Profile name to remove (omit for active profile)"}}}}},apps:{name:"apps",description:"List apps and get app details. App IDs are required by almost every other command.",subcommands:{list:{name:"list",description:"List all apps. Returns App IDs needed by other commands.",args:{limit:{type:"string",description:"Max results to return"},output:J},examples:["asc apps list","asc apps list --output json"]},get:{name:"get",description:"Get details for a specific app.",args:{"app-id":{type:"positional",description:"App ID. Use: asc apps list",required:!0},output:J},examples:["asc apps get 1234567890"]}}},builds:{name:"builds",description:"Manage builds uploaded via Xcode or Transporter.",subcommands:{list:{name:"list",description:"List builds. Filter by app, version, or platform.",args:{"app-id":{type:"string",description:"Filter by App ID"},version:{type:"string",description:"Filter by version string, e.g. '2.0.1'"},platform:{type:"string",description:"Filter by platform",values:["IOS","MAC_OS","TV_OS","VISION_OS"]},output:J},examples:["asc builds list --app-id 1234567890","asc builds list --app-id 1234567890 --version 2.1.0 --output json"]},get:{name:"get",description:"Get full details for a build.",args:{"build-id":{type:"positional",description:"Build ID (UUID). Use: asc builds list",required:!0},output:J}},"update-beta-notes":{name:"update-beta-notes",description:"Set TestFlight 'What to Test' notes for a build.",args:{"build-id":{...u2,type:"string"},locale:{type:"string",description:"Locale code, e.g. 'en-US', 'ja'",required:!0},notes:{type:"string",description:"What to test text (max 4000 characters)",required:!0}},examples:["asc builds update-beta-notes --build-id <uuid> --locale en-US --notes 'Test the new login flow'"]}}},versions:{name:"versions",description:"Manage App Store version records. Versions hold metadata, screenshots, and track review state.",subcommands:{list:{name:"list",description:"List App Store versions for an app.",args:{"app-id":{...p,type:"string"},platform:{type:"string",description:"Filter by platform",values:["IOS","MAC_OS","TV_OS","VISION_OS"]},output:J}},create:{name:"create",description:"Create a new App Store version record.",args:{"app-id":{...p,type:"string"},version:{type:"string",description:"Version string, e.g. '2.1.0'",required:!0},platform:{type:"string",description:"Platform",default:"IOS",values:["IOS","MAC_OS","TV_OS","VISION_OS"]}}},submit:{name:"submit",description:"Submit a version for App Store Review. Metadata and screenshots must be complete.",args:{"version-id":{...F2,type:"positional"}}}}},testflight:{name:"testflight",description:"Manage TestFlight groups and testers.",subcommands:{groups:{name:"groups",description:"Manage beta groups",subcommands:{list:{name:"list",description:"List all TestFlight beta groups.",args:{"app-id":{type:"string",description:"Filter by App ID"},output:J}}}},testers:{name:"testers",description:"Manage testers within a group",subcommands:{list:{name:"list",description:"List testers in a group.",args:{"group-id":{type:"string",description:"Beta Group ID. Use: asc testflight groups list",required:!0},output:J}},add:{name:"add",description:"Add a tester to a group by email.",args:{"group-id":{type:"string",description:"Beta Group ID",required:!0},email:{type:"string",description:"Tester email address"},"first-name":{type:"string",description:"Tester first name"},"last-name":{type:"string",description:"Tester last name"}}},remove:{name:"remove",description:"Remove a tester from a group.",args:{"group-id":{type:"string",description:"Beta Group ID",required:!0},"tester-id":{type:"string",description:"Tester ID. Use: asc testflight testers list --group-id <id>",required:!0}}}}}}},metadata:{name:"metadata",description:"Manage App Store listing text for a version across all locales.",subcommands:{list:{name:"list",description:"List all locale localizations for a version. Returns localization IDs needed by screenshots commands.",args:{"version-id":{...F2,type:"string"},output:J}},update:{name:"update",description:"Update App Store metadata fields for a specific locale.",args:{"version-id":{...F2,type:"string"},locale:{type:"string",description:"Locale code, e.g. 'en-US', 'ja', 'fr-FR', 'de-DE'",required:!0},"whats-new":{type:"string",description:"What's new text (shown in update notes)"},description:{type:"string",description:"Full app description"},keywords:{type:"string",description:"Comma-separated search keywords (max 100 chars)"},"promotional-text":{type:"string",description:"Promotional text (can be changed without a new submission)"}},examples:["asc metadata update --version-id <uuid> --locale en-US --whats-new 'Bug fixes and performance improvements'","asc metadata update --version-id <uuid> --locale en-US --keywords 'productivity,notes,tasks'"]}}},reviews:{name:"reviews",description:"Read and respond to App Store customer reviews.",subcommands:{list:{name:"list",description:"List customer reviews for an app.",args:{"app-id":{...p,type:"string"},output:J}},get:{name:"get",description:"Get a specific customer review.",args:{"review-id":{type:"positional",description:"Review ID. Use: asc reviews list --app-id <id>",required:!0},output:J}},respond:{name:"respond",description:"Post a public developer response to a review.",args:{"review-id":{type:"string",description:"Review ID",required:!0},message:{type:"string",description:"Response text (public, shown in App Store)",required:!0}}}}},pricing:{name:"pricing",description:"Manage app pricing schedules and price points.",subcommands:{get:{name:"get",description:"Get the price schedule for an app.",args:{"app-id":{...p,type:"string"},output:J}},set:{name:"set",description:"Set app price using a price point ID.",args:{"app-id":{...p,type:"string"},"base-territory":{type:"string",description:"Base territory code, e.g. 'USA'. Use: asc pricing territories list",required:!0},"price-point-id":{type:"string",description:"Price point ID. Use: asc pricing points list --app-id <id>",required:!0}}},points:{name:"points",description:"Price point management",subcommands:{list:{name:"list",description:"List available price points for an app.",args:{"app-id":{...p,type:"string"},territory:{type:"string",description:"Filter by territory code, e.g. 'USA'"},output:J}}}},territories:{name:"territories",description:"Territory listing",subcommands:{list:{name:"list",description:"List all App Store territories with currency codes.",args:{output:J}}}}}},availability:{name:"availability",description:"Control which App Store storefronts an app is available in.",subcommands:{get:{name:"get",description:"Show current territory availability settings.",args:{"app-id":{...p,type:"string"},output:J}},set:{name:"set",description:"Set the territories where the app is available.",args:{"app-id":{...p,type:"string"},territories:{type:"string",description:"Comma-separated territory codes, e.g. 'USA,GBR,AUS,CAN,JPN'",required:!0},"new-territories":{type:"boolean",description:"Auto-enable new App Store territories",default:!0}},examples:["asc availability set --app-id 1234567890 --territories 'USA,GBR,AUS,CAN,JPN,DEU,FRA'"]}}},iap:{name:"iap",description:"Manage in-app purchases (consumable, non-consumable, non-renewing subscription). For auto-renewable subscriptions use: asc subscriptions",subcommands:{list:{name:"list",description:"List IAPs for an app.",args:{"app-id":{...p,type:"string"},output:J}},get:{name:"get",description:"Get IAP details.",args:{"iap-id":{type:"positional",description:"IAP ID. Use: asc iap list --app-id <id>",required:!0},output:J}},create:{name:"create",description:"Create a new IAP product.",args:{"app-id":{...p,type:"string"},name:{type:"string",description:"Internal reference name",required:!0},"product-id":{type:"string",description:"Unique product ID string, e.g. 'com.yourapp.coins100'",required:!0},type:{type:"string",description:"IAP type",required:!0,values:["CONSUMABLE","NON_CONSUMABLE","NON_RENEWING_SUBSCRIPTION"]}}},delete:{name:"delete",description:"Delete a draft IAP.",args:{"iap-id":{type:"positional",description:"IAP ID",required:!0}}}}},subscriptions:{name:"subscriptions",description:"Manage auto-renewable subscription products and groups.",subcommands:{groups:{name:"groups",description:"Subscription group management",subcommands:{list:{name:"list",description:"List subscription groups for an app.",args:{"app-id":{...p,type:"string"},output:J}},create:{name:"create",description:"Create a subscription group.",args:{"app-id":{...p,type:"string"},"reference-name":{type:"string",description:"Internal name for this group",required:!0}}}}},list:{name:"list",description:"List subscriptions in a group.",args:{"group-id":{type:"string",description:"Subscription Group ID. Use: asc subscriptions groups list --app-id <id>",required:!0},output:J}},get:{name:"get",description:"Get details for a subscription.",args:{"sub-id":{type:"positional",description:"Subscription ID. Use: asc subscriptions list --group-id <id>",required:!0},output:J}},create:{name:"create",description:"Create a new auto-renewable subscription.",args:{"group-id":{type:"string",description:"Subscription Group ID",required:!0},name:{type:"string",description:"Internal reference name",required:!0},"product-id":{type:"string",description:"Unique product ID, e.g. 'com.yourapp.premium.monthly'",required:!0},period:{type:"string",description:"Billing period",required:!0,values:["ONE_WEEK","ONE_MONTH","TWO_MONTHS","THREE_MONTHS","SIX_MONTHS","ONE_YEAR"]}}},prices:{name:"prices",description:"List price schedule for a subscription.",args:{"sub-id":{type:"string",description:"Subscription ID",required:!0},territory:{type:"string",description:"Filter by territory code"},output:J}}}},"app-info":{name:"app-info",description:"Manage app info records: categories, age ratings.",subcommands:{get:{name:"get",description:"Get app info including category and age rating.",args:{"app-id":{...p,type:"string"},output:J}},update:{name:"update",description:"Update app category.",args:{"info-id":{type:"string",description:"App Info ID. Use: asc app-info get --app-id <id>",required:!0},"primary-category":{type:"string",description:"Primary category ID, e.g. 'GAMES', 'PRODUCTIVITY'. Use: asc app-info categories list"},"secondary-category":{type:"string",description:"Secondary category ID (optional)"}}},categories:{name:"categories",description:"Category management",subcommands:{list:{name:"list",description:"List all App Store category IDs.",args:{platform:{type:"string",description:"Filter: IOS | MAC_OS | TV_OS"},output:J}}}}}},screenshots:{name:"screenshots",description:"Upload and manage App Store screenshots and app previews.",subcommands:{sets:{name:"sets",description:"Screenshot set management",subcommands:{list:{name:"list",description:"List screenshot sets for a version localization. Each set is for a specific device display type.",args:{"localization-id":{type:"string",description:"Localization ID. Use: asc metadata list --version-id <id>",required:!0},output:J}}}},list:{name:"list",description:"List screenshots in a set.",args:{"set-id":{type:"string",description:"Screenshot Set ID. Use: asc screenshots sets list --localization-id <id>",required:!0},output:J}},upload:{name:"upload",description:"Upload a screenshot image (PNG or JPEG) to a screenshot set.",args:{"set-id":{type:"string",description:"Screenshot Set ID",required:!0},file:{type:"string",description:"Path to PNG or JPEG screenshot file",required:!0}},examples:["asc screenshots upload --set-id <uuid> --file ~/Screenshots/iphone-6-5.png"]},delete:{name:"delete",description:"Delete a screenshot.",args:{"screenshot-id":{type:"positional",description:"Screenshot ID. Use: asc screenshots list --set-id <id>",required:!0}}},previews:{name:"previews",description:"App preview sets",subcommands:{list:{name:"list",description:"List app preview sets for a localization.",args:{"localization-id":{type:"string",description:"Localization ID. Use: asc metadata list --version-id <id>",required:!0},output:J}}}}}},signing:{name:"signing",description:"Manage code signing: certificates, devices, bundle IDs, provisioning profiles.",subcommands:{certs:{name:"certs",description:"Certificate management",subcommands:{list:{name:"list",description:"List signing certificates.",args:{type:{type:"string",description:"Filter by type",values:["IOS_DEVELOPMENT","IOS_DISTRIBUTION","MAC_APP_DISTRIBUTION","DEVELOPER_ID_APPLICATION"]},output:J}},get:{name:"get",description:"Get certificate details.",args:{"cert-id":{type:"positional",description:"Certificate ID. Use: asc signing certs list",required:!0},output:J}},revoke:{name:"revoke",description:"Revoke a certificate (invalidates profiles using it).",args:{"cert-id":{type:"positional",description:"Certificate ID",required:!0}}}}},devices:{name:"devices",description:"Device registration",subcommands:{list:{name:"list",description:"List registered test devices.",args:{platform:{type:"string",description:"Filter by platform",values:["IOS","MAC_OS","TV_OS"]},status:{type:"string",description:"Filter by status",values:["ENABLED","DISABLED"]},output:J}},register:{name:"register",description:"Register a new device by UDID.",args:{name:{type:"string",description:"Display name for the device",required:!0},udid:{type:"string",description:"Device UDID",required:!0},platform:{type:"string",description:"Platform",required:!0,values:["IOS","MAC_OS","TV_OS","WATCH_OS","VISION_OS"]}}}}},"bundle-ids":{name:"bundle-ids",description:"Bundle ID (App ID) management",subcommands:{list:{name:"list",description:"List registered bundle IDs.",args:{platform:{type:"string",description:"Filter by platform",values:["IOS","MAC_OS","UNIVERSAL"]},identifier:{type:"string",description:"Filter by identifier string"},output:J}},register:{name:"register",description:"Register a new bundle ID.",args:{name:{type:"string",description:"Display name",required:!0},identifier:{type:"string",description:"Bundle identifier, e.g. 'com.yourcompany.app'",required:!0},platform:{type:"string",description:"Platform",required:!0,values:["IOS","MAC_OS","UNIVERSAL"]}}}}},profiles:{name:"profiles",description:"Provisioning profile management",subcommands:{list:{name:"list",description:"List provisioning profiles.",args:{type:{type:"string",description:"Filter by type",values:["IOS_APP_DEVELOPMENT","IOS_APP_STORE","IOS_APP_ADHOC","MAC_APP_STORE","MAC_APP_DIRECT"]},name:{type:"string",description:"Filter by name"},output:J}},delete:{name:"delete",description:"Delete a profile.",args:{"profile-id":{type:"positional",description:"Profile ID. Use: asc signing profiles list",required:!0}}}}}}},reports:{name:"reports",description:"Download sales, finance, and analytics reports.",subcommands:{sales:{name:"sales",description:"Download a sales/trends report as TSV (or JSON with --output json).",args:{"vendor-number":{type:"string",description:"Vendor number from App Store Connect \u2192 Payments & Financial Reports",required:!0},frequency:{type:"string",description:"Report frequency",required:!0,values:["DAILY","WEEKLY","MONTHLY","YEARLY"]},date:{type:"string",description:"Report date: YYYY-MM-DD (DAILY), YYYY-MM (MONTHLY), YYYY (YEARLY)",required:!0},"report-type":{type:"string",description:"Report type",values:["SALES","SUBSCRIPTION","SUBSCRIPTION_EVENT","SUBSCRIBER","PRE_ORDER"]},"report-subtype":{type:"string",description:"Report subtype",values:["SUMMARY","DETAILED"]},output:J},examples:["asc reports sales --vendor-number 12345678 --frequency DAILY --date 2024-01-15","asc reports sales --vendor-number 12345678 --frequency MONTHLY --date 2024-01 --output json"]},finance:{name:"finance",description:"Download a monthly financial report for a region.",args:{"vendor-number":{type:"string",description:"Vendor number",required:!0},region:{type:"string",description:"Region code: US | EU | WW | JP | CN | AU | CA | GB | etc.",required:!0},date:{type:"string",description:"Month in YYYY-MM format",required:!0},output:J}},analytics:{name:"analytics",description:"Analytics report requests",subcommands:{list:{name:"list",description:"List analytics report requests for an app.",args:{"app-id":{...p,type:"string"},output:J}},request:{name:"request",description:"Request an analytics report (processed asynchronously).",args:{"app-id":{...p,type:"string"},category:{type:"string",description:"Access type",default:"ONE_TIME_SNAPSHOT",values:["ONE_TIME_SNAPSHOT","ONGOING"]}}}}}}},"xcode-cloud":{name:"xcode-cloud",description:"Manage Xcode Cloud CI/CD. Trigger builds, check results, download artifacts.",subcommands:{products:{name:"products",description:"Xcode Cloud product management",subcommands:{list:{name:"list",description:"List Xcode Cloud products.",args:{"app-id":{type:"string",description:"Filter by App ID"},output:J}}}},workflows:{name:"workflows",description:"Workflow management",subcommands:{list:{name:"list",description:"List workflows for a product.",args:{"product-id":{type:"string",description:"Xcode Cloud Product ID. Use: asc xcode-cloud products list",required:!0},output:J}},get:{name:"get",description:"Get workflow details.",args:{"workflow-id":{type:"positional",description:"Workflow ID. Use: asc xcode-cloud workflows list --product-id <id>",required:!0},output:J}}}},builds:{name:"builds",description:"Build run management",subcommands:{list:{name:"list",description:"List build runs.",args:{"workflow-id":{type:"string",description:"Filter by Workflow ID"},"product-id":{type:"string",description:"Filter by Product ID"},output:J}},run:{name:"run",description:"Trigger a new build run for a workflow.",args:{"workflow-id":{type:"string",description:"Workflow ID",required:!0},branch:{type:"string",description:"Git branch to build (optional)"}},examples:["asc xcode-cloud builds run --workflow-id <uuid> --branch main"]}}},artifacts:{name:"artifacts",description:"Build artifacts",subcommands:{list:{name:"list",description:"List artifacts (logs, archives) from a build run.",args:{"build-id":{type:"string",description:"Build Run ID. Use: asc xcode-cloud builds list --workflow-id <id>",required:!0},output:J}}}},"test-results":{name:"test-results",description:"Test results",subcommands:{list:{name:"list",description:"List test results from a build run.",args:{"build-id":{type:"string",description:"Build Run ID",required:!0},output:J}}}}}},"game-center":{name:"game-center",description:"Manage Game Center achievements and leaderboards.",subcommands:{achievements:{name:"achievements",description:"Achievement management",subcommands:{list:{name:"list",description:"List achievements.",args:{"app-id":{...p,type:"string"},output:J}},get:{name:"get",description:"Get achievement details.",args:{"achievement-id":{type:"positional",description:"Achievement ID. Use: asc game-center achievements list --app-id <id>",required:!0},output:J}}}},leaderboards:{name:"leaderboards",description:"Leaderboard management",subcommands:{list:{name:"list",description:"List leaderboards.",args:{"app-id":{...p,type:"string"},output:J}}}},"leaderboard-sets":{name:"leaderboard-sets",description:"Leaderboard set management",subcommands:{list:{name:"list",description:"List leaderboard sets.",args:{"app-id":{...p,type:"string"},output:J}}}}}},"beta-review":{name:"beta-review",description:"Manage TestFlight external beta review submissions. External testers require review before accessing builds.",subcommands:{submit:{name:"submit",description:"Submit a build for external beta review.",args:{"build-id":{type:"positional",description:"Build ID. Use: asc builds list --app-id <id>",required:!0}}},status:{name:"status",description:"Check beta review status for a build.",args:{"build-id":{type:"string",description:"Build ID",required:!0},output:J}},"detail-get":{name:"detail-get",description:"Get beta app review contact and demo account details.",args:{"app-id":{...p,type:"string"},output:J}},"detail-update":{name:"detail-update",description:"Update reviewer contact information and demo account credentials.",args:{"app-id":{...p,type:"string"},"contact-first-name":{type:"string",description:"Reviewer contact first name"},"contact-last-name":{type:"string",description:"Reviewer contact last name"},"contact-email":{type:"string",description:"Reviewer contact email"},"contact-phone":{type:"string",description:"Reviewer contact phone"},"demo-account-name":{type:"string",description:"Demo account username"},"demo-account-password":{type:"string",description:"Demo account password"},"demo-account-required":{type:"boolean",description:"Whether a demo account is required"},notes:{type:"string",description:"Additional notes for the review team"}}},notify:{name:"notify",description:"Enable or disable automatic tester notifications when a build is approved.",args:{"build-id":{...u2,type:"string"},enabled:{type:"boolean",description:"true = auto-notify testers, false = suppress notifications",default:!0}}},localizations:{name:"localizations",description:"Beta build localization management",subcommands:{list:{name:"list",description:"List TestFlight 'What to Test' localizations for a build.",args:{"build-id":{...u2,type:"string"},output:J}}}}}}}}}var C8={name:"@onmyway133/asc-cli",version:"1.0.1",description:"App Store Connect CLI \u2014 manage apps, builds, TestFlight, metadata and more from your terminal",type:"module",bin:{asc:"./dist/index.js"},scripts:{dev:"bun run src/index.ts",build:"bun build src/index.ts --outfile dist/index.js --target bun --minify",test:"bun test",typecheck:"tsc --noEmit",generate:"curl -s https://raw.githubusercontent.com/EvanBacon/App-Store-Connect-OpenAPI-Spec/main/specs/latest.json -o docs/openapi/latest.json && python3 scripts/gen-paths-index.py && openapi-ts --file openapi-ts.config.ts"},dependencies:{"@clack/prompts":"^1.2.0","@hey-api/client-fetch":"^0.13.1","@hey-api/openapi-ts":"^0.96.0",chalk:"^5.3.0",citty:"^0.1.6","cli-table3":"^0.6.5",jose:"^5.9.6"},devDependencies:{"bun-types":"latest",typescript:"^5.5.4"},engines:{bun:">=1.0.0"}};import{styleText as t2}from"util";import{stdout as b2,stdin as w8}from"process";import*as XD from"readline";import H9 from"readline";var r8=(D)=>{return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109},B8=(D)=>{return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510},n8=(D)=>{return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9800&&D<=9811||D===9855||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101632&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129672||D>=129680&&D<=129725||D>=129727&&D<=129733||D>=129742&&D<=129755||D>=129760&&D<=129768||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141};var E2=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,gu=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,su=/\t{1,1000}/y,C2=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,lu=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,t9=/\p{M}+/gu,A9={limit:1/0,ellipsis:""},f8=(D,u={},F={})=>{let E=u.limit??1/0,r=u.ellipsis??"",B=u?.ellipsisWidth??(r?f8(r,A9,F).width:0),C=F.ansiWidth??0,n=F.controlWidth??0,f=F.tabWidth??8,i=F.ambiguousWidth??1,t=F.emojiWidth??2,b=F.fullWidthWidth??2,e=F.regularWidth??1,h=F.wideWidth??2,A=0,$=0,S=D.length,V=0,a=!1,m=S,Z=Math.max(0,E-B),X=0,P=0,Y=0,I=0;D:while(!0){if(P>X||$>=S&&$>A){let WD=D.slice(X,P)||D.slice(A,$);V=0;for(let _D of WD.replaceAll(t9,"")){let UD=_D.codePointAt(0)||0;if(B8(UD))I=b;else if(n8(UD))I=h;else if(i!==e&&r8(UD))I=i;else I=e;if(Y+I>Z)m=Math.min(m,Math.max(X,A)+V);if(Y+I>E){a=!0;break D}V+=_D.length,Y+=I}X=P=0}if($>=S)break;if(lu.lastIndex=$,lu.test(D)){if(V=lu.lastIndex-$,I=V*e,Y+I>Z)m=Math.min(m,$+Math.floor((Z-Y)/e));if(Y+I>E){a=!0;break}Y+=I,X=A,P=$,$=A=lu.lastIndex;continue}if(E2.lastIndex=$,E2.test(D)){if(Y+C>Z)m=Math.min(m,$);if(Y+C>E){a=!0;break}Y+=C,X=A,P=$,$=A=E2.lastIndex;continue}if(gu.lastIndex=$,gu.test(D)){if(V=gu.lastIndex-$,I=V*n,Y+I>Z)m=Math.min(m,$+Math.floor((Z-Y)/n));if(Y+I>E){a=!0;break}Y+=I,X=A,P=$,$=A=gu.lastIndex;continue}if(su.lastIndex=$,su.test(D)){if(V=su.lastIndex-$,I=V*f,Y+I>Z)m=Math.min(m,$+Math.floor((Z-Y)/f));if(Y+I>E){a=!0;break}Y+=I,X=A,P=$,$=A=su.lastIndex;continue}if(C2.lastIndex=$,C2.test(D)){if(Y+t>Z)m=Math.min(m,$);if(Y+t>E){a=!0;break}Y+=t,X=A,P=$,$=A=C2.lastIndex;continue}$+=1}return{width:a?Z:Y,index:a?m:S,truncated:a,ellipsed:a&&E>=B}},i8=f8;var c9={limit:1/0,ellipsis:"",ellipsisWidth:0},b9=(D,u={})=>{return i8(D,c9,u).width},wD=b9;var du="\x1B",b8="\x9B",$9=39,B2="\x07",$8="[",e9="]",e8="m",n2=`${e9}8;;`,h8=new RegExp(`(?:\\${$8}(?<code>\\d+)m|\\${n2}(?<uri>.*)${B2})`,"y"),t8=(D)=>{if(D>=30&&D<=37)return 39;if(D>=90&&D<=97)return 39;if(D>=40&&D<=47)return 49;if(D>=100&&D<=107)return 49;if(D===1||D===2)return 22;if(D===3)return 23;if(D===4)return 24;if(D===7)return 27;if(D===8)return 28;if(D===9)return 29;if(D===0)return 0;return},A8=(D)=>`${du}${$8}${D}${e8}`,c8=(D)=>`${du}${n2}${D}${B2}`,r2=(D,u,F)=>{let E=u[Symbol.iterator](),r=!1,B=!1,C=D.at(-1),n=C===void 0?0:wD(C),f=E.next(),i=E.next(),t=0;while(!f.done){let b=f.value,e=wD(b);if(n+e<=F)D[D.length-1]+=b;else D.push(b),n=0;if(b===du||b===b8)r=!0,B=u.startsWith(n2,t+1);if(r){if(B){if(b===B2)r=!1,B=!1}else if(b===e8)r=!1}else if(n+=e,n===F&&!i.done)D.push(""),n=0;f=i,i=E.next(),t+=b.length}if(C=D.at(-1),!n&&C!==void 0&&C.length&&D.length>1)D[D.length-2]+=D.pop()},y9=(D)=>{let u=D.split(" "),F=u.length;while(F){if(wD(u[F-1]))break;F--}if(F===u.length)return D;return u.slice(0,F).join(" ")+u.slice(F).join("")},S9=(D,u,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let E="",r,B,C=D.split(" "),n=[""],f=0;for(let b=0;b<C.length;b++){let e=C[b];if(F.trim!==!1){let A=n.at(-1)??"",$=A.trimStart();if(A.length!==$.length)n[n.length-1]=$,f=wD($)}if(b!==0){if(f>=u&&(F.wordWrap===!1||F.trim===!1))n.push(""),f=0;if(f||F.trim===!1)n[n.length-1]+=" ",f++}let h=wD(e);if(F.hard&&h>u){let A=u-f,$=1+Math.floor((h-A-1)/u);if(Math.floor((h-1)/u)<$)n.push("");r2(n,e,u),f=wD(n.at(-1)??"");continue}if(f+h>u&&f&&h){if(F.wordWrap===!1&&f<u){r2(n,e,u),f=wD(n.at(-1)??"");continue}n.push(""),f=0}if(f+h>u&&F.wordWrap===!1){r2(n,e,u),f=wD(n.at(-1)??"");continue}n[n.length-1]+=e,f+=h}if(F.trim!==!1)n=n.map((b)=>y9(b));let i=n.join(`
87
+ `),t=!1;for(let b=0;b<i.length;b++){let e=i[b];if(E+=e,!t)t=e>="\uD800"&&e<="\uDBFF";else continue;if(e===du||e===b8){h8.lastIndex=b+1;let A=h8.exec(i)?.groups;if(A?.code!==void 0){let $=Number.parseFloat(A.code);r=$===$9?void 0:$}else if(A?.uri!==void 0)B=A.uri.length===0?void 0:A.uri}if(i[b+1]===`
88
+ `){if(B)E+=c8("");let h=r?t8(r):void 0;if(r&&h)E+=A8(h)}else if(e===`
89
+ `){if(r&&t8(r))E+=A8(r);if(B)E+=c8(B)}}return E},K9=/\r?\n/;function ND(D,u,F){return String(D).normalize().split(K9).map((E)=>S9(E,u,F)).join(`
90
+ `)}var uD=y0(i2(),1);import{ReadStream as S8}from"tty";function uu(D,u,F){if(!F.some((C)=>!C.disabled))return D;let E=D+u,r=Math.max(F.length-1,0),B=E<0?r:E>r?0:E;return F[B].disabled?uu(B,u<0?-1:1,F):B}var a9=["up","down","left","right","space","enter","cancel"],W9=["January","February","March","April","May","June","July","August","September","October","November","December"],x={actions:new Set(a9),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...W9],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(D,u)=>`There are only ${D} days in ${u}`,afterMin:(D)=>`Date must be on or after ${D.toISOString().slice(0,10)}`,beforeMax:(D)=>`Date must be on or before ${D.toISOString().slice(0,10)}`}}};function $2(D,u){if(typeof D=="string")return x.aliases.get(D)===u;for(let F of D)if(F!==void 0&&$2(F,u))return!0;return!1}function M9(D,u){if(D===u)return;let F=D.split(`
91
+ `),E=u.split(`
92
+ `),r=Math.max(F.length,E.length),B=[];for(let C=0;C<r;C++)F[C]!==E[C]&&B.push(C);return{lines:B,numLinesBefore:F.length,numLinesAfter:E.length,numLines:r}}var V9=globalThis.process.platform.startsWith("win"),A2=Symbol("clack:cancel");function tD(D){return D===A2}function xu(D,u){let F=D;F.isTTY&&F.setRawMode(u)}function H8({input:D=w8,output:u=b2,overwrite:F=!0,hideCursor:E=!0}={}){let r=XD.createInterface({input:D,output:u,prompt:"",tabSize:1});XD.emitKeypressEvents(D,r),D instanceof S8&&D.isTTY&&D.setRawMode(!0);let B=(C,{name:n,sequence:f})=>{let i=String(C);if($2([i,n,f],"cancel")){E&&u.write(uD.cursor.show),process.exit(0);return}if(!F)return;XD.moveCursor(u,n==="return"?0:-1,n==="return"?-1:0,()=>{XD.clearLine(u,1,()=>{D.once("keypress",B)})})};return E&&u.write(uD.cursor.hide),D.once("keypress",B),()=>{D.off("keypress",B),E&&u.write(uD.cursor.show),D instanceof S8&&D.isTTY&&!V9&&D.setRawMode(!1),r.terminal=!1,r.close()}}var u0=(D)=>("columns"in D)&&typeof D.columns=="number"?D.columns:80,e2=(D)=>("rows"in D)&&typeof D.rows=="number"?D.rows:20;function vu(D,u,F,E=F){let r=u0(D??b2);return ND(u,r-F.length,{hard:!0,trim:!1}).split(`
93
+ `).map((B,C)=>`${C===0?E:F}${B}`).join(`
94
+ `)}var Fu=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(D,u=!0){let{input:F=w8,output:E=b2,render:r,signal:B,...C}=D;this.opts=C,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=r.bind(this),this._track=u,this._abortSignal=B,this.input=F,this.output=E}unsubscribe(){this._subscribers.clear()}setSubscriber(D,u){let F=this._subscribers.get(D)??[];F.push(u),this._subscribers.set(D,F)}on(D,u){this.setSubscriber(D,{cb:u})}once(D,u){this.setSubscriber(D,{cb:u,once:!0})}emit(D,...u){let F=this._subscribers.get(D)??[],E=[];for(let r of F)r.cb(...u),r.once&&E.push(()=>F.splice(F.indexOf(r),1));for(let r of E)r()}prompt(){return new Promise((D)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),D(A2);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=H9.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),xu(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(uD.cursor.show),this.output.off("resize",this.render),xu(this.input,!1),D(this.value)}),this.once("cancel",()=>{this.output.write(uD.cursor.show),this.output.off("resize",this.render),xu(this.input,!1),D(A2)})})}_isActionKey(D,u){return D==="\t"}_setValue(D){this.value=D,this.emit("value",this.value)}_setUserInput(D,u){this.userInput=D??"",this.emit("userInput",this.userInput),u&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(D,u){if(this._track&&u.name!=="return"&&(u.name&&this._isActionKey(D,u)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),u?.name&&(!this._track&&x.aliases.has(u.name)&&this.emit("cursor",x.aliases.get(u.name)),x.actions.has(u.name)&&this.emit("cursor",u.name)),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),this.emit("key",D?.toLowerCase(),u),u?.name==="return"){if(this.opts.validate){let F=this.opts.validate(this.value);F&&(this.error=F instanceof Error?F.message:F,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}$2([D,u?.name,u?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
95
+ `),xu(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let D=ND(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
96
+ `).length-1;this.output.write(uD.cursor.move(-999,D*-1))}render(){let D=ND(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(uD.cursor.hide);else{let u=M9(this._prevFrame,D),F=e2(this.output);if(this.restoreCursor(),u){let E=Math.max(0,u.numLinesAfter-F),r=Math.max(0,u.numLinesBefore-F),B=u.lines.find((C)=>C>=E);if(B===void 0){this._prevFrame=D;return}if(u.lines.length===1){this.output.write(uD.cursor.move(0,B-r)),this.output.write(uD.erase.lines(1));let C=D.split(`
97
+ `);this.output.write(C[B]),this._prevFrame=D,this.output.write(uD.cursor.move(0,C.length-B-1));return}else if(u.lines.length>1){if(E<r)B=E;else{let n=B-r;n>0&&this.output.write(uD.cursor.move(0,n))}this.output.write(uD.erase.down());let C=D.split(`
98
+ `).slice(B);this.output.write(C.join(`
99
+ `)),this._prevFrame=D;return}}this.output.write(uD.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}};function J9(D,u){if(D===void 0||u.length===0)return 0;let F=u.findIndex((E)=>E.value===D);return F!==-1?F:0}function o9(D,u){return(u.label??String(u.value)).toLowerCase().includes(D.toLowerCase())}function q9(D,u){if(u)return D?u:u[0]}var z9=class extends Fu{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#u=0;#B="";#D;#r;#n;get cursor(){return this.#u}get userInputWithCursor(){if(!this.userInput)return t2(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}\u2588`;let D=this.userInput.slice(0,this._cursor),[u,...F]=this.userInput.slice(this._cursor);return`${D}${t2("inverse",u)}${F.join("")}`}get options(){return typeof this.#r=="function"?this.#r():this.#r}constructor(D){super(D),this.#r=D.options,this.#n=D.placeholder;let u=this.options;this.filteredOptions=[...u],this.multiple=D.multiple===!0,this.#D=typeof D.options=="function"?D.filter:D.filter??o9;let F;if(D.initialValue&&Array.isArray(D.initialValue)?this.multiple?F=D.initialValue:F=D.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(F=[this.options[0].value]),F)for(let E of F){let r=u.findIndex((B)=>B.value===E);r!==-1&&(this.toggleSelected(E),this.#u=r)}this.focusedValue=this.options[this.#u]?.value,this.on("key",(E,r)=>this.#F(E,r)),this.on("userInput",(E)=>this.#E(E))}_isActionKey(D,u){return D==="\t"||this.multiple&&this.isNavigating&&u.name==="space"&&D!==void 0&&D!==""}#F(D,u){let F=u.name==="up",E=u.name==="down",r=u.name==="return",B=this.userInput===""||this.userInput==="\t",C=this.#n,n=this.options,f=C!==void 0&&C!==""&&n.some((i)=>!i.disabled&&(this.#D?this.#D(C,i):!0));if(u.name==="tab"&&B&&f){this.userInput==="\t"&&this._clearUserInput(),this._setUserInput(C,!0),this.isNavigating=!1;return}F||E?(this.#u=uu(this.#u,F?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#u]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):r?this.value=q9(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(u.name==="tab"||this.isNavigating&&u.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected(D){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes(D)?this.selectedValues=this.selectedValues.filter((u)=>u!==D):this.selectedValues=[...this.selectedValues,D]:this.selectedValues=[D])}#E(D){if(D!==this.#B){this.#B=D;let u=this.options;D&&this.#D?this.filteredOptions=u.filter((r)=>this.#D?.(D,r)):this.filteredOptions=[...u];let F=J9(this.focusedValue,this.filteredOptions);this.#u=uu(F,0,this.filteredOptions);let E=this.filteredOptions[this.#u];E&&!E.disabled?this.focusedValue=E.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}};class y2 extends Fu{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",(u)=>{this.output.write(uD.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var m9={Y:{type:"year",len:4},M:{type:"month",len:2},D:{type:"day",len:2}};function K8(D){return[...D].map((u)=>m9[u])}function Z9(D){let u=new Intl.DateTimeFormat(D,{year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date(2000,0,15)),F=[],E="/";for(let r of u)r.type==="literal"?E=r.value.trim()||r.value:(r.type==="year"||r.type==="month"||r.type==="day")&&F.push({type:r.type,len:r.type==="year"?4:2});return{segments:F,separator:E}}function h2(D){return Number.parseInt((D||"0").replace(/_/g,"0"),10)||0}function D0(D){return{year:h2(D.year),month:h2(D.month),day:h2(D.day)}}function c2(D,u){return new Date(D||2001,u||1,0).getDate()}function a8(D){let{year:u,month:F,day:E}=D0(D);if(!u||u<0||u>9999||!F||F<1||F>12||!E||E<1)return;let r=new Date(Date.UTC(u,F-1,E));if(!(r.getUTCFullYear()!==u||r.getUTCMonth()!==F-1||r.getUTCDate()!==E))return{year:u,month:F,day:E}}function v8(D){let u=a8(D);return u?new Date(Date.UTC(u.year,u.month-1,u.day)):void 0}function N9(D,u,F,E){let r=F?{year:F.getUTCFullYear(),month:F.getUTCMonth()+1,day:F.getUTCDate()}:null,B=E?{year:E.getUTCFullYear(),month:E.getUTCMonth()+1,day:E.getUTCDate()}:null;return D==="year"?{min:r?.year??1,max:B?.year??9999}:D==="month"?{min:r&&u.year===r.year?r.month:1,max:B&&u.year===B.year?B.month:12}:{min:r&&u.year===r.year&&u.month===r.month?r.day:1,max:B&&u.year===B.year&&u.month===B.month?B.day:c2(u.year,u.month)}}class W8 extends Fu{#u;#B;#D;#r;#n;#F={segmentIndex:0,positionInSegment:0};#E=!0;#C=null;inlineError="";get segmentCursor(){return{...this.#F}}get segmentValues(){return{...this.#D}}get segments(){return this.#u}get separator(){return this.#B}get formattedValue(){return this.#t(this.#D)}#t(D){return this.#u.map((u)=>D[u.type]).join(this.#B)}#f(){this._setUserInput(this.#t(this.#D)),this._setValue(v8(this.#D)??void 0)}constructor(D){let u=D.format?{segments:K8(D.format),separator:D.separator??"/"}:Z9(D.locale),F=D.separator??u.separator,E=D.format?K8(D.format):u.segments,r=D.initialValue??D.defaultValue,B=r?{year:String(r.getUTCFullYear()).padStart(4,"0"),month:String(r.getUTCMonth()+1).padStart(2,"0"),day:String(r.getUTCDate()).padStart(2,"0")}:{year:"____",month:"__",day:"__"},C=E.map((n)=>B[n.type]).join(F);super({...D,initialUserInput:C},!1),this.#u=E,this.#B=F,this.#D=B,this.#r=D.minDate,this.#n=D.maxDate,this.#f(),this.on("cursor",(n)=>this.#b(n)),this.on("key",(n,f)=>this.#$(n,f)),this.on("finalize",()=>this.#e(D))}#i(){let D=Math.max(0,Math.min(this.#F.segmentIndex,this.#u.length-1)),u=this.#u[D];if(u)return this.#F.positionInSegment=Math.max(0,Math.min(this.#F.positionInSegment,u.len-1)),{segment:u,index:D}}#h(D){this.inlineError="",this.#C=null;let u=this.#i();u&&(this.#F.segmentIndex=Math.max(0,Math.min(this.#u.length-1,u.index+D)),this.#F.positionInSegment=0,this.#E=!0)}#A(D){let u=this.#i();if(!u)return;let{segment:F}=u,E=this.#D[F.type],r=!E||E.replace(/_/g,"")==="",B=Number.parseInt((E||"0").replace(/_/g,"0"),10)||0,C=N9(F.type,D0(this.#D),this.#r,this.#n),n;r?n=D===1?C.min:C.max:n=Math.max(Math.min(C.max,B+D),C.min),this.#D={...this.#D,[F.type]:n.toString().padStart(F.len,"0")},this.#E=!0,this.#C=null,this.#f()}#b(D){if(D)switch(D){case"right":return this.#h(1);case"left":return this.#h(-1);case"up":return this.#A(1);case"down":return this.#A(-1)}}#$(D,u){if(u?.name==="backspace"||u?.sequence==="\x7F"||u?.sequence==="\b"||D==="\x7F"||D==="\b"){this.inlineError="";let F=this.#i();if(!F)return;if(!this.#D[F.segment.type].replace(/_/g,"")){this.#h(-1);return}this.#D[F.segment.type]="_".repeat(F.segment.len),this.#E=!0,this.#F.positionInSegment=0,this.#f();return}if(u?.name==="tab"){this.inlineError="";let F=this.#i();if(!F)return;let E=u.shift?-1:1,r=F.index+E;r>=0&&r<this.#u.length&&(this.#F.segmentIndex=r,this.#F.positionInSegment=0,this.#E=!0);return}if(D&&/^[0-9]$/.test(D)){let F=this.#i();if(!F)return;let{segment:E}=F,r=!this.#D[E.type].replace(/_/g,"");if(this.#E&&this.#C!==null&&!r){let e=this.#C+D,h={...this.#D,[E.type]:e},A=this.#c(h,E);if(A){this.inlineError=A,this.#C=null,this.#E=!1;return}this.inlineError="",this.#D[E.type]=e,this.#C=null,this.#E=!1,this.#f(),F.index<this.#u.length-1&&(this.#F.segmentIndex=F.index+1,this.#F.positionInSegment=0,this.#E=!0);return}this.#E&&!r&&(this.#D[E.type]="_".repeat(E.len),this.#F.positionInSegment=0),this.#E=!1,this.#C=null;let B=this.#D[E.type],C=B.indexOf("_"),n=C>=0?C:Math.min(this.#F.positionInSegment,E.len-1);if(n<0||n>=E.len)return;let f=B.slice(0,n)+D+B.slice(n+1),i=!1;if(n===0&&B==="__"&&(E.type==="month"||E.type==="day")){let e=Number.parseInt(D,10);f=`0${D}`,i=e<=(E.type==="month"?1:2)}if(E.type==="year"&&(f=(B.replace(/_/g,"")+D).padStart(E.len,"_")),!f.includes("_")){let e={...this.#D,[E.type]:f},h=this.#c(e,E);if(h){this.inlineError=h;return}}this.inlineError="",this.#D[E.type]=f;let t=f.includes("_")?void 0:a8(this.#D);if(t){let{year:e,month:h}=t,A=c2(e,h);this.#D={year:String(Math.max(0,Math.min(9999,e))).padStart(4,"0"),month:String(Math.max(1,Math.min(12,h))).padStart(2,"0"),day:String(Math.max(1,Math.min(A,t.day))).padStart(2,"0")}}this.#f();let b=f.indexOf("_");i?(this.#E=!0,this.#C=D):b>=0?this.#F.positionInSegment=b:C>=0&&F.index<this.#u.length-1?(this.#F.segmentIndex=F.index+1,this.#F.positionInSegment=0,this.#E=!0):this.#F.positionInSegment=Math.min(n+1,E.len-1)}}#c(D,u){let{month:F,day:E}=D0(D);if(u.type==="month"&&(F<0||F>12))return x.date.messages.invalidMonth;if(u.type==="day"&&(E<0||E>31))return x.date.messages.invalidDay(31,"any month")}#e(D){let{year:u,month:F,day:E}=D0(this.#D);if(u&&F&&E){let r=c2(u,F);this.#D={...this.#D,day:String(Math.min(E,r)).padStart(2,"0")}}this.value=v8(this.#D)??D.defaultValue??void 0}}class M8 extends Fu{options;cursor=0;#u;getGroupItems(D){return this.options.filter((u)=>u.group===D)}isGroupSelected(D){let u=this.getGroupItems(D),F=this.value;return F===void 0?!1:u.every((E)=>F.includes(E.value))}toggleValue(){let D=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),D.group===!0){let u=D.value,F=this.getGroupItems(u);this.isGroupSelected(u)?this.value=this.value.filter((E)=>F.findIndex((r)=>r.value===E)===-1):this.value=[...this.value,...F.map((E)=>E.value)],this.value=Array.from(new Set(this.value))}else{let u=this.value.includes(D.value);this.value=u?this.value.filter((F)=>F!==D.value):[...this.value,D.value]}}constructor(D){super(D,!1);let{options:u}=D;this.#u=D.selectableGroups!==!1,this.options=Object.entries(u).flatMap(([F,E])=>[{value:F,group:!0,label:F},...E.map((r)=>({...r,group:F}))]),this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:F})=>F===D.cursorAt),this.#u?0:1),this.on("cursor",(F)=>{switch(F){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let E=this.options[this.cursor]?.group===!0;!this.#u&&E&&(this.cursor=this.cursor===0?this.options.length-1:this.cursor-1);break}case"down":case"right":{this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;let E=this.options[this.cursor]?.group===!0;!this.#u&&E&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}}class S2 extends Fu{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(D){super(D,!1),this.options=D.options;let u=this.options.findIndex(({value:E})=>E===D.initialValue),F=u===-1?0:u;this.cursor=this.options[F].disabled?uu(F,1,this.options):F,this.changeValue(),this.on("cursor",(E)=>{switch(E){case"left":case"up":this.cursor=uu(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=uu(this.cursor,1,this.options);break}this.changeValue()})}}class K2 extends Fu{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let D=this.userInput;if(this.cursor>=D.length)return`${this.userInput}\u2588`;let u=D.slice(0,this.cursor),[F,...E]=D.slice(this.cursor);return`${u}${t2("inverse",F)}${E.join("")}`}get cursor(){return this._cursor}constructor(D){super({...D,initialUserInput:D.initialUserInput??D.initialValue}),this.on("userInput",(u)=>{this._setValue(u)}),this.on("finalize",()=>{this.value||(this.value=D.defaultValue),this.value===void 0&&(this.value="")})}}import{styleText as K,stripVTControlCharacters as gB}from"util";import SD from"process";var wu=y0(i2(),1);function X9(){return SD.platform!=="win32"?SD.env.TERM!=="linux":!!SD.env.CI||!!SD.env.WT_SESSION||!!SD.env.TERMINUS_SUBLIME||SD.env.ConEmuTask==="{cmd::Cmder}"||SD.env.TERM_PROGRAM==="Terminus-Sublime"||SD.env.TERM_PROGRAM==="vscode"||SD.env.TERM==="xterm-256color"||SD.env.TERM==="alacritty"||SD.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var v2=X9(),Y9=()=>process.env.CI==="true";var T=(D,u)=>v2?D:u,Q9=T("\u25C6","*"),V8=T("\u25A0","x"),J8=T("\u25B2","x"),o8=T("\u25C7","o"),I9=T("\u250C","T"),k=T("\u2502","|"),Eu=T("\u2514","\u2014"),xB=T("\u2510","T"),Dn=T("\u2518","\u2014"),w2=T("\u25CF",">"),E0=T("\u25CB"," "),un=T("\u25FB","[\u2022]"),Fn=T("\u25FC","[+]"),En=T("\u25FB","[ ]"),Cn=T("\u25AA","\u2022"),rn=T("\u2500","-"),Bn=T("\u256E","+"),nn=T("\u251C","+"),fn=T("\u256F","+"),hn=T("\u2570","+"),tn=T("\u256D","+"),An=T("\u25CF","\u2022"),cn=T("\u25C6","*"),bn=T("\u25B2","!"),$n=T("\u25A0","x"),H2=(D)=>{switch(D){case"initial":case"active":return K("cyan",Q9);case"cancel":return K("red",V8);case"error":return K("yellow",J8);case"submit":return K("green",o8)}},T9=(D)=>{switch(D){case"initial":case"active":return K("cyan",k);case"cancel":return K("red",k);case"error":return K("yellow",k);case"submit":return K("green",k)}},R9=(D,u,F,E,r)=>{let B=u,C=0;for(let n=F;n<E;n++){let f=D[n];if(B=B-f.length,C++,B<=r)break}return{lineCount:B,removals:C}},_9=({cursor:D,options:u,style:F,output:E=process.stdout,maxItems:r=Number.POSITIVE_INFINITY,columnPadding:B=0,rowPadding:C=4})=>{let n=u0(E)-B,f=e2(E),i=K("dim","..."),t=Math.max(f-C,0),b=Math.max(Math.min(r,t),5),e=0;D>=b-3&&(e=Math.max(Math.min(D-b+3,u.length-b),0));let h=b<u.length&&e>0,A=b<u.length&&e+b<u.length,$=Math.min(e+b,u.length),S=[],V=0;h&&V++,A&&V++;let a=e+(h?1:0),m=$-(A?1:0);for(let X=a;X<m;X++){let P=ND(F(u[X],X===D),n,{hard:!0,trim:!1}).split(`
100
+ `);S.push(P),V+=P.length}if(V>t){let X=0,P=0,Y=V,I=D-a,WD=(_D,UD)=>R9(S,Y,_D,UD,t);h?({lineCount:Y,removals:X}=WD(0,I),Y>t&&({lineCount:Y,removals:P}=WD(I+1,S.length))):({lineCount:Y,removals:P}=WD(I+1,S.length),Y>t&&({lineCount:Y,removals:X}=WD(0,I))),X>0&&(h=!0,S.splice(0,X)),P>0&&(A=!0,S.splice(S.length-P,P))}let Z=[];h&&Z.push(i);for(let X of S)for(let P of X)Z.push(P);return A&&Z.push(i),Z};var q8=(D)=>{let u=D.active??"Yes",F=D.inactive??"No";return new y2({active:u,inactive:F,signal:D.signal,input:D.input,output:D.output,initialValue:D.initialValue??!0,render(){let E=D.withGuide??x.withGuide,r=`${H2(this.state)} `,B=E?`${K("gray",k)} `:"",C=vu(D.output,D.message,B,r),n=`${E?`${K("gray",k)}
101
+ `:""}${C}
102
+ `,f=this.value?u:F;switch(this.state){case"submit":{let i=E?`${K("gray",k)} `:"";return`${n}${i}${K("dim",f)}`}case"cancel":{let i=E?`${K("gray",k)} `:"";return`${n}${i}${K(["strikethrough","dim"],f)}${E?`
103
+ ${K("gray",k)}`:""}`}default:{let i=E?`${K("cyan",k)} `:"",t=E?K("cyan",Eu):"";return`${n}${i}${this.value?`${K("green",w2)} ${u}`:`${K("dim",E0)} ${K("dim",u)}`}${D.vertical?E?`
104
+ ${K("cyan",k)} `:`
105
+ `:` ${K("dim","/")} `}${this.value?`${K("dim",E0)} ${K("dim",F)}`:`${K("green",w2)} ${F}`}
106
+ ${t}
107
+ `}}}}).prompt()};var HD=(D="",u)=>{let F=u?.output??process.stdout,E=u?.withGuide??x.withGuide?`${K("gray",Eu)} `:"";F.write(`${E}${K("red",D)}
108
+
109
+ `)},z8=(D="",u)=>{let F=u?.output??process.stdout,E=u?.withGuide??x.withGuide?`${K("gray",I9)} `:"";F.write(`${E}${D}
110
+ `)},m8=(D="",u)=>{let F=u?.output??process.stdout,E=u?.withGuide??x.withGuide?`${K("gray",k)}
111
+ ${K("gray",Eu)} `:"";F.write(`${E}${D}
112
+
113
+ `)};var U9=(D)=>K("magenta",D),a2=({indicator:D="dots",onCancel:u,output:F=process.stdout,cancelMessage:E,errorMessage:r,frames:B=v2?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:C=v2?80:120,signal:n,...f}={})=>{let i=Y9(),t,b,e=!1,h=!1,A="",$,S=performance.now(),V=u0(F),a=f?.styleFrame??U9,m=(O)=>{let iD=O>1?r??x.messages.error:E??x.messages.cancel;h=O===1,e&&(tu(iD,O),h&&typeof u=="function"&&u())},Z=()=>m(2),X=()=>m(1),P=()=>{process.on("uncaughtExceptionMonitor",Z),process.on("unhandledRejection",Z),process.on("SIGINT",X),process.on("SIGTERM",X),process.on("exit",m),n&&n.addEventListener("abort",X)},Y=()=>{process.removeListener("uncaughtExceptionMonitor",Z),process.removeListener("unhandledRejection",Z),process.removeListener("SIGINT",X),process.removeListener("SIGTERM",X),process.removeListener("exit",m),n&&n.removeEventListener("abort",X)},I=()=>{if($===void 0)return;i&&F.write(`
114
+ `);let O=ND($,V,{hard:!0,trim:!1}).split(`
115
+ `);O.length>1&&F.write(wu.cursor.up(O.length-1)),F.write(wu.cursor.to(0)),F.write(wu.erase.down())},WD=(O)=>O.replace(/\.+$/,""),_D=(O)=>{let iD=(performance.now()-O)/1000,MD=Math.floor(iD/60),VD=Math.floor(iD%60);return MD>0?`[${MD}m ${VD}s]`:`[${VD}s]`},UD=f.withGuide??x.withGuide,DE=(O="")=>{e=!0,t=H8({output:F}),A=WD(O),S=performance.now(),UD&&F.write(`${K("gray",k)}
116
+ `);let iD=0,MD=0;P(),b=setInterval(()=>{if(i&&A===$)return;I(),$=A;let VD=a(B[iD]),qu;if(i)qu=`${VD} ${A}...`;else if(D==="timer")qu=`${VD} ${A} ${_D(S)}`;else{let FE=".".repeat(Math.floor(MD)).slice(0,3);qu=`${VD} ${A}${FE}`}let uE=ND(qu,V,{hard:!0,trim:!1});F.write(uE),iD=iD+1<B.length?iD+1:0,MD=MD<4?MD+0.125:0},C)},tu=(O="",iD=0,MD=!1)=>{if(!e)return;e=!1,clearInterval(b),I();let VD=iD===0?K("green",o8):iD===1?K("red",V8):K("red",J8);A=O??A,MD||(D==="timer"?F.write(`${VD} ${A} ${_D(S)}
117
+ `):F.write(`${VD} ${A}
118
+ `)),Y(),t()};return{start:DE,stop:(O="")=>tu(O,0),message:(O="")=>{A=WD(O??A)},cancel:(O="")=>tu(O,1),error:(O="")=>tu(O,2),clear:()=>tu("",0,!0),get isCancelled(){return h}}},en={light:T("\u2500","-"),heavy:T("\u2501","="),block:T("\u2588","#")};var F0=(D,u)=>D.includes(`
119
+ `)?D.split(`
120
+ `).map((F)=>u(F)).join(`
121
+ `):u(D),W2=(D)=>{let u=(F,E)=>{let r=F.label??String(F.value);switch(E){case"disabled":return`${K("gray",E0)} ${F0(r,(B)=>K("gray",B))}${F.hint?` ${K("dim",`(${F.hint??"disabled"})`)}`:""}`;case"selected":return`${F0(r,(B)=>K("dim",B))}`;case"active":return`${K("green",w2)} ${r}${F.hint?` ${K("dim",`(${F.hint})`)}`:""}`;case"cancelled":return`${F0(r,(B)=>K(["strikethrough","dim"],B))}`;default:return`${K("dim",E0)} ${F0(r,(B)=>K("dim",B))}`}};return new S2({options:D.options,signal:D.signal,input:D.input,output:D.output,initialValue:D.initialValue,render(){let F=D.withGuide??x.withGuide,E=`${H2(this.state)} `,r=`${T9(this.state)} `,B=vu(D.output,D.message,r,E),C=`${F?`${K("gray",k)}
122
+ `:""}${B}
123
+ `;switch(this.state){case"submit":{let n=F?`${K("gray",k)} `:"",f=vu(D.output,u(this.options[this.cursor],"selected"),n);return`${C}${f}`}case"cancel":{let n=F?`${K("gray",k)} `:"",f=vu(D.output,u(this.options[this.cursor],"cancelled"),n);return`${C}${f}${F?`
124
+ ${K("gray",k)}`:""}`}default:{let n=F?`${K("cyan",k)} `:"",f=F?K("cyan",Eu):"",i=C.split(`
125
+ `).length,t=F?2:1;return`${C}${n}${_9({output:D.output,cursor:this.cursor,options:this.options,maxItems:D.maxItems,columnPadding:n.length,rowPadding:i+t,style:(b,e)=>u(b,b.disabled?"disabled":e?"active":"inactive")}).join(`
126
+ ${n}`)}
127
+ ${f}
128
+ `}}}}).prompt()};var yn=`${K("gray",k)} `;var OD=(D)=>new K2({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,output:D.output,signal:D.signal,input:D.input,render(){let u=D?.withGuide??x.withGuide,F=`${`${u?`${K("gray",k)}
129
+ `:""}${H2(this.state)} `}${D.message}
130
+ `,E=D.placeholder?K("inverse",D.placeholder[0])+K("dim",D.placeholder.slice(1)):K(["inverse","hidden"],"_"),r=this.userInput?this.userInputWithCursor:E,B=this.value??"";switch(this.state){case"error":{let C=this.error?` ${K("yellow",this.error)}`:"",n=u?`${K("yellow",k)} `:"",f=u?K("yellow",Eu):"";return`${F.trim()}
131
+ ${n}${r}
132
+ ${f}${C}
133
+ `}case"submit":{let C=B?` ${K("dim",B)}`:"",n=u?K("gray",k):"";return`${F}${n}${C}`}case"cancel":{let C=B?` ${K(["strikethrough","dim"],B)}`:"",n=u?K("gray",k):"";return`${F}${n}${C}${B.trim()?`
134
+ ${n}`:""}`}default:{let C=u?`${K("cyan",k)} `:"",n=u?K("cyan",Eu):"";return`${F}${C}${r}
135
+ ${n}
136
+ `}}}}).prompt();au();hu();import{existsSync as o1,readFileSync as q1}from"fs";async function z1(D){z8(N.bold("App Store Connect \u2014 Login"));let{name:u,keyId:F,issuerId:E,privateKey:r}=D;if(!F){let t=await OD({message:"Key ID (from App Store Connect API Keys):"});if(tD(t))HD("Cancelled"),process.exit(0);F=t}if(!E){let t=await OD({message:"Issuer ID:"});if(tD(t))HD("Cancelled"),process.exit(0);E=t}if(!r){let t=await OD({message:"Path to private key (.p8 file):",placeholder:"~/.asc/AuthKey_XXXXXX.p8"});if(tD(t))HD("Cancelled"),process.exit(0);r=t}if(!u){let b=CD().profiles.length===0?"default":void 0,e=await OD({message:"Profile name:",placeholder:b??"work",defaultValue:b});if(tD(e))HD("Cancelled"),process.exit(0);u=e||"default"}let B=r.trim().replace(/^~/,process.env.HOME??"");if(!o1(B))fD(Error(`Private key file not found: ${B}`)),process.exit(1);let C=a2();C.start("Validating credentials\u2026");let n={name:u,keyId:F,issuerId:E,privateKeyPath:r,isDefault:CD().profiles.length===0},f=!1;if(!D.bypassKeychain){let t=q1(B,"utf8");if(f=A0(u,t),f)n.storedInKeychain=!0}try{await iu(n),C.stop("Credentials validated")}catch(t){C.stop("Validation failed"),fD(t),process.exit(1)}V2(n);let i=f?N.dim(" (private key stored in Keychain)"):"";o(`Profile "${N.cyan(u)}" saved${i}`),console.log(N.dim(` Credentials: ${C0()}`)),m8("You're all set! Run "+N.cyan("asc apps list")+" to get started.")}function m1(){let D=CD();if(D.profiles.length===0){console.log(N.dim("No profiles configured. Run: asc auth login"));return}W(["Profile","Key ID","Issuer ID","Active"],D.profiles.map((u)=>[u.name,u.keyId,u.issuerId,D.activeProfile===u.name?N.green("\u2713"):""]),"Profiles")}async function Z1(D){let u=CD();if(u.profiles.length===0){console.log(N.dim("No profiles. Run: asc auth login"));return}let F=D;if(!F){let E=await W2({message:"Select profile to activate:",options:u.profiles.map((r)=>({value:r.name,label:r.name,hint:r.name===u.activeProfile?"active":void 0}))});if(tD(E))HD("Cancelled"),process.exit(0);F=E}if(!o2(F))fD(Error(`Profile "${F}" not found`)),process.exit(1);o(`Active profile set to "${N.cyan(F)}"`)}async function N1(D={}){let u=Hu();if(!u){console.log(N.dim("No active profile. Run: asc auth login"));return}if(console.log(N.bold("Active profile:"),N.cyan(u.name)),console.log(" Key ID: ",u.keyId),console.log(" Issuer ID: ",u.issuerId),u.privateKeyPath)console.log(" Key path: ",u.privateKeyPath);if(u.storedInKeychain)console.log(" Keychain: ",N.green("yes"));if(D.validate){let F=a2();F.start("Validating token\u2026");try{await iu(u),F.stop(N.green("Token generated successfully"))}catch(E){F.stop(N.red("Token generation failed")),fD(E)}}}async function g2(D){let u=CD(),F=D;if(!F){if(u.profiles.length===0){console.log(N.dim("No profiles configured."));return}let r=await W2({message:"Select profile to remove:",options:u.profiles.map((B)=>({value:B.name,label:B.name,hint:B.name===u.activeProfile?"active":void 0}))});if(tD(r))HD("Cancelled"),process.exit(0);F=r}let E=await q8({message:`Remove profile "${F}"?`});if(tD(E)||!E){HD("Cancelled");return}if(p2(F),J2(F))o(`Profile "${N.cyan(F)}" removed`);else fD(Error(`Profile "${F}" not found`))}function b0(D){let u=CD(),F=D??u.activeProfile,E=u.profiles.find((B)=>B.name===F);if(!E)fD(Error(`Profile "${F}" not found. Run: asc auth list`)),process.exit(1);let r=u.activeProfile===E.name;if(console.log(N.bold(`Profile: ${N.cyan(E.name)}`)+(r?N.green(" \u2190 active"):"")),console.log(` Key ID: ${E.keyId}`),console.log(` Issuer ID: ${E.issuerId}`),E.privateKeyPath)console.log(` Key path: ${E.privateKeyPath}`);if(console.log(` In Keychain: ${E.storedInKeychain?N.green("yes"):"no"}`),E.vendorNumber)console.log(` Vendor Number: ${E.vendorNumber}`);console.log(N.dim(`
137
+ Credentials file: ${C0()}`))}async function X1(D,u){let F=CD(),E=D??F.activeProfile,r=F.profiles.find((C)=>C.name===E);if(!r)fD(Error(`Profile "${E}" not found. Run: asc auth list`)),process.exit(1);let B={};if(u.keyId)B.keyId=u.keyId;if(u.issuerId)B.issuerId=u.issuerId;if(u.vendorNumber)B.vendorNumber=u.vendorNumber;if(u.privateKey){let C=u.privateKey.trim().replace(/^~/,process.env.HOME??"");if(!o1(C))fD(Error(`Private key file not found: ${C}`)),process.exit(1);if(B.privateKeyPath=u.privateKey,!u.bypassKeychain){let n=q1(C,"utf8");if(A0(E,n))B.storedInKeychain=!0}}if(u.renameTo){if(F.profiles.find((n)=>n.name===u.renameTo))fD(Error(`Profile "${u.renameTo}" already exists`)),process.exit(1);if(r.storedInKeychain){let{loadFromKeychain:n,saveToKeychain:f,deleteFromKeychain:i}=await Promise.resolve().then(() => (hu(),c0)),t=n(E);if(t)f(u.renameTo,t),i(E)}let C=F.profiles.findIndex((n)=>n.name===E);if(F.profiles[C]={...F.profiles[C],...B,name:u.renameTo},F.activeProfile===E)F.activeProfile=u.renameTo;LD(F),o(`Profile "${N.cyan(E)}" renamed to "${N.cyan(u.renameTo)}"`),b0(u.renameTo);return}if(Object.keys(B).length===0){console.log(N.dim("Nothing to update. Provide at least one flag."));return}q2(E,B),o(`Profile "${N.cyan(E)}" updated`),b0(E)}async function Y1(D){return g2(D)}au();hu();class $0 extends Error{status;errors;constructor(D,u,F){super(D);this.status=u;this.errors=F;this.name="ASCError"}}async function Q1(){let D=Hu();if(!D)throw new $0("No active profile. Run: asc auth login",401);let u=await iu(D),F=new Headers;return F.set("Authorization",`Bearer ${u}`),F.set("Content-Type","application/json"),F}async function H(D,u={}){let F=await Q1(),E=new URL(`https://api.appstoreconnect.apple.com${D}`);if(u.params){for(let[C,n]of Object.entries(u.params))if(n!==void 0)E.searchParams.set(C,String(n))}let r=await fetch(E.toString(),{method:u.method??"GET",headers:F,body:u.body?JSON.stringify(u.body):void 0});if(r.status===204)return{data:void 0};let B=await r.json();if(!r.ok){let C=B.errors,n=C?.[0]?.detail??C?.[0]?.title??`HTTP ${r.status}`;throw new $0(n,r.status,C)}return B}async function M(D,u={},F=20){let E=[],r,B=0;while(B<F){let C=await Q1(),n=r??(()=>{let b=new URL(`https://api.appstoreconnect.apple.com${D}`);for(let[e,h]of Object.entries({limit:"200",...u.params}))if(h!==void 0)b.searchParams.set(e,String(h));return b.toString()})(),f=await fetch(n,{headers:C}),i=await f.json();if(!f.ok){let b=i.errors,e=b?.[0]?.detail??b?.[0]?.title??`HTTP ${f.status}`;throw new $0(e,f.status,b)}let t=i.data;if(Array.isArray(t))E.push(...t);if(r=i.links?.next,!r)break;B++}return E}async function I1(D={}){let u=await M("/v1/apps",{params:{"fields[apps]":"name,bundleId,sku,primaryLocale"}});if(v(D.output)==="json"){w(u.map((E)=>({id:E.id,...E.attributes})));return}W(["ID","Name","Bundle ID","SKU","Locale"],u.map((E)=>[E.id,d(E.attributes.name,40),E.attributes.bundleId,E.attributes.sku??"-",E.attributes.primaryLocale]),`Apps (${u.length})`)}async function T1(D,u={}){let E=(await H(`/v1/apps/${D}`)).data;if(v(u.output)==="json"){w({id:E.id,...E.attributes});return}console.log(`ID: ${E.id}`),console.log(`Name: ${E.attributes.name}`),console.log(`Bundle ID: ${E.attributes.bundleId}`),console.log(`SKU: ${E.attributes.sku??"-"}`),console.log(`Primary Locale: ${E.attributes.primaryLocale}`)}async function R1(D={}){let u={"fields[builds]":"version,uploadedDate,processingState,expired",limit:"200"};if(D.appId)u["filter[app]"]=D.appId;if(D.version)u["filter[version]"]=D.version;if(D.platform)u["filter[platform]"]=D.platform.toUpperCase();let F=await M("/v1/builds",{params:u});if(v(D.output)==="json"){w(F.map((r)=>({id:r.id,...r.attributes})));return}W(["ID","Version","Uploaded","State","Expired"],F.map((r)=>[r.id,r.attributes.version,s(r.attributes.uploadedDate),r.attributes.processingState??"-",r.attributes.expired?"yes":"no"]),`Builds (${F.length})`)}async function _1(D,u={}){let E=(await H(`/v1/builds/${D}`)).data;if(v(u.output)==="json"){w({id:E.id,...E.attributes});return}console.log(`ID: ${E.id}`),console.log(`Version: ${E.attributes.version}`),console.log(`Uploaded: ${s(E.attributes.uploadedDate)}`),console.log(`Processing State: ${E.attributes.processingState??"-"}`),console.log(`Expired: ${E.attributes.expired?"yes":"no"}`),console.log(`Min OS: ${E.attributes.minOsVersion??"-"}`)}async function U1(D){let F=(await M(`/v1/builds/${D.buildId}/betaBuildLocalizations`)).find((E)=>E.attributes.locale===D.locale);if(F)await H(`/v1/betaBuildLocalizations/${F.id}`,{method:"PATCH",body:{data:{type:"betaBuildLocalizations",id:F.id,attributes:{whatsNew:D.notes}}}}),o(`Beta notes updated for locale "${D.locale}"`);else await H("/v1/betaBuildLocalizations",{method:"POST",body:{data:{type:"betaBuildLocalizations",attributes:{locale:D.locale,whatsNew:D.notes},relationships:{build:{data:{type:"builds",id:D.buildId}}}}}}),o(`Beta notes created for locale "${D.locale}"`)}async function j1(D){let u={"fields[appStoreVersions]":"platform,versionString,appStoreState,createdDate"};if(D.platform)u["filter[platform]"]=D.platform.toUpperCase();let F=await M(`/v1/apps/${D.appId}/appStoreVersions`,{params:u});if(v(D.output)==="json"){w(F.map((r)=>({id:r.id,...r.attributes})));return}W(["ID","Version","Platform","State","Created"],F.map((r)=>[r.id,r.attributes.versionString,r.attributes.platform,r.attributes.appStoreState,s(r.attributes.createdDate)]),`Versions (${F.length})`)}async function G1(D){let u=D.platform.toUpperCase(),F=await H("/v1/appStoreVersions",{method:"POST",body:{data:{type:"appStoreVersions",attributes:{platform:u,versionString:D.version},relationships:{app:{data:{type:"apps",id:D.appId}}}}}});o(`Created version ${D.version} (${u}) \u2014 ID: ${F.data.id}`)}async function k1(D){await H("/v1/appStoreVersionSubmissions",{method:"POST",body:{data:{type:"appStoreVersionSubmissions",relationships:{appStoreVersion:{data:{type:"appStoreVersions",id:D}}}}}}),o(`Version ${D} submitted for review`)}async function P1(D={}){let u;if(D.appId)u=await M(`/v1/apps/${D.appId}/betaGroups`);else u=await M("/v1/betaGroups");if(v(D.output)==="json"){w(u.map((E)=>({id:E.id,...E.attributes})));return}W(["ID","Name","Internal","Public Link"],u.map((E)=>[E.id,E.attributes.name,E.attributes.isInternalGroup?"yes":"no",E.attributes.publicLink??"-"]),`Beta Groups (${u.length})`)}async function O1(D){let u=await M(`/v1/betaGroups/${D.groupId}/betaTesters`,{params:{"fields[betaTesters]":"firstName,lastName,email,inviteType,state"}});if(v(D.output)==="json"){w(u.map((E)=>({id:E.id,...E.attributes})));return}W(["ID","Name","Email","State"],u.map((E)=>[E.id,[E.attributes.firstName,E.attributes.lastName].filter(Boolean).join(" ")||"-",E.attributes.email,E.attributes.state??"-"]),`Testers (${u.length})`)}async function L1(D){let u=D.email;if(!u){let E=await OD({message:"Tester email:"});if(tD(E))HD("Cancelled"),process.exit(0);u=E}let F=await H("/v1/betaTesters",{method:"POST",body:{data:{type:"betaTesters",attributes:{email:u,firstName:D.firstName,lastName:D.lastName},relationships:{betaGroups:{data:[{type:"betaGroups",id:D.groupId}]}}}}});o(`Tester ${u} added (ID: ${F.data.id})`)}async function p1(D){await H(`/v1/betaGroups/${D.groupId}/relationships/betaTesters`,{method:"DELETE",body:{data:[{type:"betaTesters",id:D.testerId}]}}),o(`Tester ${D.testerId} removed from group`)}async function g1(D){let u=await M(`/v1/appStoreVersions/${D.versionId}/appStoreVersionLocalizations`);if(v(D.output)==="json"){w(u.map((E)=>({id:E.id,...E.attributes})));return}W(["ID","Locale","What's New","Description"],u.map((E)=>[E.id,E.attributes.locale,d(E.attributes.whatsNew??"-",50),d(E.attributes.description??"-",50)]),`Localizations (${u.length})`)}async function s1(D){let u=await M(`/v1/appStoreVersions/${D.versionId}/appStoreVersionLocalizations`,{params:{"filter[locale]":D.locale}}),F={};if(D.whatsNew!==void 0)F.whatsNew=D.whatsNew;if(D.description!==void 0)F.description=D.description;if(D.keywords!==void 0)F.keywords=D.keywords;if(D.promotionalText!==void 0)F.promotionalText=D.promotionalText;if(u.length>0&&u[0])await H(`/v1/appStoreVersionLocalizations/${u[0].id}`,{method:"PATCH",body:{data:{type:"appStoreVersionLocalizations",id:u[0].id,attributes:F}}}),o(`Metadata updated for locale "${D.locale}"`);else await H("/v1/appStoreVersionLocalizations",{method:"POST",body:{data:{type:"appStoreVersionLocalizations",attributes:{locale:D.locale,...F},relationships:{appStoreVersion:{data:{type:"appStoreVersions",id:D.versionId}}}}}}),o(`Localization created for locale "${D.locale}"`)}async function l1(D){let u=await M(`/v1/apps/${D.appId}/customerReviews`,{params:{"fields[customerReviews]":"rating,title,body,reviewerNickname,createdDate,territory",sort:"-createdDate"}});if(v(D.output)==="json"){w(u.map((E)=>({id:E.id,...E.attributes})));return}W(["ID","Rating","Title","Body","Date"],u.map((E)=>[E.id,"\u2605".repeat(E.attributes.rating)+"\u2606".repeat(5-E.attributes.rating),d(E.attributes.title??"-",30),d(E.attributes.body??"-",50),s(E.attributes.createdDate)]),`Reviews (${u.length})`)}async function d1(D,u={}){let E=(await H(`/v1/customerReviews/${D}`)).data;if(v(u.output)==="json"){w({id:E.id,...E.attributes});return}console.log(`ID: ${E.id}`),console.log(`Rating: ${"\u2605".repeat(E.attributes.rating)}${"\u2606".repeat(5-E.attributes.rating)}`),console.log(`Title: ${E.attributes.title??"-"}`),console.log(`Body: ${E.attributes.body??"-"}`),console.log(`Author: ${E.attributes.reviewerNickname??"-"}`),console.log(`Date: ${s(E.attributes.createdDate)}`),console.log(`Territory:${E.attributes.territory??"-"}`)}async function x1(D){let u=await H(`/v1/customerReviews/${D.reviewId}/response`).catch(()=>null);if(u?.data)await H(`/v1/customerReviewResponses/${u.data.id}`,{method:"PATCH",body:{data:{type:"customerReviewResponses",id:u.data.id,attributes:{responseBody:D.message}}}}),o("Review response updated");else await H("/v1/customerReviewResponses",{method:"POST",body:{data:{type:"customerReviewResponses",attributes:{responseBody:D.message},relationships:{review:{data:{type:"customerReviews",id:D.reviewId}}}}}}),o("Review response posted")}async function D6(D,u={}){let E=(await H(`/v1/apps/${D}/appPriceSchedule`,{params:{include:"manualPrices,automaticPrices,baseTerritory","fields[territories]":"currency,name"}})).data;if(v(u.output)==="json"){w(E);return}console.log(`Schedule ID: ${E.data.id}`);let B=E.included??[],C=B.find((f)=>f.type==="territories");if(C){let f=C.attributes;console.log(`Base Territory: ${f?.name??C.id} (${f?.currency??"?"})`)}let n=B.filter((f)=>f.type==="appPrices");if(n.length)W(["Price ID","Territory","Start Date"],n.map((f)=>{let i=f.attributes;return[f.id,i?.territory??"-",s(i?.startDate??"")]}),`Manual Prices (${n.length})`)}async function u6(D){await H("/v1/appPriceSchedules",{method:"POST",body:{data:{type:"appPriceSchedules",relationships:{app:{data:{type:"apps",id:D.appId}},manualPrices:{data:[{type:"appPrices",id:"${price}"}]},baseTerritory:{data:{type:"territories",id:D.baseTerritory}}}},included:[{type:"appPrices",id:"${price}",attributes:{startDate:null},relationships:{appPricePoint:{data:{type:"appPricePoints",id:D.pricePointId}},territory:{data:{type:"territories",id:D.baseTerritory}}}}]}}),o(`Price schedule updated for app ${D.appId}`)}async function F6(D){let u={"fields[appPricePoints]":"customerPrice,proceeds,territory",limit:"200"};if(D.territory)u["filter[territory]"]=D.territory;let F=await M(`/v1/apps/${D.appId}/appPricePoints`,{params:u});if(v(D.output)==="json"){w(F);return}W(["ID","Customer Price","Proceeds","Territory"],F.map((r)=>[r.id,r.attributes.customerPrice??"-",r.attributes.proceeds??"-",String(r.attributes.territory??"-")]),`Price Points (${F.length})`)}async function E6(D={}){let u=await M("/v1/territories");if(v(D.output)==="json"){w(u);return}W(["Territory Code","Name","Currency"],u.map((E)=>[E.id,E.attributes.name??"-",E.attributes.currency??"-"]),`Territories (${u.length})`)}async function C6(D,u={}){let E=(await H(`/v1/apps/${D}/appAvailabilityV2`,{params:{include:"availableTerritories","fields[territories]":"currency,name"}})).data;if(v(u.output)==="json"){w(E);return}console.log(`App ID: ${D}`),console.log(`Available in new territories: ${E.data.attributes?.availableInNewTerritories??"-"}`);let B=(E.included??[]).filter((C)=>C.type==="territories");if(B.length)console.log(`
138
+ Enabled Territories (${B.length}):`),W(["Territory Code","Name","Currency"],B.map((C)=>[C.id,C.attributes?.name??"-",C.attributes?.currency??"-"]))}async function r6(D){await H("/v1/appAvailabilities",{method:"POST",body:{data:{type:"appAvailabilities",attributes:{availableInNewTerritories:D.availableInNewTerritories??!0},relationships:{app:{data:{type:"apps",id:D.appId}},availableTerritories:{data:D.territories.map((u)=>({type:"territories",id:u}))}}}}}),console.log(`Availability updated for app ${D.appId}`)}async function B6(D){let u=await M(`/v1/apps/${D.appId}/inAppPurchasesV2`,{params:{"fields[inAppPurchasesV2]":"name,productId,inAppPurchaseType,state"}});if(v(D.output)==="json"){w(u);return}W(["ID","Name","Product ID","Type","State"],u.map((E)=>[E.id,d(E.attributes.name??"-",30),E.attributes.productId??"-",E.attributes.inAppPurchaseType??"-",E.attributes.state??"-"]),`In-App Purchases (${u.length})`)}async function n6(D,u={}){let F=await H(`/v1/inAppPurchasesV2/${D}`);if(v(u.output)==="json"){w(F.data);return}let r=F.data.data.attributes;console.log(`ID: ${F.data.data.id}`),console.log(`Name: ${r.name??"-"}`),console.log(`Product ID: ${r.productId??"-"}`),console.log(`Type: ${r.inAppPurchaseType??"-"}`),console.log(`State: ${r.state??"-"}`),console.log(`Reviewable: ${r.reviewNote??"(no review note)"}`),console.log(`Family Share: ${r.familySharable??!1}`)}async function f6(D){let u=await H("/v1/inAppPurchasesV2",{method:"POST",body:{data:{type:"inAppPurchasesV2",attributes:{name:D.name,productId:D.productId,inAppPurchaseType:D.type},relationships:{app:{data:{type:"apps",id:D.appId}}}}}});o(`Created IAP: ${u.data.data.id} (${D.productId})`)}async function i6(D){await H(`/v1/inAppPurchasesV2/${D}`,{method:"DELETE"}),o(`Deleted IAP ${D}`)}async function h6(D){let u=await M(`/v1/apps/${D.appId}/subscriptionGroups`,{params:{"fields[subscriptionGroups]":"referenceName,subscriptions"}});if(v(D.output)==="json"){w(u);return}W(["Group ID","Reference Name"],u.map((E)=>[E.id,E.attributes.referenceName??"-"]),`Subscription Groups (${u.length})`)}async function t6(D){let u=await H("/v1/subscriptionGroups",{method:"POST",body:{data:{type:"subscriptionGroups",attributes:{referenceName:D.referenceName},relationships:{app:{data:{type:"apps",id:D.appId}}}}}});o(`Created subscription group: ${u.data.data.id}`)}async function A6(D){let u=await M(`/v1/subscriptionGroups/${D.groupId}/subscriptions`,{params:{"fields[subscriptions]":"name,productId,subscriptionPeriod,state,familySharable"}});if(v(D.output)==="json"){w(u);return}W(["ID","Name","Product ID","Period","State"],u.map((E)=>[E.id,d(E.attributes.name??"-",30),E.attributes.productId??"-",E.attributes.subscriptionPeriod??"-",E.attributes.state??"-"]),`Subscriptions (${u.length})`)}async function c6(D,u={}){let F=await H(`/v1/subscriptions/${D}`);if(v(u.output)==="json"){w(F.data.data);return}let r=F.data.data.attributes;console.log(`ID: ${F.data.data.id}`),console.log(`Name: ${r.name??"-"}`),console.log(`Product ID: ${r.productId??"-"}`),console.log(`Period: ${r.subscriptionPeriod??"-"}`),console.log(`State: ${r.state??"-"}`),console.log(`Group Level: ${r.groupLevel??"-"}`),console.log(`Family Share: ${r.familySharable??!1}`),console.log(`All Territ.: ${r.availableInAllTerritories??!1}`)}async function b6(D){let u=await H("/v1/subscriptions",{method:"POST",body:{data:{type:"subscriptions",attributes:{name:D.name,productId:D.productId,subscriptionPeriod:D.period},relationships:{group:{data:{type:"subscriptionGroups",id:D.groupId}}}}}});o(`Created subscription: ${u.data.data.id} (${D.productId})`)}async function $6(D){let u={"fields[subscriptionPrices]":"startDate,territory",include:"subscriptionPricePoint"};if(D.territory)u["filter[territory]"]=D.territory;let F=await M(`/v1/subscriptions/${D.subId}/prices`,{params:u});if(v(D.output)==="json"){w(F);return}W(["Price ID","Territory","Start Date"],F.map((r)=>[r.id,String(r.attributes.territory??"-"),r.attributes.startDate??"ongoing"]),`Subscription Prices (${F.length})`)}async function e6(D,u={}){let F=await H(`/v1/apps/${D}/appInfos`,{params:{include:"primaryCategory,secondaryCategory","fields[appInfos]":"appStoreState,appStoreAgeRating,brazilAgeRating,kidsAgeBand"}});if(v(u.output)==="json"){w(F.data);return}for(let r of F.data.data){let B=r.attributes;console.log(`Info ID: ${r.id}`),console.log(`State: ${B.appStoreState??"-"}`),console.log(`Age Rating: ${B.appStoreAgeRating??"-"}`),console.log(`Brazil Rating: ${B.brazilAgeRating??"-"}`),console.log(`Kids Band: ${B.kidsAgeBand??"-"}`),console.log("")}}async function y6(D){let u={};if(D.primaryCategoryId)u.primaryCategory={data:{type:"appCategories",id:D.primaryCategoryId}};if(D.secondaryCategoryId)u.secondaryCategory={data:{type:"appCategories",id:D.secondaryCategoryId}};await H(`/v1/appInfos/${D.infoId}`,{method:"PATCH",body:{data:{type:"appInfos",id:D.infoId,relationships:u}}}),console.log(`App info ${D.infoId} updated`)}async function S6(D={}){let u={};if(D.platform)u["filter[platforms]"]=D.platform;let F=await M("/v1/appCategories",{params:u});if(v(D.output)==="json"){w(F);return}W(["Category ID","Platforms"],F.map((r)=>[r.id,(r.attributes.platforms??[]).join(", ")]),`App Categories (${F.length})`)}import{readFileSync as y7}from"fs";async function K6(D){let u=await M(`/v1/appStoreVersionLocalizations/${D.versionLocalizationId}/appScreenshotSets`,{params:{"fields[appScreenshotSets]":"screenshotDisplayType,appScreenshots"}});if(v(D.output)==="json"){w(u);return}W(["Set ID","Display Type"],u.map((E)=>[E.id,E.attributes.screenshotDisplayType??"-"]),`Screenshot Sets (${u.length})`)}async function v6(D){let u=await M(`/v1/appScreenshotSets/${D.setId}/appScreenshots`);if(v(D.output)==="json"){w(u);return}W(["ID","File Name","State"],u.map((E)=>[E.id,E.attributes.fileName??"-",E.attributes.assetDeliveryState?.state??"-"]),`Screenshots (${u.length})`)}async function w6(D){let u=y7(D.filePath),F=D.filePath.split("/").pop()??"screenshot.png",E=u.length,r=await H("/v1/appScreenshots",{method:"POST",body:{data:{type:"appScreenshots",attributes:{fileName:F,fileSize:E},relationships:{appScreenshotSet:{data:{type:"appScreenshotSets",id:D.setId}}}}}}),B=r.data.data.id,C=r.data.data.attributes.uploadOperations??[];for(let n of C){let f=u.subarray(n.offset,n.offset+n.length),i={"Content-Type":"image/png"};for(let t of n.requestHeaders??[])i[t.name]=t.value;await fetch(n.url,{method:n.method,headers:i,body:f})}await H(`/v1/appScreenshots/${B}`,{method:"PATCH",body:{data:{type:"appScreenshots",id:B,attributes:{uploaded:!0}}}}),o(`Screenshot uploaded: ${B}`)}async function H6(D){await H(`/v1/appScreenshots/${D}`,{method:"DELETE"}),o(`Screenshot ${D} deleted`)}async function a6(D){let u=await M(`/v1/appStoreVersionLocalizations/${D.versionLocalizationId}/appPreviewSets`);if(v(D.output)==="json"){w(u);return}W(["Set ID","Preview Type"],u.map((E)=>[E.id,E.attributes.previewType??"-"]),`Preview Sets (${u.length})`)}async function W6(D={}){let u={"fields[certificates]":"certificateType,displayName,expirationDate,serialNumber,platform"};if(D.type)u["filter[certificateType]"]=D.type;let F=await M("/v1/certificates",{params:u});if(v(D.output)==="json"){w(F);return}W(["ID","Name","Type","Expires","Serial"],F.map((r)=>[r.id,r.attributes.displayName??"-",r.attributes.certificateType??"-",s(r.attributes.expirationDate??""),r.attributes.serialNumber??"-"]),`Certificates (${F.length})`)}async function M6(D,u={}){let F=await H(`/v1/certificates/${D}`);if(v(u.output)==="json"){w(F.data.data);return}let r=F.data.data.attributes;console.log(`ID: ${F.data.data.id}`),console.log(`Name: ${r.displayName??"-"}`),console.log(`Type: ${r.certificateType??"-"}`),console.log(`Expires: ${s(r.expirationDate??"")}`),console.log(`Serial: ${r.serialNumber??"-"}`),console.log(`Platform: ${r.platform??"-"}`)}async function V6(D){await H(`/v1/certificates/${D}`,{method:"DELETE"}),o(`Certificate ${D} revoked`)}async function J6(D={}){let u={"fields[devices]":"name,deviceClass,model,udid,platform,status,addedDate"};if(D.platform)u["filter[platform]"]=D.platform;if(D.status)u["filter[status]"]=D.status;let F=await M("/v1/devices",{params:u});if(v(D.output)==="json"){w(F);return}W(["ID","Name","Model","Platform","Status","UDID"],F.map((r)=>[r.id,r.attributes.name??"-",r.attributes.model??r.attributes.deviceClass??"-",r.attributes.platform??"-",r.attributes.status??"-",r.attributes.udid??"-"]),`Devices (${F.length})`)}async function o6(D){let u=await H("/v1/devices",{method:"POST",body:{data:{type:"devices",attributes:{name:D.name,udid:D.udid,platform:D.platform}}}});o(`Device registered: ${u.data.data.id} (${D.udid})`)}async function q6(D={}){let u={"fields[bundleIds]":"name,identifier,platform,seedId"};if(D.platform)u["filter[platform]"]=D.platform;if(D.identifier)u["filter[identifier]"]=D.identifier;let F=await M("/v1/bundleIds",{params:u});if(v(D.output)==="json"){w(F);return}W(["ID","Name","Identifier","Platform","Seed ID"],F.map((r)=>[r.id,r.attributes.name??"-",r.attributes.identifier??"-",r.attributes.platform??"-",r.attributes.seedId??"-"]),`Bundle IDs (${F.length})`)}async function z6(D){let u=await H("/v1/bundleIds",{method:"POST",body:{data:{type:"bundleIds",attributes:{name:D.name,identifier:D.identifier,platform:D.platform}}}});o(`Bundle ID registered: ${u.data.data.id} (${D.identifier})`)}async function m6(D={}){let u={"fields[profiles]":"name,profileType,profileState,expirationDate,uuid"};if(D.type)u["filter[profileType]"]=D.type;if(D.name)u["filter[name]"]=D.name;let F=await M("/v1/profiles",{params:u});if(v(D.output)==="json"){w(F);return}W(["ID","Name","Type","State","Expires"],F.map((r)=>[r.id,r.attributes.name??"-",r.attributes.profileType??"-",r.attributes.profileState??"-",s(r.attributes.expirationDate??"")]),`Provisioning Profiles (${F.length})`)}async function Z6(D){await H(`/v1/profiles/${D}`,{method:"DELETE"}),o(`Profile ${D} deleted`)}async function N6(D){let u={"filter[vendorNumber]":D.vendorNumber,"filter[frequency]":D.frequency,"filter[reportDate]":D.reportDate,"filter[reportType]":D.reportType??"SALES","filter[reportSubType]":D.reportSubType??"SUMMARY"},F=(await Promise.resolve().then(() => (au(),z2))).getActiveProfile();if(!F)throw Error("No active profile. Run: asc auth login");let E=await(await Promise.resolve().then(() => (hu(),c0))).generateJWT(F),r=new URL("https://api.appstoreconnect.apple.com/v1/salesReports");for(let[f,i]of Object.entries(u))r.searchParams.set(f,i);let B=await fetch(r.toString(),{headers:{Authorization:`Bearer ${E}`,"Accept-Encoding":"gzip"}});if(!B.ok){let i=(await B.json()).errors?.[0]?.detail??`HTTP ${B.status}`;throw Error(i)}let C=await B.text();if(v(D.output)==="json"){let f=C.trim().split(`
139
+ `),i=(f[0]??"").split("\t"),t=f.slice(1).map((b)=>{let e=b.split("\t");return Object.fromEntries(i.map((h,A)=>[h,e[A]??""]))});console.log(JSON.stringify(t,null,2))}else process.stdout.write(C)}async function X6(D){let u=(await Promise.resolve().then(() => (au(),z2))).getActiveProfile();if(!u)throw Error("No active profile. Run: asc auth login");let F=await(await Promise.resolve().then(() => (hu(),c0))).generateJWT(u),E=new URL("https://api.appstoreconnect.apple.com/v1/financeReports");E.searchParams.set("filter[vendorNumber]",D.vendorNumber),E.searchParams.set("filter[regionCode]",D.regionCode),E.searchParams.set("filter[reportDate]",D.reportDate),E.searchParams.set("filter[reportType]","FINANCIAL");let r=await fetch(E.toString(),{headers:{Authorization:`Bearer ${F}`}});if(!r.ok){let C=(await r.json()).errors?.[0]?.detail??`HTTP ${r.status}`;throw Error(C)}process.stdout.write(await r.text())}async function Y6(D){let u=await M(`/v1/apps/${D.appId}/analyticsReportRequests`);if(v(D.output)==="json"){w(u);return}W(["Request ID","State"],u.map((E)=>[E.id,String(E.attributes.name??E.id)]),`Analytics Report Requests (${u.length})`)}async function Q6(D){let u=await H("/v1/analyticsReportRequests",{method:"POST",body:{data:{type:"analyticsReportRequests",attributes:{accessType:D.category},relationships:{app:{data:{type:"apps",id:D.appId}}}}}});console.log(`Analytics report request created: ${u.data.data.id}`),console.log("Check back later with: asc reports analytics-list --app-id <id>")}async function I6(D={}){let u=D.appId?`/v1/apps/${D.appId}/ciProduct`:"/v1/ciProducts",F=await M(u);if(v(D.output)==="json"){w(F);return}W(["Product ID","Name","Type","Created"],F.map((r)=>[r.id,r.attributes.name??"-",r.attributes.productType??"-",s(r.attributes.createdDate??"")]),`Xcode Cloud Products (${F.length})`)}async function T6(D){let u=await M(`/v1/ciProducts/${D.productId}/workflows`);if(v(D.output)==="json"){w(u);return}W(["Workflow ID","Name","Enabled","Last Modified"],u.map((E)=>[E.id,d(E.attributes.name??"-",40),String(E.attributes.isEnabled??"-"),s(E.attributes.lastModifiedDate??"")]),`Workflows (${u.length})`)}async function R6(D,u={}){let F=await H(`/v1/ciWorkflows/${D}`);if(v(u.output)==="json"){w(F.data.data);return}let r=F.data.data.attributes;console.log(`ID: ${F.data.data.id}`),console.log(`Name: ${r.name??"-"}`),console.log(`Description: ${r.description??"-"}`),console.log(`Enabled: ${r.isEnabled??"-"}`),console.log(`Last Modified: ${s(r.lastModifiedDate??"")}`)}async function _6(D={}){let u=D.workflowId?`/v1/ciWorkflows/${D.workflowId}/buildRuns`:D.productId?`/v1/ciProducts/${D.productId}/buildRuns`:"/v1/ciBuildRuns",F=await M(u);if(v(D.output)==="json"){w(F);return}W(["Build ID","#","Status","Progress","Started"],F.map((r)=>[r.id,String(r.attributes.number??"-"),r.attributes.completionStatus??"RUNNING",r.attributes.executionProgress??"-",s(r.attributes.startedDate??r.attributes.createdDate??"")]),`Xcode Cloud Builds (${F.length})`)}async function U6(D){let u={isPullRequestBuild:!1};if(D.branch)u.sourceCommit={branch:D.branch};let F=await H("/v1/ciBuildRuns",{method:"POST",body:{data:{type:"ciBuildRuns",attributes:u,relationships:{workflow:{data:{type:"ciWorkflows",id:D.workflowId}}}}}}),E=F.data.data.attributes.number;o(`Build run started: ${F.data.data.id}${E?` (#${E})`:""}`)}async function j6(D){let u=await M(`/v1/ciBuildRuns/${D.buildRunId}/artifacts`);if(v(D.output)==="json"){w(u);return}W(["ID","File Name","Type","Size"],u.map((E)=>[E.id,E.attributes.fileName??"-",E.attributes.assetType??"-",E.attributes.fileSize?`${Math.round(E.attributes.fileSize/1024)}KB`:"-"]),`Artifacts (${u.length})`)}async function G6(D){let u=await M(`/v1/ciBuildRuns/${D.buildRunId}/testResults`);if(v(D.output)==="json"){w(u);return}W(["ID","Test","Status","Duration (s)"],u.map((E)=>[E.id,d(`${E.attributes.className??""}.${E.attributes.name??""}`,50),E.attributes.status??"-",E.attributes.duration!=null?E.attributes.duration.toFixed(2):"-"]),`Test Results (${u.length})`)}async function k6(D){let u=await M(`/v1/apps/${D.appId}/gameCenterAchievements`,{params:{"fields[gameCenterAchievements]":"referenceName,points,showBeforeEarned,repeatable,archived"}});if(v(D.output)==="json"){w(u);return}W(["ID","Reference Name","Points","Repeatable"],u.map((E)=>[E.id,E.attributes.referenceName??"-",String(E.attributes.points??"-"),String(E.attributes.repeatable??"-")]),`Game Center Achievements (${u.length})`)}async function P6(D,u={}){let F=await H(`/v1/gameCenterAchievements/${D}`);if(v(u.output)==="json"){w(F.data.data);return}let r=F.data.data.attributes;console.log(`ID: ${F.data.data.id}`),console.log(`Reference Name: ${r.referenceName??"-"}`),console.log(`Points: ${r.points??"-"}`),console.log(`Repeatable: ${r.repeatable??!1}`),console.log(`Show Before Earn:${r.showBeforeEarned??!1}`),console.log(`Archived: ${r.archived??!1}`)}async function O6(D){let u=await M(`/v1/apps/${D.appId}/gameCenterLeaderboards`,{params:{"fields[gameCenterLeaderboards]":"referenceName,defaultFormatter,archived"}});if(v(D.output)==="json"){w(u);return}W(["ID","Reference Name","Archived"],u.map((E)=>[E.id,E.attributes.referenceName??"-",String(E.attributes.archived??!1)]),`Leaderboards (${u.length})`)}async function L6(D){let u=await M(`/v1/apps/${D.appId}/gameCenterLeaderboardSets`);if(v(D.output)==="json"){w(u);return}W(["ID","Reference Name","Archived"],u.map((E)=>[E.id,E.attributes.referenceName??"-",String(E.attributes.archived??!1)]),`Leaderboard Sets (${u.length})`)}async function p6(D){let F=(await H("/v1/betaAppReviewSubmissions",{method:"POST",body:{data:{type:"betaAppReviewSubmissions",relationships:{build:{data:{type:"builds",id:D}}}}}})).data.data.attributes.betaReviewState;o(`Beta review submitted for build ${D} (state: ${F??"WAITING_FOR_REVIEW"})`)}async function g6(D,u={}){let F=await M("/v1/betaAppReviewSubmissions",{params:{"filter[build]":D}});if(v(u.output)==="json"){w(F);return}if(F.length===0){console.log(`No beta review submission found for build ${D}`);return}for(let r of F)console.log(`Submission ID: ${r.id}`),console.log(`State: ${r.attributes.betaReviewState??"-"}`)}async function s6(D,u={}){let F=await H(`/v1/apps/${D}/betaAppReviewDetail`);if(v(u.output)==="json"){w(F.data.data);return}let r=F.data.data.attributes;if(console.log(`Review Detail ID: ${F.data.data.id}`),console.log(`Contact: ${r.contactFirstName??""} ${r.contactLastName??""}`),console.log(`Contact Email: ${r.contactEmail??"-"}`),console.log(`Contact Phone: ${r.contactPhone??"-"}`),console.log(`Demo Account: ${r.demoAccountRequired?"Required":"Not required"}`),r.demoAccountRequired)console.log(`Demo Username: ${r.demoAccountName??"-"}`);if(r.notes)console.log(`Notes: ${r.notes}`)}async function l6(D){let F=(await H(`/v1/apps/${D.appId}/betaAppReviewDetail`)).data.data.id,{appId:E,...r}=D;await H(`/v1/betaAppReviewDetails/${F}`,{method:"PATCH",body:{data:{type:"betaAppReviewDetails",id:F,attributes:r}}}),o(`Beta review details updated for app ${E}`)}async function d6(D){let F=(await H(`/v1/builds/${D.buildId}/buildBetaDetail`)).data.data.id;await H(`/v1/buildBetaDetails/${F}`,{method:"PATCH",body:{data:{type:"buildBetaDetails",id:F,attributes:{autoNotifyEnabled:D.autoNotifyEnabled}}}}),o(`Build beta detail updated for build ${D.buildId}`)}async function x6(D){let u=await M(`/v1/builds/${D.buildId}/betaBuildLocalizations`);if(v(D.output)==="json"){w(u);return}W(["ID","Locale","What's New"],u.map((E)=>[E.id,E.attributes.locale??"-",d(E.attributes.whatsNew??"-",60)]),`Beta Build Localizations (${u.length})`)}var S7=c({meta:{name:"login",description:["Add or update an authentication profile.","Stores API key credentials for use with all other commands.","Credentials are saved to ~/.asc/credentials.json with the private key","stored in macOS Keychain (or as a file path if --bypass-keychain is set).","","To create an API key: App Store Connect \u2192 Users \u2192 Keys \u2192 Generate API Key.","Download the .p8 file (you can only download it once).","","Examples:"," asc auth login --key-id ABC123 --issuer-id 12345678-... --private-key ~/Downloads/AuthKey_ABC123.p8"," asc auth login --name work --key-id ABC123 --issuer-id 12345678-... --private-key ~/keys/work.p8"].join(`
140
+ `)},args:{name:{type:"string",alias:"n",description:"Profile name to save as. Defaults to 'default'. Use --name to manage multiple accounts."},"key-id":{type:"string",alias:"k",description:"10-character API Key ID from App Store Connect \u2192 Users \u2192 Keys"},"issuer-id":{type:"string",alias:"i",description:"Issuer ID (UUID) from App Store Connect \u2192 Users \u2192 Keys"},"private-key":{type:"string",alias:"p",description:"Path to the downloaded .p8 private key file"},"bypass-keychain":{type:"boolean",description:"Skip macOS Keychain \u2014 store private key path in credentials.json instead"}},async run({args:D}){await z1({name:D.name,keyId:D["key-id"],issuerId:D["issuer-id"],privateKey:D["private-key"],bypassKeychain:D["bypass-keychain"]})}}),K7=c({meta:{name:"list",description:"List all saved authentication profiles. Shows profile names, key IDs, and which is active."},run(){m1()}}),v7=c({meta:{name:"use",description:"Switch the active authentication profile. All subsequent API calls will use this profile's credentials."},args:{name:{type:"positional",description:"Profile name to activate (see: asc auth list)",required:!1}},async run({args:D}){await Z1(D.name)}}),w7=c({meta:{name:"status",description:"Show the current active profile. Use --validate to test credentials by generating a JWT and making an API call."},args:{validate:{type:"boolean",description:"Generate a JWT token and validate it against the API"}},async run({args:D}){await N1({validate:D.validate})}}),H7=c({meta:{name:"logout",description:"Remove a profile from ~/.asc/credentials.json and delete its key from Keychain."},args:{name:{type:"string",alias:"n",description:"Profile name to remove. Omit to remove the active profile."}},async run({args:D}){await g2(D.name)}}),a7=c({meta:{name:"view",description:"Show all details for a profile (key ID, issuer ID, keychain status)."},args:{name:{type:"positional",description:"Profile name. Omit for the active profile. Use: asc auth list",required:!1}},run({args:D}){b0(D.name)}}),W7=c({meta:{name:"update",description:["Update fields on an existing profile without re-running the full login flow.","Only the flags you provide will be changed.","Omit the profile name to update the active profile."].join(`
141
+ `)},args:{name:{type:"positional",description:"Profile name to update. Omit for active profile.",required:!1},"key-id":{type:"string",description:"New API Key ID"},"issuer-id":{type:"string",description:"New Issuer ID (UUID)"},"private-key":{type:"string",description:"Path to new .p8 private key file"},"vendor-number":{type:"string",description:"Vendor number for sales/finance reports"},"bypass-keychain":{type:"boolean",description:"Store key path in file instead of Keychain"},rename:{type:"string",description:"Rename the profile to a new name"}},async run({args:D}){await X1(D.name,{keyId:D["key-id"],issuerId:D["issuer-id"],privateKey:D["private-key"],vendorNumber:D["vendor-number"],bypassKeychain:D["bypass-keychain"],renameTo:D.rename})}}),M7=c({meta:{name:"delete",description:"Remove a profile and delete its private key from Keychain."},args:{name:{type:"positional",description:"Profile name to delete. Use: asc auth list",required:!1}},async run({args:D}){await Y1(D.name)}}),V7=c({meta:{name:"profile",description:["Manage individual authentication profiles.","Use 'asc auth list' to see all profiles.","Use --profile <name> on any command to use a specific profile."].join(`
142
+ `)},subCommands:{view:a7,update:W7,delete:M7}}),J7=c({meta:{name:"auth",description:["Manage App Store Connect API authentication profiles.","Profiles store key ID, issuer ID, and private key path/content.","Multiple profiles allow switching between developer accounts.","Use 'asc auth login' to get started."].join(`
143
+ `)},subCommands:{login:S7,list:K7,use:v7,status:w7,logout:H7,profile:V7}}),o7=c({meta:{name:"list",description:["List all apps in your App Store Connect account.","Returns App IDs needed by most other commands.","Use --output json for programmatic access."].join(`
144
+ `)},args:{limit:{type:"string",description:"Maximum number of apps to return (default: all)"},output:{type:"string",alias:"o",description:"Output format: table (default in TTY) | json (default when piped)"}},async run({args:D}){await I1({limit:D.limit?Number(D.limit):void 0,output:D.output})}}),q7=c({meta:{name:"get",description:["Get detailed information about a specific app.","Use 'asc apps list' to find the App ID."].join(`
145
+ `)},args:{"app-id":{type:"positional",description:"App ID (numeric string, e.g. '1234567890'). Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await T1(D["app-id"],{output:D.output})}}),z7=c({meta:{name:"apps",description:"List and inspect apps in your account. App IDs are required by most other commands."},subCommands:{list:o7,get:q7}}),m7=c({meta:{name:"list",description:["List builds uploaded to App Store Connect.","Builds are created by uploading via Xcode, Instruments, or Transporter.","Use --app-id to filter by app. Build IDs are needed by testflight and beta-review commands."].join(`
146
+ `)},args:{"app-id":{type:"string",description:"Filter by App ID. Use: asc apps list"},version:{type:"string",description:"Filter by version string (e.g. '2.0.1')"},platform:{type:"string",description:"Filter by platform: IOS | MAC_OS | TV_OS | VISION_OS"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await R1({appId:D["app-id"],version:D.version,platform:D.platform,output:D.output})}}),Z7=c({meta:{name:"get",description:"Get full details for a specific build including processing state and expiry date."},args:{"build-id":{type:"positional",description:"Build ID (UUID). Use: asc builds list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await _1(D["build-id"],{output:D.output})}}),N7=c({meta:{name:"update-beta-notes",description:["Set or update the TestFlight 'What to Test' notes for a build.","These notes are shown to testers when they receive the build."].join(`
147
+ `)},args:{"build-id":{type:"string",description:"Build ID (UUID). Use: asc builds list",required:!0},locale:{type:"string",description:"Locale code, e.g. 'en-US', 'ja', 'fr-FR'",required:!0},notes:{type:"string",description:"What to test text (max 4000 characters)",required:!0}},async run({args:D}){await U1({buildId:D["build-id"],locale:D.locale,notes:D.notes})}}),X7=c({meta:{name:"builds",description:"Manage app builds. Builds are uploaded via Xcode or Transporter and used for TestFlight and App Store submission."},subCommands:{list:m7,get:Z7,"update-beta-notes":N7}}),Y7=c({meta:{name:"list",description:["List App Store versions for an app.","Each version has an ID used by metadata, screenshots, and submission commands.","States: PREPARE_FOR_SUBMISSION, WAITING_FOR_REVIEW, IN_REVIEW, READY_FOR_SALE, etc."].join(`
148
+ `)},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},platform:{type:"string",description:"Filter by platform: IOS | MAC_OS | TV_OS | VISION_OS"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await j1({appId:D["app-id"],platform:D.platform,output:D.output})}}),Q7=c({meta:{name:"create",description:["Create a new App Store version record.","This creates the version container for metadata, screenshots, and submission.","Increment the version string from the previous release."].join(`
149
+ `)},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},version:{type:"string",description:"Version string in MAJOR.MINOR.PATCH format, e.g. '2.1.0'",required:!0},platform:{type:"string",description:"Platform: IOS (default) | MAC_OS | TV_OS | VISION_OS",default:"IOS"}},async run({args:D}){await G1({appId:D["app-id"],version:D.version,platform:D.platform})}}),I7=c({meta:{name:"submit",description:["Submit an App Store version for App Review.","Prerequisites: metadata is complete, screenshots are uploaded, binary is attached.","Use 'asc versions list' to find the Version ID."].join(`
150
+ `)},args:{"version-id":{type:"positional",description:"Version ID (UUID). Use: asc versions list --app-id <id>",required:!0}},async run({args:D}){await k1(D["version-id"])}}),T7=c({meta:{name:"versions",description:"Manage App Store version records. Versions hold metadata, screenshots, and track review state."},subCommands:{list:Y7,create:Q7,submit:I7}}),R7=c({meta:{name:"list",description:"List all TestFlight beta groups. Groups control which testers get access to builds. Use Group IDs to manage testers."},args:{"app-id":{type:"string",description:"Filter by App ID. Use: asc apps list"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await P1({appId:D["app-id"],output:D.output})}}),_7=c({meta:{name:"groups",description:"Manage TestFlight beta groups (tester groups)"},subCommands:{list:R7}}),U7=c({meta:{name:"list",description:"List all testers in a TestFlight group."},args:{"group-id":{type:"string",description:"Beta Group ID. Use: asc testflight groups list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await O1({groupId:D["group-id"],output:D.output})}}),j7=c({meta:{name:"add",description:["Add a tester to a TestFlight group.","The tester will be invited via email and can install the app via TestFlight.","Provide email to create a new tester, or omit for a placeholder."].join(`
151
+ `)},args:{"group-id":{type:"string",description:"Beta Group ID. Use: asc testflight groups list",required:!0},email:{type:"string",description:"Tester email address"},"first-name":{type:"string",description:"Tester first name"},"last-name":{type:"string",description:"Tester last name"}},async run({args:D}){await L1({groupId:D["group-id"],email:D.email,firstName:D["first-name"],lastName:D["last-name"]})}}),G7=c({meta:{name:"remove",description:"Remove a tester from a TestFlight group. The tester will lose access to the build."},args:{"group-id":{type:"string",description:"Beta Group ID. Use: asc testflight groups list",required:!0},"tester-id":{type:"string",description:"Tester ID (UUID). Use: asc testflight testers list --group-id <id>",required:!0}},async run({args:D}){await p1({groupId:D["group-id"],testerId:D["tester-id"]})}}),k7=c({meta:{name:"testers",description:"Add, remove, and list TestFlight testers within a group"},subCommands:{list:U7,add:j7,remove:G7}}),P7=c({meta:{name:"testflight",description:["Manage TestFlight beta testing.","Workflow: asc testflight groups list \u2192 asc testflight testers add \u2192 distribute build to group."].join(`
152
+ `)},subCommands:{groups:_7,testers:k7}}),O7=c({meta:{name:"list",description:"List all localizations for an App Store version. Shows locale, description, keywords, and promotional text."},args:{"version-id":{type:"string",description:"Version ID (UUID). Use: asc versions list --app-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await g1({versionId:D["version-id"],output:D.output})}}),L7=c({meta:{name:"update",description:["Update App Store metadata for a specific locale.","Provide one or more text fields to update.","Locale format: 'en-US', 'ja', 'fr-FR', 'de-DE', 'zh-Hans', etc.","","Example: asc metadata update --version-id <id> --locale en-US --whats-new 'Bug fixes'"].join(`
153
+ `)},args:{"version-id":{type:"string",description:"Version ID (UUID). Use: asc versions list --app-id <id>",required:!0},locale:{type:"string",description:"Locale code, e.g. 'en-US', 'ja', 'fr-FR'",required:!0},"whats-new":{type:"string",description:"What's new in this version (shown in App Store update notes)"},description:{type:"string",description:"Full app description text"},keywords:{type:"string",description:"Search keywords, comma-separated (max 100 chars total)"},"promotional-text":{type:"string",description:"Promotional text shown above the description (can be changed without a new submission)"}},async run({args:D}){await s1({versionId:D["version-id"],locale:D.locale,whatsNew:D["whats-new"],description:D.description,keywords:D.keywords,promotionalText:D["promotional-text"]})}}),p7=c({meta:{name:"metadata",description:"Manage App Store listing text: descriptions, keywords, what's new, promotional text. Supports all locales."},subCommands:{list:O7,update:L7}}),g7=c({meta:{name:"list",description:"List customer reviews from the App Store. Returns rating, title, body, and territory."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await l1({appId:D["app-id"],output:D.output})}}),s7=c({meta:{name:"get",description:"Get a specific customer review by ID."},args:{"review-id":{type:"positional",description:"Review ID. Use: asc reviews list --app-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await d1(D["review-id"],{output:D.output})}}),l7=c({meta:{name:"respond",description:["Post a developer response to a customer review.","Responses are public and visible in the App Store.","You can only respond once per review."].join(`
154
+ `)},args:{"review-id":{type:"string",description:"Review ID. Use: asc reviews list --app-id <id>",required:!0},message:{type:"string",description:"Response text (public, visible in App Store)",required:!0}},async run({args:D}){await x1({reviewId:D["review-id"],message:D.message})}}),d7=c({meta:{name:"reviews",description:"Read and respond to App Store customer reviews."},subCommands:{list:g7,get:s7,respond:l7}}),x7=c({meta:{name:"get",description:"Get the price schedule for an app including base territory and manual price overrides."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await D6(D["app-id"],{output:D.output})}}),D4=c({meta:{name:"set",description:["Set the price for an app using a price point ID and base territory.","Use 'asc pricing points list --app-id <id>' to find available price points.","Base territory sets the reference currency (e.g. 'USA' for USD)."].join(`
155
+ `)},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},"base-territory":{type:"string",description:"Base territory code, e.g. 'USA', 'GBR', 'EUR'. Use: asc pricing territories list",required:!0},"price-point-id":{type:"string",description:"Price point ID. Use: asc pricing points list --app-id <id>",required:!0}},async run({args:D}){await u6({appId:D["app-id"],baseTerritory:D["base-territory"],pricePointId:D["price-point-id"]})}}),u4=c({meta:{name:"list",description:["List available price points for an app.","Price points represent standard App Store price tiers.","Use --territory to filter for a specific storefront currency."].join(`
156
+ `)},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},territory:{type:"string",description:"Filter by territory code, e.g. 'USA', 'GBR'"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await F6({appId:D["app-id"],territory:D.territory,output:D.output})}}),F4=c({meta:{name:"list",description:"List all App Store territories (storefronts) with their currency codes."},args:{output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await E6({output:D.output})}}),E4=c({meta:{name:"pricing",description:["Manage app pricing: schedules, price points, and territory availability.","Workflow: asc pricing territories list \u2192 asc pricing points list --app-id <id> \u2192 asc pricing set"].join(`
157
+ `)},subCommands:{get:x7,set:D4,points:c({meta:{name:"points",description:"Manage price points"},subCommands:{list:u4}}),territories:c({meta:{name:"territories",description:"List App Store territories"},subCommands:{list:F4}})}}),C4=c({meta:{name:"get",description:"Get the territory availability settings for an app, including which storefronts it is available in."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await C6(D["app-id"],{output:D.output})}}),r4=c({meta:{name:"set",description:["Set which App Store territories the app is available in.","Provide a comma-separated list of territory codes.","Territory codes: USA, GBR, AUS, CAN, JPN, DEU, FRA, CHN, etc.","Use: asc pricing territories list to see all codes."].join(`
158
+ `)},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},territories:{type:"string",description:"Comma-separated territory codes, e.g. 'USA,GBR,AUS,CAN'",required:!0},"new-territories":{type:"boolean",description:"Allow distribution in newly added App Store territories automatically",default:!0}},async run({args:D}){let u=D.territories.split(",").map((F)=>F.trim()).filter(Boolean);await r6({appId:D["app-id"],territories:u,availableInNewTerritories:D["new-territories"]})}}),B4=c({meta:{name:"availability",description:"Manage which App Store territories an app is available in."},subCommands:{get:C4,set:r4}}),n4=c({meta:{name:"list",description:"List in-app purchases for an app. Types: CONSUMABLE, NON_CONSUMABLE, NON_RENEWING_SUBSCRIPTION."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await B6({appId:D["app-id"],output:D.output})}}),f4=c({meta:{name:"get",description:"Get details for a specific in-app purchase by its ID."},args:{"iap-id":{type:"positional",description:"IAP ID. Use: asc iap list --app-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await n6(D["iap-id"],{output:D.output})}}),i4=c({meta:{name:"create",description:["Create a new in-app purchase product.","Types: CONSUMABLE | NON_CONSUMABLE | NON_RENEWING_SUBSCRIPTION","The product ID must be unique within your app (e.g. 'com.yourapp.coins100')."].join(`
159
+ `)},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},name:{type:"string",description:"Display name for the IAP (internal reference name)",required:!0},"product-id":{type:"string",description:"Unique product ID string, e.g. 'com.yourapp.premium'",required:!0},type:{type:"string",description:"IAP type: CONSUMABLE | NON_CONSUMABLE | NON_RENEWING_SUBSCRIPTION",required:!0}},async run({args:D}){await f6({appId:D["app-id"],name:D.name,productId:D["product-id"],type:D.type})}}),h4=c({meta:{name:"delete",description:"Delete a draft in-app purchase. Cannot delete approved or submitted IAPs."},args:{"iap-id":{type:"positional",description:"IAP ID. Use: asc iap list --app-id <id>",required:!0}},async run({args:D}){await i6(D["iap-id"])}}),t4=c({meta:{name:"iap",description:["Manage in-app purchases (consumables, non-consumables, non-renewing subscriptions).","For auto-renewable subscriptions, use: asc subscriptions"].join(`
160
+ `)},subCommands:{list:n4,get:f4,create:i4,delete:h4}}),A4=c({meta:{name:"list",description:"List subscription groups for an app. Groups organize related subscription tiers."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await h6({appId:D["app-id"],output:D.output})}}),c4=c({meta:{name:"create",description:"Create a new subscription group. Groups hold related subscription tiers."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},"reference-name":{type:"string",description:"Internal reference name for this group (not shown to users)",required:!0}},async run({args:D}){await t6({appId:D["app-id"],referenceName:D["reference-name"]})}}),b4=c({meta:{name:"groups",description:"Manage subscription groups"},subCommands:{list:A4,create:c4}}),$4=c({meta:{name:"list",description:"List auto-renewable subscriptions in a subscription group."},args:{"group-id":{type:"string",description:"Subscription Group ID. Use: asc subscriptions groups list --app-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await A6({groupId:D["group-id"],output:D.output})}}),e4=c({meta:{name:"get",description:"Get details for a specific auto-renewable subscription."},args:{"sub-id":{type:"positional",description:"Subscription ID. Use: asc subscriptions list --group-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await c6(D["sub-id"],{output:D.output})}}),y4=c({meta:{name:"create",description:["Create a new auto-renewable subscription product.","Periods: ONE_WEEK | ONE_MONTH | TWO_MONTHS | THREE_MONTHS | SIX_MONTHS | ONE_YEAR"].join(`
161
+ `)},args:{"group-id":{type:"string",description:"Subscription Group ID. Use: asc subscriptions groups list --app-id <id>",required:!0},name:{type:"string",description:"Internal reference name (not user-facing)",required:!0},"product-id":{type:"string",description:"Unique product ID, e.g. 'com.yourapp.premium.monthly'",required:!0},period:{type:"string",description:"Billing period: ONE_WEEK | ONE_MONTH | TWO_MONTHS | THREE_MONTHS | SIX_MONTHS | ONE_YEAR",required:!0}},async run({args:D}){await b6({groupId:D["group-id"],name:D.name,productId:D["product-id"],period:D.period})}}),S4=c({meta:{name:"prices",description:"List price schedule for a subscription across territories."},args:{"sub-id":{type:"string",description:"Subscription ID. Use: asc subscriptions list --group-id <id>",required:!0},territory:{type:"string",description:"Filter by territory code, e.g. 'USA'"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await $6({subId:D["sub-id"],territory:D.territory,output:D.output})}}),K4=c({meta:{name:"subscriptions",description:["Manage auto-renewable subscription products.","Workflow: asc subscriptions groups list \u2192 asc subscriptions list \u2192 asc subscriptions create"].join(`
162
+ `)},subCommands:{groups:b4,list:$4,get:e4,create:y4,prices:S4}}),v4=c({meta:{name:"get",description:"Get app info records showing age rating, content rating, and category for an app."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await e6(D["app-id"],{output:D.output})}}),w4=c({meta:{name:"update",description:["Update the primary or secondary category for an app info record.","Use 'asc app-info categories' to see available category IDs.","Info ID comes from: asc app-info get --app-id <id>"].join(`
163
+ `)},args:{"info-id":{type:"string",description:"App Info ID. Use: asc app-info get --app-id <id>",required:!0},"primary-category":{type:"string",description:"Primary category ID, e.g. 'GAMES', 'PRODUCTIVITY'. Use: asc app-info categories list"},"secondary-category":{type:"string",description:"Secondary category ID (optional)"}},async run({args:D}){await y6({infoId:D["info-id"],primaryCategoryId:D["primary-category"],secondaryCategoryId:D["secondary-category"]})}}),H4=c({meta:{name:"list",description:"List all App Store categories. Use these IDs with 'asc app-info update'."},args:{platform:{type:"string",description:"Filter by platform: IOS | MAC_OS | TV_OS"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await S6({platform:D.platform,output:D.output})}}),a4=c({meta:{name:"app-info",description:"Manage app info: categories, age ratings, content declarations."},subCommands:{get:v4,update:w4,categories:c({meta:{name:"categories",description:"App category management"},subCommands:{list:H4}})}}),W4=c({meta:{name:"list",description:["List screenshot sets for a version localization.","Each set holds screenshots for a specific device display type.","Localization IDs come from: asc metadata list --version-id <id>"].join(`
164
+ `)},args:{"localization-id":{type:"string",description:"Version Localization ID. Use: asc metadata list --version-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await K6({versionLocalizationId:D["localization-id"],output:D.output})}}),M4=c({meta:{name:"list",description:"List screenshots in a screenshot set. Shows file names, sizes, and upload state."},args:{"set-id":{type:"string",description:"Screenshot Set ID. Use: asc screenshots sets list --localization-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await v6({setId:D["set-id"],output:D.output})}}),V4=c({meta:{name:"upload",description:["Upload a screenshot image file to a screenshot set.","Supported formats: PNG, JPEG.","Screenshot sets correspond to device types (e.g. 6.5-inch iPhone display)."].join(`
165
+ `)},args:{"set-id":{type:"string",description:"Screenshot Set ID. Use: asc screenshots sets list --localization-id <id>",required:!0},file:{type:"string",description:"Path to the screenshot image file (PNG or JPEG)",required:!0}},async run({args:D}){await w6({setId:D["set-id"],filePath:D.file})}}),J4=c({meta:{name:"delete",description:"Delete a screenshot from a screenshot set."},args:{"screenshot-id":{type:"positional",description:"Screenshot ID. Use: asc screenshots list --set-id <id>",required:!0}},async run({args:D}){await H6(D["screenshot-id"])}}),o4=c({meta:{name:"list",description:"List app preview sets for a version localization."},args:{"localization-id":{type:"string",description:"Version Localization ID. Use: asc metadata list --version-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await a6({versionLocalizationId:D["localization-id"],output:D.output})}}),q4=c({meta:{name:"screenshots",description:"Manage App Store screenshots and app previews. Workflow: list sets \u2192 list screenshots \u2192 upload/delete."},subCommands:{sets:c({meta:{name:"sets",description:"Screenshot set management"},subCommands:{list:W4}}),list:M4,upload:V4,delete:J4,previews:c({meta:{name:"previews",description:"App preview sets"},subCommands:{list:o4}})}}),z4=c({meta:{name:"list",description:["List certificates in your account.","Types: IOS_DEVELOPMENT | IOS_DISTRIBUTION | MAC_APP_DISTRIBUTION | MAC_INSTALLER_DISTRIBUTION"," DEVELOPER_ID_APPLICATION | DEVELOPER_ID_INSTALLER"].join(`
166
+ `)},args:{type:{type:"string",description:"Filter by certificate type, e.g. 'IOS_DISTRIBUTION'"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await W6({type:D.type,output:D.output})}}),m4=c({meta:{name:"get",description:"Get certificate details by ID."},args:{"cert-id":{type:"positional",description:"Certificate ID. Use: asc signing certs list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await M6(D["cert-id"],{output:D.output})}}),Z4=c({meta:{name:"revoke",description:"Revoke a certificate. This will invalidate any provisioning profiles using this certificate."},args:{"cert-id":{type:"positional",description:"Certificate ID. Use: asc signing certs list",required:!0}},async run({args:D}){await V6(D["cert-id"])}}),N4=c({meta:{name:"certs",description:"Manage signing certificates"},subCommands:{list:z4,get:m4,revoke:Z4}}),X4=c({meta:{name:"list",description:"List registered test devices. Only enabled devices can be included in development/ad-hoc provisioning profiles."},args:{platform:{type:"string",description:"Filter by platform: IOS | MAC_OS | TV_OS"},status:{type:"string",description:"Filter by status: ENABLED | DISABLED"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await J6({platform:D.platform,status:D.status,output:D.output})}}),Y4=c({meta:{name:"register",description:["Register a new device for development/testing.","The UDID can be found in Xcode \u2192 Devices & Simulators, or in System Information.","Platforms: IOS | MAC_OS | TV_OS | WATCH_OS | VISION_OS"].join(`
167
+ `)},args:{name:{type:"string",description:"Display name for the device",required:!0},udid:{type:"string",description:"Device UDID (40 hex characters for iOS, 12+2+12 for Mac)",required:!0},platform:{type:"string",description:"Platform: IOS | MAC_OS | TV_OS | WATCH_OS | VISION_OS",required:!0}},async run({args:D}){await o6({name:D.name,udid:D.udid,platform:D.platform})}}),Q4=c({meta:{name:"devices",description:"Register and list test devices for development profiles"},subCommands:{list:X4,register:Y4}}),I4=c({meta:{name:"list",description:"List registered bundle IDs (App IDs) in your account."},args:{platform:{type:"string",description:"Filter by platform: IOS | MAC_OS | UNIVERSAL"},identifier:{type:"string",description:"Filter by bundle identifier string, e.g. 'com.yourapp'"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await q6({platform:D.platform,identifier:D.identifier,output:D.output})}}),T4=c({meta:{name:"register",description:"Register a new bundle ID (App ID). Required before creating provisioning profiles."},args:{name:{type:"string",description:"Display name for this bundle ID",required:!0},identifier:{type:"string",description:"Bundle identifier string, e.g. 'com.yourcompany.yourapp'",required:!0},platform:{type:"string",description:"Platform: IOS | MAC_OS | UNIVERSAL",required:!0}},async run({args:D}){await z6({name:D.name,identifier:D.identifier,platform:D.platform})}}),R4=c({meta:{name:"bundle-ids",description:"Register and list bundle IDs (App IDs)"},subCommands:{list:I4,register:T4}}),_4=c({meta:{name:"list",description:["List provisioning profiles in your account.","Types: IOS_APP_DEVELOPMENT | IOS_APP_STORE | IOS_APP_ADHOC | IOS_APP_INHOUSE"," MAC_APP_DEVELOPMENT | MAC_APP_STORE | MAC_APP_DIRECT | TVOS_APP_DEVELOPMENT"].join(`
168
+ `)},args:{type:{type:"string",description:"Filter by profile type, e.g. 'IOS_APP_STORE'"},name:{type:"string",description:"Filter by profile name (partial match)"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await m6({type:D.type,name:D.name,output:D.output})}}),U4=c({meta:{name:"delete",description:"Delete a provisioning profile."},args:{"profile-id":{type:"positional",description:"Profile ID. Use: asc signing profiles list",required:!0}},async run({args:D}){await Z6(D["profile-id"])}}),j4=c({meta:{name:"profiles",description:"List and delete provisioning profiles"},subCommands:{list:_4,delete:U4}}),G4=c({meta:{name:"signing",description:["Manage code signing resources: certificates, devices, bundle IDs, and provisioning profiles.","Workflow: bundle-ids register \u2192 devices register \u2192 certs list \u2192 profiles list"].join(`
169
+ `)},subCommands:{certs:N4,devices:Q4,"bundle-ids":R4,profiles:j4}}),k4=c({meta:{name:"sales",description:["Download a sales and trends report in TSV format (gzip decompressed).","By default outputs raw TSV. Use --output json to get structured JSON.","","Frequencies: DAILY | WEEKLY | MONTHLY | YEARLY","Report types: SALES | SUBSCRIPTION | SUBSCRIPTION_EVENT | SUBSCRIBER | PRE_ORDER","Report date format: YYYY-MM-DD for DAILY, YYYY-MM for MONTHLY, YYYY for YEARLY","","Example: asc reports sales --vendor-number 12345678 --frequency MONTHLY --date 2024-01"].join(`
170
+ `)},args:{"vendor-number":{type:"string",description:"Vendor number from App Store Connect \u2192 Payments & Financial Reports",required:!0},frequency:{type:"string",description:"Report frequency: DAILY | WEEKLY | MONTHLY | YEARLY",required:!0},date:{type:"string",description:"Report date. DAILY: YYYY-MM-DD, MONTHLY: YYYY-MM, YEARLY: YYYY",required:!0},"report-type":{type:"string",description:"Report type: SALES (default) | SUBSCRIPTION | SUBSCRIPTION_EVENT | SUBSCRIBER | PRE_ORDER"},"report-subtype":{type:"string",description:"Report subtype: SUMMARY (default) | DETAILED"},output:{type:"string",alias:"o",description:"Output format: tsv (default) | json"}},async run({args:D}){await N6({vendorNumber:D["vendor-number"],frequency:D.frequency,reportDate:D.date,reportType:D["report-type"],reportSubType:D["report-subtype"],output:D.output})}}),P4=c({meta:{name:"finance",description:["Download a financial report for a given region and month.","Region codes: US, EU, WW, JP, etc.","Report date format: YYYY-MM","","Example: asc reports finance --vendor-number 12345678 --region US --date 2024-01"].join(`
171
+ `)},args:{"vendor-number":{type:"string",description:"Vendor number from App Store Connect \u2192 Payments & Financial Reports",required:!0},region:{type:"string",description:"Region code: US | EU | WW | JP | CN | AU | CA | GB | etc.",required:!0},date:{type:"string",description:"Report month in YYYY-MM format",required:!0},output:{type:"string",alias:"o",description:"Output format: tsv (default) | json"}},async run({args:D}){await X6({vendorNumber:D["vendor-number"],regionCode:D.region,reportDate:D.date,output:D.output})}}),O4=c({meta:{name:"list",description:"List analytics report requests for an app."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await Y6({appId:D["app-id"],output:D.output})}}),L4=c({meta:{name:"request",description:["Request an analytics report for an app.","Access types: ONE_TIME_SNAPSHOT | ONGOING","Reports are generated asynchronously. Check status with: asc reports analytics list"].join(`
172
+ `)},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},category:{type:"string",description:"Access type: ONE_TIME_SNAPSHOT | ONGOING",default:"ONE_TIME_SNAPSHOT"}},async run({args:D}){await Q6({appId:D["app-id"],category:D.category})}}),p4=c({meta:{name:"reports",description:["Download sales, finance, and analytics reports.","Sales/finance reports output TSV (piped) or JSON (--output json).","Vendor number is found at App Store Connect \u2192 Payments & Financial Reports."].join(`
173
+ `)},subCommands:{sales:k4,finance:P4,analytics:c({meta:{name:"analytics",description:"Analytics report requests"},subCommands:{list:O4,request:L4}})}}),g4=c({meta:{name:"list",description:"List Xcode Cloud products. Each product is linked to one app."},args:{"app-id":{type:"string",description:"Filter by App ID. Use: asc apps list"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await I6({appId:D["app-id"],output:D.output})}}),s4=c({meta:{name:"list",description:"List Xcode Cloud workflows for a product."},args:{"product-id":{type:"string",description:"Xcode Cloud Product ID. Use: asc xcode-cloud products list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await T6({productId:D["product-id"],output:D.output})}}),l4=c({meta:{name:"get",description:"Get details for a specific Xcode Cloud workflow."},args:{"workflow-id":{type:"positional",description:"Workflow ID. Use: asc xcode-cloud workflows list --product-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await R6(D["workflow-id"],{output:D.output})}}),d4=c({meta:{name:"list",description:"List Xcode Cloud build runs. Filter by workflow or product."},args:{"workflow-id":{type:"string",description:"Filter by Workflow ID. Use: asc xcode-cloud workflows list --product-id <id>"},"product-id":{type:"string",description:"Filter by Xcode Cloud Product ID"},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await _6({workflowId:D["workflow-id"],productId:D["product-id"],output:D.output})}}),x4=c({meta:{name:"run",description:["Trigger a new Xcode Cloud build run for a workflow.","Optionally specify a branch to build. Defaults to the workflow's configured start condition."].join(`
174
+ `)},args:{"workflow-id":{type:"string",description:"Workflow ID. Use: asc xcode-cloud workflows list --product-id <id>",required:!0},branch:{type:"string",description:"Git branch to build (optional, uses workflow default if omitted)"}},async run({args:D}){await U6({workflowId:D["workflow-id"],branch:D.branch})}}),D5=c({meta:{name:"list",description:"List artifacts (logs, archives, test results) from an Xcode Cloud build run."},args:{"build-id":{type:"string",description:"Build Run ID. Use: asc xcode-cloud builds list --workflow-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await j6({buildRunId:D["build-id"],output:D.output})}}),u5=c({meta:{name:"list",description:"List test results from an Xcode Cloud build run."},args:{"build-id":{type:"string",description:"Build Run ID. Use: asc xcode-cloud builds list --workflow-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await G6({buildRunId:D["build-id"],output:D.output})}}),F5=c({meta:{name:"xcode-cloud",description:["Manage Xcode Cloud CI/CD workflows and build runs.","Workflow: products list \u2192 workflows list \u2192 builds run \u2192 artifacts list"].join(`
175
+ `)},subCommands:{products:c({meta:{name:"products",description:"Xcode Cloud products"},subCommands:{list:g4}}),workflows:c({meta:{name:"workflows",description:"Xcode Cloud workflows"},subCommands:{list:s4,get:l4}}),builds:c({meta:{name:"builds",description:"Xcode Cloud build runs"},subCommands:{list:d4,run:x4}}),artifacts:c({meta:{name:"artifacts",description:"Build artifacts"},subCommands:{list:D5}}),"test-results":c({meta:{name:"test-results",description:"Test results"},subCommands:{list:u5}})}}),E5=c({meta:{name:"list",description:"List Game Center achievements for an app."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await k6({appId:D["app-id"],output:D.output})}}),C5=c({meta:{name:"get",description:"Get details for a specific Game Center achievement."},args:{"achievement-id":{type:"positional",description:"Achievement ID. Use: asc game-center achievements list --app-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await P6(D["achievement-id"],{output:D.output})}}),r5=c({meta:{name:"list",description:"List Game Center leaderboards for an app."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await O6({appId:D["app-id"],output:D.output})}}),B5=c({meta:{name:"list",description:"List Game Center leaderboard sets for an app."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await L6({appId:D["app-id"],output:D.output})}}),n5=c({meta:{name:"game-center",description:"Manage Game Center features: achievements, leaderboards, and leaderboard sets."},subCommands:{achievements:c({meta:{name:"achievements",description:"Game Center achievements"},subCommands:{list:E5,get:C5}}),leaderboards:c({meta:{name:"leaderboards",description:"Game Center leaderboards"},subCommands:{list:r5}}),"leaderboard-sets":c({meta:{name:"leaderboard-sets",description:"Game Center leaderboard sets"},subCommands:{list:B5}})}}),f5=c({meta:{name:"submit",description:["Submit a build for TestFlight external beta review.","Required before distributing to external testers (outside your org).","Internal testers do not require beta review.","Build ID comes from: asc builds list --app-id <id>"].join(`
176
+ `)},args:{"build-id":{type:"positional",description:"Build ID (UUID). Use: asc builds list --app-id <id>",required:!0}},async run({args:D}){await p6(D["build-id"])}}),i5=c({meta:{name:"status",description:"Check the beta review status for a build."},args:{"build-id":{type:"string",description:"Build ID (UUID). Use: asc builds list --app-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await g6(D["build-id"],{output:D.output})}}),h5=c({meta:{name:"get",description:"Get the beta app review details including contact information and demo account credentials."},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await s6(D["app-id"],{output:D.output})}}),t5=c({meta:{name:"update",description:["Update the beta app review details including reviewer contact and demo account.","This information is provided to the Apple review team when reviewing your TestFlight build."].join(`
177
+ `)},args:{"app-id":{type:"string",description:"App ID. Use: asc apps list",required:!0},"contact-first-name":{type:"string",description:"Review contact first name"},"contact-last-name":{type:"string",description:"Review contact last name"},"contact-email":{type:"string",description:"Review contact email address"},"contact-phone":{type:"string",description:"Review contact phone number"},"demo-account-name":{type:"string",description:"Demo account username (if demo account required)"},"demo-account-password":{type:"string",description:"Demo account password"},"demo-account-required":{type:"boolean",description:"Whether a demo account is required for review"},notes:{type:"string",description:"Additional notes for the review team"}},async run({args:D}){await l6({appId:D["app-id"],contactFirstName:D["contact-first-name"],contactLastName:D["contact-last-name"],contactEmail:D["contact-email"],contactPhone:D["contact-phone"],demoAccountName:D["demo-account-name"],demoAccountPassword:D["demo-account-password"],demoAccountRequired:D["demo-account-required"],notes:D.notes})}}),A5=c({meta:{name:"notify",description:"Enable or disable automatic tester notifications when a build is approved for testing."},args:{"build-id":{type:"string",description:"Build ID (UUID). Use: asc builds list --app-id <id>",required:!0},enabled:{type:"boolean",description:"Set to true to auto-notify testers, false to suppress notifications",default:!0}},async run({args:D}){await d6({buildId:D["build-id"],autoNotifyEnabled:D.enabled})}}),c5=c({meta:{name:"list",description:"List TestFlight 'What to Test' localizations for a build."},args:{"build-id":{type:"string",description:"Build ID (UUID). Use: asc builds list --app-id <id>",required:!0},output:{type:"string",alias:"o",description:"Output format: table | json"}},async run({args:D}){await x6({buildId:D["build-id"],output:D.output})}}),b5=c({meta:{name:"beta-review",description:["Manage TestFlight external beta review submissions and review details.","External testers require beta app review before accessing builds.","Internal testers (App Store Connect users) do not require review."].join(`
178
+ `)},subCommands:{submit:f5,status:i5,"detail-get":h5,"detail-update":t5,notify:A5,localizations:c({meta:{name:"localizations",description:"Build beta localizations"},subCommands:{list:c5}})}}),$5=c({meta:{name:"asc",version:C8.version,description:["App Store Connect CLI \u2014 manage apps, builds, TestFlight, metadata and more.","","QUICK START:"," 1. asc auth login \u2192 add your API key credentials"," 2. asc apps list \u2192 find your App ID"," 3. asc builds list \u2192 see recent builds","","All commands output tables in TTY mode and JSON when piped.","Use --output json to force JSON output for programmatic use.","","GLOBAL FLAGS:"," --profile <name> Use a specific profile for this command (e.g. --profile personal)"," Equivalent to setting ASC_PROFILE=<name>"," See all profiles: asc auth list",""," ASC_KEY_ID App Store Connect API Key ID"," ASC_ISSUER_ID Issuer ID (UUID)"," ASC_PRIVATE_KEY_PATH Path to .p8 private key file"," ASC_BYPASS_KEYCHAIN Set to '1' to skip Keychain storage","","REGENERATE API CLIENT (when Apple updates their API):"," bun run generate","","AI AGENTS:"," asc --help --json Full command tree as structured JSON (pipe to jq or save to file)"].join(`
179
+ `)},subCommands:{auth:J7,apps:z7,builds:X7,versions:T7,testflight:P7,metadata:p7,reviews:d7,pricing:E4,availability:B4,iap:t4,subscriptions:K4,"app-info":a4,screenshots:q4,signing:G4,reports:p4,"xcode-cloud":F5,"game-center":n5,"beta-review":b5}});if(process.argv.includes("--help")&&process.argv.includes("--json"))console.log(JSON.stringify(E8(),null,2)),process.exit(0);var s2=process.argv.indexOf("--profile");if(s2!==-1){let D=process.argv[s2+1];if(D&&!D.startsWith("-"))process.env.ASC_PROFILE=D,process.argv.splice(s2,2)}{let D=(await Promise.resolve().then(() => (Q0(),jF))).consola,u=null,F=D.error.bind(D);D.error=(E,...r)=>{if(E instanceof Error)fD(E),u=E.message;else if(typeof E==="string"&&E===u)u=null;else F(E)}}OF($5).catch((D)=>{fD(D),process.exit(1)});