What topics should I master on music theory before I move on to jazz guitar? Is it necessary to learn blues guitar? I have basic knowledge of music theory, like major and minor chords.
You should not master anything as a prerequisite for learning Jazz guitar. There is no hierarchy of styles. If you like Jazz start with Jazz. I would say the only real prerequisite is that you actually like Jazz as a style of music. If you don't you will never enjoy learning it and never play it well. Start by LISTENING. That is what music is, experiencing sound. Listen to the greats starting with Eddie Lang, Charlie Christian, Django Reinhardt, Wes, Joe Pass, Pat Martino, Grant Green, George Benson, John Scofield, Pat Metheny, Allan Holdsworth, Al Dimeola, Ronnie Jordan, and on and on, picking what you like from the list and dropping the rest. A key to great musicianship is being a good listener in every respect. So, listen to people you like, start transcribing their licks by ear if you can, get your hands on transcriptions or TAB as needed. Take lessons.
Some folks might start throwing a list of music theory prerequisites but this is really misleading. Theory comes after practice!
Also, listen to other instruments. Coltrane, Davis, Parker, Dizzy, Bill Evans, Mingus, Monk, Duke, Count, etc. Jazz is a culture not an exercise.
Don't worry about 'theory', unless by that you mean basic musical literacy - reading notes and rhythms. That always comes in useful!
And beware. There's a lot of half-assed 'theory' in the jazz guitar world. Listen, read, copy. Look at WHAT various books and other forms of instruction tell you to play. Don't get too hung up on their WHY explanations though.
If you don't know more than basic majors and minors you're going to struggle.
Theory wise, the need to know what it is that makes a chord that chord is pretty important. being ablee to play in every key , so knowing what that entails, is paramount, as is knowing your instrument really well, and being able to hear something and repeat it, pretty well note for note - good ears. that's a start.