import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
import {
  execAsync,
  init_execAsync
} from "./chunk-L2A6JPIQ.js";
import {
  diag,
  init_esm
} from "./chunk-MV6JXS2P.js";
import {
  __esm
} from "./chunk-KVSDPGUI.js";

// ../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/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/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/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-OW6SYINH.js.map