לָכֵ֞ן שִׁמְע֣וּ עֲצַת־יְהוָ֗ה אֲשֶׁ֤ר יָעַץ֙ אֶל־אֱד֔וֹם וּמַ֨חְשְׁבוֹתָ֔יו אֲשֶׁ֥ר חָשַׁ֖ב אֶל־יֹשְׁבֵ֣י תֵימָ֑ן אִם־לֹ֤א יִסְחָבוּם֙ צְעִירֵ֣י הַצֹּ֔אן אִם־לֹ֥א יַשִּׁ֛ים עֲלֵיהֶ֖ם נְוֵהֶֽם׃
דרום הערט דעם באַראָט פֿון גאָט װאָס ער האָט באַראָטן אױף אֶדוֹם, און זײַנע טראַכטונגען װאָס ער טראַכט אױף די באַװױנער פֿון תֵּימָן: אױב די מינדסטע פֿון די שאָף װעלן זײ ניט אַװעקשלעפּן! אױב מע װעט ניט פֿאַרװיסטן זײער װױנונג איבער זײ!
Avodat HaKodesh (Ibn Gabbai)
And in Midrash Yilamdenu, there is a traditional account that Esau will fall by the hand of Rachel's children, as it is stated:surely the least of the flock shall drag them away (Jeremiah 49:20), which are the youngest of [Jacob's sons]. And this is according to the [exact] measure of the law, since the children would take vengeance for their mother. And our rabbis, may their memory be blessed, said, "[God's name will not be complete nor His throne complete until the name of Amalek be blotted out. But when his name is blotted out then will His name be complete and His throne complete, as it is stated: The enemy is come to an end, he whose swords were forever (Psalms 9:7). And after this, it is written: But the Lord shall now remain forever (Psalms 9:8)." And the intention is that Amalek caused that the name and the throne be lacking and put a defect in both of them. For it distanced the Ruler of the world, as this is its power. It put a defect in the moon on account of its seductions. And this is [the meaning of] their saying, "When the serpent had intercourse with Eve, he put pollution into her." And in Midrash Yilamdenu (Midrash Tanchuma, Ki Teitzeh 11:1): As long as the seed of Amalek remains alive in the world, it is as though a wing is hiding [God's] face. When the seed of Amalek has passed from the world, [God's] name will be complete." The intention here is that Amalek is the reason for the hiding of the Face of Mercy from shining on the desired land, and it is a cloud that separates between the Heavens and the earth. So it covers over the shining Face, until the one comes who brings judgment and destroys the spirit of impurity. And the kingdom will be the Lord's (Ovadiah 1:21). For the uncircumcised and the unclean shall never enter her again (alluding to Isaiah 52:1). And that will be when the seed of Amalek, which causes the distance and the division, will be erased. And then the Lord will be king upon all the earth — specifically upon the earth — on that day the Lord shall be one and His name shall be one (Zechariah 14:9). And this is essentially what I saw to explain about the secret of the throne.