Object.defineProperty(exports, "__esModule", { value: true });
function generateEvalUrl(type) {
    return ("http://fromjs-temporary-url.com:5555/" +
        type +
        Math.floor(Math.random() * 1000000000) +
        ".js");
}
function handleEvalScript(code, compile, details, done) {
    const type = (details && details.type) || "eval";
    const url = generateEvalUrl(type);
    return compile(code, url, function (babelResult) {
        const instrumentedCode = babelResult.code + "\n//# sourceURL=" + url;
        done({
            instrumentedCode,
            code,
            url,
            locs: babelResult.locs
        });
    });
}
exports.default = handleEvalScript;
//# sourceMappingURL=handleEvalScript.js.map