; and (B) for the purpose of proceedings and disposition under this chapter for an alleged act of juvenile delinquency, a person who has not attained the age of 21 years; (9) the term juvenile delinquency means the violation of a law of the United States committed by a person before attaining the age of 18 years which would have been a crime if committed by an adult, or a violation by such a person of section 922(x); (10) the term juvenile nonviolent offense means— (A) in the case of an arrest or an adjudication that is dismissed or finds the juvenile to be not delinquent, an act of juvenile delinquency that is not— (i) a criminal homicide, forcible rape or any other sex offense (as defined in section 111 of the Sex Offender Registration and Notification Act ( 34 U.S.C. 20911 )), kidnapping, aggravated assault, robbery, burglary of an occupied structure, arson, or a drug trafficking crime in which a firearm was used; or (ii) a Federal crime of terrorism (as defined in section 2332b(g)); and (B) in the case of an adjudication that finds the juvenile to be delinquent, an act of juvenile delinquency that is not— (i) described in clause (i) or (ii) of subparagraph (A); or (ii) a misdemeanor crime of domestic violence (as defined in section 921(a)(33)); (11) the term juvenile record — (A) means a record maintained by a court, the probation system, a law enforcement agency, or any other government agency, of the juvenile delinquency proceedings of a person; (B) includes— (i) a juvenile legal file, including a formal document such as a petition, notice, motion, legal memorandum, order, or decree; (ii) a social record, including— (I) a record of a probation officer; (II) a record of any government agency that keeps records relating to juvenile delinquency; (III) a medical record; (IV) a psychiatric or psychological record; (V) a birth certificate; (VI) an education record, including an individualized education plan; (VII) a detention record