"use strict";
/* Socket Lib - Built with esbuild */
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var internal_exports = {};
__export(internal_exports, {
  customLog: () => customLog,
  debugByNamespace: () => debugByNamespace,
  getPointingTriangle: () => getPointingTriangle,
  getUtil: () => import_util2.getNodeUtil,
  logger: () => logger
});
module.exports = __toCommonJS(internal_exports);
var import_is_unicode_supported = __toESM(require("../external/@socketregistry/is-unicode-supported"));
var import_debug = __toESM(require("../external/debug"));
var import_logger = require("../logger/logger");
var import_map_set = require("../primordials/map-set");
var import_reflect = require("../primordials/reflect");
var import_util = require("../node/util");
var import_util2 = require("../node/util");
const logger = (0, import_logger.getDefaultLogger)();
const debugByNamespace = new import_map_set.MapCtor();
let _pointingTriangle;
// @__NO_SIDE_EFFECTS__
function customLog(...args) {
  const util = (0, import_util.getNodeUtil)();
  const inspectOpts = import_debug.default.inspectOpts ? {
    ...import_debug.default.inspectOpts,
    showHidden: import_debug.default.inspectOpts.showHidden === null ? void 0 : import_debug.default.inspectOpts.showHidden,
    depth: import_debug.default.inspectOpts.depth === null || typeof import_debug.default.inspectOpts.depth === "boolean" ? void 0 : import_debug.default.inspectOpts.depth
  } : {};
  (0, import_reflect.ReflectApply)(logger.info, logger, [
    util.formatWithOptions(inspectOpts, ...args)
  ]);
}
// @__NO_SIDE_EFFECTS__
function getPointingTriangle() {
  if (_pointingTriangle === void 0) {
    const supported = (0, import_is_unicode_supported.default)();
    _pointingTriangle = supported ? "\u25B8" : ">";
  }
  return _pointingTriangle;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  customLog,
  debugByNamespace,
  getPointingTriangle,
  getUtil,
  logger
});
