UNPKG

claude-intern

Version:

AI-powered task automation tool for JIRA and Linear. Automatically implement tasks using Claude Code with git integration and PR creation.

25 lines 383 kB
#!/usr/bin/env node import{createRequire as mz}from"node:module";var fz=Object.create;var{getPrototypeOf:hz,defineProperty:O6,getOwnPropertyNames:MZ,getOwnPropertyDescriptor:gz}=Object,LZ=Object.prototype.hasOwnProperty;var j8=($,Z,Y)=>{Y=$!=null?fz(hz($)):{};let Q=Z||!$||!$.__esModule?O6(Y,"default",{value:$,enumerable:!0}):Y;for(let z of MZ($))if(!LZ.call(Q,z))O6(Q,z,{get:()=>$[z],enumerable:!0});return Q},AZ=new WeakMap,PZ=($)=>{var Z=AZ.get($),Y;if(Z)return Z;if(Z=O6({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")MZ($).map((Q)=>!LZ.call(Z,Q)&&O6(Z,Q,{get:()=>$[Q],enumerable:!(Y=gz($,Q))||Y.enumerable}));return AZ.set($,Z),Z},T=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var vz=($,Z)=>{for(var Y in Z)O6($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:(Q)=>Z[Y]=()=>Q})};var T0=mz(import.meta.url);var S6=T((pz)=>{class O9 extends Error{constructor($,Z,Y){super(Y);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=Z,this.exitCode=$,this.nestedError=void 0}}class RZ extends O9{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}pz.CommanderError=O9;pz.InvalidArgumentError=RZ});var U8=T((lz)=>{var{InvalidArgumentError:dz}=S6();class wZ{constructor($,Z){switch(this.description=Z||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,$[0]){case"<":this.required=!0,this._name=$.slice(1,-1);break;case"[":this.required=!1,this._name=$.slice(1,-1);break;default:this.required=!0,this._name=$;break}if(this._name.length>3&&this._name.slice(-3)==="...")this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_concatValue($,Z){if(Z===this.defaultValue||!Array.isArray(Z))return[$];return Z.concat($)}default($,Z){return this.defaultValue=$,this.defaultValueDescription=Z,this}argParser($){return this.parseArg=$,this}choices($){return this.argChoices=$.slice(),this.parseArg=(Z,Y)=>{if(!this.argChoices.includes(Z))throw new dz(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(Z,Y);return Z},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function iz($){let Z=$.name()+($.variadic===!0?"...":"");return $.required?"<"+Z+">":"["+Z+"]"}lz.Argument=wZ;lz.humanReadableArgName=iz});var S9=T((nz)=>{var{humanReadableArgName:rz}=U8();class TZ{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands($){let Z=$.commands.filter((Y)=>!Y._hidden);if($._hasImplicitHelpCommand()){let[,Y,Q]=$._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),z=$.createCommand(Y).helpOption(!1);if(z.description($._helpCommandDescription),Q)z.arguments(Q);Z.push(z)}if(this.sortSubcommands)Z.sort((Y,Q)=>{return Y.name().localeCompare(Q.name())});return Z}compareOptions($,Z){let Y=(Q)=>{return Q.short?Q.short.replace(/^-/,""):Q.long.replace(/^--/,"")};return Y($).localeCompare(Y(Z))}visibleOptions($){let Z=$.options.filter((z)=>!z.hidden),Y=$._hasHelpOption&&$._helpShortFlag&&!$._findOption($._helpShortFlag),Q=$._hasHelpOption&&!$._findOption($._helpLongFlag);if(Y||Q){let z;if(!Y)z=$.createOption($._helpLongFlag,$._helpDescription);else if(!Q)z=$.createOption($._helpShortFlag,$._helpDescription);else z=$.createOption($._helpFlags,$._helpDescription);Z.push(z)}if(this.sortOptions)Z.sort(this.compareOptions);return Z}visibleGlobalOptions($){if(!this.showGlobalOptions)return[];let Z=[];for(let Y=$.parent;Y;Y=Y.parent){let Q=Y.options.filter((z)=>!z.hidden);Z.push(...Q)}if(this.sortOptions)Z.sort(this.compareOptions);return Z}visibleArguments($){if($._argsDescription)$.registeredArguments.forEach((Z)=>{Z.description=Z.description||$._argsDescription[Z.name()]||""});if($.registeredArguments.find((Z)=>Z.description))return $.registeredArguments;return[]}subcommandTerm($){let Z=$.registeredArguments.map((Y)=>rz(Y)).join(" ");return $._name+($._aliases[0]?"|"+$._aliases[0]:"")+($.options.length?" [options]":"")+(Z?" "+Z:"")}optionTerm($){return $.flags}argumentTerm($){return $.name()}longestSubcommandTermLength($,Z){return Z.visibleCommands($).reduce((Y,Q)=>{return Math.max(Y,Z.subcommandTerm(Q).length)},0)}longestOptionTermLength($,Z){return Z.visibleOptions($).reduce((Y,Q)=>{return Math.max(Y,Z.optionTerm(Q).length)},0)}longestGlobalOptionTermLength($,Z){return Z.visibleGlobalOptions($).reduce((Y,Q)=>{return Math.max(Y,Z.optionTerm(Q).length)},0)}longestArgumentTermLength($,Z){return Z.visibleArguments($).reduce((Y,Q)=>{return Math.max(Y,Z.argumentTerm(Q).length)},0)}commandUsage($){let Z=$._name;if($._aliases[0])Z=Z+"|"+$._aliases[0];let Y="";for(let Q=$.parent;Q;Q=Q.parent)Y=Q.name()+" "+Y;return Y+Z+" "+$.usage()}commandDescription($){return $.description()}subcommandDescription($){return $.summary()||$.description()}optionDescription($){let Z=[];if($.argChoices)Z.push(`choices: ${$.argChoices.map((Y)=>JSON.stringify(Y)).join(", ")}`);if($.defaultValue!==void 0){if($.required||$.optional||$.isBoolean()&&typeof $.defaultValue==="boolean")Z.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`)}if($.presetArg!==void 0&&$.optional)Z.push(`preset: ${JSON.stringify($.presetArg)}`);if($.envVar!==void 0)Z.push(`env: ${$.envVar}`);if(Z.length>0)return`${$.description} (${Z.join(", ")})`;return $.description}argumentDescription($){let Z=[];if($.argChoices)Z.push(`choices: ${$.argChoices.map((Y)=>JSON.stringify(Y)).join(", ")}`);if($.defaultValue!==void 0)Z.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`);if(Z.length>0){let Y=`(${Z.join(", ")})`;if($.description)return`${$.description} ${Y}`;return Y}return $.description}formatHelp($,Z){let Y=Z.padWidth($,Z),Q=Z.helpWidth||80,z=2,X=2;function V(B,K){if(K){let S=`${B.padEnd(Y+2)}${K}`;return Z.wrap(S,Q-2,Y+2)}return B}function J(B){return B.join(` `).replace(/^/gm," ".repeat(2))}let H=[`Usage: ${Z.commandUsage($)}`,""],j=Z.commandDescription($);if(j.length>0)H=H.concat([Z.wrap(j,Q,0),""]);let U=Z.visibleArguments($).map((B)=>{return V(Z.argumentTerm(B),Z.argumentDescription(B))});if(U.length>0)H=H.concat(["Arguments:",J(U),""]);let D=Z.visibleOptions($).map((B)=>{return V(Z.optionTerm(B),Z.optionDescription(B))});if(D.length>0)H=H.concat(["Options:",J(D),""]);if(this.showGlobalOptions){let B=Z.visibleGlobalOptions($).map((K)=>{return V(Z.optionTerm(K),Z.optionDescription(K))});if(B.length>0)H=H.concat(["Global Options:",J(B),""])}let A=Z.visibleCommands($).map((B)=>{return V(Z.subcommandTerm(B),Z.subcommandDescription(B))});if(A.length>0)H=H.concat(["Commands:",J(A),""]);return H.join(` `)}padWidth($,Z){return Math.max(Z.longestOptionTermLength($,Z),Z.longestGlobalOptionTermLength($,Z),Z.longestSubcommandTermLength($,Z),Z.longestArgumentTermLength($,Z))}wrap($,Z,Y,Q=40){let X=new RegExp(`[\\n][${" \\f\\t\\v   -    \uFEFF"}]+`);if($.match(X))return $;let V=Z-Y;if(V<Q)return $;let J=$.slice(0,Y),H=$.slice(Y).replace(`\r `,` `),j=" ".repeat(Y),D=`\\s${"​"}`,A=new RegExp(` |.{1,${V-1}}([${D}]|$)|[^${D}]+?([${D}]|$)`,"g"),B=H.match(A)||[];return J+B.map((K,S)=>{if(K===` `)return"";return(S>0?j:"")+K.trimEnd()}).join(` `)}}nz.Help=TZ});var A9=T(($X)=>{var{InvalidArgumentError:tz}=S6();class CZ{constructor($,Z){this.flags=$,this.description=Z||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let Y=NZ($);if(this.short=Y.shortFlag,this.long=Y.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($,Z){return this.defaultValue=$,this.defaultValueDescription=Z,this}preset($){return this.presetArg=$,this}conflicts($){return this.conflictsWith=this.conflictsWith.concat($),this}implies($){let Z=$;if(typeof $==="string")Z={[$]:!0};return this.implied=Object.assign(this.implied||{},Z),this}env($){return this.envVar=$,this}argParser($){return this.parseArg=$,this}makeOptionMandatory($=!0){return this.mandatory=!!$,this}hideHelp($=!0){return this.hidden=!!$,this}_concatValue($,Z){if(Z===this.defaultValue||!Array.isArray(Z))return[$];return Z.concat($)}choices($){return this.argChoices=$.slice(),this.parseArg=(Z,Y)=>{if(!this.argChoices.includes(Z))throw new tz(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(Z,Y);return Z},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){return ez(this.name().replace(/^no-/,""))}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class EZ{constructor($){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,$.forEach((Z)=>{if(Z.negate)this.negativeOptions.set(Z.attributeName(),Z);else this.positiveOptions.set(Z.attributeName(),Z)}),this.negativeOptions.forEach((Z,Y)=>{if(this.positiveOptions.has(Y))this.dualOptions.add(Y)})}valueFromOption($,Z){let Y=Z.attributeName();if(!this.dualOptions.has(Y))return!0;let Q=this.negativeOptions.get(Y).presetArg,z=Q!==void 0?Q:!1;return Z.negate===(z===$)}}function ez($){return $.split("-").reduce((Z,Y)=>{return Z+Y[0].toUpperCase()+Y.slice(1)})}function NZ($){let Z,Y,Q=$.split(/[ |,]+/);if(Q.length>1&&!/^[[<]/.test(Q[1]))Z=Q.shift();if(Y=Q.shift(),!Z&&/^-[^-]$/.test(Y))Z=Y,Y=void 0;return{shortFlag:Z,longFlag:Y}}$X.Option=CZ;$X.splitOptionFlags=NZ;$X.DualOptions=EZ});var bZ=T((GX)=>{function zX($,Z){if(Math.abs($.length-Z.length)>3)return Math.max($.length,Z.length);let Y=[];for(let Q=0;Q<=$.length;Q++)Y[Q]=[Q];for(let Q=0;Q<=Z.length;Q++)Y[0][Q]=Q;for(let Q=1;Q<=Z.length;Q++)for(let z=1;z<=$.length;z++){let X=1;if($[z-1]===Z[Q-1])X=0;else X=1;if(Y[z][Q]=Math.min(Y[z-1][Q]+1,Y[z][Q-1]+1,Y[z-1][Q-1]+X),z>1&&Q>1&&$[z-1]===Z[Q-2]&&$[z-2]===Z[Q-1])Y[z][Q]=Math.min(Y[z][Q],Y[z-2][Q-2]+1)}return Y[$.length][Z.length]}function XX($,Z){if(!Z||Z.length===0)return"";Z=Array.from(new Set(Z));let Y=$.startsWith("--");if(Y)$=$.slice(2),Z=Z.map((V)=>V.slice(2));let Q=[],z=3,X=0.4;if(Z.forEach((V)=>{if(V.length<=1)return;let J=zX($,V),H=Math.max($.length,V.length);if((H-J)/H>X){if(J<z)z=J,Q=[V];else if(J===z)Q.push(V)}}),Q.sort((V,J)=>V.localeCompare(J)),Y)Q=Q.map((V)=>`--${V}`);if(Q.length>1)return` (Did you mean one of ${Q.join(", ")}?)`;if(Q.length===1)return` (Did you mean ${Q[0]}?)`;return""}GX.suggestSimilar=XX});var hZ=T((jX)=>{var VX=T0("events").EventEmitter,M9=T0("child_process"),B1=T0("path"),L9=T0("fs"),W0=T0("process"),{Argument:JX,humanReadableArgName:BX}=U8(),{CommanderError:P9}=S6(),{Help:HX}=S9(),{Option:yZ,splitOptionFlags:_X,DualOptions:qX}=A9(),{suggestSimilar:xZ}=bZ();class R9 extends VX{constructor($){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=$||"",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:(Z)=>W0.stdout.write(Z),writeErr:(Z)=>W0.stderr.write(Z),getOutHelpWidth:()=>W0.stdout.isTTY?W0.stdout.columns:void 0,getErrHelpWidth:()=>W0.stderr.isTTY?W0.stderr.columns:void 0,outputError:(Z,Y)=>Y(Z)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings($){return this._outputConfiguration=$._outputConfiguration,this._hasHelpOption=$._hasHelpOption,this._helpFlags=$._helpFlags,this._helpDescription=$._helpDescription,this._helpShortFlag=$._helpShortFlag,this._helpLongFlag=$._helpLongFlag,this._helpCommandName=$._helpCommandName,this._helpCommandnameAndArgs=$._helpCommandnameAndArgs,this._helpCommandDescription=$._helpCommandDescription,this._helpConfiguration=$._helpConfiguration,this._exitCallback=$._exitCallback,this._storeOptionsAsProperties=$._storeOptionsAsProperties,this._combineFlagAndOptionalValue=$._combineFlagAndOptionalValue,this._allowExcessArguments=$._allowExcessArguments,this._enablePositionalOptions=$._enablePositionalOptions,this._showHelpAfterError=$._showHelpAfterError,this._showSuggestionAfterError=$._showSuggestionAfterError,this}_getCommandAndAncestors(){let $=[];for(let Z=this;Z;Z=Z.parent)$.push(Z);return $}command($,Z,Y){let Q=Z,z=Y;if(typeof Q==="object"&&Q!==null)z=Q,Q=null;z=z||{};let[,X,V]=$.match(/([^ ]+) *(.*)/),J=this.createCommand(X);if(Q)J.description(Q),J._executableHandler=!0;if(z.isDefault)this._defaultCommandName=J._name;if(J._hidden=!!(z.noHelp||z.hidden),J._executableFile=z.executableFile||null,V)J.arguments(V);if(this.commands.push(J),J.parent=this,J.copyInheritedSettings(this),Q)return this;return J}createCommand($){return new R9($)}createHelp(){return Object.assign(new HX,this.configureHelp())}configureHelp($){if($===void 0)return this._helpConfiguration;return this._helpConfiguration=$,this}configureOutput($){if($===void 0)return this._outputConfiguration;return Object.assign(this._outputConfiguration,$),this}showHelpAfterError($=!0){if(typeof $!=="string")$=!!$;return this._showHelpAfterError=$,this}showSuggestionAfterError($=!0){return this._showSuggestionAfterError=!!$,this}addCommand($,Z){if(!$._name)throw new Error(`Command passed to .addCommand() must have a name - specify the name in Command constructor or using .name()`);if(Z=Z||{},Z.isDefault)this._defaultCommandName=$._name;if(Z.noHelp||Z.hidden)$._hidden=!0;return this.commands.push($),$.parent=this,this}createArgument($,Z){return new JX($,Z)}argument($,Z,Y,Q){let z=this.createArgument($,Z);if(typeof Y==="function")z.default(Q).argParser(Y);else z.default(Y);return this.addArgument(z),this}arguments($){return $.trim().split(/ +/).forEach((Z)=>{this.argument(Z)}),this}addArgument($){let Z=this.registeredArguments.slice(-1)[0];if(Z&&Z.variadic)throw new Error(`only the last argument can be variadic '${Z.name()}'`);if($.required&&$.defaultValue!==void 0&&$.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${$.name()}'`);return this.registeredArguments.push($),this}addHelpCommand($,Z){if($===!1)this._addImplicitHelpCommand=!1;else{if(this._addImplicitHelpCommand=!0,typeof $==="string")this._helpCommandName=$.split(" ")[0],this._helpCommandnameAndArgs=$;this._helpCommandDescription=Z||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===void 0)return this.commands.length&&!this._actionHandler&&!this._findCommand("help");return this._addImplicitHelpCommand}hook($,Z){let Y=["preSubcommand","preAction","postAction"];if(!Y.includes($))throw new Error(`Unexpected value for event passed to hook : '${$}'. Expecting one of '${Y.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycleHooks[$].push(Z);else this._lifeCycleHooks[$]=[Z];return this}exitOverride($){if($)this._exitCallback=$;else this._exitCallback=(Z)=>{if(Z.code!=="commander.executeSubCommandAsync")throw Z};return this}_exit($,Z,Y){if(this._exitCallback)this._exitCallback(new P9($,Z,Y));W0.exit($)}action($){let Z=(Y)=>{let Q=this.registeredArguments.length,z=Y.slice(0,Q);if(this._storeOptionsAsProperties)z[Q]=this;else z[Q]=this.opts();return z.push(this),$.apply(this,z)};return this._actionHandler=Z,this}createOption($,Z){return new yZ($,Z)}_callParseArg($,Z,Y,Q){try{return $.parseArg(Z,Y)}catch(z){if(z.code==="commander.invalidArgument"){let X=`${Q} ${z.message}`;this.error(X,{exitCode:z.exitCode,code:z.code})}throw z}}addOption($){let Z=$.name(),Y=$.attributeName();if($.negate){let z=$.long.replace(/^--no-/,"--");if(!this._findOption(z))this.setOptionValueWithSource(Y,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(Y,$.defaultValue,"default");this.options.push($);let Q=(z,X,V)=>{if(z==null&&$.presetArg!==void 0)z=$.presetArg;let J=this.getOptionValue(Y);if(z!==null&&$.parseArg)z=this._callParseArg($,z,J,X);else if(z!==null&&$.variadic)z=$._concatValue(z,J);if(z==null)if($.negate)z=!1;else if($.isBoolean()||$.optional)z=!0;else z="";this.setOptionValueWithSource(Y,z,V)};if(this.on("option:"+Z,(z)=>{let X=`error: option '${$.flags}' argument '${z}' is invalid.`;Q(z,X,"cli")}),$.envVar)this.on("optionEnv:"+Z,(z)=>{let X=`error: option '${$.flags}' value '${z}' from env '${$.envVar}' is invalid.`;Q(z,X,"env")});return this}_optionEx($,Z,Y,Q,z){if(typeof Z==="object"&&Z instanceof yZ)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let X=this.createOption(Z,Y);if(X.makeOptionMandatory(!!$.mandatory),typeof Q==="function")X.default(z).argParser(Q);else if(Q instanceof RegExp){let V=Q;Q=(J,H)=>{let j=V.exec(J);return j?j[0]:H},X.default(z).argParser(Q)}else X.default(Q);return this.addOption(X)}option($,Z,Y,Q){return this._optionEx({},$,Z,Y,Q)}requiredOption($,Z,Y,Q){return this._optionEx({mandatory:!0},$,Z,Y,Q)}combineFlagAndOptionalValue($=!0){return this._combineFlagAndOptionalValue=!!$,this}allowUnknownOption($=!0){return this._allowUnknownOption=!!$,this}allowExcessArguments($=!0){return this._allowExcessArguments=!!$,this}enablePositionalOptions($=!0){return this._enablePositionalOptions=!!$,this}passThroughOptions($=!0){if(this._passThroughOptions=!!$,!!this.parent&&$&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties($=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this._storeOptionsAsProperties=!!$,this}getOptionValue($){if(this._storeOptionsAsProperties)return this[$];return this._optionValues[$]}setOptionValue($,Z){return this.setOptionValueWithSource($,Z,void 0)}setOptionValueWithSource($,Z,Y){if(this._storeOptionsAsProperties)this[$]=Z;else this._optionValues[$]=Z;return this._optionValueSources[$]=Y,this}getOptionValueSource($){return this._optionValueSources[$]}getOptionValueSourceWithGlobals($){let Z;return this._getCommandAndAncestors().forEach((Y)=>{if(Y.getOptionValueSource($)!==void 0)Z=Y.getOptionValueSource($)}),Z}_prepareUserArgs($,Z){if($!==void 0&&!Array.isArray($))throw new Error("first parameter to parse must be array or undefined");if(Z=Z||{},$===void 0){if($=W0.argv,W0.versions&&W0.versions.electron)Z.from="electron"}this.rawArgs=$.slice();let Y;switch(Z.from){case void 0:case"node":this._scriptPath=$[1],Y=$.slice(2);break;case"electron":if(W0.defaultApp)this._scriptPath=$[1],Y=$.slice(2);else Y=$.slice(1);break;case"user":Y=$.slice(0);break;default:throw new Error(`unexpected parse option { from: '${Z.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",Y}parse($,Z){let Y=this._prepareUserArgs($,Z);return this._parseCommand([],Y),this}async parseAsync($,Z){let Y=this._prepareUserArgs($,Z);return await this._parseCommand([],Y),this}_executeSubCommand($,Z){Z=Z.slice();let Y=!1,Q=[".js",".ts",".tsx",".mjs",".cjs"];function z(j,U){let D=B1.resolve(j,U);if(L9.existsSync(D))return D;if(Q.includes(B1.extname(U)))return;let A=Q.find((B)=>L9.existsSync(`${D}${B}`));if(A)return`${D}${A}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let X=$._executableFile||`${this._name}-${$._name}`,V=this._executableDir||"";if(this._scriptPath){let j;try{j=L9.realpathSync(this._scriptPath)}catch(U){j=this._scriptPath}V=B1.resolve(B1.dirname(j),V)}if(V){let j=z(V,X);if(!j&&!$._executableFile&&this._scriptPath){let U=B1.basename(this._scriptPath,B1.extname(this._scriptPath));if(U!==this._name)j=z(V,`${U}-${$._name}`)}X=j||X}Y=Q.includes(B1.extname(X));let J;if(W0.platform!=="win32")if(Y)Z.unshift(X),Z=fZ(W0.execArgv).concat(Z),J=M9.spawn(W0.argv[0],Z,{stdio:"inherit"});else J=M9.spawn(X,Z,{stdio:"inherit"});else Z.unshift(X),Z=fZ(W0.execArgv).concat(Z),J=M9.spawn(W0.execPath,Z,{stdio:"inherit"});if(!J.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((U)=>{W0.on(U,()=>{if(J.killed===!1&&J.exitCode===null)J.kill(U)})});let H=this._exitCallback;if(!H)J.on("close",W0.exit.bind(W0));else J.on("close",()=>{H(new P9(W0.exitCode||0,"commander.executeSubCommandAsync","(close)"))});J.on("error",(j)=>{if(j.code==="ENOENT"){let U=V?`searched for local subcommand relative to directory '${V}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",D=`'${X}' does not exist - if '${$._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead - if the default executable name is not suitable, use the executableFile option to supply a custom name or path - ${U}`;throw new Error(D)}else if(j.code==="EACCES")throw new Error(`'${X}' not executable`);if(!H)W0.exit(1);else{let U=new P9(1,"commander.executeSubCommandAsync","(error)");U.nestedError=j,H(U)}}),this.runningCommand=J}_dispatchSubcommand($,Z,Y){let Q=this._findCommand($);if(!Q)this.help({error:!0});let z;return z=this._chainOrCallSubCommandHook(z,Q,"preSubcommand"),z=this._chainOrCall(z,()=>{if(Q._executableHandler)this._executeSubCommand(Q,Z.concat(Y));else return Q._parseCommand(Z,Y)}),z}_dispatchHelpCommand($){if(!$)this.help();let Z=this._findCommand($);if(Z&&!Z._executableHandler)Z.help();return this._dispatchSubcommand($,[],[this._helpLongFlag||this._helpShortFlag])}_checkNumberOfArguments(){if(this.registeredArguments.forEach(($,Z)=>{if($.required&&this.args[Z]==null)this.missingArgument($.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let $=(Y,Q,z)=>{let X=Q;if(Q!==null&&Y.parseArg){let V=`error: command-argument value '${Q}' is invalid for argument '${Y.name()}'.`;X=this._callParseArg(Y,Q,z,V)}return X};this._checkNumberOfArguments();let Z=[];this.registeredArguments.forEach((Y,Q)=>{let z=Y.defaultValue;if(Y.variadic){if(Q<this.args.length){if(z=this.args.slice(Q),Y.parseArg)z=z.reduce((X,V)=>{return $(Y,V,X)},Y.defaultValue)}else if(z===void 0)z=[]}else if(Q<this.args.length){if(z=this.args[Q],Y.parseArg)z=$(Y,z,Y.defaultValue)}Z[Q]=z}),this.processedArgs=Z}_chainOrCall($,Z){if($&&$.then&&typeof $.then==="function")return $.then(()=>Z());return Z()}_chainOrCallHooks($,Z){let Y=$,Q=[];if(this._getCommandAndAncestors().reverse().filter((z)=>z._lifeCycleHooks[Z]!==void 0).forEach((z)=>{z._lifeCycleHooks[Z].forEach((X)=>{Q.push({hookedCommand:z,callback:X})})}),Z==="postAction")Q.reverse();return Q.forEach((z)=>{Y=this._chainOrCall(Y,()=>{return z.callback(z.hookedCommand,this)})}),Y}_chainOrCallSubCommandHook($,Z,Y){let Q=$;if(this._lifeCycleHooks[Y]!==void 0)this._lifeCycleHooks[Y].forEach((z)=>{Q=this._chainOrCall(Q,()=>{return z(this,Z)})});return Q}_parseCommand($,Z){let Y=this.parseOptions(Z);if(this._parseOptionsEnv(),this._parseOptionsImplied(),$=$.concat(Y.operands),Z=Y.unknown,this.args=$.concat(Z),$&&this._findCommand($[0]))return this._dispatchSubcommand($[0],$.slice(1),Z);if(this._hasImplicitHelpCommand()&&$[0]===this._helpCommandName)return this._dispatchHelpCommand($[1]);if(this._defaultCommandName)return kZ(this,Z),this._dispatchSubcommand(this._defaultCommandName,$,Z);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});kZ(this,Y.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let Q=()=>{if(Y.unknown.length>0)this.unknownOption(Y.unknown[0])},z=`command:${this.name()}`;if(this._actionHandler){Q(),this._processArguments();let X;if(X=this._chainOrCallHooks(X,"preAction"),X=this._chainOrCall(X,()=>this._actionHandler(this.processedArgs)),this.parent)X=this._chainOrCall(X,()=>{this.parent.emit(z,$,Z)});return X=this._chainOrCallHooks(X,"postAction"),X}if(this.parent&&this.parent.listenerCount(z))Q(),this._processArguments(),this.parent.emit(z,$,Z);else if($.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",$,Z);if(this.listenerCount("command:*"))this.emit("command:*",$,Z);else if(this.commands.length)this.unknownCommand();else Q(),this._processArguments()}else if(this.commands.length)Q(),this.help({error:!0});else Q(),this._processArguments()}_findCommand($){if(!$)return;return this.commands.find((Z)=>Z._name===$||Z._aliases.includes($))}_findOption($){return this.options.find((Z)=>Z.is($))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(($)=>{$.options.forEach((Z)=>{if(Z.mandatory&&$.getOptionValue(Z.attributeName())===void 0)$.missingMandatoryOptionValue(Z)})})}_checkForConflictingLocalOptions(){let $=this.options.filter((Y)=>{let Q=Y.attributeName();if(this.getOptionValue(Q)===void 0)return!1;return this.getOptionValueSource(Q)!=="default"});$.filter((Y)=>Y.conflictsWith.length>0).forEach((Y)=>{let Q=$.find((z)=>Y.conflictsWith.includes(z.attributeName()));if(Q)this._conflictingOption(Y,Q)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(($)=>{$._checkForConflictingLocalOptions()})}parseOptions($){let Z=[],Y=[],Q=Z,z=$.slice();function X(J){return J.length>1&&J[0]==="-"}let V=null;while(z.length){let J=z.shift();if(J==="--"){if(Q===Y)Q.push(J);Q.push(...z);break}if(V&&!X(J)){this.emit(`option:${V.name()}`,J);continue}if(V=null,X(J)){let H=this._findOption(J);if(H){if(H.required){let j=z.shift();if(j===void 0)this.optionMissingArgument(H);this.emit(`option:${H.name()}`,j)}else if(H.optional){let j=null;if(z.length>0&&!X(z[0]))j=z.shift();this.emit(`option:${H.name()}`,j)}else this.emit(`option:${H.name()}`);V=H.variadic?H:null;continue}}if(J.length>2&&J[0]==="-"&&J[1]!=="-"){let H=this._findOption(`-${J[1]}`);if(H){if(H.required||H.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${H.name()}`,J.slice(2));else this.emit(`option:${H.name()}`),z.unshift(`-${J.slice(2)}`);continue}}if(/^--[^=]+=/.test(J)){let H=J.indexOf("="),j=this._findOption(J.slice(0,H));if(j&&(j.required||j.optional)){this.emit(`option:${j.name()}`,J.slice(H+1));continue}}if(X(J))Q=Y;if((this._enablePositionalOptions||this._passThroughOptions)&&Z.length===0&&Y.length===0){if(this._findCommand(J)){if(Z.push(J),z.length>0)Y.push(...z);break}else if(J===this._helpCommandName&&this._hasImplicitHelpCommand()){if(Z.push(J),z.length>0)Z.push(...z);break}else if(this._defaultCommandName){if(Y.push(J),z.length>0)Y.push(...z);break}}if(this._passThroughOptions){if(Q.push(J),z.length>0)Q.push(...z);break}Q.push(J)}return{operands:Z,unknown:Y}}opts(){if(this._storeOptionsAsProperties){let $={},Z=this.options.length;for(let Y=0;Y<Z;Y++){let Q=this.options[Y].attributeName();$[Q]=Q===this._versionOptionName?this._version:this[Q]}return $}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(($,Z)=>Object.assign($,Z.opts()),{})}error($,Z){if(this._outputConfiguration.outputError(`${$} `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError} `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(` `),this.outputHelp({error:!0});let Y=Z||{},Q=Y.exitCode||1,z=Y.code||"commander.error";this._exit(Q,z,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in W0.env){let Z=$.attributeName();if(this.getOptionValue(Z)===void 0||["default","config","env"].includes(this.getOptionValueSource(Z)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,W0.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new qX(this.options),Z=(Y)=>{return this.getOptionValue(Y)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(Y))};this.options.filter((Y)=>Y.implied!==void 0&&Z(Y.attributeName())&&$.valueFromOption(this.getOptionValue(Y.attributeName()),Y)).forEach((Y)=>{Object.keys(Y.implied).filter((Q)=>!Z(Q)).forEach((Q)=>{this.setOptionValueWithSource(Q,Y.implied[Q],"implied")})})}missingArgument($){let Z=`error: missing required argument '${$}'`;this.error(Z,{code:"commander.missingArgument"})}optionMissingArgument($){let Z=`error: option '${$.flags}' argument missing`;this.error(Z,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue($){let Z=`error: required option '${$.flags}' not specified`;this.error(Z,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption($,Z){let Y=(X)=>{let V=X.attributeName(),J=this.getOptionValue(V),H=this.options.find((U)=>U.negate&&V===U.attributeName()),j=this.options.find((U)=>!U.negate&&V===U.attributeName());if(H&&(H.presetArg===void 0&&J===!1||H.presetArg!==void 0&&J===H.presetArg))return H;return j||X},Q=(X)=>{let V=Y(X),J=V.attributeName();if(this.getOptionValueSource(J)==="env")return`environment variable '${V.envVar}'`;return`option '${V.flags}'`},z=`error: ${Q($)} cannot be used with ${Q(Z)}`;this.error(z,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let Z="";if($.startsWith("--")&&this._showSuggestionAfterError){let Q=[],z=this;do{let X=z.createHelp().visibleOptions(z).filter((V)=>V.long).map((V)=>V.long);Q=Q.concat(X),z=z.parent}while(z&&!z._enablePositionalOptions);Z=xZ($,Q)}let Y=`error: unknown option '${$}'${Z}`;this.error(Y,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let Z=this.registeredArguments.length,Y=Z===1?"":"s",z=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${Z} argument${Y} but got ${$.length}.`;this.error(z,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],Z="";if(this._showSuggestionAfterError){let Q=[];this.createHelp().visibleCommands(this).forEach((z)=>{if(Q.push(z.name()),z.alias())Q.push(z.alias())}),Z=xZ($,Q)}let Y=`error: unknown command '${$}'${Z}`;this.error(Y,{code:"commander.unknownCommand"})}version($,Z,Y){if($===void 0)return this._version;this._version=$,Z=Z||"-V, --version",Y=Y||"output the version number";let Q=this.createOption(Z,Y);return this._versionOptionName=Q.attributeName(),this.options.push(Q),this.on("option:"+Q.name(),()=>{this._outputConfiguration.writeOut(`${$} `),this._exit(0,"commander.version",$)}),this}description($,Z){if($===void 0&&Z===void 0)return this._description;if(this._description=$,Z)this._argsDescription=Z;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let Z=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)Z=this.commands[this.commands.length-1];if($===Z._name)throw new Error("Command alias can't be the same as its name");return Z._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((Z)=>this.alias(Z)),this}usage($){if($===void 0){if(this._usage)return this._usage;let Z=this.registeredArguments.map((Y)=>{return BX(Y)});return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?Z:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}nameFromFilename($){return this._name=B1.basename($,B1.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let Z=this.createHelp();if(Z.helpWidth===void 0)Z.helpWidth=$&&$.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth();return Z.formatHelp(this,Z)}_getHelpContext($){$=$||{};let Z={error:!!$.error},Y;if(Z.error)Y=(Q)=>this._outputConfiguration.writeErr(Q);else Y=(Q)=>this._outputConfiguration.writeOut(Q);return Z.write=$.write||Y,Z.command=this,Z}outputHelp($){let Z;if(typeof $==="function")Z=$,$=void 0;let Y=this._getHelpContext($);this._getCommandAndAncestors().reverse().forEach((z)=>z.emit("beforeAllHelp",Y)),this.emit("beforeHelp",Y);let Q=this.helpInformation(Y);if(Z){if(Q=Z(Q),typeof Q!=="string"&&!Buffer.isBuffer(Q))throw new Error("outputHelp callback must return a string or a Buffer")}if(Y.write(Q),this._helpLongFlag)this.emit(this._helpLongFlag);this.emit("afterHelp",Y),this._getCommandAndAncestors().forEach((z)=>z.emit("afterAllHelp",Y))}helpOption($,Z){if(typeof $==="boolean")return this._hasHelpOption=$,this;this._helpFlags=$||this._helpFlags,this._helpDescription=Z||this._helpDescription;let Y=_X(this._helpFlags);return this._helpShortFlag=Y.shortFlag,this._helpLongFlag=Y.longFlag,this}help($){this.outputHelp($);let Z=W0.exitCode||0;if(Z===0&&$&&typeof $!=="function"&&$.error)Z=1;this._exit(Z,"commander.help","(outputHelp)")}addHelpText($,Z){let Y=["beforeAll","before","after","afterAll"];if(!Y.includes($))throw new Error(`Unexpected value for position to addHelpText. Expecting one of '${Y.join("', '")}'`);let Q=`${$}Help`;return this.on(Q,(z)=>{let X;if(typeof Z==="function")X=Z({error:z.error,command:z.command});else X=Z;if(X)z.write(`${X} `)}),this}}function kZ($,Z){if($._hasHelpOption&&Z.find((Q)=>Q===$._helpLongFlag||Q===$._helpShortFlag))$.outputHelp(),$._exit(0,"commander.helpDisplayed","(outputHelp)")}function fZ($){return $.map((Z)=>{if(!Z.startsWith("--inspect"))return Z;let Y,Q="127.0.0.1",z="9229",X;if((X=Z.match(/^(--inspect(-brk)?)$/))!==null)Y=X[1];else if((X=Z.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(Y=X[1],/^\d+$/.test(X[3]))z=X[3];else Q=X[3];else if((X=Z.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)Y=X[1],Q=X[3],z=X[4];if(Y&&z!=="0")return`${Y}=${Q}:${parseInt(z)+1}`;return Z})}jX.Command=R9});var pZ=T((r0,mZ)=>{var{Argument:IX}=U8(),{Command:gZ}=hZ(),{CommanderError:FX,InvalidArgumentError:vZ}=S6(),{Help:DX}=S9(),{Option:KX}=A9();r0=mZ.exports=new gZ;r0.program=r0;r0.Command=gZ;r0.Option=KX;r0.Argument=IX;r0.Help=DX;r0.CommanderError=FX;r0.InvalidArgumentError=vZ;r0.InvalidOptionArgumentError=vZ});var cZ=T((NJ,OX)=>{OX.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var oZ=T((bJ,H1)=>{var w9=T0("fs"),I8=T0("path"),SX=T0("os"),AX=T0("crypto"),MX=cZ(),T9=MX.version,LX=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function PX($){let Z={},Y=$.toString();Y=Y.replace(/\r\n?/mg,` `);let Q;while((Q=LX.exec(Y))!=null){let z=Q[1],X=Q[2]||"";X=X.trim();let V=X[0];if(X=X.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),V==='"')X=X.replace(/\\n/g,` `),X=X.replace(/\\r/g,"\r");Z[z]=X}return Z}function RX($){$=$||{};let Z=sZ($);$.path=Z;let Y=O0.configDotenv($);if(!Y.parsed){let V=new Error(`MISSING_DATA: Cannot parse ${Z} for an unknown reason`);throw V.code="MISSING_DATA",V}let Q=lZ($).split(","),z=Q.length,X;for(let V=0;V<z;V++)try{let J=Q[V].trim(),H=TX(Y,J);X=O0.decrypt(H.ciphertext,H.key);break}catch(J){if(V+1>=z)throw J}return O0.parse(X)}function wX($){console.log(`[dotenv@${T9}][WARN] ${$}`)}function M6($){console.log(`[dotenv@${T9}][DEBUG] ${$}`)}function iZ($){console.log(`[dotenv@${T9}] ${$}`)}function lZ($){if($&&$.DOTENV_KEY&&$.DOTENV_KEY.length>0)return $.DOTENV_KEY;if(process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0)return process.env.DOTENV_KEY;return""}function TX($,Z){let Y;try{Y=new URL(Z)}catch(J){if(J.code==="ERR_INVALID_URL"){let H=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw H.code="INVALID_DOTENV_KEY",H}throw J}let Q=Y.password;if(!Q){let J=new Error("INVALID_DOTENV_KEY: Missing key part");throw J.code="INVALID_DOTENV_KEY",J}let z=Y.searchParams.get("environment");if(!z){let J=new Error("INVALID_DOTENV_KEY: Missing environment part");throw J.code="INVALID_DOTENV_KEY",J}let X=`DOTENV_VAULT_${z.toUpperCase()}`,V=$.parsed[X];if(!V){let J=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${X} in your .env.vault file.`);throw J.code="NOT_FOUND_DOTENV_ENVIRONMENT",J}return{ciphertext:V,key:Q}}function sZ($){let Z=null;if($&&$.path&&$.path.length>0)if(Array.isArray($.path)){for(let Y of $.path)if(w9.existsSync(Y))Z=Y.endsWith(".vault")?Y:`${Y}.vault`}else Z=$.path.endsWith(".vault")?$.path:`${$.path}.vault`;else Z=I8.resolve(process.cwd(),".env.vault");if(w9.existsSync(Z))return Z;return null}function dZ($){return $[0]==="~"?I8.join(SX.homedir(),$.slice(1)):$}function CX($){let Z=Boolean($&&$.debug),Y=$&&"quiet"in $?$.quiet:!0;if(Z||!Y)iZ("Loading env from encrypted .env.vault");let Q=O0._parseVault($),z=process.env;if($&&$.processEnv!=null)z=$.processEnv;return O0.populate(z,Q,$),{parsed:Q}}function EX($){let Z=I8.resolve(process.cwd(),".env"),Y="utf8",Q=Boolean($&&$.debug),z=$&&"quiet"in $?$.quiet:!0;if($&&$.encoding)Y=$.encoding;else if(Q)M6("No encoding is specified. UTF-8 is used by default");let X=[Z];if($&&$.path)if(!Array.isArray($.path))X=[dZ($.path)];else{X=[];for(let j of $.path)X.push(dZ(j))}let V,J={};for(let j of X)try{let U=O0.parse(w9.readFileSync(j,{encoding:Y}));O0.populate(J,U,$)}catch(U){if(Q)M6(`Failed to load ${j} ${U.message}`);V=U}let H=process.env;if($&&$.processEnv!=null)H=$.processEnv;if(O0.populate(H,J,$),Q||!z){let j=Object.keys(J).length,U=[];for(let D of X)try{let A=I8.relative(process.cwd(),D);U.push(A)}catch(A){if(Q)M6(`Failed to load ${D} ${A.message}`);V=A}iZ(`injecting env (${j}) from ${U.join(",")}`)}if(V)return{parsed:J,error:V};else return{parsed:J}}function NX($){if(lZ($).length===0)return O0.configDotenv($);let Z=sZ($);if(!Z)return wX(`You set DOTENV_KEY but you are missing a .env.vault file at ${Z}. Did you forget to build it?`),O0.configDotenv($);return O0._configVault($)}function bX($,Z){let Y=Buffer.from(Z.slice(-64),"hex"),Q=Buffer.from($,"base64"),z=Q.subarray(0,12),X=Q.subarray(-16);Q=Q.subarray(12,-16);try{let V=AX.createDecipheriv("aes-256-gcm",Y,z);return V.setAuthTag(X),`${V.update(Q)}${V.final()}`}catch(V){let J=V instanceof RangeError,H=V.message==="Invalid key length",j=V.message==="Unsupported state or unable to authenticate data";if(J||H){let U=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw U.code="INVALID_DOTENV_KEY",U}else if(j){let U=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw U.code="DECRYPTION_FAILED",U}else throw V}}function yX($,Z,Y={}){let Q=Boolean(Y&&Y.debug),z=Boolean(Y&&Y.override);if(typeof Z!=="object"){let X=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw X.code="OBJECT_REQUIRED",X}for(let X of Object.keys(Z))if(Object.prototype.hasOwnProperty.call($,X)){if(z===!0)$[X]=Z[X];if(Q)if(z===!0)M6(`"${X}" is already defined and WAS overwritten`);else M6(`"${X}" is already defined and was NOT overwritten`)}else $[X]=Z[X]}var O0={configDotenv:EX,_configVault:CX,_parseVault:RX,config:NX,decrypt:bX,parse:PX,populate:yX};bJ.configDotenv=O0.configDotenv;bJ._configVault=O0._configVault;bJ._parseVault=O0._parseVault;bJ.config=O0.config;bJ.decrypt=O0.decrypt;bJ.parse=O0.parse;bJ.populate=O0.populate;H1.exports=O0});var r1=T((yJ,rZ)=>{rZ.exports=h1;h1.CAPTURING_PHASE=1;h1.AT_TARGET=2;h1.BUBBLING_PHASE=3;function h1($,Z){if(this.type="",this.target=null,this.currentTarget=null,this.eventPhase=h1.AT_TARGET,this.bubbles=!1,this.cancelable=!1,this.isTrusted=!1,this.defaultPrevented=!1,this.timeStamp=Date.now(),this._propagationStopped=!1,this._immediatePropagationStopped=!1,this._initialized=!0,this._dispatching=!1,$)this.type=$;if(Z)for(var Y in Z)this[Y]=Z[Y]}h1.prototype=Object.create(Object.prototype,{constructor:{value:h1},stopPropagation:{value:function $(){this._propagationStopped=!0}},stopImmediatePropagation:{value:function $(){this._propagationStopped=!0,this._immediatePropagationStopped=!0}},preventDefault:{value:function $(){if(this.cancelable)this.defaultPrevented=!0}},initEvent:{value:function $(Z,Y,Q){if(this._initialized=!0,this._dispatching)return;this._propagationStopped=!1,this._immediatePropagationStopped=!1,this.defaultPrevented=!1,this.isTrusted=!1,this.target=null,this.type=Z,this.bubbles=Y,this.cancelable=Q}}})});var E9=T((xJ,aZ)=>{var nZ=r1();aZ.exports=C9;function C9(){nZ.call(this),this.view=null,this.detail=0}C9.prototype=Object.create(nZ.prototype,{constructor:{value:C9},initUIEvent:{value:function($,Z,Y,Q,z){this.initEvent($,Z,Y),this.view=Q,this.detail=z}}})});var b9=T((kJ,eZ)=>{var tZ=E9();eZ.exports=N9;function N9(){tZ.call(this),this.screenX=this.screenY=this.clientX=this.clientY=0,this.ctrlKey=this.altKey=this.shiftKey=this.metaKey=!1,this.button=0,this.buttons=1,this.relatedTarget=null}N9.prototype=Object.create(tZ.prototype,{constructor:{value:N9},initMouseEvent:{value:function($,Z,Y,Q,z,X,V,J,H,j,U,D,A,B,K){switch(this.initEvent($,Z,Y,Q,z),this.screenX=X,this.screenY=V,this.clientX=J,this.clientY=H,this.ctrlKey=j,this.altKey=U,this.shiftKey=D,this.metaKey=A,this.button=B,B){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2;break;default:this.buttons=0;break}this.relatedTarget=K}},getModifierState:{value:function($){switch($){case"Alt":return this.altKey;case"Control":return this.ctrlKey;case"Shift":return this.shiftKey;case"Meta":return this.metaKey;default:return!1}}}})});var K8=T((fJ,Z7)=>{Z7.exports=D8;var pX=1,uX=3,cX=4,dX=5,iX=7,lX=8,sX=9,oX=11,rX=12,nX=13,aX=14,tX=15,eX=17,$G=18,ZG=19,YG=20,QG=21,zG=22,XG=23,GG=24,WG=25,VG=[null,"INDEX_SIZE_ERR",null,"HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR",null,"NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INUSE_ATTRIBUTE_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR",null,"TYPE_MISMATCH_ERR","SECURITY_ERR","NETWORK_ERR","ABORT_ERR","URL_MISMATCH_ERR","QUOTA_EXCEEDED_ERR","TIMEOUT_ERR","INVALID_NODE_TYPE_ERR","DATA_CLONE_ERR"],JG=[null,"INDEX_SIZE_ERR (1): the index is not in the allowed range",null,"HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model","WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required","INVALID_CHARACTER_ERR (5): the string contains invalid characters",null,"NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified","NOT_FOUND_ERR (8): the object can not be found here","NOT_SUPPORTED_ERR (9): this operation is not supported","INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute","INVALID_STATE_ERR (11): the object is in an invalid state","SYNTAX_ERR (12): the string did not match the expected pattern","INVALID_MODIFICATION_ERR (13): the object can not be modified in this way","NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML","INVALID_ACCESS_ERR (15): the object does not support the operation or argument",null,"TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type","SECURITY_ERR (18): the operation is insecure","NETWORK_ERR (19): a network error occurred","ABORT_ERR (20): the user aborted an operation","URL_MISMATCH_ERR (21): the given URL does not match another URL","QUOTA_EXCEEDED_ERR (22): the quota has been exceeded","TIMEOUT_ERR (23): a timeout occurred","INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation","DATA_CLONE_ERR (25): the object can not be cloned."],$7={INDEX_SIZE_ERR:pX,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:uX,WRONG_DOCUMENT_ERR:cX,INVALID_CHARACTER_ERR:dX,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:iX,NOT_FOUND_ERR:lX,NOT_SUPPORTED_ERR:sX,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:oX,SYNTAX_ERR:rX,INVALID_MODIFICATION_ERR:nX,NAMESPACE_ERR:aX,INVALID_ACCESS_ERR:tX,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:eX,SECURITY_ERR:$G,NETWORK_ERR:ZG,ABORT_ERR:YG,URL_MISMATCH_ERR:QG,QUOTA_EXCEEDED_ERR:zG,TIMEOUT_ERR:XG,INVALID_NODE_TYPE_ERR:GG,DATA_CLONE_ERR:WG};function D8($){Error.call(this),Error.captureStackTrace(this,this.constructor),this.code=$,this.message=JG[$],this.name=VG[$]}D8.prototype.__proto__=Error.prototype;for(L6 in $7)F8={value:$7[L6]},Object.defineProperty(D8,L6,F8),Object.defineProperty(D8.prototype,L6,F8);var F8,L6});var O8=T((BG)=>{BG.isApiWritable=!globalThis.__domino_frozen__});var q0=T((qG)=>{var _0=K8(),D0=_0,_G=O8().isApiWritable;qG.NAMESPACE={HTML:"http://www.w3.org/1999/xhtml",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink"};qG.IndexSizeError=function(){throw new _0(D0.INDEX_SIZE_ERR)};qG.HierarchyRequestError=function(){throw new _0(D0.HIERARCHY_REQUEST_ERR)};qG.WrongDocumentError=function(){throw new _0(D0.WRONG_DOCUMENT_ERR)};qG.InvalidCharacterError=function(){throw new _0(D0.INVALID_CHARACTER_ERR)};qG.NoModificationAllowedError=function(){throw new _0(D0.NO_MODIFICATION_ALLOWED_ERR)};qG.NotFoundError=function(){throw new _0(D0.NOT_FOUND_ERR)};qG.NotSupportedError=function(){throw new _0(D0.NOT_SUPPORTED_ERR)};qG.InvalidStateError=function(){throw new _0(D0.INVALID_STATE_ERR)};qG.SyntaxError=function(){throw new _0(D0.SYNTAX_ERR)};qG.InvalidModificationError=function(){throw new _0(D0.INVALID_MODIFICATION_ERR)};qG.NamespaceError=function(){throw new _0(D0.NAMESPACE_ERR)};qG.InvalidAccessError=function(){throw new _0(D0.INVALID_ACCESS_ERR)};qG.TypeMismatchError=function(){throw new _0(D0.TYPE_MISMATCH_ERR)};qG.SecurityError=function(){throw new _0(D0.SECURITY_ERR)};qG.NetworkError=function(){throw new _0(D0.NETWORK_ERR)};qG.AbortError=function(){throw new _0(D0.ABORT_ERR)};qG.UrlMismatchError=function(){throw new _0(D0.URL_MISMATCH_ERR)};qG.QuotaExceededError=function(){throw new _0(D0.QUOTA_EXCEEDED_ERR)};qG.TimeoutError=function(){throw new _0(D0.TIMEOUT_ERR)};qG.InvalidNodeTypeError=function(){throw new _0(D0.INVALID_NODE_TYPE_ERR)};qG.DataCloneError=function(){throw new _0(D0.DATA_CLONE_ERR)};qG.nyi=function(){throw new Error("NotYetImplemented")};qG.shouldOverride=function(){throw new Error("Abstract function; should be overriding in subclass.")};qG.assert=function($,Z){if(!$)throw new Error("Assertion failed: "+(Z||"")+` `+new Error().stack)};qG.expose=function($,Z){for(var Y in $)Object.defineProperty(Z.prototype,Y,{value:$[Y],writable:_G})};qG.merge=function($,Z){for(var Y in Z)$[Y]=Z[Y]};qG.documentOrder=function($,Z){return 3-($.compareDocumentPosition(Z)&6)};qG.toASCIILowerCase=function($){return $.replace(/[A-Z]+/g,function(Z){return Z.toLowerCase()})};qG.toASCIIUpperCase=function($){return $.replace(/[a-z]+/g,function(Z){return Z.toUpperCase()})}});var y9=T((vJ,Q7)=>{var g1=r1(),dG=b9(),iG=q0();Q7.exports=Y7;function Y7(){}Y7.prototype={addEventListener:function $(Z,Y,Q){if(!Y)return;if(Q===void 0)Q=!1;if(!this._listeners)this._listeners=Object.create(null);if(!this._listeners[Z])this._listeners[Z]=[];var z=this._listeners[Z];for(var X=0,V=z.length;X<V;X++){var J=z[X];if(J.listener===Y&&J.capture===Q)return}var H={listener:Y,capture:Q};if(typeof Y==="function")H.f=Y;z.push(H)},removeEventListener:function $(Z,Y,Q){if(Q===void 0)Q=!1;if(this._listeners){var z=this._listeners[Z];if(z)for(var X=0,V=z.length;X<V;X++){var J=z[X];if(J.listener===Y&&J.capture===Q){if(z.length===1)this._listeners[Z]=void 0;else z.splice(X,1);return}}}},dispatchEvent:function $(Z){return this._dispatchEvent(Z,!1)},_dispatchEvent:function $(Z,Y){if(typeof Y!=="boolean")Y=!1;function Q(j,U){var{type:D,eventPhase:A}=U;if(U.currentTarget=j,A!==g1.CAPTURING_PHASE&&j._handlers&&j._handlers[D]){var B=j._handlers[D],K;if(typeof B==="function")K=B.call(U.currentTarget,U);else{var S=B.handleEvent;if(typeof S!=="function")throw new TypeError("handleEvent property of event handler object isnot a function.");K=S.call(B,U)}switch(U.t