Why thank you.
As far as 1864 goes, it is worth remembering that even as the US was in the middle of the bloodiest years in its history on the North American contienent, the Navy was still doing things like "protecting American commerce" from the likes various locals (like the Japanese warlords), operating in West African waters against slavers, etc.
There were even occasions when US and European warships were shooting at the "same" locals, in ad hoc joint operations; there was a lot of perceived "white man's burden" type gunboat diplomacy going on...
Interesting. One would have thought that subduing the South would be more important than conducting imperialism, but I'm not a nineteenth-century imperialist.
Ah, the 19th century: good times. Fighting poor people who can't fight back, together; it's so sentimental!
As far as 1937 goes, if there were a series of "Panay" like incidents, I could see events between the US and Japan spinning out of control; given Britain's very real strategic focus on Europe and the Med in the same period, although I don't doubt various reinforcements would be ordered into China and points south, I think the UK would have stayed out of any US-Japan confrontation, for the simple fact they had a lot to deal with much closer to home.
Please forgive my lack of clarity; I did not for a moment mean to imply that the United Kingdom actually
would intervene in an Americo-Japanese war. What I meant was that,
in Japan's opinion, the USA and the UK were strongly allied. Whether you think that Japan's main aim in starting the Pacific War was to acquire the UK's colonies or to throw the USA out of the Pacific, it's noteworthy that they didn't even
try to restrict the conflict to fighting one world-spanning great power at a time; they were convinced that any attack on the British Empire was equivalent to an attack on the USA and vice versa, so the Britons and Americans were a monolithic bloc. How they came to this conclusion I won't claim to know (perhaps something to do with the Washington Naval Treaty and the Anglo-American dominance established therein) but they did—so we must interpret Japanese policy through that lens.
Having said that, maybe the Japanese would be more cautious in 1937-38 then they were historically in 1940-41, but still - as you suggest, it is Imperial Japan...
Best,
I honestly don't know. They might regard it as a nastier target, but they might decide that the Anglo-American bloc (as they saw it) was an incredibly powerful enemy and therefore ought to be attacked
now, because they'd be even more powerful later.