import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
import {
  execAsync,
  init_execAsync
} from "./chunk-XALGXSKB.js";
import {
  diag,
  init_esm
} from "./chunk-LRULMAAA.js";
import {
  __esm
} from "./chunk-5H446C7X.js";

// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js
async function getMachineId() {
  try {
    const result = await execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"');
    const idLine = result.stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
    if (!idLine) {
      return void 0;
    }
    const parts = idLine.split('" = "');
    if (parts.length === 2) {
      return parts[1].slice(0, -1);
    }
  } catch (e) {
    diag.debug(`error reading machine id: ${e}`);
  }
  return void 0;
}
var init_getMachineId_darwin = __esm({
  "../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js"() {
    init_execAsync();
    init_esm();
  }
});
init_getMachineId_darwin();
export {
  getMachineId
};
//# sourceMappingURL=getMachineId-darwin-4DP6CCJV.js.map