A compound of Formula II or a stereoisomer or mixture of stereoisomers thereof, optionally as a pharmaceutically acceptable salt thereof, wherein: X is NH or optionally substituted N-(C 1 -C 6)alkyl; Y is optionally substituted (C 1 -C 6)alkylene wherein up to two carbon atoms of the (C 1 -C 6) alkylene are replaced by O, NH, N-(C 1 -C 6)alkyl, -NH-(C=O)-, -N(C 1 -C 6)alkyl-(C=O)-, or -(C=O)-; Q is (C 1 -C 6)alkylene; Z is -NH-(C=O)- or -N(C 1 -C 6)alkyl-(C=O)-; R 1 is halo, hydroxy, cyano, optionally substituted aryl, optionally substituted heteroaryl, optionally substituted heterocycloalkyl, optionally substituted (C 1 -C 6)alkyl, optionally substituted (C 1 -C 6)alkoxy, (C 1 -C 6)alkyl-OH, NH 2, -NH-(C 1 -C 6)alkyl, -NH-((C 1 -C 6)alkyl) 2, -NH-(C=O)-R 5, -(C=O)NR 6 R 7, or -NH-(SO 2)-R 8; R 2 is NH 2, optionally substituted cycloalkyl, optionally substituted heterocycloalkyl, or optionally substituted heteroaryl, R 5 is H, optionally substituted (C 1 -C 6)alkyl, optionally substituted cycloalkyl, optionally substituted heterocycloalkyl, optionally substituted aryl, or optionally substituted heteroaryl; R 6 and R 7 are each independently H, optionally substituted (C 1 -C 6)alkyl, optionally substituted cycloalkyl, optionally substituted heterocycloalkyl, optionally substituted aryl, optionally substituted heteroaryl, or R 6 and R 7, together with the atoms to which they are attached, can be taken together to form an optionally substituted 3, 4, 5, 6, or 7-membered ring; R 8 is optionally substituted (C 1 -C 6)alkyl, optionally substituted cycloalkyl, optionally substituted heterocycloalkyl, optionally substituted aryl, or optionally substituted heteroaryl. X is NH or optionally substituted N-(C 1 -C 6)alkyl; Y is optionally substituted (C 1 -C 6)alkylene wherein up to two carbon atoms of the (C 1 -C 6) alkylene are replaced by O, NH, N-(C 1 -C 6)alkyl, -NH-(C=O)-, -N(C 1 -C 6)alkyl-(C=O)-, or -(C=O)-; Q is (C 1 -C 6)alkylene; Z is -NH-(C=O)- or -N(C 1 -C 6)alkyl-(C=O)-; R 1 is halo, hydroxy, cyano, optionally substituted aryl, optionally substituted heteroaryl, optionally substituted heterocycloalkyl, optionally substituted (C 1 -C 6)alkyl, optionally substituted (C 1 -C 6)alkoxy, (C 1 -C 6)alkyl-OH, NH 2, -NH-(C 1 -C 6)alkyl, -NH-((C 1 -C 6)alkyl) 2, -NH-(C=O)-R 5, -(C=O)NR 6 R 7, or -NH-(SO 2)-R 8; R 2 is NH 2, optionally substituted cycloalkyl, optionally substituted heterocycloalkyl, or optionally substituted heteroaryl, R 5 is H, optionally substituted (C 1 -C 6)alkyl, optionally substituted cycloalkyl, optionally substituted heterocycloalkyl, optionally substituted aryl, or optionally substituted heteroaryl; R 6 and R 7 are each independently H, optionally substituted (C 1 -C 6)alkyl, optionally substituted cycloalkyl, optionally substituted heterocycloalkyl, optionally substituted aryl, optionally substituted heteroaryl, or R 6 and R 7, together with the atoms to which they are attached, can be taken together to form an optionally substituted 3, 4, 5, 6, or 7-membered ring; R 8 is optionally substituted (C 1 -C 6)alkyl, optionally substituted cycloalkyl, optionally substituted heterocycloalkyl, optionally substituted aryl, or optionally substituted heteroaryl.