// @bun
var K={debug:0,info:1,warn:2,error:3,silent:4},B="info",F="[dtsx]",I=!1,H=null;function y(j){return K[j]>=K[B]}function Q(){if(!I)return"";return`[${new Date().toISOString().slice(11,23)}] `}function S(j,C){let k=Q();if(j||k)return[`${k}${j}`,...C];return C}function z(j,C,k){let q=S(C,k);if(H){H(j,...q);return}switch(j){case"debug":console.debug(...q);break;case"info":console.log(...q);break;case"warn":console.warn(...q);break;case"error":console.error(...q);break}}function J(j){return{debug:(...k)=>{if(y("debug"))z("debug",j,k)},info:(...k)=>{if(y("info"))z("info",j,k)},warn:(...k)=>{if(y("warn"))z("warn",j,k)},error:(...k)=>{if(y("error"))z("error",j,k)},setLevel:(k)=>{B=k},getLevel:()=>B,child:(k)=>{let q=j?`${j}:${k}`:`[${k}]`;return J(q)},time:(k)=>{let q=performance.now();return()=>{let M=performance.now()-q;if(y("debug"))z("debug",j,[`${k}: ${M.toFixed(2)}ms`])}},progress:(k)=>{if(y("info"))if(typeof process<"u"&&process.stdout?.isTTY)process.stdout.write(`\r${j} ${k}`);else z("info",j,[k])}}}function Y(j={}){if(j.level)B=j.level;if(j.prefix!==void 0)F=j.prefix;if(j.timestamps!==void 0)I=j.timestamps;if(j.output)H=j.output;return J(F)}var U=J(F);function Z(j){return U.child(j)}function $(j){B=j}function N(){return B}function D(j){F=j}function G(j){I=j}var X={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},setLevel:()=>{},getLevel:()=>"silent",child:()=>X,time:()=>()=>{},progress:()=>{}};
export{Y as Uc,U as Vc,Z as Wc,$ as Xc,N as Yc,D as Zc,G as _c,X as $c};
