  The operation of Ultrafast Electron Diffractometers (UEDs) and Free-Electron
Lasers (FELs) relies on high-brightness electron beams produced by
radio-frequency (RF) photocathode guns. The next generation of high-repetition
rate UEDs and FELs requires electron beams with a high average brightness. To
this end, we introduce a continuous wave RF photocathode gun at 325 MHz with an
APEX-like geometry. The gun allows for the production of electron beams with
very high both peak and average 5D brightness while having moderate RF power
consumption. The gun is operated in blowout regime with an energy gain of 0.4
MeV and a peak cathode field of 35 MV/m. Via massive numerical simulations, we
exemplify three regimes of the gun operation: (i) 160 fC electron beams with a
5-nm-scale emittance for UEDs, (ii) 1.6 pC beams with a 20-nm-scale emittance
for table-top FELs and dielectric-based accelerators, and (iii) 16 pC beams
with a 50-nm-scale emittance for inverse Compton sources and other
accelerator-based photon sources. We introduce a simple analytical model for
the formation of the virtual cathode - the onset of the suppression of
photoemission current due to space-charge forces. The model accounts for the
laser pulse duration. Furthermore, our extensive numerical simulations indicate
a well-pronounced maximum in the 5D beam brightness for the laser spot radius
approximately 150% of that corresponding to the onset of the virtual cathode.
The finding does not support the common approach in the literature that in the
blowout regime the laser spot radius must be much larger than the critical
radius corresponding to the virtual cathode onset.
