Object.defineProperty(exports, "__esModule", { value: true });
const mapInnerHTMLAssignment_1 = require("./operations/domHelpers/mapInnerHTMLAssignment");
function mapPageHtml(doc, pageHtml, pageHtmlTrackingValue, actionType) {
    var headEtcRemovedCharCount = pageHtml.indexOf("<body");
    headEtcRemovedCharCount +=
        pageHtml.slice(headEtcRemovedCharCount).indexOf(">") + 1;
    if (headEtcRemovedCharCount == -1) {
        headEtcRemovedCharCount = 0;
    }
    var bodyEndIndex = pageHtml.indexOf("</body");
    if (bodyEndIndex === -1) {
        bodyEndIndex = pageHtml.length;
    }
    mapInnerHTMLAssignment_1.default(doc.body, [pageHtml, pageHtmlTrackingValue], actionType, -headEtcRemovedCharCount, bodyEndIndex);
}
exports.mapPageHtml = mapPageHtml;
//# sourceMappingURL=mapPageHtml.js.map