"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.safelyAccessDocument = safelyAccessDocument;
exports.safelyAccessDocumentEvent = safelyAccessDocumentEvent;
function safelyAccessDocument(_document) {
    return _document || (typeof document !== 'undefined' ? document : null);
}
function safelyAccessDocumentEvent(event) {
    return !!event &&
        !!event.target &&
        typeof event.target === 'object' &&
        'ownerDocument' in event.target
        ? event.target.ownerDocument
        : null;
}
