"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromBundle = void 0;
const weakMerge_1 = require("../types/weakMerge");
const id_1 = require("../util/id");
const fromSpec_1 = require("./fromSpec");
function fromBundle(bundle, _specs, branch = {}) {
    const { spec = {}, specs = {} } = bundle;
    if (!spec.id) {
        spec.id = (0, id_1.uuidNotIn)(_specs);
    }
    return (0, fromSpec_1.fromSpec)(spec, (0, weakMerge_1.weakMerge)(specs, _specs), branch);
}
exports.fromBundle = fromBundle;
//# sourceMappingURL=fromBundle.js.map