Unexhausted rights to insurance benefit from previous periods of compensation are taken into account, in whole or in part, in the calculation of the duration and amount of rights when a new period of compensation is opened, under the conditions defined in the unemployment insurance agreements referred to in article L. 5422-20.