(1) A perfected security interest continuing in a product or mass has priority over an unperfected security interest continuing in the same product or mass.
(2) If more than one perfected security interest continues in the same product or mass, each perfected security interest is entitled to share in the product or mass according to the ratio that the obligation secured by the perfected security interest bears to the sum of the obligations secured by all perfected security interests in the same product or mass.
(3) If more than one unperfected security interest continues in the same product or mass, each unperfected security interest is entitled to share in the product or mass according to the ratio that the obligation secured by the unperfected security interest bears to the sum of the obligations secured by all unperfected security interests in the same product or mass.
(4) For the purposes of this section, the obligation secured by a security interest does not exceed the value of the goods on the day on which the goods became part of the product or mass.