Community Development Act of 1974 ( 42 U.S.C. 5301 et seq.) related to disaster relief, long-term recovery, restoration of infrastructure and housing, economic revitalization, and mitigation in the most impacted and distressed areas resulting from a major disaster declared in 2017 (except as otherwise provided under this heading) pursuant to the Robert T. Stafford Disaster Relief and Emergency Assistance Act ( 42 U.S.C. 5121 et seq.): Provided , That funds shall be awarded directly to the State, unit of general local government, or Indian tribe (as such term is defined in section 102 of the Housing and Community Development Act of 1974) at the discretion of the Secretary: Provided further , That of the amounts made available under this heading, up to $13,560,000,000 shall be allocated to meet unmet needs for grantees that have received or will receive allocations for major disasters declared in 2017, and that such allocations shall include the States and units of local government affected by Hurricane Maria: Provided further , That of the amounts made available under this heading, no less than $12,500,000,000 shall be allocated for mitigation activities to all grantees of funding provided under this heading, the same heading in chapter 9 of title X of division A of Public Law 113–2 , section 420 of division L of Public Law 114–113 , section 145 of division C of Public Law 114–223 , section 192 of division C of Public Law 114–223 (as added by section 101(3) of division A of Public Law 114–254 ), section 421 of division K of Public Law 115–31 , and the same heading in division B of Public Law 115–56 , and that such mitigation activities shall be subject to the same terms and conditions of this heading, as determined by the Secretary: Provided further , That all such grantees shall receive an allocation of funds under the preceding proviso in the same proportion that the amount of funds each grantee received or will receive under the second proviso of this heading or the headings and sections specified in the