// @bun
import{MG as Q,PG as _}from"./chunk-xyhgvt88.js";var X=Q((c,W)=>{W.exports=(x,O=process.argv)=>{let j=x.startsWith("-")?"":x.length===1?"-":"--",q=O.indexOf(j+x),K=O.indexOf("--");return q!==-1&&(K===-1||q<K)}});var w=Q((y,$)=>{var N=_("os"),Z=_("tty"),B=X(),{env:k}=process,D;if(B("no-color")||B("no-colors")||B("color=false")||B("color=never"))D=0;else if(B("color")||B("colors")||B("color=true")||B("color=always"))D=1;if("FORCE_COLOR"in k)if(k.FORCE_COLOR==="true")D=1;else if(k.FORCE_COLOR==="false")D=0;else D=k.FORCE_COLOR.length===0?1:Math.min(parseInt(k.FORCE_COLOR,10),3);function U(x){if(x===0)return!1;return{level:x,hasBasic:!0,has256:x>=2,has16m:x>=3}}function V(x,O){if(D===0)return 0;if(B("color=16m")||B("color=full")||B("color=truecolor"))return 3;if(B("color=256"))return 2;if(x&&!O&&D===void 0)return 0;let j=D||0;if(k.TERM==="dumb")return j;if(process.platform==="win32"){let q=N.release().split(".");if(Number(q[0])>=10&&Number(q[2])>=10586)return Number(q[2])>=14931?3:2;return 1}if("CI"in k){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((q)=>(q in k))||k.CI_NAME==="codeship")return 1;return j}if("TEAMCITY_VERSION"in k)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(k.TEAMCITY_VERSION)?1:0;if(k.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in k){let q=parseInt((k.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(k.TERM_PROGRAM){case"iTerm.app":return q>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(k.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(k.TERM))return 1;if("COLORTERM"in k)return 1;return j}function P(x){let O=V(x,x&&x.isTTY);return U(O)}$.exports={supportsColor:P,stdout:U(V(!0,Z.isatty(1))),stderr:U(V(!0,Z.isatty(2)))}});var T=Q((i,z)=>{var G=1000,H=G*60,J=H*60,E=J*24,I=E*7,Y=E*365.25;z.exports=function(x,O){O=O||{};var j=typeof x;if(j==="string"&&x.length>0)return R(x);else if(j==="number"&&isFinite(x))return O.long?L(x):S(x);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(x))};function R(x){if(x=String(x),x.length>100)return;var O=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(x);if(!O)return;var j=parseFloat(O[1]),q=(O[2]||"ms").toLowerCase();switch(q){case"years":case"year":case"yrs":case"yr":case"y":return j*Y;case"weeks":case"week":case"w":return j*I;case"days":case"day":case"d":return j*E;case"hours":case"hour":case"hrs":case"hr":case"h":return j*J;case"minutes":case"minute":case"mins":case"min":case"m":return j*H;case"seconds":case"second":case"secs":case"sec":case"s":return j*G;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return j;default:return}}function S(x){var O=Math.abs(x);if(O>=E)return Math.round(x/E)+"d";if(O>=J)return Math.round(x/J)+"h";if(O>=H)return Math.round(x/H)+"m";if(O>=G)return Math.round(x/G)+"s";return x+"ms"}function L(x){var O=Math.abs(x);if(O>=E)return M(x,O,E,"day");if(O>=J)return M(x,O,J,"hour");if(O>=H)return M(x,O,H,"minute");if(O>=G)return M(x,O,G,"second");return x+" ms"}function M(x,O,j,q){var K=O>=j*1.5;return Math.round(x/j)+" "+q+(K?"s":"")}});
export{T as ij,w as jj};
