"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "lazyLoadTransformers", {
    enumerable: true,
    get: function() {
        return lazyLoadTransformers;
    }
});
let transformer = null;
async function lazyLoadTransformers() {
    if (!transformer) {
        transformer = await import("@xenova/transformers");
    }
    // @ts-expect-error
    if (typeof EdgeRuntime === "string") {
        // there is no local file system in the edge runtime
        transformer.env.allowLocalModels = false;
    }
    // fixme: handle cloudflare workers case here?
    return transformer;
}
