import{createRequire} from"node:module";const require=createRequire(import.meta.url); function a(r,s,t){if(!r)return r;let e=r.replace(/\n\s+at\s.*/g,"");return t&&(e=e.replace(/\bfile:\/\/\/?[^\s'",)}\]:]+/g,"")),e=e.replace(s?/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap|workspace|root|srv|mnt|app))\b[^\s'",)}\]:]*/g:/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap))\b[^\s'",)}\]:]*/g,""),e=e.replace(/node:internal\/[^\s'",)}\]:]+/g,""),e=e.replace(/[A-Z]:\\[^\s'",)}\]:]+/g,""),t&&(e=e.replace(/\\\\[^\s\\]+\\[^\s'",)}\]:]+/g,"")),e}function n(r){return a(r,!1,!1)}function i(r){return a(r,!0,!0)}export{n as a,i as b};