"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var warmup_exports = {};
__export(warmup_exports, {
  _getLocalInferenceModule: () => _getLocalInferenceModule
});
module.exports = __toCommonJS(warmup_exports);
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
var import_node_module = require("node:module");
var import_log = require("../log.cjs");
const cjsRequire = (0, import_node_module.createRequire)(importMetaUrl);
let nativeMod;
let triedLoad = false;
function getNative() {
  if (triedLoad) return nativeMod;
  triedLoad = true;
  try {
    nativeMod = cjsRequire("@livekit/local-inference");
    return nativeMod;
  } catch (err) {
    (0, import_log.log)().warn(
      { err: err instanceof Error ? err.message : String(err) },
      "@livekit/local-inference native binding not loadable; local VAD/EOT paths disabled"
    );
    return void 0;
  }
}
function _getLocalInferenceModule() {
  return getNative();
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  _getLocalInferenceModule
});
//# sourceMappingURL=_warmup.cjs.map