import{createRequire} from"node:module";const require=createRequire(import.meta.url);
var n=class extends Error{stdout;stderr;constructor(t,s="",e=""){super(t),this.stdout=s,this.stderr=e}prependOutput(t,s){this.stdout=t+this.stdout,this.stderr=s+this.stderr}},c=class extends n{levels;name="BreakError";constructor(t=1,s="",e=""){super("break",s,e),this.levels=t}},i=class extends n{levels;name="ContinueError";constructor(t=1,s="",e=""){super("continue",s,e),this.levels=t}},u=class extends n{exitCode;name="ReturnError";constructor(t=0,s="",e=""){super("return",s,e),this.exitCode=t}},a=class extends n{exitCode;name="ErrexitError";constructor(t,s="",e=""){super(`errexit: command exited with status ${t}`,s,e),this.exitCode=t}},d=class extends n{varName;name="NounsetError";constructor(t,s=""){super(`${t}: unbound variable`,s,`bash: ${t}: unbound variable
`),this.varName=t}},x=class extends n{exitCode;stdoutKind;stdoutEncoding;name="ExitError";constructor(t,s="",e="",o,v){super("exit",s,e),this.exitCode=t,this.stdoutKind=o,this.stdoutEncoding=v}},p=class extends n{name="ArithmeticError";fatal;constructor(t,s="",e="",o=!1){super(t,s,e),this.stderr=e||`bash: ${t}
`,this.fatal=o}},h=class extends n{name="BadSubstitutionError";constructor(t,s="",e=""){super(t,s,e),this.stderr=e||`bash: ${t}: bad substitution
`}},l=class extends n{name="GlobError";constructor(t,s="",e=""){super(`no match: ${t}`,s,e),this.stderr=e||`bash: no match: ${t}
`}},m=class extends n{name="BraceExpansionError";constructor(t,s="",e=""){super(t,s,e),this.stderr=e||`bash: ${t}
`}},b=class extends n{limitType;name="ExecutionLimitError";static EXIT_CODE=126;constructor(t,s,e="",o=""){super(t,e,o),this.limitType=s,this.stderr=o||`bash: ${t}
`}},$=class extends n{name="ExecutionAbortedError";constructor(t="",s=""){super("execution aborted",t,s)}},f=class extends n{name="SubshellExitError";constructor(t="",s=""){super("subshell exit",t,s)}};function E(r){return r instanceof c||r instanceof i||r instanceof u}var C=class extends n{exitCode;name="PosixFatalError";constructor(t,s="",e=""){super("posix fatal error",s,e),this.exitCode=t}};export{c as a,i as b,u as c,a as d,d as e,x as f,p as g,h,l as i,m as j,b as k,$ as l,f as m,E as n,C as o};
