import{__require as r}from"../supports-color/index.mjs";import{__require as e}from"../has-flag/index.mjs";var n,t;function s(){if(t)return n;t=1;const s=r(),o=e();function i(r){if(/^\d{3,4}$/.test(r)){const e=/(\d{1,2})(\d{2})/.exec(r)||[];return{major:0,minor:parseInt(e[1],10),patch:parseInt(e[2],10)}}const e=(r||"").split(".").map(r=>parseInt(r,10));return{major:e[0],minor:e[1],patch:e[2]}}function u(r){const{CI:e,FORCE_HYPERLINK:n,NETLIFY:t,TEAMCITY_VERSION:u,TERM_PROGRAM:a,TERM_PROGRAM_VERSION:p,VTE_VERSION:c,TERM:f}=process.env;if(n)return!(n.length>0&&0===parseInt(n,10));if(o("no-hyperlink")||o("no-hyperlinks")||o("hyperlink=false")||o("hyperlink=never"))return!1;if(o("hyperlink=true")||o("hyperlink=always"))return!0;if(t)return!0;if(!s.supportsColor(r))return!1;if(r&&!r.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if("win32"===process.platform)return!1;if(e)return!1;if(u)return!1;if(a){const r=i(p||"");switch(a){case"iTerm.app":return 3===r.major?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||1===r.major&&r.minor>=72;case"ghostty":return!0}}if(c){if("0.50.0"===c)return!1;const r=i(c);return r.major>0||r.minor>=50}return"alacritty"===f}return n={supportsHyperlink:u,stdout:u(process.stdout),stderr:u(process.stderr)}}export{s as __require};