The early modern history of the Old Swiss Confederacy (Eidgenossenschaft, also known as the "Swiss Republic" or Republica Helvetiorum) and its constituent Thirteen Cantons encompasses the time of the Thirty Years' War (1618–1648) until the French invasion of 1798. The early modern period was characterized by an increasingly aristocratic and oligarchic ruling class as well as frequent economic or religious revolts. This period came to be referred to as the Ancien Régime retrospectively, in post-Napoleonic Switzerland. The loosely organized Confederation remained generally disorganized and crippled by the religious divisions created by the Swiss Reformation. During this period the Confederation gained formal independence from the Holy Roman Empire with support from France, and had very close relations with France. The early modern period also saw the growth of French-Swiss literature, and notable authors of the Age of Enlightenment such as the mathematicians of the Bernoulli family and Leonhard Euler of Basel. Thirteen Cantons The Old Swiss Confederacy between phases of expansion consisted of Eight Cantons () during 1352–1481, and of the Thirteen Cantons () from 1513 until its collapse in 1798. The Thirteen Cantons thus correspond to the sovereign territories of Early Modern Switzerland. They were listed in a fixed order of precedence, first the eight, old cantons of the "Alliance of the Eight Cantons" () of the 14th century confederacy, then the five cantons which joined after the Burgundian Wars, and within these two groups, the more powerful urban cantons (, "cities") were listed first, with Zürich heading the list as the de facto Vorort of the Eight Cantons prior to the Swiss Reformation. The order of precedence, similar but not identical to the modern order (which lists Zug after Glarus, and Basel after Solothurn), was as follows: Zurich, city canton, since 1351 Berne, city canton, since 1353; associate since 1323 Lucerne, city canton, since 1332 Uri, founding canton (Pact of Brunnen 1315) Schwyz, founding canton (Pact of Brunnen 1315) Unterwalden, founding canton (Pact of Brunnen 1315) Zug, city canton, since 1352 Glarus, rural canton, since 1352 Basel, city canton, since 1501 Fribourg, city canton, since 1481; associate since 1454 Solothurn, city canton, since 1481; associate since 1353 Schaffhausen, city canton, since 1501; associate since 1454 Appenzell, rural canton, since 1513; associate since 1411 Symbolic depictions of the Confederacy consisted of arrangements of the thirteen cantonal coats of arms, sometimes with an additional symbol of unity, such as two clasping