/* チャットとAIエージェントの違い(営業資料v12 スライド9の図をWeb用に組み直したもの)
上下2段(人/AI)のレーンに4つの手順を置き、線でつなぐ。幅が狭いときは縦向きに切り替える。
使う場所:service-ai.html(AiWhatIs)・service-ai-agent.html(AiVsChat) */
const LANE_COLOR = {
'人': { lane:'#eef1f6', dot:'#19448E' },
'AI': { lane:'#f6efe2', dot:'#B07A2A' }
};
const AI_LANE_CHAT = [
{ who:'人', t:['人が仕事を受ける'] },
{ who:'AI', t:['作業の一部を', 'チャットに頼む'] },
{ who:'人', t:['AIの回答をもとに、', '人が仕上げる'] },
{ who:'人', t:['人が相手に渡す'] }
];
const AI_LANE_AGENT = [
{ who:'AI', t:['AIが仕事を受ける'] },
{ who:'AI', t:['AIが作る'] },
{ who:'人', t:['人が確認する'], hollow:true, dashedIn:true },
{ who:'AI', t:['AIが相手に渡す'], dashedIn:true }
];
const useNarrow = (px) => {
const get = () => typeof window !== 'undefined' && window.innerWidth < px;
const [narrow, setNarrow] = React.useState(get());
React.useEffect(() => {
const on = () => setNarrow(get());
window.addEventListener('resize', on);
return () => window.removeEventListener('resize', on);
}, []);
return narrow;
};
const LaneDot = ({ x, y, s, i }) => {
const c = LANE_COLOR[s.who].dot;
return (