function getActiveWindow() {
    var _a, _b;
    const document = getActiveDocument();
    return ((_b = (_a = document.defaultView) === null || _a === void 0 ? void 0 : _a.window) !== null && _b !== void 0 ? _b : mainWindow);
}
Returns the active window across main and child windows.
Prefers the window with focus, otherwise falls back to
the main window.