var __bare_os_bundle_exports__ = (() => { 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 __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) { if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x + '" is not supported'); }); var __commonJS = (cb, mod) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; 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); // ../../node_modules/bare-cpu-info/binding.js var require_binding = __commonJS({ "../../node_modules/bare-cpu-info/binding.js"(exports, module) { module.exports = __require.addon(); } }); // ../../node_modules/bare-cpu-info/lib/constants.js var require_constants = __commonJS({ "../../node_modules/bare-cpu-info/lib/constants.js"(exports) { exports.arch = { UNKNOWN: 0, X86: 1, X86_64: 2, ARM: 3, ARM64: 4 }; exports.coreType = { UNKNOWN: 0, PERFORMANCE: 1, EFFICIENCY: 2 }; exports.cache = { L1D: 0, L1I: 1, L2: 2, L3: 3 }; } }); // ../../node_modules/bare-cpu-info/index.js var require_bare_cpu_info = __commonJS({ "../../node_modules/bare-cpu-info/index.js"(exports, module) { var binding = require_binding(); var constants = require_constants(); module.exports = exports = class CPUInfo { constructor() { this._destroyed = false; binding.init(this); } query() { this._check(); return normalizeCpu(binding.query(this)); } features() { this._check(); return binding.features(this); } sample() { this._check(); return normalizeUsage(binding.sample(this)); } coreCount() { this._check(); return binding.coreCount(this); } coreUsage(index) { this._check(); validateIndex(index, this.coreCount()); return normalizeUsage(binding.coreUsage(this, index)); } coreType(index) { this._check(); validateIndex(index, this.coreCount()); return binding.coreType(this, index); } coreFrequency(index) { this._check(); validateIndex(index, this.coreCount()); const frequency = binding.coreFrequency(this, index); return frequency === 0 ? void 0 : frequency; } coreCache(index, level) { this._check(); validateIndex(index, this.coreCount()); validateInteger(level, "Cache level"); const size = binding.coreCache(this, index, level); return size === 0 ? void 0 : size; } destroy() { if (this._destroyed) return; this._destroyed = true; binding.destroy(this); } [Symbol.dispose]() { this.destroy(); } _check() { if (this._destroyed) { throw new Error("CPU information has been destroyed"); } } }; exports.CPUInfo = exports; exports.constants = constants; function normalizeCpu(cpu) { if (cpu.name === "") cpu.name = null; if (cpu.vendor === "") cpu.vendor = null; if (cpu.frequency === 0) cpu.frequency = void 0; if (cpu.cacheLine === 0) cpu.cacheLine = void 0; if (cpu.memory < 0) cpu.memory = void 0; return cpu; } function normalizeUsage(usage) { if (usage.compute < 0) usage.compute = void 0; if (usage.memoryUsed < 0) usage.memoryUsed = void 0; if (usage.memoryTotal < 0) usage.memoryTotal = void 0; return usage; } function validateIndex(index, count) { if (!Number.isInteger(index)) { throw new TypeError(`Index must be an integer. Received type ${typeof index} (${index})`); } if (index < 0 || index >= count) { throw new RangeError(`Index ${index} out of range [0, ${count})`); } } function validateInteger(value, name) { if (!Number.isInteger(value)) { throw new TypeError(`${name} must be an integer. Received type ${typeof value} (${value})`); } } } }); // ../../bare-lib-entry-bareCpuInfo.js var bare_lib_entry_bareCpuInfo_exports = {}; __export(bare_lib_entry_bareCpuInfo_exports, { default: () => bare_lib_entry_bareCpuInfo_default }); var import_bare_cpu_info = __toESM(require_bare_cpu_info()); var bare_lib_entry_bareCpuInfo_default = import_bare_cpu_info.default; return __toCommonJS(bare_lib_entry_bareCpuInfo_exports); })(); ;(function(){var g=globalThis;var s="__bare_os_stdlib__";g[s]=g[s]||{};var e=typeof __bare_os_bundle_exports__!=="undefined"?__bare_os_bundle_exports__:void 0;var v=e!=null&&typeof e==="object"&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;g[s]["bareCpuInfo"]=v;})();