(1) It is unlawful for any person knowingly or intentionally to possess heroin.
(2)(a) Unlawful possession of heroin is a drug enforcement misdemeanor punishable as described in ORS 475.896.
(b) Notwithstanding paragraph (a) of this subsection, unlawful possession of heroin is a Class A misdemeanor if the person possesses one gram or more of a mixture or substance containing a detectable amount of heroin.
(c) Notwithstanding paragraphs (a) and (b) of this subsection, unlawful possession of heroin is a Class B felony if:
(A) The possession is a commercial drug offense under ORS 475.900 (1)(b); or
(B) The person possesses a substantial quantity under ORS 475.900 (3)(b).