@vee-stack/delta-cli 2.0.7 → 2.0.9

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 (109) hide show
  1. package/dist/adapters/analysis.adapter.js +42 -0
  2. package/dist/analyzer/commands/analyze.js +74 -114
  3. package/dist/auth/device-auth.js +261 -0
  4. package/dist/auth/secure-auth.js +45 -16
  5. package/dist/commands/analyze.js +30 -27
  6. package/dist/commands/auth.js +13 -16
  7. package/dist/commands/status.js +2 -2
  8. package/dist/commands/whoami.js +6 -6
  9. package/dist/components/Dashboard.js +3 -5
  10. package/dist/components/DeltaApp.js +1 -1
  11. package/dist/components/UnifiedManager.js +48 -20
  12. package/dist/core/completion.js +14 -3
  13. package/dist/core/engine.js +10 -4
  14. package/dist/core/exit-codes.js +12 -4
  15. package/dist/core/wizard.js +1 -1
  16. package/dist/index.js +21 -5
  17. package/dist/providers/remote-provider.js +2 -2
  18. package/dist/telemetry/wrapper.js +114 -0
  19. package/dist/ui.js +9 -2
  20. package/dist/welcome.js +14 -4
  21. package/package.json +3 -1
  22. package/dist/apps/cli/src/analyzer/commands/analyze.js +0 -256
  23. package/dist/apps/cli/src/analyzer/commands/config.js +0 -83
  24. package/dist/apps/cli/src/analyzer/commands/report.js +0 -38
  25. package/dist/apps/cli/src/analyzer/generators/report.generator.js +0 -123
  26. package/dist/apps/cli/src/analyzer/index.js +0 -44
  27. package/dist/apps/cli/src/analyzer/scanners/project.scanner.js +0 -92
  28. package/dist/apps/cli/src/analyzer/validators/contracts.validator.js +0 -42
  29. package/dist/apps/cli/src/analyzer/validators/maintainability.validator.js +0 -40
  30. package/dist/apps/cli/src/analyzer/validators/observability.validator.js +0 -39
  31. package/dist/apps/cli/src/analyzer/validators/performance.validator.js +0 -42
  32. package/dist/apps/cli/src/analyzer/validators/security.validator.js +0 -66
  33. package/dist/apps/cli/src/analyzer/validators/soc.validator.js +0 -75
  34. package/dist/apps/cli/src/auth/secure-auth.js +0 -312
  35. package/dist/apps/cli/src/commands/analyze.js +0 -286
  36. package/dist/apps/cli/src/commands/auth-new.js +0 -37
  37. package/dist/apps/cli/src/commands/auth.js +0 -122
  38. package/dist/apps/cli/src/commands/config.js +0 -49
  39. package/dist/apps/cli/src/commands/deploy.js +0 -6
  40. package/dist/apps/cli/src/commands/init.js +0 -47
  41. package/dist/apps/cli/src/commands/logout.js +0 -23
  42. package/dist/apps/cli/src/commands/plugins.js +0 -21
  43. package/dist/apps/cli/src/commands/status.js +0 -80
  44. package/dist/apps/cli/src/commands/sync.js +0 -6
  45. package/dist/apps/cli/src/commands/whoami.js +0 -115
  46. package/dist/apps/cli/src/components/Dashboard.js +0 -168
  47. package/dist/apps/cli/src/components/DeltaApp.js +0 -56
  48. package/dist/apps/cli/src/components/UnifiedManager.js +0 -324
  49. package/dist/apps/cli/src/core/audit.js +0 -184
  50. package/dist/apps/cli/src/core/completion.js +0 -294
  51. package/dist/apps/cli/src/core/contracts.js +0 -6
  52. package/dist/apps/cli/src/core/engine.js +0 -124
  53. package/dist/apps/cli/src/core/exit-codes.js +0 -71
  54. package/dist/apps/cli/src/core/hooks.js +0 -181
  55. package/dist/apps/cli/src/core/index.js +0 -7
  56. package/dist/apps/cli/src/core/policy.js +0 -115
  57. package/dist/apps/cli/src/core/profiles.js +0 -161
  58. package/dist/apps/cli/src/core/wizard.js +0 -203
  59. package/dist/apps/cli/src/index.js +0 -636
  60. package/dist/apps/cli/src/interactive/index.js +0 -11
  61. package/dist/apps/cli/src/plugins/GitStatusPlugin.js +0 -99
  62. package/dist/apps/cli/src/providers/ai-provider.js +0 -74
  63. package/dist/apps/cli/src/providers/local-provider.js +0 -302
  64. package/dist/apps/cli/src/providers/remote-provider.js +0 -100
  65. package/dist/apps/cli/src/types/api.js +0 -3
  66. package/dist/apps/cli/src/ui.js +0 -219
  67. package/dist/apps/cli/src/welcome.js +0 -81
  68. package/dist/bundle.js +0 -504
  69. package/dist/packages/domain/src/constitution/contracts/index.js +0 -43
  70. package/dist/packages/domain/src/constitution/contracts/ts.rules.js +0 -268
  71. package/dist/packages/domain/src/constitution/index.js +0 -139
  72. package/dist/packages/domain/src/constitution/maintainability/index.js +0 -43
  73. package/dist/packages/domain/src/constitution/maintainability/ts.rules.js +0 -344
  74. package/dist/packages/domain/src/constitution/observability/index.js +0 -43
  75. package/dist/packages/domain/src/constitution/observability/ts.rules.js +0 -307
  76. package/dist/packages/domain/src/constitution/performance/index.js +0 -43
  77. package/dist/packages/domain/src/constitution/performance/ts.rules.js +0 -325
  78. package/dist/packages/domain/src/constitution/security/index.js +0 -50
  79. package/dist/packages/domain/src/constitution/security/ts.rules.js +0 -267
  80. package/dist/packages/domain/src/constitution/soc/index.js +0 -43
  81. package/dist/packages/domain/src/constitution/soc/ts.rules.js +0 -360
  82. package/dist/packages/domain/src/contracts/analysis.contract.js +0 -18
  83. package/dist/packages/domain/src/contracts/index.js +0 -7
  84. package/dist/packages/domain/src/contracts/projects.contract.js +0 -18
  85. package/dist/packages/domain/src/control/registry/rules.registry.js +0 -29
  86. package/dist/packages/domain/src/control/schemas/policies.js +0 -6
  87. package/dist/packages/domain/src/core/analysis/discovery.js +0 -163
  88. package/dist/packages/domain/src/core/analysis/engine.contract.js +0 -298
  89. package/dist/packages/domain/src/core/analysis/engine.js +0 -77
  90. package/dist/packages/domain/src/core/analysis/index.js +0 -14
  91. package/dist/packages/domain/src/core/analysis/orchestrator.js +0 -242
  92. package/dist/packages/domain/src/core/comparison/engine.js +0 -29
  93. package/dist/packages/domain/src/core/comparison/index.js +0 -5
  94. package/dist/packages/domain/src/core/documentation/index.js +0 -5
  95. package/dist/packages/domain/src/core/documentation/pipeline.js +0 -41
  96. package/dist/packages/domain/src/core/fs/adapter.js +0 -111
  97. package/dist/packages/domain/src/core/fs/index.js +0 -5
  98. package/dist/packages/domain/src/core/parser/unified-parser.js +0 -166
  99. package/dist/packages/domain/src/index.js +0 -33
  100. package/dist/packages/domain/src/plugin/registry.js +0 -195
  101. package/dist/packages/domain/src/plugin/types.js +0 -6
  102. package/dist/packages/domain/src/ports/analysis.engine.js +0 -7
  103. package/dist/packages/domain/src/ports/audit.logger.js +0 -7
  104. package/dist/packages/domain/src/ports/project.repository.js +0 -7
  105. package/dist/packages/domain/src/rules/index.js +0 -134
  106. package/dist/packages/domain/src/types/analysis.js +0 -6
  107. package/dist/packages/domain/src/types/errors.js +0 -53
  108. package/dist/packages/domain/src/types/fs.js +0 -6
  109. package/dist/packages/domain/src/types/index.js +0 -7
package/dist/bundle.js DELETED
@@ -1,504 +0,0 @@
1
- #!/usr/bin/env node
2
- var Xv=Object.create;var wl=Object.defineProperty;var Jv=Object.getOwnPropertyDescriptor;var Qv=Object.getOwnPropertyNames;var Zv=Object.getPrototypeOf,eA=Object.prototype.hasOwnProperty;var fe=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var te=(t,e)=>()=>(t&&(e=t(t=0)),e);var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hi=(t,e)=>{for(var r in e)wl(t,r,{get:e[r],enumerable:!0})},tA=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qv(e))!eA.call(t,i)&&i!==r&&wl(t,i,{get:()=>e[i],enumerable:!(n=Jv(e,i))||n.enumerable});return t};var We=(t,e,r)=>(r=t!=null?Xv(Zv(t)):{},tA(e||!t||!t.__esModule?wl(r,"default",{value:t,enumerable:!0}):r,t));var os=S(Cl=>{var qo=class extends Error{constructor(e,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},Fl=class extends qo{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Cl.CommanderError=qo;Cl.InvalidArgumentError=Fl});var jo=S(Sl=>{var{InvalidArgumentError:rA}=os(),_l=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new rA(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function nA(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Sl.Argument=_l;Sl.humanReadableArgName=nA});var Al=S(om=>{var{humanReadableArgName:iA}=jo(),vl=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,s)=>i.name().localeCompare(s.name())),r}compareOptions(e,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?r.push(n):n.long&&!s?r.push(e.createOption(n.long,n.description)):n.short&&!i&&r.push(e.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(n=>iA(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,r.subcommandTerm(i).length),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,r.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,r.optionTerm(i).length),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,r.argumentTerm(i).length),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth||80,s=2,a=2;function l(D,_){if(_){let A=`${D.padEnd(n+a)}${_}`;return r.wrap(A,i-s,n+a)}return D}function f(D){return D.join(`
3
- `).replace(/^/gm," ".repeat(s))}let c=[`Usage: ${r.commandUsage(e)}`,""],h=r.commandDescription(e);h.length>0&&(c=c.concat([r.wrap(h,i,0),""]));let p=r.visibleArguments(e).map(D=>l(r.argumentTerm(D),r.argumentDescription(D)));p.length>0&&(c=c.concat(["Arguments:",f(p),""]));let y=r.visibleOptions(e).map(D=>l(r.optionTerm(D),r.optionDescription(D)));if(y.length>0&&(c=c.concat(["Options:",f(y),""])),this.showGlobalOptions){let D=r.visibleGlobalOptions(e).map(_=>l(r.optionTerm(_),r.optionDescription(_)));D.length>0&&(c=c.concat(["Global Options:",f(D),""]))}let m=r.visibleCommands(e).map(D=>l(r.subcommandTerm(D),r.subcommandDescription(D)));return m.length>0&&(c=c.concat(["Commands:",f(m),""])),c.join(`
4
- `)}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}wrap(e,r,n,i=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",a=new RegExp(`[\\n][${s}]+`);if(e.match(a))return e;let l=r-n;if(l<i)return e;let f=e.slice(0,n),c=e.slice(n).replace(`\r
5
- `,`
6
- `),h=" ".repeat(n),y="\\s\u200B",m=new RegExp(`
7
- |.{1,${l-1}}([${y}]|$)|[^${y}]+?([${y}]|$)`,"g"),D=c.match(m)||[];return f+D.map((_,A)=>_===`
8
- `?"":(A>0?h:"")+_.trimEnd()).join(`
9
- `)}};om.Help=vl});var Tl=S(Ol=>{var{InvalidArgumentError:sA}=os(),xl=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=aA(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new sA(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return oA(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Rl=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return r.negate===(s===e)}};function oA(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function aA(t){let e,r,n=t.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),r=n.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}Ol.Option=xl;Ol.DualOptions=Rl});var um=S(am=>{function uA(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let s=1;t[i-1]===e[n-1]?s=0:s=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+s),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function lA(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(a=>a.slice(2)));let n=[],i=3,s=.4;return e.forEach(a=>{if(a.length<=1)return;let l=uA(t,a),f=Math.max(t.length,a.length);(f-l)/f>s&&(l<i?(i=l,n=[a]):l===i&&n.push(a))}),n.sort((a,l)=>a.localeCompare(l)),r&&(n=n.map(a=>`--${a}`)),n.length>1?`
10
- (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
11
- (Did you mean ${n[0]}?)`:""}am.suggestSimilar=lA});var dm=S(hm=>{var cA=fe("node:events").EventEmitter,Bl=fe("node:child_process"),_r=fe("node:path"),Pl=fe("node:fs"),Le=fe("node:process"),{Argument:fA,humanReadableArgName:hA}=jo(),{CommanderError:Il}=os(),{Help:dA}=Al(),{Option:lm,DualOptions:pA}=Tl(),{suggestSimilar:cm}=um(),$l=class t extends cA{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:r=>Le.stdout.write(r),writeErr:r=>Le.stderr.write(r),getOutHelpWidth:()=>Le.stdout.isTTY?Le.stdout.columns:void 0,getErrHelpWidth:()=>Le.stderr.isTTY?Le.stderr.columns:void 0,outputError:(r,n)=>n(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,n){let i=r,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,a,l]=e.match(/([^ ]+) *(.*)/),f=this.createCommand(a);return i&&(f.description(i),f._executableHandler=!0),s.isDefault&&(this._defaultCommandName=f._name),f._hidden=!!(s.noHelp||s.hidden),f._executableFile=s.executableFile||null,l&&f.arguments(l),this._registerCommand(f),f.parent=this,f.copyInheritedSettings(this),i?this:f}createCommand(e){return new t(e)}createHelp(){return Object.assign(new dA,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
12
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new fA(e,r)}argument(e,r,n,i){let s=this.createArgument(e,r);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,i]=e.match(/([^ ]+) *(.*)/),s=r??"display help for command",a=this.createCommand(n);return a.helpOption(!1),i&&a.arguments(i),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
13
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new Il(e,r,n)),Le.exit(e)}action(e){let r=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=r,this}createOption(e,r){return new lm(e,r)}_callParseArg(e,r,n,i){try{return e.parseArg(r,n)}catch(s){if(s.code==="commander.invalidArgument"){let a=`${i} ${s.message}`;this.error(a,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
14
- - already used by option '${r.flags}'`)}this.options.push(e)}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),n=r(e).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),s=r(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let r=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(s,a,l)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let f=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,f,a):s!==null&&e.variadic&&(s=e._concatValue(s,f)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,l)};return this.on("option:"+r,s=>{let a=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,a,"cli")}),e.envVar&&this.on("optionEnv:"+r,s=>{let a=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,a,"env")}),this}_optionEx(e,r,n,i,s){if(typeof r=="object"&&r instanceof lm)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(r,n);if(a.makeOptionMandatory(!!e.mandatory),typeof i=="function")a.default(s).argParser(i);else if(i instanceof RegExp){let l=i;i=(f,c)=>{let h=l.exec(f);return h?h[0]:c},a.default(s).argParser(i)}else a.default(i);return this.addOption(a)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,n){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(r=n.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){Le.versions?.electron&&(r.from="electron");let i=Le.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=Le.argv),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":Le.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){let n=this._prepareUserArgs(e,r);return await this._parseCommand([],n),this}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(h,p){let y=_r.resolve(h,p);if(Pl.existsSync(y))return y;if(i.includes(_r.extname(p)))return;let m=i.find(D=>Pl.existsSync(`${y}${D}`));if(m)return`${y}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let h;try{h=Pl.realpathSync(this._scriptPath)}catch{h=this._scriptPath}l=_r.resolve(_r.dirname(h),l)}if(l){let h=s(l,a);if(!h&&!e._executableFile&&this._scriptPath){let p=_r.basename(this._scriptPath,_r.extname(this._scriptPath));p!==this._name&&(h=s(l,`${p}-${e._name}`))}a=h||a}n=i.includes(_r.extname(a));let f;Le.platform!=="win32"?n?(r.unshift(a),r=fm(Le.execArgv).concat(r),f=Bl.spawn(Le.argv[0],r,{stdio:"inherit"})):f=Bl.spawn(a,r,{stdio:"inherit"}):(r.unshift(a),r=fm(Le.execArgv).concat(r),f=Bl.spawn(Le.execPath,r,{stdio:"inherit"})),f.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{Le.on(p,()=>{f.killed===!1&&f.exitCode===null&&f.kill(p)})});let c=this._exitCallback;f.on("close",h=>{h=h??1,c?c(new Il(h,"commander.executeSubCommandAsync","(close)")):Le.exit(h)}),f.on("error",h=>{if(h.code==="ENOENT"){let p=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",y=`'${a}' does not exist
15
- - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
16
- - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
17
- - ${p}`;throw new Error(y)}else if(h.code==="EACCES")throw new Error(`'${a}' not executable`);if(!c)Le.exit(1);else{let p=new Il(1,"commander.executeSubCommandAsync","(error)");p.nestedError=h,c(p)}}),this.runningCommand=f}_dispatchSubcommand(e,r,n){let i=this._findCommand(e);i||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(n));else return i._parseCommand(r,n)}),s}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let a=i;if(i!==null&&n.parseArg){let l=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;a=this._callParseArg(n,i,s,l)}return a};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((a,l)=>e(n,l,a),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),r[i]=s}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(a=>{i.push({hookedCommand:s,callback:a})})}),r==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,r,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,r))}),i}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(s,e,r)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],n=[],i=r,s=e.slice();function a(f){return f.length>1&&f[0]==="-"}let l=null;for(;s.length;){let f=s.shift();if(f==="--"){i===n&&i.push(f),i.push(...s);break}if(l&&!a(f)){this.emit(`option:${l.name()}`,f);continue}if(l=null,a(f)){let c=this._findOption(f);if(c){if(c.required){let h=s.shift();h===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,h)}else if(c.optional){let h=null;s.length>0&&!a(s[0])&&(h=s.shift()),this.emit(`option:${c.name()}`,h)}else this.emit(`option:${c.name()}`);l=c.variadic?c:null;continue}}if(f.length>2&&f[0]==="-"&&f[1]!=="-"){let c=this._findOption(`-${f[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,f.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${f.slice(2)}`));continue}}if(/^--[^=]+=/.test(f)){let c=f.indexOf("="),h=this._findOption(f.slice(0,c));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,f.slice(c+1));continue}}if(a(f)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(f)){r.push(f),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&f===this._getHelpCommand().name()){r.push(f),s.length>0&&r.push(...s);break}else if(this._defaultCommandName){n.push(f),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(f),s.length>0&&i.push(...s);break}i.push(f)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;n<r;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
18
- `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
19
- `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
20
- `),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Le.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Le.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new pA(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=a=>{let l=a.attributeName(),f=this.getOptionValue(l),c=this.options.find(p=>p.negate&&l===p.attributeName()),h=this.options.find(p=>!p.negate&&l===p.attributeName());return c&&(c.presetArg===void 0&&f===!1||c.presetArg!==void 0&&f===c.presetArg)?c:h||a},i=a=>{let l=n(a),f=l.attributeName();return this.getOptionValueSource(f)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},s=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let a=s.createHelp().visibleOptions(s).filter(l=>l.long).map(l=>l.long);i=i.concat(a),s=s.parent}while(s&&!s._enablePositionalOptions);r=cm(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),r=cm(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
21
- `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>hA(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=_r.basename(e,_r.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},n;return r.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),r.write=e.write||n,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",n))}helpOption(e,r){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(e,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let r=Le.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
22
- Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let a;typeof r=="function"?a=r({error:s.error,command:s.command}):a=r,a&&s.write(`${a}
23
- `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function fm(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],n=s[3],i=s[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}hm.Command=$l});var Dm=S(Rt=>{var{Argument:pm}=jo(),{Command:kl}=dm(),{CommanderError:mA,InvalidArgumentError:mm}=os(),{Help:gA}=Al(),{Option:gm}=Tl();Rt.program=new kl;Rt.createCommand=t=>new kl(t);Rt.createOption=(t,e)=>new gm(t,e);Rt.createArgument=(t,e)=>new pm(t,e);Rt.Command=kl;Rt.Option=gm;Rt.Argument=pm;Rt.Help=gA;Rt.CommanderError=mA;Rt.InvalidArgumentError=mm;Rt.InvalidOptionArgumentError=mm});var wm=S((U$,Em)=>{"use strict";Em.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Ll=S((H$,Cm)=>{var as=wm(),Fm={};for(let t of Object.keys(as))Fm[as[t]]=t;var Q={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Cm.exports=Q;for(let t of Object.keys(Q)){if(!("channels"in Q[t]))throw new Error("missing channels property: "+t);if(!("labels"in Q[t]))throw new Error("missing channel labels property: "+t);if(Q[t].labels.length!==Q[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=Q[t];delete Q[t].channels,delete Q[t].labels,Object.defineProperty(Q[t],"channels",{value:e}),Object.defineProperty(Q[t],"labels",{value:r})}Q.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),a=s-i,l,f;s===i?l=0:e===s?l=(r-n)/a:r===s?l=2+(n-e)/a:n===s&&(l=4+(e-r)/a),l=Math.min(l*60,360),l<0&&(l+=360);let c=(i+s)/2;return s===i?f=0:c<=.5?f=a/(s+i):f=a/(2-s-i),[l,f*100,c*100]};Q.rgb.hsv=function(t){let e,r,n,i,s,a=t[0]/255,l=t[1]/255,f=t[2]/255,c=Math.max(a,l,f),h=c-Math.min(a,l,f),p=function(y){return(c-y)/6/h+1/2};return h===0?(i=0,s=0):(s=h/c,e=p(a),r=p(l),n=p(f),a===c?i=n-r:l===c?i=1/3+e-n:f===c&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,c*100]};Q.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=Q.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};Q.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),s=(1-e-i)/(1-i)||0,a=(1-r-i)/(1-i)||0,l=(1-n-i)/(1-i)||0;return[s*100,a*100,l*100,i*100]};function DA(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}Q.rgb.keyword=function(t){let e=Fm[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(as)){let s=as[i],a=DA(t,s);a<r&&(r=a,n=i)}return n};Q.keyword.rgb=function(t){return as[t]};Q.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let i=e*.4124+r*.3576+n*.1805,s=e*.2126+r*.7152+n*.0722,a=e*.0193+r*.1192+n*.9505;return[i*100,s*100,a*100]};Q.rgb.lab=function(t){let e=Q.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let s=116*n-16,a=500*(r-n),l=200*(n-i);return[s,a,l]};Q.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,a;if(r===0)return a=n*255,[a,a,a];n<.5?i=n*(1+r):i=n+r-n*r;let l=2*n-i,f=[0,0,0];for(let c=0;c<3;c++)s=e+1/3*-(c-1),s<0&&s++,s>1&&s--,6*s<1?a=l+(i-l)*6*s:2*s<1?a=i:3*s<2?a=l+(i-l)*(2/3-s)*6:a=l,f[c]=a*255;return f};Q.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let a=(n+r)/2,l=n===0?2*i/(s+i):2*r/(n+r);return[e,l*100,a*100]};Q.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),a=255*n*(1-r),l=255*n*(1-r*s),f=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,f,a];case 1:return[l,n,a];case 2:return[a,n,f];case 3:return[a,l,n];case 4:return[f,a,n];case 5:return[n,a,l]}};Q.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,a;a=(2-r)*n;let l=(2-r)*i;return s=r*i,s/=l<=1?l:2-l,s=s||0,a/=2,[e,s*100,a*100]};Q.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s;i>1&&(r/=i,n/=i);let a=Math.floor(6*e),l=1-n;s=6*e-a,(a&1)!==0&&(s=1-s);let f=r+s*(l-r),c,h,p;switch(a){default:case 6:case 0:c=l,h=f,p=r;break;case 1:c=f,h=l,p=r;break;case 2:c=r,h=l,p=f;break;case 3:c=r,h=f,p=l;break;case 4:c=f,h=r,p=l;break;case 5:c=l,h=r,p=f;break}return[c*255,h*255,p*255]};Q.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),a=1-Math.min(1,r*(1-i)+i),l=1-Math.min(1,n*(1-i)+i);return[s*255,a*255,l*255]};Q.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,a;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,a=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[i*255,s*255,a*255]};Q.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let i=116*r-16,s=500*(e-r),a=200*(r-n);return[i,s,a]};Q.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,s,a;s=(e+16)/116,i=r/500+s,a=s-n/200;let l=s**3,f=i**3,c=a**3;return s=l>.008856?l:(s-16/116)/7.787,i=f>.008856?f:(i-16/116)/7.787,a=c>.008856?c:(a-16/116)/7.787,i*=95.047,s*=100,a*=108.883,[i,s,a]};Q.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let a=Math.sqrt(r*r+n*n);return[e,a,i]};Q.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),a=r*Math.sin(i);return[e,s,a]};Q.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?Q.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(a+=60),a};Q.hsv.ansi16=function(t){return Q.rgb.ansi16(Q.hsv.rgb(t),t[2])};Q.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};Q.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[n,i,s]};Q.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};Q.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};Q.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(l=>l+l).join(""));let n=parseInt(r,16),i=n>>16&255,s=n>>8&255,a=n&255;return[i,s,a]};Q.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),s=Math.min(Math.min(e,r),n),a=i-s,l,f;return a<1?l=s/(1-a):l=0,a<=0?f=0:i===e?f=(r-n)/a%6:i===r?f=2+(n-e)/a:f=4+(e-r)/a,f/=6,f%=1,[f*360,a*100,l*100]};Q.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};Q.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};Q.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],s=e%1*6,a=s%1,l=1-a,f=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=l,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=l,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=l}return f=(1-r)*n,[(r*i[0]+f)*255,(r*i[1]+f)*255,(r*i[2]+f)*255]};Q.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};Q.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};Q.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};Q.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};Q.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};Q.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};Q.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};Q.gray.hsl=function(t){return[0,0,t[0]]};Q.gray.hsv=Q.gray.hsl;Q.gray.hwb=function(t){return[0,100,t[0]]};Q.gray.cmyk=function(t){return[0,0,0,t[0]]};Q.gray.lab=function(t){return[t[0],0,0]};Q.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n};Q.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Sm=S((z$,_m)=>{var Wo=Ll();function yA(){let t={},e=Object.keys(Wo);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function bA(t){let e=yA(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(Wo[n]);for(let s=i.length,a=0;a<s;a++){let l=i[a],f=e[l];f.distance===-1&&(f.distance=e[n].distance+1,f.parent=n,r.unshift(l))}}return e}function EA(t,e){return function(r){return e(t(r))}}function wA(t,e){let r=[e[t].parent,t],n=Wo[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=EA(Wo[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}_m.exports=function(t){let e=bA(t),r={},n=Object.keys(e);for(let i=n.length,s=0;s<i;s++){let a=n[s];e[a].parent!==null&&(r[a]=wA(a,e))}return r}});var Am=S((G$,vm)=>{var Ml=Ll(),FA=Sm(),di={},CA=Object.keys(Ml);function _A(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function SA(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let s=i.length,a=0;a<s;a++)i[a]=Math.round(i[a]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}CA.forEach(t=>{di[t]={},Object.defineProperty(di[t],"channels",{value:Ml[t].channels}),Object.defineProperty(di[t],"labels",{value:Ml[t].labels});let e=FA(t);Object.keys(e).forEach(n=>{let i=e[n];di[t][n]=SA(i),di[t][n].raw=_A(i)})});vm.exports=di});var Pm=S((V$,Bm)=>{"use strict";var xm=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,Rm=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Om=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},Uo=t=>t,Tm=(t,e,r)=>[t,e,r],pi=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let n=r();return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},Nl,mi=(t,e,r,n)=>{Nl===void 0&&(Nl=Am());let i=n?10:0,s={};for(let[a,l]of Object.entries(Nl)){let f=a==="ansi16"?"ansi":a;a===e?s[f]=t(r,i):typeof l=="object"&&(s[f]=t(l[e],i))}return s};function vA(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,n]of Object.entries(e)){for(let[i,s]of Object.entries(n))e[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[i]=e[i],t.set(s[0],s[1]);Object.defineProperty(e,r,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",pi(e.color,"ansi",()=>mi(xm,"ansi16",Uo,!1)),pi(e.color,"ansi256",()=>mi(Rm,"ansi256",Uo,!1)),pi(e.color,"ansi16m",()=>mi(Om,"rgb",Tm,!1)),pi(e.bgColor,"ansi",()=>mi(xm,"ansi16",Uo,!0)),pi(e.bgColor,"ansi256",()=>mi(Rm,"ansi256",Uo,!0)),pi(e.bgColor,"ansi16m",()=>mi(Om,"rgb",Tm,!0)),e}Object.defineProperty(Bm,"exports",{enumerable:!0,get:vA})});var $m=S((Y$,Im)=>{"use strict";Im.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Mm=S((K$,Lm)=>{"use strict";var AA=fe("os"),km=fe("tty"),Ot=$m(),{env:Ge}=process,Yr;Ot("no-color")||Ot("no-colors")||Ot("color=false")||Ot("color=never")?Yr=0:(Ot("color")||Ot("colors")||Ot("color=true")||Ot("color=always"))&&(Yr=1);"FORCE_COLOR"in Ge&&(Ge.FORCE_COLOR==="true"?Yr=1:Ge.FORCE_COLOR==="false"?Yr=0:Yr=Ge.FORCE_COLOR.length===0?1:Math.min(parseInt(Ge.FORCE_COLOR,10),3));function ql(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function jl(t,e){if(Yr===0)return 0;if(Ot("color=16m")||Ot("color=full")||Ot("color=truecolor"))return 3;if(Ot("color=256"))return 2;if(t&&!e&&Yr===void 0)return 0;let r=Yr||0;if(Ge.TERM==="dumb")return r;if(process.platform==="win32"){let n=AA.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Ge)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Ge)||Ge.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Ge)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ge.TEAMCITY_VERSION)?1:0;if(Ge.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ge){let n=parseInt((Ge.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ge.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ge.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ge.TERM)||"COLORTERM"in Ge?1:r}function xA(t){let e=jl(t,t&&t.isTTY);return ql(e)}Lm.exports={supportsColor:xA,stdout:ql(jl(!0,km.isatty(1))),stderr:ql(jl(!0,km.isatty(2)))}});var qm=S((X$,Nm)=>{"use strict";var RA=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,a="";do a+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return a+=t.substr(s),a},OA=(t,e,r,n)=>{let i=0,s="";do{let a=t[n-1]==="\r";s+=t.substr(i,(a?n-1:n)-i)+e+(a?`\r
24
- `:`
25
- `)+r,i=n+1,n=t.indexOf(`
26
- `,i)}while(n!==-1);return s+=t.substr(i),s};Nm.exports={stringReplaceAll:RA,stringEncaseCRLFWithFirstIndex:OA}});var zm=S((J$,Hm)=>{"use strict";var TA=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,jm=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,BA=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,PA=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,IA=new Map([["n",`
27
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Um(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):IA.get(t)||t}function $A(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n){let a=Number(s);if(!Number.isNaN(a))r.push(a);else if(i=s.match(BA))r.push(i[2].replace(PA,(l,f,c)=>f?Um(f):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`)}return r}function kA(t){jm.lastIndex=0;let e=[],r;for(;(r=jm.exec(t))!==null;){let n=r[1];if(r[2]){let i=$A(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Wm(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.slice(1);let n=t;for(let[i,s]of Object.entries(r))if(Array.isArray(s)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=s.length>0?n[i](...s):n[i]}return n}Hm.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(TA,(s,a,l,f,c,h)=>{if(a)i.push(Um(a));else if(f){let p=i.join("");i=[],n.push(r.length===0?p:Wm(t,r)(p)),r.push({inverse:l,styles:kA(f)})}else if(c){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Wm(t,r)(i.join(""))),i=[],r.pop()}else i.push(h)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var Qm=S((Q$,Jm)=>{"use strict";var us=Pm(),{stdout:Ul,stderr:Hl}=Mm(),{stringReplaceAll:LA,stringEncaseCRLFWithFirstIndex:MA}=qm(),{isArray:Ho}=Array,Vm=["ansi","ansi","ansi256","ansi16m"],gi=Object.create(null),NA=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Ul?Ul.level:0;t.level=e.level===void 0?r:e.level},zl=class{constructor(e){return Ym(e)}},Ym=t=>{let e={};return NA(e,t),e.template=(...r)=>Xm(e.template,...r),Object.setPrototypeOf(e,zo.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=zl,e.template};function zo(t){return Ym(t)}for(let[t,e]of Object.entries(us))gi[t]={get(){let r=Go(this,Gl(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};gi.visible={get(){let t=Go(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Km=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of Km)gi[t]={get(){let{level:e}=this;return function(...r){let n=Gl(us.color[Vm[e]][t](...r),us.color.close,this._styler);return Go(this,n,this._isEmpty)}}};for(let t of Km){let e="bg"+t[0].toUpperCase()+t.slice(1);gi[e]={get(){let{level:r}=this;return function(...n){let i=Gl(us.bgColor[Vm[r]][t](...n),us.bgColor.close,this._styler);return Go(this,i,this._isEmpty)}}}}var qA=Object.defineProperties(()=>{},{...gi,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Gl=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Go=(t,e,r)=>{let n=(...i)=>Ho(i[0])&&Ho(i[0].raw)?Gm(n,Xm(n,...i)):Gm(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,qA),n._generator=t,n._styler=e,n._isEmpty=r,n},Gm=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=LA(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
28
- `);return s!==-1&&(e=MA(e,i,n,s)),n+e+i},Wl,Xm=(t,...e)=>{let[r]=e;if(!Ho(r)||!Ho(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let s=1;s<r.length;s++)i.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return Wl===void 0&&(Wl=zm()),Wl(t,i.join(""))};Object.defineProperties(zo.prototype,gi);var Vo=zo();Vo.supportsColor=Ul;Vo.stderr=zo({level:Hl?Hl.level:0});Vo.stderr.supportsColor=Hl;Jm.exports=Vo});var Zm=S((Vl,Yl)=>{(function(t,e){typeof Vl=="object"&&typeof Yl<"u"?Yl.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Vl,(function(){"use strict";function t(g){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},t(g)}var e=/^\s+/,r=/\s+$/;function n(g,E){if(g=g||"",E=E||{},g instanceof n)return g;if(!(this instanceof n))return new n(g,E);var b=i(g);this._originalInput=g,this._r=b.r,this._g=b.g,this._b=b.b,this._a=b.a,this._roundA=Math.round(100*this._a)/100,this._format=E.format||b.format,this._gradientType=E.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=b.ok}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var E=this.toRgb();return(E.r*299+E.g*587+E.b*114)/1e3},getLuminance:function(){var E=this.toRgb(),b,v,T,$,U,H;return b=E.r/255,v=E.g/255,T=E.b/255,b<=.03928?$=b/12.92:$=Math.pow((b+.055)/1.055,2.4),v<=.03928?U=v/12.92:U=Math.pow((v+.055)/1.055,2.4),T<=.03928?H=T/12.92:H=Math.pow((T+.055)/1.055,2.4),.2126*$+.7152*U+.0722*H},setAlpha:function(E){return this._a=ce(E),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var E=f(this._r,this._g,this._b);return{h:E.h*360,s:E.s,v:E.v,a:this._a}},toHsvString:function(){var E=f(this._r,this._g,this._b),b=Math.round(E.h*360),v=Math.round(E.s*100),T=Math.round(E.v*100);return this._a==1?"hsv("+b+", "+v+"%, "+T+"%)":"hsva("+b+", "+v+"%, "+T+"%, "+this._roundA+")"},toHsl:function(){var E=a(this._r,this._g,this._b);return{h:E.h*360,s:E.s,l:E.l,a:this._a}},toHslString:function(){var E=a(this._r,this._g,this._b),b=Math.round(E.h*360),v=Math.round(E.s*100),T=Math.round(E.l*100);return this._a==1?"hsl("+b+", "+v+"%, "+T+"%)":"hsla("+b+", "+v+"%, "+T+"%, "+this._roundA+")"},toHex:function(E){return h(this._r,this._g,this._b,E)},toHexString:function(E){return"#"+this.toHex(E)},toHex8:function(E){return p(this._r,this._g,this._b,this._a,E)},toHex8String:function(E){return"#"+this.toHex8(E)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(W(this._r,255)*100)+"%",g:Math.round(W(this._g,255)*100)+"%",b:Math.round(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(W(this._r,255)*100)+"%, "+Math.round(W(this._g,255)*100)+"%, "+Math.round(W(this._b,255)*100)+"%)":"rgba("+Math.round(W(this._r,255)*100)+"%, "+Math.round(W(this._g,255)*100)+"%, "+Math.round(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:j[h(this._r,this._g,this._b,!0)]||!1},toFilter:function(E){var b="#"+y(this._r,this._g,this._b,this._a),v=b,T=this._gradientType?"GradientType = 1, ":"";if(E){var $=n(E);v="#"+y($._r,$._g,$._b,$._a)}return"progid:DXImageTransform.Microsoft.gradient("+T+"startColorstr="+b+",endColorstr="+v+")"},toString:function(E){var b=!!E;E=E||this._format;var v=!1,T=this._a<1&&this._a>=0,$=!b&&T&&(E==="hex"||E==="hex6"||E==="hex3"||E==="hex4"||E==="hex8"||E==="name");return $?E==="name"&&this._a===0?this.toName():this.toRgbString():(E==="rgb"&&(v=this.toRgbString()),E==="prgb"&&(v=this.toPercentageRgbString()),(E==="hex"||E==="hex6")&&(v=this.toHexString()),E==="hex3"&&(v=this.toHexString(!0)),E==="hex4"&&(v=this.toHex8String(!0)),E==="hex8"&&(v=this.toHex8String()),E==="name"&&(v=this.toName()),E==="hsl"&&(v=this.toHslString()),E==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(E,b){var v=E.apply(null,[this].concat([].slice.call(b)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(A,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(M,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(D,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(q,arguments)},_applyCombination:function(E,b){return E.apply(null,[this].concat([].slice.call(b)))},analogous:function(){return this._applyCombination(le,arguments)},complement:function(){return this._applyCombination(L,arguments)},monochromatic:function(){return this._applyCombination(_e,arguments)},splitcomplement:function(){return this._applyCombination(se,arguments)},triad:function(){return this._applyCombination(V,[3])},tetrad:function(){return this._applyCombination(V,[4])}},n.fromRatio=function(g,E){if(t(g)=="object"){var b={};for(var v in g)g.hasOwnProperty(v)&&(v==="a"?b[v]=g[v]:b[v]=Z(g[v]));g=b}return n(g,E)};function i(g){var E={r:0,g:0,b:0},b=1,v=null,T=null,$=null,U=!1,H=!1;return typeof g=="string"&&(g=F(g)),t(g)=="object"&&(P(g.r)&&P(g.g)&&P(g.b)?(E=s(g.r,g.g,g.b),U=!0,H=String(g.r).substr(-1)==="%"?"prgb":"rgb"):P(g.h)&&P(g.s)&&P(g.v)?(v=Z(g.s),T=Z(g.v),E=c(g.h,v,T),U=!0,H="hsv"):P(g.h)&&P(g.s)&&P(g.l)&&(v=Z(g.s),$=Z(g.l),E=l(g.h,v,$),U=!0,H="hsl"),g.hasOwnProperty("a")&&(b=g.a)),b=ce(b),{ok:U,format:g.format||H,r:Math.min(255,Math.max(E.r,0)),g:Math.min(255,Math.max(E.g,0)),b:Math.min(255,Math.max(E.b,0)),a:b}}function s(g,E,b){return{r:W(g,255)*255,g:W(E,255)*255,b:W(b,255)*255}}function a(g,E,b){g=W(g,255),E=W(E,255),b=W(b,255);var v=Math.max(g,E,b),T=Math.min(g,E,b),$,U,H=(v+T)/2;if(v==T)$=U=0;else{var J=v-T;switch(U=H>.5?J/(2-v-T):J/(v+T),v){case g:$=(E-b)/J+(E<b?6:0);break;case E:$=(b-g)/J+2;break;case b:$=(g-E)/J+4;break}$/=6}return{h:$,s:U,l:H}}function l(g,E,b){var v,T,$;g=W(g,360),E=W(E,100),b=W(b,100);function U(re,qe,Ee){return Ee<0&&(Ee+=1),Ee>1&&(Ee-=1),Ee<1/6?re+(qe-re)*6*Ee:Ee<1/2?qe:Ee<2/3?re+(qe-re)*(2/3-Ee)*6:re}if(E===0)v=T=$=b;else{var H=b<.5?b*(1+E):b+E-b*E,J=2*b-H;v=U(J,H,g+1/3),T=U(J,H,g),$=U(J,H,g-1/3)}return{r:v*255,g:T*255,b:$*255}}function f(g,E,b){g=W(g,255),E=W(E,255),b=W(b,255);var v=Math.max(g,E,b),T=Math.min(g,E,b),$,U,H=v,J=v-T;if(U=v===0?0:J/v,v==T)$=0;else{switch(v){case g:$=(E-b)/J+(E<b?6:0);break;case E:$=(b-g)/J+2;break;case b:$=(g-E)/J+4;break}$/=6}return{h:$,s:U,v:H}}function c(g,E,b){g=W(g,360)*6,E=W(E,100),b=W(b,100);var v=Math.floor(g),T=g-v,$=b*(1-E),U=b*(1-T*E),H=b*(1-(1-T)*E),J=v%6,re=[b,U,$,$,H,b][J],qe=[H,b,b,U,$,$][J],Ee=[$,$,H,b,b,U][J];return{r:re*255,g:qe*255,b:Ee*255}}function h(g,E,b,v){var T=[oe(Math.round(g).toString(16)),oe(Math.round(E).toString(16)),oe(Math.round(b).toString(16))];return v&&T[0].charAt(0)==T[0].charAt(1)&&T[1].charAt(0)==T[1].charAt(1)&&T[2].charAt(0)==T[2].charAt(1)?T[0].charAt(0)+T[1].charAt(0)+T[2].charAt(0):T.join("")}function p(g,E,b,v,T){var $=[oe(Math.round(g).toString(16)),oe(Math.round(E).toString(16)),oe(Math.round(b).toString(16)),oe(Jt(v))];return T&&$[0].charAt(0)==$[0].charAt(1)&&$[1].charAt(0)==$[1].charAt(1)&&$[2].charAt(0)==$[2].charAt(1)&&$[3].charAt(0)==$[3].charAt(1)?$[0].charAt(0)+$[1].charAt(0)+$[2].charAt(0)+$[3].charAt(0):$.join("")}function y(g,E,b,v){var T=[oe(Jt(v)),oe(Math.round(g).toString(16)),oe(Math.round(E).toString(16)),oe(Math.round(b).toString(16))];return T.join("")}n.equals=function(g,E){return!g||!E?!1:n(g).toRgbString()==n(E).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(g,E){E=E===0?0:E||10;var b=n(g).toHsl();return b.s-=E/100,b.s=ie(b.s),n(b)}function D(g,E){E=E===0?0:E||10;var b=n(g).toHsl();return b.s+=E/100,b.s=ie(b.s),n(b)}function _(g){return n(g).desaturate(100)}function A(g,E){E=E===0?0:E||10;var b=n(g).toHsl();return b.l+=E/100,b.l=ie(b.l),n(b)}function x(g,E){E=E===0?0:E||10;var b=n(g).toRgb();return b.r=Math.max(0,Math.min(255,b.r-Math.round(255*-(E/100)))),b.g=Math.max(0,Math.min(255,b.g-Math.round(255*-(E/100)))),b.b=Math.max(0,Math.min(255,b.b-Math.round(255*-(E/100)))),n(b)}function M(g,E){E=E===0?0:E||10;var b=n(g).toHsl();return b.l-=E/100,b.l=ie(b.l),n(b)}function q(g,E){var b=n(g).toHsl(),v=(b.h+E)%360;return b.h=v<0?360+v:v,n(b)}function L(g){var E=n(g).toHsl();return E.h=(E.h+180)%360,n(E)}function V(g,E){if(isNaN(E)||E<=0)throw new Error("Argument to polyad must be a positive number");for(var b=n(g).toHsl(),v=[n(g)],T=360/E,$=1;$<E;$++)v.push(n({h:(b.h+$*T)%360,s:b.s,l:b.l}));return v}function se(g){var E=n(g).toHsl(),b=E.h;return[n(g),n({h:(b+72)%360,s:E.s,l:E.l}),n({h:(b+216)%360,s:E.s,l:E.l})]}function le(g,E,b){E=E||6,b=b||30;var v=n(g).toHsl(),T=360/b,$=[n(g)];for(v.h=(v.h-(T*E>>1)+720)%360;--E;)v.h=(v.h+T)%360,$.push(n(v));return $}function _e(g,E){E=E||6;for(var b=n(g).toHsv(),v=b.h,T=b.s,$=b.v,U=[],H=1/E;E--;)U.push(n({h:v,s:T,v:$})),$=($+H)%1;return U}n.mix=function(g,E,b){b=b===0?0:b||50;var v=n(g).toRgb(),T=n(E).toRgb(),$=b/100,U={r:(T.r-v.r)*$+v.r,g:(T.g-v.g)*$+v.g,b:(T.b-v.b)*$+v.b,a:(T.a-v.a)*$+v.a};return n(U)},n.readability=function(g,E){var b=n(g),v=n(E);return(Math.max(b.getLuminance(),v.getLuminance())+.05)/(Math.min(b.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(g,E,b){var v=n.readability(g,E),T,$;switch($=!1,T=R(b),T.level+T.size){case"AAsmall":case"AAAlarge":$=v>=4.5;break;case"AAlarge":$=v>=3;break;case"AAAsmall":$=v>=7;break}return $},n.mostReadable=function(g,E,b){var v=null,T=0,$,U,H,J;b=b||{},U=b.includeFallbackColors,H=b.level,J=b.size;for(var re=0;re<E.length;re++)$=n.readability(g,E[re]),$>T&&(T=$,v=n(E[re]));return n.isReadable(g,v,{level:H,size:J})||!U?v:(b.includeFallbackColors=!1,n.mostReadable(g,["#fff","#000"],b))};var N=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},j=n.hexNames=z(N);function z(g){var E={};for(var b in g)g.hasOwnProperty(b)&&(E[g[b]]=b);return E}function ce(g){return g=parseFloat(g),(isNaN(g)||g<0||g>1)&&(g=1),g}function W(g,E){ae(g)&&(g="100%");var b=ee(g);return g=Math.min(E,Math.max(0,parseFloat(g))),b&&(g=parseInt(g*E,10)/100),Math.abs(g-E)<1e-6?1:g%E/parseFloat(E)}function ie(g){return Math.min(1,Math.max(0,g))}function X(g){return parseInt(g,16)}function ae(g){return typeof g=="string"&&g.indexOf(".")!=-1&&parseFloat(g)===1}function ee(g){return typeof g=="string"&&g.indexOf("%")!=-1}function oe(g){return g.length==1?"0"+g:""+g}function Z(g){return g<=1&&(g=g*100+"%"),g}function Jt(g){return Math.round(parseFloat(g)*255).toString(16)}function Se(g){return X(g)/255}var O=(function(){var g="[-\\+]?\\d+%?",E="[-\\+]?\\d*\\.\\d+%?",b="(?:"+E+")|(?:"+g+")",v="[\\s|\\(]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")\\s*\\)?",T="[\\s|\\(]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")\\s*\\)?";return{CSS_UNIT:new RegExp(b),rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+T),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+T),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+T),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function P(g){return!!O.CSS_UNIT.exec(g)}function F(g){g=g.replace(e,"").replace(r,"").toLowerCase();var E=!1;if(N[g])g=N[g],E=!0;else if(g=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var b;return(b=O.rgb.exec(g))?{r:b[1],g:b[2],b:b[3]}:(b=O.rgba.exec(g))?{r:b[1],g:b[2],b:b[3],a:b[4]}:(b=O.hsl.exec(g))?{h:b[1],s:b[2],l:b[3]}:(b=O.hsla.exec(g))?{h:b[1],s:b[2],l:b[3],a:b[4]}:(b=O.hsv.exec(g))?{h:b[1],s:b[2],v:b[3]}:(b=O.hsva.exec(g))?{h:b[1],s:b[2],v:b[3],a:b[4]}:(b=O.hex8.exec(g))?{r:X(b[1]),g:X(b[2]),b:X(b[3]),a:Se(b[4]),format:E?"name":"hex8"}:(b=O.hex6.exec(g))?{r:X(b[1]),g:X(b[2]),b:X(b[3]),format:E?"name":"hex"}:(b=O.hex4.exec(g))?{r:X(b[1]+""+b[1]),g:X(b[2]+""+b[2]),b:X(b[3]+""+b[3]),a:Se(b[4]+""+b[4]),format:E?"name":"hex8"}:(b=O.hex3.exec(g))?{r:X(b[1]+""+b[1]),g:X(b[2]+""+b[2]),b:X(b[3]+""+b[3]),format:E?"name":"hex"}:!1}function R(g){var E,b;return g=g||{level:"AA",size:"small"},E=(g.level||"AA").toUpperCase(),b=(g.size||"small").toLowerCase(),E!=="AA"&&E!=="AAA"&&(E="AA"),b!=="small"&&b!=="large"&&(b="small"),{level:E,size:b}}return n}))});var og=S((Z$,sg)=>{var ls=Zm(),ng={r:256,g:256,b:256,a:1},ig={h:360,s:1,v:1,a:1};function Jl(t,e,r){let n={};for(let i in t)t.hasOwnProperty(i)&&(n[i]=r===0?0:(e[i]-t[i])/r);return n}function Ql(t,e,r,n){let i={};for(let s in e)e.hasOwnProperty(s)&&(i[s]=t[s]*r+e[s],i[s]=i[s]<0?i[s]+n[s]:n[s]!==1?i[s]%n[s]:i[s]);return i}function Kl(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),s=Jl(n,i,r),a=[t.color];for(let l=1;l<r;l++){let f=Ql(s,n,l,ng);a.push(ls(f))}return a}function eg(t,e,r,n){let i=t.color.toHsv(),s=e.color.toHsv();if(i.s===0||s.s===0)return Kl(t,e,r);let a;if(typeof n=="boolean")a=n;else{let h=i.h<s.h&&s.h-i.h<180||i.h>s.h&&i.h-s.h>180;a=n==="long"&&h||n==="short"&&!h}let l=Jl(i,s,r),f=[t.color],c;i.h<=s.h&&!a||i.h>=s.h&&a?c=s.h-i.h:a?c=360-s.h+i.h:c=360-i.h+s.h,l.h=Math.pow(-1,a?1:0)*Math.abs(c)/r;for(let h=1;h<r;h++){let p=Ql(l,i,h,ig);f.push(ls(p))}return f}function tg(t,e){let r=t.length;if(e=parseInt(e,10),isNaN(e)||e<2)throw new Error("Invalid number of steps (< 2)");if(e<r)throw new Error("Number of steps cannot be inferior to number of stops");let n=[];for(let s=1;s<r;s++){let a=(e-1)*(t[s].pos-t[s-1].pos);n.push(Math.max(1,Math.round(a)))}let i=1;for(let s=r-1;s--;)i+=n[s];for(;i!==e;)if(i<e){let s=Math.min.apply(null,n);n[n.indexOf(s)]++,i++}else{let s=Math.max.apply(null,n);n[n.indexOf(s)]--,i--}return n}function rg(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,s;for(let f=0,c=t.length;f<c-1;f++)if(e>=t[f].pos&&e<t[f+1].pos){i=t[f],s=t[f+1];break}i||(i=s=t[t.length-1]);let a=Jl(i.color[r](),s.color[r](),(s.pos-i.pos)*100),l=Ql(a,i.color[r](),(e-i.pos)*100,n);return ls(l)}var Xl=class t{constructor(e){if(e.length<2)throw new Error("Invalid number of stops (< 2)");let r=e[0].pos!==void 0,n=e.length,i=-1,s=!1;this.stops=e.map((a,l)=>{let f=a.pos!==void 0;if(r^f)throw new Error("Cannot mix positionned and not posionned color stops");if(f){let c=a.color!==void 0;if(!c&&(s||l===0||l===n-1))throw new Error("Cannot define two consecutive position-only stops");if(s=!c,a={color:c?ls(a.color):null,colorLess:!c,pos:a.pos},a.pos<0||a.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(a.pos<i)throw new Error("Color stops positions are not ordered");i=a.pos}else a={color:ls(a.color!==void 0?a.color:a),pos:l/(n-1)};return a}),this.stops[0].pos!==0&&(this.stops.unshift({color:this.stops[0].color,pos:0}),n++),this.stops[n-1].pos!==1&&this.stops.push({color:this.stops[n-1].color,pos:1})}reverse(){let e=[];return this.stops.forEach(function(r){e.push({color:r.color,pos:1-r.pos})}),new t(e.reverse())}loop(){let e=[],r=[];return this.stops.forEach(n=>{e.push({color:n.color,pos:n.pos/2})}),this.stops.slice(0,-1).forEach(n=>{r.push({color:n.color,pos:1-n.pos/2})}),new t(e.concat(r.reverse()))}rgb(e){let r=tg(this.stops,e),n=[];this.stops.forEach((i,s)=>{i.colorLess&&(i.color=Kl(this.stops[s-1],this.stops[s+1],2)[1])});for(let i=0,s=this.stops.length;i<s-1;i++){let a=Kl(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...a)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=tg(this.stops,e),i=[];this.stops.forEach((s,a)=>{s.colorLess&&(s.color=eg(this.stops[a-1],this.stops[a+1],2,r)[1])});for(let s=0,a=this.stops.length;s<a-1;s++){let l=eg(this.stops[s],this.stops[s+1],n[s],r);i.splice(i.length,0,...l)}return i.push(this.stops[this.stops.length-1].color),i}css(e,r){e=e||"linear",r=r||(e==="linear"?"to right":"ellipse at center");let n=e+"-gradient("+r;return this.stops.forEach(function(i){n+=", "+(i.colorLess?"":i.color.toRgbString()+" ")+i.pos*100+"%"}),n+=")",n}rgbAt(e){return rg(this.stops,e,"toRgb",ng)}hsvAt(e){return rg(this.stops,e,"toHsv",ig)}};sg.exports=function(t){if(arguments.length===1){if(!Array.isArray(arguments[0]))throw new Error('"stops" is not an array');t=arguments[0]}else t=Array.prototype.slice.call(arguments);return new Xl(t)}});var fg=S((ek,Yo)=>{"use strict";var ug=Qm(),jA=og(),ag=/\s/g;function Zl(...t){let e=jA.apply(this,t),r=(n,i)=>WA(n?n.toString():"",e,i);return r.multiline=(n,i)=>UA(n?n.toString():"",e,i),r}var lg=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function WA(t,e,r){let n=cg(r),i=Math.max(t.replace(ag,"").length,e.stops.length),s=lg(e,n,i),a="";for(let l of t)a+=l.match(ag)?l:ug.hex(s.shift().toHex())(l);return a}function UA(t,e,r){let n=cg(r),i=t.split(`
29
- `),s=Math.max.apply(null,i.map(f=>f.length).concat([e.stops.length])),a=lg(e,n,s),l=[];for(let f of i){let c=a.slice(0),h="";for(let p of f)h+=ug.hex(c.shift().toHex())(p);l.push(h)}return l.join(`
30
- `)}function cg(t){let e={interpolation:"rgb",hsvSpin:"short",...t};if(t!==void 0&&typeof t!="object")throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof t}\``);if(typeof e.interpolation!="string")throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof e.interpolation}\``);if(e.interpolation.toLowerCase()==="hsv"&&typeof e.hsvSpin!="string")throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof e.hsvSpin}\``);return e}var cs={atlas:{colors:["#feac5e","#c779d0","#4bc0c8"],options:{}},cristal:{colors:["#bdfff3","#4ac29a"],options:{}},teen:{colors:["#77a1d3","#79cbca","#e684ae"],options:{}},mind:{colors:["#473b7b","#3584a7","#30d2be"],options:{}},morning:{colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},vice:{colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},passion:{colors:["#f43b47","#453a94"],options:{}},fruit:{colors:["#ff4e50","#f9d423"],options:{}},instagram:{colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},retro:{colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},summer:{colors:["#fdbb2d","#22c1c3"],options:{}},rainbow:{colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},pastel:{colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}}};Yo.exports=Zl;for(let t in cs)Yo.exports[t]=e=>new Zl(cs[t].colors)(e,cs[t].options),Yo.exports[t].multiline=e=>new Zl(cs[t].colors).multiline(e,cs[t].options)});var mg=S((sk,pg)=>{var Jr=fe("constants"),XA=process.cwd,Ko=null,JA=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Ko||(Ko=XA.call(process)),Ko};try{process.cwd()}catch{}typeof process.chdir=="function"&&(rc=process.chdir,process.chdir=function(t){Ko=null,rc.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,rc));var rc;pg.exports=QA;function QA(t){Jr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=l(t.stat),t.fstat=l(t.fstat),t.lstat=l(t.lstat),t.statSync=f(t.statSync),t.fstatSync=f(t.fstatSync),t.lstatSync=f(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(h,p,y){y&&process.nextTick(y)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(h,p,y,m){m&&process.nextTick(m)},t.lchownSync=function(){}),JA==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:(function(h){function p(y,m,D){var _=Date.now(),A=0;h(y,m,function x(M){if(M&&(M.code==="EACCES"||M.code==="EPERM"||M.code==="EBUSY")&&Date.now()-_<6e4){setTimeout(function(){t.stat(m,function(q,L){q&&q.code==="ENOENT"?h(y,m,x):D(M)})},A),A<100&&(A+=10);return}D&&D(M)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,h),p})(t.rename)),t.read=typeof t.read!="function"?t.read:(function(h){function p(y,m,D,_,A,x){var M;if(x&&typeof x=="function"){var q=0;M=function(L,V,se){if(L&&L.code==="EAGAIN"&&q<10)return q++,h.call(t,y,m,D,_,A,M);x.apply(this,arguments)}}return h.call(t,y,m,D,_,A,M)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,h),p})(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:(function(h){return function(p,y,m,D,_){for(var A=0;;)try{return h.call(t,p,y,m,D,_)}catch(x){if(x.code==="EAGAIN"&&A<10){A++;continue}throw x}}})(t.readSync);function e(h){h.lchmod=function(p,y,m){h.open(p,Jr.O_WRONLY|Jr.O_SYMLINK,y,function(D,_){if(D){m&&m(D);return}h.fchmod(_,y,function(A){h.close(_,function(x){m&&m(A||x)})})})},h.lchmodSync=function(p,y){var m=h.openSync(p,Jr.O_WRONLY|Jr.O_SYMLINK,y),D=!0,_;try{_=h.fchmodSync(m,y),D=!1}finally{if(D)try{h.closeSync(m)}catch{}else h.closeSync(m)}return _}}function r(h){Jr.hasOwnProperty("O_SYMLINK")&&h.futimes?(h.lutimes=function(p,y,m,D){h.open(p,Jr.O_SYMLINK,function(_,A){if(_){D&&D(_);return}h.futimes(A,y,m,function(x){h.close(A,function(M){D&&D(x||M)})})})},h.lutimesSync=function(p,y,m){var D=h.openSync(p,Jr.O_SYMLINK),_,A=!0;try{_=h.futimesSync(D,y,m),A=!1}finally{if(A)try{h.closeSync(D)}catch{}else h.closeSync(D)}return _}):h.futimes&&(h.lutimes=function(p,y,m,D){D&&process.nextTick(D)},h.lutimesSync=function(){})}function n(h){return h&&function(p,y,m){return h.call(t,p,y,function(D){c(D)&&(D=null),m&&m.apply(this,arguments)})}}function i(h){return h&&function(p,y){try{return h.call(t,p,y)}catch(m){if(!c(m))throw m}}}function s(h){return h&&function(p,y,m,D){return h.call(t,p,y,m,function(_){c(_)&&(_=null),D&&D.apply(this,arguments)})}}function a(h){return h&&function(p,y,m){try{return h.call(t,p,y,m)}catch(D){if(!c(D))throw D}}}function l(h){return h&&function(p,y,m){typeof y=="function"&&(m=y,y=null);function D(_,A){A&&(A.uid<0&&(A.uid+=4294967296),A.gid<0&&(A.gid+=4294967296)),m&&m.apply(this,arguments)}return y?h.call(t,p,y,D):h.call(t,p,D)}}function f(h){return h&&function(p,y){var m=y?h.call(t,p,y):h.call(t,p);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function c(h){if(!h||h.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(h.code==="EINVAL"||h.code==="EPERM"))}}});var yg=S((ok,Dg)=>{var gg=fe("stream").Stream;Dg.exports=ZA;function ZA(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);gg.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var a=Object.keys(i),l=0,f=a.length;l<f;l++){var c=a[l];this[c]=i[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(h,p){if(h){s.emit("error",h),s.readable=!1;return}s.fd=p,s.emit("open",p),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);gg.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),a=0,l=s.length;a<l;a++){var f=s[a];this[f]=i[f]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Eg=S((ak,bg)=>{"use strict";bg.exports=tx;var ex=Object.getPrototypeOf||function(t){return t.__proto__};function tx(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:ex(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var _g=S((uk,sc)=>{var Pe=fe("fs"),rx=mg(),nx=yg(),ix=Eg(),Xo=fe("util"),Ke,Qo;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ke=Symbol.for("graceful-fs.queue"),Qo=Symbol.for("graceful-fs.previous")):(Ke="___graceful-fs.queue",Qo="___graceful-fs.previous");function sx(){}function Cg(t,e){Object.defineProperty(t,Ke,{get:function(){return e}})}var Fn=sx;Xo.debuglog?Fn=Xo.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Fn=function(){var t=Xo.format.apply(Xo,arguments);t="GFS4: "+t.split(/\n/).join(`
31
- GFS4: `),console.error(t)});Pe[Ke]||(wg=global[Ke]||[],Cg(Pe,wg),Pe.close=(function(t){function e(r,n){return t.call(Pe,r,function(i){i||Fg(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Qo,{value:t}),e})(Pe.close),Pe.closeSync=(function(t){function e(r){t.apply(Pe,arguments),Fg()}return Object.defineProperty(e,Qo,{value:t}),e})(Pe.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Fn(Pe[Ke]),fe("assert").equal(Pe[Ke].length,0)}));var wg;global[Ke]||Cg(global,Pe[Ke]);sc.exports=nc(ix(Pe));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Pe.__patched&&(sc.exports=nc(Pe),Pe.__patched=!0);function nc(t){rx(t),t.gracefulify=nc,t.createReadStream=V,t.createWriteStream=se;var e=t.readFile;t.readFile=r;function r(N,j,z){return typeof j=="function"&&(z=j,j=null),ce(N,j,z);function ce(W,ie,X,ae){return e(W,ie,function(ee){ee&&(ee.code==="EMFILE"||ee.code==="ENFILE")?yi([ce,[W,ie,X],ee,ae||Date.now(),Date.now()]):typeof X=="function"&&X.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(N,j,z,ce){return typeof z=="function"&&(ce=z,z=null),W(N,j,z,ce);function W(ie,X,ae,ee,oe){return n(ie,X,ae,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?yi([W,[ie,X,ae,ee],Z,oe||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=a);function a(N,j,z,ce){return typeof z=="function"&&(ce=z,z=null),W(N,j,z,ce);function W(ie,X,ae,ee,oe){return s(ie,X,ae,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?yi([W,[ie,X,ae,ee],Z,oe||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}var l=t.copyFile;l&&(t.copyFile=f);function f(N,j,z,ce){return typeof z=="function"&&(ce=z,z=0),W(N,j,z,ce);function W(ie,X,ae,ee,oe){return l(ie,X,ae,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?yi([W,[ie,X,ae,ee],Z,oe||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}var c=t.readdir;t.readdir=p;var h=/^v[0-5]\./;function p(N,j,z){typeof j=="function"&&(z=j,j=null);var ce=h.test(process.version)?function(X,ae,ee,oe){return c(X,W(X,ae,ee,oe))}:function(X,ae,ee,oe){return c(X,ae,W(X,ae,ee,oe))};return ce(N,j,z);function W(ie,X,ae,ee){return function(oe,Z){oe&&(oe.code==="EMFILE"||oe.code==="ENFILE")?yi([ce,[ie,X,ae],oe,ee||Date.now(),Date.now()]):(Z&&Z.sort&&Z.sort(),typeof ae=="function"&&ae.call(this,oe,Z))}}}if(process.version.substr(0,4)==="v0.8"){var y=nx(t);x=y.ReadStream,q=y.WriteStream}var m=t.ReadStream;m&&(x.prototype=Object.create(m.prototype),x.prototype.open=M);var D=t.WriteStream;D&&(q.prototype=Object.create(D.prototype),q.prototype.open=L),Object.defineProperty(t,"ReadStream",{get:function(){return x},set:function(N){x=N},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return q},set:function(N){q=N},enumerable:!0,configurable:!0});var _=x;Object.defineProperty(t,"FileReadStream",{get:function(){return _},set:function(N){_=N},enumerable:!0,configurable:!0});var A=q;Object.defineProperty(t,"FileWriteStream",{get:function(){return A},set:function(N){A=N},enumerable:!0,configurable:!0});function x(N,j){return this instanceof x?(m.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function M(){var N=this;_e(N.path,N.flags,N.mode,function(j,z){j?(N.autoClose&&N.destroy(),N.emit("error",j)):(N.fd=z,N.emit("open",z),N.read())})}function q(N,j){return this instanceof q?(D.apply(this,arguments),this):q.apply(Object.create(q.prototype),arguments)}function L(){var N=this;_e(N.path,N.flags,N.mode,function(j,z){j?(N.destroy(),N.emit("error",j)):(N.fd=z,N.emit("open",z))})}function V(N,j){return new t.ReadStream(N,j)}function se(N,j){return new t.WriteStream(N,j)}var le=t.open;t.open=_e;function _e(N,j,z,ce){return typeof z=="function"&&(ce=z,z=null),W(N,j,z,ce);function W(ie,X,ae,ee,oe){return le(ie,X,ae,function(Z,Jt){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?yi([W,[ie,X,ae,ee],Z,oe||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}return t}function yi(t){Fn("ENQUEUE",t[0].name,t[1]),Pe[Ke].push(t),ic()}var Jo;function Fg(){for(var t=Date.now(),e=0;e<Pe[Ke].length;++e)Pe[Ke][e].length>2&&(Pe[Ke][e][3]=t,Pe[Ke][e][4]=t);ic()}function ic(){if(clearTimeout(Jo),Jo=void 0,Pe[Ke].length!==0){var t=Pe[Ke].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)Fn("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){Fn("TIMEOUT",e.name,r);var a=r.pop();typeof a=="function"&&a.call(null,n)}else{var l=Date.now()-s,f=Math.max(s-i,1),c=Math.min(f*1.2,100);l>=c?(Fn("RETRY",e.name,r),e.apply(null,r.concat([i]))):Pe[Ke].push(t)}Jo===void 0&&(Jo=setTimeout(ic,0))}}});function Sx(){let t=new Map;for(let[e,r]of Object.entries(Oe)){for(let[n,i]of Object.entries(r))Oe[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Oe[n],t.set(i[0],i[1]);Object.defineProperty(Oe,e,{value:r,enumerable:!1})}return Object.defineProperty(Oe,"codes",{value:t,enumerable:!1}),Oe.color.close="\x1B[39m",Oe.bgColor.close="\x1B[49m",Oe.color.ansi=Vg(),Oe.color.ansi256=Yg(),Oe.color.ansi16m=Kg(),Oe.bgColor.ansi=Vg(10),Oe.bgColor.ansi256=Yg(10),Oe.bgColor.ansi16m=Kg(10),Object.defineProperties(Oe,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Oe.rgbToAnsi256(...Oe.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let l=e%36;r=Math.floor(e/36)/5,n=Math.floor(l/6)/5,i=l%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let a=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Oe.ansi256ToAnsi(Oe.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Oe.ansi256ToAnsi(Oe.hexToAnsi256(e)),enumerable:!1}}),Oe}var Vg,Yg,Kg,Oe,FL,Cx,_x,CL,vx,Ht,Xg=te(()=>{Vg=(t=0)=>e=>`\x1B[${e+t}m`,Yg=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Kg=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Oe={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]}},FL=Object.keys(Oe.modifier),Cx=Object.keys(Oe.color),_x=Object.keys(Oe.bgColor),CL=[...Cx,..._x];vx=Sx(),Ht=vx});import mc from"node:process";import Ax from"node:os";import Jg from"node:tty";function Tt(t,e=globalThis.Deno?globalThis.Deno.args:mc.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}function xx(){if("FORCE_COLOR"in Te)return Te.FORCE_COLOR==="true"?1:Te.FORCE_COLOR==="false"?0:Te.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Te.FORCE_COLOR,10),3)}function Rx(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Ox(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=xx();n!==void 0&&(ia=n);let i=r?ia:n;if(i===0)return 0;if(r){if(Tt("color=16m")||Tt("color=full")||Tt("color=truecolor"))return 3;if(Tt("color=256"))return 2}if("TF_BUILD"in Te&&"AGENT_NAME"in Te)return 1;if(t&&!e&&i===void 0)return 0;let s=i||0;if(Te.TERM==="dumb")return s;if(mc.platform==="win32"){let a=Ax.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in Te)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in Te)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in Te)||Te.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Te.TEAMCITY_VERSION)?1:0;if(Te.COLORTERM==="truecolor"||Te.TERM==="xterm-kitty"||Te.TERM==="xterm-ghostty"||Te.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Te){let a=Number.parseInt((Te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Te.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Te.TERM)||"COLORTERM"in Te?1:s}function Qg(t,e={}){let r=Ox(t,{streamIsTTY:t&&t.isTTY,...e});return Rx(r)}var Te,ia,Tx,Zg,eD=te(()=>{({env:Te}=mc);Tt("no-color")||Tt("no-colors")||Tt("color=false")||Tt("color=never")?ia=0:(Tt("color")||Tt("colors")||Tt("color=true")||Tt("color=always"))&&(ia=1);Tx={stdout:Qg({isTTY:Jg.isatty(1)}),stderr:Qg({isTTY:Jg.isatty(2)})},Zg=Tx});function tD(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,a="";do a+=t.slice(s,n)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return a+=t.slice(s),a}function rD(t,e,r,n){let i=0,s="";do{let a=t[n-1]==="\r";s+=t.slice(i,a?n-1:n)+e+(a?`\r
32
- `:`
33
- `)+r,i=n+1,n=t.indexOf(`
34
- `,i)}while(n!==-1);return s+=t.slice(i),s}var nD=te(()=>{});function ys(t){return Px(t)}var iD,sD,gc,wi,Ds,oD,Fi,Bx,Px,Dc,Ix,$x,yc,sa,kx,Lx,PL,I,nr=te(()=>{Xg();eD();nD();({stdout:iD,stderr:sD}=Zg),gc=Symbol("GENERATOR"),wi=Symbol("STYLER"),Ds=Symbol("IS_EMPTY"),oD=["ansi","ansi","ansi256","ansi16m"],Fi=Object.create(null),Bx=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=iD?iD.level:0;t.level=e.level===void 0?r:e.level},Px=t=>{let e=(...r)=>r.join(" ");return Bx(e,t),Object.setPrototypeOf(e,ys.prototype),e};Object.setPrototypeOf(ys.prototype,Function.prototype);for(let[t,e]of Object.entries(Ht))Fi[t]={get(){let r=sa(this,yc(e.open,e.close,this[wi]),this[Ds]);return Object.defineProperty(this,t,{value:r}),r}};Fi.visible={get(){let t=sa(this,this[wi],!0);return Object.defineProperty(this,"visible",{value:t}),t}};Dc=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?Ht[r].ansi16m(...n):e==="ansi256"?Ht[r].ansi256(Ht.rgbToAnsi256(...n)):Ht[r].ansi(Ht.rgbToAnsi(...n)):t==="hex"?Dc("rgb",e,r,...Ht.hexToRgb(...n)):Ht[r][t](...n),Ix=["rgb","hex","ansi256"];for(let t of Ix){Fi[t]={get(){let{level:r}=this;return function(...n){let i=yc(Dc(t,oD[r],"color",...n),Ht.color.close,this[wi]);return sa(this,i,this[Ds])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Fi[e]={get(){let{level:r}=this;return function(...n){let i=yc(Dc(t,oD[r],"bgColor",...n),Ht.bgColor.close,this[wi]);return sa(this,i,this[Ds])}}}}$x=Object.defineProperties(()=>{},{...Fi,level:{enumerable:!0,get(){return this[gc].level},set(t){this[gc].level=t}}}),yc=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},sa=(t,e,r)=>{let n=(...i)=>kx(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,$x),n[gc]=t,n[wi]=e,n[Ds]=r,n},kx=(t,e)=>{if(t.level<=0||!e)return t[Ds]?"":e;let r=t[wi];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=tD(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
35
- `);return s!==-1&&(e=rD(e,i,n,s)),n+e+i};Object.defineProperties(ys.prototype,Fi);Lx=ys(),PL=ys({level:sD?sD.level:0}),I=Lx});var bs=S(($L,aD)=>{"use strict";var Mx=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};aD.exports=Mx});var Es=S((kL,uD)=>{"use strict";var Nx="2.0.0",qx=Number.MAX_SAFE_INTEGER||9007199254740991,jx=16,Wx=250,Ux=["major","premajor","minor","preminor","patch","prepatch","prerelease"];uD.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:jx,MAX_SAFE_BUILD_LENGTH:Wx,MAX_SAFE_INTEGER:qx,RELEASE_TYPES:Ux,SEMVER_SPEC_VERSION:Nx,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ci=S((ir,lD)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:bc,MAX_SAFE_BUILD_LENGTH:Hx,MAX_LENGTH:zx}=Es(),Gx=bs();ir=lD.exports={};var Vx=ir.re=[],Yx=ir.safeRe=[],Y=ir.src=[],Kx=ir.safeSrc=[],K=ir.t={},Xx=0,Ec="[a-zA-Z0-9-]",Jx=[["\\s",1],["\\d",zx],[Ec,Hx]],Qx=t=>{for(let[e,r]of Jx)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},pe=(t,e,r)=>{let n=Qx(e),i=Xx++;Gx(t,i,e),K[t]=i,Y[i]=e,Kx[i]=n,Vx[i]=new RegExp(e,r?"g":void 0),Yx[i]=new RegExp(n,r?"g":void 0)};pe("NUMERICIDENTIFIER","0|[1-9]\\d*");pe("NUMERICIDENTIFIERLOOSE","\\d+");pe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ec}*`);pe("MAINVERSION",`(${Y[K.NUMERICIDENTIFIER]})\\.(${Y[K.NUMERICIDENTIFIER]})\\.(${Y[K.NUMERICIDENTIFIER]})`);pe("MAINVERSIONLOOSE",`(${Y[K.NUMERICIDENTIFIERLOOSE]})\\.(${Y[K.NUMERICIDENTIFIERLOOSE]})\\.(${Y[K.NUMERICIDENTIFIERLOOSE]})`);pe("PRERELEASEIDENTIFIER",`(?:${Y[K.NONNUMERICIDENTIFIER]}|${Y[K.NUMERICIDENTIFIER]})`);pe("PRERELEASEIDENTIFIERLOOSE",`(?:${Y[K.NONNUMERICIDENTIFIER]}|${Y[K.NUMERICIDENTIFIERLOOSE]})`);pe("PRERELEASE",`(?:-(${Y[K.PRERELEASEIDENTIFIER]}(?:\\.${Y[K.PRERELEASEIDENTIFIER]})*))`);pe("PRERELEASELOOSE",`(?:-?(${Y[K.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Y[K.PRERELEASEIDENTIFIERLOOSE]})*))`);pe("BUILDIDENTIFIER",`${Ec}+`);pe("BUILD",`(?:\\+(${Y[K.BUILDIDENTIFIER]}(?:\\.${Y[K.BUILDIDENTIFIER]})*))`);pe("FULLPLAIN",`v?${Y[K.MAINVERSION]}${Y[K.PRERELEASE]}?${Y[K.BUILD]}?`);pe("FULL",`^${Y[K.FULLPLAIN]}$`);pe("LOOSEPLAIN",`[v=\\s]*${Y[K.MAINVERSIONLOOSE]}${Y[K.PRERELEASELOOSE]}?${Y[K.BUILD]}?`);pe("LOOSE",`^${Y[K.LOOSEPLAIN]}$`);pe("GTLT","((?:<|>)?=?)");pe("XRANGEIDENTIFIERLOOSE",`${Y[K.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);pe("XRANGEIDENTIFIER",`${Y[K.NUMERICIDENTIFIER]}|x|X|\\*`);pe("XRANGEPLAIN",`[v=\\s]*(${Y[K.XRANGEIDENTIFIER]})(?:\\.(${Y[K.XRANGEIDENTIFIER]})(?:\\.(${Y[K.XRANGEIDENTIFIER]})(?:${Y[K.PRERELEASE]})?${Y[K.BUILD]}?)?)?`);pe("XRANGEPLAINLOOSE",`[v=\\s]*(${Y[K.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Y[K.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Y[K.XRANGEIDENTIFIERLOOSE]})(?:${Y[K.PRERELEASELOOSE]})?${Y[K.BUILD]}?)?)?`);pe("XRANGE",`^${Y[K.GTLT]}\\s*${Y[K.XRANGEPLAIN]}$`);pe("XRANGELOOSE",`^${Y[K.GTLT]}\\s*${Y[K.XRANGEPLAINLOOSE]}$`);pe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${bc}})(?:\\.(\\d{1,${bc}}))?(?:\\.(\\d{1,${bc}}))?`);pe("COERCE",`${Y[K.COERCEPLAIN]}(?:$|[^\\d])`);pe("COERCEFULL",Y[K.COERCEPLAIN]+`(?:${Y[K.PRERELEASE]})?(?:${Y[K.BUILD]})?(?:$|[^\\d])`);pe("COERCERTL",Y[K.COERCE],!0);pe("COERCERTLFULL",Y[K.COERCEFULL],!0);pe("LONETILDE","(?:~>?)");pe("TILDETRIM",`(\\s*)${Y[K.LONETILDE]}\\s+`,!0);ir.tildeTrimReplace="$1~";pe("TILDE",`^${Y[K.LONETILDE]}${Y[K.XRANGEPLAIN]}$`);pe("TILDELOOSE",`^${Y[K.LONETILDE]}${Y[K.XRANGEPLAINLOOSE]}$`);pe("LONECARET","(?:\\^)");pe("CARETTRIM",`(\\s*)${Y[K.LONECARET]}\\s+`,!0);ir.caretTrimReplace="$1^";pe("CARET",`^${Y[K.LONECARET]}${Y[K.XRANGEPLAIN]}$`);pe("CARETLOOSE",`^${Y[K.LONECARET]}${Y[K.XRANGEPLAINLOOSE]}$`);pe("COMPARATORLOOSE",`^${Y[K.GTLT]}\\s*(${Y[K.LOOSEPLAIN]})$|^$`);pe("COMPARATOR",`^${Y[K.GTLT]}\\s*(${Y[K.FULLPLAIN]})$|^$`);pe("COMPARATORTRIM",`(\\s*)${Y[K.GTLT]}\\s*(${Y[K.LOOSEPLAIN]}|${Y[K.XRANGEPLAIN]})`,!0);ir.comparatorTrimReplace="$1$2$3";pe("HYPHENRANGE",`^\\s*(${Y[K.XRANGEPLAIN]})\\s+-\\s+(${Y[K.XRANGEPLAIN]})\\s*$`);pe("HYPHENRANGELOOSE",`^\\s*(${Y[K.XRANGEPLAINLOOSE]})\\s+-\\s+(${Y[K.XRANGEPLAINLOOSE]})\\s*$`);pe("STAR","(<|>)?=?\\s*\\*");pe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");pe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var oa=S((LL,cD)=>{"use strict";var Zx=Object.freeze({loose:!0}),eR=Object.freeze({}),tR=t=>t?typeof t!="object"?Zx:t:eR;cD.exports=tR});var wc=S((ML,dD)=>{"use strict";var fD=/^[0-9]+$/,hD=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=fD.test(t),n=fD.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},rR=(t,e)=>hD(e,t);dD.exports={compareIdentifiers:hD,rcompareIdentifiers:rR}});var nt=S((NL,mD)=>{"use strict";var aa=bs(),{MAX_LENGTH:pD,MAX_SAFE_INTEGER:ua}=Es(),{safeRe:la,t:ca}=Ci(),nR=oa(),{compareIdentifiers:Fc}=wc(),Cc=class t{constructor(e,r){if(r=nR(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>pD)throw new TypeError(`version is longer than ${pD} characters`);aa("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?la[ca.LOOSE]:la[ca.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ua||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ua||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ua||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<ua)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(aa("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(aa("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Fc(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(aa("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Fc(n,i)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=`-${r}`.match(this.options.loose?la[ca.PRERELEASELOOSE]:la[ca.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),Fc(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};mD.exports=Cc});var vn=S((qL,DD)=>{"use strict";var gD=nt(),iR=(t,e,r=!1)=>{if(t instanceof gD)return t;try{return new gD(t,e)}catch(n){if(!r)return null;throw n}};DD.exports=iR});var _c=S((jL,bD)=>{"use strict";var yD=vn(),sR=(t,e)=>{let r=yD(t,null,!0),n=yD(e,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,a=s?r:n,l=s?n:r,f=!!a.prerelease.length;if(!!l.prerelease.length&&!f){if(!l.patch&&!l.minor)return"major";if(l.compareMain(a)===0)return l.minor&&!l.patch?"minor":"patch"}let h=f?"pre":"";return r.major!==n.major?h+"major":r.minor!==n.minor?h+"minor":r.patch!==n.patch?h+"patch":"prerelease"};bD.exports=sR});var Bt=S((WL,wD)=>{"use strict";var ED=nt(),oR=(t,e,r)=>new ED(t,r).compare(new ED(e,r));wD.exports=oR});var _i=S((UL,FD)=>{"use strict";var aR=Bt(),uR=(t,e,r)=>aR(t,e,r)>0;FD.exports=uR});var Pc=S(Rn=>{Rn.parse=Rn.decode=gR;Rn.stringify=Rn.encode=UD;Rn.safe=Ai;Rn.unsafe=ga;var Bc=typeof process<"u"&&process.platform==="win32"?`\r
36
- `:`
37
- `;function UD(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(s,a,l){var f=t[s];f&&Array.isArray(f)?f.forEach(function(c){n+=Ai(s+"[]")+i+Ai(c)+`
38
- `}):f&&typeof f=="object"?r.push(s):n+=Ai(s)+i+Ai(f)+Bc}),e.section&&n.length&&(n="["+Ai(e.section)+"]"+Bc+n),r.forEach(function(s,a,l){var f=HD(s).join("\\."),c=(e.section?e.section+".":"")+f,h=UD(t[s],{section:c,whitespace:e.whitespace});n.length&&h.length&&(n+=Bc),n+=h}),n}function HD(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function gR(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,s=t.split(/[\r\n]+/g);return s.forEach(function(a,l,f){if(!(!a||a.match(/^\s*[;#]/))){var c=a.match(i);if(c){if(c[1]!==void 0){if(n=ga(c[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var h=ga(c[2]);if(h!=="__proto__"){var p=c[3]?ga(c[4]):!0;switch(p){case"true":case"false":case"null":p=JSON.parse(p)}if(h.length>2&&h.slice(-2)==="[]"){if(h=h.substring(0,h.length-2),h==="__proto__")return;r[h]?Array.isArray(r[h])||(r[h]=[r[h]]):r[h]=[]}Array.isArray(r[h])?r[h].push(p):r[h]=p}}}}),Object.keys(e).filter(function(a,l,f){if(!e[a]||typeof e[a]!="object"||Array.isArray(e[a]))return!1;var c=HD(a),h=e,p=c.pop(),y=p.replace(/\\\./g,".");return c.forEach(function(m,D,_){m!=="__proto__"&&((!h[m]||typeof h[m]!="object")&&(h[m]={}),h=h[m])}),h===e&&y===p?!1:(h[y]=e[a],!0)}).forEach(function(a,l,f){delete e[a]}),e}function zD(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Ai(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&zD(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function ga(t,e){if(t=(t||"").trim(),zD(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,s=t.length;i<s;i++){var a=t.charAt(i);if(r)"\\;#".indexOf(a)!==-1?n+=a:n+="\\"+a,r=!1;else{if(";#".indexOf(a)!==-1)break;a==="\\"?r=!0:n+=a}}return r&&(n+="\\"),n.trim()}return t}});var YD=S((R4,VD)=>{"use strict";var Ic=1,GD=2;function DR(){return""}function yR(t,e,r){return t.slice(e,r).replace(/\S/g," ")}VD.exports=function(t,e){e=e||{};for(var r,n,i=!1,s=!1,a=0,l="",f=e.whitespace===!1?DR:yR,c=0;c<t.length;c++){if(r=t[c],n=t[c+1],!s&&r==='"'){var h=t[c-1]==="\\"&&t[c-2]!=="\\";h||(i=!i)}if(!i){if(!s&&r+n==="//")l+=t.slice(a,c),a=c,s=Ic,c++;else if(s===Ic&&r+n===`\r
39
- `){c++,s=!1,l+=f(t,a,c),a=c;continue}else if(s===Ic&&r===`
40
- `)s=!1,l+=f(t,a,c),a=c;else if(!s&&r+n==="/*"){l+=t.slice(a,c),a=c,s=GD,c++;continue}else if(s===GD&&r+n==="*/"){c++,s=!1,l+=f(t,a,c+1),a=c+1;continue}}}return l+(s?f(t.substr(a)):t.substr(a))}});var XD=S(xi=>{"use strict";var KD=fe("fs"),bR=Pc(),_s=fe("path"),ER=YD(),wR=xi.parse=function(t){return/^\s*{/.test(t)?JSON.parse(ER(t)):bR.parse(t)},FR=xi.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=_s.join.apply(null,t),n;try{return KD.readFileSync(r,"utf-8")}catch{return}},O4=xi.json=function(){var t=FR.apply(null,arguments);return t?wR(t):null},T4=xi.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var s=i.substring(n).split("__"),a;(a=s.indexOf(""))>-1;)s.splice(a,1);var l=r;s.forEach(function(c,h){!c||typeof l!="object"||(h===s.length-1&&(l[c]=e[i]),l[c]===void 0&&(l[c]={}),l=l[c])})}return r},B4=xi.find=function(){var t=_s.join.apply(null,[].slice.call(arguments));function e(r,n){var i=_s.join(r,n);try{return KD.statSync(i),i}catch{if(_s.dirname(r)!==r)return e(_s.dirname(r),n)}}return e(process.cwd(),t)}});var r0=S((I4,t0)=>{"use strict";function QD(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function ZD(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function e0(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=e0(r):QD(r)?e[n]=ZD(r):e[n]=$c({},r):e[n]=r}),e}function JD(t,e){return e==="__proto__"?void 0:t[e]}var $c=t0.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,n,i;return e.forEach(function(s){typeof s!="object"||s===null||Array.isArray(s)||Object.keys(s).forEach(function(a){if(n=JD(t,a),r=JD(s,a),r!==t)if(typeof r!="object"||r===null){t[a]=r;return}else if(Array.isArray(r)){t[a]=e0(r);return}else if(QD(r)){t[a]=ZD(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[a]=$c({},r);return}else{t[a]=$c(n,r);return}})}),t}});var o0=S(($4,s0)=>{"use strict";function CR(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var n=e[e.length-1];return n in r}function n0(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function i0(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}s0.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(L){r.bools[L]=!0});var n={};function i(L){return n[L].some(function(V){return r.bools[V]})}Object.keys(e.alias||{}).forEach(function(L){n[L]=[].concat(e.alias[L]),n[L].forEach(function(V){n[V]=[L].concat(n[L].filter(function(se){return V!==se}))})}),[].concat(e.string).filter(Boolean).forEach(function(L){r.strings[L]=!0,n[L]&&[].concat(n[L]).forEach(function(V){r.strings[V]=!0})});var s=e.default||{},a={_:[]};function l(L,V){return r.allBools&&/^--[^=]+$/.test(V)||r.strings[L]||r.bools[L]||n[L]}function f(L,V,se){for(var le=L,_e=0;_e<V.length-1;_e++){var N=V[_e];if(i0(le,N))return;le[N]===void 0&&(le[N]={}),(le[N]===Object.prototype||le[N]===Number.prototype||le[N]===String.prototype)&&(le[N]={}),le[N]===Array.prototype&&(le[N]=[]),le=le[N]}var j=V[V.length-1];i0(le,j)||((le===Object.prototype||le===Number.prototype||le===String.prototype)&&(le={}),le===Array.prototype&&(le=[]),le[j]===void 0||r.bools[j]||typeof le[j]=="boolean"?le[j]=se:Array.isArray(le[j])?le[j].push(se):le[j]=[le[j],se])}function c(L,V,se){if(!(se&&r.unknownFn&&!l(L,se)&&r.unknownFn(se)===!1)){var le=!r.strings[L]&&n0(V)?Number(V):V;f(a,L.split("."),le),(n[L]||[]).forEach(function(_e){f(a,_e.split("."),le)})}}Object.keys(r.bools).forEach(function(L){c(L,s[L]===void 0?!1:s[L])});var h=[];t.indexOf("--")!==-1&&(h=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var p=0;p<t.length;p++){var y=t[p],m,D;if(/^--.+=/.test(y)){var _=y.match(/^--([^=]+)=([\s\S]*)$/);m=_[1];var A=_[2];r.bools[m]&&(A=A!=="false"),c(m,A,y)}else if(/^--no-.+/.test(y))m=y.match(/^--no-(.+)/)[1],c(m,!1,y);else if(/^--.+/.test(y))m=y.match(/^--(.+)/)[1],D=t[p+1],D!==void 0&&!/^(-|--)[^-]/.test(D)&&!r.bools[m]&&!r.allBools&&(!n[m]||!i(m))?(c(m,D,y),p+=1):/^(true|false)$/.test(D)?(c(m,D==="true",y),p+=1):c(m,r.strings[m]?"":!0,y);else if(/^-[^-]+/.test(y)){for(var x=y.slice(1,-1).split(""),M=!1,q=0;q<x.length;q++){if(D=y.slice(q+2),D==="-"){c(x[q],D,y);continue}if(/[A-Za-z]/.test(x[q])&&D[0]==="="){c(x[q],D.slice(1),y),M=!0;break}if(/[A-Za-z]/.test(x[q])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(D)){c(x[q],D,y),M=!0;break}if(x[q+1]&&x[q+1].match(/\W/)){c(x[q],y.slice(q+2),y),M=!0;break}else c(x[q],r.strings[x[q]]?"":!0,y)}m=y.slice(-1)[0],!M&&m!=="-"&&(t[p+1]&&!/^(-|--)[^-]/.test(t[p+1])&&!r.bools[m]&&(!n[m]||!i(m))?(c(m,t[p+1],y),p+=1):t[p+1]&&/^(true|false)$/.test(t[p+1])?(c(m,t[p+1]==="true",y),p+=1):c(m,r.strings[m]?"":!0,y))}else if((!r.unknownFn||r.unknownFn(y)!==!1)&&a._.push(r.strings._||!n0(y)?y:Number(y)),e.stopEarly){a._.push.apply(a._,t.slice(p+1));break}}return Object.keys(s).forEach(function(L){CR(a,L.split("."))||(f(a,L.split("."),s[L]),(n[L]||[]).forEach(function(V){f(a,V.split("."),s[L])}))}),e["--"]?a["--"]=h.slice():h.forEach(function(L){a._.push(L)}),a}});var c0=S((k4,l0)=>{var Ss=XD(),Ri=fe("path").join,_R=r0(),a0="/etc",u0=process.platform==="win32",vs=u0?process.env.USERPROFILE:process.env.HOME;l0.exports=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=o0()(process.argv.slice(2))),e=(typeof e=="string"?Ss.json(e):e)||{},n=n||Ss.parse;var i=Ss.env(t+"_"),s=[e],a=[];function l(f){if(!(a.indexOf(f)>=0)){var c=Ss.file(f);c&&(s.push(n(c)),a.push(f))}}return u0||[Ri(a0,t,"config"),Ri(a0,t+"rc")].forEach(l),vs&&[Ri(vs,".config",t,"config"),Ri(vs,".config",t),Ri(vs,"."+t,"config"),Ri(vs,"."+t+"rc")].forEach(l),l(Ss.find("."+t+"rc")),i.config&&l(i.config),r.config&&l(r.config),_R.apply(null,s.concat([i,r,a.length?{configs:a,config:a[a.length-1]}:void 0]))}});var d0=S((M4,h0)=>{var en=fe("constants"),SR=process.cwd,Da=null,vR=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Da||(Da=SR.call(process)),Da};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Lc=process.chdir,process.chdir=function(t){Da=null,Lc.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Lc));var Lc;h0.exports=AR;function AR(t){en.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=l(t.stat),t.fstat=l(t.fstat),t.lstat=l(t.lstat),t.statSync=f(t.statSync),t.fstatSync=f(t.fstatSync),t.lstatSync=f(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(h,p,y){y&&process.nextTick(y)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(h,p,y,m){m&&process.nextTick(m)},t.lchownSync=function(){}),vR==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:(function(h){function p(y,m,D){var _=Date.now(),A=0;h(y,m,function x(M){if(M&&(M.code==="EACCES"||M.code==="EPERM")&&Date.now()-_<6e4){setTimeout(function(){t.stat(m,function(q,L){q&&q.code==="ENOENT"?h(y,m,x):D(M)})},A),A<100&&(A+=10);return}D&&D(M)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,h),p})(t.rename)),t.read=typeof t.read!="function"?t.read:(function(h){function p(y,m,D,_,A,x){var M;if(x&&typeof x=="function"){var q=0;M=function(L,V,se){if(L&&L.code==="EAGAIN"&&q<10)return q++,h.call(t,y,m,D,_,A,M);x.apply(this,arguments)}}return h.call(t,y,m,D,_,A,M)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,h),p})(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:(function(h){return function(p,y,m,D,_){for(var A=0;;)try{return h.call(t,p,y,m,D,_)}catch(x){if(x.code==="EAGAIN"&&A<10){A++;continue}throw x}}})(t.readSync);function e(h){h.lchmod=function(p,y,m){h.open(p,en.O_WRONLY|en.O_SYMLINK,y,function(D,_){if(D){m&&m(D);return}h.fchmod(_,y,function(A){h.close(_,function(x){m&&m(A||x)})})})},h.lchmodSync=function(p,y){var m=h.openSync(p,en.O_WRONLY|en.O_SYMLINK,y),D=!0,_;try{_=h.fchmodSync(m,y),D=!1}finally{if(D)try{h.closeSync(m)}catch{}else h.closeSync(m)}return _}}function r(h){en.hasOwnProperty("O_SYMLINK")&&h.futimes?(h.lutimes=function(p,y,m,D){h.open(p,en.O_SYMLINK,function(_,A){if(_){D&&D(_);return}h.futimes(A,y,m,function(x){h.close(A,function(M){D&&D(x||M)})})})},h.lutimesSync=function(p,y,m){var D=h.openSync(p,en.O_SYMLINK),_,A=!0;try{_=h.futimesSync(D,y,m),A=!1}finally{if(A)try{h.closeSync(D)}catch{}else h.closeSync(D)}return _}):h.futimes&&(h.lutimes=function(p,y,m,D){D&&process.nextTick(D)},h.lutimesSync=function(){})}function n(h){return h&&function(p,y,m){return h.call(t,p,y,function(D){c(D)&&(D=null),m&&m.apply(this,arguments)})}}function i(h){return h&&function(p,y){try{return h.call(t,p,y)}catch(m){if(!c(m))throw m}}}function s(h){return h&&function(p,y,m,D){return h.call(t,p,y,m,function(_){c(_)&&(_=null),D&&D.apply(this,arguments)})}}function a(h){return h&&function(p,y,m){try{return h.call(t,p,y,m)}catch(D){if(!c(D))throw D}}}function l(h){return h&&function(p,y,m){typeof y=="function"&&(m=y,y=null);function D(_,A){A&&(A.uid<0&&(A.uid+=4294967296),A.gid<0&&(A.gid+=4294967296)),m&&m.apply(this,arguments)}return y?h.call(t,p,y,D):h.call(t,p,D)}}function f(h){return h&&function(p,y){var m=y?h.call(t,p,y):h.call(t,p);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function c(h){if(!h||h.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(h.code==="EINVAL"||h.code==="EPERM"))}}});var g0=S((N4,m0)=>{var p0=fe("stream").Stream;m0.exports=xR;function xR(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);p0.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var a=Object.keys(i),l=0,f=a.length;l<f;l++){var c=a[l];this[c]=i[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(h,p){if(h){s.emit("error",h),s.readable=!1;return}s.fd=p,s.emit("open",p),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);p0.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),a=0,l=s.length;a<l;a++){var f=s[a];this[f]=i[f]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var y0=S((q4,D0)=>{"use strict";D0.exports=OR;var RR=Object.getPrototypeOf||function(t){return t.__proto__};function OR(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:RR(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var F0=S((j4,qc)=>{var Ie=fe("fs"),TR=d0(),BR=g0(),PR=y0(),ya=fe("util"),Je,Ea;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Je=Symbol.for("graceful-fs.queue"),Ea=Symbol.for("graceful-fs.previous")):(Je="___graceful-fs.queue",Ea="___graceful-fs.previous");function IR(){}function w0(t,e){Object.defineProperty(t,Je,{get:function(){return e}})}var On=IR;ya.debuglog?On=ya.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(On=function(){var t=ya.format.apply(ya,arguments);t="GFS4: "+t.split(/\n/).join(`
41
- GFS4: `),console.error(t)});Ie[Je]||(b0=global[Je]||[],w0(Ie,b0),Ie.close=(function(t){function e(r,n){return t.call(Ie,r,function(i){i||E0(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Ea,{value:t}),e})(Ie.close),Ie.closeSync=(function(t){function e(r){t.apply(Ie,arguments),E0()}return Object.defineProperty(e,Ea,{value:t}),e})(Ie.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){On(Ie[Je]),fe("assert").equal(Ie[Je].length,0)}));var b0;global[Je]||w0(global,Ie[Je]);qc.exports=Mc(PR(Ie));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Ie.__patched&&(qc.exports=Mc(Ie),Ie.__patched=!0);function Mc(t){TR(t),t.gracefulify=Mc,t.createReadStream=V,t.createWriteStream=se;var e=t.readFile;t.readFile=r;function r(N,j,z){return typeof j=="function"&&(z=j,j=null),ce(N,j,z);function ce(W,ie,X,ae){return e(W,ie,function(ee){ee&&(ee.code==="EMFILE"||ee.code==="ENFILE")?Oi([ce,[W,ie,X],ee,ae||Date.now(),Date.now()]):typeof X=="function"&&X.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(N,j,z,ce){return typeof z=="function"&&(ce=z,z=null),W(N,j,z,ce);function W(ie,X,ae,ee,oe){return n(ie,X,ae,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Oi([W,[ie,X,ae,ee],Z,oe||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=a);function a(N,j,z,ce){return typeof z=="function"&&(ce=z,z=null),W(N,j,z,ce);function W(ie,X,ae,ee,oe){return s(ie,X,ae,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Oi([W,[ie,X,ae,ee],Z,oe||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}var l=t.copyFile;l&&(t.copyFile=f);function f(N,j,z,ce){return typeof z=="function"&&(ce=z,z=0),W(N,j,z,ce);function W(ie,X,ae,ee,oe){return l(ie,X,ae,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Oi([W,[ie,X,ae,ee],Z,oe||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}var c=t.readdir;t.readdir=p;var h=/^v[0-5]\./;function p(N,j,z){typeof j=="function"&&(z=j,j=null);var ce=h.test(process.version)?function(X,ae,ee,oe){return c(X,W(X,ae,ee,oe))}:function(X,ae,ee,oe){return c(X,ae,W(X,ae,ee,oe))};return ce(N,j,z);function W(ie,X,ae,ee){return function(oe,Z){oe&&(oe.code==="EMFILE"||oe.code==="ENFILE")?Oi([ce,[ie,X,ae],oe,ee||Date.now(),Date.now()]):(Z&&Z.sort&&Z.sort(),typeof ae=="function"&&ae.call(this,oe,Z))}}}if(process.version.substr(0,4)==="v0.8"){var y=BR(t);x=y.ReadStream,q=y.WriteStream}var m=t.ReadStream;m&&(x.prototype=Object.create(m.prototype),x.prototype.open=M);var D=t.WriteStream;D&&(q.prototype=Object.create(D.prototype),q.prototype.open=L),Object.defineProperty(t,"ReadStream",{get:function(){return x},set:function(N){x=N},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return q},set:function(N){q=N},enumerable:!0,configurable:!0});var _=x;Object.defineProperty(t,"FileReadStream",{get:function(){return _},set:function(N){_=N},enumerable:!0,configurable:!0});var A=q;Object.defineProperty(t,"FileWriteStream",{get:function(){return A},set:function(N){A=N},enumerable:!0,configurable:!0});function x(N,j){return this instanceof x?(m.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function M(){var N=this;_e(N.path,N.flags,N.mode,function(j,z){j?(N.autoClose&&N.destroy(),N.emit("error",j)):(N.fd=z,N.emit("open",z),N.read())})}function q(N,j){return this instanceof q?(D.apply(this,arguments),this):q.apply(Object.create(q.prototype),arguments)}function L(){var N=this;_e(N.path,N.flags,N.mode,function(j,z){j?(N.destroy(),N.emit("error",j)):(N.fd=z,N.emit("open",z))})}function V(N,j){return new t.ReadStream(N,j)}function se(N,j){return new t.WriteStream(N,j)}var le=t.open;t.open=_e;function _e(N,j,z,ce){return typeof z=="function"&&(ce=z,z=null),W(N,j,z,ce);function W(ie,X,ae,ee,oe){return le(ie,X,ae,function(Z,Jt){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Oi([W,[ie,X,ae,ee],Z,oe||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}return t}function Oi(t){On("ENQUEUE",t[0].name,t[1]),Ie[Je].push(t),Nc()}var ba;function E0(){for(var t=Date.now(),e=0;e<Ie[Je].length;++e)Ie[Je][e].length>2&&(Ie[Je][e][3]=t,Ie[Je][e][4]=t);Nc()}function Nc(){if(clearTimeout(ba),ba=void 0,Ie[Je].length!==0){var t=Ie[Je].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)On("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){On("TIMEOUT",e.name,r);var a=r.pop();typeof a=="function"&&a.call(null,n)}else{var l=Date.now()-s,f=Math.max(s-i,1),c=Math.min(f*1.2,100);l>=c?(On("RETRY",e.name,r),e.apply(null,r.concat([i]))):Ie[Je].push(t)}ba===void 0&&(ba=setTimeout(Nc,0))}}});var C0=S(Ti=>{"use strict";var $R=Ti&&Ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.readCAFileSync=void 0;var kR=$R(F0());function LR(t){try{let e=kR.default.readFileSync(t,"utf8"),r="-----END CERTIFICATE-----";return e.split(r).filter(i=>!!i.trim()).map(i=>`${i.trimLeft()}${r}`)}catch(e){if(e.code==="ENOENT")return;throw e}}Ti.readCAFileSync=LR});var _0=S(Tn=>{"use strict";var MR=Tn&&Tn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),NR=Tn&&Tn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&MR(e,t,r)};Object.defineProperty(Tn,"__esModule",{value:!0});NR(C0(),Tn)});var A0=S((H4,v0)=>{v0.exports=S0;function Bn(t,e){if(typeof Object.setPrototypeOf=="function")return Object.setPrototypeOf(t,e);t.__proto__=e}function S0(){this.list=[];var t=null;Object.defineProperty(this,"root",{get:function(){return t},set:function(e){t=e,this.list.length&&Bn(this.list[this.list.length-1],e)},enumerable:!0,configurable:!0})}S0.prototype={get length(){return this.list.length},get keys(){var t=[];for(var e in this.list[0])t.push(e);return t},get snapshot(){var t={};return this.keys.forEach(function(e){t[e]=this.get(e)},this),t},get store(){return this.list[0]},push:function(t){return typeof t!="object"&&(t={valueOf:t}),this.list.length>=1&&Bn(this.list[this.list.length-1],t),Bn(t,this.root),this.list.push(t)},pop:function(){return this.list.length>=2&&Bn(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(t){return Bn(t,this.list[0]||this.root),this.list.unshift(t)},shift:function(){return this.list.length===1&&Bn(this.list[0],this.root),this.list.shift()},get:function(t){return this.list[0][t]},set:function(t,e,r){return this.length||this.push({}),r&&this.list[0].hasOwnProperty(t)&&this.push({}),this.list[0][t]=e},forEach:function(t,e){for(var r in this.list[0])t.call(e,r,this.list[0][r])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var t=this.list.splice.apply(this.list,arguments),e=0,r=this.list.length;e<r;e++)Bn(this.list[e],this.list[e+1]||this.root);return t}}});var T0=S((Sr,O0)=>{var x0=A0(),As=fe("path"),wa=fe("fs"),jc=Pc(),Wc=fe("events").EventEmitter,qR=fe("url"),jR=fe("http"),Sr=O0.exports=function(){for(var t=[].slice.call(arguments),e=new it;t.length;){var r=t.shift();r&&e.push(typeof r=="string"?UR(r):r)}return e},z4=Sr.find=function(){var t=As.join.apply(null,[].slice.call(arguments));function e(r,n){var i=As.join(r,n);try{return wa.statSync(i),i}catch{if(As.dirname(r)!==r)return e(As.dirname(r),n)}}return e(__dirname,t)},WR=Sr.parse=function(t,e,r){if(t=""+t,r)if(r==="json")if(this.emit)try{return JSON.parse(t)}catch(n){this.emit("error",n)}else return JSON.parse(t);else return jc.parse(t);else try{return JSON.parse(t)}catch{return jc.parse(t)}},UR=Sr.json=function(){var t=[].slice.call(arguments).filter(function(n){return n!=null}),e=As.join.apply(null,t),r;try{r=wa.readFileSync(e,"utf-8")}catch{return}return WR(r,e,"json")},G4=Sr.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)i.indexOf(t)===0&&(r[i.substring(n)]=e[i]);return r};Sr.ConfigChain=it;function it(){Wc.apply(this),x0.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var R0={constructor:{value:it}};Object.keys(Wc.prototype).forEach(function(t){R0[t]=Object.getOwnPropertyDescriptor(Wc.prototype,t)});it.prototype=Object.create(x0.prototype,R0);it.prototype.del=function(t,e){if(e){var r=this.sources[e];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+e));delete r[t]}else for(var n=0,i=this.list.length;n<i;n++)delete this.list[n][t];return this};it.prototype.set=function(t,e,r){var n;if(r){if(n=this.sources[r],n=n&&n.data,!n)return this.emit("error",new Error("not found "+r))}else if(n=this.list[0],!n)return this.emit("error",new Error("cannot set, no confs!"));return n[t]=e,this};it.prototype.get=function(t,e){return e?(e=this.sources[e],e&&(e=e.data),e&&Object.hasOwnProperty.call(e,t)?e[t]:void 0):this.list[0][t]};it.prototype.save=function(t,s,r){typeof s=="function"&&(r=s,s=null);var n=this.sources[t];if(!n||!(n.path||n.source)||!n.data)return this.emit("error",new Error("bad save target: "+t));if(n.source){var i=n.prefix||"";return Object.keys(n.data).forEach(function(l){n.source[i+l]=n.data[l]}),this}var s=s||n.type,a=n.data;return n.type==="json"?a=JSON.stringify(a):a=jc.stringify(a),this._saving++,wa.writeFile(n.path,a,"utf8",function(l){if(this._saving--,l)return r?r(l):this.emit("error",l);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};it.prototype.addFile=function(t,e,r){r=r||t;var n={__source__:r};return this.sources[r]={path:t,type:e},this.push(n),this._await(),wa.readFile(t,"utf8",function(i,s){i&&this.emit("error",i),this.addString(s,t,e,n)}.bind(this)),this};it.prototype.addEnv=function(t,e,r){r=r||"env";var n=Sr.env(t,e);return this.sources[r]={data:n,source:e,prefix:t},this.add(n,r)};it.prototype.addUrl=function(t,e,r){this._await();var n=qR.format(t);r=r||n;var i={__source__:r};return this.sources[r]={href:n,type:e},this.push(i),jR.request(t,function(s){var a=[],l=s.headers["content-type"];e||(e=l.indexOf("json")!==-1?"json":l.indexOf("ini")!==-1?"ini":n.match(/\.json$/)?"json":n.match(/\.ini$/)?"ini":null,i.type=e),s.on("data",a.push.bind(a)).on("end",function(){this.addString(Buffer.concat(a),n,e,i)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};it.prototype.addString=function(t,e,r,n){return t=this.parse(t,e,r),this.add(t,n),this};it.prototype.add=function(t,e){if(e&&typeof e=="object"){var r=this.list.indexOf(e);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,t),e=e.__source__,this.sources[e]=this.sources[e]||{},this.sources[e].data=t,this._resolve()}else typeof e=="string"&&(this.sources[e]=this.sources[e]||{},this.sources[e].data=t),this._await(),this.push(t),process.nextTick(this._resolve.bind(this));return this};it.prototype.parse=Sr.parse;it.prototype._await=function(){this._awaiting++};it.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var I0=S((V4,P0)=>{P0.exports=function(t){let e=t.indexOf(":");if(e===-1)return B0(t);let r=t.substr(0,e),n=t.substr(e+1);return`${r}:${B0(n)}`};function B0(t){if(t=t.toLowerCase(),t==="_authtoken")return"_authToken";let e=t[0];for(let r=1;r<t.length;r++)e+=t[r]==="_"?"-":t[r];return e}});var $0=S(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.envReplace=void 0;var HR=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function zR(t,e){return t.replace(HR,GR.bind(null,e))}Fa.envReplace=zR;function GR(t,e,r,n){if(r.length%2)return e.slice((r.length+1)/2);let i=YR(t,n);if(i===void 0)throw new Error(`Failed to replace env in config: ${e}`);return`${r.slice(r.length/2)}${i}`}var VR=/([^:-]+)(:?)-(.+)/;function YR(t,e){let r=e.match(VR);if(!r)return t[e];let[,n,i,s]=r;return Object.prototype.hasOwnProperty.call(t,n)?!t[n]&&i?s:t[n]:s}});var k0=S(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.envReplace=void 0;var KR=$0();Object.defineProperty(Ca,"envReplace",{enumerable:!0,get:function(){return KR.envReplace}})});var L0=S(xs=>{"use strict";var XR=fe("fs"),Pn=fe("path"),{envReplace:Uc}=k0(),JR=t=>typeof t!="string"?t:Uc(t,process.env),QR=(t,e,r)=>{if(typeof e!="string")return e;let n=[].concat(t[r]),i=n.indexOf(Pn)!==-1,s=n.indexOf(Boolean)!==-1,a=n.indexOf(String)!==-1,l=n.indexOf(Number)!==-1;if(e=`${e}`.trim(),/^".*"$/.test(e))try{e=JSON.parse(e)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${e}`)}if(s&&!a&&e==="")return!0;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}let f=Uc(e,process.env);if((r.endsWith(":tokenHelper")||r==="tokenHelper")&&f!==e)throw new Error(`It is not allowed to use environment variables in the value of the ${r} setting.`);return e=f,i&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(e)&&process.env.HOME&&(e=Pn.resolve(process.env.HOME,e.substr(2))),e=Pn.resolve(e)),l&&!isNaN(e)&&(e=Number(e)),e},ZR=t=>{t=Pn.resolve(t);let e=!1;for(;Pn.basename(t)==="node_modules";)t=Pn.dirname(t),e=!0;if(e)return t;let r=(n,i)=>{let s=/^[a-zA-Z]:(\\|\/)?$/;if(n==="/"||process.platform==="win32"&&s.test(n))return i;try{let a=XR.readdirSync(n);if(a.includes("node_modules")||a.includes("package.json")||a.includes("package.json5")||a.includes("package.yaml")||a.includes("pnpm-workspace.yaml"))return n;let l=Pn.dirname(n);return l===n?i:r(l,i)}catch(a){if(n===i){if(a.code==="ENOENT")return i;throw a}return i}};return r(t,t)};xs.envReplace=Uc;xs.findPrefix=ZR;xs.parseField=QR;xs.parseKey=JR});var q0=S(N0=>{"use strict";var In=fe("path"),e3=fe("stream").Stream,_a=fe("url"),t3=()=>{},r3=()=>[],M0=()=>{};N0.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],audit:Boolean,"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:In,cache:In,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:["always",Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:In,"global-style":Boolean,group:[Number,String],"https-proxy":[null,_a],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":In,"init-author-name":String,"init-author-email":String,"init-author-url":["",_a],"init-license":String,"init-version":M0,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":r3(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:e3,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,M0],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:In,production:Boolean,progress:Boolean,proxy:[null,!1,_a],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,_a],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,"auto","warn-only"],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,"oauth","saml"],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:In,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:In,umask:t3,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var U0=S((Q4,W0)=>{"use strict";var{readCAFileSync:n3}=_0(),j0=fe("fs"),Hc=fe("path"),{ConfigChain:i3}=T0(),s3=I0(),zc=L0(),Gc=class extends i3{constructor(e,r){super(e),this.root=e,this._parseField=zc.parseField.bind(null,r||q0())}add(e,r){try{for(let[n,i]of Object.entries(e)){let s=zc.parseKey(n);s!==n&&delete e[n],e[s]=this._parseField(i,s)}}catch(n){throw n}return super.add(e,r)}addFile(e,r){r=r||e;let n={__source__:r};this.sources[r]={path:e,type:"ini"},this.push(n),this._await();try{let i=j0.readFileSync(e,"utf8");this.addString(i,e,"ini",n)}catch(i){if(i.code==="ENOENT")this.add({},n);else if(i.code!=="EISDIR")return`Issue while reading "${e}". ${i.message}`}}addEnv(e){e=e||process.env;let r={};return Object.keys(e).filter(n=>/^npm_config_/i.test(n)).forEach(n=>{if(!e[n])return;let i=s3(n.substr(11)),s=e[n];r[i]=o3(i,s)}),super.addEnv("",r,"env")}loadPrefix(){let e=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:n=>{let i=this.get("global");this[i?"globalPrefix":"localPrefix"]=n},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:n=>{this.set("prefix",n)},get:()=>Hc.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:n=>{r=n},get:()=>r}),Object.prototype.hasOwnProperty.call(e,"prefix"))r=Hc.resolve(e.prefix);else try{r=zc.findPrefix(process.cwd())}catch(n){throw n}return r}loadCAFile(e){if(!e)return;let r=n3(e);r&&this.set("ca",r)}loadUser(){let e=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let r=Hc.resolve(this.get("prefix"));try{let n=j0.statSync(r);e.user=n.uid}catch(n){if(n.code==="ENOENT")return;throw n}}};function o3(t,e){function r(n){return n.indexOf(`
42
-
43
- `)?n.split(`
44
-
45
- `):n.split(",")}switch(t){case"hoist-pattern":case"public-hoist-pattern":return r(e)}return e}W0.exports=Gc});var K0=S(Y0=>{"use strict";var G0=fe("os"),vr=fe("path"),V0=G0.tmpdir(),a3=process.getuid?process.getuid():process.pid,u3=()=>!0,H0=process.platform==="win32",z0={editor:()=>process.env.EDITOR||process.env.VISUAL||(H0?"notepad.exe":"vi"),shell:()=>H0?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},l3={fromString:()=>process.umask()},Bi=G0.homedir();Bi?process.env.HOME=Bi:Bi=vr.resolve(V0,"npm-"+a3);var c3=process.platform==="win32"?"npm-cache":".npm",f3=process.platform==="win32"&&process.env.APPDATA||Bi,h3=vr.resolve(f3,c3),Sa,$n;Object.defineProperty(Y0,"defaults",{get:function(){return Sa||(process.env.PREFIX?$n=process.env.PREFIX:process.platform==="win32"?$n=vr.dirname(process.execPath):($n=vr.dirname(vr.dirname(process.execPath)),process.env.DESTDIR&&($n=vr.join(process.env.DESTDIR,$n))),Sa={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:h3,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:z0.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:vr.resolve($n,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":vr.resolve(Bi,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:$n,production:!1,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:z0.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:V0,unicode:u3(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:vr.resolve(Bi,".npmrc"),umask:process.umask?process.umask():l3.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},Sa)}})});var J0=S((eM,Vc)=>{"use strict";var kn=fe("path"),d3=U0(),X0=K0();Vc.exports=(t,e,r)=>{let n=new d3(Object.assign({},X0.defaults,r),e);n.add(Object.assign({},t),"cli");let i=[],s=!1;if(fe.resolve.paths){let c=fe.resolve.paths("npm"),h;try{h=fe.resolve("npm",{paths:c.slice(-1)})}catch{s=!0}h&&i.push(n.addFile(kn.resolve(kn.dirname(h),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let a=kn.resolve(n.localPrefix,".npmrc"),l=n.get("userconfig");if(!n.get("global")&&a!==l?i.push(n.addFile(a,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==a){let c=kn.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(c,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let c=kn.resolve(n.get("prefix"),"etc");n.root.globalconfig=kn.resolve(c,"npmrc"),n.root.globalignorefile=kn.resolve(c,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let f=n.get("cafile");return f&&n.loadCAFile(f),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:s}};Object.defineProperty(Vc.exports,"defaults",{get(){return X0.defaults},enumerable:!0})});var sy=S((rM,iy)=>{var Q0=J0(),Z0=":_authToken",ey=":_auth",ty=":username",ry=":_password";iy.exports=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:Q0()).config,e=e||r.npmrc.get("registry")||Q0.defaults.registry,ny(e,r)||m3(r.npmrc)};function p3(t,e){let r=new URL(e,new URL(t.startsWith("//")?`./${t}`:t,"resolve://"));if(r.protocol==="resolve:"){let{pathname:n,search:i,hash:s}=r;return n+i+s}return r.toString()}function ny(t,e){let r=t instanceof URL?t:new URL(t.startsWith("//")?`http:${t}`:t),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),s=D3(i,e.npmrc);if(s)return s;if(!e.recursive)return/\/$/.test(t)?void 0:ny(new URL("./",r),e);r.pathname=p3(g3(n),"..")||"/"}}function m3(t){return t.get("_auth")?{token:va(t.get("_auth")),type:"Basic"}:void 0}function g3(t){return t[t.length-1]==="/"?t:t+"/"}function D3(t,e){let r=y3(e.get(t+Z0)||e.get(t+"/"+Z0));if(r)return r;let n=e.get(t+ty)||e.get(t+"/"+ty),i=e.get(t+ry)||e.get(t+"/"+ry),s=b3(n,i);if(s)return s;let a=E3(e.get(t+ey)||e.get(t+"/"+ey));if(a)return a}function va(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function y3(t){return t?{token:va(t),type:"Bearer"}:void 0}function b3(t,e){if(!t||!e)return;let r=Buffer.from(va(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function E3(t){return t?{token:va(t),type:"Basic"}:void 0}});var ay=S((nM,oy)=>{"use strict";var w3=vn(),F3=(t,e)=>{let r=w3(t,e);return r?r.version:null};oy.exports=F3});var ly=S((iM,uy)=>{"use strict";var C3=vn(),_3=(t,e)=>{let r=C3(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};uy.exports=_3});var hy=S((sM,fy)=>{"use strict";var cy=nt(),S3=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new cy(t instanceof cy?t.version:t,r).inc(e,n,i).version}catch{return null}};fy.exports=S3});var py=S((oM,dy)=>{"use strict";var v3=nt(),A3=(t,e)=>new v3(t,e).major;dy.exports=A3});var gy=S((aM,my)=>{"use strict";var x3=nt(),R3=(t,e)=>new x3(t,e).minor;my.exports=R3});var yy=S((uM,Dy)=>{"use strict";var O3=nt(),T3=(t,e)=>new O3(t,e).patch;Dy.exports=T3});var Ey=S((lM,by)=>{"use strict";var B3=vn(),P3=(t,e)=>{let r=B3(t,e);return r&&r.prerelease.length?r.prerelease:null};by.exports=P3});var Fy=S((cM,wy)=>{"use strict";var I3=Bt(),$3=(t,e,r)=>I3(e,t,r);wy.exports=$3});var _y=S((fM,Cy)=>{"use strict";var k3=Bt(),L3=(t,e)=>k3(t,e,!0);Cy.exports=L3});var Aa=S((hM,vy)=>{"use strict";var Sy=nt(),M3=(t,e,r)=>{let n=new Sy(t,r),i=new Sy(e,r);return n.compare(i)||n.compareBuild(i)};vy.exports=M3});var xy=S((dM,Ay)=>{"use strict";var N3=Aa(),q3=(t,e)=>t.sort((r,n)=>N3(r,n,e));Ay.exports=q3});var Oy=S((pM,Ry)=>{"use strict";var j3=Aa(),W3=(t,e)=>t.sort((r,n)=>j3(n,r,e));Ry.exports=W3});var xa=S((mM,Ty)=>{"use strict";var U3=Bt(),H3=(t,e,r)=>U3(t,e,r)<0;Ty.exports=H3});var Yc=S((gM,By)=>{"use strict";var z3=Bt(),G3=(t,e,r)=>z3(t,e,r)===0;By.exports=G3});var Kc=S((DM,Py)=>{"use strict";var V3=Bt(),Y3=(t,e,r)=>V3(t,e,r)!==0;Py.exports=Y3});var Ra=S((yM,Iy)=>{"use strict";var K3=Bt(),X3=(t,e,r)=>K3(t,e,r)>=0;Iy.exports=X3});var Oa=S((bM,$y)=>{"use strict";var J3=Bt(),Q3=(t,e,r)=>J3(t,e,r)<=0;$y.exports=Q3});var Xc=S((EM,ky)=>{"use strict";var Z3=Yc(),eO=Kc(),tO=_i(),rO=Ra(),nO=xa(),iO=Oa(),sO=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return Z3(t,r,n);case"!=":return eO(t,r,n);case">":return tO(t,r,n);case">=":return rO(t,r,n);case"<":return nO(t,r,n);case"<=":return iO(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};ky.exports=sO});var My=S((wM,Ly)=>{"use strict";var oO=nt(),aO=vn(),{safeRe:Ta,t:Ba}=Ci(),uO=(t,e)=>{if(t instanceof oO)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Ta[Ba.COERCEFULL]:Ta[Ba.COERCE]);else{let f=e.includePrerelease?Ta[Ba.COERCERTLFULL]:Ta[Ba.COERCERTL],c;for(;(c=f.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||c.index+c[0].length!==r.index+r[0].length)&&(r=c),f.lastIndex=c.index+c[1].length+c[2].length;f.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",l=e.includePrerelease&&r[6]?`+${r[6]}`:"";return aO(`${n}.${i}.${s}${a}${l}`,e)};Ly.exports=uO});var qy=S((FM,Ny)=>{"use strict";var Jc=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};Ny.exports=Jc});var Pt=S((CM,Hy)=>{"use strict";var lO=/\s+/g,Qc=class t{constructor(e,r){if(r=fO(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof Zc)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(lO," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!Wy(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&yO(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&gO)|(this.options.loose&&DO))+":"+e,i=jy.get(n);if(i)return i;let s=this.options.loose,a=s?ut[st.HYPHENRANGELOOSE]:ut[st.HYPHENRANGE];e=e.replace(a,xO(this.options.includePrerelease)),Re("hyphen replace",e),e=e.replace(ut[st.COMPARATORTRIM],dO),Re("comparator trim",e),e=e.replace(ut[st.TILDETRIM],pO),Re("tilde trim",e),e=e.replace(ut[st.CARETTRIM],mO),Re("caret trim",e);let l=e.split(" ").map(p=>bO(p,this.options)).join(" ").split(/\s+/).map(p=>AO(p,this.options));s&&(l=l.filter(p=>(Re("loose invalid filter",p,this.options),!!p.match(ut[st.COMPARATORLOOSE])))),Re("range list",l);let f=new Map,c=l.map(p=>new Zc(p,this.options));for(let p of c){if(Wy(p))return[p];f.set(p.value,p)}f.size>1&&f.has("")&&f.delete("");let h=[...f.values()];return jy.set(n,h),h}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Uy(n,r)&&e.set.some(i=>Uy(i,r)&&n.every(s=>i.every(a=>s.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new hO(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(RO(this.set[r],e,this.options))return!0;return!1}};Hy.exports=Qc;var cO=qy(),jy=new cO,fO=oa(),Zc=Rs(),Re=bs(),hO=nt(),{safeRe:ut,t:st,comparatorTrimReplace:dO,tildeTrimReplace:pO,caretTrimReplace:mO}=Ci(),{FLAG_INCLUDE_PRERELEASE:gO,FLAG_LOOSE:DO}=Es(),Wy=t=>t.value==="<0.0.0-0",yO=t=>t.value==="",Uy=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(s=>i.intersects(s,e)),i=n.pop();return r},bO=(t,e)=>(t=t.replace(ut[st.BUILD],""),Re("comp",t,e),t=FO(t,e),Re("caret",t),t=EO(t,e),Re("tildes",t),t=_O(t,e),Re("xrange",t),t=vO(t,e),Re("stars",t),t),lt=t=>!t||t.toLowerCase()==="x"||t==="*",EO=(t,e)=>t.trim().split(/\s+/).map(r=>wO(r,e)).join(" "),wO=(t,e)=>{let r=e.loose?ut[st.TILDELOOSE]:ut[st.TILDE];return t.replace(r,(n,i,s,a,l)=>{Re("tilde",t,n,i,s,a,l);let f;return lt(i)?f="":lt(s)?f=`>=${i}.0.0 <${+i+1}.0.0-0`:lt(a)?f=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:l?(Re("replaceTilde pr",l),f=`>=${i}.${s}.${a}-${l} <${i}.${+s+1}.0-0`):f=`>=${i}.${s}.${a} <${i}.${+s+1}.0-0`,Re("tilde return",f),f})},FO=(t,e)=>t.trim().split(/\s+/).map(r=>CO(r,e)).join(" "),CO=(t,e)=>{Re("caret",t,e);let r=e.loose?ut[st.CARETLOOSE]:ut[st.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,s,a,l,f)=>{Re("caret",t,i,s,a,l,f);let c;return lt(s)?c="":lt(a)?c=`>=${s}.0.0${n} <${+s+1}.0.0-0`:lt(l)?s==="0"?c=`>=${s}.${a}.0${n} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.0${n} <${+s+1}.0.0-0`:f?(Re("replaceCaret pr",f),s==="0"?a==="0"?c=`>=${s}.${a}.${l}-${f} <${s}.${a}.${+l+1}-0`:c=`>=${s}.${a}.${l}-${f} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.${l}-${f} <${+s+1}.0.0-0`):(Re("no pr"),s==="0"?a==="0"?c=`>=${s}.${a}.${l}${n} <${s}.${a}.${+l+1}-0`:c=`>=${s}.${a}.${l}${n} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.${l} <${+s+1}.0.0-0`),Re("caret return",c),c})},_O=(t,e)=>(Re("replaceXRanges",t,e),t.split(/\s+/).map(r=>SO(r,e)).join(" ")),SO=(t,e)=>{t=t.trim();let r=e.loose?ut[st.XRANGELOOSE]:ut[st.XRANGE];return t.replace(r,(n,i,s,a,l,f)=>{Re("xRange",t,n,i,s,a,l,f);let c=lt(s),h=c||lt(a),p=h||lt(l),y=p;return i==="="&&y&&(i=""),f=e.includePrerelease?"-0":"",c?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&y?(h&&(a=0),l=0,i===">"?(i=">=",h?(s=+s+1,a=0,l=0):(a=+a+1,l=0)):i==="<="&&(i="<",h?s=+s+1:a=+a+1),i==="<"&&(f="-0"),n=`${i+s}.${a}.${l}${f}`):h?n=`>=${s}.0.0${f} <${+s+1}.0.0-0`:p&&(n=`>=${s}.${a}.0${f} <${s}.${+a+1}.0-0`),Re("xRange return",n),n})},vO=(t,e)=>(Re("replaceStars",t,e),t.trim().replace(ut[st.STAR],"")),AO=(t,e)=>(Re("replaceGTE0",t,e),t.trim().replace(ut[e.includePrerelease?st.GTE0PRE:st.GTE0],"")),xO=t=>(e,r,n,i,s,a,l,f,c,h,p,y)=>(lt(n)?r="":lt(i)?r=`>=${n}.0.0${t?"-0":""}`:lt(s)?r=`>=${n}.${i}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,lt(c)?f="":lt(h)?f=`<${+c+1}.0.0-0`:lt(p)?f=`<${c}.${+h+1}.0-0`:y?f=`<=${c}.${h}.${p}-${y}`:t?f=`<${c}.${h}.${+p+1}-0`:f=`<=${f}`,`${r} ${f}`.trim()),RO=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Re(t[n].semver),t[n].semver!==Zc.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Rs=S((_M,Xy)=>{"use strict";var Os=Symbol("SemVer ANY"),rf=class t{static get ANY(){return Os}constructor(e,r){if(r=zy(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),tf("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Os?this.value="":this.value=this.operator+this.semver.version,tf("comp",this)}parse(e){let r=this.options.loose?Gy[Vy.COMPARATORLOOSE]:Gy[Vy.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Yy(n[2],this.options.loose):this.semver=Os}toString(){return this.value}test(e){if(tf("Comparator.test",e,this.options.loose),this.semver===Os||e===Os)return!0;if(typeof e=="string")try{e=new Yy(e,this.options)}catch{return!1}return ef(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Ky(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Ky(this.value,r).test(e.semver):(r=zy(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||ef(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ef(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Xy.exports=rf;var zy=oa(),{safeRe:Gy,t:Vy}=Ci(),ef=Xc(),tf=bs(),Yy=nt(),Ky=Pt()});var Ts=S((SM,Jy)=>{"use strict";var OO=Pt(),TO=(t,e,r)=>{try{e=new OO(e,r)}catch{return!1}return e.test(t)};Jy.exports=TO});var Zy=S((vM,Qy)=>{"use strict";var BO=Pt(),PO=(t,e)=>new BO(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Qy.exports=PO});var tb=S((AM,eb)=>{"use strict";var IO=nt(),$O=Pt(),kO=(t,e,r)=>{let n=null,i=null,s=null;try{s=new $O(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new IO(n,r))}),n};eb.exports=kO});var nb=S((xM,rb)=>{"use strict";var LO=nt(),MO=Pt(),NO=(t,e,r)=>{let n=null,i=null,s=null;try{s=new MO(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new LO(n,r))}),n};rb.exports=NO});var ob=S((RM,sb)=>{"use strict";var nf=nt(),qO=Pt(),ib=_i(),jO=(t,e)=>{t=new qO(t,e);let r=new nf("0.0.0");if(t.test(r)||(r=new nf("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],s=null;i.forEach(a=>{let l=new nf(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!s||ib(l,s))&&(s=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!r||ib(r,s))&&(r=s)}return r&&t.test(r)?r:null};sb.exports=jO});var ub=S((OM,ab)=>{"use strict";var WO=Pt(),UO=(t,e)=>{try{return new WO(t,e).range||"*"}catch{return null}};ab.exports=UO});var Pa=S((TM,hb)=>{"use strict";var HO=nt(),fb=Rs(),{ANY:zO}=fb,GO=Pt(),VO=Ts(),lb=_i(),cb=xa(),YO=Oa(),KO=Ra(),XO=(t,e,r,n)=>{t=new HO(t,n),e=new GO(e,n);let i,s,a,l,f;switch(r){case">":i=lb,s=YO,a=cb,l=">",f=">=";break;case"<":i=cb,s=KO,a=lb,l="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(VO(t,e,n))return!1;for(let c=0;c<e.set.length;++c){let h=e.set[c],p=null,y=null;if(h.forEach(m=>{m.semver===zO&&(m=new fb(">=0.0.0")),p=p||m,y=y||m,i(m.semver,p.semver,n)?p=m:a(m.semver,y.semver,n)&&(y=m)}),p.operator===l||p.operator===f||(!y.operator||y.operator===l)&&s(t,y.semver))return!1;if(y.operator===f&&a(t,y.semver))return!1}return!0};hb.exports=XO});var pb=S((BM,db)=>{"use strict";var JO=Pa(),QO=(t,e,r)=>JO(t,e,">",r);db.exports=QO});var gb=S((PM,mb)=>{"use strict";var ZO=Pa(),eT=(t,e,r)=>ZO(t,e,"<",r);mb.exports=eT});var bb=S((IM,yb)=>{"use strict";var Db=Pt(),tT=(t,e,r)=>(t=new Db(t,r),e=new Db(e,r),t.intersects(e,r));yb.exports=tT});var wb=S(($M,Eb)=>{"use strict";var rT=Ts(),nT=Bt();Eb.exports=(t,e,r)=>{let n=[],i=null,s=null,a=t.sort((h,p)=>nT(h,p,r));for(let h of a)rT(h,e,r)?(s=h,i||(i=h)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let l=[];for(let[h,p]of n)h===p?l.push(h):!p&&h===a[0]?l.push("*"):p?h===a[0]?l.push(`<=${p}`):l.push(`${h} - ${p}`):l.push(`>=${h}`);let f=l.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return f.length<c.length?f:e}});var Ab=S((kM,vb)=>{"use strict";var Fb=Pt(),of=Rs(),{ANY:sf}=of,Bs=Ts(),af=Bt(),iT=(t,e,r={})=>{if(t===e)return!0;t=new Fb(t,r),e=new Fb(e,r);let n=!1;e:for(let i of t.set){for(let s of e.set){let a=oT(i,s,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},sT=[new of(">=0.0.0-0")],Cb=[new of(">=0.0.0")],oT=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===sf){if(e.length===1&&e[0].semver===sf)return!0;r.includePrerelease?t=sT:t=Cb}if(e.length===1&&e[0].semver===sf){if(r.includePrerelease)return!0;e=Cb}let n=new Set,i,s;for(let m of t)m.operator===">"||m.operator===">="?i=_b(i,m,r):m.operator==="<"||m.operator==="<="?s=Sb(s,m,r):n.add(m.semver);if(n.size>1)return null;let a;if(i&&s){if(a=af(i.semver,s.semver,r),a>0)return null;if(a===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let m of n){if(i&&!Bs(m,String(i),r)||s&&!Bs(m,String(s),r))return null;for(let D of e)if(!Bs(m,String(D),r))return!1;return!0}let l,f,c,h,p=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,y=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let m of e){if(h=h||m.operator===">"||m.operator===">=",c=c||m.operator==="<"||m.operator==="<=",i){if(y&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===y.major&&m.semver.minor===y.minor&&m.semver.patch===y.patch&&(y=!1),m.operator===">"||m.operator===">="){if(l=_b(i,m,r),l===m&&l!==i)return!1}else if(i.operator===">="&&!Bs(i.semver,String(m),r))return!1}if(s){if(p&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===p.major&&m.semver.minor===p.minor&&m.semver.patch===p.patch&&(p=!1),m.operator==="<"||m.operator==="<="){if(f=Sb(s,m,r),f===m&&f!==s)return!1}else if(s.operator==="<="&&!Bs(s.semver,String(m),r))return!1}if(!m.operator&&(s||i)&&a!==0)return!1}return!(i&&c&&!s&&a!==0||s&&h&&!i&&a!==0||y||p)},_b=(t,e,r)=>{if(!t)return e;let n=af(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Sb=(t,e,r)=>{if(!t)return e;let n=af(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};vb.exports=iT});var Tb=S((LM,Ob)=>{"use strict";var uf=Ci(),xb=Es(),aT=nt(),Rb=wc(),uT=vn(),lT=ay(),cT=ly(),fT=hy(),hT=_c(),dT=py(),pT=gy(),mT=yy(),gT=Ey(),DT=Bt(),yT=Fy(),bT=_y(),ET=Aa(),wT=xy(),FT=Oy(),CT=_i(),_T=xa(),ST=Yc(),vT=Kc(),AT=Ra(),xT=Oa(),RT=Xc(),OT=My(),TT=Rs(),BT=Pt(),PT=Ts(),IT=Zy(),$T=tb(),kT=nb(),LT=ob(),MT=ub(),NT=Pa(),qT=pb(),jT=gb(),WT=bb(),UT=wb(),HT=Ab();Ob.exports={parse:uT,valid:lT,clean:cT,inc:fT,diff:hT,major:dT,minor:pT,patch:mT,prerelease:gT,compare:DT,rcompare:yT,compareLoose:bT,compareBuild:ET,sort:wT,rsort:FT,gt:CT,lt:_T,eq:ST,neq:vT,gte:AT,lte:xT,cmp:RT,coerce:OT,Comparator:TT,Range:BT,satisfies:PT,toComparators:IT,maxSatisfying:$T,minSatisfying:kT,minVersion:LT,validRange:MT,outside:NT,gtr:qT,ltr:jT,intersects:WT,simplifyRange:UT,subset:HT,SemVer:aT,re:uf.re,src:uf.src,tokens:uf.t,SEMVER_SPEC_VERSION:xb.SEMVER_SPEC_VERSION,RELEASE_TYPES:xb.RELEASE_TYPES,compareIdentifiers:Rb.compareIdentifiers,rcompareIdentifiers:Rb.rcompareIdentifiers}});var qb=S((VM,Nb)=>{var{hasOwnProperty:df}=Object.prototype,pf=(t,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let r=e.platform==="win32"?`\r
46
- `:`
47
- `,n=e.whitespace?" = ":"=",i=[],s=e.sort?Object.keys(t).sort():Object.keys(t),a=0;e.align&&(a=Ar(s.filter(c=>t[c]===null||Array.isArray(t[c])||typeof t[c]!="object").map(c=>Array.isArray(t[c])?`${c}[]`:c).concat([""]).reduce((c,h)=>Ar(c).length>=Ar(h).length?c:h)).length);let l="",f=e.bracketedArray?"[]":"";for(let c of s){let h=t[c];if(h&&Array.isArray(h))for(let p of h)l+=Ar(`${c}${f}`).padEnd(a," ")+n+Ar(p)+r;else h&&typeof h=="object"?i.push(c):l+=Ar(c).padEnd(a," ")+n+Ar(h)+r}e.section&&l.length&&(l="["+Ar(e.section)+"]"+(e.newline?r+r:r)+l);for(let c of i){let h=Lb(c,".").join("\\."),p=(e.section?e.section+".":"")+h,y=pf(t[c],{...e,section:p});l.length&&y.length&&(l+=r),l+=y}return l};function Lb(t,e){var r=0,n=0,i=0,s=[];do if(i=t.indexOf(e,r),i!==-1){if(r=i+e.length,i>0&&t[i-1]==="\\")continue;s.push(t.slice(n,i)),n=i+e.length}while(i!==-1);return s.push(t.slice(n)),s}var kb=(t,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let r=Object.create(null),n=r,i=null,s=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,a=t.split(/[\r\n]+/g),l={};for(let c of a){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;let h=c.match(s);if(!h)continue;if(h[1]!==void 0){if(i=$a(h[1]),i==="__proto__"){n=Object.create(null);continue}n=r[i]=r[i]||Object.create(null);continue}let p=$a(h[2]),y;e.bracketedArray?y=p.length>2&&p.slice(-2)==="[]":(l[p]=(l?.[p]||0)+1,y=l[p]>1);let m=y?p.slice(0,-2):p;if(m==="__proto__")continue;let D=h[3]?$a(h[4]):!0,_=D==="true"||D==="false"||D==="null"?JSON.parse(D):D;y&&(df.call(n,m)?Array.isArray(n[m])||(n[m]=[n[m]]):n[m]=[]),Array.isArray(n[m])?n[m].push(_):n[m]=_}let f=[];for(let c of Object.keys(r)){if(!df.call(r,c)||typeof r[c]!="object"||Array.isArray(r[c]))continue;let h=Lb(c,".");n=r;let p=h.pop(),y=p.replace(/\\\./g,".");for(let m of h)m!=="__proto__"&&((!df.call(n,m)||typeof n[m]!="object")&&(n[m]=Object.create(null)),n=n[m]);n===r&&y===p||(n[y]=r[c],f.push(c))}for(let c of f)delete r[c];return r},Mb=t=>t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"),Ar=t=>typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&Mb(t)||t!==t.trim()?JSON.stringify(t):t.split(";").join("\\;").split("#").join("\\#"),$a=(t,e)=>{if(t=(t||"").trim(),Mb(t)){t.charAt(0)==="'"&&(t=t.slice(1,-1));try{t=JSON.parse(t)}catch{}}else{let r=!1,n="";for(let i=0,s=t.length;i<s;i++){let a=t.charAt(i);if(r)"\\;#".indexOf(a)!==-1?n+=a:n+="\\"+a,r=!1;else{if(";#".indexOf(a)!==-1)break;a==="\\"?r=!0:n+=a}}return r&&(n+="\\"),n.trim()}return t};Nb.exports={parse:kb,decode:kb,stringify:pf,encode:pf,safe:Ar,unsafe:$a}});function yf({onlyFirst:t=!1}={}){let i="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(i,t?void 0:"g")}var Vb=te(()=>{});function Ln(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(nB,"")}var nB,Ma=te(()=>{Vb();nB=yf()});function Yb(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function Kb(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function Xb(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}var Jb=te(()=>{});function iB(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function Qb(t,{ambiguousAsWide:e=!1}={}){return iB(t),Kb(t)||Xb(t)||e&&Yb(t)?2:1}var Zb=te(()=>{Jb()});var tE=S((pN,eE)=>{eE.exports=()=>/[#*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-\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-\uDED8\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\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\uDD3C-\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-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\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\uDE70]|\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\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});function Qe(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=e;if(n||(t=Ln(t)),t.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:a}of sB.segment(t)){let l=a.codePointAt(0);if(!(l<=31||l>=127&&l<=159)&&!(l>=8203&&l<=8207||l===65279)&&!(l>=768&&l<=879||l>=6832&&l<=6911||l>=7616&&l<=7679||l>=8400&&l<=8447||l>=65056&&l<=65071)&&!(l>=55296&&l<=57343)&&!(l>=65024&&l<=65039)&&!oB.test(a)){if((0,rE.default)().test(a)){i+=2;continue}i+=Qb(l,s)}}return i}var rE,sB,oB,$s=te(()=>{Ma();Zb();rE=We(tE(),1),sB=new Intl.Segmenter,oB=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});var nE=S((EN,aB)=>{aB.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var Ef=S((wN,bf)=>{"use strict";var iE=nE();bf.exports=iE;bf.exports.default=iE});var cE=S((CN,lE)=>{"use strict";lE.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var hE=S((_N,fE)=>{"use strict";var pB=cE();fE.exports=t=>typeof t=="string"?t.replace(pB(),""):t});var pE=S((SN,Cf)=>{"use strict";var dE=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);Cf.exports=dE;Cf.exports.default=dE});var gE=S((vN,mE)=>{"use strict";mE.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 Sf=S((AN,_f)=>{"use strict";var mB=hE(),gB=pE(),DB=gE(),DE=t=>{if(typeof t!="string"||t.length===0||(t=mB(t),t.length===0))return 0;t=t.replace(DB()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=gB(n)?2:1)}return e};_f.exports=DE;_f.exports.default=DE});var bE=S((xN,yE)=>{"use strict";var yB=Sf();function Mn(t,e){if(!t)return t;e=e||{};let r=e.align||"center";if(r==="left")return t;let n=e.split||`
48
- `,i=e.pad||" ",s=r!=="right"?bB:EB,a=!1;Array.isArray(t)||(a=!0,t=String(t).split(n));let l,f=0;return t=t.map(function(c){return c=String(c),l=yB(c),f=Math.max(l,f),{str:c,width:l}}).map(function(c){return new Array(s(f,c.width)+1).join(i)+c.str}),a?t.join(n):t}Mn.left=function(e){return Mn(e,{align:"left"})};Mn.center=function(e){return Mn(e,{align:"center"})};Mn.right=function(e){return Mn(e,{align:"right"})};yE.exports=Mn;function bB(t,e){return Math.floor((t-e)/2)}function EB(t,e){return t-e}});function kf(t,e,{ignoreNonConfigurable:r=!1}={}){let{name:n}=t;for(let i of Reflect.ownKeys(e))HB(t,e,i,r);return GB(t,e),XB(t,e,n),t}var HB,zB,GB,VB,YB,KB,XB,WE=te(()=>{HB=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),s=Object.getOwnPropertyDescriptor(e,r);!zB(i,s)&&n||Object.defineProperty(t,r,s)},zB=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},GB=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},VB=(t,e)=>`/* Wrapped ${t}*/
49
- ${e}`,YB=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),KB=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),XB=(t,e,r)=>{let n=r===""?"":`with ${r.trim()}() `,i=VB.bind(null,n,e.toString());Object.defineProperty(i,"name",KB);let{writable:s,enumerable:a,configurable:l}=YB;Object.defineProperty(t,"toString",{value:i,writable:s,enumerable:a,configurable:l})}});var Ga,UE,HE,zE=te(()=>{WE();Ga=new WeakMap,UE=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,n=0,i=t.displayName||t.name||"<anonymous>",s=function(...a){if(Ga.set(s,++n),n===1)r=t.apply(this,a),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return kf(s,t),Ga.set(s,n),s};UE.callCount=t=>{if(!Ga.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Ga.get(t)};HE=UE});var qn,GE=te(()=>{qn=[];qn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&qn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&qn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});var Va,Lf,Mf,JB,Nf,Ya,QB,qf,jf,Wf,VE,F9,C9,YE=te(()=>{GE();Va=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Lf=Symbol.for("signal-exit emitter"),Mf=globalThis,JB=Object.defineProperty.bind(Object),Nf=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Mf[Lf])return Mf[Lf];JB(Mf,Lf,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,r){this.listeners[e].push(r)}removeListener(e,r){let n=this.listeners[e],i=n.indexOf(r);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(e,r,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let s of this.listeners[e])i=s(r,n)===!0||i;return e==="exit"&&(i=this.emit("afterExit",r,n)||i),i}},Ya=class{},QB=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),qf=class extends Ya{onExit(){return()=>{}}load(){}unload(){}},jf=class extends Ya{#r=Wf.platform==="win32"?"SIGINT":"SIGHUP";#n=new Nf;#t;#i;#e;#s={};#o=!1;constructor(e){super(),this.#t=e,this.#s={};for(let r of qn)this.#s[r]=()=>{let n=this.#t.listeners(r),{count:i}=this.#n,s=e;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(i+=s.__signal_exit_emitter__.count),n.length===i){this.unload();let a=this.#n.emit("exit",null,r),l=r==="SIGHUP"?this.#r:r;a||e.kill(e.pid,l)}};this.#e=e.reallyExit,this.#i=e.emit}onExit(e,r){if(!Va(this.#t))return()=>{};this.#o===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#n.on(n,e),()=>{this.#n.removeListener(n,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#n.count+=1;for(let e of qn)try{let r=this.#s[e];r&&this.#t.on(e,r)}catch{}this.#t.emit=(e,...r)=>this.#f(e,...r),this.#t.reallyExit=e=>this.#a(e)}}unload(){this.#o&&(this.#o=!1,qn.forEach(e=>{let r=this.#s[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#t.removeListener(e,r)}catch{}}),this.#t.emit=this.#i,this.#t.reallyExit=this.#e,this.#n.count-=1)}#a(e){return Va(this.#t)?(this.#t.exitCode=e||0,this.#n.emit("exit",this.#t.exitCode,null),this.#e.call(this.#t,this.#t.exitCode)):0}#f(e,...r){let n=this.#i;if(e==="exit"&&Va(this.#t)){typeof r[0]=="number"&&(this.#t.exitCode=r[0]);let i=n.call(this.#t,e,...r);return this.#n.emit("exit",this.#t.exitCode,null),i}else return n.call(this.#t,e,...r)}},Wf=globalThis.process,{onExit:VE,load:F9,unload:C9}=QB(Va(Wf)?new jf(Wf):new qf)});import Ka from"node:process";var KE,ZB,XE,JE=te(()=>{zE();YE();KE=Ka.stderr.isTTY?Ka.stderr:Ka.stdout.isTTY?Ka.stdout:void 0,ZB=KE?HE(()=>{VE(()=>{KE.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},XE=ZB});import QE from"node:process";var Xa,Pi,Uf,ZE=te(()=>{JE();Xa=!1,Pi={};Pi.show=(t=QE.stderr)=>{t.isTTY&&(Xa=!1,t.write("\x1B[?25h"))};Pi.hide=(t=QE.stderr)=>{t.isTTY&&(XE(),Xa=!0,t.write("\x1B[?25l"))};Pi.toggle=(t,e)=>{t!==void 0&&(Xa=t),Xa?Pi.show(e):Pi.hide(e)};Uf=Pi});var ew=S((B9,e8)=>{e8.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var Hf=S((P9,rw)=>{"use strict";var Ja=Object.assign({},ew()),tw=Object.keys(Ja);Object.defineProperty(Ja,"random",{get(){let t=Math.floor(Math.random()*tw.length),e=tw[t];return Ja[e]}});rw.exports=Ja});import zt from"node:process";function zf(){return zt.platform!=="win32"?zt.env.TERM!=="linux":!!zt.env.CI||!!zt.env.WT_SESSION||!!zt.env.TERMINUS_SUBLIME||zt.env.ConEmuTask==="{cmd::Cmder}"||zt.env.TERM_PROGRAM==="Terminus-Sublime"||zt.env.TERM_PROGRAM==="vscode"||zt.env.TERM==="xterm-256color"||zt.env.TERM==="alacritty"||zt.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var nw=te(()=>{});var t8,r8,n8,qs,iw=te(()=>{nr();nw();t8={info:I.blue("\u2139"),success:I.green("\u2714"),warning:I.yellow("\u26A0"),error:I.red("\u2716")},r8={info:I.blue("i"),success:I.green("\u221A"),warning:I.yellow("\u203C"),error:I.red("\xD7")},n8=zf()?t8:r8,qs=n8});function Gf({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var sw=te(()=>{});import ow from"node:process";function Vf(){let{env:t}=ow,{TERM:e,TERM_PROGRAM:r}=t;return ow.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var aw=te(()=>{});import or from"node:process";var i8,Yf,s8,Kf,uw=te(()=>{i8=3,Yf=class{#r=0;start(){this.#r++,this.#r===1&&this.#n()}stop(){if(this.#r<=0)throw new Error("`stop` called more times than `start`");this.#r--,this.#r===0&&this.#t()}#n(){or.platform==="win32"||!or.stdin.isTTY||(or.stdin.setRawMode(!0),or.stdin.on("data",this.#i),or.stdin.resume())}#t(){or.stdin.isTTY&&(or.stdin.off("data",this.#i),or.stdin.pause(),or.stdin.setRawMode(!1))}#i(e){e[0]===i8&&or.emit("SIGINT")}},s8=new Yf,Kf=s8});import Qa from"node:process";function Jf(t){return new Xf(t)}var js,o8,Xf,lw=te(()=>{nr();ZE();js=We(Hf(),1);iw();Ma();$s();sw();aw();uw();o8=We(Hf(),1),Xf=class{#r=0;#n=!1;#t=0;#i=-1;#e=0;#s;#o;#a;#f;#g;#h;#c;#u;#p;#d;#l;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#s={color:"cyan",stream:Qa.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#s.color,this.spinner=this.#s.spinner,this.#g=this.#s.interval,this.#a=this.#s.stream,this.#h=typeof this.#s.isEnabled=="boolean"?this.#s.isEnabled:Gf({stream:this.#a}),this.#c=typeof this.#s.isSilent=="boolean"?this.#s.isSilent:!1,this.text=this.#s.text,this.prefixText=this.#s.prefixText,this.suffixText=this.#s.suffixText,this.indent=this.#s.indent,Qa.env.NODE_ENV==="test"&&(this._stream=this.#a,this._isEnabled=this.#h,Object.defineProperty(this,"_linesToClear",{get(){return this.#r},set(r){this.#r=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#t}}))}get indent(){return this.#u}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#u=e,this.#y()}get interval(){return this.#g??this.#o.interval??100}get spinner(){return this.#o}set spinner(e){if(this.#i=-1,this.#g=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#o=e}else if(!Vf())this.#o=js.default.line;else if(e===void 0)this.#o=js.default.dots;else if(e!=="default"&&js.default[e])this.#o=js.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#p}set text(e=""){this.#p=e,this.#y()}get prefixText(){return this.#d}set prefixText(e=""){this.#d=e,this.#y()}get suffixText(){return this.#l}set suffixText(e=""){this.#l=e,this.#y()}get isSpinning(){return this.#f!==void 0}#m(e=this.#d,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}#D(e=this.#l,r=" "){return typeof e=="string"&&e!==""?r+e:typeof e=="function"?r+e():""}#y(){let e=this.#a.columns??80,r=this.#m(this.#d,"-"),n=this.#D(this.#l,"-"),i=" ".repeat(this.#u)+r+"--"+this.#p+"--"+n;this.#t=0;for(let s of Ln(i).split(`
50
- `))this.#t+=Math.max(1,Math.ceil(Qe(s,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#h&&!this.#c}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#h=e}get isSilent(){return this.#c}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=e}frame(){let e=Date.now();(this.#i===-1||e-this.#e>=this.interval)&&(this.#i=++this.#i%this.#o.frames.length,this.#e=e);let{frames:r}=this.#o,n=r[this.#i];this.color&&(n=I[this.color](n));let i=typeof this.#d=="string"&&this.#d!==""?this.#d+" ":"",s=typeof this.text=="string"?" "+this.text:"",a=typeof this.#l=="string"&&this.#l!==""?" "+this.#l:"";return i+n+s+a}clear(){if(!this.#h||!this.#a.isTTY)return this;this.#a.cursorTo(0);for(let e=0;e<this.#r;e++)e>0&&this.#a.moveCursor(0,-1),this.#a.clearLine(1);return(this.#u||this.lastIndent!==this.#u)&&this.#a.cursorTo(this.#u),this.lastIndent=this.#u,this.#r=0,this}render(){return this.#c?this:(this.clear(),this.#a.write(this.frame()),this.#r=this.#t,this)}start(e){return e&&(this.text=e),this.#c?this:this.#h?this.isSpinning?this:(this.#s.hideCursor&&Uf.hide(this.#a),this.#s.discardStdin&&Qa.stdin.isTTY&&(this.#n=!0,Kf.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#a.write(`- ${this.text}
51
- `),this)}stop(){return this.#h?(clearInterval(this.#f),this.#f=void 0,this.#i=0,this.clear(),this.#s.hideCursor&&Uf.show(this.#a),this.#s.discardStdin&&Qa.stdin.isTTY&&this.#n&&(Kf.stop(),this.#n=!1),this):this}succeed(e){return this.stopAndPersist({symbol:qs.success,text:e})}fail(e){return this.stopAndPersist({symbol:qs.error,text:e})}warn(e){return this.stopAndPersist({symbol:qs.warning,text:e})}info(e){return this.stopAndPersist({symbol:qs.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let r=e.prefixText??this.#d,n=this.#m(r," "),i=e.symbol??" ",s=e.text??this.text,l=typeof s=="string"?(i?" ":"")+s:"",f=e.suffixText??this.#l,c=this.#D(f," "),h=n+i+l+c+`
52
- `;return this.stop(),this.#a.write(h),this}}});var Za=S((eq,fw)=>{var Qf=[],cw=0,ot=(t,e)=>{cw>=e&&Qf.push(t)};ot.WARN=1;ot.INFO=2;ot.DEBUG=3;ot.reset=()=>{Qf=[]};ot.setDebugLevel=t=>{cw=t};ot.warn=t=>ot(t,ot.WARN);ot.info=t=>ot(t,ot.INFO);ot.debug=t=>ot(t,ot.DEBUG);ot.debugMessages=()=>Qf;fw.exports=ot});var Zf=S((tq,mw)=>{var hw=Sf();function eu(t){return t?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function ar(t){let e=eu();return(""+t).replace(e,"").split(`
53
- `).reduce(function(i,s){return hw(s)>i?hw(s):i},0)}function Ws(t,e){return Array(e+1).join(t)}function a8(t,e,r,n){let i=ar(t);if(e+1>=i){let s=e-i;switch(n){case"right":{t=Ws(r,s)+t;break}case"center":{let a=Math.ceil(s/2),l=s-a;t=Ws(r,l)+t+Ws(r,a);break}default:{t=t+Ws(r,s);break}}}return t}var Ii={};function Us(t,e,r){e="\x1B["+e+"m",r="\x1B["+r+"m",Ii[e]={set:t,to:!0},Ii[r]={set:t,to:!1},Ii[t]={on:e,off:r}}Us("bold",1,22);Us("italics",3,23);Us("underline",4,24);Us("inverse",7,27);Us("strikethrough",9,29);function dw(t,e){let r=e[1]?parseInt(e[1].split(";")[0]):0;if(r>=30&&r<=39||r>=90&&r<=97){t.lastForegroundAdded=e[0];return}if(r>=40&&r<=49||r>=100&&r<=107){t.lastBackgroundAdded=e[0];return}if(r===0){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&delete t[i];return}let n=Ii[e[0]];n&&(t[n.set]=n.to)}function u8(t){let e=eu(!0),r=e.exec(t),n={};for(;r!==null;)dw(n,r),r=e.exec(t);return n}function pw(t,e){let r=t.lastBackgroundAdded,n=t.lastForegroundAdded;return delete t.lastBackgroundAdded,delete t.lastForegroundAdded,Object.keys(t).forEach(function(i){t[i]&&(e+=Ii[i].off)}),r&&r!="\x1B[49m"&&(e+="\x1B[49m"),n&&n!="\x1B[39m"&&(e+="\x1B[39m"),e}function l8(t,e){let r=t.lastBackgroundAdded,n=t.lastForegroundAdded;return delete t.lastBackgroundAdded,delete t.lastForegroundAdded,Object.keys(t).forEach(function(i){t[i]&&(e=Ii[i].on+e)}),r&&r!="\x1B[49m"&&(e=r+e),n&&n!="\x1B[39m"&&(e=n+e),e}function c8(t,e){if(t.length===ar(t))return t.substr(0,e);for(;ar(t)>e;)t=t.slice(0,-1);return t}function f8(t,e){let r=eu(!0),n=t.split(eu()),i=0,s=0,a="",l,f={};for(;s<e;){l=r.exec(t);let c=n[i];if(i++,s+ar(c)>e&&(c=c8(c,e-s)),a+=c,s+=ar(c),s<e){if(!l)break;a+=l[0],dw(f,l)}}return pw(f,a)}function h8(t,e,r){if(r=r||"\u2026",ar(t)<=e)return t;e-=ar(r);let i=f8(t,e);i+=r;let s="\x1B]8;;\x07";return t.includes(s)&&!i.includes(s)&&(i+=s),i}function d8(){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 p8(t,e){t=t||{},e=e||d8();let r=Object.assign({},e,t);return r.chars=Object.assign({},e.chars,t.chars),r.style=Object.assign({},e.style,t.style),r}function m8(t,e){let r=[],n=e.split(/(\s+)/g),i=[],s=0,a;for(let l=0;l<n.length;l+=2){let f=n[l],c=s+ar(f);s>0&&a&&(c+=a.length),c>t?(s!==0&&r.push(i.join("")),i=[f],s=ar(f)):(i.push(a||"",f),s=c),a=n[l+1]}return s&&r.push(i.join("")),r}function g8(t,e){let r=[],n="";function i(a,l){for(n.length&&l&&(n+=l),n+=a;n.length>t;)r.push(n.slice(0,t)),n=n.slice(t)}let s=e.split(/(\s+)/g);for(let a=0;a<s.length;a+=2)i(s[a],a&&s[a-1]);return n.length&&r.push(n),r}function D8(t,e,r=!0){let n=[];e=e.split(`
54
- `);let i=r?m8:g8;for(let s=0;s<e.length;s++)n.push.apply(n,i(t,e[s]));return n}function y8(t){let e={},r=[];for(let n=0;n<t.length;n++){let i=l8(e,t[n]);e=u8(i);let s=Object.assign({},e);r.push(pw(s,i))}return r}function b8(t,e){return["\x1B]","8",";",";",t||e,"\x07",e,"\x1B]","8",";",";","\x07"].join("")}mw.exports={strlen:ar,repeat:Ws,pad:a8,truncate:h8,mergeOptions:p8,wordWrap:D8,colorizeLines:y8,hyperlink:b8}});var bw=S((rq,yw)=>{var Dw={};yw.exports=Dw;var gw={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(gw).forEach(function(t){var e=gw[t],r=Dw[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var ww=S((nq,Ew)=>{"use strict";Ew.exports=function(t,e){e=e||process.argv;var r=e.indexOf("--"),n=/^-{1,2}/.test(t)?"":"--",i=e.indexOf(n+t);return i!==-1&&(r===-1?!0:i<r)}});var Cw=S((iq,Fw)=>{"use strict";var E8=fe("os"),Gt=ww(),ct=process.env,$i=void 0;Gt("no-color")||Gt("no-colors")||Gt("color=false")?$i=!1:(Gt("color")||Gt("colors")||Gt("color=true")||Gt("color=always"))&&($i=!0);"FORCE_COLOR"in ct&&($i=ct.FORCE_COLOR.length===0||parseInt(ct.FORCE_COLOR,10)!==0);function w8(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function F8(t){if($i===!1)return 0;if(Gt("color=16m")||Gt("color=full")||Gt("color=truecolor"))return 3;if(Gt("color=256"))return 2;if(t&&!t.isTTY&&$i!==!0)return 0;var e=$i?1:0;if(process.platform==="win32"){var r=E8.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ct)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in ct})||ct.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in ct)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ct.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in ct){var n=parseInt((ct.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ct.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ct.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(ct.TERM)||"COLORTERM"in ct?1:(ct.TERM==="dumb",e)}function eh(t){var e=F8(t);return w8(e)}Fw.exports={supportsColor:eh,stdout:eh(process.stdout),stderr:eh(process.stderr)}});var Sw=S((sq,_w)=>{_w.exports=function(e,r){var n="";e=e||"Run the trap, drop the bass",e=e.split("");var i={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 e.forEach(function(s){s=s.toLowerCase();var a=i[s]||[" "],l=Math.floor(Math.random()*a.length);typeof i[s]<"u"?n+=i[s][l]:n+=s}),n}});var Aw=S((oq,vw)=>{vw.exports=function(e,r){e=e||" he is here ";var n={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"]},i=[].concat(n.up,n.down,n.mid);function s(f){var c=Math.floor(Math.random()*f);return c}function a(f){var c=!1;return i.filter(function(h){c=h===f}),c}function l(f,c){var h="",p,y;c=c||{},c.up=typeof c.up<"u"?c.up:!0,c.mid=typeof c.mid<"u"?c.mid:!0,c.down=typeof c.down<"u"?c.down:!0,c.size=typeof c.size<"u"?c.size:"maxi",f=f.split("");for(y in f)if(!a(y)){switch(h=h+f[y],p={up:0,down:0,mid:0},c.size){case"mini":p.up=s(8),p.mid=s(2),p.down=s(8);break;case"maxi":p.up=s(16)+3,p.mid=s(4)+1,p.down=s(64)+3;break;default:p.up=s(8)+1,p.mid=s(6)/2,p.down=s(8)+1;break}var m=["up","mid","down"];for(var D in m)for(var _=m[D],A=0;A<=p[_];A++)c[_]&&(h=h+n[_][s(n[_].length)])}return h}return l(e,r)}});var Rw=S((aq,xw)=>{xw.exports=function(t){return function(e,r,n){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}});var Tw=S((uq,Ow)=>{Ow.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}}});var Pw=S((lq,Bw)=>{Bw.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,n,i){return r===" "?r:t[e[n++%e.length]](r)}}});var $w=S((cq,Iw)=>{Iw.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,n,i){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var jw=S((hq,qw)=>{var De={};qw.exports=De;De.themes={};var C8=fe("util"),jn=De.styles=bw(),Lw=Object.defineProperties,_8=new RegExp(/[\r\n]+/g);De.supportsColor=Cw().supportsColor;typeof De.enabled>"u"&&(De.enabled=De.supportsColor()!==!1);De.enable=function(){De.enabled=!0};De.disable=function(){De.enabled=!1};De.stripColors=De.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var fq=De.stylize=function(e,r){if(!De.enabled)return e+"";var n=jn[r];return!n&&r in De?De[r](e):n.open+e+n.close},S8=/[|\\{}()[\]^$+*?.]/g,v8=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(S8,"\\$&")};function Mw(t){var e=function r(){return x8.apply(r,arguments)};return e._styles=t,e.__proto__=A8,e}var Nw=(function(){var t={};return jn.grey=jn.gray,Object.keys(jn).forEach(function(e){jn[e].closeRe=new RegExp(v8(jn[e].close),"g"),t[e]={get:function(){return Mw(this._styles.concat(e))}}}),t})(),A8=Lw(function(){},Nw);function x8(){var t=Array.prototype.slice.call(arguments),e=t.map(function(a){return a!=null&&a.constructor===String?a:C8.inspect(a)}).join(" ");if(!De.enabled||!e)return e;for(var r=e.indexOf(`
55
- `)!=-1,n=this._styles,i=n.length;i--;){var s=jn[n[i]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(_8,function(a){return s.close+a+s.open}))}return e}De.setTheme=function(t){if(typeof t=="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 e in t)(function(r){De[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var s in t[r])i=De[t[r][s]](i);return i}return De[t[r]](n)}})(e)};function R8(){var t={};return Object.keys(Nw).forEach(function(e){t[e]={get:function(){return Mw([e])}}}),t}var O8=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};De.trap=Sw();De.zalgo=Aw();De.maps={};De.maps.america=Rw()(De);De.maps.zebra=Tw()(De);De.maps.rainbow=Pw()(De);De.maps.random=$w()(De);for(kw in De.maps)(function(t){De[t]=function(e){return O8(De.maps[t],e)}})(kw);var kw;Lw(De,R8())});var Uw=S((dq,Ww)=>{var T8=jw();Ww.exports=T8});var Vw=S((pq,tu)=>{var{info:B8,debug:Gw}=Za(),Ft=Zf(),rh=class t{constructor(e){this.setOptions(e),this.x=null,this.y=null}setOptions(e){["boolean","number","bigint","string"].indexOf(typeof e)!==-1&&(e={content:""+e}),e=e||{},this.options=e;let r=e.content;if(["boolean","number","bigint","string"].indexOf(typeof r)!==-1)this.content=String(r);else if(!r)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof r);this.colSpan=e.colSpan||1,this.rowSpan=e.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(e,r){this.cells=r;let n=this.options.chars||{},i=e.chars,s=this.chars={};I8.forEach(function(f){th(n,i,f,s)}),this.truncate=this.options.truncate||e.truncate;let a=this.options.style=this.options.style||{},l=e.style;th(a,l,"padding-left",this),th(a,l,"padding-right",this),this.head=a.head||l.head,this.border=a.border||l.border,this.fixedWidth=e.colWidths[this.x],this.lines=this.computeLines(e),this.desiredWidth=Ft.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(e){let r=e.wordWrap||e.textWrap,{wordWrap:n=r}=this.options;if(this.fixedWidth&&n){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let a=1;for(;a<this.colSpan;)this.fixedWidth+=e.colWidths[this.x+a],a++}let{wrapOnWordBoundary:i=!0}=e,{wrapOnWordBoundary:s=i}=this.options;return this.wrapLines(Ft.wordWrap(this.fixedWidth,this.content,s))}return this.wrapLines(this.content.split(`
56
- `))}wrapLines(e){let r=Ft.colorizeLines(e);return this.href?r.map(n=>Ft.hyperlink(this.href,n)):r}init(e){let r=this.x,n=this.y;this.widths=e.colWidths.slice(r,r+this.colSpan),this.heights=e.rowHeights.slice(n,n+this.rowSpan),this.width=this.widths.reduce(zw,-1),this.height=this.heights.reduce(zw,-1),this.hAlign=this.options.hAlign||e.colAligns[r],this.vAlign=this.options.vAlign||e.rowAligns[n],this.drawRight=r+this.colSpan==e.colWidths.length}draw(e,r){if(e=="top")return this.drawTop(this.drawRight);if(e=="bottom")return this.drawBottom(this.drawRight);let n=Ft.truncate(this.content,10,this.truncate);e||B8(`${this.y}-${this.x}: ${this.rowSpan-e}x${this.colSpan} Cell ${n}`);let i=Math.max(this.height-this.lines.length,0),s;switch(this.vAlign){case"center":s=Math.ceil(i/2);break;case"bottom":s=i;break;default:s=0}if(e<s||e>=s+this.lines.length)return this.drawEmpty(this.drawRight,r);let a=this.lines.length>this.height&&e+1>=this.height;return this.drawLine(e-s,this.drawRight,a,r)}drawTop(e){let r=[];return this.cells?this.widths.forEach(function(n,i){r.push(this._topLeftChar(i)),r.push(Ft.repeat(this.chars[this.y==0?"top":"mid"],n))},this):(r.push(this._topLeftChar(0)),r.push(Ft.repeat(this.chars[this.y==0?"top":"mid"],this.width))),e&&r.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",r.join(""))}_topLeftChar(e){let r=this.x+e,n;if(this.y==0)n=r==0?"topLeft":e==0?"topMid":"top";else if(r==0)n="leftMid";else if(n=e==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][r]instanceof t.ColSpanCell&&(n=e==0?"topMid":"mid"),e==0)){let s=1;for(;this.cells[this.y][r-s]instanceof t.ColSpanCell;)s++;this.cells[this.y][r-s]instanceof t.RowSpanCell&&(n="leftMid")}return this.chars[n]}wrapWithStyleColors(e,r){if(this[e]&&this[e].length)try{let n=Uw();for(let i=this[e].length-1;i>=0;i--)n=n[this[e][i]];return n(r)}catch{return r}else return r}drawLine(e,r,n,i){let s=this.chars[this.x==0?"left":"middle"];if(this.x&&i&&this.cells){let y=this.cells[this.y+i][this.x-1];for(;y instanceof Hs;)y=this.cells[y.y][y.x-1];y instanceof zs||(s=this.chars.rightMid)}let a=Ft.repeat(" ",this.paddingLeft),l=r?this.chars.right:"",f=Ft.repeat(" ",this.paddingRight),c=this.lines[e],h=this.width-(this.paddingLeft+this.paddingRight);n&&(c+=this.truncate||"\u2026");let p=Ft.truncate(c,h,this.truncate);return p=Ft.pad(p,h," ",this.hAlign),p=a+p+f,this.stylizeLine(s,p,l)}stylizeLine(e,r,n){return e=this.wrapWithStyleColors("border",e),n=this.wrapWithStyleColors("border",n),this.y===0&&(r=this.wrapWithStyleColors("head",r)),e+r+n}drawBottom(e){let r=this.chars[this.x==0?"bottomLeft":"bottomMid"],n=Ft.repeat(this.chars.bottom,this.width),i=e?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",r+n+i)}drawEmpty(e,r){let n=this.chars[this.x==0?"left":"middle"];if(this.x&&r&&this.cells){let a=this.cells[this.y+r][this.x-1];for(;a instanceof Hs;)a=this.cells[a.y][a.x-1];a instanceof zs||(n=this.chars.rightMid)}let i=e?this.chars.right:"",s=Ft.repeat(" ",this.width);return this.stylizeLine(n,s,i)}},Hs=class{constructor(){}draw(e){return typeof e=="number"&&Gw(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},zs=class{constructor(e){this.originalCell=e}init(e){let r=this.y,n=this.originalCell.y;this.cellOffset=r-n,this.offset=P8(e.rowHeights,n,this.cellOffset)}draw(e){return e=="top"?this.originalCell.draw(this.offset,this.cellOffset):e=="bottom"?this.originalCell.draw("bottom"):(Gw(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+e))}mergeTableOptions(){}};function Hw(...t){return t.filter(e=>e!=null).shift()}function th(t,e,r,n){let i=r.split("-");i.length>1?(i[1]=i[1].charAt(0).toUpperCase()+i[1].substr(1),i=i.join(""),n[i]=Hw(t[i],t[r],e[i],e[r])):n[r]=Hw(t[r],e[r])}function P8(t,e,r){let n=t[e];for(let i=1;i<r;i++)n+=1+t[e+i];return n}function zw(t,e){return t+e+1}var I8=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];tu.exports=rh;tu.exports.ColSpanCell=Hs;tu.exports.RowSpanCell=zs});var Xw=S((mq,Kw)=>{var{warn:$8,debug:k8}=Za(),nh=Vw(),{ColSpanCell:L8,RowSpanCell:M8}=nh;(function(){function t(m,D){return m[D]>0?t(m,D+1):D}function e(m){let D={};m.forEach(function(_,A){let x=0;_.forEach(function(M){M.y=A,M.x=A?t(D,x):x;let q=M.rowSpan||1,L=M.colSpan||1;if(q>1)for(let V=0;V<L;V++)D[M.x+V]=q;x=M.x+L}),Object.keys(D).forEach(M=>{D[M]--,D[M]<1&&delete D[M]})})}function r(m){let D=0;return m.forEach(function(_){_.forEach(function(A){D=Math.max(D,A.x+(A.colSpan||1))})}),D}function n(m){return m.length}function i(m,D){let _=m.y,A=m.y-1+(m.rowSpan||1),x=D.y,M=D.y-1+(D.rowSpan||1),q=!(_>M||x>A),L=m.x,V=m.x-1+(m.colSpan||1),se=D.x,le=D.x-1+(D.colSpan||1),_e=!(L>le||se>V);return q&&_e}function s(m,D,_){let A=Math.min(m.length-1,_),x={x:D,y:_};for(let M=0;M<=A;M++){let q=m[M];for(let L=0;L<q.length;L++)if(i(x,q[L]))return!0}return!1}function a(m,D,_,A){for(let x=_;x<A;x++)if(s(m,x,D))return!1;return!0}function l(m){m.forEach(function(D,_){D.forEach(function(A){for(let x=1;x<A.rowSpan;x++){let M=new M8(A);M.x=A.x,M.y=A.y+x,M.colSpan=A.colSpan,c(M,m[_+x])}})})}function f(m){for(let D=m.length-1;D>=0;D--){let _=m[D];for(let A=0;A<_.length;A++){let x=_[A];for(let M=1;M<x.colSpan;M++){let q=new L8;q.x=x.x+M,q.y=x.y,_.splice(A+1,0,q)}}}}function c(m,D){let _=0;for(;_<D.length&&D[_].x<m.x;)_++;D.splice(_,0,m)}function h(m){let D=n(m),_=r(m);k8(`Max rows: ${D}; Max cols: ${_}`);for(let A=0;A<D;A++)for(let x=0;x<_;x++)if(!s(m,x,A)){let M={x,y:A,colSpan:1,rowSpan:1};for(x++;x<_&&!s(m,x,A);)M.colSpan++,x++;let q=A+1;for(;q<D&&a(m,q,M.x,M.x+M.colSpan);)M.rowSpan++,q++;let L=new nh(M);L.x=M.x,L.y=M.y,$8(`Missing cell at ${L.y}-${L.x}.`),c(L,m[A])}}function p(m){return m.map(function(D){if(!Array.isArray(D)){let _=Object.keys(D)[0];D=D[_],Array.isArray(D)?(D=D.slice(),D.unshift(_)):D=[_,D]}return D.map(function(_){return new nh(_)})})}function y(m){let D=p(m);return e(D),h(D),l(D),f(D),D}Kw.exports={makeTableLayout:y,layoutTable:e,addRowSpanCells:l,maxWidth:r,fillInTable:h,computeWidths:Yw("colSpan","desiredWidth","x",1),computeHeights:Yw("rowSpan","desiredHeight","y",1)}})();function Yw(t,e,r,n){return function(i,s){let a=[],l=[],f={};s.forEach(function(c){c.forEach(function(h){(h[t]||1)>1?l.push(h):a[h[r]]=Math.max(a[h[r]]||0,h[e]||0,n)})}),i.forEach(function(c,h){typeof c=="number"&&(a[h]=c)});for(let c=l.length-1;c>=0;c--){let h=l[c],p=h[t],y=h[r],m=a[y],D=typeof i[y]=="number"?0:1;if(typeof m=="number")for(let _=1;_<p;_++)m+=1+a[y+_],typeof i[y+_]!="number"&&D++;else m=e==="desiredWidth"?h.desiredWidth-1:1,(!f[y]||f[y]<m)&&(f[y]=m);if(h[e]>m){let _=0;for(;D>0&&h[e]>m;){if(typeof i[y+_]!="number"){let A=Math.round((h[e]-m)/D);m+=A,a[y+_]+=A,D--}_++}}}Object.assign(i,a,f);for(let c=0;c<i.length;c++)i[c]=Math.max(n,i[c]||0)}}});var Qw=S((gq,Jw)=>{var xr=Za(),N8=Zf(),ih=Xw(),ru=class extends Array{constructor(e){super();let r=N8.mergeOptions(e);if(Object.defineProperty(this,"options",{value:r,enumerable:r.debug}),r.debug){switch(typeof r.debug){case"boolean":xr.setDebugLevel(xr.WARN);break;case"number":xr.setDebugLevel(r.debug);break;case"string":xr.setDebugLevel(parseInt(r.debug,10));break;default:xr.setDebugLevel(xr.WARN),xr.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof r.debug}`)}Object.defineProperty(this,"messages",{get(){return xr.debugMessages()}})}}toString(){let e=this,r=this.options.head&&this.options.head.length;r?(e=[this.options.head],this.length&&e.push.apply(e,this)):this.options.style.head=[];let n=ih.makeTableLayout(e);n.forEach(function(s){s.forEach(function(a){a.mergeTableOptions(this.options,n)},this)},this),ih.computeWidths(this.options.colWidths,n),ih.computeHeights(this.options.rowHeights,n),n.forEach(function(s){s.forEach(function(a){a.init(this.options)},this)},this);let i=[];for(let s=0;s<n.length;s++){let a=n[s],l=this.options.rowHeights[s];(s===0||!this.options.style.compact||s==1&&r)&&sh(a,"top",i);for(let f=0;f<l;f++)sh(a,f,i);s+1==n.length&&sh(a,"bottom",i)}return i.join(`
57
- `)}get width(){return this.toString().split(`
58
- `)[0].length}};ru.reset=()=>xr.reset();function sh(t,e,r){let n=[];t.forEach(function(s){n.push(s.draw(e))});let i=n.join("");i.length&&r.push(i)}Jw.exports=ru});var eF=S((Dq,Zw)=>{Zw.exports=Qw()});var $e=S((yq,rF)=>{"use strict";var{FORCE_COLOR:q8,NODE_DISABLE_COLORS:j8,TERM:W8}=process.env,we={enabled:!j8&&W8!=="dumb"&&q8!=="0",reset:Ae(0,0),bold:Ae(1,22),dim:Ae(2,22),italic:Ae(3,23),underline:Ae(4,24),inverse:Ae(7,27),hidden:Ae(8,28),strikethrough:Ae(9,29),black:Ae(30,39),red:Ae(31,39),green:Ae(32,39),yellow:Ae(33,39),blue:Ae(34,39),magenta:Ae(35,39),cyan:Ae(36,39),white:Ae(37,39),gray:Ae(90,39),grey:Ae(90,39),bgBlack:Ae(40,49),bgRed:Ae(41,49),bgGreen:Ae(42,49),bgYellow:Ae(43,49),bgBlue:Ae(44,49),bgMagenta:Ae(45,49),bgCyan:Ae(46,49),bgWhite:Ae(47,49)};function tF(t,e){let r=0,n,i="",s="";for(;r<t.length;r++)n=t[r],i+=n.open,s+=n.close,e.includes(n.close)&&(e=e.replace(n.rgx,n.close+n.open));return i+e+s}function U8(t,e){let r={has:t,keys:e};return r.reset=we.reset.bind(r),r.bold=we.bold.bind(r),r.dim=we.dim.bind(r),r.italic=we.italic.bind(r),r.underline=we.underline.bind(r),r.inverse=we.inverse.bind(r),r.hidden=we.hidden.bind(r),r.strikethrough=we.strikethrough.bind(r),r.black=we.black.bind(r),r.red=we.red.bind(r),r.green=we.green.bind(r),r.yellow=we.yellow.bind(r),r.blue=we.blue.bind(r),r.magenta=we.magenta.bind(r),r.cyan=we.cyan.bind(r),r.white=we.white.bind(r),r.gray=we.gray.bind(r),r.grey=we.grey.bind(r),r.bgBlack=we.bgBlack.bind(r),r.bgRed=we.bgRed.bind(r),r.bgGreen=we.bgGreen.bind(r),r.bgYellow=we.bgYellow.bind(r),r.bgBlue=we.bgBlue.bind(r),r.bgMagenta=we.bgMagenta.bind(r),r.bgCyan=we.bgCyan.bind(r),r.bgWhite=we.bgWhite.bind(r),r}function Ae(t,e){let r={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(n){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(r)),n===void 0?this:we.enabled?tF(this.keys,n+""):n+""):n===void 0?U8([t],[r]):we.enabled?tF([r],n+""):n+""}}rF.exports=we});var iF=S((bq,nF)=>{"use strict";nF.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}}});var nu=S((Eq,sF)=>{"use strict";sF.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t}});var ke=S((wq,oF)=>{"use strict";var oh={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let r="";return t<0?r+=`\x1B[${-t}D`:t>0&&(r+=`\x1B[${t}C`),e<0?r+=`\x1B[${-e}A`:e>0&&(r+=`\x1B[${e}B`),r},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},H8={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},z8={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?oh.up():"");return t&&(e+=oh.left),e}};oF.exports={cursor:oh,scroll:H8,erase:z8,beep:"\x07"}});var fF=S((Fq,cF)=>{"use strict";function G8(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=V8(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
59
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,l;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,l=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw l}}}}function V8(t,e){if(t){if(typeof t=="string")return aF(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aF(t,e)}}function aF(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Y8=nu(),lF=ke(),uF=lF.erase,K8=lF.cursor,X8=t=>[...Y8(t)].length;cF.exports=function(t,e){if(!e)return uF.line+K8.to(0);let r=0,n=t.split(/\r?\n/);var i=G8(n),s;try{for(i.s();!(s=i.n()).done;){let a=s.value;r+=1+Math.floor(Math.max(X8(a)-1,0)/e)}}catch(a){i.e(a)}finally{i.f()}return uF.lines(r)}});var ah=S((Cq,hF)=>{"use strict";var Gs={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},J8={arrowUp:Gs.arrowUp,arrowDown:Gs.arrowDown,arrowLeft:Gs.arrowLeft,arrowRight:Gs.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Q8=process.platform==="win32"?J8:Gs;hF.exports=Q8});var pF=S((_q,dF)=>{"use strict";var ki=$e(),Wn=ah(),uh=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),Z8=t=>uh[t]||uh.default,Vs=Object.freeze({aborted:ki.red(Wn.cross),done:ki.green(Wn.tick),exited:ki.yellow(Wn.cross),default:ki.cyan("?")}),eP=(t,e,r)=>e?Vs.aborted:r?Vs.exited:t?Vs.done:Vs.default,tP=t=>ki.gray(t?Wn.ellipsis:Wn.pointerSmall),rP=(t,e)=>ki.gray(t?e?Wn.pointerSmall:"+":Wn.line);dF.exports={styles:uh,render:Z8,symbols:Vs,symbol:eP,delimiter:tP,item:rP}});var gF=S((Sq,mF)=>{"use strict";var nP=nu();mF.exports=function(t,e){let r=String(nP(t)||"").split(/\r?\n/);return e?r.map(n=>Math.ceil(n.length/e)).reduce((n,i)=>n+i):r.length}});var yF=S((vq,DF)=>{"use strict";DF.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",n=e.width;return(t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((s,a)=>(a.length+r.length>=n||s[s.length-1].length+a.length+1<n?s[s.length-1]+=` ${a}`:s.push(`${r}${a}`),s),[r]).join(`
60
- `)).join(`
61
- `)}});var EF=S((Aq,bF)=>{"use strict";bF.exports=(t,e,r)=>{r=r||e;let n=Math.min(e-r,t-Math.floor(r/2));n<0&&(n=0);let i=Math.min(n+r,e);return{startIndex:n,endIndex:i}}});var Vt=S((xq,wF)=>{"use strict";wF.exports={action:iF(),clear:fF(),style:pF(),strip:nu(),figures:ah(),lines:gF(),wrap:yF(),entriesToDisplay:EF()}});var Rr=S((Rq,_F)=>{"use strict";var FF=fe("readline"),iP=Vt(),sP=iP.action,oP=fe("events"),CF=ke(),aP=CF.beep,uP=CF.cursor,lP=$e(),lh=class extends oP{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=FF.createInterface({input:this.in,escapeCodeTimeout:50});FF.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(!0);let n=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(s,a)=>{let l=sP(a,n);l===!1?this._&&this._(s,a):typeof this[l]=="function"?this[l](a):this.bell()};this.close=()=>{this.out.write(uP.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(!1),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",i)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(aP)}render(){this.onRender(lP),this.firstRender&&(this.firstRender=!1)}};_F.exports=lh});var RF=S((Oq,xF)=>{"use strict";function SF(t,e,r,n,i,s,a){try{var l=t[s](a),f=l.value}catch(c){r(c);return}l.done?e(f):Promise.resolve(f).then(n,i)}function vF(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function a(f){SF(s,n,i,a,l,"next",f)}function l(f){SF(s,n,i,a,l,"throw",f)}a(void 0)})}}var iu=$e(),cP=Rr(),AF=ke(),fP=AF.erase,Ys=AF.cursor,su=Vt(),ch=su.style,fh=su.clear,hP=su.lines,dP=su.figures,hh=class extends cP{constructor(e={}){super(e),this.transform=ch.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=fh("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=iu.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
62
- `),this.close()}validate(){var e=this;return vF(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r})()}submit(){var e=this;return vF(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=!0,e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
63
- `),e.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,r){let n=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${n}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:n.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Ys.down(hP(this.outputError,this.out.columns)-1)+fh(this.outputError,this.out.columns)),this.out.write(fh(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[ch.symbol(this.done,this.aborted),iu.bold(this.msg),ch.delimiter(this.done),this.red?iu.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
64
- `).reduce((e,r,n)=>e+`
65
- ${n?" ":dP.pointerSmall} ${iu.red().italic(r)}`,"")),this.out.write(fP.line+Ys.to(0)+this.outputText+Ys.save+this.outputError+Ys.restore+Ys.move(this.cursorOffset,0)))}};xF.exports=hh});var PF=S((Tq,BF)=>{"use strict";var Or=$e(),pP=Rr(),Ks=Vt(),OF=Ks.style,TF=Ks.clear,ou=Ks.figures,mP=Ks.wrap,gP=Ks.entriesToDisplay,DP=ke(),yP=DP.cursor,dh=class extends pP{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,n)=>(typeof r=="string"&&(r={title:r,value:n}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?n:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=TF("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
66
- `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
67
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(yP.hide):this.out.write(TF(this.outputText,this.out.columns)),super.render();let e=gP(this.cursor,this.choices.length,this.optionsPerPage),r=e.startIndex,n=e.endIndex;if(this.outputText=[OF.symbol(this.done,this.aborted),Or.bold(this.msg),OF.delimiter(!1),this.done?this.selection.title:this.selection.disabled?Or.yellow(this.warn):Or.gray(this.hint)].join(" "),!this.done){this.outputText+=`
68
- `;for(let i=r;i<n;i++){let s,a,l="",f=this.choices[i];i===r&&r>0?a=ou.arrowUp:i===n-1&&n<this.choices.length?a=ou.arrowDown:a=" ",f.disabled?(s=this.cursor===i?Or.gray().underline(f.title):Or.strikethrough().gray(f.title),a=(this.cursor===i?Or.bold().gray(ou.pointer)+" ":" ")+a):(s=this.cursor===i?Or.cyan().underline(f.title):f.title,a=(this.cursor===i?Or.cyan(ou.pointer)+" ":" ")+a,f.description&&this.cursor===i&&(l=` - ${f.description}`,(a.length+s.length+l.length>=this.out.columns||f.description.split(/\r?\n/).length>1)&&(l=`
69
- `+mP(f.description,{margin:3,width:this.out.columns})))),this.outputText+=`${a} ${s}${Or.gray(l)}
70
- `}}this.out.write(this.outputText)}};BF.exports=dh});var NF=S((Bq,MF)=>{"use strict";var au=$e(),bP=Rr(),kF=Vt(),IF=kF.style,EP=kF.clear,LF=ke(),$F=LF.cursor,wP=LF.erase,ph=class extends bP{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
71
- `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
72
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write($F.hide):this.out.write(EP(this.outputText,this.out.columns)),super.render(),this.outputText=[IF.symbol(this.done,this.aborted),au.bold(this.msg),IF.delimiter(this.done),this.value?this.inactive:au.cyan().underline(this.inactive),au.gray("/"),this.value?au.cyan().underline(this.active):this.active].join(" "),this.out.write(wP.line+$F.to(0)+this.outputText))}};MF.exports=ph});var ur=S((Pq,qF)=>{"use strict";var mh=class t{constructor({token:e,date:r,parts:n,locales:i}){this.token=e,this.date=r||new Date,this.parts=n||[this],this.locales=i||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,n)=>n>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((n,i)=>i>r&&n instanceof t)}toString(){return String(this.date)}};qF.exports=mh});var WF=S((Iq,jF)=>{"use strict";var FP=ur(),gh=class extends FP{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};jF.exports=gh});var HF=S(($q,UF)=>{"use strict";var CP=ur(),_P=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),Dh=class extends CP{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+_P(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};UF.exports=Dh});var GF=S((kq,zF)=>{"use strict";var SP=ur(),yh=class extends SP{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};zF.exports=yh});var YF=S((Lq,VF)=>{"use strict";var vP=ur(),bh=class extends vP{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};VF.exports=bh});var XF=S((Mq,KF)=>{"use strict";var AP=ur(),Eh=class extends AP{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};KF.exports=Eh});var QF=S((Nq,JF)=>{"use strict";var xP=ur(),wh=class extends xP{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};JF.exports=wh});var eC=S((qq,ZF)=>{"use strict";var RP=ur(),Fh=class extends RP{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};ZF.exports=Fh});var rC=S((jq,tC)=>{"use strict";var OP=ur(),Ch=class extends OP{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};tC.exports=Ch});var iC=S((Wq,nC)=>{"use strict";nC.exports={DatePart:ur(),Meridiem:WF(),Day:HF(),Hours:GF(),Milliseconds:YF(),Minutes:XF(),Month:QF(),Seconds:eC(),Year:rC()}});var pC=S((Uq,dC)=>{"use strict";function sC(t,e,r,n,i,s,a){try{var l=t[s](a),f=l.value}catch(c){r(c);return}l.done?e(f):Promise.resolve(f).then(n,i)}function oC(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function a(f){sC(s,n,i,a,l,"next",f)}function l(f){sC(s,n,i,a,l,"throw",f)}a(void 0)})}}var _h=$e(),TP=Rr(),vh=Vt(),aC=vh.style,uC=vh.clear,BP=vh.figures,hC=ke(),PP=hC.erase,lC=hC.cursor,Tr=iC(),cC=Tr.DatePart,IP=Tr.Meridiem,$P=Tr.Day,kP=Tr.Hours,LP=Tr.Milliseconds,MP=Tr.Minutes,NP=Tr.Month,qP=Tr.Seconds,jP=Tr.Year,WP=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,fC={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new $P(t),3:t=>new NP(t),4:t=>new jP(t),5:t=>new IP(t),6:t=>new kP(t),7:t=>new MP(t),8:t=>new qP(t),9:t=>new LP(t)},UP={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Sh=class extends TP{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(UP,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=uC("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let r;for(this.parts=[];r=WP.exec(e);){let i=r.shift(),s=r.findIndex(a=>a!=null);this.parts.push(s in fC?fC[s]({token:r[s]||i,date:this.date,parts:this.parts,locales:this.locales}):r[s]||i)}let n=this.parts.reduce((i,s)=>(typeof s=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=s:i.push(s),i),[]);this.parts.splice(0),this.parts.push(...n),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof cC)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
73
- `),this.close()}validate(){var e=this;return oC(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r})()}submit(){var e=this;return oC(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
74
- `),e.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof cC)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(lC.hide):this.out.write(uC(this.outputText,this.out.columns)),super.render(),this.outputText=[aC.symbol(this.done,this.aborted),_h.bold(this.msg),aC.delimiter(!1),this.parts.reduce((e,r,n)=>e.concat(n===this.cursor&&!this.done?_h.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
75
- `).reduce((e,r,n)=>e+`
76
- ${n?" ":BP.pointerSmall} ${_h.red().italic(r)}`,"")),this.out.write(PP.line+lC.to(0)+this.outputText))}};dC.exports=Sh});var wC=S((Hq,EC)=>{"use strict";function mC(t,e,r,n,i,s,a){try{var l=t[s](a),f=l.value}catch(c){r(c);return}l.done?e(f):Promise.resolve(f).then(n,i)}function gC(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function a(f){mC(s,n,i,a,l,"next",f)}function l(f){mC(s,n,i,a,l,"throw",f)}a(void 0)})}}var uu=$e(),HP=Rr(),bC=ke(),lu=bC.cursor,zP=bC.erase,cu=Vt(),Ah=cu.style,GP=cu.figures,DC=cu.clear,VP=cu.lines,YP=/[0-9]/,xh=t=>t!==void 0,yC=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},Rh=class extends HP{constructor(e={}){super(e),this.transform=Ah.render(e.style),this.msg=e.message,this.initial=xh(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=xh(e.min)?e.min:-1/0,this.max=xh(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=uu.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${yC(e,this.round)}`),this._value=yC(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||YP.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
77
- `),this.close()}validate(){var e=this;return gC(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r})()}submit(){var e=this;return gC(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let r=e.value;e.value=r!==""?r:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
78
- `),e.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,r){if(!this.valid(e))return this.bell();let n=Date.now();if(n-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=n,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(lu.down(VP(this.outputError,this.out.columns)-1)+DC(this.outputError,this.out.columns)),this.out.write(DC(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ah.symbol(this.done,this.aborted),uu.bold(this.msg),Ah.delimiter(this.done),!this.done||!this.done&&!this.placeholder?uu[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
79
- `).reduce((e,r,n)=>e+`
80
- ${n?" ":GP.pointerSmall} ${uu.red().italic(r)}`,"")),this.out.write(zP.line+lu.to(0)+this.outputText+lu.save+this.outputError+lu.restore))}};EC.exports=Rh});var Th=S((zq,_C)=>{"use strict";var lr=$e(),KP=ke(),XP=KP.cursor,JP=Rr(),Xs=Vt(),FC=Xs.clear,rn=Xs.figures,CC=Xs.style,QP=Xs.wrap,ZP=Xs.entriesToDisplay,Oh=class extends JP{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,n)=>(typeof r=="string"&&(r={title:r,value:n}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?n:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=FC("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
81
- `),this.close()}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
82
- `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render()}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
83
- Instructions:
84
- ${rn.arrowUp}/${rn.arrowDown}: Highlight option
85
- ${rn.arrowLeft}/${rn.arrowRight}/[space]: Toggle selection
86
- `+(this.maxChoices===void 0?` a: Toggle all
87
- `:"")+" enter/return: Complete answer":""}renderOption(e,r,n,i){let s=(r.selected?lr.green(rn.radioOn):rn.radioOff)+" "+i+" ",a,l;return r.disabled?a=e===n?lr.gray().underline(r.title):lr.strikethrough().gray(r.title):(a=e===n?lr.cyan().underline(r.title):r.title,e===n&&r.description&&(l=` - ${r.description}`,(s.length+a.length+l.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(l=`
88
- `+QP(r.description,{margin:s.length,width:this.out.columns})))),s+a+lr.gray(l||"")}paginateOptions(e){if(e.length===0)return lr.red("No matches for this query.");let r=ZP(this.cursor,e.length,this.optionsPerPage),n=r.startIndex,i=r.endIndex,s,a=[];for(let l=n;l<i;l++)l===n&&n>0?s=rn.arrowUp:l===i-1&&i<e.length?s=rn.arrowDown:s=" ",a.push(this.renderOption(this.cursor,e[l],l,s));return`
89
- `+a.join(`
90
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[lr.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(lr.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(XP.hide),super.render();let e=[CC.symbol(this.done,this.aborted),lr.bold(this.msg),CC.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=lr.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=FC(e,this.out.columns)}};_C.exports=Oh});var TC=S((Gq,OC)=>{"use strict";function SC(t,e,r,n,i,s,a){try{var l=t[s](a),f=l.value}catch(c){r(c);return}l.done?e(f):Promise.resolve(f).then(n,i)}function eI(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function a(f){SC(s,n,i,a,l,"next",f)}function l(f){SC(s,n,i,a,l,"throw",f)}a(void 0)})}}var Js=$e(),tI=Rr(),RC=ke(),rI=RC.erase,vC=RC.cursor,Qs=Vt(),Bh=Qs.style,AC=Qs.clear,Ph=Qs.figures,nI=Qs.wrap,iI=Qs.entriesToDisplay,xC=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),sI=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),oI=(t,e)=>{let r=t.findIndex(n=>n.value===e||n.title===e);return r>-1?r:void 0},Ih=class extends tI{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:oI(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Bh.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=AC("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=xC(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var r=this;return eI(function*(){let n=r.completing=r.suggest(r.input,r.choices),i=yield n;if(r.completing!==n)return;r.suggestions=i.map((a,l,f)=>({title:sI(f,l),value:xC(f,l),description:a.description})),r.completing=!1;let s=Math.max(i.length-1,0);r.moveSelect(Math.min(s,r.select)),e&&e()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
91
- `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
92
- `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
93
- `),this.close()}_(e,r){let n=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${n}${e}${i}`,this.cursor=n.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,r,n,i){let s,a=n?Ph.arrowUp:i?Ph.arrowDown:" ",l=r?Js.cyan().underline(e.title):e.title;return a=(r?Js.cyan(Ph.pointer)+" ":" ")+a,e.description&&(s=` - ${e.description}`,(a.length+l.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s=`
94
- `+nI(e.description,{margin:3,width:this.out.columns}))),a+" "+l+Js.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(vC.hide):this.out.write(AC(this.outputText,this.out.columns)),super.render();let e=iI(this.select,this.choices.length,this.limit),r=e.startIndex,n=e.endIndex;if(this.outputText=[Bh.symbol(this.done,this.aborted,this.exited),Js.bold(this.msg),Bh.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(r,n).map((s,a)=>this.renderOption(s,this.select===a+r,a===0&&r>0,a+r===n-1&&n<this.choices.length)).join(`
95
- `);this.outputText+=`
96
- `+(i||Js.gray(this.fallback.title))}this.out.write(rI.line+vC.to(0)+this.outputText)}};OC.exports=Ih});var $C=S((Vq,IC)=>{"use strict";var Br=$e(),aI=ke(),uI=aI.cursor,lI=Th(),kh=Vt(),BC=kh.clear,PC=kh.style,Li=kh.figures,$h=class extends lI{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=BC("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(n=>this.inputValue?!!(typeof n.title=="string"&&n.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof n.value=="string"&&n.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let r=this.filteredOptions.findIndex(n=>n===e);this.cursor=r<0?0:r,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
97
- Instructions:
98
- ${Li.arrowUp}/${Li.arrowDown}: Highlight option
99
- ${Li.arrowLeft}/${Li.arrowRight}/[space]: Toggle selection
100
- [a,b,c]/delete: Filter choices
101
- enter/return: Complete answer
102
- `:""}renderCurrentInput(){return`
103
- Filtered results for: ${this.inputValue?this.inputValue:Br.gray("Enter something to filter")}
104
- `}renderOption(e,r,n){let i;return r.disabled?i=e===n?Br.gray().underline(r.title):Br.strikethrough().gray(r.title):i=e===n?Br.cyan().underline(r.title):r.title,(r.selected?Br.green(Li.radioOn):Li.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[Br.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(Br.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(uI.hide),super.render();let e=[PC.symbol(this.done,this.aborted),Br.bold(this.msg),PC.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Br.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=BC(e,this.out.columns)}};IC.exports=$h});var WC=S((Yq,jC)=>{"use strict";var kC=$e(),cI=Rr(),NC=Vt(),LC=NC.style,fI=NC.clear,qC=ke(),hI=qC.erase,MC=qC.cursor,Lh=class extends cI{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
105
- `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
106
- `),this.close()}_(e,r){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(MC.hide):this.out.write(fI(this.outputText,this.out.columns)),super.render(),this.outputText=[LC.symbol(this.done,this.aborted),kC.bold(this.msg),LC.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:kC.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(hI.line+MC.to(0)+this.outputText))}};jC.exports=Lh});var HC=S((Kq,UC)=>{"use strict";UC.exports={TextPrompt:RF(),SelectPrompt:PF(),TogglePrompt:NF(),DatePrompt:pC(),NumberPrompt:wC(),MultiselectPrompt:Th(),AutocompletePrompt:TC(),AutocompleteMultiselectPrompt:$C(),ConfirmPrompt:WC()}});var GC=S(zC=>{"use strict";var pt=zC,dI=HC(),fu=t=>t;function cr(t,e,r={}){return new Promise((n,i)=>{let s=new dI[t](e),a=r.onAbort||fu,l=r.onSubmit||fu,f=r.onExit||fu;s.on("state",e.onState||fu),s.on("submit",c=>n(l(c))),s.on("exit",c=>n(f(c))),s.on("abort",c=>i(a(c)))})}pt.text=t=>cr("TextPrompt",t);pt.password=t=>(t.style="password",pt.text(t));pt.invisible=t=>(t.style="invisible",pt.text(t));pt.number=t=>cr("NumberPrompt",t);pt.date=t=>cr("DatePrompt",t);pt.confirm=t=>cr("ConfirmPrompt",t);pt.list=t=>{let e=t.separator||",";return cr("TextPrompt",t,{onSubmit:r=>r.split(e).map(n=>n.trim())})};pt.toggle=t=>cr("TogglePrompt",t);pt.select=t=>cr("SelectPrompt",t);pt.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(n=>n.selected).map(n=>n.value);return cr("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};pt.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(n=>n.selected).map(n=>n.value);return cr("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var pI=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));pt.autocomplete=t=>(t.suggest=t.suggest||pI,t.choices=[].concat(t.choices||[]),cr("AutocompletePrompt",t))});var e2=S((Jq,ZC)=>{"use strict";function VC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function YC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?VC(Object(r),!0).forEach(function(n){mI(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):VC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function mI(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gI(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=DI(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
107
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,l;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,l=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw l}}}}function DI(t,e){if(t){if(typeof t=="string")return KC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KC(t,e)}}function KC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function XC(t,e,r,n,i,s,a){try{var l=t[s](a),f=l.value}catch(c){r(c);return}l.done?e(f):Promise.resolve(f).then(n,i)}function JC(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function a(f){XC(s,n,i,a,l,"next",f)}function l(f){XC(s,n,i,a,l,"throw",f)}a(void 0)})}}var Mh=GC(),yI=["suggest","format","onState","validate","onRender","type"],QC=()=>{};function nn(){return Nh.apply(this,arguments)}function Nh(){return Nh=JC(function*(t=[],{onSubmit:e=QC,onCancel:r=QC}={}){let n={},i=nn._override||{};t=[].concat(t);let s,a,l,f,c,h,p=(function(){var A=JC(function*(x,M,q=!1){if(!(!q&&x.validate&&x.validate(M)!==!0))return x.format?yield x.format(M,n):M});return function(M,q){return A.apply(this,arguments)}})();var y=gI(t),m;try{for(y.s();!(m=y.n()).done;){a=m.value;var D=a;if(f=D.name,c=D.type,typeof c=="function"&&(c=yield c(s,YC({},n),a),a.type=c),!!c){for(let A in a){if(yI.includes(A))continue;let x=a[A];a[A]=typeof x=="function"?yield x(s,YC({},n),h):x}if(h=a,typeof a.message!="string")throw new Error("prompt message is required");var _=a;if(f=_.name,c=_.type,Mh[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(i[a.name]!==void 0&&(s=yield p(a,i[a.name]),s!==void 0)){n[f]=s;continue}try{s=nn._injected?bI(nn._injected,a.initial):yield Mh[c](a),n[f]=s=yield p(a,s,!0),l=yield e(a,s,n)}catch{l=!(yield r(a,n))}if(l)return n}}}catch(A){y.e(A)}finally{y.f()}return n}),Nh.apply(this,arguments)}function bI(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function EI(t){nn._injected=(nn._injected||[]).concat(t)}function wI(t){nn._override=Object.assign({},t)}ZC.exports=Object.assign(nn,{prompt:nn,prompts:Mh,inject:EI,override:wI})});var r2=S((Qq,t2)=>{"use strict";t2.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}}});var hu=S((Zq,n2)=>{"use strict";n2.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t}});var o2=S((ej,s2)=>{"use strict";var FI=hu(),{erase:i2,cursor:CI}=ke(),_I=t=>[...FI(t)].length;s2.exports=function(t,e){if(!e)return i2.line+CI.to(0);let r=0,n=t.split(/\r?\n/);for(let i of n)r+=1+Math.floor(Math.max(_I(i)-1,0)/e);return i2.lines(r)}});var qh=S((tj,a2)=>{"use strict";var Zs={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},SI={arrowUp:Zs.arrowUp,arrowDown:Zs.arrowDown,arrowLeft:Zs.arrowLeft,arrowRight:Zs.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},vI=process.platform==="win32"?SI:Zs;a2.exports=vI});var l2=S((rj,u2)=>{"use strict";var Mi=$e(),Un=qh(),jh=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),AI=t=>jh[t]||jh.default,eo=Object.freeze({aborted:Mi.red(Un.cross),done:Mi.green(Un.tick),exited:Mi.yellow(Un.cross),default:Mi.cyan("?")}),xI=(t,e,r)=>e?eo.aborted:r?eo.exited:t?eo.done:eo.default,RI=t=>Mi.gray(t?Un.ellipsis:Un.pointerSmall),OI=(t,e)=>Mi.gray(t?e?Un.pointerSmall:"+":Un.line);u2.exports={styles:jh,render:AI,symbols:eo,symbol:xI,delimiter:RI,item:OI}});var f2=S((nj,c2)=>{"use strict";var TI=hu();c2.exports=function(t,e){let r=String(TI(t)||"").split(/\r?\n/);return e?r.map(n=>Math.ceil(n.length/e)).reduce((n,i)=>n+i):r.length}});var d2=S((ij,h2)=>{"use strict";h2.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",n=e.width;return(t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((s,a)=>(a.length+r.length>=n||s[s.length-1].length+a.length+1<n?s[s.length-1]+=` ${a}`:s.push(`${r}${a}`),s),[r]).join(`
108
- `)).join(`
109
- `)}});var m2=S((sj,p2)=>{"use strict";p2.exports=(t,e,r)=>{r=r||e;let n=Math.min(e-r,t-Math.floor(r/2));n<0&&(n=0);let i=Math.min(n+r,e);return{startIndex:n,endIndex:i}}});var Yt=S((oj,g2)=>{"use strict";g2.exports={action:r2(),clear:o2(),style:l2(),strip:hu(),figures:qh(),lines:f2(),wrap:d2(),entriesToDisplay:m2()}});var Pr=S((aj,y2)=>{"use strict";var D2=fe("readline"),{action:BI}=Yt(),PI=fe("events"),{beep:II,cursor:$I}=ke(),kI=$e(),Wh=class extends PI{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=D2.createInterface({input:this.in,escapeCodeTimeout:50});D2.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(!0);let n=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(s,a)=>{let l=BI(a,n);l===!1?this._&&this._(s,a):typeof this[l]=="function"?this[l](a):this.bell()};this.close=()=>{this.out.write($I.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(!1),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",i)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(II)}render(){this.onRender(kI),this.firstRender&&(this.firstRender=!1)}};y2.exports=Wh});var E2=S((uj,b2)=>{var du=$e(),LI=Pr(),{erase:MI,cursor:to}=ke(),{style:Uh,clear:Hh,lines:NI,figures:qI}=Yt(),zh=class extends LI{constructor(e={}){super(e),this.transform=Uh.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Hh("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=du.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
110
- `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
111
- `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,r){let n=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${n}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:n.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(to.down(NI(this.outputError,this.out.columns)-1)+Hh(this.outputError,this.out.columns)),this.out.write(Hh(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Uh.symbol(this.done,this.aborted),du.bold(this.msg),Uh.delimiter(this.done),this.red?du.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
112
- `).reduce((e,r,n)=>e+`
113
- ${n?" ":qI.pointerSmall} ${du.red().italic(r)}`,"")),this.out.write(MI.line+to.to(0)+this.outputText+to.save+this.outputError+to.restore+to.move(this.cursorOffset,0)))}};b2.exports=zh});var _2=S((lj,C2)=>{"use strict";var Ir=$e(),jI=Pr(),{style:w2,clear:F2,figures:pu,wrap:WI,entriesToDisplay:UI}=Yt(),{cursor:HI}=ke(),Gh=class extends jI{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,n)=>(typeof r=="string"&&(r={title:r,value:n}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?n:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=F2("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
114
- `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
115
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(HI.hide):this.out.write(F2(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=UI(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[w2.symbol(this.done,this.aborted),Ir.bold(this.msg),w2.delimiter(!1),this.done?this.selection.title:this.selection.disabled?Ir.yellow(this.warn):Ir.gray(this.hint)].join(" "),!this.done){this.outputText+=`
116
- `;for(let n=e;n<r;n++){let i,s,a="",l=this.choices[n];n===e&&e>0?s=pu.arrowUp:n===r-1&&r<this.choices.length?s=pu.arrowDown:s=" ",l.disabled?(i=this.cursor===n?Ir.gray().underline(l.title):Ir.strikethrough().gray(l.title),s=(this.cursor===n?Ir.bold().gray(pu.pointer)+" ":" ")+s):(i=this.cursor===n?Ir.cyan().underline(l.title):l.title,s=(this.cursor===n?Ir.cyan(pu.pointer)+" ":" ")+s,l.description&&this.cursor===n&&(a=` - ${l.description}`,(s.length+i.length+a.length>=this.out.columns||l.description.split(/\r?\n/).length>1)&&(a=`
117
- `+WI(l.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${i}${Ir.gray(a)}
118
- `}}this.out.write(this.outputText)}};C2.exports=Gh});var x2=S((cj,A2)=>{var mu=$e(),zI=Pr(),{style:S2,clear:GI}=Yt(),{cursor:v2,erase:VI}=ke(),Vh=class extends zI{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
119
- `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
120
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(v2.hide):this.out.write(GI(this.outputText,this.out.columns)),super.render(),this.outputText=[S2.symbol(this.done,this.aborted),mu.bold(this.msg),S2.delimiter(this.done),this.value?this.inactive:mu.cyan().underline(this.inactive),mu.gray("/"),this.value?mu.cyan().underline(this.active):this.active].join(" "),this.out.write(VI.line+v2.to(0)+this.outputText))}};A2.exports=Vh});var fr=S((fj,R2)=>{"use strict";var Yh=class t{constructor({token:e,date:r,parts:n,locales:i}){this.token=e,this.date=r||new Date,this.parts=n||[this],this.locales=i||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,n)=>n>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((n,i)=>i>r&&n instanceof t)}toString(){return String(this.date)}};R2.exports=Yh});var T2=S((hj,O2)=>{"use strict";var YI=fr(),Kh=class extends YI{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};O2.exports=Kh});var P2=S((dj,B2)=>{"use strict";var KI=fr(),XI=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),Xh=class extends KI{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+XI(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};B2.exports=Xh});var $2=S((pj,I2)=>{"use strict";var JI=fr(),Jh=class extends JI{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};I2.exports=Jh});var L2=S((mj,k2)=>{"use strict";var QI=fr(),Qh=class extends QI{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};k2.exports=Qh});var N2=S((gj,M2)=>{"use strict";var ZI=fr(),Zh=class extends ZI{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};M2.exports=Zh});var j2=S((Dj,q2)=>{"use strict";var e6=fr(),ed=class extends e6{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};q2.exports=ed});var U2=S((yj,W2)=>{"use strict";var t6=fr(),td=class extends t6{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};W2.exports=td});var z2=S((bj,H2)=>{"use strict";var r6=fr(),rd=class extends r6{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};H2.exports=rd});var V2=S((Ej,G2)=>{"use strict";G2.exports={DatePart:fr(),Meridiem:T2(),Day:P2(),Hours:$2(),Milliseconds:L2(),Minutes:N2(),Month:j2(),Seconds:U2(),Year:z2()}});var e_=S((wj,Z2)=>{"use strict";var nd=$e(),n6=Pr(),{style:Y2,clear:K2,figures:i6}=Yt(),{erase:s6,cursor:X2}=ke(),{DatePart:J2,Meridiem:o6,Day:a6,Hours:u6,Milliseconds:l6,Minutes:c6,Month:f6,Seconds:h6,Year:d6}=V2(),p6=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Q2={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new a6(t),3:t=>new f6(t),4:t=>new d6(t),5:t=>new o6(t),6:t=>new u6(t),7:t=>new c6(t),8:t=>new h6(t),9:t=>new l6(t)},m6={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},id=class extends n6{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(m6,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=K2("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let r;for(this.parts=[];r=p6.exec(e);){let i=r.shift(),s=r.findIndex(a=>a!=null);this.parts.push(s in Q2?Q2[s]({token:r[s]||i,date:this.date,parts:this.parts,locales:this.locales}):r[s]||i)}let n=this.parts.reduce((i,s)=>(typeof s=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=s:i.push(s),i),[]);this.parts.splice(0),this.parts.push(...n),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof J2)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
121
- `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
122
- `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof J2)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(X2.hide):this.out.write(K2(this.outputText,this.out.columns)),super.render(),this.outputText=[Y2.symbol(this.done,this.aborted),nd.bold(this.msg),Y2.delimiter(!1),this.parts.reduce((e,r,n)=>e.concat(n===this.cursor&&!this.done?nd.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
123
- `).reduce((e,r,n)=>e+`
124
- ${n?" ":i6.pointerSmall} ${nd.red().italic(r)}`,"")),this.out.write(s6.line+X2.to(0)+this.outputText))}};Z2.exports=id});var i_=S((Fj,n_)=>{var gu=$e(),g6=Pr(),{cursor:Du,erase:D6}=ke(),{style:sd,figures:y6,clear:t_,lines:b6}=Yt(),E6=/[0-9]/,od=t=>t!==void 0,r_=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},ad=class extends g6{constructor(e={}){super(e),this.transform=sd.render(e.style),this.msg=e.message,this.initial=od(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=od(e.min)?e.min:-1/0,this.max=od(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=gu.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${r_(e,this.round)}`),this._value=r_(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||E6.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
125
- `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
126
- `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,r){if(!this.valid(e))return this.bell();let n=Date.now();if(n-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=n,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Du.down(b6(this.outputError,this.out.columns)-1)+t_(this.outputError,this.out.columns)),this.out.write(t_(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[sd.symbol(this.done,this.aborted),gu.bold(this.msg),sd.delimiter(this.done),!this.done||!this.done&&!this.placeholder?gu[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
127
- `).reduce((e,r,n)=>e+`
128
- ${n?" ":y6.pointerSmall} ${gu.red().italic(r)}`,"")),this.out.write(D6.line+Du.to(0)+this.outputText+Du.save+this.outputError+Du.restore))}};n_.exports=ad});var ld=S((Cj,a_)=>{"use strict";var hr=$e(),{cursor:w6}=ke(),F6=Pr(),{clear:s_,figures:sn,style:o_,wrap:C6,entriesToDisplay:_6}=Yt(),ud=class extends F6{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,n)=>(typeof r=="string"&&(r={title:r,value:n}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?n:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=s_("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
129
- `),this.close()}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
130
- `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render()}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
131
- Instructions:
132
- ${sn.arrowUp}/${sn.arrowDown}: Highlight option
133
- ${sn.arrowLeft}/${sn.arrowRight}/[space]: Toggle selection
134
- `+(this.maxChoices===void 0?` a: Toggle all
135
- `:"")+" enter/return: Complete answer":""}renderOption(e,r,n,i){let s=(r.selected?hr.green(sn.radioOn):sn.radioOff)+" "+i+" ",a,l;return r.disabled?a=e===n?hr.gray().underline(r.title):hr.strikethrough().gray(r.title):(a=e===n?hr.cyan().underline(r.title):r.title,e===n&&r.description&&(l=` - ${r.description}`,(s.length+a.length+l.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(l=`
136
- `+C6(r.description,{margin:s.length,width:this.out.columns})))),s+a+hr.gray(l||"")}paginateOptions(e){if(e.length===0)return hr.red("No matches for this query.");let{startIndex:r,endIndex:n}=_6(this.cursor,e.length,this.optionsPerPage),i,s=[];for(let a=r;a<n;a++)a===r&&r>0?i=sn.arrowUp:a===n-1&&n<e.length?i=sn.arrowDown:i=" ",s.push(this.renderOption(this.cursor,e[a],a,i));return`
137
- `+s.join(`
138
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[hr.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(hr.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(w6.hide),super.render();let e=[o_.symbol(this.done,this.aborted),hr.bold(this.msg),o_.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=hr.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=s_(e,this.out.columns)}};a_.exports=ud});var h_=S((_j,f_)=>{"use strict";var ro=$e(),S6=Pr(),{erase:v6,cursor:u_}=ke(),{style:cd,clear:l_,figures:fd,wrap:A6,entriesToDisplay:x6}=Yt(),c_=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),R6=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),O6=(t,e)=>{let r=t.findIndex(n=>n.value===e||n.title===e);return r>-1?r:void 0},hd=class extends S6{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:O6(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=cd.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=l_("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=c_(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){let r=this.completing=this.suggest(this.input,this.choices),n=await r;if(this.completing!==r)return;this.suggestions=n.map((s,a,l)=>({title:R6(l,a),value:c_(l,a),description:s.description})),this.completing=!1;let i=Math.max(n.length-1,0);this.moveSelect(Math.min(i,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
139
- `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
140
- `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
141
- `),this.close()}_(e,r){let n=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${n}${e}${i}`,this.cursor=n.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,r,n,i){let s,a=n?fd.arrowUp:i?fd.arrowDown:" ",l=r?ro.cyan().underline(e.title):e.title;return a=(r?ro.cyan(fd.pointer)+" ":" ")+a,e.description&&(s=` - ${e.description}`,(a.length+l.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s=`
142
- `+A6(e.description,{margin:3,width:this.out.columns}))),a+" "+l+ro.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(u_.hide):this.out.write(l_(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=x6(this.select,this.choices.length,this.limit);if(this.outputText=[cd.symbol(this.done,this.aborted,this.exited),ro.bold(this.msg),cd.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let n=this.suggestions.slice(e,r).map((i,s)=>this.renderOption(i,this.select===s+e,s===0&&e>0,s+e===r-1&&r<this.choices.length)).join(`
143
- `);this.outputText+=`
144
- `+(n||ro.gray(this.fallback.title))}this.out.write(v6.line+u_.to(0)+this.outputText)}};f_.exports=hd});var g_=S((Sj,m_)=>{"use strict";var $r=$e(),{cursor:T6}=ke(),B6=ld(),{clear:d_,style:p_,figures:Ni}=Yt(),dd=class extends B6{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=d_("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(n=>this.inputValue?!!(typeof n.title=="string"&&n.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof n.value=="string"&&n.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let r=this.filteredOptions.findIndex(n=>n===e);this.cursor=r<0?0:r,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
145
- Instructions:
146
- ${Ni.arrowUp}/${Ni.arrowDown}: Highlight option
147
- ${Ni.arrowLeft}/${Ni.arrowRight}/[space]: Toggle selection
148
- [a,b,c]/delete: Filter choices
149
- enter/return: Complete answer
150
- `:""}renderCurrentInput(){return`
151
- Filtered results for: ${this.inputValue?this.inputValue:$r.gray("Enter something to filter")}
152
- `}renderOption(e,r,n){let i;return r.disabled?i=e===n?$r.gray().underline(r.title):$r.strikethrough().gray(r.title):i=e===n?$r.cyan().underline(r.title):r.title,(r.selected?$r.green(Ni.radioOn):Ni.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[$r.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push($r.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(T6.hide),super.render();let e=[p_.symbol(this.done,this.aborted),$r.bold(this.msg),p_.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=$r.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=d_(e,this.out.columns)}};m_.exports=dd});var w_=S((vj,E_)=>{var D_=$e(),P6=Pr(),{style:y_,clear:I6}=Yt(),{erase:$6,cursor:b_}=ke(),pd=class extends P6{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
153
- `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
154
- `),this.close()}_(e,r){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(b_.hide):this.out.write(I6(this.outputText,this.out.columns)),super.render(),this.outputText=[y_.symbol(this.done,this.aborted),D_.bold(this.msg),y_.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:D_.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write($6.line+b_.to(0)+this.outputText))}};E_.exports=pd});var C_=S((Aj,F_)=>{"use strict";F_.exports={TextPrompt:E2(),SelectPrompt:_2(),TogglePrompt:x2(),DatePrompt:e_(),NumberPrompt:i_(),MultiselectPrompt:ld(),AutocompletePrompt:h_(),AutocompleteMultiselectPrompt:g_(),ConfirmPrompt:w_()}});var S_=S(__=>{"use strict";var mt=__,k6=C_(),yu=t=>t;function dr(t,e,r={}){return new Promise((n,i)=>{let s=new k6[t](e),a=r.onAbort||yu,l=r.onSubmit||yu,f=r.onExit||yu;s.on("state",e.onState||yu),s.on("submit",c=>n(l(c))),s.on("exit",c=>n(f(c))),s.on("abort",c=>i(a(c)))})}mt.text=t=>dr("TextPrompt",t);mt.password=t=>(t.style="password",mt.text(t));mt.invisible=t=>(t.style="invisible",mt.text(t));mt.number=t=>dr("NumberPrompt",t);mt.date=t=>dr("DatePrompt",t);mt.confirm=t=>dr("ConfirmPrompt",t);mt.list=t=>{let e=t.separator||",";return dr("TextPrompt",t,{onSubmit:r=>r.split(e).map(n=>n.trim())})};mt.toggle=t=>dr("TogglePrompt",t);mt.select=t=>dr("SelectPrompt",t);mt.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(n=>n.selected).map(n=>n.value);return dr("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};mt.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(n=>n.selected).map(n=>n.value);return dr("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var L6=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));mt.autocomplete=t=>(t.suggest=t.suggest||L6,t.choices=[].concat(t.choices||[]),dr("AutocompletePrompt",t))});var x_=S((Rj,A_)=>{"use strict";var md=S_(),M6=["suggest","format","onState","validate","onRender","type"],v_=()=>{};async function on(t=[],{onSubmit:e=v_,onCancel:r=v_}={}){let n={},i=on._override||{};t=[].concat(t);let s,a,l,f,c,h,p=async(y,m,D=!1)=>{if(!(!D&&y.validate&&y.validate(m)!==!0))return y.format?await y.format(m,n):m};for(a of t)if({name:f,type:c}=a,typeof c=="function"&&(c=await c(s,{...n},a),a.type=c),!!c){for(let y in a){if(M6.includes(y))continue;let m=a[y];a[y]=typeof m=="function"?await m(s,{...n},h):m}if(h=a,typeof a.message!="string")throw new Error("prompt message is required");if({name:f,type:c}=a,md[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(i[a.name]!==void 0&&(s=await p(a,i[a.name]),s!==void 0)){n[f]=s;continue}try{s=on._injected?N6(on._injected,a.initial):await md[c](a),n[f]=s=await p(a,s,!0),l=await e(a,s,n)}catch{l=!await r(a,n)}if(l)return n}return n}function N6(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function q6(t){on._injected=(on._injected||[]).concat(t)}function j6(t){on._override=Object.assign({},t)}A_.exports=Object.assign(on,{prompt:on,prompts:md,inject:q6,override:j6})});var gd=S((Oj,R_)=>{function W6(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return!1;if(t[e]>r[e])return!0}return!1}R_.exports=W6("8.6.0")?e2():x_()});function kr(t){return an&&an.stop(),an=Jf({text:I.cyan(t),spinner:"dots",color:"cyan"}).start(),an}function Ct(t=!0,e){an&&(t?an.succeed(e?I.green(e):void 0):an.fail(e?I.red(e):void 0),an=null)}function Hn(t){console.log(),console.log(I.bold(I.cyan(` ${Fe.rocket} ${t}`))),console.log(I.dim(" "+"\u2500".repeat(t.length+4)))}function T_(t){console.log(),console.log(I.bold(I.white(` ${Fe.dot} ${t}`)))}function pr(t){console.log(` ${Fe.success} ${I.green(t)}`)}function _t(t,e){console.log(` ${Fe.error} ${I.red(t)}`),e&&console.log(I.dim(` ${e}`))}function no(t){console.log(` ${Fe.warning} ${I.yellow(t)}`)}function Ze(t){console.log(` ${Fe.info} ${I.blue(t)}`)}function B_(t,e,r=I.gray){console.log(` ${r(t.padEnd(20))} ${I.white(e)}`)}function zn(t){return new O_.default({head:t.map(e=>I.bold(I.cyan(e))),style:{head:[],border:[I.dim("gray")]},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"}})}function It(t,e){console.log(` ${I.dim("$")} ${I.cyan(t)} ${I.gray(e)}`)}function io(){console.log(I.dim(" "+"\u2500".repeat(60)))}function P_(){console.log(),console.log(I.cyan(" \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E")),console.log(I.cyan(" \u2502")+" "+I.bold(I.magenta("\u{1F680} Delta CLI"))+I.dim(" - Code Analysis & Documentation ")+I.cyan("\u2502")),console.log(I.cyan(" \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524")),console.log(I.cyan(" \u2502")+" "+I.gray("Local-first analysis with cloud power ")+I.cyan("\u2502")),console.log(I.cyan(" \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F")),console.log()}var O_,U6,Fe,an,so=te(()=>{"use strict";nr();lw();O_=We(eF(),1),U6=We(gd(),1),Fe={success:I.green("\u2714"),error:I.red("\u2716"),warning:I.yellow("\u26A0"),info:I.blue("\u2139"),arrow:I.cyan("\u2192"),bullet:I.dim("\u2022"),star:I.yellow("\u2605"),check:I.green("\u2713"),cross:I.red("\u2717"),loading:I.cyan("\u23F3"),rocket:I.magenta("\u{1F680}"),lock:I.yellow("\u{1F512}"),user:I.blue("\u{1F464}"),package:I.cyan("\u{1F4E6}"),chart:I.green("\u{1F4CA}"),folder:I.yellow("\u{1F4C1}"),gear:I.gray("\u2699\uFE0F"),link:I.blue("\u{1F517}"),sparkles:I.yellow("\u2728"),dot:I.cyan("\u23F5")},an=null});function H6(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),n="",i=!1,s=r[0]||"text/plain",a=s;for(let h=1;h<r.length;h++)r[h]==="base64"?i=!0:r[h]&&(a+=`;${r[h]}`,r[h].indexOf("charset=")===0&&(n=r[h].substring(8)));!r[0]&&!n.length&&(a+=";charset=US-ASCII",n="US-ASCII");let l=i?"base64":"ascii",f=unescape(t.substring(e+1)),c=Buffer.from(f,l);return c.type=s,c.typeFull=a,c.charset=n,c}var I_,$_=te(()=>{I_=H6});var L_=S((bu,k_)=>{(function(t,e){typeof bu=="object"&&typeof k_<"u"?e(bu):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(bu,(function(t){"use strict";function e(){}function r(o){return typeof o=="object"&&o!==null||typeof o=="function"}let n=e;function i(o,u){try{Object.defineProperty(o,"name",{value:u,configurable:!0})}catch{}}let s=Promise,a=Promise.prototype.then,l=Promise.reject.bind(s);function f(o){return new s(o)}function c(o){return f(u=>u(o))}function h(o){return l(o)}function p(o,u,d){return a.call(o,u,d)}function y(o,u,d){p(p(o,u,d),void 0,n)}function m(o,u){y(o,u)}function D(o,u){y(o,void 0,u)}function _(o,u,d){return p(o,u,d)}function A(o){p(o,void 0,n)}let x=o=>{if(typeof queueMicrotask=="function")x=queueMicrotask;else{let u=c(void 0);x=d=>p(u,d)}return x(o)};function M(o,u,d){if(typeof o!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(o,u,d)}function q(o,u,d){try{return c(M(o,u,d))}catch(w){return h(w)}}let L=16384;class V{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(u){let d=this._back,w=d;d._elements.length===L-1&&(w={_elements:[],_next:void 0}),d._elements.push(u),w!==d&&(this._back=w,d._next=w),++this._size}shift(){let u=this._front,d=u,w=this._cursor,C=w+1,B=u._elements,k=B[w];return C===L&&(d=u._next,C=0),--this._size,this._cursor=C,u!==d&&(this._front=d),B[w]=void 0,k}forEach(u){let d=this._cursor,w=this._front,C=w._elements;for(;(d!==C.length||w._next!==void 0)&&!(d===C.length&&(w=w._next,C=w._elements,d=0,C.length===0));)u(C[d]),++d}peek(){let u=this._front,d=this._cursor;return u._elements[d]}}let se=Symbol("[[AbortSteps]]"),le=Symbol("[[ErrorSteps]]"),_e=Symbol("[[CancelSteps]]"),N=Symbol("[[PullSteps]]"),j=Symbol("[[ReleaseSteps]]");function z(o,u){o._ownerReadableStream=u,u._reader=o,u._state==="readable"?X(o):u._state==="closed"?ee(o):ae(o,u._storedError)}function ce(o,u){let d=o._ownerReadableStream;return jt(d,u)}function W(o){let u=o._ownerReadableStream;u._state==="readable"?oe(o,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Z(o,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._readableStreamController[j](),u._reader=void 0,o._ownerReadableStream=void 0}function ie(o){return new TypeError("Cannot "+o+" a stream using a released reader")}function X(o){o._closedPromise=f((u,d)=>{o._closedPromise_resolve=u,o._closedPromise_reject=d})}function ae(o,u){X(o),oe(o,u)}function ee(o){X(o),Jt(o)}function oe(o,u){o._closedPromise_reject!==void 0&&(A(o._closedPromise),o._closedPromise_reject(u),o._closedPromise_resolve=void 0,o._closedPromise_reject=void 0)}function Z(o,u){ae(o,u)}function Jt(o){o._closedPromise_resolve!==void 0&&(o._closedPromise_resolve(void 0),o._closedPromise_resolve=void 0,o._closedPromise_reject=void 0)}let Se=Number.isFinite||function(o){return typeof o=="number"&&isFinite(o)},O=Math.trunc||function(o){return o<0?Math.ceil(o):Math.floor(o)};function P(o){return typeof o=="object"||typeof o=="function"}function F(o,u){if(o!==void 0&&!P(o))throw new TypeError(`${u} is not an object.`)}function R(o,u){if(typeof o!="function")throw new TypeError(`${u} is not a function.`)}function g(o){return typeof o=="object"&&o!==null||typeof o=="function"}function E(o,u){if(!g(o))throw new TypeError(`${u} is not an object.`)}function b(o,u,d){if(o===void 0)throw new TypeError(`Parameter ${u} is required in '${d}'.`)}function v(o,u,d){if(o===void 0)throw new TypeError(`${u} is required in '${d}'.`)}function T(o){return Number(o)}function $(o){return o===0?0:o}function U(o){return $(O(o))}function H(o,u){let w=Number.MAX_SAFE_INTEGER,C=Number(o);if(C=$(C),!Se(C))throw new TypeError(`${u} is not a finite number`);if(C=U(C),C<0||C>w)throw new TypeError(`${u} is outside the accepted range of 0 to ${w}, inclusive`);return!Se(C)||C===0?0:C}function J(o,u){if(!Hr(o))throw new TypeError(`${u} is not a ReadableStream.`)}function re(o){return new et(o)}function qe(o,u){o._reader._readRequests.push(u)}function Ee(o,u,d){let C=o._reader._readRequests.shift();d?C._closeSteps():C._chunkSteps(u)}function Qt(o){return o._reader._readRequests.length}function ft(o){let u=o._reader;return!(u===void 0||!Me(u))}class et{constructor(u){if(b(u,1,"ReadableStreamDefaultReader"),J(u,"First parameter"),zr(u))throw new TypeError("This stream has already been locked for exclusive reading by another reader");z(this,u),this._readRequests=new V}get closed(){return Me(this)?this._closedPromise:h(fo("closed"))}cancel(u=void 0){return Me(this)?this._ownerReadableStream===void 0?h(ie("cancel")):ce(this,u):h(fo("cancel"))}read(){if(!Me(this))return h(fo("read"));if(this._ownerReadableStream===void 0)return h(ie("read from"));let u,d,w=f((B,k)=>{u=B,d=k});return je(this,{_chunkSteps:B=>u({value:B,done:!1}),_closeSteps:()=>u({value:void 0,done:!0}),_errorSteps:B=>d(B)}),w}releaseLock(){if(!Me(this))throw fo("releaseLock");this._ownerReadableStream!==void 0&&Hu(this)}}Object.defineProperties(et.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(et.prototype.cancel,"cancel"),i(et.prototype.read,"read"),i(et.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(et.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Me(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_readRequests")?!1:o instanceof et}function je(o,u){let d=o._ownerReadableStream;d._disturbed=!0,d._state==="closed"?u._closeSteps():d._state==="errored"?u._errorSteps(d._storedError):d._readableStreamController[N](u)}function Hu(o){W(o);let u=new TypeError("Reader was released");Qd(o,u)}function Qd(o,u){let d=o._readRequests;o._readRequests=new V,d.forEach(w=>{w._errorSteps(u)})}function fo(o){return new TypeError(`ReadableStreamDefaultReader.prototype.${o} can only be used on a ReadableStreamDefaultReader`)}let dS=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Zd{constructor(u,d){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=u,this._preventCancel=d}next(){let u=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?_(this._ongoingPromise,u,u):u(),this._ongoingPromise}return(u){let d=()=>this._returnSteps(u);return this._ongoingPromise?_(this._ongoingPromise,d,d):d()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let u=this._reader,d,w,C=f((k,G)=>{d=k,w=G});return je(u,{_chunkSteps:k=>{this._ongoingPromise=void 0,x(()=>d({value:k,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,W(u),d({value:void 0,done:!0})},_errorSteps:k=>{this._ongoingPromise=void 0,this._isFinished=!0,W(u),w(k)}}),C}_returnSteps(u){if(this._isFinished)return Promise.resolve({value:u,done:!0});this._isFinished=!0;let d=this._reader;if(!this._preventCancel){let w=ce(d,u);return W(d),_(w,()=>({value:u,done:!0}))}return W(d),c({value:u,done:!0})}}let ep={next(){return tp(this)?this._asyncIteratorImpl.next():h(rp("next"))},return(o){return tp(this)?this._asyncIteratorImpl.return(o):h(rp("return"))}};Object.setPrototypeOf(ep,dS);function pS(o,u){let d=re(o),w=new Zd(d,u),C=Object.create(ep);return C._asyncIteratorImpl=w,C}function tp(o){if(!r(o)||!Object.prototype.hasOwnProperty.call(o,"_asyncIteratorImpl"))return!1;try{return o._asyncIteratorImpl instanceof Zd}catch{return!1}}function rp(o){return new TypeError(`ReadableStreamAsyncIterator.${o} can only be used on a ReadableSteamAsyncIterator`)}let np=Number.isNaN||function(o){return o!==o};var zu,Gu,Vu;function Ji(o){return o.slice()}function ip(o,u,d,w,C){new Uint8Array(o).set(new Uint8Array(d,w,C),u)}let yr=o=>(typeof o.transfer=="function"?yr=u=>u.transfer():typeof structuredClone=="function"?yr=u=>structuredClone(u,{transfer:[u]}):yr=u=>u,yr(o)),qr=o=>(typeof o.detached=="boolean"?qr=u=>u.detached:qr=u=>u.byteLength===0,qr(o));function sp(o,u,d){if(o.slice)return o.slice(u,d);let w=d-u,C=new ArrayBuffer(w);return ip(C,0,o,u,w),C}function ho(o,u){let d=o[u];if(d!=null){if(typeof d!="function")throw new TypeError(`${String(u)} is not a function`);return d}}function mS(o){let u={[Symbol.iterator]:()=>o.iterator},d=(async function*(){return yield*u})(),w=d.next;return{iterator:d,nextMethod:w,done:!1}}let Yu=(Vu=(zu=Symbol.asyncIterator)!==null&&zu!==void 0?zu:(Gu=Symbol.for)===null||Gu===void 0?void 0:Gu.call(Symbol,"Symbol.asyncIterator"))!==null&&Vu!==void 0?Vu:"@@asyncIterator";function op(o,u="sync",d){if(d===void 0)if(u==="async"){if(d=ho(o,Yu),d===void 0){let B=ho(o,Symbol.iterator),k=op(o,"sync",B);return mS(k)}}else d=ho(o,Symbol.iterator);if(d===void 0)throw new TypeError("The object is not iterable");let w=M(d,o,[]);if(!r(w))throw new TypeError("The iterator method must return an object");let C=w.next;return{iterator:w,nextMethod:C,done:!1}}function gS(o){let u=M(o.nextMethod,o.iterator,[]);if(!r(u))throw new TypeError("The iterator.next() method must return an object");return u}function DS(o){return!!o.done}function yS(o){return o.value}function bS(o){return!(typeof o!="number"||np(o)||o<0)}function ap(o){let u=sp(o.buffer,o.byteOffset,o.byteOffset+o.byteLength);return new Uint8Array(u)}function Ku(o){let u=o._queue.shift();return o._queueTotalSize-=u.size,o._queueTotalSize<0&&(o._queueTotalSize=0),u.value}function Xu(o,u,d){if(!bS(d)||d===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");o._queue.push({value:u,size:d}),o._queueTotalSize+=d}function ES(o){return o._queue.peek().value}function jr(o){o._queue=new V,o._queueTotalSize=0}function up(o){return o===DataView}function wS(o){return up(o.constructor)}function FS(o){return up(o)?1:o.BYTES_PER_ELEMENT}class pn{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ju(this))throw rl("view");return this._view}respond(u){if(!Ju(this))throw rl("respond");if(b(u,1,"respond"),u=H(u,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(qr(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Do(this._associatedReadableByteStreamController,u)}respondWithNewView(u){if(!Ju(this))throw rl("respondWithNewView");if(b(u,1,"respondWithNewView"),!ArrayBuffer.isView(u))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(qr(u.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");yo(this._associatedReadableByteStreamController,u)}}Object.defineProperties(pn.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),i(pn.prototype.respond,"respond"),i(pn.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(pn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class br{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!mn(this))throw Zi("byobRequest");return tl(this)}get desiredSize(){if(!mn(this))throw Zi("desiredSize");return yp(this)}close(){if(!mn(this))throw Zi("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let u=this._controlledReadableByteStream._state;if(u!=="readable")throw new TypeError(`The stream (in ${u} state) is not in the readable state and cannot be closed`);Qi(this)}enqueue(u){if(!mn(this))throw Zi("enqueue");if(b(u,1,"enqueue"),!ArrayBuffer.isView(u))throw new TypeError("chunk must be an array buffer view");if(u.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(u.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError(`The stream (in ${d} state) is not in the readable state and cannot be enqueued to`);go(this,u)}error(u=void 0){if(!mn(this))throw Zi("error");At(this,u)}[_e](u){lp(this),jr(this);let d=this._cancelAlgorithm(u);return mo(this),d}[N](u){let d=this._controlledReadableByteStream;if(this._queueTotalSize>0){Dp(this,u);return}let w=this._autoAllocateChunkSize;if(w!==void 0){let C;try{C=new ArrayBuffer(w)}catch(k){u._errorSteps(k);return}let B={buffer:C,bufferByteLength:w,byteOffset:0,byteLength:w,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(B)}qe(d,u),gn(this)}[j](){if(this._pendingPullIntos.length>0){let u=this._pendingPullIntos.peek();u.readerType="none",this._pendingPullIntos=new V,this._pendingPullIntos.push(u)}}}Object.defineProperties(br.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),i(br.prototype.close,"close"),i(br.prototype.enqueue,"enqueue"),i(br.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(br.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function mn(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_controlledReadableByteStream")?!1:o instanceof br}function Ju(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_associatedReadableByteStreamController")?!1:o instanceof pn}function gn(o){if(!AS(o))return;if(o._pulling){o._pullAgain=!0;return}o._pulling=!0;let d=o._pullAlgorithm();y(d,()=>(o._pulling=!1,o._pullAgain&&(o._pullAgain=!1,gn(o)),null),w=>(At(o,w),null))}function lp(o){Zu(o),o._pendingPullIntos=new V}function Qu(o,u){let d=!1;o._state==="closed"&&(d=!0);let w=cp(u);u.readerType==="default"?Ee(o,w,d):PS(o,w,d)}function cp(o){let u=o.bytesFilled,d=o.elementSize;return new o.viewConstructor(o.buffer,o.byteOffset,u/d)}function po(o,u,d,w){o._queue.push({buffer:u,byteOffset:d,byteLength:w}),o._queueTotalSize+=w}function fp(o,u,d,w){let C;try{C=sp(u,d,d+w)}catch(B){throw At(o,B),B}po(o,C,0,w)}function hp(o,u){u.bytesFilled>0&&fp(o,u.buffer,u.byteOffset,u.bytesFilled),ti(o)}function dp(o,u){let d=Math.min(o._queueTotalSize,u.byteLength-u.bytesFilled),w=u.bytesFilled+d,C=d,B=!1,k=w%u.elementSize,G=w-k;G>=u.minimumFill&&(C=G-u.bytesFilled,B=!0);let he=o._queue;for(;C>0;){let ne=he.peek(),de=Math.min(C,ne.byteLength),ge=u.byteOffset+u.bytesFilled;ip(u.buffer,ge,ne.buffer,ne.byteOffset,de),ne.byteLength===de?he.shift():(ne.byteOffset+=de,ne.byteLength-=de),o._queueTotalSize-=de,pp(o,de,u),C-=de}return B}function pp(o,u,d){d.bytesFilled+=u}function mp(o){o._queueTotalSize===0&&o._closeRequested?(mo(o),ss(o._controlledReadableByteStream)):gn(o)}function Zu(o){o._byobRequest!==null&&(o._byobRequest._associatedReadableByteStreamController=void 0,o._byobRequest._view=null,o._byobRequest=null)}function el(o){for(;o._pendingPullIntos.length>0;){if(o._queueTotalSize===0)return;let u=o._pendingPullIntos.peek();dp(o,u)&&(ti(o),Qu(o._controlledReadableByteStream,u))}}function CS(o){let u=o._controlledReadableByteStream._reader;for(;u._readRequests.length>0;){if(o._queueTotalSize===0)return;let d=u._readRequests.shift();Dp(o,d)}}function _S(o,u,d,w){let C=o._controlledReadableByteStream,B=u.constructor,k=FS(B),{byteOffset:G,byteLength:he}=u,ne=d*k,de;try{de=yr(u.buffer)}catch(Ce){w._errorSteps(Ce);return}let ge={buffer:de,bufferByteLength:de.byteLength,byteOffset:G,byteLength:he,bytesFilled:0,minimumFill:ne,elementSize:k,viewConstructor:B,readerType:"byob"};if(o._pendingPullIntos.length>0){o._pendingPullIntos.push(ge),wp(C,w);return}if(C._state==="closed"){let Ce=new B(ge.buffer,ge.byteOffset,0);w._closeSteps(Ce);return}if(o._queueTotalSize>0){if(dp(o,ge)){let Ce=cp(ge);mp(o),w._chunkSteps(Ce);return}if(o._closeRequested){let Ce=new TypeError("Insufficient bytes to fill elements in the given buffer");At(o,Ce),w._errorSteps(Ce);return}}o._pendingPullIntos.push(ge),wp(C,w),gn(o)}function SS(o,u){u.readerType==="none"&&ti(o);let d=o._controlledReadableByteStream;if(nl(d))for(;Fp(d)>0;){let w=ti(o);Qu(d,w)}}function vS(o,u,d){if(pp(o,u,d),d.readerType==="none"){hp(o,d),el(o);return}if(d.bytesFilled<d.minimumFill)return;ti(o);let w=d.bytesFilled%d.elementSize;if(w>0){let C=d.byteOffset+d.bytesFilled;fp(o,d.buffer,C-w,w)}d.bytesFilled-=w,Qu(o._controlledReadableByteStream,d),el(o)}function gp(o,u){let d=o._pendingPullIntos.peek();Zu(o),o._controlledReadableByteStream._state==="closed"?SS(o,d):vS(o,u,d),gn(o)}function ti(o){return o._pendingPullIntos.shift()}function AS(o){let u=o._controlledReadableByteStream;return u._state!=="readable"||o._closeRequested||!o._started?!1:!!(ft(u)&&Qt(u)>0||nl(u)&&Fp(u)>0||yp(o)>0)}function mo(o){o._pullAlgorithm=void 0,o._cancelAlgorithm=void 0}function Qi(o){let u=o._controlledReadableByteStream;if(!(o._closeRequested||u._state!=="readable")){if(o._queueTotalSize>0){o._closeRequested=!0;return}if(o._pendingPullIntos.length>0){let d=o._pendingPullIntos.peek();if(d.bytesFilled%d.elementSize!==0){let w=new TypeError("Insufficient bytes to fill elements in the given buffer");throw At(o,w),w}}mo(o),ss(u)}}function go(o,u){let d=o._controlledReadableByteStream;if(o._closeRequested||d._state!=="readable")return;let{buffer:w,byteOffset:C,byteLength:B}=u;if(qr(w))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let k=yr(w);if(o._pendingPullIntos.length>0){let G=o._pendingPullIntos.peek();if(qr(G.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Zu(o),G.buffer=yr(G.buffer),G.readerType==="none"&&hp(o,G)}if(ft(d))if(CS(o),Qt(d)===0)po(o,k,C,B);else{o._pendingPullIntos.length>0&&ti(o);let G=new Uint8Array(k,C,B);Ee(d,G,!1)}else nl(d)?(po(o,k,C,B),el(o)):po(o,k,C,B);gn(o)}function At(o,u){let d=o._controlledReadableByteStream;d._state==="readable"&&(lp(o),jr(o),mo(o),Gp(d,u))}function Dp(o,u){let d=o._queue.shift();o._queueTotalSize-=d.byteLength,mp(o);let w=new Uint8Array(d.buffer,d.byteOffset,d.byteLength);u._chunkSteps(w)}function tl(o){if(o._byobRequest===null&&o._pendingPullIntos.length>0){let u=o._pendingPullIntos.peek(),d=new Uint8Array(u.buffer,u.byteOffset+u.bytesFilled,u.byteLength-u.bytesFilled),w=Object.create(pn.prototype);RS(w,o,d),o._byobRequest=w}return o._byobRequest}function yp(o){let u=o._controlledReadableByteStream._state;return u==="errored"?null:u==="closed"?0:o._strategyHWM-o._queueTotalSize}function Do(o,u){let d=o._pendingPullIntos.peek();if(o._controlledReadableByteStream._state==="closed"){if(u!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(u===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(d.bytesFilled+u>d.byteLength)throw new RangeError("bytesWritten out of range")}d.buffer=yr(d.buffer),gp(o,u)}function yo(o,u){let d=o._pendingPullIntos.peek();if(o._controlledReadableByteStream._state==="closed"){if(u.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(u.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(d.byteOffset+d.bytesFilled!==u.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(d.bufferByteLength!==u.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(d.bytesFilled+u.byteLength>d.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let C=u.byteLength;d.buffer=yr(u.buffer),gp(o,C)}function bp(o,u,d,w,C,B,k){u._controlledReadableByteStream=o,u._pullAgain=!1,u._pulling=!1,u._byobRequest=null,u._queue=u._queueTotalSize=void 0,jr(u),u._closeRequested=!1,u._started=!1,u._strategyHWM=B,u._pullAlgorithm=w,u._cancelAlgorithm=C,u._autoAllocateChunkSize=k,u._pendingPullIntos=new V,o._readableStreamController=u;let G=d();y(c(G),()=>(u._started=!0,gn(u),null),he=>(At(u,he),null))}function xS(o,u,d){let w=Object.create(br.prototype),C,B,k;u.start!==void 0?C=()=>u.start(w):C=()=>{},u.pull!==void 0?B=()=>u.pull(w):B=()=>c(void 0),u.cancel!==void 0?k=he=>u.cancel(he):k=()=>c(void 0);let G=u.autoAllocateChunkSize;if(G===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");bp(o,w,C,B,k,d,G)}function RS(o,u,d){o._associatedReadableByteStreamController=u,o._view=d}function rl(o){return new TypeError(`ReadableStreamBYOBRequest.prototype.${o} can only be used on a ReadableStreamBYOBRequest`)}function Zi(o){return new TypeError(`ReadableByteStreamController.prototype.${o} can only be used on a ReadableByteStreamController`)}function OS(o,u){F(o,u);let d=o?.mode;return{mode:d===void 0?void 0:TS(d,`${u} has member 'mode' that`)}}function TS(o,u){if(o=`${o}`,o!=="byob")throw new TypeError(`${u} '${o}' is not a valid enumeration value for ReadableStreamReaderMode`);return o}function BS(o,u){var d;F(o,u);let w=(d=o?.min)!==null&&d!==void 0?d:1;return{min:H(w,`${u} has member 'min' that`)}}function Ep(o){return new Wr(o)}function wp(o,u){o._reader._readIntoRequests.push(u)}function PS(o,u,d){let C=o._reader._readIntoRequests.shift();d?C._closeSteps(u):C._chunkSteps(u)}function Fp(o){return o._reader._readIntoRequests.length}function nl(o){let u=o._reader;return!(u===void 0||!Dn(u))}class Wr{constructor(u){if(b(u,1,"ReadableStreamBYOBReader"),J(u,"First parameter"),zr(u))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!mn(u._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");z(this,u),this._readIntoRequests=new V}get closed(){return Dn(this)?this._closedPromise:h(bo("closed"))}cancel(u=void 0){return Dn(this)?this._ownerReadableStream===void 0?h(ie("cancel")):ce(this,u):h(bo("cancel"))}read(u,d={}){if(!Dn(this))return h(bo("read"));if(!ArrayBuffer.isView(u))return h(new TypeError("view must be an array buffer view"));if(u.byteLength===0)return h(new TypeError("view must have non-zero byteLength"));if(u.buffer.byteLength===0)return h(new TypeError("view's buffer must have non-zero byteLength"));if(qr(u.buffer))return h(new TypeError("view's buffer has been detached"));let w;try{w=BS(d,"options")}catch(ne){return h(ne)}let C=w.min;if(C===0)return h(new TypeError("options.min must be greater than 0"));if(wS(u)){if(C>u.byteLength)return h(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(C>u.length)return h(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return h(ie("read from"));let B,k,G=f((ne,de)=>{B=ne,k=de});return Cp(this,u,C,{_chunkSteps:ne=>B({value:ne,done:!1}),_closeSteps:ne=>B({value:ne,done:!0}),_errorSteps:ne=>k(ne)}),G}releaseLock(){if(!Dn(this))throw bo("releaseLock");this._ownerReadableStream!==void 0&&IS(this)}}Object.defineProperties(Wr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(Wr.prototype.cancel,"cancel"),i(Wr.prototype.read,"read"),i(Wr.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Wr.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Dn(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_readIntoRequests")?!1:o instanceof Wr}function Cp(o,u,d,w){let C=o._ownerReadableStream;C._disturbed=!0,C._state==="errored"?w._errorSteps(C._storedError):_S(C._readableStreamController,u,d,w)}function IS(o){W(o);let u=new TypeError("Reader was released");_p(o,u)}function _p(o,u){let d=o._readIntoRequests;o._readIntoRequests=new V,d.forEach(w=>{w._errorSteps(u)})}function bo(o){return new TypeError(`ReadableStreamBYOBReader.prototype.${o} can only be used on a ReadableStreamBYOBReader`)}function es(o,u){let{highWaterMark:d}=o;if(d===void 0)return u;if(np(d)||d<0)throw new RangeError("Invalid highWaterMark");return d}function Eo(o){let{size:u}=o;return u||(()=>1)}function wo(o,u){F(o,u);let d=o?.highWaterMark,w=o?.size;return{highWaterMark:d===void 0?void 0:T(d),size:w===void 0?void 0:$S(w,`${u} has member 'size' that`)}}function $S(o,u){return R(o,u),d=>T(o(d))}function kS(o,u){F(o,u);let d=o?.abort,w=o?.close,C=o?.start,B=o?.type,k=o?.write;return{abort:d===void 0?void 0:LS(d,o,`${u} has member 'abort' that`),close:w===void 0?void 0:MS(w,o,`${u} has member 'close' that`),start:C===void 0?void 0:NS(C,o,`${u} has member 'start' that`),write:k===void 0?void 0:qS(k,o,`${u} has member 'write' that`),type:B}}function LS(o,u,d){return R(o,d),w=>q(o,u,[w])}function MS(o,u,d){return R(o,d),()=>q(o,u,[])}function NS(o,u,d){return R(o,d),w=>M(o,u,[w])}function qS(o,u,d){return R(o,d),(w,C)=>q(o,u,[w,C])}function Sp(o,u){if(!ri(o))throw new TypeError(`${u} is not a WritableStream.`)}function jS(o){if(typeof o!="object"||o===null)return!1;try{return typeof o.aborted=="boolean"}catch{return!1}}let WS=typeof AbortController=="function";function US(){if(WS)return new AbortController}class Ur{constructor(u={},d={}){u===void 0?u=null:E(u,"First parameter");let w=wo(d,"Second parameter"),C=kS(u,"First parameter");if(Ap(this),C.type!==void 0)throw new RangeError("Invalid type is specified");let k=Eo(w),G=es(w,1);nv(this,C,G,k)}get locked(){if(!ri(this))throw vo("locked");return ni(this)}abort(u=void 0){return ri(this)?ni(this)?h(new TypeError("Cannot abort a stream that already has a writer")):Fo(this,u):h(vo("abort"))}close(){return ri(this)?ni(this)?h(new TypeError("Cannot close a stream that already has a writer")):Zt(this)?h(new TypeError("Cannot close an already-closing stream")):xp(this):h(vo("close"))}getWriter(){if(!ri(this))throw vo("getWriter");return vp(this)}}Object.defineProperties(Ur.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),i(Ur.prototype.abort,"abort"),i(Ur.prototype.close,"close"),i(Ur.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ur.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function vp(o){return new Er(o)}function HS(o,u,d,w,C=1,B=()=>1){let k=Object.create(Ur.prototype);Ap(k);let G=Object.create(ii.prototype);return Ip(k,G,o,u,d,w,C,B),k}function Ap(o){o._state="writable",o._storedError=void 0,o._writer=void 0,o._writableStreamController=void 0,o._writeRequests=new V,o._inFlightWriteRequest=void 0,o._closeRequest=void 0,o._inFlightCloseRequest=void 0,o._pendingAbortRequest=void 0,o._backpressure=!1}function ri(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_writableStreamController")?!1:o instanceof Ur}function ni(o){return o._writer!==void 0}function Fo(o,u){var d;if(o._state==="closed"||o._state==="errored")return c(void 0);o._writableStreamController._abortReason=u,(d=o._writableStreamController._abortController)===null||d===void 0||d.abort(u);let w=o._state;if(w==="closed"||w==="errored")return c(void 0);if(o._pendingAbortRequest!==void 0)return o._pendingAbortRequest._promise;let C=!1;w==="erroring"&&(C=!0,u=void 0);let B=f((k,G)=>{o._pendingAbortRequest={_promise:void 0,_resolve:k,_reject:G,_reason:u,_wasAlreadyErroring:C}});return o._pendingAbortRequest._promise=B,C||sl(o,u),B}function xp(o){let u=o._state;if(u==="closed"||u==="errored")return h(new TypeError(`The stream (in ${u} state) is not in the writable state and cannot be closed`));let d=f((C,B)=>{let k={_resolve:C,_reject:B};o._closeRequest=k}),w=o._writer;return w!==void 0&&o._backpressure&&u==="writable"&&dl(w),iv(o._writableStreamController),d}function zS(o){return f((d,w)=>{let C={_resolve:d,_reject:w};o._writeRequests.push(C)})}function il(o,u){if(o._state==="writable"){sl(o,u);return}ol(o)}function sl(o,u){let d=o._writableStreamController;o._state="erroring",o._storedError=u;let w=o._writer;w!==void 0&&Op(w,u),!XS(o)&&d._started&&ol(o)}function ol(o){o._state="errored",o._writableStreamController[le]();let u=o._storedError;if(o._writeRequests.forEach(C=>{C._reject(u)}),o._writeRequests=new V,o._pendingAbortRequest===void 0){Co(o);return}let d=o._pendingAbortRequest;if(o._pendingAbortRequest=void 0,d._wasAlreadyErroring){d._reject(u),Co(o);return}let w=o._writableStreamController[se](d._reason);y(w,()=>(d._resolve(),Co(o),null),C=>(d._reject(C),Co(o),null))}function GS(o){o._inFlightWriteRequest._resolve(void 0),o._inFlightWriteRequest=void 0}function VS(o,u){o._inFlightWriteRequest._reject(u),o._inFlightWriteRequest=void 0,il(o,u)}function YS(o){o._inFlightCloseRequest._resolve(void 0),o._inFlightCloseRequest=void 0,o._state==="erroring"&&(o._storedError=void 0,o._pendingAbortRequest!==void 0&&(o._pendingAbortRequest._resolve(),o._pendingAbortRequest=void 0)),o._state="closed";let d=o._writer;d!==void 0&&Mp(d)}function KS(o,u){o._inFlightCloseRequest._reject(u),o._inFlightCloseRequest=void 0,o._pendingAbortRequest!==void 0&&(o._pendingAbortRequest._reject(u),o._pendingAbortRequest=void 0),il(o,u)}function Zt(o){return!(o._closeRequest===void 0&&o._inFlightCloseRequest===void 0)}function XS(o){return!(o._inFlightWriteRequest===void 0&&o._inFlightCloseRequest===void 0)}function JS(o){o._inFlightCloseRequest=o._closeRequest,o._closeRequest=void 0}function QS(o){o._inFlightWriteRequest=o._writeRequests.shift()}function Co(o){o._closeRequest!==void 0&&(o._closeRequest._reject(o._storedError),o._closeRequest=void 0);let u=o._writer;u!==void 0&&fl(u,o._storedError)}function al(o,u){let d=o._writer;d!==void 0&&u!==o._backpressure&&(u?fv(d):dl(d)),o._backpressure=u}class Er{constructor(u){if(b(u,1,"WritableStreamDefaultWriter"),Sp(u,"First parameter"),ni(u))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=u,u._writer=this;let d=u._state;if(d==="writable")!Zt(u)&&u._backpressure?xo(this):Np(this),Ao(this);else if(d==="erroring")hl(this,u._storedError),Ao(this);else if(d==="closed")Np(this),lv(this);else{let w=u._storedError;hl(this,w),Lp(this,w)}}get closed(){return yn(this)?this._closedPromise:h(bn("closed"))}get desiredSize(){if(!yn(this))throw bn("desiredSize");if(this._ownerWritableStream===void 0)throw rs("desiredSize");return rv(this)}get ready(){return yn(this)?this._readyPromise:h(bn("ready"))}abort(u=void 0){return yn(this)?this._ownerWritableStream===void 0?h(rs("abort")):ZS(this,u):h(bn("abort"))}close(){if(!yn(this))return h(bn("close"));let u=this._ownerWritableStream;return u===void 0?h(rs("close")):Zt(u)?h(new TypeError("Cannot close an already-closing stream")):Rp(this)}releaseLock(){if(!yn(this))throw bn("releaseLock");this._ownerWritableStream!==void 0&&Tp(this)}write(u=void 0){return yn(this)?this._ownerWritableStream===void 0?h(rs("write to")):Bp(this,u):h(bn("write"))}}Object.defineProperties(Er.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),i(Er.prototype.abort,"abort"),i(Er.prototype.close,"close"),i(Er.prototype.releaseLock,"releaseLock"),i(Er.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Er.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function yn(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_ownerWritableStream")?!1:o instanceof Er}function ZS(o,u){let d=o._ownerWritableStream;return Fo(d,u)}function Rp(o){let u=o._ownerWritableStream;return xp(u)}function ev(o){let u=o._ownerWritableStream,d=u._state;return Zt(u)||d==="closed"?c(void 0):d==="errored"?h(u._storedError):Rp(o)}function tv(o,u){o._closedPromiseState==="pending"?fl(o,u):cv(o,u)}function Op(o,u){o._readyPromiseState==="pending"?qp(o,u):hv(o,u)}function rv(o){let u=o._ownerWritableStream,d=u._state;return d==="errored"||d==="erroring"?null:d==="closed"?0:$p(u._writableStreamController)}function Tp(o){let u=o._ownerWritableStream,d=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Op(o,d),tv(o,d),u._writer=void 0,o._ownerWritableStream=void 0}function Bp(o,u){let d=o._ownerWritableStream,w=d._writableStreamController,C=sv(w,u);if(d!==o._ownerWritableStream)return h(rs("write to"));let B=d._state;if(B==="errored")return h(d._storedError);if(Zt(d)||B==="closed")return h(new TypeError("The stream is closing or closed and cannot be written to"));if(B==="erroring")return h(d._storedError);let k=zS(d);return ov(w,u,C),k}let Pp={};class ii{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!ul(this))throw cl("abortReason");return this._abortReason}get signal(){if(!ul(this))throw cl("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(u=void 0){if(!ul(this))throw cl("error");this._controlledWritableStream._state==="writable"&&kp(this,u)}[se](u){let d=this._abortAlgorithm(u);return _o(this),d}[le](){jr(this)}}Object.defineProperties(ii.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ii.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function ul(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_controlledWritableStream")?!1:o instanceof ii}function Ip(o,u,d,w,C,B,k,G){u._controlledWritableStream=o,o._writableStreamController=u,u._queue=void 0,u._queueTotalSize=void 0,jr(u),u._abortReason=void 0,u._abortController=US(),u._started=!1,u._strategySizeAlgorithm=G,u._strategyHWM=k,u._writeAlgorithm=w,u._closeAlgorithm=C,u._abortAlgorithm=B;let he=ll(u);al(o,he);let ne=d(),de=c(ne);y(de,()=>(u._started=!0,So(u),null),ge=>(u._started=!0,il(o,ge),null))}function nv(o,u,d,w){let C=Object.create(ii.prototype),B,k,G,he;u.start!==void 0?B=()=>u.start(C):B=()=>{},u.write!==void 0?k=ne=>u.write(ne,C):k=()=>c(void 0),u.close!==void 0?G=()=>u.close():G=()=>c(void 0),u.abort!==void 0?he=ne=>u.abort(ne):he=()=>c(void 0),Ip(o,C,B,k,G,he,d,w)}function _o(o){o._writeAlgorithm=void 0,o._closeAlgorithm=void 0,o._abortAlgorithm=void 0,o._strategySizeAlgorithm=void 0}function iv(o){Xu(o,Pp,0),So(o)}function sv(o,u){try{return o._strategySizeAlgorithm(u)}catch(d){return ts(o,d),1}}function $p(o){return o._strategyHWM-o._queueTotalSize}function ov(o,u,d){try{Xu(o,u,d)}catch(C){ts(o,C);return}let w=o._controlledWritableStream;if(!Zt(w)&&w._state==="writable"){let C=ll(o);al(w,C)}So(o)}function So(o){let u=o._controlledWritableStream;if(!o._started||u._inFlightWriteRequest!==void 0)return;if(u._state==="erroring"){ol(u);return}if(o._queue.length===0)return;let w=ES(o);w===Pp?av(o):uv(o,w)}function ts(o,u){o._controlledWritableStream._state==="writable"&&kp(o,u)}function av(o){let u=o._controlledWritableStream;JS(u),Ku(o);let d=o._closeAlgorithm();_o(o),y(d,()=>(YS(u),null),w=>(KS(u,w),null))}function uv(o,u){let d=o._controlledWritableStream;QS(d);let w=o._writeAlgorithm(u);y(w,()=>{GS(d);let C=d._state;if(Ku(o),!Zt(d)&&C==="writable"){let B=ll(o);al(d,B)}return So(o),null},C=>(d._state==="writable"&&_o(o),VS(d,C),null))}function ll(o){return $p(o)<=0}function kp(o,u){let d=o._controlledWritableStream;_o(o),sl(d,u)}function vo(o){return new TypeError(`WritableStream.prototype.${o} can only be used on a WritableStream`)}function cl(o){return new TypeError(`WritableStreamDefaultController.prototype.${o} can only be used on a WritableStreamDefaultController`)}function bn(o){return new TypeError(`WritableStreamDefaultWriter.prototype.${o} can only be used on a WritableStreamDefaultWriter`)}function rs(o){return new TypeError("Cannot "+o+" a stream using a released writer")}function Ao(o){o._closedPromise=f((u,d)=>{o._closedPromise_resolve=u,o._closedPromise_reject=d,o._closedPromiseState="pending"})}function Lp(o,u){Ao(o),fl(o,u)}function lv(o){Ao(o),Mp(o)}function fl(o,u){o._closedPromise_reject!==void 0&&(A(o._closedPromise),o._closedPromise_reject(u),o._closedPromise_resolve=void 0,o._closedPromise_reject=void 0,o._closedPromiseState="rejected")}function cv(o,u){Lp(o,u)}function Mp(o){o._closedPromise_resolve!==void 0&&(o._closedPromise_resolve(void 0),o._closedPromise_resolve=void 0,o._closedPromise_reject=void 0,o._closedPromiseState="resolved")}function xo(o){o._readyPromise=f((u,d)=>{o._readyPromise_resolve=u,o._readyPromise_reject=d}),o._readyPromiseState="pending"}function hl(o,u){xo(o),qp(o,u)}function Np(o){xo(o),dl(o)}function qp(o,u){o._readyPromise_reject!==void 0&&(A(o._readyPromise),o._readyPromise_reject(u),o._readyPromise_resolve=void 0,o._readyPromise_reject=void 0,o._readyPromiseState="rejected")}function fv(o){xo(o)}function hv(o,u){hl(o,u)}function dl(o){o._readyPromise_resolve!==void 0&&(o._readyPromise_resolve(void 0),o._readyPromise_resolve=void 0,o._readyPromise_reject=void 0,o._readyPromiseState="fulfilled")}function dv(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}let pl=dv();function pv(o){if(!(typeof o=="function"||typeof o=="object")||o.name!=="DOMException")return!1;try{return new o,!0}catch{return!1}}function mv(){let o=pl?.DOMException;return pv(o)?o:void 0}function gv(){let o=function(d,w){this.message=d||"",this.name=w||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return i(o,"DOMException"),o.prototype=Object.create(Error.prototype),Object.defineProperty(o.prototype,"constructor",{value:o,writable:!0,configurable:!0}),o}let Dv=mv()||gv();function jp(o,u,d,w,C,B){let k=re(o),G=vp(u);o._disturbed=!0;let he=!1,ne=c(void 0);return f((de,ge)=>{let Ce;if(B!==void 0){if(Ce=()=>{let ue=B.reason!==void 0?B.reason:new Dv("Aborted","AbortError"),ye=[];w||ye.push(()=>u._state==="writable"?Fo(u,ue):c(void 0)),C||ye.push(()=>o._state==="readable"?jt(o,ue):c(void 0)),ht(()=>Promise.all(ye.map(ve=>ve())),!0,ue)},B.aborted){Ce();return}B.addEventListener("abort",Ce)}function Wt(){return f((ue,ye)=>{function ve(bt){bt?ue():p(ui(),ve,ye)}ve(!1)})}function ui(){return he?c(!0):p(G._readyPromise,()=>f((ue,ye)=>{je(k,{_chunkSteps:ve=>{ne=p(Bp(G,ve),void 0,e),ue(!1)},_closeSteps:()=>ue(!0),_errorSteps:ye})}))}if(Fr(o,k._closedPromise,ue=>(w?xt(!0,ue):ht(()=>Fo(u,ue),!0,ue),null)),Fr(u,G._closedPromise,ue=>(C?xt(!0,ue):ht(()=>jt(o,ue),!0,ue),null)),at(o,k._closedPromise,()=>(d?xt():ht(()=>ev(G)),null)),Zt(u)||u._state==="closed"){let ue=new TypeError("the destination writable stream closed before all data could be piped to it");C?xt(!0,ue):ht(()=>jt(o,ue),!0,ue)}A(Wt());function Vr(){let ue=ne;return p(ne,()=>ue!==ne?Vr():void 0)}function Fr(ue,ye,ve){ue._state==="errored"?ve(ue._storedError):D(ye,ve)}function at(ue,ye,ve){ue._state==="closed"?ve():m(ye,ve)}function ht(ue,ye,ve){if(he)return;he=!0,u._state==="writable"&&!Zt(u)?m(Vr(),bt):bt();function bt(){return y(ue(),()=>Cr(ye,ve),li=>Cr(!0,li)),null}}function xt(ue,ye){he||(he=!0,u._state==="writable"&&!Zt(u)?m(Vr(),()=>Cr(ue,ye)):Cr(ue,ye))}function Cr(ue,ye){return Tp(G),W(k),B!==void 0&&B.removeEventListener("abort",Ce),ue?ge(ye):de(void 0),null}})}class wr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ro(this))throw To("desiredSize");return ml(this)}close(){if(!Ro(this))throw To("close");if(!oi(this))throw new TypeError("The stream is not in a state that permits close");En(this)}enqueue(u=void 0){if(!Ro(this))throw To("enqueue");if(!oi(this))throw new TypeError("The stream is not in a state that permits enqueue");return si(this,u)}error(u=void 0){if(!Ro(this))throw To("error");qt(this,u)}[_e](u){jr(this);let d=this._cancelAlgorithm(u);return Oo(this),d}[N](u){let d=this._controlledReadableStream;if(this._queue.length>0){let w=Ku(this);this._closeRequested&&this._queue.length===0?(Oo(this),ss(d)):ns(this),u._chunkSteps(w)}else qe(d,u),ns(this)}[j](){}}Object.defineProperties(wr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),i(wr.prototype.close,"close"),i(wr.prototype.enqueue,"enqueue"),i(wr.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(wr.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Ro(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_controlledReadableStream")?!1:o instanceof wr}function ns(o){if(!Wp(o))return;if(o._pulling){o._pullAgain=!0;return}o._pulling=!0;let d=o._pullAlgorithm();y(d,()=>(o._pulling=!1,o._pullAgain&&(o._pullAgain=!1,ns(o)),null),w=>(qt(o,w),null))}function Wp(o){let u=o._controlledReadableStream;return!oi(o)||!o._started?!1:!!(zr(u)&&Qt(u)>0||ml(o)>0)}function Oo(o){o._pullAlgorithm=void 0,o._cancelAlgorithm=void 0,o._strategySizeAlgorithm=void 0}function En(o){if(!oi(o))return;let u=o._controlledReadableStream;o._closeRequested=!0,o._queue.length===0&&(Oo(o),ss(u))}function si(o,u){if(!oi(o))return;let d=o._controlledReadableStream;if(zr(d)&&Qt(d)>0)Ee(d,u,!1);else{let w;try{w=o._strategySizeAlgorithm(u)}catch(C){throw qt(o,C),C}try{Xu(o,u,w)}catch(C){throw qt(o,C),C}}ns(o)}function qt(o,u){let d=o._controlledReadableStream;d._state==="readable"&&(jr(o),Oo(o),Gp(d,u))}function ml(o){let u=o._controlledReadableStream._state;return u==="errored"?null:u==="closed"?0:o._strategyHWM-o._queueTotalSize}function yv(o){return!Wp(o)}function oi(o){let u=o._controlledReadableStream._state;return!o._closeRequested&&u==="readable"}function Up(o,u,d,w,C,B,k){u._controlledReadableStream=o,u._queue=void 0,u._queueTotalSize=void 0,jr(u),u._started=!1,u._closeRequested=!1,u._pullAgain=!1,u._pulling=!1,u._strategySizeAlgorithm=k,u._strategyHWM=B,u._pullAlgorithm=w,u._cancelAlgorithm=C,o._readableStreamController=u;let G=d();y(c(G),()=>(u._started=!0,ns(u),null),he=>(qt(u,he),null))}function bv(o,u,d,w){let C=Object.create(wr.prototype),B,k,G;u.start!==void 0?B=()=>u.start(C):B=()=>{},u.pull!==void 0?k=()=>u.pull(C):k=()=>c(void 0),u.cancel!==void 0?G=he=>u.cancel(he):G=()=>c(void 0),Up(o,C,B,k,G,d,w)}function To(o){return new TypeError(`ReadableStreamDefaultController.prototype.${o} can only be used on a ReadableStreamDefaultController`)}function Ev(o,u){return mn(o._readableStreamController)?Fv(o):wv(o)}function wv(o,u){let d=re(o),w=!1,C=!1,B=!1,k=!1,G,he,ne,de,ge,Ce=f(at=>{ge=at});function Wt(){return w?(C=!0,c(void 0)):(w=!0,je(d,{_chunkSteps:ht=>{x(()=>{C=!1;let xt=ht,Cr=ht;B||si(ne._readableStreamController,xt),k||si(de._readableStreamController,Cr),w=!1,C&&Wt()})},_closeSteps:()=>{w=!1,B||En(ne._readableStreamController),k||En(de._readableStreamController),(!B||!k)&&ge(void 0)},_errorSteps:()=>{w=!1}}),c(void 0))}function ui(at){if(B=!0,G=at,k){let ht=Ji([G,he]),xt=jt(o,ht);ge(xt)}return Ce}function Vr(at){if(k=!0,he=at,B){let ht=Ji([G,he]),xt=jt(o,ht);ge(xt)}return Ce}function Fr(){}return ne=is(Fr,Wt,ui),de=is(Fr,Wt,Vr),D(d._closedPromise,at=>(qt(ne._readableStreamController,at),qt(de._readableStreamController,at),(!B||!k)&&ge(void 0),null)),[ne,de]}function Fv(o){let u=re(o),d=!1,w=!1,C=!1,B=!1,k=!1,G,he,ne,de,ge,Ce=f(ue=>{ge=ue});function Wt(ue){D(ue._closedPromise,ye=>(ue!==u||(At(ne._readableStreamController,ye),At(de._readableStreamController,ye),(!B||!k)&&ge(void 0)),null))}function ui(){Dn(u)&&(W(u),u=re(o),Wt(u)),je(u,{_chunkSteps:ye=>{x(()=>{w=!1,C=!1;let ve=ye,bt=ye;if(!B&&!k)try{bt=ap(ye)}catch(li){At(ne._readableStreamController,li),At(de._readableStreamController,li),ge(jt(o,li));return}B||go(ne._readableStreamController,ve),k||go(de._readableStreamController,bt),d=!1,w?Fr():C&&at()})},_closeSteps:()=>{d=!1,B||Qi(ne._readableStreamController),k||Qi(de._readableStreamController),ne._readableStreamController._pendingPullIntos.length>0&&Do(ne._readableStreamController,0),de._readableStreamController._pendingPullIntos.length>0&&Do(de._readableStreamController,0),(!B||!k)&&ge(void 0)},_errorSteps:()=>{d=!1}})}function Vr(ue,ye){Me(u)&&(W(u),u=Ep(o),Wt(u));let ve=ye?de:ne,bt=ye?ne:de;Cp(u,ue,1,{_chunkSteps:ci=>{x(()=>{w=!1,C=!1;let fi=ye?k:B;if(ye?B:k)fi||yo(ve._readableStreamController,ci);else{let sm;try{sm=ap(ci)}catch(El){At(ve._readableStreamController,El),At(bt._readableStreamController,El),ge(jt(o,El));return}fi||yo(ve._readableStreamController,ci),go(bt._readableStreamController,sm)}d=!1,w?Fr():C&&at()})},_closeSteps:ci=>{d=!1;let fi=ye?k:B,No=ye?B:k;fi||Qi(ve._readableStreamController),No||Qi(bt._readableStreamController),ci!==void 0&&(fi||yo(ve._readableStreamController,ci),!No&&bt._readableStreamController._pendingPullIntos.length>0&&Do(bt._readableStreamController,0)),(!fi||!No)&&ge(void 0)},_errorSteps:()=>{d=!1}})}function Fr(){if(d)return w=!0,c(void 0);d=!0;let ue=tl(ne._readableStreamController);return ue===null?ui():Vr(ue._view,!1),c(void 0)}function at(){if(d)return C=!0,c(void 0);d=!0;let ue=tl(de._readableStreamController);return ue===null?ui():Vr(ue._view,!0),c(void 0)}function ht(ue){if(B=!0,G=ue,k){let ye=Ji([G,he]),ve=jt(o,ye);ge(ve)}return Ce}function xt(ue){if(k=!0,he=ue,B){let ye=Ji([G,he]),ve=jt(o,ye);ge(ve)}return Ce}function Cr(){}return ne=zp(Cr,Fr,ht),de=zp(Cr,at,xt),Wt(u),[ne,de]}function Cv(o){return r(o)&&typeof o.getReader<"u"}function _v(o){return Cv(o)?vv(o.getReader()):Sv(o)}function Sv(o){let u,d=op(o,"async"),w=e;function C(){let k;try{k=gS(d)}catch(he){return h(he)}let G=c(k);return _(G,he=>{if(!r(he))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(DS(he))En(u._readableStreamController);else{let de=yS(he);si(u._readableStreamController,de)}})}function B(k){let G=d.iterator,he;try{he=ho(G,"return")}catch(ge){return h(ge)}if(he===void 0)return c(void 0);let ne;try{ne=M(he,G,[k])}catch(ge){return h(ge)}let de=c(ne);return _(de,ge=>{if(!r(ge))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return u=is(w,C,B,0),u}function vv(o){let u,d=e;function w(){let B;try{B=o.read()}catch(k){return h(k)}return _(B,k=>{if(!r(k))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(k.done)En(u._readableStreamController);else{let G=k.value;si(u._readableStreamController,G)}})}function C(B){try{return c(o.cancel(B))}catch(k){return h(k)}}return u=is(d,w,C,0),u}function Av(o,u){F(o,u);let d=o,w=d?.autoAllocateChunkSize,C=d?.cancel,B=d?.pull,k=d?.start,G=d?.type;return{autoAllocateChunkSize:w===void 0?void 0:H(w,`${u} has member 'autoAllocateChunkSize' that`),cancel:C===void 0?void 0:xv(C,d,`${u} has member 'cancel' that`),pull:B===void 0?void 0:Rv(B,d,`${u} has member 'pull' that`),start:k===void 0?void 0:Ov(k,d,`${u} has member 'start' that`),type:G===void 0?void 0:Tv(G,`${u} has member 'type' that`)}}function xv(o,u,d){return R(o,d),w=>q(o,u,[w])}function Rv(o,u,d){return R(o,d),w=>q(o,u,[w])}function Ov(o,u,d){return R(o,d),w=>M(o,u,[w])}function Tv(o,u){if(o=`${o}`,o!=="bytes")throw new TypeError(`${u} '${o}' is not a valid enumeration value for ReadableStreamType`);return o}function Bv(o,u){return F(o,u),{preventCancel:!!o?.preventCancel}}function Hp(o,u){F(o,u);let d=o?.preventAbort,w=o?.preventCancel,C=o?.preventClose,B=o?.signal;return B!==void 0&&Pv(B,`${u} has member 'signal' that`),{preventAbort:!!d,preventCancel:!!w,preventClose:!!C,signal:B}}function Pv(o,u){if(!jS(o))throw new TypeError(`${u} is not an AbortSignal.`)}function Iv(o,u){F(o,u);let d=o?.readable;v(d,"readable","ReadableWritablePair"),J(d,`${u} has member 'readable' that`);let w=o?.writable;return v(w,"writable","ReadableWritablePair"),Sp(w,`${u} has member 'writable' that`),{readable:d,writable:w}}class tt{constructor(u={},d={}){u===void 0?u=null:E(u,"First parameter");let w=wo(d,"Second parameter"),C=Av(u,"First parameter");if(gl(this),C.type==="bytes"){if(w.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let B=es(w,0);xS(this,C,B)}else{let B=Eo(w),k=es(w,1);bv(this,C,k,B)}}get locked(){if(!Hr(this))throw wn("locked");return zr(this)}cancel(u=void 0){return Hr(this)?zr(this)?h(new TypeError("Cannot cancel a stream that already has a reader")):jt(this,u):h(wn("cancel"))}getReader(u=void 0){if(!Hr(this))throw wn("getReader");return OS(u,"First parameter").mode===void 0?re(this):Ep(this)}pipeThrough(u,d={}){if(!Hr(this))throw wn("pipeThrough");b(u,1,"pipeThrough");let w=Iv(u,"First parameter"),C=Hp(d,"Second parameter");if(zr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ni(w.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let B=jp(this,w.writable,C.preventClose,C.preventAbort,C.preventCancel,C.signal);return A(B),w.readable}pipeTo(u,d={}){if(!Hr(this))return h(wn("pipeTo"));if(u===void 0)return h("Parameter 1 is required in 'pipeTo'.");if(!ri(u))return h(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let w;try{w=Hp(d,"Second parameter")}catch(C){return h(C)}return zr(this)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):ni(u)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):jp(this,u,w.preventClose,w.preventAbort,w.preventCancel,w.signal)}tee(){if(!Hr(this))throw wn("tee");let u=Ev(this);return Ji(u)}values(u=void 0){if(!Hr(this))throw wn("values");let d=Bv(u,"First parameter");return pS(this,d.preventCancel)}[Yu](u){return this.values(u)}static from(u){return _v(u)}}Object.defineProperties(tt,{from:{enumerable:!0}}),Object.defineProperties(tt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),i(tt.from,"from"),i(tt.prototype.cancel,"cancel"),i(tt.prototype.getReader,"getReader"),i(tt.prototype.pipeThrough,"pipeThrough"),i(tt.prototype.pipeTo,"pipeTo"),i(tt.prototype.tee,"tee"),i(tt.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(tt.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(tt.prototype,Yu,{value:tt.prototype.values,writable:!0,configurable:!0});function is(o,u,d,w=1,C=()=>1){let B=Object.create(tt.prototype);gl(B);let k=Object.create(wr.prototype);return Up(B,k,o,u,d,w,C),B}function zp(o,u,d){let w=Object.create(tt.prototype);gl(w);let C=Object.create(br.prototype);return bp(w,C,o,u,d,0,void 0),w}function gl(o){o._state="readable",o._reader=void 0,o._storedError=void 0,o._disturbed=!1}function Hr(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_readableStreamController")?!1:o instanceof tt}function zr(o){return o._reader!==void 0}function jt(o,u){if(o._disturbed=!0,o._state==="closed")return c(void 0);if(o._state==="errored")return h(o._storedError);ss(o);let d=o._reader;if(d!==void 0&&Dn(d)){let C=d._readIntoRequests;d._readIntoRequests=new V,C.forEach(B=>{B._closeSteps(void 0)})}let w=o._readableStreamController[_e](u);return _(w,e)}function ss(o){o._state="closed";let u=o._reader;if(u!==void 0&&(Jt(u),Me(u))){let d=u._readRequests;u._readRequests=new V,d.forEach(w=>{w._closeSteps()})}}function Gp(o,u){o._state="errored",o._storedError=u;let d=o._reader;d!==void 0&&(oe(d,u),Me(d)?Qd(d,u):_p(d,u))}function wn(o){return new TypeError(`ReadableStream.prototype.${o} can only be used on a ReadableStream`)}function Vp(o,u){F(o,u);let d=o?.highWaterMark;return v(d,"highWaterMark","QueuingStrategyInit"),{highWaterMark:T(d)}}let Yp=o=>o.byteLength;i(Yp,"size");class Bo{constructor(u){b(u,1,"ByteLengthQueuingStrategy"),u=Vp(u,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=u.highWaterMark}get highWaterMark(){if(!Xp(this))throw Kp("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Xp(this))throw Kp("size");return Yp}}Object.defineProperties(Bo.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Bo.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Kp(o){return new TypeError(`ByteLengthQueuingStrategy.prototype.${o} can only be used on a ByteLengthQueuingStrategy`)}function Xp(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_byteLengthQueuingStrategyHighWaterMark")?!1:o instanceof Bo}let Jp=()=>1;i(Jp,"size");class Po{constructor(u){b(u,1,"CountQueuingStrategy"),u=Vp(u,"First parameter"),this._countQueuingStrategyHighWaterMark=u.highWaterMark}get highWaterMark(){if(!Zp(this))throw Qp("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Zp(this))throw Qp("size");return Jp}}Object.defineProperties(Po.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Po.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Qp(o){return new TypeError(`CountQueuingStrategy.prototype.${o} can only be used on a CountQueuingStrategy`)}function Zp(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_countQueuingStrategyHighWaterMark")?!1:o instanceof Po}function $v(o,u){F(o,u);let d=o?.cancel,w=o?.flush,C=o?.readableType,B=o?.start,k=o?.transform,G=o?.writableType;return{cancel:d===void 0?void 0:Nv(d,o,`${u} has member 'cancel' that`),flush:w===void 0?void 0:kv(w,o,`${u} has member 'flush' that`),readableType:C,start:B===void 0?void 0:Lv(B,o,`${u} has member 'start' that`),transform:k===void 0?void 0:Mv(k,o,`${u} has member 'transform' that`),writableType:G}}function kv(o,u,d){return R(o,d),w=>q(o,u,[w])}function Lv(o,u,d){return R(o,d),w=>M(o,u,[w])}function Mv(o,u,d){return R(o,d),(w,C)=>q(o,u,[w,C])}function Nv(o,u,d){return R(o,d),w=>q(o,u,[w])}class Io{constructor(u={},d={},w={}){u===void 0&&(u=null);let C=wo(d,"Second parameter"),B=wo(w,"Third parameter"),k=$v(u,"First parameter");if(k.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(k.writableType!==void 0)throw new RangeError("Invalid writableType specified");let G=es(B,0),he=Eo(B),ne=es(C,1),de=Eo(C),ge,Ce=f(Wt=>{ge=Wt});qv(this,Ce,ne,de,G,he),Wv(this,k),k.start!==void 0?ge(k.start(this._transformStreamController)):ge(void 0)}get readable(){if(!em(this))throw im("readable");return this._readable}get writable(){if(!em(this))throw im("writable");return this._writable}}Object.defineProperties(Io.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Io.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function qv(o,u,d,w,C,B){function k(){return u}function G(Ce){return zv(o,Ce)}function he(Ce){return Gv(o,Ce)}function ne(){return Vv(o)}o._writable=HS(k,G,ne,he,d,w);function de(){return Yv(o)}function ge(Ce){return Kv(o,Ce)}o._readable=is(k,de,ge,C,B),o._backpressure=void 0,o._backpressureChangePromise=void 0,o._backpressureChangePromise_resolve=void 0,$o(o,!0),o._transformStreamController=void 0}function em(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_transformStreamController")?!1:o instanceof Io}function tm(o,u){qt(o._readable._readableStreamController,u),Dl(o,u)}function Dl(o,u){Lo(o._transformStreamController),ts(o._writable._writableStreamController,u),yl(o)}function yl(o){o._backpressure&&$o(o,!1)}function $o(o,u){o._backpressureChangePromise!==void 0&&o._backpressureChangePromise_resolve(),o._backpressureChangePromise=f(d=>{o._backpressureChangePromise_resolve=d}),o._backpressure=u}class Gr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!ko(this))throw Mo("desiredSize");let u=this._controlledTransformStream._readable._readableStreamController;return ml(u)}enqueue(u=void 0){if(!ko(this))throw Mo("enqueue");rm(this,u)}error(u=void 0){if(!ko(this))throw Mo("error");Uv(this,u)}terminate(){if(!ko(this))throw Mo("terminate");Hv(this)}}Object.defineProperties(Gr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Gr.prototype.enqueue,"enqueue"),i(Gr.prototype.error,"error"),i(Gr.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Gr.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function ko(o){return!r(o)||!Object.prototype.hasOwnProperty.call(o,"_controlledTransformStream")?!1:o instanceof Gr}function jv(o,u,d,w,C){u._controlledTransformStream=o,o._transformStreamController=u,u._transformAlgorithm=d,u._flushAlgorithm=w,u._cancelAlgorithm=C,u._finishPromise=void 0,u._finishPromise_resolve=void 0,u._finishPromise_reject=void 0}function Wv(o,u){let d=Object.create(Gr.prototype),w,C,B;u.transform!==void 0?w=k=>u.transform(k,d):w=k=>{try{return rm(d,k),c(void 0)}catch(G){return h(G)}},u.flush!==void 0?C=()=>u.flush(d):C=()=>c(void 0),u.cancel!==void 0?B=k=>u.cancel(k):B=()=>c(void 0),jv(o,d,w,C,B)}function Lo(o){o._transformAlgorithm=void 0,o._flushAlgorithm=void 0,o._cancelAlgorithm=void 0}function rm(o,u){let d=o._controlledTransformStream,w=d._readable._readableStreamController;if(!oi(w))throw new TypeError("Readable side is not in a state that permits enqueue");try{si(w,u)}catch(B){throw Dl(d,B),d._readable._storedError}yv(w)!==d._backpressure&&$o(d,!0)}function Uv(o,u){tm(o._controlledTransformStream,u)}function nm(o,u){let d=o._transformAlgorithm(u);return _(d,void 0,w=>{throw tm(o._controlledTransformStream,w),w})}function Hv(o){let u=o._controlledTransformStream,d=u._readable._readableStreamController;En(d);let w=new TypeError("TransformStream terminated");Dl(u,w)}function zv(o,u){let d=o._transformStreamController;if(o._backpressure){let w=o._backpressureChangePromise;return _(w,()=>{let C=o._writable;if(C._state==="erroring")throw C._storedError;return nm(d,u)})}return nm(d,u)}function Gv(o,u){let d=o._transformStreamController;if(d._finishPromise!==void 0)return d._finishPromise;let w=o._readable;d._finishPromise=f((B,k)=>{d._finishPromise_resolve=B,d._finishPromise_reject=k});let C=d._cancelAlgorithm(u);return Lo(d),y(C,()=>(w._state==="errored"?ai(d,w._storedError):(qt(w._readableStreamController,u),bl(d)),null),B=>(qt(w._readableStreamController,B),ai(d,B),null)),d._finishPromise}function Vv(o){let u=o._transformStreamController;if(u._finishPromise!==void 0)return u._finishPromise;let d=o._readable;u._finishPromise=f((C,B)=>{u._finishPromise_resolve=C,u._finishPromise_reject=B});let w=u._flushAlgorithm();return Lo(u),y(w,()=>(d._state==="errored"?ai(u,d._storedError):(En(d._readableStreamController),bl(u)),null),C=>(qt(d._readableStreamController,C),ai(u,C),null)),u._finishPromise}function Yv(o){return $o(o,!1),o._backpressureChangePromise}function Kv(o,u){let d=o._transformStreamController;if(d._finishPromise!==void 0)return d._finishPromise;let w=o._writable;d._finishPromise=f((B,k)=>{d._finishPromise_resolve=B,d._finishPromise_reject=k});let C=d._cancelAlgorithm(u);return Lo(d),y(C,()=>(w._state==="errored"?ai(d,w._storedError):(ts(w._writableStreamController,u),yl(o),bl(d)),null),B=>(ts(w._writableStreamController,B),yl(o),ai(d,B),null)),d._finishPromise}function Mo(o){return new TypeError(`TransformStreamDefaultController.prototype.${o} can only be used on a TransformStreamDefaultController`)}function bl(o){o._finishPromise_resolve!==void 0&&(o._finishPromise_resolve(),o._finishPromise_resolve=void 0,o._finishPromise_reject=void 0)}function ai(o,u){o._finishPromise_reject!==void 0&&(A(o._finishPromise),o._finishPromise_reject(u),o._finishPromise_resolve=void 0,o._finishPromise_reject=void 0)}function im(o){return new TypeError(`TransformStream.prototype.${o} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=Bo,t.CountQueuingStrategy=Po,t.ReadableByteStreamController=br,t.ReadableStream=tt,t.ReadableStreamBYOBReader=Wr,t.ReadableStreamBYOBRequest=pn,t.ReadableStreamDefaultController=wr,t.ReadableStreamDefaultReader=et,t.TransformStream=Io,t.TransformStreamDefaultController=Gr,t.WritableStream=Ur,t.WritableStreamDefaultController=ii,t.WritableStreamDefaultWriter=Er}))});var M_=S(()=>{if(!globalThis.ReadableStream)try{let t=fe("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,fe("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,L_())}try{let{Blob:t}=fe("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(s){let l=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=l.byteLength,s.enqueue(new Uint8Array(l)),n===i.size&&s.close()}})})}catch{}});async function*Dd(t,e=!0){for(let r of t)if("stream"in r)yield*r.stream();else if(ArrayBuffer.isView(r))if(e){let n=r.byteOffset,i=r.byteOffset+r.byteLength;for(;n!==i;){let s=Math.min(i-n,N_),a=r.buffer.slice(n,n+s);n+=a.byteLength,yield new Uint8Array(a)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let a=await i.slice(n,Math.min(i.size,n+N_)).arrayBuffer();n+=a.byteLength,yield new Uint8Array(a)}}}var Lj,N_,q_,z6,Lr,oo=te(()=>{Lj=We(M_(),1);N_=65536;q_=class yd{#r=[];#n="";#t=0;#i="transparent";constructor(e=[],r={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof r!="object"&&typeof r!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");r===null&&(r={});let n=new TextEncoder;for(let s of e){let a;ArrayBuffer.isView(s)?a=new Uint8Array(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)):s instanceof ArrayBuffer?a=new Uint8Array(s.slice(0)):s instanceof yd?a=s:a=n.encode(`${s}`),this.#t+=ArrayBuffer.isView(a)?a.byteLength:a.size,this.#r.push(a)}this.#i=`${r.endings===void 0?"transparent":r.endings}`;let i=r.type===void 0?"":String(r.type);this.#n=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#t}get type(){return this.#n}async text(){let e=new TextDecoder,r="";for await(let n of Dd(this.#r,!1))r+=e.decode(n,{stream:!0});return r+=e.decode(),r}async arrayBuffer(){let e=new Uint8Array(this.size),r=0;for await(let n of Dd(this.#r,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Dd(this.#r,!0);return new globalThis.ReadableStream({type:"bytes",async pull(r){let n=await e.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await e.return()}})}slice(e=0,r=this.size,n=""){let{size:i}=this,s=e<0?Math.max(i+e,0):Math.min(e,i),a=r<0?Math.max(i+r,0):Math.min(r,i),l=Math.max(a-s,0),f=this.#r,c=[],h=0;for(let y of f){if(h>=l)break;let m=ArrayBuffer.isView(y)?y.byteLength:y.size;if(s&&m<=s)s-=m,a-=m;else{let D;ArrayBuffer.isView(y)?(D=y.subarray(s,Math.min(m,a)),h+=D.byteLength):(D=y.slice(s,Math.min(m,a)),h+=D.size),a-=m,c.push(D),s=0}}let p=new yd([],{type:String(n).toLowerCase()});return p.#t=l,p.#r=c,p}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(q_.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});z6=q_,Lr=z6});var G6,V6,qi,bd=te(()=>{oo();G6=class extends Lr{#r=0;#n="";constructor(e,r,n={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,n),n===null&&(n={});let i=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(i)||(this.#r=i),this.#n=String(r)}get name(){return this.#n}get lastModified(){return this.#r}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof Lr&&/^(File)$/.test(e[Symbol.toStringTag])}},V6=G6,qi=V6});function U_(t,e=Lr){var r=`${j_()}${j_()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
155
- Content-Disposition: form-data; name="`;return t.forEach((s,a)=>typeof s=="string"?n.push(i+Ed(a)+`"\r
156
- \r
157
- ${s.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
158
- `)}\r
159
- `):n.push(i+Ed(a)+`"; filename="${Ed(s.name,1)}"\r
160
- Content-Type: ${s.type||"application/octet-stream"}\r
161
- \r
162
- `,s,`\r
163
- `)),n.push(`--${r}--`),new e(n,{type:"multipart/form-data; boundary="+r})}var ao,Y6,K6,j_,X6,W_,Ed,Gn,Vn,Eu=te(()=>{oo();bd();({toStringTag:ao,iterator:Y6,hasInstance:K6}=Symbol),j_=Math.random,X6="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),W_=(t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[ao])?[(r=r!==void 0?r+"":e[ao]=="File"?e.name:"blob",t),e.name!==r||e[ao]=="blob"?new qi([e],r,e):e]:[t,e+""]),Ed=(t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
164
- `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),Gn=(t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},Vn=class{#r=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[ao](){return"FormData"}[Y6](){return this.entries()}static[K6](e){return e&&typeof e=="object"&&e[ao]==="FormData"&&!X6.some(r=>typeof e[r]!="function")}append(...e){Gn("append",arguments,2),this.#r.push(W_(...e))}delete(e){Gn("delete",arguments,1),e+="",this.#r=this.#r.filter(([r])=>r!==e)}get(e){Gn("get",arguments,1),e+="";for(var r=this.#r,n=r.length,i=0;i<n;i++)if(r[i][0]===e)return r[i][1];return null}getAll(e,r){return Gn("getAll",arguments,1),r=[],e+="",this.#r.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return Gn("has",arguments,1),e+="",this.#r.some(r=>r[0]===e)}forEach(e,r){Gn("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){Gn("set",arguments,2);var r=[],n=!0;e=W_(...e),this.#r.forEach(i=>{i[0]===e[0]?n&&(n=!r.push(e)):r.push(i)}),n&&r.push(e),this.#r=r}*entries(){yield*this.#r}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}}});var Mr,wu=te(()=>{Mr=class extends Error{constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}});var gt,wd=te(()=>{wu();gt=class extends Mr{constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}}});var Fu,Fd,uo,H_,z_,G_,Cu=te(()=>{Fu=Symbol.toStringTag,Fd=t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[Fu]==="URLSearchParams",uo=t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[Fu]),H_=t=>typeof t=="object"&&(t[Fu]==="AbortSignal"||t[Fu]==="EventTarget"),z_=(t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},G_=(t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n}});var Y_=S((Xj,V_)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=fe("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}V_.exports=globalThis.DOMException});import{statSync as Qj,createReadStream as Zj,promises as J6}from"node:fs";var Q6,r7,Cd=te(()=>{Q6=We(Y_(),1);bd();oo();({stat:r7}=J6)});var X_={};hi(X_,{toFormData:()=>s5});function i5(t){let e=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let r=e[2]||e[3]||"",n=r.slice(r.lastIndexOf("\\")+1);return n=n.replace(/%22/g,'"'),n=n.replace(/&#(\d{4});/g,(i,s)=>String.fromCharCode(s)),n}async function s5(t,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let r=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!r)throw new TypeError("no or bad content-type header, no multipart boundary");let n=new _d(r[1]||r[2]),i,s,a,l,f,c,h=[],p=new Vn,y=x=>{a+=A.decode(x,{stream:!0})},m=x=>{h.push(x)},D=()=>{let x=new qi(h,c,{type:f});p.append(l,x)},_=()=>{p.append(l,a)},A=new TextDecoder("utf-8");A.decode(),n.onPartBegin=function(){n.onPartData=y,n.onPartEnd=_,i="",s="",a="",l="",f="",c=null,h.length=0},n.onHeaderField=function(x){i+=A.decode(x,{stream:!0})},n.onHeaderValue=function(x){s+=A.decode(x,{stream:!0})},n.onHeaderEnd=function(){if(s+=A.decode(),i=i.toLowerCase(),i==="content-disposition"){let x=s.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);x&&(l=x[2]||x[3]||""),c=i5(s),c&&(n.onPartData=m,n.onPartEnd=D)}else i==="content-type"&&(f=s);s="",i=""};for await(let x of t)n.write(x);return n.end(),p}var mr,xe,K_,un,_u,Su,Z6,lo,e5,t5,r5,n5,Yn,_d,J_=te(()=>{Cd();Eu();mr=0,xe={START_BOUNDARY:mr++,HEADER_FIELD_START:mr++,HEADER_FIELD:mr++,HEADER_VALUE_START:mr++,HEADER_VALUE:mr++,HEADER_VALUE_ALMOST_DONE:mr++,HEADERS_ALMOST_DONE:mr++,PART_DATA_START:mr++,PART_DATA:mr++,END:mr++},K_=1,un={PART_BOUNDARY:K_,LAST_BOUNDARY:K_*=2},_u=10,Su=13,Z6=32,lo=45,e5=58,t5=97,r5=122,n5=t=>t|32,Yn=()=>{},_d=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=Yn,this.onHeaderField=Yn,this.onHeadersEnd=Yn,this.onHeaderValue=Yn,this.onPartBegin=Yn,this.onPartData=Yn,this.onPartEnd=Yn,this.boundaryChars={},e=`\r
165
- --`+e;let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n),this.boundaryChars[r[n]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=xe.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:s,boundary:a,boundaryChars:l,index:f,state:c,flags:h}=this,p=this.boundary.length,y=p-1,m=e.length,D,_,A=L=>{this[L+"Mark"]=r},x=L=>{delete this[L+"Mark"]},M=(L,V,se,le)=>{(V===void 0||V!==se)&&this[L](le&&le.subarray(V,se))},q=(L,V)=>{let se=L+"Mark";se in this&&(V?(M(L,this[se],r,e),delete this[se]):(M(L,this[se],e.length,e),this[se]=0))};for(r=0;r<n;r++)switch(D=e[r],c){case xe.START_BOUNDARY:if(f===a.length-2){if(D===lo)h|=un.LAST_BOUNDARY;else if(D!==Su)return;f++;break}else if(f-1===a.length-2){if(h&un.LAST_BOUNDARY&&D===lo)c=xe.END,h=0;else if(!(h&un.LAST_BOUNDARY)&&D===_u)f=0,M("onPartBegin"),c=xe.HEADER_FIELD_START;else return;break}D!==a[f+2]&&(f=-2),D===a[f+2]&&f++;break;case xe.HEADER_FIELD_START:c=xe.HEADER_FIELD,A("onHeaderField"),f=0;case xe.HEADER_FIELD:if(D===Su){x("onHeaderField"),c=xe.HEADERS_ALMOST_DONE;break}if(f++,D===lo)break;if(D===e5){if(f===1)return;q("onHeaderField",!0),c=xe.HEADER_VALUE_START;break}if(_=n5(D),_<t5||_>r5)return;break;case xe.HEADER_VALUE_START:if(D===Z6)break;A("onHeaderValue"),c=xe.HEADER_VALUE;case xe.HEADER_VALUE:D===Su&&(q("onHeaderValue",!0),M("onHeaderEnd"),c=xe.HEADER_VALUE_ALMOST_DONE);break;case xe.HEADER_VALUE_ALMOST_DONE:if(D!==_u)return;c=xe.HEADER_FIELD_START;break;case xe.HEADERS_ALMOST_DONE:if(D!==_u)return;M("onHeadersEnd"),c=xe.PART_DATA_START;break;case xe.PART_DATA_START:c=xe.PART_DATA,A("onPartData");case xe.PART_DATA:if(i=f,f===0){for(r+=y;r<m&&!(e[r]in l);)r+=p;r-=y,D=e[r]}if(f<a.length)a[f]===D?(f===0&&q("onPartData",!0),f++):f=0;else if(f===a.length)f++,D===Su?h|=un.PART_BOUNDARY:D===lo?h|=un.LAST_BOUNDARY:f=0;else if(f-1===a.length)if(h&un.PART_BOUNDARY){if(f=0,D===_u){h&=~un.PART_BOUNDARY,M("onPartEnd"),M("onPartBegin"),c=xe.HEADER_FIELD_START;break}}else h&un.LAST_BOUNDARY&&D===lo?(M("onPartEnd"),c=xe.END,h=0):f=0;if(f>0)s[f-1]=D;else if(i>0){let L=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);M("onPartData",0,i,L),i=0,A("onPartData"),r--}break;case xe.END:break;default:throw new Error(`Unexpected state entered: ${c}`)}q("onHeaderField"),q("onHeaderValue"),q("onPartData"),this.index=f,this.state=c,this.flags=h}end(){if(this.state===xe.HEADER_FIELD_START&&this.index===0||this.state===xe.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==xe.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});import ln,{PassThrough as Q_}from"node:stream";import{types as Z_,deprecate as vd,promisify as o5}from"node:util";import{Buffer as $t}from"node:buffer";async function Sd(t){if(t[Dt].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[Dt].disturbed=!0,t[Dt].error)throw t[Dt].error;let{body:e}=t;if(e===null)return $t.alloc(0);if(!(e instanceof ln))return $t.alloc(0);let r=[],n=0;try{for await(let i of e){if(t.size>0&&n+i.length>t.size){let s=new gt(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(s),s}n+=i.length,r.push(i)}}catch(i){throw i instanceof Mr?i:new gt(`Invalid response body while trying to fetch ${t.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?$t.from(r.join("")):$t.concat(r,n)}catch(i){throw new gt(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new gt(`Premature close of server response while trying to fetch ${t.url}`)}var a5,Dt,gr,ji,u5,vu,e1,t1,Au=te(()=>{oo();Eu();wd();wu();Cu();a5=o5(ln.pipeline),Dt=Symbol("Body internals"),gr=class{constructor(e,{size:r=0}={}){let n=null;e===null?e=null:Fd(e)?e=$t.from(e.toString()):uo(e)||$t.isBuffer(e)||(Z_.isAnyArrayBuffer(e)?e=$t.from(e):ArrayBuffer.isView(e)?e=$t.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ln||(e instanceof Vn?(e=U_(e),n=e.type.split("=")[1]):e=$t.from(String(e))));let i=e;$t.isBuffer(e)?i=ln.Readable.from(e):uo(e)&&(i=ln.Readable.from(e.stream())),this[Dt]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof ln&&e.on("error",s=>{let a=s instanceof Mr?s:new gt(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s);this[Dt].error=a})}get body(){return this[Dt].stream}get bodyUsed(){return this[Dt].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await Sd(this);return e.slice(r,r+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new Vn,i=new URLSearchParams(await this.text());for(let[s,a]of i)n.append(s,a);return n}let{toFormData:r}=await Promise.resolve().then(()=>(J_(),X_));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[Dt].body&&this[Dt].body.type||"",r=await this.arrayBuffer();return new Lr([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await Sd(this);return new TextDecoder().decode(e)}buffer(){return Sd(this)}};gr.prototype.buffer=vd(gr.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(gr.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:vd(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});ji=(t,e)=>{let r,n,{body:i}=t[Dt];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof ln&&typeof i.getBoundary!="function"&&(r=new Q_({highWaterMark:e}),n=new Q_({highWaterMark:e}),i.pipe(r),i.pipe(n),t[Dt].stream=r,i=n),i},u5=vd(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),vu=(t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":Fd(t)?"application/x-www-form-urlencoded;charset=UTF-8":uo(t)?t.type||null:$t.isBuffer(t)||Z_.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof Vn?`multipart/form-data; boundary=${e[Dt].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${u5(t)}`:t instanceof ln?null:"text/plain;charset=UTF-8",e1=t=>{let{body:e}=t[Dt];return e===null?0:uo(e)?e.size:$t.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},t1=async(t,{body:e})=>{e===null?t.end():await a5(e,t)}});import{types as r1}from"node:util";import Ru from"node:http";function n1(t=[]){return new St(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return xu(e),Ad(e,String(r)),!0}catch{return!1}}))}var xu,Ad,St,Ou=te(()=>{xu=typeof Ru.validateHeaderName=="function"?Ru.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},Ad=typeof Ru.validateHeaderValue=="function"?Ru.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},St=class t extends URLSearchParams{constructor(e){let r=[];if(e instanceof t){let n=e.raw();for(let[i,s]of Object.entries(n))r.push(...s.map(a=>[i,a]))}else if(e!=null)if(typeof e=="object"&&!r1.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)r.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||r1.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(xu(n),Ad(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,s){switch(i){case"append":case"set":return(a,l)=>(xu(a),Ad(a,String(l)),URLSearchParams.prototype[i].call(n,String(a).toLowerCase(),String(l)));case"delete":case"has":case"getAll":return a=>(xu(a),URLSearchParams.prototype[i].call(n,String(a).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,s)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let n=r.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,r=void 0){for(let n of this.keys())Reflect.apply(e,r,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let n=this.getAll(r);return r==="host"?e[r]=n[0]:e[r]=n.length>1?n:n[0],e},{})}};Object.defineProperties(St.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}))});var l5,Tu,xd=te(()=>{l5=new Set([301,302,303,307,308]),Tu=t=>l5.has(t)});var Kt,kt,i1=te(()=>{Ou();Au();xd();Kt=Symbol("Response internals"),kt=class t extends gr{constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new St(r.headers);if(e!==null&&!i.has("Content-Type")){let s=vu(e,this);s&&i.append("Content-Type",s)}this[Kt]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[Kt].type}get url(){return this[Kt].url||""}get status(){return this[Kt].status}get ok(){return this[Kt].status>=200&&this[Kt].status<300}get redirected(){return this[Kt].counter>0}get statusText(){return this[Kt].statusText}get headers(){return this[Kt].headers}get highWaterMark(){return this[Kt].highWaterMark}clone(){return new t(ji(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!Tu(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new t(null,{status:0,statusText:""});return e[Kt].type="error",e}static json(e=void 0,r={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let i=new St(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new t(n,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(kt.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var s1,o1=te(()=>{s1=t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""}});import{isIP as c5}from"node:net";function a1(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function c1(t){if(!u1.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function f5(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=c5(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function Wi(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:f5(t)}function f1(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let n=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let i=t.referrer,s=a1(i),a=a1(i,!0);s.toString().length>4096&&(s=a),e&&(s=e(s)),r&&(a=r(a));let l=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return a;case"unsafe-url":return s;case"strict-origin":return Wi(s)&&!Wi(l)?"no-referrer":a.toString();case"strict-origin-when-cross-origin":return s.origin===l.origin?s:Wi(s)&&!Wi(l)?"no-referrer":a;case"same-origin":return s.origin===l.origin?s:"no-referrer";case"origin-when-cross-origin":return s.origin===l.origin?s:a;case"no-referrer-when-downgrade":return Wi(s)&&!Wi(l)?"no-referrer":s;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function h1(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&u1.has(n)&&(r=n);return r}var u1,l1,Rd=te(()=>{u1=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),l1="strict-origin-when-cross-origin"});import{format as h5}from"node:url";import{deprecate as d5}from"node:util";var Ye,co,p5,Kn,d1,p1=te(()=>{Ou();Au();Cu();o1();Rd();Ye=Symbol("Request internals"),co=t=>typeof t=="object"&&typeof t[Ye]=="object",p5=d5(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Kn=class t extends gr{constructor(e,r={}){let n;if(co(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!co(r)&&"data"in r&&p5(),(r.body!=null||co(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let s=r.body?r.body:co(e)&&e.body!==null?ji(e):null;super(s,{size:r.size||e.size||0});let a=new St(r.headers||e.headers||{});if(s!==null&&!a.has("Content-Type")){let c=vu(s,this);c&&a.set("Content-Type",c)}let l=co(e)?e.signal:null;if("signal"in r&&(l=r.signal),l!=null&&!H_(l))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let f=r.referrer==null?e.referrer:r.referrer;if(f==="")f="no-referrer";else if(f){let c=new URL(f);f=/^about:(\/\/)?client$/.test(c)?"client":c}else f=void 0;this[Ye]={method:i,redirect:r.redirect||e.redirect||"follow",headers:a,parsedURL:n,signal:l,referrer:f},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[Ye].method}get url(){return h5(this[Ye].parsedURL)}get headers(){return this[Ye].headers}get redirect(){return this[Ye].redirect}get signal(){return this[Ye].signal}get referrer(){if(this[Ye].referrer==="no-referrer")return"";if(this[Ye].referrer==="client")return"about:client";if(this[Ye].referrer)return this[Ye].referrer.toString()}get referrerPolicy(){return this[Ye].referrerPolicy}set referrerPolicy(e){this[Ye].referrerPolicy=c1(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Kn.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});d1=t=>{let{parsedURL:e}=t[Ye],r=new St(t[Ye].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(n="0"),t.body!==null){let l=e1(t);typeof l=="number"&&!Number.isNaN(l)&&(n=String(l))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=l1),t.referrer&&t.referrer!=="no-referrer"?t[Ye].referrer=f1(t):t[Ye].referrer="no-referrer",t[Ye].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=t;typeof i=="function"&&(i=i(e));let s=s1(e),a={path:e.pathname+s,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:a}}});var Bu,m1=te(()=>{wu();Bu=class extends Mr{constructor(e,r="aborted"){super(e,r)}}});import m5 from"node:http";import g5 from"node:https";import Ui from"node:zlib";import g1,{PassThrough as D1,pipeline as Hi}from"node:stream";import{Buffer as Pu}from"node:buffer";async function Iu(t,e){return new Promise((r,n)=>{let i=new Kn(t,e),{parsedURL:s,options:a}=d1(i);if(!D5.has(s.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`);if(s.protocol==="data:"){let D=I_(i.url),_=new kt(D,{headers:{"Content-Type":D.typeFull}});r(_);return}let l=(s.protocol==="https:"?g5:m5).request,{signal:f}=i,c=null,h=()=>{let D=new Bu("The operation was aborted.");n(D),i.body&&i.body instanceof g1.Readable&&i.body.destroy(D),!(!c||!c.body)&&c.body.emit("error",D)};if(f&&f.aborted){h();return}let p=()=>{h(),m()},y=l(s.toString(),a);f&&f.addEventListener("abort",p);let m=()=>{y.abort(),f&&f.removeEventListener("abort",p)};y.on("error",D=>{n(new gt(`request to ${i.url} failed, reason: ${D.message}`,"system",D)),m()}),y5(y,D=>{c&&c.body&&c.body.destroy(D)}),process.version<"v14"&&y.on("socket",D=>{let _;D.prependListener("end",()=>{_=D._eventsCount}),D.prependListener("close",A=>{if(c&&_<D._eventsCount&&!A){let x=new Error("Premature close");x.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",x)}})}),y.on("response",D=>{y.setTimeout(0);let _=n1(D.rawHeaders);if(Tu(D.statusCode)){let L=_.get("Location"),V=null;try{V=L===null?null:new URL(L,i.url)}catch{if(i.redirect!=="manual"){n(new gt(`uri requested responds with an invalid redirect URL: ${L}`,"invalid-redirect")),m();return}}switch(i.redirect){case"error":n(new gt(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),m();return;case"manual":break;case"follow":{if(V===null)break;if(i.counter>=i.follow){n(new gt(`maximum redirect reached at: ${i.url}`,"max-redirect")),m();return}let se={headers:new St(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:ji(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!z_(i.url,V)||!G_(i.url,V))for(let _e of["authorization","www-authenticate","cookie","cookie2"])se.headers.delete(_e);if(D.statusCode!==303&&i.body&&e.body instanceof g1.Readable){n(new gt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),m();return}(D.statusCode===303||(D.statusCode===301||D.statusCode===302)&&i.method==="POST")&&(se.method="GET",se.body=void 0,se.headers.delete("content-length"));let le=h1(_);le&&(se.referrerPolicy=le),r(Iu(new Kn(V,se))),m();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}f&&D.once("end",()=>{f.removeEventListener("abort",p)});let A=Hi(D,new D1,L=>{L&&n(L)});process.version<"v12.10"&&D.on("aborted",p);let x={url:i.url,status:D.statusCode,statusText:D.statusMessage,headers:_,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},M=_.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||M===null||D.statusCode===204||D.statusCode===304){c=new kt(A,x),r(c);return}let q={flush:Ui.Z_SYNC_FLUSH,finishFlush:Ui.Z_SYNC_FLUSH};if(M==="gzip"||M==="x-gzip"){A=Hi(A,Ui.createGunzip(q),L=>{L&&n(L)}),c=new kt(A,x),r(c);return}if(M==="deflate"||M==="x-deflate"){let L=Hi(D,new D1,V=>{V&&n(V)});L.once("data",V=>{(V[0]&15)===8?A=Hi(A,Ui.createInflate(),se=>{se&&n(se)}):A=Hi(A,Ui.createInflateRaw(),se=>{se&&n(se)}),c=new kt(A,x),r(c)}),L.once("end",()=>{c||(c=new kt(A,x),r(c))});return}if(M==="br"){A=Hi(A,Ui.createBrotliDecompress(),L=>{L&&n(L)}),c=new kt(A,x),r(c);return}c=new kt(A,x),r(c)}),t1(y,i).catch(n)})}function y5(t,e){let r=Pu.from(`0\r
166
- \r
167
- `),n=!1,i=!1,s;t.on("response",a=>{let{headers:l}=a;n=l["transfer-encoding"]==="chunked"&&!l["content-length"]}),t.on("socket",a=>{let l=()=>{if(n&&!i){let c=new Error("Premature close");c.code="ERR_STREAM_PREMATURE_CLOSE",e(c)}},f=c=>{i=Pu.compare(c.slice(-5),r)===0,!i&&s&&(i=Pu.compare(s.slice(-3),r.slice(0,3))===0&&Pu.compare(c.slice(-2),r.slice(3))===0),s=c};a.prependListener("close",l),a.on("data",f),t.on("close",()=>{a.removeListener("close",l),a.removeListener("data",f)})})}var D5,y1=te(()=>{$_();Au();i1();Ou();p1();wd();m1();xd();Eu();Cu();Rd();Cd();D5=new Set(["data:","http:","https:"])});import b1 from"node:fs";function b5(){try{return b1.statSync("/.dockerenv"),!0}catch{return!1}}function E5(){try{return b1.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function Td(){return Od===void 0&&(Od=b5()||E5()),Od}var Od,E1=te(()=>{});import w5 from"node:fs";function zi(){return Bd===void 0&&(Bd=F5()||Td()),Bd}var Bd,F5,Pd=te(()=>{E1();F5=()=>{try{return w5.statSync("/run/.containerenv"),!0}catch{return!1}}});import F1 from"node:process";import C5 from"node:os";import _5 from"node:fs";var w1,cn,Id=te(()=>{Pd();w1=()=>{if(F1.platform!=="linux")return!1;if(C5.release().toLowerCase().includes("microsoft"))return!zi();try{return _5.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!zi():!1}catch{return!1}},cn=F1.env.__IS_WSL_TEST__?w1:w1()});import C1 from"node:process";import _1,{constants as S5}from"node:fs/promises";var v5,A5,$d,S1=te(()=>{Id();Id();v5=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",n=!1;try{await _1.access(r,S5.F_OK),n=!0}catch{}if(!n)return t;let i=await _1.readFile(r,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),A5=async()=>`${await v5()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,$d=async()=>cn?A5():`${C1.env.SYSTEMROOT||C1.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`});function fn(t,e,r){let n=i=>Object.defineProperty(t,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){let i=r();return n(i),i},set(i){n(i)}}),t}var v1=te(()=>{});import{promisify as x5}from"node:util";import R5 from"node:process";import{execFile as O5}from"node:child_process";async function kd(){if(R5.platform!=="darwin")throw new Error("macOS only");let{stdout:t}=await T5("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),r=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(t)?.groups.id??"com.apple.Safari";return r==="com.apple.safari"?"com.apple.Safari":r}var T5,A1=te(()=>{T5=x5(O5)});import B5 from"node:process";import{promisify as P5}from"node:util";import{execFile as I5,execFileSync as AW}from"node:child_process";async function x1(t,{humanReadableOutput:e=!0,signal:r}={}){if(B5.platform!=="darwin")throw new Error("macOS only");let n=e?[]:["-ss"],i={};r&&(i.signal=r);let{stdout:s}=await $5("osascript",["-e",t,n],i);return s.trim()}var $5,R1=te(()=>{$5=P5(I5)});async function Ld(t){return x1(`tell application "Finder" to set app_path to application file id "${t}" as string
168
- tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var O1=te(()=>{R1()});import{promisify as k5}from"node:util";import{execFile as L5}from"node:child_process";async function Nd(t=M5){let{stdout:e}=await t("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),r=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(e);if(!r)throw new Md(`Cannot find Windows browser in stdout: ${JSON.stringify(e)}`);let{id:n}=r.groups,i=n.lastIndexOf("."),s=n.lastIndexOf("-"),a=i===-1?void 0:n.slice(0,i),l=s===-1?void 0:n.slice(0,s);return $u[n]??$u[a]??$u[l]??{name:n,id:n}}var M5,$u,PW,Md,T1=te(()=>{M5=k5(L5),$u={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},PW=new Map(Object.entries($u)),Md=class extends Error{}});import{promisify as N5}from"node:util";import qd from"node:process";import{execFile as q5}from"node:child_process";async function jd(){if(qd.platform==="darwin"){let t=await kd();return{name:await Ld(t),id:t}}if(qd.platform==="linux"){let{stdout:t}=await j5("xdg-mime",["query","default","x-scheme-handler/http"]),e=t.trim();return{name:W5(e.replace(/.desktop$/,"").replace("-"," ")),id:e}}if(qd.platform==="win32")return Nd();throw new Error("Only macOS, Linux, and Windows are supported")}var j5,W5,B1=te(()=>{A1();O1();T1();j5=N5(q5),W5=t=>t.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase())});import L1 from"node:process";import{Buffer as M1}from"node:buffer";import N1 from"node:path";import{fileURLToPath as U5}from"node:url";import{promisify as H5}from"node:util";import q1 from"node:child_process";import z5,{constants as G5}from"node:fs/promises";async function Y5(){let t=await $d(),e=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,r=M1.from(e,"utf16le").toString("base64"),{stdout:n}=await V5(t,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",r],{encoding:"utf8"}),i=n.trim(),s={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return s[i]?{id:s[i]}:{}}function k1(t){if(typeof t=="string"||Array.isArray(t))return t;let{[I1]:e}=t;if(!e)throw new Error(`${I1} is not supported`);return e}function Lu({[Gi]:t},{wsl:e}){if(e&&cn)return k1(e);if(!t)throw new Error(`${Gi} is not supported`);return k1(t)}var V5,Wd,P1,Gi,I1,$1,ku,K5,Xn,j1,W1=te(()=>{S1();v1();B1();Pd();V5=H5(q1.execFile),Wd=N1.dirname(U5(import.meta.url)),P1=N1.join(Wd,"xdg-open"),{platform:Gi,arch:I1}=L1;$1=async(t,e)=>{let r;for(let n of t)try{return await e(n)}catch(i){r=i}throw r},ku=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return $1(t.app,l=>ku({...t,app:l}));let{name:e,arguments:r=[]}=t.app??{};if(r=[...r],Array.isArray(e))return $1(e,l=>ku({...t,app:{name:l,arguments:r}}));if(e==="browser"||e==="browserPrivate"){let l={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},f={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},c=cn?await Y5():await jd();if(c.id in l){let h=l[c.id];return e==="browserPrivate"&&r.push(f[h]),ku({...t,app:{name:Xn[h],arguments:r}})}throw new Error(`${c.name} is not supported as a default browser`)}let n,i=[],s={};if(Gi==="darwin")n="open",t.wait&&i.push("--wait-apps"),t.background&&i.push("--background"),t.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(Gi==="win32"||cn&&!zi()&&!e){n=await $d(),i.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),cn||(s.windowsVerbatimArguments=!0);let l=["Start"];t.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`),t.target&&r.push(t.target)):t.target&&l.push(`"${t.target}"`),r.length>0&&(r=r.map(f=>`"\`"${f}\`""`),l.push("-ArgumentList",r.join(","))),t.target=M1.from(l.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let l=!Wd||Wd==="/",f=!1;try{await z5.access(P1,G5.X_OK),f=!0}catch{}n=L1.versions.electron??(Gi==="android"||l||!f)?"xdg-open":P1}r.length>0&&i.push(...r),t.wait||(s.stdio="ignore",s.detached=!0)}Gi==="darwin"&&r.length>0&&i.push("--args",...r),t.target&&i.push(t.target);let a=q1.spawn(n,i,s);return t.wait?new Promise((l,f)=>{a.once("error",f),a.once("close",c=>{if(!t.allowNonzeroExitCode&&c>0){f(new Error(`Exited with code ${c}`));return}l(a)})}):(a.unref(),a)},K5=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return ku({...e,target:t})};Xn={};fn(Xn,"chrome",()=>Lu({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));fn(Xn,"brave",()=>Lu({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));fn(Xn,"firefox",()=>Lu({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));fn(Xn,"edge",()=>Lu({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));fn(Xn,"browser",()=>"browser");fn(Xn,"browserPrivate",()=>"browserPrivate");j1=K5});import*as Xt from"fs/promises";import*as Mu from"path";import*as Vi from"os";import{createServer as X5}from"http";import{URL as U1}from"url";import Jn from"crypto";async function z1(){try{let n=await Xt.readFile(H1,"utf-8").catch(()=>null);if(n)return Buffer.from(n,"hex")}catch{}let t=`${Vi.userInfo().username}@${Vi.hostname()}`,r=Jn.pbkdf2Sync(t,"delta-cli-v2-fixed-salt",1e5,32,"sha256");return await Xt.mkdir(Nu,{recursive:!0}),await Xt.writeFile(H1,r.toString("hex"),{mode:384}),r}async function J5(t){let e=await z1(),r=Jn.randomBytes(16),n=Jn.createCipheriv("aes-256-gcm",e,r),i=n.update(t,"utf-8","hex");i+=n.final("hex");let s=n.getAuthTag();return`${r.toString("hex")}:${s.toString("hex")}:${i}`}async function Q5(t){try{let e=await z1(),r=t.split(":");if(r.length!==3)return null;let n=Buffer.from(r[0],"hex"),i=Buffer.from(r[1],"hex"),s=r[2],a=Jn.createDecipheriv("aes-256-gcm",e,n);a.setAuthTag(i);let l=a.update(s,"hex","utf-8");return l+=a.final("utf-8"),l}catch{return null}}function Z5(){let t=Jn.randomBytes(32).toString("base64url"),e=Jn.createHash("sha256").update(t).digest("base64url");return{verifier:t,challenge:e}}async function G1(t="oauth"){kr("Starting OAuth2 authentication flow...");try{let e=process.env.DELTA_API_URL||"http://localhost:3000",{verifier:r,challenge:n}=Z5(),i="http://localhost:3456/callback",s=Jn.randomBytes(16).toString("hex"),a=new U1(`${e}/api/auth/authorize`);a.searchParams.set("response_type","code"),a.searchParams.set("client_id","delta-cli"),a.searchParams.set("redirect_uri",i),a.searchParams.set("code_challenge",n),a.searchParams.set("code_challenge_method","S256"),a.searchParams.set("state",s),a.searchParams.set("scope","read write analyze"),t==="github"?a.searchParams.set("provider","github"):t==="google"&&a.searchParams.set("provider","google"),Ct(!0,"OAuth server ready"),Ze("Opening browser for authentication..."),Ze(`URL: ${a.toString().substring(0,80)}...`),await j1(a.toString());let l=await new Promise((h,p)=>{let y=X5(async(m,D)=>{let _=y.address(),A=typeof _=="object"&&_?_.port:3e3,x=new U1(m.url||"/",`http://localhost:${A}`);if(x.pathname==="/callback"){let M=x.searchParams.get("code"),q=x.searchParams.get("state"),L=x.searchParams.get("error");if(L){D.writeHead(400,{"Content-Type":"text/html"}),D.end(`
169
- <html>
170
- <body style="font-family: system-ui; text-align: center; padding: 50px;">
171
- <h1 style="color: #e74c3c;">\u274C Authentication Failed</h1>
172
- <p>${L}</p>
173
- <p>You can close this window.</p>
174
- </body>
175
- </html>
176
- `),p(new Error(L)),y.close();return}if(!M||q!==s){D.writeHead(400,{"Content-Type":"text/html"}),D.end(`
177
- <html>
178
- <body style="font-family: system-ui; text-align: center; padding: 50px;">
179
- <h1 style="color: #e74c3c;">\u274C Invalid Response</h1>
180
- <p>You can close this window.</p>
181
- </body>
182
- </html>
183
- `),p(new Error("Invalid OAuth response")),y.close();return}D.writeHead(200,{"Content-Type":"text/html"}),D.end(`
184
- <html>
185
- <head>
186
- <style>
187
- body {
188
- font-family: system-ui, -apple-system, sans-serif;
189
- text-align: center;
190
- padding: 50px;
191
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
192
- color: white;
193
- min-height: 100vh;
194
- display: flex;
195
- align-items: center;
196
- justify-content: center;
197
- }
198
- .container {
199
- background: rgba(255,255,255,0.1);
200
- backdrop-filter: blur(10px);
201
- padding: 40px;
202
- border-radius: 20px;
203
- box-shadow: 0 20px 60px rgba(0,0,0,0.3);
204
- }
205
- h1 { margin: 0 0 20px; font-size: 48px; }
206
- .check { font-size: 64px; margin-bottom: 20px; }
207
- p { font-size: 18px; opacity: 0.9; }
208
- </style>
209
- </head>
210
- <body>
211
- <div class="container">
212
- <div class="check">\u2713</div>
213
- <h1>Successfully Signed In!</h1>
214
- <p>You can close this window and return to the terminal.</p>
215
- </div>
216
- </body>
217
- </html>
218
- `),h(M),y.close()}});y.listen(3456,"127.0.0.1",()=>{let m=y.address(),D=typeof m=="object"&&m?m.port:3456;console.log(I.dim(` Waiting for authentication on port ${D}...`))}),y.on("error",m=>{m.code==="EADDRINUSE"?(no("Port 3456 is busy, trying alternative port..."),y.listen(0,"127.0.0.1")):p(m)}),setTimeout(()=>{y.close(),p(new Error("Authentication timeout"))},300*1e3)});kr("Exchanging authorization code...");let f=await Iu(`${e}/api/auth/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:l,redirect_uri:i,client_id:"delta-cli",code_verifier:r})});if(!f.ok)throw new Error("Failed to exchange authorization code");let c=await f.json();return await Ne.saveAccessToken(c.access_token),await Ne.saveRefreshToken(c.refresh_token),Ct(!0,"Authentication successful!"),pr("Successfully authenticated with Delta Cloud"),Ze(`Token expires in ${c.expires_in} seconds`),!0}catch(e){return Ct(!1,"Authentication failed"),_t("OAuth2 authentication failed",e.message),!1}}var Nu,Ud,H1,Ne,Nr=te(()=>{"use strict";y1();W1();nr();so();Nu=Mu.join(Vi.homedir(),".delta"),Ud=Mu.join(Nu,"tokens.enc"),H1=Mu.join(Nu,".key");Ne=class{static async saveTokens(e){await Xt.mkdir(Nu,{recursive:!0});let r=JSON.stringify({access:e.access||null,refresh:e.refresh||null,updatedAt:new Date().toISOString()}),n=await J5(r);await Xt.writeFile(Ud,n,{mode:384})}static async loadTokens(){try{let e=await Xt.readFile(Ud,"utf-8"),r=await Q5(e);if(!r)return{access:null,refresh:null};let n=JSON.parse(r);return{access:n.access||null,refresh:n.refresh||null}}catch{return{access:null,refresh:null}}}static async saveAccessToken(e){let r=await this.loadTokens();await this.saveTokens({access:e,refresh:r.refresh??void 0})}static async getAccessToken(){return(await this.loadTokens()).access}static async saveRefreshToken(e){let r=await this.loadTokens();await this.saveTokens({refresh:e,access:r.access??void 0})}static async getRefreshToken(){return(await this.loadTokens()).refresh}static async clearTokens(){try{await Xt.unlink(Ud)}catch{}}static async hasTokens(){return!!await this.getAccessToken()}}});var X1={};hi(X1,{CONFIG_FILE:()=>hn,authCommands:()=>K1,loadConfig:()=>Lt,loginCommand:()=>e$,saveConfig:()=>qu});import*as Yi from"fs/promises";import*as Hd from"path";import*as V1 from"os";async function Lt(){try{let t=await Yi.readFile(hn,"utf-8");return JSON.parse(t)}catch{return{}}}async function qu(t){await Yi.mkdir(Y1,{recursive:!0}),await Yi.writeFile(hn,JSON.stringify(t,null,2))}var Y1,hn,K1,e$,dn=te(()=>{"use strict";so();Nr();Y1=Hd.join(V1.homedir(),".delta"),hn=Hd.join(Y1,"config.json");K1={async login(t){P_(),Hn("Authentication");let e=t.token??process.env.DELTA_PAT;if(!e){Ze("No token provided. Starting OAuth2 authentication..."),Ze("A browser window will open for you to sign in."),console.log(),await G1("oauth")||(_t("Authentication failed"),console.log(),Ze("You can also authenticate using a Personal Access Token:"),It("delta login --token <your-token>",""),process.exit(1)),pr("Authentication successful! \u{1F389}"),console.log(),It("delta whoami","to see account details"),It("delta analyze","to start analyzing code");return}e.startsWith("delta_pat_")||(_t("Invalid PAT token format",'Token should start with "delta_pat_"'),console.log(),Ze("You can get your PAT from:"),It("http://localhost:3000/dashboard/cli-tokens",""),process.exit(1));let r=await Lt(),n=process.env.DELTA_API_URL||r.apiUrl||"http://localhost:3000";T_("Connecting to Platform"),B_("API Endpoint",n),console.log(),kr("Verifying credentials...");try{let i=new AbortController,s=setTimeout(()=>i.abort(),1e4),a=await fetch(`${n}/api/me/entitlements`,{headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},signal:i.signal});if(clearTimeout(s),!a.ok){let p=await a.text().catch(()=>a.statusText);throw new Error(`HTTP ${a.status}: ${p}`)}let l=await a.json();if(!l.success)throw new Error(l.error?.message||"Authentication failed");await Ne.saveAccessToken(e),await qu({apiUrl:n,lastUsedAt:new Date().toISOString()}),Ct(!0,"Authentication successful!"),console.log();let f=l.data.user,c=l.data.quota;Hn("Account Overview");let h=zn(["Property","Value"]);h.push([Fe.user+" Email",f.email],[Fe.package+" Plan",f.plan],[Fe.chart+" Quota Used",`${c.used}/${c.limit} reports`],[Fe.lock+" Config",hn]),console.log(h.toString()),console.log(),pr(`Welcome back, ${f.email.split("@")[0]}! \u{1F389}`),console.log(),It("delta whoami","to see full account details"),It("delta analyze","to start analyzing code")}catch(i){if(Ct(!1,"Authentication failed"),console.log(),i instanceof Error&&i.name==="AbortError")_t("Request timeout (10s)","Check if the server is running and accessible");else{let s=i instanceof Error?i.message:String(i);s.includes("401")?_t("Invalid or expired token","Generate a new token from the web app"):s.includes("ENOTFOUND")||s.includes("ECONNREFUSED")?_t("Cannot connect to server","Check your internet connection and API URL"):_t(s)}console.log(),Ze("Need help? Visit: http://localhost:3000/docs/cli/authentication"),process.exit(1)}}},e$=K1.login});var nS={};hi(nS,{logoutCommand:()=>o$});import*as rS from"fs/promises";async function o$(){try{if(!await Ne.hasTokens()){console.log("\u2139\uFE0F Not currently authenticated");return}await Ne.clearTokens();try{await rS.unlink(hn)}catch{}console.log("\u2705 Successfully logged out"),console.log(" Authentication data removed")}catch(t){console.error("\u274C Error during logout:",t instanceof Error?t.message:String(t)),process.exit(1)}}var iS=te(()=>{"use strict";dn();Nr()});var sS={};hi(sS,{whoamiCommand:()=>a$});async function a$(t){try{let e=await Lt(),r=await Ne.getAccessToken();r||(Hn("Authentication Status"),_t("Not authenticated"),console.log(),Ze("Please login first:"),It("delta login","to authenticate with your PAT"),process.exit(1)),Hn("Loading Account Information"),kr("Fetching user data...");let n=e.apiUrl||process.env.DELTA_API_URL||"http://localhost:3000",i=await fetch(`${n}/api/auth/me`,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}});if(!i.ok)throw Ct(!1),i.status===401&&(_t("Authentication expired or invalid"),console.log(),Ze("Please login again:"),It("delta login --token <new-pat>","to re-authenticate"),process.exit(1)),new Error(`API error: ${i.status} ${i.statusText}`);let s=await i.json();Ct(!0),console.log();let a=s;Hn("User Profile");let l=zn(["Property","Value"]);l.push([Fe.user+" Email",a.email],[Fe.user+" User ID",a.id],[Fe.package+" Plan",u$(a.plan)],[Fe.star+" Role",a.role||a.plan],[Fe.info+" Status",a.status||"active"],[Fe.bullet+" Created",new Date(a.created_at).toLocaleDateString("en-US")]),console.log(l.toString()),io(),console.log(),pr("\u2713 Authenticated successfully"),console.log(),It("delta analyze","to run a code analysis"),It("delta status","to check project status")}catch(e){Ct(!1),console.log(),_t(e instanceof Error?e.message:String(e)),process.exit(1)}}function u$(t){return{individual_free:"\u{1F537} Free",individual_pro:"\u{1F48E} Pro",individual_team:"\u{1F465} Team",enterprise:"\u{1F3E2} Enterprise"}[t]||t}var oS=te(()=>{"use strict";dn();Nr();so()});var uS={};hi(uS,{analyzeCommand:()=>l$});import*as Dr from"fs/promises";import*as Mt from"path";import*as Qn from"crypto";function Gd(t){if(!t||typeof t!="object")return{};let e=t.error;if(!e||typeof e!="object")return{};let r=e;return{message:typeof r.message=="string"?r.message:void 0,details:r.details}}async function l$(t,e){let r=Mt.resolve(t);Ze("\u{1F50D} Starting Delta Analysis Engine..."),io(),console.log(`${Fe.folder} Project: ${I.cyan(r)}`),console.log(),kr("Scanning project files...");let n=await f$(r,{include:e.include?[e.include]:["**/*.{ts,tsx,js,jsx}"],exclude:e.exclude?[e.exclude].concat(["node_modules","dist",".git"]):["node_modules","dist",".git"],maxSize:parseInt(e.maxSize,10)});Ct(!0,`Found ${n.length} files to analyze`),console.log(),n.length===0&&(no("No files found matching the criteria"),Ze("Try adjusting --include or --exclude patterns"),process.exit(0)),console.log(`${Fe.loading} Analyzing ${n.length} files...`),console.log();let i=Date.now(),s={totalFiles:n.length,successfulParses:0,failedParses:0,totalLines:0,totalFunctions:0,totalClasses:0,totalDuration:0,errors:[]},a=[];for(let p=0;p<n.length;p++){let y=n[p],m=Math.round((p+1)/n.length*100),D=h$(m);process.stdout.write(`\r${D} ${I.cyan(`${p+1}/${n.length}`)} ${I.dim(y.split(/[/\\]/).pop()||"")}`);try{let _=await Dr.readFile(y,"utf-8"),A=_.split(`
219
- `);s.totalLines+=A.length,s.successfulParses++,_.includes("function ")&&s.totalFunctions++,_.includes("class ")&&s.totalClasses++,_.includes("eval(")&&a.push({file:Mt.relative(r,y),type:"security",severity:"high",message:"Use of eval() detected"}),_.includes("console.log")&&a.push({file:Mt.relative(r,y),type:"maintainability",severity:"low",message:"Console.log statement found"})}catch(_){s.failedParses++,s.errors.push({file:Mt.relative(r,y),error:_ instanceof Error?_.message:String(_)})}}process.stdout.write("\r"+" ".repeat(80)+"\r"),console.log(`${Fe.check} Analysis complete: ${I.green(`${s.successfulParses} successful`)}, ${s.failedParses>0?I.red(`${s.failedParses} failed`):""}`),console.log(),s.totalDuration=Date.now()-i;let l={schema_version:"1.0",engine_version:"0.5.0",created_at:new Date().toISOString(),project:{name:e.projectName||Mt.basename(r),root_fingerprint:"",path:r},tools_used:[{id:"delta-core",version:"0.5.0",adapter_version:"0.5.0"}],summary:{total:a.length,high:a.filter(p=>p.severity==="high").length,medium:a.filter(p=>p.severity==="medium").length,low:a.filter(p=>p.severity==="low").length},findings:a,metadata:s};io(),pr("Analysis Complete"),console.log();let f=zn(["Metric","Value"]);if(f.push([Fe.folder+" Files Analyzed",s.totalFiles.toString()],[Fe.chart+" Total Lines",s.totalLines.toLocaleString()],[Fe.gear+" Functions Found",s.totalFunctions.toString()],[Fe.package+" Classes Found",s.totalClasses.toString()],[Fe.loading+" Duration",d$(s.totalDuration)]),console.log(f.toString()),console.log(),a.length>0){no(`Found ${a.length} issues:`);let p=zn(["Severity","Count"]),y=a.filter(_=>_.severity==="high").length,m=a.filter(_=>_.severity==="medium").length,D=a.filter(_=>_.severity==="low").length;y>0&&p.push([I.red("\u{1F534} High"),y.toString()]),m>0&&p.push([I.yellow("\u{1F7E1} Medium"),m.toString()]),D>0&&p.push([I.blue("\u{1F535} Low"),D.toString()]),console.log(p.toString())}else pr("\u2728 No issues found! Great job!");console.log();let c=Mt.resolve(e.output);await Dr.mkdir(c,{recursive:!0});let h=Mt.join(c,`report-${Date.now()}.json`);await Dr.writeFile(h,JSON.stringify(l,null,2)),Ze(`${Fe.chart} Report saved: ${I.cyan(h)}`),console.log(),e.upload&&(console.log(`${Fe.rocket} Uploading to Delta Cloud...`),await c$(l))}async function c$(t){let e=await Lt(),r=await Ne.getAccessToken();r||(console.error("\u274C Error: Not authenticated. Run: delta login --token <pat>"),process.exit(1));let n=process.env.DELTA_API_URL||e.apiUrl||"http://localhost:3000",i=JSON.stringify(t),s=Qn.createHash("sha256").update(i).digest("hex");try{let a=await fetch(`${n}/api/upload/init`,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json","Idempotency-Key":Qn.randomUUID()},body:JSON.stringify({schemaVersion:"1.0",engineVersion:"0.5.0",reportHash:s,reportSizeBytes:Buffer.byteLength(i),toolsUsed:[{id:"delta-core",version:"0.5.0",adapterVersion:"0.5.0"}]})});if(!a.ok){let D;try{D=await a.json()}catch{D=await a.text().catch(()=>{})}let _=Gd(D),A=_.details?`
220
- Details: ${JSON.stringify(_.details)}`:"",x=_.message||`Init failed: ${a.status}`;throw new Error(x+A)}let l=await a.json();if(!l.success)throw new Error(l.error?.message||"Upload init failed");let f=l.data.uploadId,c=l.data.signing.secret;console.log(` Upload session: ${f}`);let h=Qn.createHmac("sha256",c).update(i).digest("hex"),p=await fetch(`${n}/api/upload/${f}`,{method:"PUT",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({report:Object.assign({},t,{integrity:{report_hash:s,signature:h,algorithm:"HMAC-SHA256"}})})});if(!p.ok){let D;try{D=await p.json()}catch{D=await p.text().catch(()=>{})}let _=Gd(D),A=_.details?`
221
- Details: ${JSON.stringify(_.details)}`:"",x=_.message||`Upload failed: ${p.status}`;throw new Error(x+A)}console.log(" Report uploaded");let y=await fetch(`${n}/api/upload/${f}/finalize`,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json","Idempotency-Key":Qn.randomUUID()},body:"{}"});if(!y.ok){let D;try{D=await y.json()}catch{D=await y.text().catch(()=>{})}let _=Gd(D),A=_.details?`
222
- Details: ${JSON.stringify(_.details)}`:"",x=_.message||`Finalize failed: ${y.status}`;throw new Error(x+A)}let m=await y.json();if(!m.success)throw new Error(m.error?.message||"Upload finalize failed");console.log(`\u2705 Report finalized: ${m.data.reportId}`),console.log(" Quota updated")}catch(a){console.error("\u274C Upload failed:",a instanceof Error?a.message:String(a)),process.exit(1)}}async function f$(t,e){let r=[];async function n(i){let s=await Dr.readdir(i,{withFileTypes:!0});for(let a of s){let l=Mt.join(i,a.name);if(a.isDirectory()){if(e.exclude.some(f=>a.name.includes(f)))continue;await n(l)}else if(a.isFile()&&e.include.some(c=>{if(c.includes("{")&&c.includes("}")){let h=c.match(/\{([^}]+)\}/);if(h){let p=h[1].split(","),y=c.replace(/\{[^}]+\}/,"");return p.some(m=>{let D=y+m;return aS(l,D)})}}return aS(l,c)}))try{(await Dr.stat(l)).size<=e.maxSize&&r.push(l)}catch{}}}return await n(t),r}function aS(t,e){let r=t.split(/[/\\]/).pop()||"";if(e.includes("**")){let n=e.replace("**/*","");return r.endsWith(n)}else if(e.includes("*")){let n=e.replace("*","");return r.endsWith(n)}return t.includes(e)}function h$(t){let r=Math.round(t/100*20),n=20-r,i=I.cyan("\u2588".repeat(r)),s=I.gray("\u2591".repeat(n));return`${i}${s} ${I.bold(`${t}%`)}`}function d$(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(2)}s`}var lS=te(()=>{"use strict";dn();Nr();nr();so()});var cS={};hi(cS,{configCommand:()=>p$});async function p$(t){let e=await Lt();if(t.get){let r=e[t.get];console.log(r!==void 0?`${t.get}: ${r}`:`${t.get}: (not set)`);return}if(t.set){let[r,n]=t.set.split("=");(!r||n===void 0)&&(console.error("\u274C Error: Invalid format. Use: key=value"),process.exit(1));let i={...e,apiUrl:e.apiUrl||"http://localhost:3000",[r]:n};await qu(i),console.log(`\u2705 Set ${r} = ${n}`);return}if(t.list||!t.get&&!t.set){console.log("\u{1F527} Delta CLI Configuration"),console.log(` Config file: ${hn}`),console.log();let r=await Ne.hasTokens();console.log(r?" PAT: \u2705 Set (securely stored in keychain)":" PAT: \u274C Not set"),console.log(` API URL: ${e.apiUrl||"http://localhost:3000 (default)"}`),e.lastUsedAt&&console.log(` Last used: ${new Date(e.lastUsedAt).toLocaleString()}`)}}var fS=te(()=>{"use strict";dn();Nr()});var ym=We(Dm(),1),{program:B$,createCommand:P$,createArgument:I$,createOption:$$,CommanderError:k$,InvalidArgumentError:L$,InvalidOptionArgumentError:M$,Command:bm,Argument:N$,Option:q$,Help:j$}=ym.default;var ei=We(fg(),1);import*as Xr from"fs";import*as Di from"path";var HA={FULL_WIDTH:0,FITTING:1,SMUSHING:2,CONTROLLED_SMUSHING:3},tc=class{constructor(){this.comment="",this.numChars=0,this.options={}}},ec=["1Row","3-D","3D Diagonal","3D-ASCII","3x5","4Max","5 Line Oblique","AMC 3 Line","AMC 3 Liv1","AMC AAA01","AMC Neko","AMC Razor","AMC Razor2","AMC Slash","AMC Slider","AMC Thin","AMC Tubes","AMC Untitled","ANSI Compact","ANSI Regular","ANSI Shadow","ASCII 12","ASCII 9","ASCII New Roman","Acrobatic","Alligator","Alligator2","Alpha","Alphabet","Arrows","Avatar","B1FF","Babyface Lame","Babyface Leet","Banner","Banner3-D","Banner3","Banner4","Barbwire","Basic","Bear","Bell","Benjamin","Big ASCII 12","Big ASCII 9","Big Chief","Big Money-ne","Big Money-nw","Big Money-se","Big Money-sw","Big Mono 12","Big Mono 9","Big","Bigfig","Binary","Block","Blocks","Bloody","BlurVision ASCII","Bolger","Braced","Bright","Broadway KB","Broadway","Bubble","Bulbhead","Caligraphy","Caligraphy2","Calvin S","Cards","Catwalk","Chiseled","Chunky","Circle","Classy","Coder Mini","Coinstak","Cola","Colossal","Computer","Contessa","Contrast","Cosmike","Cosmike2","Crawford","Crawford2","Crazy","Cricket","Cursive","Cyberlarge","Cybermedium","Cybersmall","Cygnet","DANC4","DOS Rebel","DWhistled","Dancing Font","Decimal","Def Leppard","Delta Corps Priest 1","DiamFont","Diamond","Diet Cola","Digital","Doh","Doom","Dot Matrix","Double Shorts","Double","Dr Pepper","Efti Chess","Efti Font","Efti Italic","Efti Piti","Efti Robot","Efti Wall","Efti Water","Electronic","Elite","Emboss 2","Emboss","Epic","Fender","Filter","Fire Font-k","Fire Font-s","Flipped","Flower Power","Font Font","Four Tops","Fraktur","Fun Face","Fun Faces","Future","Fuzzy","Georgi16","Georgia11","Ghost","Ghoulish","Glenyn","Goofy","Gothic","Graceful","Gradient","Graffiti","Greek","Heart Left","Heart Right","Henry 3D","Hex","Hieroglyphs","Hollywood","Horizontal Left","Horizontal Right","ICL-1900","Impossible","Invita","Isometric1","Isometric2","Isometric3","Isometric4","Italic","Ivrit","JS Block Letters","JS Bracket Letters","JS Capital Curves","JS Cursive","JS Stick Letters","Jacky","Jazmine","Jerusalem","Katakana","Kban","Keyboard","Knob","Konto Slant","Konto","LCD","Larry 3D 2","Larry 3D","Lean","Letter","Letters","Lil Devil","Line Blocks","Linux","Lockergnome","Madrid","Marquee","Maxfour","Merlin1","Merlin2","Mike","Mini","Mirror","Mnemonic","Modular","Mono 12","Mono 9","Morse","Morse2","Moscow","Mshebrew210","Muzzle","NScript","NT Greek","NV Script","Nancyj-Fancy","Nancyj-Improved","Nancyj-Underlined","Nancyj","Nipples","O8","OS2","Octal","Ogre","Old Banner","Pagga","Patorjk's Cheese","Patorjk-HeX","Pawp","Peaks Slant","Peaks","Pebbles","Pepper","Poison","Puffy","Puzzle","Pyramid","Rammstein","Rebel","Rectangles","Red Phoenix","Relief","Relief2","Reverse","Roman","Rot13","Rotated","Rounded","Rowan Cap","Rozzo","RubiFont","Runic","Runyc","S Blood","SL Script","Santa Clara","Script","Serifcap","Shaded Blocky","Shadow","Shimrod","Short","Slant Relief","Slant","Slide","Small ASCII 12","Small ASCII 9","Small Block","Small Braille","Small Caps","Small Isometric1","Small Keyboard","Small Mono 12","Small Mono 9","Small Poison","Small Script","Small Shadow","Small Slant","Small Tengwar","Small","Soft","Speed","Spliff","Stacey","Stampate","Stampatello","Standard","Star Strips","Star Wars","Stellar","Stforek","Stick Letters","Stop","Straight","Stronger Than All","Sub-Zero","Swamp Land","Swan","Sweet","THIS","Tanja","Tengwar","Term","Terrace","Test1","The Edge","Thick","Thin","Thorned","Three Point","Ticks Slant","Ticks","Tiles","Tinker-Toy","Tmplr","Tombstone","Train","Trek","Tsalagi","Tubular","Twisted","Two Point","USA Flag","Univers","Upside Down Text","Varsity","Wavescape","Wavy","Weird","Wet Letter","Whimsy","WideTerm","Wow","miniwi"],hg={"ANSI-Compact":"ANSI Compact"},Kr=t=>hg[t]?hg[t]:t;function zA(t){return/[.*+?^${}()|[\]\\]/.test(t)?"\\"+t:t}var dg=(()=>{let{FULL_WIDTH:t=0,FITTING:e,SMUSHING:r,CONTROLLED_SMUSHING:n}=HA,i={},s={font:"Standard",fontPath:"./fonts",fetchFontIfMissing:!0};function a(O,P,F){let R=zA(O.trim().slice(-1))||"@",g=P===F-1?new RegExp(R+R+"?\\s*$"):new RegExp(R+"\\s*$");return O.replace(g,"")}function l(O=-1,P=null){let F={},R,g=[[16384,"vLayout",r],[8192,"vLayout",e],[4096,"vRule5",!0],[2048,"vRule4",!0],[1024,"vRule3",!0],[512,"vRule2",!0],[256,"vRule1",!0],[128,"hLayout",r],[64,"hLayout",e],[32,"hRule6",!0],[16,"hRule5",!0],[8,"hRule4",!0],[4,"hRule3",!0],[2,"hRule2",!0],[1,"hRule1",!0]];R=P!==null?P:O;for(let[E,b,v]of g)R>=E?(R-=E,F[b]===void 0&&(F[b]=v)):b!=="vLayout"&&b!=="hLayout"&&(F[b]=!1);return typeof F.hLayout>"u"?O===0?F.hLayout=e:O===-1?F.hLayout=t:F.hRule1||F.hRule2||F.hRule3||F.hRule4||F.hRule5||F.hRule6?F.hLayout=n:F.hLayout=r:F.hLayout===r&&(F.hRule1||F.hRule2||F.hRule3||F.hRule4||F.hRule5||F.hRule6)&&(F.hLayout=n),typeof F.vLayout>"u"?F.vRule1||F.vRule2||F.vRule3||F.vRule4||F.vRule5?F.vLayout=n:F.vLayout=t:F.vLayout===r&&(F.vRule1||F.vRule2||F.vRule3||F.vRule4||F.vRule5)&&(F.vLayout=n),F}function f(O,P,F=""){return O===P&&O!==F?O:!1}function c(O,P){let F="|/\\[]{}()<>";if(O==="_"){if(F.indexOf(P)!==-1)return P}else if(P==="_"&&F.indexOf(O)!==-1)return O;return!1}function h(O,P){let F="| /\\ [] {} () <>",R=F.indexOf(O),g=F.indexOf(P);if(R!==-1&&g!==-1&&R!==g&&Math.abs(R-g)!==1){let E=Math.max(R,g),b=E+1;return F.substring(E,b)}return!1}function p(O,P){let F="[] {} ()",R=F.indexOf(O),g=F.indexOf(P);return R!==-1&&g!==-1&&Math.abs(R-g)<=1?"|":!1}function y(O,P){return{"/\\":"|","\\/":"Y","><":"X"}[O+P]||!1}function m(O,P,F=""){return O===F&&P===F?F:!1}function D(O,P){return O===P?O:!1}function _(O,P){return c(O,P)}function A(O,P){return h(O,P)}function x(O,P){return O==="-"&&P==="_"||O==="_"&&P==="-"?"=":!1}function M(O,P){return O==="|"&&P==="|"?"|":!1}function q(O,P,F){return P===" "||P===""||P===F&&O!==" "?O:P}function L(O,P,F){if(F.fittingRules&&F.fittingRules.vLayout===t)return"invalid";let R,g=Math.min(O.length,P.length),E,b,v=!1,T;if(g===0)return"invalid";for(R=0;R<g;R++)if(E=O.substring(R,R+1),b=P.substring(R,R+1),E!==" "&&b!==" "){if(F.fittingRules&&F.fittingRules.vLayout===e)return"invalid";if(F.fittingRules&&F.fittingRules.vLayout===r)return"end";if(M(E,b)){v=v||!1;continue}if(T=!1,T=F.fittingRules&&F.fittingRules.vRule1?D(E,b):T,T=!T&&F.fittingRules&&F.fittingRules.vRule2?_(E,b):T,T=!T&&F.fittingRules&&F.fittingRules.vRule3?A(E,b):T,T=!T&&F.fittingRules&&F.fittingRules.vRule4?x(E,b):T,v=!0,!T)return"invalid"}return v?"end":"valid"}function V(O,P,F){let R=O.length,g=O.length,E,b,v,T=1,$,U,H;for(;T<=R;){for(E=O.slice(Math.max(0,g-T),g),b=P.slice(0,Math.min(R,T)),v=b.length,H="",$=0;$<v;$++)if(U=L(E[$],b[$],F),U==="end")H=U;else if(U==="invalid"){H=U;break}else H===""&&(H="valid");if(H==="invalid"){T--;break}if(H==="end")break;H==="valid"&&T++}return Math.min(R,T)}function se(O,P,F){let R,g=Math.min(O.length,P.length),E,b,v="",T,$=F.fittingRules||{};for(R=0;R<g;R++)E=O.substring(R,R+1),b=P.substring(R,R+1),E!==" "&&b!==" "?$.vLayout===e||$.vLayout===r?v+=q(E,b):(T=!1,T=$.vRule5?M(E,b):T,T=!T&&$.vRule1?D(E,b):T,T=!T&&$.vRule2?_(E,b):T,T=!T&&$.vRule3?A(E,b):T,T=!T&&$.vRule4?x(E,b):T,v+=T):v+=q(E,b);return v}function le(O,P,F,R){let g=O.length,E=P.length,b=O.slice(0,Math.max(0,g-F)),v=O.slice(Math.max(0,g-F),g),T=P.slice(0,Math.min(F,E)),$,U,H,J=[],re;for(U=v.length,$=0;$<U;$++)$>=E?H=v[$]:H=se(v[$],T[$],R),J.push(H);return re=P.slice(Math.min(F,E),E),[...b,...J,...re]}function _e(O,P){let F=" ".repeat(P);return O.map(R=>R+F)}function N(O,P,F){let R=O[0].length,g=P[0].length,E;return R>g?P=_e(P,R-g):g>R&&(O=_e(O,g-R)),E=V(O,P,F),le(O,P,E,F)}function j(O,P,F){let R=F.fittingRules||{};if(R.hLayout===t)return 0;let g,E=O.length,b=P.length,v=E,T=1,$=!1,U,H,J,re;if(E===0)return 0;e:for(;T<=v;){let qe=E-T;for(U=O.substring(qe,qe+T),H=P.substring(0,Math.min(T,b)),g=0;g<Math.min(T,b);g++)if(J=U.substring(g,g+1),re=H.substring(g,g+1),J!==" "&&re!==" "){if(R.hLayout===e){T=T-1;break e}else if(R.hLayout===r){(J===F.hardBlank||re===F.hardBlank)&&(T=T-1);break e}else if($=!0,!(R.hRule1&&f(J,re,F.hardBlank)||R.hRule2&&c(J,re)||R.hRule3&&h(J,re)||R.hRule4&&p(J,re)||R.hRule5&&y(J,re)||R.hRule6&&m(J,re,F.hardBlank))){T=T-1;break e}}if($)break;T++}return Math.min(v,T)}function z(O,P,F,R){let g,E,b=[],v,T,$,U,H,J,re,qe,Ee=R.fittingRules||{};if(typeof R.height!="number")throw new Error("height is not defined.");for(g=0;g<R.height;g++){re=O[g],qe=P[g],H=re.length,J=qe.length,v=H-F,T=re.slice(0,Math.max(0,v)),$="";let Qt=Math.max(0,H-F),ft=re.substring(Qt,Qt+F),et=qe.substring(0,Math.min(F,J));for(E=0;E<F;E++){let Me=E<H?ft.substring(E,E+1):" ",je=E<J?et.substring(E,E+1):" ";if(Me!==" "&&je!==" ")if(Ee.hLayout===e||Ee.hLayout===r)$+=q(Me,je,R.hardBlank);else{let Hu=Ee.hRule1&&f(Me,je,R.hardBlank)||Ee.hRule2&&c(Me,je)||Ee.hRule3&&h(Me,je)||Ee.hRule4&&p(Me,je)||Ee.hRule5&&y(Me,je)||Ee.hRule6&&m(Me,je,R.hardBlank)||q(Me,je,R.hardBlank);$+=Hu}else $+=q(Me,je,R.hardBlank)}F>=J?U="":U=qe.substring(F,F+Math.max(0,J-F)),b[g]=T+$+U}return b}function ce(O){return new Array(O).fill("")}let W=function(O){return Math.max(...O.map(P=>P.length))};function ie(O,P,F){return O.reduce(function(R,g){return z(R,g.fig,g.overlap||0,F)},ce(P))}function X(O,P,F){for(let R=O.length-1;R>0;R--){let g=ie(O.slice(0,R),P,F);if(W(g)<=F.width)return{outputFigText:g,chars:O.slice(R)}}return{outputFigText:ce(P),chars:O}}function ae(O,P,F){let R,g,E=0,b,v,T,$=F.height,U=[],H,J={chars:[],overlap:E},re=[],qe,Ee,Qt,ft,et;if(typeof $!="number")throw new Error("height is not defined.");v=ce($);let Me=F.fittingRules||{};for(F.printDirection===1&&(O=O.split("").reverse().join("")),T=O.length,R=0;R<T;R++)if(qe=O.substring(R,R+1),Ee=qe.match(/\s/),g=P[qe.charCodeAt(0)],ft=null,g){if(Me.hLayout!==t){for(E=1e4,b=0;b<$;b++)E=Math.min(E,j(v[b],g[b],F));E=E===1e4?0:E}if(F.width>0&&(F.whitespaceBreak?(Qt=ie(J.chars.concat([{fig:g,overlap:E}]),$,F),ft=ie(re.concat([{fig:Qt,overlap:J.overlap}]),$,F),H=W(ft)):(ft=z(v,g,E,F),H=W(ft)),H>=F.width&&R>0&&(F.whitespaceBreak?(v=ie(re.slice(0,-1),$,F),re.length>1&&(U.push(v),v=ce($)),re=[]):(U.push(v),v=ce($)))),F.width>0&&F.whitespaceBreak&&((!Ee||R===T-1)&&J.chars.push({fig:g,overlap:E}),Ee||R===T-1)){for(et=null;ft=ie(J.chars,$,F),H=W(ft),H>=F.width;)et=X(J.chars,$,F),J={chars:et.chars},U.push(et.outputFigText);H>0&&(et?re.push({fig:ft,overlap:1}):re.push({fig:ft,overlap:J.overlap})),Ee&&(re.push({fig:g,overlap:E}),v=ce($)),R===T-1&&(v=ie(re,$,F)),J={chars:[],overlap:E};continue}v=z(v,g,E,F)}return W(v)>0&&U.push(v),F.showHardBlanks||U.forEach(function(je){for(T=je.length,b=0;b<T;b++)je[b]=je[b].replace(new RegExp("\\"+F.hardBlank,"g")," ")}),O===""&&U.length===0&&U.push(new Array($).fill("")),U}let ee=function(O,P){let F,R=P.fittingRules||{};if(O==="default")F={hLayout:R.hLayout,hRule1:R.hRule1,hRule2:R.hRule2,hRule3:R.hRule3,hRule4:R.hRule4,hRule5:R.hRule5,hRule6:R.hRule6};else if(O==="full")F={hLayout:t,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1};else if(O==="fitted")F={hLayout:e,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1};else if(O==="controlled smushing")F={hLayout:n,hRule1:!0,hRule2:!0,hRule3:!0,hRule4:!0,hRule5:!0,hRule6:!0};else if(O==="universal smushing")F={hLayout:r,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1};else return;return F},oe=function(O,P){let F={},R=P.fittingRules||{};if(O==="default")F={vLayout:R.vLayout,vRule1:R.vRule1,vRule2:R.vRule2,vRule3:R.vRule3,vRule4:R.vRule4,vRule5:R.vRule5};else if(O==="full")F={vLayout:t,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1};else if(O==="fitted")F={vLayout:e,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1};else if(O==="controlled smushing")F={vLayout:n,vRule1:!0,vRule2:!0,vRule3:!0,vRule4:!0,vRule5:!0};else if(O==="universal smushing")F={vLayout:r,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1};else return;return F},Z=function(O,P,F){F=F.replace(/\r\n/g,`
223
- `).replace(/\r/g,`
224
- `);let R=Kr(O),g=F.split(`
225
- `),E=[],b,v,T;for(v=g.length,b=0;b<v;b++)E=E.concat(ae(g[b],i[R],P));for(v=E.length,T=E[0],b=1;b<v;b++)T=N(T,E[b],P);return T?T.join(`
226
- `):""};function Jt(O,P){let F;if(typeof structuredClone<"u"?F=structuredClone(O):F=JSON.parse(JSON.stringify(O)),F.showHardBlanks=P.showHardBlanks||!1,F.width=P.width||-1,F.whitespaceBreak=P.whitespaceBreak||!1,P.horizontalLayout){let R=ee(P.horizontalLayout,O);R&&Object.assign(F.fittingRules,R)}if(P.verticalLayout){let R=oe(P.verticalLayout,O);R&&Object.assign(F.fittingRules,R)}return F.printDirection=P.printDirection!==null&&P.printDirection!==void 0?P.printDirection:O.printDirection,F}let Se=async function(O,P,F){return Se.text(O,P,F)};return Se.text=async function(O,P,F){O=O+"";let R,g;typeof P=="function"?(g=P,R={font:s.font}):typeof P=="string"?(R={font:P},g=F):P?(R=P,g=F):(R={font:s.font},g=F);let E=R.font||s.font;try{let b=await Se.loadFont(E),v=b?Z(E,Jt(b,R),O):"";return g&&g(null,v),v}catch(b){let v=b instanceof Error?b:new Error(String(b));if(g)return g(v),"";throw v}},Se.textSync=function(O,P){O=O+"",typeof P=="string"?P={font:P}:P=P||{};let F=P.font||s.font,R=Jt(Se.loadFontSync(F),P);return Z(F,R,O)},Se.metadata=async function(O,P){O=O+"";try{let F=await Se.loadFont(O);if(!F)throw new Error("Error loading font.");let R=Kr(O),g=i[R]||{},E=[F,g.comment||""];return P&&P(null,F,g.comment),E}catch(F){let R=F instanceof Error?F:new Error(String(F));if(P)return P(R),null;throw R}},Se.defaults=function(O){return O&&typeof O=="object"&&Object.assign(s,O),typeof structuredClone<"u"?structuredClone(s):JSON.parse(JSON.stringify(s))},Se.parseFont=function(O,P,F=!0){if(i[O]&&!F)return i[O].options;P=P.replace(/\r\n/g,`
227
- `).replace(/\r/g,`
228
- `);let R=new tc,g=P.split(`
229
- `),E=g.shift();if(!E)throw new Error("Invalid font file: missing header");let b=E.split(" "),v={hardBlank:b[0].substring(5,6),height:parseInt(b[1],10),baseline:parseInt(b[2],10),maxLength:parseInt(b[3],10),oldLayout:parseInt(b[4],10),numCommentLines:parseInt(b[5],10),printDirection:b[6]?parseInt(b[6],10):0,fullLayout:b[7]?parseInt(b[7],10):null,codeTagCount:b[8]?parseInt(b[8],10):null};if((v.hardBlank||"").length!==1||[v.height,v.baseline,v.maxLength,v.oldLayout,v.numCommentLines].some(U=>U==null||isNaN(U)))throw new Error("FIGlet header contains invalid values.");if(v.height==null||v.numCommentLines==null)throw new Error("FIGlet header contains invalid values.");v.fittingRules=l(v.oldLayout,v.fullLayout),R.options=v;let $=[];for(let U=32;U<=126;U++)$.push(U);if($.push(196,214,220,228,246,252,223),g.length<v.numCommentLines+v.height*$.length)throw new Error(`FIGlet file is missing data. Line length: ${g.length}. Comment lines: ${v.numCommentLines}. Height: ${v.height}. Num chars: ${$.length}.`);for(R.comment=g.splice(0,v.numCommentLines).join(`
230
- `),R.numChars=0;g.length>0&&R.numChars<$.length;){let U=$[R.numChars];R[U]=g.splice(0,v.height);for(let H=0;H<v.height;H++)typeof R[U][H]>"u"?R[U][H]="":R[U][H]=a(R[U][H],H,v.height);R.numChars++}for(;g.length>0;){let U=g.shift();if(!U||U.trim()==="")break;let H=U.split(" ")[0],J;if(/^-?0[xX][0-9a-fA-F]+$/.test(H))J=parseInt(H,16);else if(/^-?0[0-7]+$/.test(H))J=parseInt(H,8);else if(/^-?[0-9]+$/.test(H))J=parseInt(H,10);else throw new Error(`Error parsing data. Invalid data: ${H}`);if(J===-1||J<-2147483648||J>2147483647){let re=J===-1?"The char code -1 is not permitted.":`The char code cannot be ${J<-2147483648?"less than -2147483648":"greater than 2147483647"}.`;throw new Error(`Error parsing data. ${re}`)}R[J]=g.splice(0,v.height);for(let re=0;re<v.height;re++)typeof R[J][re]>"u"?R[J][re]="":R[J][re]=a(R[J][re],re,v.height);R.numChars++}return i[O]=R,v},Se.loadedFonts=()=>Object.keys(i),Se.clearLoadedFonts=()=>{Object.keys(i).forEach(O=>{delete i[O]})},Se.loadFont=async function(O,P){let F=Kr(O);if(i[F]){let R=i[F].options;return P&&P(null,R),Promise.resolve(R)}try{if(!s.fetchFontIfMissing)throw new Error(`Font is not loaded: ${F}`);let R=await fetch(`${s.fontPath}/${F}.flf`);if(!R.ok)throw new Error(`Network response was not ok: ${R.status}`);let g=await R.text(),E=Se.parseFont(F,g);return P&&P(null,E),E}catch(R){let g=R instanceof Error?R:new Error(String(R));if(P)return P(g),null;throw g}},Se.loadFontSync=function(O){let P=Kr(O);if(i[P])return i[P].options;throw new Error("Synchronous font loading is not implemented for the browser, it will only work for fonts already loaded.")},Se.preloadFonts=async function(O,P){try{for(let F of O){let R=Kr(F),g=await fetch(`${s.fontPath}/${R}.flf`);if(!g.ok)throw new Error(`Failed to preload fonts. Error fetching font: ${R}, status code: ${g.statusText}`);let E=await g.text();Se.parseFont(R,E)}P&&P()}catch(F){let R=F instanceof Error?F:new Error(String(F));if(P){P(R);return}throw F}},Se.fonts=function(O){return new Promise(function(P,F){P(ec),O&&O(null,ec)})},Se.fontsSync=function(){return ec},Se.figFonts=i,Se})();import{fileURLToPath as GA}from"url";var VA=GA(import.meta.url),YA=Di.dirname(VA),KA=Di.join(YA,"/../fonts/"),Ue=dg;Ue.defaults({fontPath:KA});Ue.loadFont=function(t,e){let r=Kr(t);return new Promise((n,i)=>{if(Ue.figFonts[r]){e&&e(null,Ue.figFonts[r].options),n(Ue.figFonts[r].options);return}Xr.readFile(Di.join(Ue.defaults().fontPath,r+".flf"),{encoding:"utf-8"},(s,a)=>{if(s){e&&e(s),i(s);return}a=a+"";try{let l=Ue.parseFont(r,a);e&&e(null,l),n(l)}catch(l){let f=l instanceof Error?l:new Error(String(l));e&&e(f),i(f)}})})};Ue.loadFontSync=function(t){let e=Kr(t);if(Ue.figFonts[e])return Ue.figFonts[e].options;let r=Xr.readFileSync(Di.join(Ue.defaults().fontPath,e+".flf"),{encoding:"utf-8"})+"";return Ue.parseFont(e,r)};Ue.fonts=function(t){return new Promise((e,r)=>{let n=[];Xr.readdir(Ue.defaults().fontPath,(i,s)=>{if(i){t&&t(i),r(i);return}s.forEach(a=>{/\.flf$/.test(a)&&n.push(a.replace(/\.flf$/,""))}),t&&t(null,n),e(n)})})};Ue.fontsSync=function(){let t=[];return Xr.readdirSync(Ue.defaults().fontPath).forEach(e=>{/\.flf$/.test(e)&&t.push(e.replace(/\.flf$/,""))}),t};import Nn from"node:process";import{spawn as qB}from"node:child_process";import{fileURLToPath as jB}from"node:url";import kE from"node:path";import{format as Pf}from"node:util";var ms=We(_g(),1);import ps from"node:path";import bx from"node:os";import ox from"os";import Zo from"path";var Qr=ox.homedir(),{env:Cn}=process,Sg=Cn.XDG_DATA_HOME||(Qr?Zo.join(Qr,".local","share"):void 0),bi=Cn.XDG_CONFIG_HOME||(Qr?Zo.join(Qr,".config"):void 0),fk=Cn.XDG_STATE_HOME||(Qr?Zo.join(Qr,".local","state"):void 0),hk=Cn.XDG_CACHE_HOME||(Qr?Zo.join(Qr,".cache"):void 0),dk=Cn.XDG_RUNTIME_DIR||void 0,ax=(Cn.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");Sg&&ax.unshift(Sg);var ux=(Cn.XDG_CONFIG_DIRS||"/etc/xdg").split(":");bi&&ux.unshift(bi);import Dx from"node:path";import be from"node:fs";import{promisify as rt}from"node:util";var lx=(t,e)=>{let{onError:r}=e;return function(...i){return t.apply(void 0,i).catch(r)}},er=lx;var cx=(t,e)=>{let{onError:r}=e;return function(...i){try{return t.apply(void 0,i)}catch(s){return r(s)}}},Ut=cx;var hx=(t,e)=>{let{isRetriable:r}=e;return function(i){let{timeout:s}=i,a=i.interval??250,l=Date.now()+s;return function f(...c){return t.apply(void 0,c).catch(h=>{if(!r(h)||Date.now()>=l)throw h;let p=Math.round(a*Math.random());return p>0?new Promise(m=>setTimeout(m,p)).then(()=>f.apply(void 0,c)):f.apply(void 0,c)})}}},tr=hx;var dx=(t,e)=>{let{isRetriable:r}=e;return function(i){let{timeout:s}=i,a=Date.now()+s;return function(...f){for(;;)try{return t.apply(void 0,f)}catch(c){if(!r(c)||Date.now()>=a)throw c;continue}}}},rr=dx;import Ag from"node:process";var fs={isChangeErrorOk:t=>{if(!fs.isNodeError(t))return!1;let{code:e}=t;return e==="ENOSYS"||!vg&&(e==="EINVAL"||e==="EPERM")},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!fs.isNodeError(t))return!1;let{code:e}=t;return e==="EMFILE"||e==="ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:t=>{if(!fs.isNodeError(t))throw t;if(!fs.isChangeErrorOk(t))throw t}},oc=fs;var hs={onError:oc.onChangeError},dt={onError:()=>{}},vg=Ag.getuid?!Ag.getuid():!1,Xe={isRetriable:oc.isRetriableError};var px={attempt:{chmod:er(rt(be.chmod),hs),chown:er(rt(be.chown),hs),close:er(rt(be.close),dt),fsync:er(rt(be.fsync),dt),mkdir:er(rt(be.mkdir),dt),realpath:er(rt(be.realpath),dt),stat:er(rt(be.stat),dt),unlink:er(rt(be.unlink),dt),chmodSync:Ut(be.chmodSync,hs),chownSync:Ut(be.chownSync,hs),closeSync:Ut(be.closeSync,dt),existsSync:Ut(be.existsSync,dt),fsyncSync:Ut(be.fsync,dt),mkdirSync:Ut(be.mkdirSync,dt),realpathSync:Ut(be.realpathSync,dt),statSync:Ut(be.statSync,dt),unlinkSync:Ut(be.unlinkSync,dt)},retry:{close:tr(rt(be.close),Xe),fsync:tr(rt(be.fsync),Xe),open:tr(rt(be.open),Xe),readFile:tr(rt(be.readFile),Xe),rename:tr(rt(be.rename),Xe),stat:tr(rt(be.stat),Xe),write:tr(rt(be.write),Xe),writeFile:tr(rt(be.writeFile),Xe),closeSync:rr(be.closeSync,Xe),fsyncSync:rr(be.fsyncSync,Xe),openSync:rr(be.openSync,Xe),readFileSync:rr(be.readFileSync,Xe),renameSync:rr(be.renameSync,Xe),statSync:rr(be.statSync,Xe),writeSync:rr(be.writeSync,Xe),writeFileSync:rr(be.writeFileSync,Xe)}},Ve=px;import _n from"node:process";var xg="utf8",ac=438,Rg=511;var Og={},Tg=_n.geteuid?_n.geteuid():-1,Bg=_n.getegid?_n.getegid():-1;var Pg=1e3,Ig=!!_n.getuid,Mk=_n.getuid?!_n.getuid():!1,uc=128;var $g=t=>t instanceof Error&&"code"in t;var lc=t=>typeof t=="string",ea=t=>t===void 0;import gx from"node:path";import Ei from"node:process";import kg from"node:process";var Lg=kg.platform==="linux",ta=kg.platform==="win32";var cc=["SIGHUP","SIGINT","SIGTERM"];ta||cc.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");Lg&&cc.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Mg=cc;var fc=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(let r of this.callbacks)r();e&&(ta&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Ei.kill(Ei.pid,"SIGTERM"):Ei.kill(Ei.pid,e))}},this.hook=()=>{Ei.once("exit",()=>this.exit());for(let e of Mg)try{Ei.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}},Ng=new fc;var mx=Ng.register,qg=mx;var Et={store:{},create:t=>{let e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${t}${i}`},get:(t,e,r=!0)=>{let n=Et.truncate(e(t));return n in Et.store?Et.get(t,e,r):(Et.store[n]=r,[n,()=>delete Et.store[n]])},purge:t=>{Et.store[t]&&(delete Et.store[t],Ve.attempt.unlink(t))},purgeSync:t=>{Et.store[t]&&(delete Et.store[t],Ve.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(let t in Et.store)Et.purgeSync(t)},truncate:t=>{let e=gx.basename(t);if(e.length<=uc)return t;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;let n=e.length-uc;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};qg(Et.purgeSyncAll);var ds=Et;function ra(t,e,r=Og){if(lc(r))return ra(t,e,{encoding:r});let i={timeout:r.timeout??Pg},s=null,a=null,l=null;try{let f=Ve.attempt.realpathSync(t),c=!!f;t=f||t,[a,s]=ds.get(t,r.tmpCreate||ds.create,r.tmpPurge!==!1);let h=Ig&&ea(r.chown),p=ea(r.mode);if(c&&(h||p)){let y=Ve.attempt.statSync(t);y&&(r={...r},h&&(r.chown={uid:y.uid,gid:y.gid}),p&&(r.mode=y.mode))}if(!c){let y=Dx.dirname(t);Ve.attempt.mkdirSync(y,{mode:Rg,recursive:!0})}l=Ve.retry.openSync(i)(a,"w",r.mode||ac),r.tmpCreated&&r.tmpCreated(a),lc(e)?Ve.retry.writeSync(i)(l,e,0,r.encoding||xg):ea(e)||Ve.retry.writeSync(i)(l,e,0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?Ve.retry.fsyncSync(i)(l):Ve.attempt.fsync(l)),Ve.retry.closeSync(i)(l),l=null,r.chown&&(r.chown.uid!==Tg||r.chown.gid!==Bg)&&Ve.attempt.chownSync(a,r.chown.uid,r.chown.gid),r.mode&&r.mode!==ac&&Ve.attempt.chmodSync(a,r.mode);try{Ve.retry.renameSync(i)(a,t)}catch(y){if(!$g(y)||y.code!=="ENAMETOOLONG")throw y;Ve.retry.renameSync(i)(a,ds.truncate(t))}s(),a=null}finally{l&&Ve.attempt.closeSync(l),a&&ds.purge(a)}}var Sn=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var hc=new Set(["__proto__","prototype","constructor"]),yx=new Set("0123456789");function na(t){let e=[],r="",n="start",i=!1;for(let s of t)switch(s){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=s),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=s;break}if(hc.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=s;break}if(n==="property"){if(hc.has(r))return[];e.push(r),r=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!yx.has(s))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=s}}switch(i&&(r+="\\"),n){case"property":{if(hc.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function dc(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function jg(t,e){if(dc(t,e))throw new Error("Cannot use string index")}function Wg(t,e,r){if(!Sn(t)||typeof e!="string")return r===void 0?t:r;let n=na(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let s=n[i];if(dc(t,s)?t=i===n.length-1?void 0:null:t=t[s],t==null){if(i!==n.length-1)return r;break}}return t===void 0?r:t}function pc(t,e,r){if(!Sn(t)||typeof e!="string")return t;let n=t,i=na(e);for(let s=0;s<i.length;s++){let a=i[s];jg(t,a),s===i.length-1?t[a]=r:Sn(t[a])||(t[a]=typeof i[s+1]=="number"?[]:{}),t=t[a]}return n}function Ug(t,e){if(!Sn(t)||typeof e!="string")return!1;let r=na(e);for(let n=0;n<r.length;n++){let i=r[n];if(jg(t,i),n===r.length-1)return delete t[i],!0;if(t=t[i],!Sn(t))return!1}}function Hg(t,e){if(!Sn(t)||typeof e!="string")return!1;let r=na(e);if(r.length===0)return!1;for(let n of r){if(!Sn(t)||!(n in t)||dc(t,n))return!1;t=t[n]}return!0}function Ex(t,e){let r=e?ps.join(t,"config.json"):ps.join("configstore",`${t}.json`),n=bi??ms.default.mkdtempSync(ms.default.realpathSync(bx.tmpdir())+ps.sep);return ps.join(n,r)}var wx="You don't have access to this file.",Fx={mode:448,recursive:!0},zg={mode:384};function Gg(t){throw t.code==="EACCES"&&(t.message=`${t.message}
231
- ${wx}
232
- `),t}var gs=class{constructor(e,r,n={}){this._path=n.configPath??Ex(e,n.globalConfigPath),this._clearInvalidConfig=n.clearInvalidConfig??!0,r&&(this.all={...r,...this.all})}get all(){try{return JSON.parse(ms.default.readFileSync(this._path,"utf8"))}catch(e){if(e.code==="ENOENT")return{};if(e.name==="SyntaxError"){if(this._clearInvalidConfig)return ra(this._path,"",zg),{};throw e}return Gg(e),{}}}set all(e){try{ms.default.mkdirSync(ps.dirname(this._path),Fx),ra(this._path,JSON.stringify(e,void 0," "),zg)}catch(r){Gg(r)}}get size(){return Object.keys(this.all||{}).length}get(e){return Wg(this.all,e)}set(e,r){let n=this.all;if(typeof e=="object"&&arguments.length===1)for(let i of Object.keys(e))pc(n,i,e[i]);else pc(n,e,r);this.all=n}has(e){return Hg(this.all,e)}delete(e){let r=this.all;Ug(r,e),this.all=r}clear(){this.all={}}get path(){return this._path}};nr();var LE=We(_c(),1),ME=We(_i(),1);var An=class extends Error{response;request;options;constructor(e,r,n){let i=e.status||e.status===0?e.status:"",s=e.statusText??"",a=`${i} ${s}`.trim(),l=a?`status code ${a}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}};var Si=class extends Error{name="NonError";value;constructor(e){let r="Non-error value was thrown";try{typeof e=="string"?r=e:e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"&&(r=e.message)}catch{}super(r),this.value=e}};var vi=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){let r=e?.cause?e.cause instanceof Error?e.cause:new Si(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",r?{cause:r}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}};var Sc=(()=>{let t=!1,e=!1,r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return t&&!e})(),CD=typeof globalThis.AbortController=="function",fa=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",_D=typeof globalThis.ReadableStream=="function",SD=typeof globalThis.FormData=="function",ha=["get","post","put","patch","head","delete"],lR=()=>{};lR();var vD={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},da=2147483647,AD=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,pa=Symbol("stop"),ws=class{options;constructor(e){this.options=e}},xD=t=>new ws(t),RD={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},OD={next:!0},TD={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0};var cR=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(let[r,n]of t)e+=AD,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length,e+=typeof n=="string"?new TextEncoder().encode(n).length:n.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{let e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},BD=(t,e,r)=>{let n,i=0;return t.pipeThrough(new TransformStream({transform(s,a){if(a.enqueue(s),n){i+=n.byteLength;let l=e===0?0:i/e;l>=1&&(l=1-Number.EPSILON),r?.({percent:l,totalBytes:Math.max(e,i),transferredBytes:i},n)}n=s},flush(){n&&(i+=n.byteLength,r?.({percent:1,totalBytes:Math.max(e,i),transferredBytes:i},n))}}))},PD=(t,e)=>{if(!t.body)return t;if(t.status===204)return new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers});let r=Math.max(0,Number(t.headers.get("content-length"))||0);return new Response(BD(t.body,r,e),{status:t.status,statusText:t.statusText,headers:t.headers})},ID=(t,e,r)=>{if(!t.body)return t;let n=cR(r??t.body);return new Request(t,{duplex:"half",body:BD(t.body,n,e)})};var Zr=t=>t!==null&&typeof t=="object";var Fs=(...t)=>{for(let e of t)if((!Zr(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return xc({},...t)},vc=(t={},e={})=>{let r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(let[s,a]of i.entries())n&&a==="undefined"||a===void 0?r.delete(s):r.set(s,a);return r};function ma(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:xc(t[r]??[],e[r]??[])}var Ac=(t={},e={})=>({beforeRequest:ma(t,e,"beforeRequest"),beforeRetry:ma(t,e,"beforeRetry"),afterResponse:ma(t,e,"afterResponse"),beforeError:ma(t,e,"beforeError")}),fR=(t,e)=>{let r=new URLSearchParams;for(let n of[t,e])if(n!==void 0)if(n instanceof URLSearchParams)for(let[i,s]of n.entries())r.append(i,s);else if(Array.isArray(n))for(let i of n){if(!Array.isArray(i)||i.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(i[0]),String(i[1]))}else if(Zr(n))for(let[i,s]of Object.entries(n))s!==void 0&&r.append(i,String(s));else{let i=new URLSearchParams(n);for(let[s,a]of i.entries())r.append(s,a)}return r},xc=(...t)=>{let e={},r={},n={},i,s=[];for(let a of t)if(Array.isArray(a))Array.isArray(e)||(e=[]),e=[...e,...a];else if(Zr(a)){for(let[l,f]of Object.entries(a)){if(l==="signal"&&f instanceof globalThis.AbortSignal){s.push(f);continue}if(l==="context"){if(f!=null&&(!Zr(f)||Array.isArray(f)))throw new TypeError("The `context` option must be an object");e={...e,context:f==null?{}:{...e.context,...f}};continue}if(l==="searchParams"){f==null?i=void 0:i=i===void 0?f:fR(i,f);continue}Zr(f)&&l in e&&(f=xc(e[l],f)),e={...e,[l]:f}}Zr(a.hooks)&&(n=Ac(n,a.hooks),e.hooks=n),Zr(a.headers)&&(r=vc(r,a.headers),e.headers=r)}return i!==void 0&&(e.searchParams=i),s.length>0&&(s.length===1?e.signal=s[0]:fa?e.signal=AbortSignal.any(s):e.signal=s.at(-1)),e};var kD=t=>ha.includes(t)?t.toUpperCase():t,hR=["get","put","head","delete","options","trace"],dR=[408,413,429,500,502,503,504],pR=[413,429,503],$D={limit:2,methods:hR,statusCodes:dR,afterStatusCodes:pR,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3,jitter:void 0,retryOnTimeout:!1},LD=(t={})=>{if(typeof t=="number")return{...$D,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.methods&&=t.methods.map(r=>r.toLowerCase()),t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");let e=Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0));return{...$D,...e}};var xn=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}};async function Rc(t,e,r,n){return new Promise((i,s)=>{let a=setTimeout(()=>{r&&r.abort(),s(new xn(t))},n.timeout);n.fetch(t,e).then(i).catch(s).then(()=>{clearTimeout(a)})})}async function Oc(t,{signal:e}){return new Promise((r,n)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(s),n(e.reason)}let s=setTimeout(()=>{e?.removeEventListener("abort",i),r()},t)})}var MD=(t,e)=>{let r={};for(let n in e)Object.hasOwn(e,n)&&!(n in TD)&&!(n in RD)&&(!(n in t)||n in OD)&&(r[n]=e[n]);return r},ND=t=>t===void 0?!1:Array.isArray(t)?t.length>0:t instanceof URLSearchParams?t.size>0:typeof t=="object"?Object.keys(t).length>0:typeof t=="string"?t.trim().length>0:!!t;function qD(t){return t instanceof An||t?.name===An.name}function jD(t){return t instanceof xn||t?.name===xn.name}var Cs=class t{static create(e,r){let n=new t(e,r),i=async()=>{if(typeof n.#e.timeout=="number"&&n.#e.timeout>da)throw new RangeError(`The \`timeout\` option cannot be greater than ${da}`);await Promise.resolve();let a=await n.#d();for(let l of n.#e.hooks.afterResponse){let f=n.#h(a.clone()),c;try{c=await l(n.request,n.#l(),f,{retryCount:n.#t})}catch(p){throw n.#u(f),n.#u(a),p}if(c instanceof ws)throw n.#u(f),n.#u(a),new vi(c.options);let h=c instanceof globalThis.Response?c:a;f!==h&&n.#u(f),a!==h&&n.#u(a),a=h}if(n.#h(a),!a.ok&&(typeof n.#e.throwHttpErrors=="function"?n.#e.throwHttpErrors(a.status):n.#e.throwHttpErrors)){let l=new An(a,n.request,n.#l());for(let f of n.#e.hooks.beforeError)l=await f(l,{retryCount:n.#t});throw l}if(n.#e.onDownloadProgress){if(typeof n.#e.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!_D)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");let l=a.clone();return n.#u(a),PD(l,n.#e.onDownloadProgress)}return a},s=n.#p(i).finally(()=>{let a=n.#s;n.#c(a?.body??void 0),n.#c(n.request.body??void 0)});for(let[a,l]of Object.entries(vD))a==="bytes"&&typeof globalThis.Response?.prototype?.bytes!="function"||(s[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||l);let f=await s;if(a==="json"){if(f.status===204)return"";let c=await f.text();return c===""?"":r.parseJson?r.parseJson(c):JSON.parse(c)}return f[a]()});return s}static#r(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,r])=>r!==void 0)):e}request;#n;#t=0;#i;#e;#s;#o;#a;constructor(e,r={}){if(this.#i=e,this.#e={...r,headers:vc(this.#i.headers,r.headers),hooks:Ac({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:kD(r.method??this.#i.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:LD(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},typeof this.#i!="string"&&!(this.#i instanceof URL||this.#i instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#e.prefixUrl&&typeof this.#i=="string"){if(this.#i.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#e.prefixUrl.endsWith("/")||(this.#e.prefixUrl+="/"),this.#i=this.#e.prefixUrl+this.#i}CD&&fa&&(this.#o=this.#e.signal??this.#i.signal,this.#n=new globalThis.AbortController,this.#e.signal=this.#o?AbortSignal.any([this.#o,this.#n.signal]):this.#n.signal),Sc&&(this.#e.duplex="half"),this.#e.json!==void 0&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));let n=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#i instanceof globalThis.Request&&(SD&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!n&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#i,this.#e),ND(this.#e.searchParams)){let s="?"+(typeof this.#e.searchParams=="string"?this.#e.searchParams.replace(/^\?/,""):new URLSearchParams(t.#r(this.#e.searchParams)).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,s);this.request=new globalThis.Request(a,this.#e)}if(this.#e.onUploadProgress){if(typeof this.#e.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sc)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#D(this.request,this.#e.body??void 0)}}#f(){let e=this.#e.retry.delay(this.#t),r=e;this.#e.retry.jitter===!0?r=Math.random()*e:typeof this.#e.retry.jitter=="function"&&(r=this.#e.retry.jitter(e),(!Number.isFinite(r)||r<0)&&(r=e));let n=this.#e.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(n,r)}async#g(e){if(this.#t++,this.#t>this.#e.retry.limit)throw e;let r=e instanceof Error?e:new Si(e);if(r instanceof vi)return r.customDelay??this.#f();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#e.retry.shouldRetry!==void 0){let n=await this.#e.retry.shouldRetry({error:r,retryCount:this.#t});if(n===!1)throw e;if(n===!0)return this.#f()}if(jD(e)&&!this.#e.retry.retryOnTimeout)throw e;if(qD(e)){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;let n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this.#e.retry.afterStatusCodes.includes(e.response.status)){let i=Number(n)*1e3;Number.isNaN(i)?i=Date.parse(n)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());let s=this.#e.retry.maxRetryAfter??i;return i<s?i:s}if(e.response.status===413)throw e}return this.#f()}#h(e){return this.#e.parseJson&&(e.json=async()=>this.#e.parseJson(await e.text())),e}#c(e){e&&e.cancel().catch(()=>{})}#u(e){this.#c(e.body??void 0)}async#p(e){try{return await e()}catch(r){let n=Math.min(await this.#g(r),da);if(this.#t<1)throw r;if(await Oc(n,this.#o?{signal:this.#o}:{}),r instanceof vi&&r.customRequest){let i=this.#e.signal?new globalThis.Request(r.customRequest,{signal:this.#e.signal}):new globalThis.Request(r.customRequest);this.#m(i)}for(let i of this.#e.hooks.beforeRetry){let s=await i({request:this.request,options:this.#l(),error:r,retryCount:this.#t});if(s instanceof globalThis.Request){this.#m(s);break}if(s instanceof globalThis.Response)return s;if(s===pa)return}return this.#p(e)}}async#d(){this.#n?.signal.aborted&&(this.#n=new globalThis.AbortController,this.#e.signal=this.#o?AbortSignal.any([this.#o,this.#n.signal]):this.#n.signal,this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));for(let r of this.#e.hooks.beforeRequest){let n=await r(this.request,this.#l(),{retryCount:this.#t});if(n instanceof Response)return n;if(n instanceof globalThis.Request){this.#m(n);break}}let e=MD(this.request,this.#e);return this.#s=this.request,this.request=this.#s.clone(),this.#e.timeout===!1?this.#e.fetch(this.#s,e):Rc(this.#s,e,this.#n,this.#e)}#l(){if(!this.#a){let{hooks:e,...r}=this.#e;this.#a=Object.freeze(r)}return this.#a}#m(e){this.#a=void 0,this.request=this.#D(e)}#D(e,r){return!this.#e.onUploadProgress||!e.body?e:ID(e,this.#e.onUploadProgress,r??this.#e.body??void 0)}};var Tc=t=>{let e=(r,n)=>Cs.create(r,Fs(t,n));for(let r of ha)e[r]=(n,i)=>Cs.create(n,Fs(t,i,{method:r}));return e.create=r=>Tc(Fs(r)),e.extend=r=>(typeof r=="function"&&(r=r(t??{})),Tc(Fs(t,r))),e.stop=pa,e.retry=xD,e},mR=Tc(),WD=mR;var f0=We(c0(),1);function kc(t){let e=(0,f0.default)("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`}var Bb=We(sy(),1),Pb=We(Tb(),1),lf=class extends Error{constructor(e){super(`Package \`${e}\` could not be found`),this.name="PackageNotFoundError"}},cf=class extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`),this.name="VersionNotFoundError"}};async function ff(t,e={}){let{version:r="latest"}=e,{omitDeprecated:n=!0}=e,i=t.split("/")[0],s=e.registryUrl??kc(i),a=new URL(encodeURIComponent(t).replace(/^%40/,"@"),s),l=(0,Bb.default)(s.toString(),{recursive:!0}),f={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete f.accept,l&&(f.authorization=`${l.type} ${l.token}`);let c;try{c=await WD(a,{headers:f,keepalive:!0}).json()}catch(p){throw p?.response?.status===404?new lf(t):p}if(e.allVersions)return c;let h=new cf(t,r);if(c["dist-tags"][r]){let{time:p}=c;c=c.versions[c["dist-tags"][r]],c.time=p}else if(r){let p=!!c.versions[r];if(n&&!p)for(let[m,D]of Object.entries(c.versions))D.deprecated&&delete c.versions[m];if(!p){let m=Object.keys(c.versions);if(r=Pb.default.maxSatisfying(m,r),!r)throw h}let{time:y}=c;if(c=c.versions[r],c.time=y,!c)throw h}return c}async function hf(t,e){let{version:r}=await ff(t.toLowerCase(),e);return r}import Ib from"node:process";var zT=Ib.env.npm_package_json,Ia=Ib.env.npm_config_user_agent,GT=!!Ia?.startsWith("npm")||!!zT?.endsWith("package.json"),VT=!!Ia?.startsWith("yarn"),HM=!!Ia?.startsWith("pnpm"),zM=!!Ia?.startsWith("bun"),$b=GT||VT;import ZT from"node:fs";import eB from"node:path";import{fileURLToPath as tB}from"node:url";var Wb=We(qb(),1);import He from"node:process";import ze from"node:path";import mf from"node:os";import ka from"node:fs";var Is=He.platform==="win32",jb=t=>{try{return Wb.default.parse(ka.readFileSync(t,"utf8")).prefix}catch{}},YT=()=>Object.keys(He.env).reduce((t,e)=>/^npm_config_prefix$/i.test(e)?He.env[e]:t,void 0),KT=()=>{if(Is&&He.env.APPDATA)return ze.join(He.env.APPDATA,"/npm/etc/npmrc");if(He.execPath.includes("/Cellar/node")){let t=He.execPath.slice(0,He.execPath.indexOf("/Cellar/node"));return ze.join(t,"/lib/node_modules/npm/npmrc")}if(He.execPath.endsWith("/bin/node")){let t=ze.dirname(ze.dirname(He.execPath));return ze.join(t,"/etc/npmrc")}},XT=()=>{if(Is){let{APPDATA:t}=He.env;return t?ze.join(t,"npm"):ze.dirname(He.execPath)}return ze.dirname(ze.dirname(He.execPath))},JT=()=>{let t=YT();if(t)return t;let e=jb(ze.join(mf.homedir(),".npmrc"));if(e)return e;if(He.env.PREFIX)return He.env.PREFIX;let r=jb(KT());return r||XT()},Ps=ze.resolve(JT()),Ub=()=>{if(Is&&He.env.LOCALAPPDATA){let t=ze.join(He.env.LOCALAPPDATA,"Yarn");if(ka.existsSync(t))return t}return!1},QT=()=>{if(He.env.PREFIX)return He.env.PREFIX;let t=Ub();if(t)return t;let e=ze.join(mf.homedir(),".config/yarn");if(ka.existsSync(e))return e;let r=ze.join(mf.homedir(),".yarn-config");return ka.existsSync(r)?r:Ps},sr={};sr.npm={};sr.npm.prefix=Ps;sr.npm.packages=ze.join(Ps,Is?"node_modules":"lib/node_modules");sr.npm.binaries=Is?Ps:ze.join(Ps,"bin");var Hb=ze.resolve(QT());sr.yarn={};sr.yarn.prefix=Hb;sr.yarn.packages=ze.join(Hb,Ub()?"Data/global/node_modules":"global/node_modules");sr.yarn.binaries=ze.join(sr.yarn.packages,".bin");var gf=sr;import Df from"node:path";function La(t,e){let r=Df.relative(e,t);return!!(r&&r!==".."&&!r.startsWith(`..${Df.sep}`)&&r!==Df.resolve(t))}var zb=eB.dirname(tB(import.meta.url)),rB=(()=>{try{return La(zb,gf.yarn.packages)||La(zb,ZT.realpathSync(gf.npm.packages))}catch{return!1}})(),Gb=rB;$s();nr();import Ua from"node:process";$s();function Na(t){let e=0;for(let r of t.split(`
233
- `))e=Math.max(e,Qe(r));return e}var TE=We(Ef(),1);var uB=/[\p{Lu}]/u,lB=/[\p{Ll}]/u,sE=/^[\p{Lu}](?![\p{Lu}])/gu,uE=/([\p{Alpha}\p{N}_]|$)/u,wf=/[_.\- ]+/,cB=new RegExp("^"+wf.source),oE=new RegExp(wf.source+uE.source,"gu"),aE=new RegExp("\\d+"+uE.source,"gu"),fB=(t,e,r,n)=>{let i=!1,s=!1,a=!1,l=!1;for(let f=0;f<t.length;f++){let c=t[f];l=f>2?t[f-3]==="-":!0,i&&uB.test(c)?(t=t.slice(0,f)+"-"+t.slice(f),i=!1,a=s,s=!0,f++):s&&a&&lB.test(c)&&(!l||n)?(t=t.slice(0,f-1)+"-"+t.slice(f-1),a=s,s=!1,i=!0):(i=e(c)===c&&r(c)!==c,a=s,s=r(c)===c&&e(c)!==c)}return t},hB=(t,e)=>(sE.lastIndex=0,t.replaceAll(sE,r=>e(r))),dB=(t,e)=>(oE.lastIndex=0,aE.lastIndex=0,t.replaceAll(aE,(r,n,i)=>["_","-"].includes(t.charAt(i+r.length))?r:e(r)).replaceAll(oE,(r,n)=>e(n)));function Ff(t,e){if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},Array.isArray(t)?t=t.map(s=>s.trim()).filter(s=>s.length).join("-"):t=t.trim(),t.length===0)return"";let r=e.locale===!1?s=>s.toLowerCase():s=>s.toLocaleLowerCase(e.locale),n=e.locale===!1?s=>s.toUpperCase():s=>s.toLocaleUpperCase(e.locale);return t.length===1?wf.test(t)?"":e.pascalCase?n(t):r(t):(t!==r(t)&&(t=fB(t,r,n,e.preserveConsecutiveUppercase)),t=t.replace(cB,""),t=e.preserveConsecutiveUppercase?hB(t,r):r(t),e.pascalCase&&(t=n(t.charAt(0))+t.slice(1)),dB(t,n))}var xf=We(bE(),1);$s();Ma();var EE=(t=0)=>e=>`\x1B[${e+t}m`,wE=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,FE=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Be={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]}},RN=Object.keys(Be.modifier),wB=Object.keys(Be.color),FB=Object.keys(Be.bgColor),ON=[...wB,...FB];function CB(){let t=new Map;for(let[e,r]of Object.entries(Be)){for(let[n,i]of Object.entries(r))Be[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Be[n],t.set(i[0],i[1]);Object.defineProperty(Be,e,{value:r,enumerable:!1})}return Object.defineProperty(Be,"codes",{value:t,enumerable:!1}),Be.color.close="\x1B[39m",Be.bgColor.close="\x1B[49m",Be.color.ansi=EE(),Be.color.ansi256=wE(),Be.color.ansi16m=FE(),Be.bgColor.ansi=EE(10),Be.bgColor.ansi256=wE(10),Be.bgColor.ansi16m=FE(10),Object.defineProperties(Be,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Be.rgbToAnsi256(...Be.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let l=e%36;r=Math.floor(e/36)/5,n=Math.floor(l/6)/5,i=l%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let a=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Be.ansi256ToAnsi(Be.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Be.ansi256ToAnsi(Be.hexToAnsi256(e)),enumerable:!1}}),Be}var _B=CB(),CE=_B;var ja=new Set(["\x1B","\x9B"]),SB=39,Af="\x07",vE="[",vB="]",AE="m",qa=`${vB}8;;`,_E=t=>`${ja.values().next().value}${vE}${t}${AE}`,SE=t=>`${ja.values().next().value}${qa}${t}${Af}`,AB=t=>t.split(" ").map(e=>Qe(e)),vf=(t,e,r)=>{let n=[...e],i=!1,s=!1,a=Qe(Ln(t.at(-1)));for(let[l,f]of n.entries()){let c=Qe(f);if(a+c<=r?t[t.length-1]+=f:(t.push(f),a=0),ja.has(f)&&(i=!0,s=n.slice(l+1,l+1+qa.length).join("")===qa),i){s?f===Af&&(i=!1,s=!1):f===AE&&(i=!1);continue}a+=c,a===r&&l<n.length-1&&(t.push(""),a=0)}!a&&t.at(-1).length>0&&t.length>1&&(t[t.length-2]+=t.pop())},xB=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(Qe(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},RB=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,s,a=AB(t),l=[""];for(let[p,y]of t.split(" ").entries()){r.trim!==!1&&(l[l.length-1]=l.at(-1).trimStart());let m=Qe(l.at(-1));if(p!==0&&(m>=e&&(r.wordWrap===!1||r.trim===!1)&&(l.push(""),m=0),(m>0||r.trim===!1)&&(l[l.length-1]+=" ",m++)),r.hard&&a[p]>e){let D=e-m,_=1+Math.floor((a[p]-D-1)/e);Math.floor((a[p]-1)/e)<_&&l.push(""),vf(l,y,e);continue}if(m+a[p]>e&&m>0&&a[p]>0){if(r.wordWrap===!1&&m<e){vf(l,y,e);continue}l.push("")}if(m+a[p]>e&&r.wordWrap===!1){vf(l,y,e);continue}l[l.length-1]+=y}r.trim!==!1&&(l=l.map(p=>xB(p)));let f=l.join(`
234
- `),c=[...f],h=0;for(let[p,y]of c.entries()){if(n+=y,ja.has(y)){let{groups:D}=new RegExp(`(?:\\${vE}(?<code>\\d+)m|\\${qa}(?<uri>.*)${Af})`).exec(f.slice(h))||{groups:{}};if(D.code!==void 0){let _=Number.parseFloat(D.code);i=_===SB?void 0:_}else D.uri!==void 0&&(s=D.uri.length===0?void 0:D.uri)}let m=CE.codes.get(Number(i));c[p+1]===`
235
- `?(s&&(n+=SE("")),i&&m&&(n+=_E(m))):y===`
236
- `&&(i&&m&&(n+=_E(i)),s&&(n+=SE(s))),h+=y.length}return n};function Wa(t,e,r){return String(t).normalize().replaceAll(`\r
237
- `,`
238
- `).split(`
239
- `).map(n=>RB(n,e,r)).join(`
240
- `)}var MB=We(Ef(),1),tn=`
241
- `,wt=" ",ks="none",BE=()=>{let{env:t,stdout:e,stderr:r}=Ua;return e?.columns?e.columns:r?.columns?r.columns:t.COLUMNS?Number.parseInt(t.COLUMNS,10):80},xE=t=>typeof t=="number"?{top:t,right:t*3,bottom:t,left:t*3}:{top:0,right:0,bottom:0,left:0,...t},Ls=t=>t===ks?0:2,OB=t=>{let e=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],r;if(t===ks){t={};for(let n of e)t[n]=""}if(typeof t=="string"){if(r=TE.default[t],!r)throw new TypeError(`Invalid border style: ${t}`)}else{typeof t?.vertical=="string"&&(t.left=t.vertical,t.right=t.vertical),typeof t?.horizontal=="string"&&(t.top=t.horizontal,t.bottom=t.horizontal);for(let n of e)if(t[n]===null||typeof t[n]!="string")throw new TypeError(`Invalid border style: ${n}`);r=t}return r},TB=(t,e,r)=>{let n="",i=Qe(t);switch(r){case"left":{n=t+e.slice(i);break}case"right":{n=e.slice(i)+t;break}default:{e=e.slice(i),e.length%2===1?(e=e.slice(Math.floor(e.length/2)),n=e.slice(1)+t+e):(e=e.slice(e.length/2),n=e+t+e);break}}return n},BB=(t,{padding:e,width:r,textAlignment:n,height:i})=>{t=(0,xf.default)(t,{align:n});let s=t.split(tn),a=Na(t),l=r-e.left-e.right;if(a>l){let h=[];for(let p of s){let y=Wa(p,l,{hard:!0}),D=(0,xf.default)(y,{align:n}).split(`
242
- `),_=Math.max(...D.map(A=>Qe(A)));for(let A of D){let x;switch(n){case"center":{x=wt.repeat((l-_)/2)+A;break}case"right":{x=wt.repeat(l-_)+A;break}default:{x=A;break}}h.push(x)}}s=h}n==="center"&&a<l?s=s.map(h=>wt.repeat((l-a)/2)+h):n==="right"&&a<l&&(s=s.map(h=>wt.repeat(l-a)+h));let f=wt.repeat(e.left),c=wt.repeat(e.right);return s=s.map(h=>{let p=f+h+c;return p+wt.repeat(r-Qe(p))}),e.top>0&&(s=[...Array.from({length:e.top}).fill(wt.repeat(r)),...s]),e.bottom>0&&(s=[...s,...Array.from({length:e.bottom}).fill(wt.repeat(r))]),i&&s.length>i?s=s.slice(0,i):i&&s.length<i&&(s=[...s,...Array.from({length:i-s.length}).fill(wt.repeat(r))]),s.join(tn)},PB=(t,e,r)=>{let n=h=>{let p=r.borderColor?kB(r.borderColor)(h):h;return r.dimBorder?I.dim(p):p},i=h=>r.backgroundColor?LB(r.backgroundColor)(h):h,s=OB(r.borderStyle),a=BE(),l=wt.repeat(r.margin.left);if(r.float==="center"){let h=Math.max((a-e-Ls(r.borderStyle))/2,0);l=wt.repeat(h)}else if(r.float==="right"){let h=Math.max(a-e-r.margin.right-Ls(r.borderStyle),0);l=wt.repeat(h)}let f="";r.margin.top&&(f+=tn.repeat(r.margin.top)),(r.borderStyle!==ks||r.title)&&(f+=n(l+s.topLeft+(r.title?TB(r.title,s.top.repeat(e),r.titleAlignment):s.top.repeat(e))+s.topRight)+tn);let c=t.split(tn);return f+=c.map(h=>l+n(s.left)+i(h)+n(s.right)).join(tn),r.borderStyle!==ks&&(f+=tn+n(l+s.bottomLeft+s.bottom.repeat(e)+s.bottomRight)),r.margin.bottom&&(f+=tn.repeat(r.margin.bottom)),f},IB=t=>{if(t.fullscreen&&Ua?.stdout){let e=[Ua.stdout.columns,Ua.stdout.rows];typeof t.fullscreen=="function"&&(e=t.fullscreen(...e)),t.width||=e[0],t.height||=e[1]}return t.width&&=Math.max(1,t.width-Ls(t.borderStyle)),t.height&&=Math.max(1,t.height-Ls(t.borderStyle)),t},RE=(t,e)=>e===ks?t:` ${t} `,$B=(t,e)=>{e=IB(e);let r=e.width!==void 0,n=BE(),i=Ls(e.borderStyle),s=n-e.margin.left-e.margin.right-i,a=Na(Wa(t,n-i,{hard:!0,trim:!1}))+e.padding.left+e.padding.right;if(e.title&&r?(e.title=e.title.slice(0,Math.max(0,e.width-2)),e.title&&=RE(e.title,e.borderStyle)):e.title&&(e.title=e.title.slice(0,Math.max(0,s-2)),e.title&&(e.title=RE(e.title,e.borderStyle),Qe(e.title)>a&&(e.width=Qe(e.title)))),e.width||=a,!r){if(e.margin.left&&e.margin.right&&e.width>s){let f=(n-e.width-i)/(e.margin.left+e.margin.right);e.margin.left=Math.max(0,Math.floor(e.margin.left*f)),e.margin.right=Math.max(0,Math.floor(e.margin.right*f))}e.width=Math.min(e.width,n-i-e.margin.left-e.margin.right)}return e.width-(e.padding.left+e.padding.right)<=0&&(e.padding.left=0,e.padding.right=0),e.height&&e.height-(e.padding.top+e.padding.bottom)<=0&&(e.padding.top=0,e.padding.bottom=0),e},Rf=t=>t.match(/^#(?:[0-f]{3}){1,2}$/i),OE=t=>typeof t=="string"&&(I[t]??Rf(t)),kB=t=>Rf(t)?I.hex(t):I[t],LB=t=>Rf(t)?I.bgHex(t):I[Ff(["bg",t])];function Ha(t,e){if(e={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...e},e.align&&(e.textAlignment=e.align),e.borderColor&&!OE(e.borderColor))throw new Error(`${e.borderColor} is not a valid borderColor`);if(e.backgroundColor&&!OE(e.backgroundColor))throw new Error(`${e.backgroundColor} is not a valid backgroundColor`);return e.padding=xE(e.padding),e.margin=xE(e.margin),e=$B(t,e),t=BB(t,e),PB(t,e.width,e)}import{env as Ms}from"node:process";var NB=Ms.CI!=="0"&&Ms.CI!=="false"&&("CI"in Ms||"CONTINUOUS_INTEGRATION"in Ms||Object.keys(Ms).some(t=>t.startsWith("CI_"))),PE=NB;var IE=t=>t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function $E(t,...e){if(typeof t=="string")return IE(t);let r=t[0];for(let[n,i]of e.entries())r=r+IE(String(i))+t[n+1];return r}var Of=class extends Error{constructor(e){super(`Missing a value for ${e?`the placeholder: ${e}`:"a placeholder"}`,e),this.name="MissingValueError",this.key=e}},Tf=class extends Error{constructor(e){super(`Missing filter: ${e}`),this.name="MissingFilterError",this.filterName=e}};function Bf(t,e,{ignoreMissing:r=!1,transform:n=({value:s})=>s,filters:i={}}={}){if(typeof t!="string")throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof t}\``);if(typeof e!="object")throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof e}\``);let s="\uE000\uE001\uE002",a="\uE003\uE004\uE005";t=t.replace(/\\{/g,s),t=t.replace(/\\}/g,a);let l=D=>{let _=[],A="";for(let x=0;x<D.length;x++)D[x]==="\\"&&D[x+1]==="."?(A+=".",x++):D[x]==="."?(_.push(A),A=""):A+=D[x];return _.push(A),_},f=(D,_)=>{let A=_.split("|").map(se=>se.trim()),x=A[0],M=A.slice(1),q=l(x),L=e;for(let se of q)L&&(L=L[se]);for(let se of M){let le=i[se];if(!le){if(r)return D;throw new Tf(se)}L!==void 0&&(L=le(L))}let V=n({value:L,key:x});if(V===void 0){if(r)return D;throw new Of(x)}return String(V)},p="((\\d+|[a-z$_][\\w\\-.$\\\\]*)\\s*(?:\\|\\s*[a-z$_][\\w$]*\\s*)*)",y=new RegExp(`{{${p}}}`,"gi"),m=new RegExp(`{${p}}`,"gi");return t=t.replace(y,(...D)=>$E(f(...D))),t=t.replace(m,f),t=t.replace(new RegExp(s,"g"),"{"),t=t.replace(new RegExp(a,"g"),"}"),t}var WB=kE.dirname(jB(import.meta.url)),UB=1e3*60*60*24,Ns=class{config;update;_packageName;_shouldNotifyInNpmScript;#r;#n;#t;#i;constructor(e={}){if(this.#r=e,e.pkg??={},e.distTag??="latest",e.pkg={name:e.pkg.name??e.packageName,version:e.pkg.version??e.packageVersion},!e.pkg.name||!e.pkg.version)throw new Error("pkg.name and pkg.version required");if(this._packageName=e.pkg.name,this.#n=e.pkg.version,this.#t=typeof e.updateCheckInterval=="number"?e.updateCheckInterval:UB,this.#i="NO_UPDATE_NOTIFIER"in Nn.env||Nn.env.NODE_ENV==="test"||Nn.argv.includes("--no-update-notifier")||PE,this._shouldNotifyInNpmScript=e.shouldNotifyInNpmScript,!this.#i)try{this.config=new gs(`update-notifier-${this._packageName}`,{optOut:!1,lastUpdateCheck:Date.now()})}catch{let r=I.yellow(Pf(" %s update check failed ",e.pkg.name))+Pf(`
243
- Try running with %s or get access `,I.cyan("sudo"))+`
244
- to the local update config store via
245
- `+I.cyan(Pf(" sudo chown -R $USER:$(id -gn $USER) %s ",bi));Nn.on("exit",()=>{console.error(Ha(r,{textAlignment:"center"}))})}}check(){!this.config||this.config.get("optOut")||this.#i||(this.update=this.config.get("update"),this.update&&(this.update.current=this.#n,this.config.delete("update")),!(Date.now()-this.config.get("lastUpdateCheck")<this.#t)&&qB(Nn.execPath,[kE.join(WB,"check.js"),JSON.stringify(this.#r)],{detached:!0,stdio:"ignore"}).unref())}async fetchInfo(){let{distTag:e}=this.#r,r=await hf(this._packageName,{version:e});return{latest:r,current:this.#n,type:(0,LE.default)(this.#n,r)??e,name:this._packageName}}notify(e){let r=!this._shouldNotifyInNpmScript&&$b;if(!Nn.stdout.isTTY||r||!this.update||!(0,ME.default)(this.update.latest,this.update.current))return this;e={isGlobal:Gb,...e};let n=e.isGlobal?`npm i -g ${this._packageName}`:`npm i ${this._packageName}`,i="Update available "+I.dim("{currentVersion}")+I.reset(" \u2192 ")+I.green("{latestVersion}")+`
246
- Run `+I.cyan("{updateCommand}")+" to update",s=e.message||i;e.boxenOptions??={padding:1,margin:1,textAlignment:"center",borderColor:"yellow",borderStyle:"round"};let a=Ha(Bf(s,{packageName:this._packageName,currentVersion:this.update.current,latestVersion:this.update.latest,updateCommand:n}),e.boxenOptions);return e.defer===!1?console.error(a):Nn.on("exit",()=>{console.error(a)}),this}};function If(t){let e=new Ns(t);return e.check(),e}nr();import{readFileSync as m$}from"fs";import{fileURLToPath as g$}from"url";import{dirname as D$,join as y$}from"path";var me;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.VALIDATION_ERROR=1]="VALIDATION_ERROR",t[t.NETWORK_ERROR=2]="NETWORK_ERROR",t[t.AUTH_ERROR=3]="AUTH_ERROR",t[t.POLICY_BLOCKED=4]="POLICY_BLOCKED",t[t.EXECUTION_ERROR=5]="EXECUTION_ERROR",t[t.UNKNOWN_ERROR=6]="UNKNOWN_ERROR"})(me||(me={}));function NE(t){let e=typeof t=="string"?t:t instanceof Error?t.message:t.message||String(t),r=typeof t=="object"&&"code"in t?t.code:void 0;if(r)switch(r){case"VALIDATION_ERROR":case"INVALID_INPUT":case"MISSING_ARGUMENT":return me.VALIDATION_ERROR;case"AUTH_ERROR":case"UNAUTHORIZED":case"TOKEN_EXPIRED":return me.AUTH_ERROR;case"NETWORK_ERROR":case"CONNECTION_FAILED":case"TIMEOUT":return me.NETWORK_ERROR;case"POLICY_BLOCKED":case"QUOTA_EXCEEDED":case"PERMISSION_DENIED":return me.POLICY_BLOCKED;case"EXECUTION_ERROR":return me.EXECUTION_ERROR}return e.includes("validation")||e.includes("invalid")||e.includes("required")?me.VALIDATION_ERROR:e.includes("auth")||e.includes("token")||e.includes("unauthorized")?me.AUTH_ERROR:e.includes("network")||e.includes("connection")||e.includes("timeout")?me.NETWORK_ERROR:e.includes("policy")||e.includes("quota")||e.includes("permission")?me.POLICY_BLOCKED:me.EXECUTION_ERROR}var f9={[me.SUCCESS]:"Success",[me.VALIDATION_ERROR]:"Validation error - check your input",[me.NETWORK_ERROR]:"Network error - check your connection",[me.AUTH_ERROR]:"Authentication error - please login",[me.POLICY_BLOCKED]:"Policy blocked - insufficient permissions or quota",[me.EXECUTION_ERROR]:"Execution error - task failed during execution",[me.UNKNOWN_ERROR]:"Unknown error - please report this issue"};var $f=class{providers=new Map;config;policy;listeners=[];version="2.0.0";constructor(e,r){this.config=e,this.policy=r}registerProvider(e){this.providers.set(e.name,e)}getProvider(e){return this.providers.get(e)}async execute(e){let r=Date.now();this.emit({type:"task:start",request:e});try{let n=this.policy.validate(e);if(!n.valid){let c=n.exitCode||me.VALIDATION_ERROR;throw Object.assign(new Error(n.reason||"Task validation failed"),{code:c===me.POLICY_BLOCKED?"POLICY_BLOCKED":"VALIDATION_ERROR",exitCode:c})}let i=this.policy.transform?.(e)||e,s=this.policy.selectProvider(i,this.providers);if(!s)throw Object.assign(new Error(`No provider available for task type '${i.type}'`),{code:"NO_PROVIDER",exitCode:me.POLICY_BLOCKED});if(!await s.isAvailable())throw Object.assign(new Error(`Provider '${s.name}' is not available`),{code:"PROVIDER_UNAVAILABLE",exitCode:me.NETWORK_ERROR});this.emit({type:"task:progress",request:i,progress:.5});let l=await s.execute(i),f={...l,meta:{...l.meta,command:e.command,duration:Date.now()-r,timestamp:new Date().toISOString(),version:this.version,coldStart:Date.now()-r-l.meta.duration,provider:s.name}};return this.emit({type:"task:complete",request:i,response:f}),f}catch(n){return this.emit({type:"task:error",request:e,error:n instanceof Error?n:new Error(String(n))}),{success:!1,exitCode:NE(n),meta:{command:e.command,duration:Date.now()-r,timestamp:new Date().toISOString(),version:this.version,provider:"engine"},error:{code:n instanceof Error&&"code"in n?n.code:"EXECUTION_ERROR",message:n instanceof Error?n.message:String(n)}}}}on(e,r){this.listeners.push(r)}emit(e){this.listeners.forEach(r=>r(e))}getStatus(){return{version:this.version,providers:Array.from(this.providers.keys()),defaultProvider:this.config.defaultProvider}}},qE=null;function jE(t,e){return qE=new $f(t,e),qE}var za=class{config;constructor(e){this.config=e}validate(e){if(e.options.provider){if(!["local","remote","ai"].includes(e.options.provider))return{valid:!1,reason:`Invalid provider '${e.options.provider}'. Allowed: local, remote, ai`,exitCode:me.VALIDATION_ERROR};if(e.options.provider==="ai"&&!this.config.providers.ai?.enabled)return{valid:!1,reason:"AI provider is not enabled. Use --provider=local or --provider=remote",exitCode:me.POLICY_BLOCKED}}return["analyze","init","status","sync","deploy","config","auth","plugin"].includes(e.type)?{valid:!0}:{valid:!1,reason:`Invalid task type '${e.type}'`,exitCode:me.VALIDATION_ERROR}}selectProvider(e,r){if(e.options.provider){let s=r.get(e.options.provider);return s&&s.capabilities.commands.includes(e.type)?s:null}let n=this.getPreferredProvider(e.type),i=r.get(n);if(i&&i.capabilities.commands.includes(e.type))return i;for(let[,s]of r)if(s.capabilities.commands.includes(e.type))return s;return null}getPreferredProvider(e){switch(e){case"analyze":return this.config.providers.remote?.enabled?"remote":"local";case"sync":case"deploy":return this.config.providers.remote?.enabled?"remote":"local";default:return"local"}}transform(e){return!process.stdout.isTTY&&!e.options.json?{...e,options:{...e.options,nonInteractive:!0,json:!0}}:e}checkCapabilities(e){return{allowed:!0}}};dn();Nr();import*as yt from"fs/promises";import*as vt from"path";var ju=class{name="local";version="2.0.0";capabilities={commands:["analyze","init","status","config","auth"],features:{json:!0,streaming:!1,caching:!0,ai:!1},constraints:{maxFileSize:10*1024*1024,maxFiles:1e3,requiresAuth:!1}};config;constructor(e){this.config=e}async isAvailable(){return!0}async execute(e){let r=Date.now();try{switch(e.type){case"analyze":return await this.executeAnalyze(e);case"init":return await this.executeInit(e);case"status":return await this.executeStatus(e);case"config":return await this.executeConfig(e);case"auth":return await this.executeAuth(e);default:throw new Error(`Task type '${e.type}' not supported by local provider`)}}catch(n){return{success:!1,exitCode:me.EXECUTION_ERROR,meta:{command:e.command,duration:Date.now()-r,timestamp:new Date().toISOString(),version:this.version,provider:this.name},error:{code:"LOCAL_EXECUTION_ERROR",message:n instanceof Error?n.message:String(n)}}}}async executeAnalyze(e){let{targetPath:r,options:n}=e.payload,i=await this.discoverFiles(r,{include:["**/*.{ts,tsx,js,jsx}"],exclude:this.config.excludePatterns,maxSize:n.maxSize}),s=[],a=0,l=0,f=0;for(let y of i){let m=await yt.readFile(y,"utf-8"),D=m.split(`
247
- `);a+=D.length,m.includes("function ")&&l++,m.includes("class ")&&f++,m.includes("eval(")&&s.push({file:vt.relative(r,y),type:"security",severity:"high",message:"Use of eval() detected"}),m.includes("console.log")&&s.push({file:vt.relative(r,y),type:"maintainability",severity:"low",message:"Console.log statement found"})}let c={schema_version:"1.0",engine_version:this.version,created_at:new Date().toISOString(),project:{name:n.projectName||vt.basename(r),path:r},summary:{total:s.length,high:s.filter(y=>y.severity==="high").length,medium:s.filter(y=>y.severity==="medium").length,low:s.filter(y=>y.severity==="low").length},metrics:{totalFiles:i.length,totalLines:a,totalFunctions:l,totalClasses:f},findings:s},h=vt.resolve(n.output);await yt.mkdir(h,{recursive:!0});let p=vt.join(h,`report-${Date.now()}.json`);return await yt.writeFile(p,JSON.stringify(c,null,2)),{success:!0,exitCode:me.SUCCESS,meta:{command:e.command,duration:0,timestamp:new Date().toISOString(),version:this.version,provider:this.name},data:{report:c,reportFile:p,filesAnalyzed:i.length,findings:s.length}}}async executeInit(e){let{projectPath:r,template:n}=e.payload;await yt.mkdir(r,{recursive:!0});let i={name:vt.basename(r),version:"1.0.0",template:n,type:"default",created_at:new Date().toISOString()},s=vt.join(r,"delta.config.json");return await yt.writeFile(s,JSON.stringify(i,null,2)),{success:!0,exitCode:me.SUCCESS,meta:{command:e.command,duration:0,timestamp:new Date().toISOString(),version:this.version,provider:this.name},data:{projectPath:r,configPath:s,template:n}}}async executeStatus(e){let{projectPath:r}=e.payload,n=vt.join(r,"delta.config.json"),i=!1;try{await yt.access(n),i=!0}catch{i=!1}let s=await Lt(),a=await Ne.hasTokens();return{success:!0,exitCode:me.SUCCESS,meta:{command:e.command,duration:0,timestamp:new Date().toISOString(),version:this.version,provider:this.name},data:{project:{path:r,hasConfig:i,configPath:i?n:null},auth:{authenticated:a,apiUrl:s.apiUrl||"default"}}}}async executeConfig(e){return{success:!0,exitCode:me.SUCCESS,meta:{command:e.command,duration:0,timestamp:new Date().toISOString(),version:this.version,provider:this.name},data:{action:e.payload.action,config:{}}}}async executeAuth(e){let{action:r}=e.payload;return{success:!0,exitCode:me.SUCCESS,meta:{command:e.command,duration:0,timestamp:new Date().toISOString(),version:this.version,provider:this.name},data:{action:r,authenticated:r==="login"}}}async discoverFiles(e,r){let n=[];async function i(s){let a=await yt.readdir(s,{withFileTypes:!0});for(let l of a){let f=vt.join(s,l.name);if(l.isDirectory()){if(r.exclude.some(c=>l.name.includes(c)))continue;await i(f)}else if(l.isFile()&&r.include.some(h=>{if(h.includes("**")){let p=h.replace("**/*","");return l.name.endsWith(p)}return l.name.includes(h.replace("*",""))}))try{(await yt.stat(f)).size<=r.maxSize&&n.push(f)}catch{}}}return await i(e),n}};Nr();var Wu=class{name="remote";version="2.0.0";capabilities={commands:["analyze","status","sync","deploy"],features:{json:!0,streaming:!0,caching:!0,ai:!1},constraints:{maxFileSize:50*1024*1024,maxFiles:1e4,requiresAuth:!0}};config;constructor(e){this.config=e}async isAvailable(){try{let e=new AbortController,r=setTimeout(()=>e.abort(),5e3),n=await fetch(`${this.config.apiUrl}/health`,{method:"GET",signal:e.signal});return clearTimeout(r),n.ok}catch{return!1}}async execute(e){let r=Date.now();try{let n=await Ne.getAccessToken();if(!n)throw new Error("Authentication required for remote execution");let i=await fetch(`${this.config.apiUrl}/api/cli/execute`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({type:e.type,command:e.command,payload:e.payload})});if(!i.ok){let a=await i.text();throw new Error(`Remote execution failed: ${a}`)}let s=await i.json();return{success:!0,exitCode:me.SUCCESS,meta:{command:e.command,duration:Date.now()-r,timestamp:new Date().toISOString(),version:this.version,provider:this.name},data:s}}catch(n){return{success:!1,exitCode:me.NETWORK_ERROR,meta:{command:e.command,duration:Date.now()-r,timestamp:new Date().toISOString(),version:this.version,provider:this.name},error:{code:"REMOTE_EXECUTION_ERROR",message:n instanceof Error?n.message:String(n)}}}}};var Uu=class{name="ai";version="2.0.0-placeholder";capabilities={commands:["analyze"],features:{json:!0,streaming:!0,caching:!1,ai:!0},constraints:{maxFileSize:100*1024*1024,requiresAuth:!0}};config;constructor(e){this.config=e}async isAvailable(){return this.config.enabled&&!!this.config.apiKey}async execute(e){let r=Date.now();return{success:!1,exitCode:me.POLICY_BLOCKED,meta:{command:e.command,duration:Date.now()-r,timestamp:new Date().toISOString(),version:this.version,provider:this.name},error:{code:"AI_NOT_IMPLEMENTED",message:"AI features are reserved for future releases. Use --provider=local for now.",details:{note:"AI integration will be available in v2.1.0 without requiring any CLI changes",alternative:"Use --provider=local for local execution or --provider=remote for cloud execution"}}}}async generate(e,r){if(!this.config.enabled)throw new Error("AI provider is not enabled");return`AI generation not implemented. Input received: ${e.substring(0,50)}...`}async analyzeCode(e,r){if(!this.config.enabled)throw new Error("AI provider is not enabled");return{insights:["AI code analysis not yet implemented"],suggestions:["Use --provider=local for current analysis capabilities"],score:0}}};var J1={commands:[{name:"help",alias:["/?","/h"],desc:"Show help"},{name:"analyze",alias:["/a","/analyze"],desc:"Code analysis"},{name:"init",alias:["/i","/init"],desc:"Initialize project"},{name:"status",alias:["/st","/status"],desc:"Check status"},{name:"login",alias:["/login"],desc:"Authenticate"},{name:"logout",alias:["/logout"],desc:"Sign out"},{name:"whoami",alias:["/me","/whoami"],desc:"User info"},{name:"config",alias:["/config"],desc:"Configuration"},{name:"dashboard",alias:["/ui","/dashboard"],desc:"Interactive UI"},{name:"sync",alias:["/sync"],desc:"Cloud sync"},{name:"deploy",alias:["/deploy"],desc:"Deploy project"},{name:"plugins",alias:["/plugins"],desc:"Manage plugins"}],globalFlags:[{name:"--json",desc:"Output as JSON"},{name:"--provider",values:["local","remote","ai"],desc:"Execution provider"},{name:"--theme",values:["delta","cyber","sunset","neon","ocean","fire"],desc:"Color theme"},{name:"--verbose",desc:"Verbose logging"},{name:"--no-color",desc:"Disable colors"},{name:"--interactive",alias:"-i",desc:"Interactive mode"},{name:"--version",alias:"-v",desc:"Show version"},{name:"--help",alias:"-h",desc:"Show help"}],commandFlags:{analyze:[{name:"--format",values:["json","html","markdown","sarif"],desc:"Output format"},{name:"--output",values:["./delta-reports"],desc:"Output directory"},{name:"--include",desc:"Include patterns"},{name:"--exclude",desc:"Exclude patterns"},{name:"--max-size",desc:"Max file size"},{name:"--upload",desc:"Upload to cloud"},{name:"--share",desc:"Generate shareable link"},{name:"--project-name",desc:"Project name"},{name:"--ai-insights",desc:"AI insights"},{name:"--security-scan",desc:"Security scan"},{name:"--performance",desc:"Performance analysis"}],init:[{name:"--template",values:["default","nextjs","react","node","python"],desc:"Project template"},{name:"--force",alias:"-f",desc:"Overwrite existing"},{name:"--git",desc:"Initialize git"}],status:[{name:"--diagnostics",desc:"Full diagnostics"},{name:"--fix",desc:"Auto-fix issues"}],login:[{name:"--method",values:["oauth","pat","github","google"],desc:"Auth method"},{name:"--token",desc:"PAT token"}],config:[{name:"--get",desc:"Get config value"},{name:"--set",desc:"Set config value"},{name:"--list",alias:"-l",desc:"List all config"},{name:"--reset",desc:"Reset to default"}]}};function zd(t){let e="delta";switch(t){case"bash":return t$(e);case"zsh":return r$(e);case"fish":return n$(e);case"powershell":return i$(e);default:throw new Error(`Unsupported shell: ${t}`)}}function t$(t){let e=J1.commands.map(n=>n.name).join(" "),r=J1.commands.flatMap(n=>n.alias).filter(n=>n.startsWith("/")).join(" ");return`#!/bin/bash
248
- # Delta CLI Bash Completion
249
- # Source this file: source <(delta completion bash)
250
-
251
- _${t}_completions() {
252
- local cur prev opts
253
- COMPREPLY=()
254
- cur="\${COMP_WORDS[COMP_CWORD]}"
255
- prev="\${COMP_WORDS[COMP_CWORD-1]}"
256
-
257
- # Commands list
258
- local commands="${e} ${r}"
259
- local global_flags="--json --provider --theme --verbose --no-color --interactive --version --help -i -v -h"
260
-
261
- # Complete commands
262
- if [[ \${COMP_CWORD} -eq 1 ]]; then
263
- COMPREPLY=( $(compgen -W "\${commands} \${global_flags}" -- \${cur}) )
264
- return 0
265
- fi
266
-
267
- # Complete flags based on command
268
- case "\${COMP_WORDS[1]}" in
269
- analyze|/a|/analyze)
270
- opts="--format --output --include --exclude --max-size --upload --share --project-name --ai-insights --security-scan --performance --json --provider"
271
- ;;
272
- init|/i|/init)
273
- opts="--template --force --git --json --provider -f"
274
- ;;
275
- status|/st|/status)
276
- opts="--diagnostics --fix --json"
277
- ;;
278
- login|/login)
279
- opts="--method --token --json"
280
- ;;
281
- config|/config)
282
- opts="--get --set --list --reset -l --json"
283
- ;;
284
- *)
285
- opts="\${global_flags}"
286
- ;;
287
- esac
288
-
289
- # Complete flag values
290
- case "\${prev}" in
291
- --provider)
292
- COMPREPLY=( $(compgen -W "local remote ai" -- \${cur}) )
293
- return 0
294
- ;;
295
- --theme)
296
- COMPREPLY=( $(compgen -W "delta cyber sunset neon ocean fire" -- \${cur}) )
297
- return 0
298
- ;;
299
- --format)
300
- COMPREPLY=( $(compgen -W "json html markdown sarif" -- \${cur}) )
301
- return 0
302
- ;;
303
- --template)
304
- COMPREPLY=( $(compgen -W "default nextjs react node python" -- \${cur}) )
305
- return 0
306
- ;;
307
- --method)
308
- COMPREPLY=( $(compgen -W "oauth pat github google" -- \${cur}) )
309
- return 0
310
- ;;
311
- esac
312
-
313
- COMPREPLY=( $(compgen -W "\${opts}" -- \${cur}) )
314
- return 0
315
- }
316
-
317
- complete -F _${t}_completions ${t}
318
- `}function r$(t){return`#compdef ${t}
319
- # Delta CLI Zsh Completion
320
-
321
- _${t}() {
322
- local curcontext="$curcontext" state line
323
- typeset -A opt_args
324
-
325
- _arguments -C \\
326
- '(-h --help)'{-h,--help}'[Show help]' \\
327
- '(-v --version)'{-v,--version}'[Show version]' \\
328
- '(-i --interactive)'{-i,--interactive}'[Interactive mode]' \\
329
- '--json[Output as JSON]' \\
330
- '--provider[Execution provider]:provider:(local remote ai)' \\
331
- '--theme[Color theme]:theme:(delta cyber sunset neon ocean fire)' \\
332
- '--verbose[Verbose logging]' \\
333
- '--no-color[Disable colors]' \\
334
- '1: :->command' \\
335
- '*:: :->args'
336
-
337
- case "$state" in
338
- command)
339
- _values 'commands' \\
340
- 'help[Show help]' \\
341
- 'analyze[Code analysis]' \\
342
- 'init[Initialize project]' \\
343
- 'status[Check status]' \\
344
- 'login[Authenticate]' \\
345
- 'logout[Sign out]' \\
346
- 'whoami[User info]' \\
347
- 'config[Configuration]' \\
348
- 'dashboard[Interactive UI]' \\
349
- 'sync[Cloud sync]' \\
350
- 'deploy[Deploy project]' \\
351
- 'plugins[Manage plugins]'
352
- ;;
353
- args)
354
- case "$line[1]" in
355
- analyze)
356
- _arguments \\
357
- '--format[Output format]:format:(json html markdown sarif)' \\
358
- '--output[Output directory]' \\
359
- '--include[Include patterns]' \\
360
- '--exclude[Exclude patterns]' \\
361
- '--upload[Upload to cloud]' \\
362
- '--share[Generate shareable link]' \\
363
- '--project-name[Project name]'
364
- ;;
365
- init)
366
- _arguments \\
367
- '--template[Project template]:template:(default nextjs react node python)' \\
368
- '(-f --force)'{-f,--force}'[Overwrite existing]' \\
369
- '--git[Initialize git]'
370
- ;;
371
- status)
372
- _arguments \\
373
- '--diagnostics[Full diagnostics]' \\
374
- '--fix[Auto-fix issues]'
375
- ;;
376
- esac
377
- ;;
378
- esac
379
- }
380
-
381
- _${t} "$@"
382
- `}function n$(t){return`# Delta CLI Fish Completion
383
-
384
- # Commands
385
- complete -c ${t} -f
386
- complete -c ${t} -n '__fish_use_subcommand' -a 'help' -d 'Show help'
387
- complete -c ${t} -n '__fish_use_subcommand' -a 'analyze' -d 'Code analysis'
388
- complete -c ${t} -n '__fish_use_subcommand' -a 'init' -d 'Initialize project'
389
- complete -c ${t} -n '__fish_use_subcommand' -a 'status' -d 'Check status'
390
- complete -c ${t} -n '__fish_use_subcommand' -a 'login' -d 'Authenticate'
391
- complete -c ${t} -n '__fish_use_subcommand' -a 'logout' -d 'Sign out'
392
-
393
- # Global flags
394
- complete -c ${t} -l json -d 'Output as JSON'
395
- complete -c ${t} -l provider -d 'Execution provider' -xa 'local remote ai'
396
- complete -c ${t} -l theme -d 'Color theme' -xa 'delta cyber sunset neon ocean fire'
397
- complete -c ${t} -l verbose -d 'Verbose logging'
398
- complete -c ${t} -l no-color -d 'Disable colors'
399
- complete -c ${t} -s i -l interactive -d 'Interactive mode'
400
- complete -c ${t} -s v -l version -d 'Show version'
401
- complete -c ${t} -s h -l help -d 'Show help'
402
- `}function i$(t){return`# Delta CLI PowerShell Completion
403
- # Add to $PROFILE: . delta completion powershell | Out-String | Invoke-Expression
404
-
405
- Register-ArgumentCompleter -Native -CommandName ${t} -ScriptBlock {
406
- param($wordToComplete, $commandAst, $cursorPosition)
407
-
408
- $commands = @('help', 'analyze', 'init', 'status', 'login', 'logout', 'whoami', 'config', 'dashboard', 'sync', 'deploy', 'plugins')
409
- $slashCommands = @('/help', '/h', '/analyze', '/a', '/init', '/i', '/status', '/st', '/login', '/logout', '/me', '/whoami', '/config', '/ui', '/sync', '/deploy', '/plugins')
410
-
411
- $command = $commandAst.CommandElements[1].Value
412
-
413
- if ($commandAst.CommandElements.Count -eq 1 -or
414
- ($commandAst.CommandElements.Count -eq 2 -and $wordToComplete -ne '')) {
415
- $commands + $slashCommands | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
416
- [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
417
- }
418
- return
419
- }
420
-
421
- switch ($command) {
422
- { $_ -in 'analyze', '/a', '/analyze' } {
423
- $flags = @('--format', '--output', '--include', '--exclude', '--upload', '--share', '--json', '--provider')
424
- $flags | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
425
- [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterName', $_)
426
- }
427
- }
428
- { $_ -in 'init', '/i', '/init' } {
429
- $flags = @('--template', '--force', '--git', '--json')
430
- $flags | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
431
- [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterName', $_)
432
- }
433
- }
434
- }
435
- }
436
- `}async function Q1(t){let e=t||process.env.SHELL?.split("/").pop()||"bash";console.log(`Installing completion for ${e}...
437
- `);let r=zd(e);console.log(`Add this to your shell config:
438
- `),console.log(r),console.log(`
439
- Or run: eval "$(delta completion `+e+')"')}var Z1=We(gd(),1);nr();var s$=[{name:"projectName",message:"What is your project name?",type:"text",initial:"my-delta-project",validate:t=>t.length>0||"Project name is required"},{name:"template",message:"Choose a project template:",type:"select",choices:[{title:"Default",value:"default",description:"Basic Delta project structure"},{title:"Next.js",value:"nextjs",description:"Next.js app with Delta integration"},{title:"React",value:"react",description:"React SPA with Delta support"},{title:"Node.js",value:"node",description:"Node.js backend service"},{title:"Python",value:"python",description:"Python project with Delta CLI"}]},{name:"features",message:"Select features to enable:",type:"multiselect",choices:[{title:"Code Analysis",value:"analysis",description:"Auto-analyze on commits"},{title:"Documentation",value:"docs",description:"Auto-generate docs"},{title:"CI/CD Config",value:"cicd",description:"GitHub Actions workflow"},{title:"Docker",value:"docker",description:"Docker configuration"},{title:"TypeScript",value:"typescript",description:"TypeScript setup"}]},{name:"initializeGit",message:"Initialize Git repository?",type:"confirm",initial:!0},{name:"installDependencies",message:"Install dependencies now?",type:"confirm",initial:!0}];async function eS(){console.log(I.bold.cyan(`
440
- \u{1F680} Delta Project Wizard
441
- `)),console.log(I.gray(`Answer a few questions to set up your project.
442
- `));let t={};for(let r of s$){let n=await(0,Z1.default)({type:r.type,name:r.name,message:r.message,choices:r.choices,initial:r.initial,validate:r.validate},{onCancel:()=>{console.log(I.yellow(`
443
- \u26A0\uFE0F Wizard cancelled`)),process.exit(0)}});t[r.name]=n[r.name]}let e=`./${t.projectName}`;return{projectName:t.projectName,projectPath:e,template:t.template,initializeGit:t.initializeGit,installDependencies:t.installDependencies,features:t.features||[]}}async function tS(t){console.log(I.bold.cyan(`
444
- \u{1F4E6} Creating Project...
445
- `));let e=[{name:"Creating directory",action:()=>`mkdir -p ${t.projectPath}`},{name:"Writing config",action:()=>"config"},{name:"Setting up template",action:()=>t.template}];t.initializeGit&&e.push({name:"Initializing Git",action:()=>"git init"}),t.features.includes("docker")&&e.push({name:"Creating Dockerfile",action:()=>"docker"}),t.features.includes("cicd")&&e.push({name:"Creating CI/CD workflow",action:()=>"cicd"});for(let r=0;r<e.length;r++){let n=e[r];process.stdout.write(I.gray(` [${r+1}/${e.length}] ${n.name}... `)),await new Promise(i=>setTimeout(i,300)),console.log(I.green("\u2713"))}console.log(I.bold.green(`
446
- \u2705 Project created successfully!
447
- `)),console.log(I.cyan("Next steps:")),console.log(I.gray(` cd ${t.projectPath}`)),console.log(I.gray(" delta /analyze # Analyze your code")),console.log(I.gray(" delta /status # Check project status")),console.log()}dn();Nr();var b$=g$(import.meta.url),E$=D$(b$),Xd=JSON.parse(m$(y$(E$,"../package.json"),"utf8")),Vd=If({pkg:Xd,updateCheckInterval:1e3*60*60}),hS={delta:(0,ei.default)(["#00d4ff","#7b2cbf","#ff006e"]),cyber:(0,ei.default)(["#00f5ff","#0080ff","#8000ff"]),sunset:(0,ei.default)(["#ff4e50","#fca311","#e85d04"]),neon:(0,ei.default)(["#39ff14","#00ffff","#ff00ff"]),ocean:(0,ei.default)(["#0066ff","#00ccff","#66ffff"]),fire:(0,ei.default)(["#ff4e00","#ff9500","#ffcc00"])};function w$(t="delta"){let e=Ue.textSync("DELTA",{font:"Big Money-nw",horizontalLayout:"default",verticalLayout:"default"});console.log(`
448
- `+hS[t](e)+`
449
- `)}function KU(){let t=Ue.textSync("\u0394",{font:"ANSI Shadow",horizontalLayout:"default"});console.log(hS.delta(t))}function Jd(){console.clear(),w$(),console.log(I.dim(" \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550")),console.log(),console.log(I.white.bold(" \u{1F680} Delta CLI v2.0")+I.gray(" \u2014 Next-gen code analysis & documentation")),console.log(),console.log(I.gray(" Local-first architecture with ")+I.cyan("cloud power")+I.gray(" & ")+I.magenta("AI intelligence")),console.log(),console.log(I.dim(" \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550")),console.log(),Vd.update&&(console.log(I.yellow.bold(" \u26A1 Update Available!")),console.log(I.gray(` ${Vd.update.current} \u2192 ${Vd.update.latest}`)),console.log(I.cyan(` Run: npm install -g ${Xd.name}`)),console.log())}function F$(){let t=[{cmd:"delta /help",desc:"Quick help with slash commands"},{cmd:"delta /analyze",desc:"Run analysis with / command"},{cmd:"delta /status",desc:"Check project status"},{cmd:"delta --interactive",desc:"Open interactive dashboard"}];console.log(I.bold.cyan(" Quick Start (Slash Commands Available):")),console.log(),t.forEach(({cmd:e,desc:r})=>{console.log(I.gray(" \u2022 ")+I.cyan(e)+I.gray(` \u2014 ${r}`))}),console.log(),console.log(I.dim(" Try ")+I.cyan("/help")+I.dim(", ")+I.cyan("/analyze")+I.dim(", ")+I.cyan("/status")+I.dim(" for quick access")),console.log(I.dim(" Press ")+I.bold("Ctrl+T")+I.dim(" for variants \u2022 ")+I.bold("Tab")+I.dim(" for agents \u2022 ")+I.bold("Ctrl+P")+I.dim(" for commands")),console.log()}var Zn=null;async function Yd(){if(Zn)return Zn;let t=await Lt(),e=await Ne.hasTokens(),r={defaultProvider:"local",providers:{local:{enabled:!0,maxFileSize:10*1024*1024,excludePatterns:["node_modules","dist",".git","coverage"]},remote:{enabled:e,apiUrl:t.apiUrl||"http://localhost:3000",timeout:3e4,retryAttempts:3},ai:{enabled:!1,provider:"openai"}},features:{cache:!0,offlineMode:!e,autoUpdate:!0}},n=new za(r);return Zn=jE(r,n),Zn.registerProvider(new ju(r.providers.local)),r.providers.remote.enabled&&Zn.registerProvider(new Wu(r.providers.remote)),Zn.registerProvider(new Uu(r.providers.ai)),Zn}function Kd(t){console.log(JSON.stringify(t,null,2))}function Xi(){return!process.stdout.isTTY||process.env.CI==="true"||process.env.NO_COLOR==="true"}var Nt=new bm;Nt.name("delta").description("Delta Platform - Next-gen code analysis and documentation").version(Xd.version,"-v, --version","Display version number").usage("<command> [options]").helpOption("-h, --help","Display help for command").addHelpCommand("help [command]","Display help for command");Nt.option("--no-color","Disable colored output",!1).option("--verbose","Enable verbose logging",!1);Nt.command("login").description("\u{1F510} Authenticate with Delta cloud (OAuth2 + secure keychain storage)").option("--method <type>","Auth method: oauth, pat, github, google","oauth").option("--token <token>","Personal Access Token (for CI/CD)").action(async t=>{Jd();let{loginCommand:e}=await Promise.resolve().then(()=>(dn(),X1));await e(t)});Nt.command("logout").description("\u{1F513} Remove stored authentication and clear credentials").action(async()=>{let{logoutCommand:t}=await Promise.resolve().then(()=>(iS(),nS));await t()});Nt.command("whoami").alias("me").description("\u{1F464} Show current user, plan, quota, and session info").option("--format <type>","Output format: table, json, compact","table").action(async t=>{let{whoamiCommand:e}=await Promise.resolve().then(()=>(oS(),sS));await e(t)});Nt.command("analyze [path]").alias("a").description("\u{1F50D} Run code analysis and optionally upload to cloud").option("-f, --format <type>","Output format: json, html, markdown","json").option("-o, --output <dir>","Output directory","./delta-reports").option("-i, --include <patterns...>","Include file patterns").option("-e, --exclude <patterns...>","Exclude file patterns").option("--max-size <bytes>","Max file size","10485760").option("--upload","Upload report to Delta cloud",!1).option("--project-name <name>","Project name for the report").option("--json","Output results as JSON",!1).action(async(t,e)=>{let{analyzeCommand:r}=await Promise.resolve().then(()=>(lS(),uS));await r(t||".",{format:e.format,output:e.output,include:e.include?.join(","),exclude:e.exclude?.join(","),maxSize:e.maxSize,upload:e.upload,projectName:e.projectName})});Nt.command("init [path]").description("\u{1F680} Initialize a new Delta project with wizard").option("-t, --template <name>","Project template: default, nextjs, react, node, python","default").option("-f, --force","Overwrite existing config",!1).option("--git","Initialize git repository",!1).option("--json","Output results as JSON",!1).option("--provider <name>","Execution provider: local, remote","local").option("-w, --wizard","Run interactive wizard",!1).action(async(t,e)=>{if(e.wizard||!t){let s=await eS();await tS(s);let l=await(await Yd()).execute({type:"init",command:"init",payload:{projectPath:s.projectPath,template:s.template,force:e.force,git:s.initializeGit},options:{json:e.json||Xi(),provider:e.provider}});(e.json||Xi())&&Kd(l);return}let r=await Yd(),n=t||".",i=await r.execute({type:"init",command:"init",payload:{projectPath:n,template:e.template,force:e.force,git:e.git},options:{json:e.json||Xi(),provider:e.provider}});e.json||Xi()?Kd(i):(Jd(),i.success?(console.log(`
450
- \u{1F4C1} Project initialized`),console.log(` Path: ${i.data?.projectPath}`),console.log(` Config: ${i.data?.configPath}`),console.log(` Template: ${i.data?.template}`)):(console.error(`
451
- \u274C Init failed:`,i.error?.message),process.exit(1)))});Nt.command("config").description("\u2699\uFE0F Manage CLI configuration with schema validation").option("-g, --get <key>","Get config value").option("-s, --set <key=value>","Set config value").option("-l, --list","List all config").option("--reset","Reset to default configuration").action(async t=>{let{configCommand:e}=await Promise.resolve().then(()=>(fS(),cS));await e(t)});Nt.command("status [path]").alias("st").description("\u{1F4C8} Check project health, connection status, and diagnostics").option("--diagnostics","Run full diagnostics",!1).option("--fix","Auto-fix issues where possible",!1).option("--json","Output results as JSON",!1).action(async(t,e)=>{let r=await Yd(),n=t||".",i=await r.execute({type:"status",command:"status",payload:{projectPath:n,diagnostics:e.diagnostics,fix:e.fix},options:{json:e.json||Xi()}});if(e.json||Xi())Kd(i);else if(i.success){let s=i.data;console.log(`
452
- \u{1F4CA} Project Status`),console.log(` Path: ${s?.project?.path||"N/A"}`),console.log(` Config: ${s?.project?.hasConfig?"\u2705":"\u274C"}`),console.log(` Auth: ${s?.auth?.authenticated?"\u2705":"\u274C"}`)}else console.error(`
453
- \u274C Status check failed:`,i.error?.message)});Nt.command("completion [shell]").description("\u{1F527} Generate shell completion script").option("--install","Install completion for current shell",!1).action(async(t,e)=>{let r=t||"bash";e.install?await Q1(r):console.log(zd(r))});var Ki=process.argv.slice(2),C$={"/help":"help","/h":"help","/analyze":"analyze","/a":"analyze","/status":"status","/st":"status","/init":"init","/i":"init","/login":"login","/logout":"logout","/whoami":"whoami","/me":"whoami","/config":"config","/version":"--version","/v":"--version"};if(Ki.length>0&&Ki[0].startsWith("/")){let t=Ki[0].toLowerCase(),e=C$[t];e?(e.startsWith("--"),Ki[0]=e):(console.error(I.red(`\u274C Unknown command: ${t}`)),console.log(I.gray("Run /help to see available commands")),process.exit(1))}Nt.parse(["node","delta",...Ki]);process.argv.length<=2&&(Jd(),F$(),Nt.help());export{hS as gradients,w$ as printLogo,KU as printMinimalLogo,F$ as printTips,Jd as printWelcome};
454
- /*! Bundled license information:
455
-
456
- deep-extend/lib/deep-extend.js:
457
- (*!
458
- * @description Recursive object extending
459
- * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
460
- * @license MIT
461
- *
462
- * The MIT License (MIT)
463
- *
464
- * Copyright (c) 2013-2018 Viacheslav Lotsmanov
465
- *
466
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
467
- * this software and associated documentation files (the "Software"), to deal in
468
- * the Software without restriction, including without limitation the rights to
469
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
470
- * the Software, and to permit persons to whom the Software is furnished to do so,
471
- * subject to the following conditions:
472
- *
473
- * The above copyright notice and this permission notice shall be included in all
474
- * copies or substantial portions of the Software.
475
- *
476
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
477
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
478
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
479
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
480
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
481
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
482
- *)
483
-
484
- web-streams-polyfill/dist/ponyfill.es2018.js:
485
- (**
486
- * @license
487
- * web-streams-polyfill v3.3.3
488
- * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
489
- * This code is released under the MIT license.
490
- * SPDX-License-Identifier: MIT
491
- *)
492
-
493
- fetch-blob/index.js:
494
- (*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
495
-
496
- formdata-polyfill/esm.min.js:
497
- (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
498
-
499
- node-domexception/index.js:
500
- (*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
501
-
502
- ky/distribution/index.js:
503
- (*! MIT License © Sindre Sorhus *)
504
- */