diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index ae9b7b9e..79a7bc2a 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -18,7 +18,6 @@ "obsidian-dynamic-toc", "emoji-shortcodes", "extract-url", - "fantasy-calendar", "find-and-replace-in-selection", "find-unlinked-files", "obsidian-footnotes", @@ -57,5 +56,6 @@ "txt-as-md-obsidian", "weather-fetcher", "obsidian-wikipedia", - "obsidian-read-it-later" + "obsidian-read-it-later", + "obsidian-full-calendar" ] \ No newline at end of file diff --git a/.obsidian/plugins/fantasy-calendar/data.json b/.obsidian/plugins/fantasy-calendar/data.json deleted file mode 100644 index 1f604d84..00000000 --- a/.obsidian/plugins/fantasy-calendar/data.json +++ /dev/null @@ -1,1190 +0,0 @@ -{ - "addToDefaultIfMissing": true, - "calendars": [ - { - "name": "D2D Calendar", - "description": "A calendar for the real world. Note: May not be 100% accurate.", - "static": { - "incrementDay": true, - "displayMoons": true, - "firstWeekDay": 1, - "overflow": true, - "weekdays": [ - { - "type": "day", - "name": "Sunday", - "id": "ID_19ea684b4a08" - }, - { - "type": "day", - "name": "Monday", - "id": "ID_2928b90ab949" - }, - { - "type": "day", - "name": "Tuesday", - "id": "ID_0ad9a8f9e95b" - }, - { - "type": "day", - "name": "Wednesday", - "id": "ID_195a4b290bc9" - }, - { - "type": "day", - "name": "Thursday", - "id": "ID_abe8c89b0999" - }, - { - "type": "day", - "name": "Friday", - "id": "ID_2b5b8a79fa4a" - }, - { - "type": "day", - "name": "Saturday", - "id": "ID_1a78cb79c8cb" - } - ], - "months": [ - { - "name": "January", - "type": "month", - "length": 31, - "id": "ID_e9997a780b3a" - }, - { - "name": "February", - "type": "month", - "length": 28, - "id": "ID_b8c9ebeb0b89" - }, - { - "name": "March", - "type": "month", - "length": 31, - "id": "ID_b83bda2b9be8" - }, - { - "name": "April", - "type": "month", - "length": 30, - "id": "ID_29baea7b28ab" - }, - { - "name": "May", - "type": "month", - "length": 31, - "id": "ID_6a3899fad909" - }, - { - "name": "June", - "type": "month", - "length": 30, - "id": "ID_384aeb1afa8a" - }, - { - "name": "July", - "type": "month", - "length": 31, - "id": "ID_48b8cba87b8a" - }, - { - "name": "August", - "type": "month", - "length": 31, - "id": "ID_fa0b1a6bab8a" - }, - { - "name": "September", - "type": "month", - "length": 30, - "id": "ID_da880b8af849" - }, - { - "name": "October", - "type": "month", - "length": 31, - "id": "ID_babba8186968" - }, - { - "name": "November", - "type": "month", - "length": 30, - "id": "ID_da582bfaf9b9" - }, - { - "name": "December", - "type": "month", - "length": 31, - "id": "ID_ba1bab4a3a28" - } - ], - "moons": [ - { - "name": "Moon", - "cycle": 29.530588853, - "offset": 9.24953, - "faceColor": "#ffffff", - "shadowColor": "#000000", - "id": "ID_a9ab186b1819" - } - ], - "leapDays": [ - { - "name": "Leap Day", - "type": "leapday", - "interval": [ - { - "ignore": false, - "exclusive": false, - "interval": 4 - }, - { - "ignore": false, - "exclusive": true, - "interval": 100 - }, - { - "ignore": false, - "exclusive": false, - "interval": 400 - } - ], - "offset": 0, - "timespan": 1, - "intercalary": false, - "id": "ID_b91ad86a887a" - } - ], - "eras": [ - { - "name": "Before Christ", - "description": "", - "format": "Year {{abs_year}} - {{era_name}}", - "start": { - "year": -1, - "month": 0, - "day": 31 - } - }, - { - "name": "Anno Domini", - "description": "", - "format": "Year {{year}} - {{era_name}}", - "start": { - "year": 1, - "month": 0, - "day": 1 - } - } - ], - "offset": 2 - }, - "current": { - "day": 12, - "month": 2, - "year": 2022 - }, - "events": [ - { - "name": "Summer Solstice", - "description": "At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.", - "id": "824599", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": null - }, - { - "name": "Winter Solstice", - "description": "The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.", - "id": "824600", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": null - }, - { - "name": "Spring Equinox", - "description": "The equinox marks the day and the night is equally as long.", - "id": "824601", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": null - }, - { - "name": "Autumn Equinox", - "description": "The equinox marks the day and the night is equally as long.", - "id": "824602", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": null - }, - { - "name": "Paschal Full Moon", - "description": "The first full moon after march 21st, which is considered the fixed date for the spring equinox.", - "id": "824604", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": "christian-holidays" - }, - { - "name": "Easter", - "description": "Easter is considered the most important feast for Christians, celebrating the resurrection of Christ. It is classed as a moveable feast occurring on the first full moon after the spring equinox, which is considered to be fixed at March 21st for the sake of computing the date.", - "id": "824605", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": "christian-holidays" - }, - { - "name": "Easter Monday", - "description": "The Monday following the Easter Sunday is often considered part of the Easter Celebration and is a day off in many countries with a strong Christian tradition.", - "id": "824606", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": "christian-holidays" - }, - { - "name": "Good Friday", - "description": "Good Friday is the Friday preceding Easter. It comemmorates the crucifixion of Christ according to the Bible.", - "id": "824607", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": "christian-holidays" - }, - { - "name": "Pentecost", - "description": "Celebrated exactly 50 days after Easter, Pentecost is the celebration of the Holy Spirit appearing before the Apostles as described in the Bible.", - "id": "824608", - "note": null, - "date": { - "day": null, - "year": null, - "month": null - }, - "category": "christian-holidays" - }, - { - "name": "New Year's Day", - "description": "New Year's Day marks the start of a new year on the Gregorian Calendar. It starts when the clock strikes midnight and is often celebrated with fireworks, champagne and kissing.", - "id": "824609", - "note": null, - "date": { - "day": 1, - "year": null, - "month": 0 - }, - "category": "secular-holidays", - "end": { - "day": 1, - "year": null, - "month": 0 - } - }, - { - "id": "ID_39284918f8ba", - "name": "Jérôme Bédier", - "note": "01.03 Family/Jérôme Bédier.md", - "date": { - "day": 14, - "month": 0 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 14, - "month": 0 - } - }, - { - "id": "ID_c91959493999", - "name": "Pia Bousquié", - "note": "01.03 Family/Pia Bousquié.md", - "date": { - "day": 17, - "month": 0 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 17, - "month": 0 - } - }, - { - "id": "ID_8ad87a39b949", - "name": "Joséphine Bédier", - "note": "01.03 Family/Joséphine Bédier.md", - "date": { - "day": 21, - "month": 0 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 21, - "month": 0 - } - }, - { - "name": "Valentine's Day", - "description": "Valentine's day is a celebration of love and romance that is popular across the world. Many more cynically minded people mostly consider it an attempt to monetize the expectation of romantic gestures on the holiday through gift cards, flowers, chocolate and dates.", - "id": "824610", - "note": null, - "date": { - "day": 14, - "year": null, - "month": 1 - }, - "category": "secular-holidays", - "end": { - "day": 14, - "year": null, - "month": 1 - } - }, - { - "id": "ID_e808eb2b4b8b", - "name": "Aglaé de Villeneuve", - "note": "01.03 Family/Aglaé de Villeneuve.md", - "date": { - "day": 25, - "month": 1 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 25, - "month": 1 - } - }, - { - "id": "ID_bbf9b8d8f9f9", - "name": "Hortense de Villeneuve", - "note": "01.03 Family/Hortense de Villeneuve.md", - "date": { - "day": 27, - "month": 1 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 27, - "month": 1 - } - }, - { - "id": "ID_b958ab79ea9a", - "name": "Philomène de Villeneuve", - "note": "01.03 Family/Philomène de Villeneuve.md", - "date": { - "day": 18, - "month": 3 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 18, - "month": 3 - } - }, - { - "id": "ID_a9aa5a2a9a98", - "name": "Quentin de Villeneuve", - "note": "01.03 Family/Quentin de Villeneuve.md", - "date": { - "day": 21, - "month": 3 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 21, - "month": 3 - } - }, - { - "id": "ID_5bf88a4b997a", - "name": "Marguerite de Villeneuve", - "note": "01.03 Family/Marguerite de Villeneuve.md", - "date": { - "day": 2, - "month": 4 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 2, - "month": 4 - } - }, - { - "id": "ID_dbe90b49c83a", - "name": "Eloi de Villeneuve", - "note": "01.03 Family/Eloi de Villeneuve.md", - "date": { - "day": 9, - "month": 4 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 9, - "month": 4 - } - }, - { - "id": "ID_ebf80849cbc8", - "name": "Noémie de Villeneuve", - "note": "01.03 Family/Noémie de Villeneuve.md", - "date": { - "day": 20, - "month": 5 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 20, - "month": 5 - } - }, - { - "id": "ID_199be81babe8", - "name": "Jacqueline Bédier", - "note": "01.03 Family/Jacqueline Bédier.md", - "date": { - "day": 13, - "month": 6 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 13, - "month": 6 - } - }, - { - "id": "ID_7a09189b49a8", - "name": "Opportune de Villeneuve", - "note": "01.03 Family/Opportune de Villeneuve.md", - "date": { - "day": 14, - "month": 6 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 14, - "month": 6 - } - }, - { - "id": "ID_b88baafbb819", - "name": "Amaury de Villeneuve", - "note": "01.03 Family/Amaury de Villeneuve.md", - "date": { - "day": 30, - "month": 7 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 30, - "month": 7 - } - }, - { - "id": "ID_3ad87b0bc878", - "name": "Laurence Bédier", - "note": "01.03 Family/Laurence Bédier.md", - "date": { - "day": 4, - "month": 8 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 4, - "month": 8 - } - }, - { - "id": "ID_88ab49791bc8", - "name": "Evrard de Villeneuve", - "note": "01.03 Family/Evrard de Villeneuve.md", - "date": { - "day": 14, - "month": 9 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 14, - "month": 9 - } - }, - { - "name": "Halloween", - "description": "Halloween is holiday popular in the US, Canada and Ireland that has gradually been adopted by more and more countries. It is often celebrated by people dressing up, usually as something scary. Children will often go from door to door shouting \"trick or treat\" in the hopes of receiving candy, while adults tend to go to parties.", - "id": "824611", - "note": null, - "date": { - "day": 31, - "year": null, - "month": 9 - }, - "category": "secular-holidays", - "end": { - "day": 31, - "year": null, - "month": 9 - } - }, - { - "id": "ID_cb1bb9d85b58", - "name": "Séraphine Priso Le Bastart", - "note": "01.03 Family/Séraphine Priso Le Bastart.md", - "date": { - "day": 27, - "month": 10 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 27, - "month": 10 - } - }, - { - "id": "ID_ab5bcb68b9da", - "name": "Marc de Villeneuve", - "note": "01.03 Family/Marc de Villeneuve.md", - "date": { - "day": 4, - "month": 11 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 4, - "month": 11 - } - }, - { - "id": "ID_f88bc8883aeb", - "name": "Pierre Bédier", - "note": "01.03 Family/Pierre Bédier.md", - "date": { - "day": 7, - "month": 11 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 7, - "month": 11 - } - }, - { - "id": "ID_395a7bcb5ae8", - "name": "Eustache Bédier", - "note": "01.03 Family/Eustache Bédier.md", - "date": { - "day": 8, - "month": 11 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 8, - "month": 11 - } - }, - { - "name": "Christmas", - "description": "Christmas is a Christian holiday celebrating the birth of Christ. Due to a combination of marketability and long lasting traditions it is popular even among many non-Christians, especially in countries that have a strong Christian tradition.", - "id": "824603", - "note": null, - "date": { - "day": 25, - "year": null, - "month": 11 - }, - "category": "christian-holidays", - "end": { - "day": 25, - "year": null, - "month": 11 - } - }, - { - "name": "Introduction of the Gregorian Calendar", - "description": "On this day in 1582 the Gregorian calendar was officially introduced, following Thursday October 4th on the Julian Calendar", - "id": "824614", - "note": null, - "date": { - "day": 15, - "year": 1582, - "month": 9 - }, - "category": "historical-events", - "end": { - "day": 15, - "year": 1582, - "month": 9 - } - }, - { - "name": "Work on the first version of this calendar started.", - "description": "Aecius started work on the first version Gregorian Calendar for Fantasy Calendar on this day.", - "id": "824612", - "note": null, - "date": { - "day": 23, - "year": 2019, - "month": 5 - }, - "category": "miscellaneous-events", - "end": { - "day": 23, - "year": 2019, - "month": 5 - } - }, - { - "name": "Work on this version of the Gregorian Calendar started.", - "description": "On this day, Aecius started to rework the Gregorian Calendar from scratch to make it work with the updates Wasp and Alex implemented since the summer of 2019.", - "id": "824613", - "note": null, - "date": { - "day": 21, - "year": 2020, - "month": 0 - }, - "category": "miscellaneous-events", - "end": { - "day": 21, - "year": 2020, - "month": 0 - } - }, - { - "id": "ID_98087909bb1a", - "name": "@Finances", - "note": "01.01 Life Orga/@Finances.md", - "date": { - "year": 2022, - "month": 5, - "day": 30 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 5, - "day": 30 - } - }, - { - "id": "ID_7be9fa4a18db", - "name": "@Family", - "note": "01.01 Life Orga/@Family.md", - "date": { - "year": 2022, - "month": 8, - "day": 1 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 8, - "day": 1 - } - }, - { - "id": "ID_487a2a8a0bfb", - "name": "@Lifestyle", - "note": "01.01 Life Orga/@Lifestyle.md", - "date": { - "year": 2022, - "month": 2, - "day": 31 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 2, - "day": 31 - } - }, - { - "id": "ID_f8aa891a388a", - "name": "@Life Admin", - "note": "01.01 Life Orga/@Life Admin.md", - "date": { - "year": 2022, - "month": 2, - "day": 31 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 2, - "day": 31 - } - }, - { - "id": "ID_8bea89a97bb8", - "name": "@IT & Computer", - "note": "01.01 Life Orga/@IT & Computer.md", - "date": { - "year": 2022, - "month": 5, - "day": 15 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 5, - "day": 15 - } - }, - { - "id": "ID_1b3b6b0918e8", - "name": "@Personal projects", - "note": "01.01 Life Orga/@Personal projects.md", - "date": { - "year": 2022, - "month": 5, - "day": 30 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 5, - "day": 30 - } - }, - { - "id": "ID_78fb5a1a7bfb", - "name": "Armand de Villeneuve", - "note": "01.03 Family/Armand de Villeneuve.md", - "date": { - "day": 3, - "month": 0 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 3, - "month": 0 - } - }, - { - "id": "ID_8a2a2aaac8f9", - "name": "Charles Bédier", - "note": "01.03 Family/Charles Bédier.md", - "date": { - "day": null, - "month": null - }, - "category": "ID_a93b8bba4be8" - }, - { - "id": "ID_1969f9bb6a39", - "name": "Arnaud Chapal", - "note": "01.03 Family/Arnaud Chapal.md", - "date": { - "day": null, - "month": null - }, - "category": "ID_a93b8bba4be8" - }, - { - "id": "ID_c9baf87b7b98", - "name": "Template Person", - "note": "00.01 Admin/Templates/Template Person.md", - "date": { - "day": null, - "month": null - }, - "category": "ID_a93b8bba4be8" - }, - { - "id": "ID_f8294b588ad8", - "name": "Template Task", - "note": "00.01 Admin/Templates/Template Task.md", - "date": { - "day": null, - "month": null, - "year": null - }, - "category": "ID_3b8a489a19da" - }, - { - "id": "ID_0bb9baebda49", - "name": "Thaïs Bédier", - "note": "01.03 Family/Thaïs Bédier.md", - "date": { - "day": 6, - "month": 1 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 6, - "month": 1 - } - }, - { - "id": "ID_68f869fbbb1b", - "name": "Elise Bédier", - "note": "01.03 Family/Elise Bédier.md", - "date": { - "day": 28, - "month": 1 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 28, - "month": 1 - } - }, - { - "id": "ID_38db29797848", - "name": "MRCK", - "note": "01.02 Home/MRCK.md", - "date": { - "day": 28, - "month": 1 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 28, - "month": 1 - } - }, - { - "id": "ID_78caf95b88e8", - "name": "Louis Bédier", - "note": "01.03 Family/Louis Bédier.md", - "date": { - "day": 31, - "month": 2 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 31, - "month": 2 - } - }, - { - "id": "ID_a8a998e8ba4a", - "name": "Achille Bédier", - "note": "01.03 Family/Achille Bédier.md", - "date": { - "day": 20, - "month": 3 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 20, - "month": 3 - } - }, - { - "id": "ID_687be82be9aa", - "name": "Isaure Bédier", - "note": "01.03 Family/Isaure Bédier.md", - "date": { - "day": 21, - "month": 3 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 21, - "month": 3 - } - }, - { - "id": "ID_3b9a7b0bfacb", - "name": "Hortense Bédier", - "note": "01.03 Family/Hortense Bédier.md", - "date": { - "day": 19, - "month": 4 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 19, - "month": 4 - } - }, - { - "id": "ID_5b89bb781baa", - "name": "Hilaire Bédier", - "note": "01.03 Family/Hilaire Bédier.md", - "date": { - "day": 26, - "month": 7 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 26, - "month": 7 - } - }, - { - "id": "ID_6a381a08a98b", - "name": "Ophélie Bédier", - "note": "01.03 Family/Ophélie Bédier.md", - "date": { - "day": 5, - "month": 8 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 5, - "month": 8 - } - }, - { - "id": "ID_48abe87bc9bb", - "name": "Timothée Bédier", - "note": "01.03 Family/Timothée Bédier.md", - "date": { - "day": 24, - "month": 8 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 24, - "month": 8 - } - }, - { - "id": "ID_3a2bbbe92a0b", - "name": "Auguste Bédier", - "note": "01.03 Family/Auguste Bédier.md", - "date": { - "day": 30, - "month": 8 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 30, - "month": 8 - } - }, - { - "id": "ID_f879892aca49", - "name": "Olympe Bédier", - "note": "01.03 Family/Olympe Bédier.md", - "date": { - "day": 14, - "month": 9 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 14, - "month": 9 - } - }, - { - "id": "ID_1879eb4b3aea", - "name": "Gabrielle Bédier", - "note": "01.03 Family/Gabrielle Bédier.md", - "date": { - "day": 12, - "month": 10 - }, - "category": "ID_a93b8bba4be8", - "end": { - "day": 12, - "month": 10 - } - }, - { - "id": "ID_49b92a2a4b18", - "name": "lebv Email Tasks", - "note": "04.01 lebv.org/lebv Email Tasks.md", - "date": { - "year": 2022, - "month": 1, - "day": 5 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 1, - "day": 5 - } - }, - { - "id": "ID_7b0baa0bb9d9", - "name": "Crypto Tasks", - "note": "06.02 Investments/Crypto Tasks.md", - "date": { - "year": 2022, - "month": 1, - "day": 27 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 1, - "day": 27 - } - }, - { - "id": "ID_281b6b3939a9", - "name": "Hosting Tasks", - "note": "04.01 lebv.org/Hosting Tasks.md", - "date": { - "year": 2022, - "month": 2, - "day": 31 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 2, - "day": 31 - } - }, - { - "id": "ID_389b5acb89b8", - "name": "lebv Research Tasks", - "note": "04.01 lebv.org/lebv Research Tasks.md", - "date": { - "year": 2022, - "month": 2, - "day": 31 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 2, - "day": 31 - } - }, - { - "id": "ID_db0a59c91a08", - "name": "VC Tasks", - "note": "06.02 Investments/VC Tasks.md", - "date": { - "year": 2022, - "month": 2, - "day": 31 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 2, - "day": 31 - } - }, - { - "id": "ID_f90aa8e9fa19", - "name": "Equity Tasks", - "note": "06.02 Investments/Equity Tasks.md", - "date": { - "year": 2022, - "month": 5, - "day": 30 - }, - "category": "ID_3b8a489a19da" - }, - { - "id": "ID_092a187a7948", - "name": "WebPublishing Tasks", - "note": "04.01 lebv.org/WebPublishing Tasks.md", - "date": { - "year": 2022, - "month": 8, - "day": 31 - }, - "category": "ID_3b8a489a19da", - "end": { - "year": 2022, - "month": 8, - "day": 31 - } - } - ], - "id": "ID_cb9b8ac84809", - "categories": [ - { - "name": "Natural Events", - "id": "natural-events", - "color": "#2E7D32" - }, - { - "name": "Christian Holidays", - "id": "christian-holidays", - "color": "#9b2c2c" - }, - { - "name": "Secular Holidays", - "id": "secular-holidays", - "color": "#0D47A1" - }, - { - "name": "Historical Events", - "id": "historical-events", - "color": "#455A64" - }, - { - "name": "Miscellaneous Events", - "id": "miscellaneous-events", - "color": "#0288D1" - }, - { - "id": "ID_a93b8bba4be8", - "color": "#c4bc00", - "name": "Birthday" - }, - { - "id": "ID_3b8a489a19da", - "color": "#0042a9", - "name": "Task" - } - ], - "date": 1646987278556, - "displayWeeks": false - } - ], - "configDirectory": null, - "currentCalendar": null, - "dailyNotes": false, - "dateFormat": "YYYY-MM-DD", - "defaultCalendar": "ID_cb9b8ac84809", - "eventPreview": true, - "exit": { - "saving": false, - "event": false, - "calendar": false - }, - "eventFrontmatter": false, - "parseDates": false, - "settingsToggleState": { - "calendars": false, - "events": false - }, - "showIntercalary": false, - "version": { - "major": null, - "minor": null, - "patch": null - }, - "path": "/" -} \ No newline at end of file diff --git a/.obsidian/plugins/fantasy-calendar/main.js b/.obsidian/plugins/fantasy-calendar/main.js deleted file mode 100644 index b44e77bd..00000000 --- a/.obsidian/plugins/fantasy-calendar/main.js +++ /dev/null @@ -1,507 +0,0 @@ -/* -THIS IS A GENERATED/BUNDLED FILE BY ESBUILD -if you want to view the source, please visit the github repository of this plugin -*/ - -var ag=Object.create;var kr=Object.defineProperty;var rg=Object.getOwnPropertyDescriptor;var ig=Object.getOwnPropertyNames;var og=Object.getPrototypeOf,sg=Object.prototype.hasOwnProperty;var nl=t=>kr(t,"__esModule",{value:!0});var Qe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lg=(t,e)=>{nl(t);for(var n in e)kr(t,n,{get:e[n],enumerable:!0})},ug=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ig(e))!sg.call(t,a)&&a!=="default"&&kr(t,a,{get:()=>e[a],enumerable:!(n=rg(e,a))||n.enumerable});return t},xe=t=>ug(nl(kr(t!=null?ag(og(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Vn=Qe((so,lo)=>{(function(t,e){typeof so=="object"&&typeof lo!="undefined"?lo.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self,t["fast-copy"]=e())})(so,function(){"use strict";var t=Function.prototype.toString,e=Object.create,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,o=Object.getPrototypeOf,l=Object.prototype,s=l.hasOwnProperty,d=l.propertyIsEnumerable,u={SYMBOL_PROPERTIES:typeof i=="function",WEAKMAP:typeof WeakMap=="function"},c=function(){if(u.WEAKMAP)return new WeakMap;var A=e({has:function(S){return!!~A._keys.indexOf(S)},set:function(S,_){A._keys.push(S),A._values.push(_)},get:function(S){return A._values[A._keys.indexOf(S)]}});return A._keys=[],A._values=[],A},h=function(A,S){if(!A.constructor)return e(null);var _=A.constructor,F=A.__proto__||o(A);if(_===S.Object)return F===S.Object.prototype?{}:e(F);if(~t.call(_).indexOf("[native code]"))try{return new _}catch{}return e(F)},y=function(A,S,_,F){var w=h(A,S);F.set(A,w);for(var M in A)s.call(A,M)&&(w[M]=_(A[M],F));if(u.SYMBOL_PROPERTIES){var x=i(A),V=x.length;if(V)for(var B=0,H=void 0;B{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.default=void 0;var cg={sum:function(e){return e.reduce(function(n,a){return n+a})}},dg=cg;xr.default=dg});var Fr=Qe((Eb,rl)=>{function fg(t){return Object.prototype.toString.call(t).slice(8,-1)}rl.exports=fg});var uo=Qe((Cb,il)=>{function hg(t){return!!t&&typeof t=="object"&&t.constructor===Object}il.exports=hg});var Tr=Qe((Ab,ol)=>{function mg(t,e){return Object.prototype.hasOwnProperty.call(t,e)}ol.exports=mg});var cl=Qe((kb,ul)=>{var pg=Tr(),Sr,sl;function gg(){sl=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Sr=!0;for(var t in{toString:null})Sr=!1}function yg(t,e,n){var a,r=0;Sr==null&&gg();for(a in t)if(ll(e,t,a,n)===!1)break;if(Sr)for(var i=t.constructor,o=!!i&&t===i.prototype;(a=sl[r++])&&!((a!=="constructor"||!o&&pg(t,a))&&t[a]!==Object.prototype[a]&&ll(e,t,a,n)===!1););}function ll(t,e,n,a){return t.call(a,e[n],n,e)}ul.exports=yg});var Ga=Qe((xb,dl)=>{var vg=Tr(),bg=cl();function wg(t,e,n){bg(t,function(a,r){if(vg(t,r))return e.call(n,t[r],r,t)})}dl.exports=wg});var hl=Qe((Fb,fl)=>{var Dg=Ga();function _g(t,e){for(var n=0,a=arguments.length,r;++n{var Cg=Fr(),Ag=uo(),kg=hl();function xg(t){switch(Cg(t)){case"Object":return Fg(t);case"Array":return Bg(t);case"RegExp":return Tg(t);case"Date":return Sg(t);default:return t}}function Fg(t){return Ag(t)?kg({},t):t}function Tg(t){var e="";return e+=t.multiline?"m":"",e+=t.global?"g":"",e+=t.ignoreCase?"i":"",new RegExp(t.source,e)}function Sg(t){return new Date(+t)}function Bg(t){return t.slice()}ml.exports=xg});var yl=Qe((Sb,gl)=>{var Mg=pl(),Ng=Ga(),Ig=Fr(),Og=uo();function co(t,e){switch(Ig(t)){case"Object":return qg(t,e);case"Array":return Rg(t,e);default:return Mg(t)}}function qg(t,e){if(Og(t)){var n={};return Ng(t,function(a,r){this[r]=co(a,e)},n),n}else return e?e(t):t}function Rg(t,e){for(var n=[],a=-1,r=t.length,i;++a{function Lg(t,e){return t===e?t!==0||1/t==1/e:t!==t&&e!==e}vl.exports=Lg});var fo=Qe((Mb,bl)=>{var Pg=Fr();function jg(t,e){return Pg(t)===e}bl.exports=jg});var ho=Qe((Nb,wl)=>{var Vg=fo();function Hg(t){return Vg(t,"Object")}wl.exports=Hg});var Mr=Qe((Ib,Dl)=>{var Wg=fo(),Gg=Array.isArray||function(t){return Wg(t,"Array")};Dl.exports=Gg});var El=Qe((Ob,_l)=>{function Ug(t){return t}_l.exports=Ug});var Al=Qe((qb,Cl)=>{function zg(t){return function(e){return e[t]}}Cl.exports=zg});var Fl=Qe((Rb,xl)=>{var Yg=Ga(),kl=Mr();function Zg(t,e){for(var n=-1,a=t.length;++n{var Xg=El(),Jg=Al(),$g=Fl();function e2(t,e){if(t==null)return Xg;switch(typeof t){case"function":return typeof e!="undefined"?function(n,a,r){return t.call(e,n,a,r)}:t;case"object":return function(n){return $g(n,t)};case"string":case"number":return Jg(t)}}Tl.exports=e2});var Bl=Qe((Pb,Sl)=>{var t2=Ga(),n2=po();function a2(t,e,n){e=n2(e,n);var a=!0;return t2(t,function(r,i){if(!e(r,i,t))return a=!1,!1}),a}Sl.exports=a2});var ql=Qe((jb,Ol)=>{var Ml=Tr(),Nl=Bl(),Il=ho(),r2=Br();function i2(t){return function(e,n){return Ml(this,n)&&t(e,this[n])}}function o2(t,e){return Ml(this,e)}function s2(t,e,n){return n=n||r2,!Il(t)||!Il(e)?n(t,e):Nl(t,i2(n),e)&&Nl(e,o2,t)}Ol.exports=s2});var Ll=Qe((Vb,Rl)=>{var l2=po();function u2(t,e,n){e=l2(e,n);var a=!0;if(t==null)return a;for(var r=-1,i=t.length;++r{var c2=Br(),Pl=Mr(),d2=Ll();function f2(t,e,n){return n=n||c2,!Pl(t)||!Pl(e)?n(t,e):t.length!==e.length?!1:d2(t,h2(n),e)}function h2(t){return function(e,n){return n in this&&t(e,this[n])}}jl.exports=f2});var zl=Qe((Wb,Ul)=>{var m2=Br(),Hl=ho(),Wl=Mr(),p2=ql(),g2=Vl();function Gl(t,e,n){n=n||m2;var a=Hl(t)&&Hl(e),r=!a&&Wl(t)&&Wl(e);if(!a&&!r)return n(t,e);function i(l,s){return Gl(l,s,n)}var o=a?p2:g2;return o(t,e,i)}Ul.exports=Gl});var Yl=Qe((go,yo)=>{(function(t,e){typeof go=="object"&&typeof yo!="undefined"?yo.exports=e():typeof define=="function"&&define.amd?define(e):t.chroma=e()})(go,function(){"use strict";for(var t=function(f,g,b){return g===void 0&&(g=0),b===void 0&&(b=1),fb?b:f},e=function(f){f._clipped=!1,f._unclipped=f.slice(0);for(var g=0;g<=3;g++)g<3?((f[g]<0||f[g]>255)&&(f._clipped=!0),f[g]=t(f[g],0,255)):g===3&&(f[g]=t(f[g],0,1));return f},n={},a=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a=3?Array.prototype.slice.call(f):o(f[0])=="object"&&g?g.split("").filter(function(b){return f[0][b]!==void 0}).map(function(b){return f[0][b]}):f[0]},s=function(f){if(f.length<2)return null;var g=f.length-1;return o(f[g])=="string"?f[g].toLowerCase():null},d=Math.PI,u={clip_rgb:e,limit:t,type:o,unpack:l,last:s,PI:d,TWOPI:d*2,PITHIRD:d/3,DEG2RAD:d/180,RAD2DEG:180/d},c={format:{},autodetect:[]},h=u.last,y=u.clip_rgb,m=u.type,v=function(){for(var g=[],b=arguments.length;b--;)g[b]=arguments[b];var N=this;if(m(g[0])==="object"&&g[0].constructor&&g[0].constructor===this.constructor)return g[0];var L=h(g),P=!1;if(!L){P=!0,c.sorted||(c.autodetect=c.autodetect.sort(function(ae,$){return $.p-ae.p}),c.sorted=!0);for(var I=0,G=c.autodetect;I4?f[4]:1;return P===1?[0,0,0,I]:[b>=1?0:255*(1-b)*(1-P),N>=1?0:255*(1-N)*(1-P),L>=1?0:255*(1-L)*(1-P),I]},x=M,V=u.unpack,B=u.type;p.prototype.cmyk=function(){return F(this._rgb)},C.cmyk=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["cmyk"])))},c.format.cmyk=x,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=V(f,"cmyk"),B(f)==="array"&&f.length===4)return"cmyk"}});var H=u.unpack,Y=u.last,he=function(f){return Math.round(f*100)/100},oe=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=H(f,"hsla"),N=Y(f)||"lsa";return b[0]=he(b[0]||0),b[1]=he(b[1]*100)+"%",b[2]=he(b[2]*100)+"%",N==="hsla"||b.length>3&&b[3]<1?(b[3]=b.length>3?b[3]:1,N="hsla"):b.length=3,N+"("+b.join(",")+")"},ce=oe,Z=u.unpack,z=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Z(f,"rgba");var b=f[0],N=f[1],L=f[2];b/=255,N/=255,L/=255;var P=Math.min(b,N,L),I=Math.max(b,N,L),G=(I+P)/2,U,K;return I===P?(U=0,K=Number.NaN):U=G<.5?(I-P)/(I+P):(I-P)/(2-I-P),b==I?K=(N-L)/(I-P):N==I?K=2+(L-b)/(I-P):L==I&&(K=4+(b-N)/(I-P)),K*=60,K<0&&(K+=360),f.length>3&&f[3]!==void 0?[K,U,G,f[3]]:[K,U,G]},Q=z,De=u.unpack,ve=u.last,Ne=Math.round,je=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=De(f,"rgba"),N=ve(f)||"rgb";return N.substr(0,3)=="hsl"?ce(Q(b),N):(b[0]=Ne(b[0]),b[1]=Ne(b[1]),b[2]=Ne(b[2]),(N==="rgba"||b.length>3&&b[3]<1)&&(b[3]=b.length>3?b[3]:1,N="rgba"),N+"("+b.slice(0,N==="rgb"?3:4).join(",")+")")},at=je,Pe=u.unpack,gt=Math.round,xt=function(){for(var f,g=[],b=arguments.length;b--;)g[b]=arguments[b];g=Pe(g,"hsl");var N=g[0],L=g[1],P=g[2],I,G,U;if(L===0)I=G=U=P*255;else{var K=[0,0,0],ae=[0,0,0],$=P<.5?P*(1+L):P+L-P*L,ye=2*P-$,ge=N/360;K[0]=ge+1/3,K[1]=ge,K[2]=ge-1/3;for(var ke=0;ke<3;ke++)K[ke]<0&&(K[ke]+=1),K[ke]>1&&(K[ke]-=1),6*K[ke]<1?ae[ke]=ye+($-ye)*6*K[ke]:2*K[ke]<1?ae[ke]=$:3*K[ke]<2?ae[ke]=ye+($-ye)*(2/3-K[ke])*6:ae[ke]=ye;f=[gt(ae[0]*255),gt(ae[1]*255),gt(ae[2]*255)],I=f[0],G=f[1],U=f[2]}return g.length>3?[I,G,U,g[3]]:[I,G,U,1]},Je=xt,Fe=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ve=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Rt=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Gt=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ft=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Mt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,gn=Math.round,Ut=function(f){f=f.toLowerCase().trim();var g;if(c.format.named)try{return c.format.named(f)}catch{}if(g=f.match(Fe)){for(var b=g.slice(1,4),N=0;N<3;N++)b[N]=+b[N];return b[3]=1,b}if(g=f.match(Ve)){for(var L=g.slice(1,5),P=0;P<4;P++)L[P]=+L[P];return L}if(g=f.match(Rt)){for(var I=g.slice(1,4),G=0;G<3;G++)I[G]=gn(I[G]*2.55);return I[3]=1,I}if(g=f.match(Gt)){for(var U=g.slice(1,5),K=0;K<3;K++)U[K]=gn(U[K]*2.55);return U[3]=+U[3],U}if(g=f.match(Ft)){var ae=g.slice(1,4);ae[1]*=.01,ae[2]*=.01;var $=Je(ae);return $[3]=1,$}if(g=f.match(Mt)){var ye=g.slice(1,4);ye[1]*=.01,ye[2]*=.01;var ge=Je(ye);return ge[3]=+g[4],ge}};Ut.test=function(f){return Fe.test(f)||Ve.test(f)||Rt.test(f)||Gt.test(f)||Ft.test(f)||Mt.test(f)};var tn=Ut,sa=u.type;p.prototype.css=function(f){return at(this._rgb,f)},C.css=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["css"])))},c.format.css=tn,c.autodetect.push({p:5,test:function(f){for(var g=[],b=arguments.length-1;b-- >0;)g[b]=arguments[b+1];if(!g.length&&sa(f)==="string"&&tn.test(f))return"css"}});var la=u.unpack;c.format.gl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=la(f,"rgba");return b[0]*=255,b[1]*=255,b[2]*=255,b},C.gl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["gl"])))},p.prototype.gl=function(){var f=this._rgb;return[f[0]/255,f[1]/255,f[2]/255,f[3]]};var Si=u.unpack,Bi=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Si(f,"rgb"),N=b[0],L=b[1],P=b[2],I=Math.min(N,L,P),G=Math.max(N,L,P),U=G-I,K=U*100/255,ae=I/(255-U)*100,$;return U===0?$=Number.NaN:(N===G&&($=(L-P)/U),L===G&&($=2+(P-N)/U),P===G&&($=4+(N-L)/U),$*=60,$<0&&($+=360)),[$,K,ae]},Mi=Bi,Ni=u.unpack,Ii=Math.floor,Oi=function(){for(var f,g,b,N,L,P,I=[],G=arguments.length;G--;)I[G]=arguments[G];I=Ni(I,"hcg");var U=I[0],K=I[1],ae=I[2],$,ye,ge;ae=ae*255;var ke=K*255;if(K===0)$=ye=ge=ae;else{U===360&&(U=0),U>360&&(U-=360),U<0&&(U+=360),U/=60;var qe=Ii(U),Te=U-qe,He=ae*(1-K),Ze=He+ke*(1-Te),_t=He+ke*Te,Et=He+ke;switch(qe){case 0:f=[Et,_t,He],$=f[0],ye=f[1],ge=f[2];break;case 1:g=[Ze,Et,He],$=g[0],ye=g[1],ge=g[2];break;case 2:b=[He,Et,_t],$=b[0],ye=b[1],ge=b[2];break;case 3:N=[He,Ze,Et],$=N[0],ye=N[1],ge=N[2];break;case 4:L=[_t,He,Et],$=L[0],ye=L[1],ge=L[2];break;case 5:P=[Et,He,Ze],$=P[0],ye=P[1],ge=P[2];break}}return[$,ye,ge,I.length>3?I[3]:1]},qi=Oi,Ri=u.unpack,Li=u.type;p.prototype.hcg=function(){return Mi(this._rgb)},C.hcg=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hcg"])))},c.format.hcg=qi,c.autodetect.push({p:1,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Ri(f,"hcg"),Li(f)==="array"&&f.length===3)return"hcg"}});var Pi=u.unpack,ji=u.last,ne=Math.round,Vh=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Pi(f,"rgba"),N=b[0],L=b[1],P=b[2],I=b[3],G=ji(f)||"auto";I===void 0&&(I=1),G==="auto"&&(G=I<1?"rgba":"rgb"),N=ne(N),L=ne(L),P=ne(P);var U=N<<16|L<<8|P,K="000000"+U.toString(16);K=K.substr(K.length-6);var ae="0"+ne(I*255).toString(16);switch(ae=ae.substr(ae.length-2),G.toLowerCase()){case"rgba":return"#"+K+ae;case"argb":return"#"+ae+K;default:return"#"+K}},Ss=Vh,Hh=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Wh=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Gh=function(f){if(f.match(Hh)){(f.length===4||f.length===7)&&(f=f.substr(1)),f.length===3&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]);var g=parseInt(f,16),b=g>>16,N=g>>8&255,L=g&255;return[b,N,L,1]}if(f.match(Wh)){(f.length===5||f.length===9)&&(f=f.substr(1)),f.length===4&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]+f[3]+f[3]);var P=parseInt(f,16),I=P>>24&255,G=P>>16&255,U=P>>8&255,K=Math.round((P&255)/255*100)/100;return[I,G,U,K]}throw new Error("unknown hex color: "+f)},Bs=Gh,Uh=u.type;p.prototype.hex=function(f){return Ss(this._rgb,f)},C.hex=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hex"])))},c.format.hex=Bs,c.autodetect.push({p:4,test:function(f){for(var g=[],b=arguments.length-1;b-- >0;)g[b]=arguments[b+1];if(!g.length&&Uh(f)==="string"&&[3,4,5,6,7,8,9].indexOf(f.length)>=0)return"hex"}});var zh=u.unpack,Ms=u.TWOPI,Yh=Math.min,Zh=Math.sqrt,Kh=Math.acos,Qh=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=zh(f,"rgb"),N=b[0],L=b[1],P=b[2];N/=255,L/=255,P/=255;var I,G=Yh(N,L,P),U=(N+L+P)/3,K=U>0?1-G/U:0;return K===0?I=NaN:(I=(N-L+(N-P))/2,I/=Zh((N-L)*(N-L)+(N-P)*(L-P)),I=Kh(I),P>L&&(I=Ms-I),I/=Ms),[I*360,K,U]},Xh=Qh,Jh=u.unpack,Vi=u.limit,ua=u.TWOPI,Hi=u.PITHIRD,ca=Math.cos,$h=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Jh(f,"hsi");var b=f[0],N=f[1],L=f[2],P,I,G;return isNaN(b)&&(b=0),isNaN(N)&&(N=0),b>360&&(b-=360),b<0&&(b+=360),b/=360,b<1/3?(G=(1-N)/3,P=(1+N*ca(ua*b)/ca(Hi-ua*b))/3,I=1-(G+P)):b<2/3?(b-=1/3,P=(1-N)/3,I=(1+N*ca(ua*b)/ca(Hi-ua*b))/3,G=1-(P+I)):(b-=2/3,I=(1-N)/3,G=(1+N*ca(ua*b)/ca(Hi-ua*b))/3,P=1-(I+G)),P=Vi(L*P*3),I=Vi(L*I*3),G=Vi(L*G*3),[P*255,I*255,G*255,f.length>3?f[3]:1]},em=$h,tm=u.unpack,nm=u.type;p.prototype.hsi=function(){return Xh(this._rgb)},C.hsi=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsi"])))},c.format.hsi=em,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=tm(f,"hsi"),nm(f)==="array"&&f.length===3)return"hsi"}});var am=u.unpack,rm=u.type;p.prototype.hsl=function(){return Q(this._rgb)},C.hsl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsl"])))},c.format.hsl=Je,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=am(f,"hsl"),rm(f)==="array"&&f.length===3)return"hsl"}});var im=u.unpack,om=Math.min,sm=Math.max,lm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=im(f,"rgb");var b=f[0],N=f[1],L=f[2],P=om(b,N,L),I=sm(b,N,L),G=I-P,U,K,ae;return ae=I/255,I===0?(U=Number.NaN,K=0):(K=G/I,b===I&&(U=(N-L)/G),N===I&&(U=2+(L-b)/G),L===I&&(U=4+(b-N)/G),U*=60,U<0&&(U+=360)),[U,K,ae]},um=lm,cm=u.unpack,dm=Math.floor,fm=function(){for(var f,g,b,N,L,P,I=[],G=arguments.length;G--;)I[G]=arguments[G];I=cm(I,"hsv");var U=I[0],K=I[1],ae=I[2],$,ye,ge;if(ae*=255,K===0)$=ye=ge=ae;else{U===360&&(U=0),U>360&&(U-=360),U<0&&(U+=360),U/=60;var ke=dm(U),qe=U-ke,Te=ae*(1-K),He=ae*(1-K*qe),Ze=ae*(1-K*(1-qe));switch(ke){case 0:f=[ae,Ze,Te],$=f[0],ye=f[1],ge=f[2];break;case 1:g=[He,ae,Te],$=g[0],ye=g[1],ge=g[2];break;case 2:b=[Te,ae,Ze],$=b[0],ye=b[1],ge=b[2];break;case 3:N=[Te,He,ae],$=N[0],ye=N[1],ge=N[2];break;case 4:L=[Ze,Te,ae],$=L[0],ye=L[1],ge=L[2];break;case 5:P=[ae,Te,He],$=P[0],ye=P[1],ge=P[2];break}}return[$,ye,ge,I.length>3?I[3]:1]},hm=fm,mm=u.unpack,pm=u.type;p.prototype.hsv=function(){return um(this._rgb)},C.hsv=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsv"])))},c.format.hsv=hm,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=mm(f,"hsv"),pm(f)==="array"&&f.length===3)return"hsv"}});var Lt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},gm=u.unpack,Ns=Math.pow,ym=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=gm(f,"rgb"),N=b[0],L=b[1],P=b[2],I=vm(N,L,P),G=I[0],U=I[1],K=I[2],ae=116*U-16;return[ae<0?0:ae,500*(G-U),200*(U-K)]},Wi=function(f){return(f/=255)<=.04045?f/12.92:Ns((f+.055)/1.055,2.4)},Gi=function(f){return f>Lt.t3?Ns(f,1/3):f/Lt.t2+Lt.t0},vm=function(f,g,b){f=Wi(f),g=Wi(g),b=Wi(b);var N=Gi((.4124564*f+.3575761*g+.1804375*b)/Lt.Xn),L=Gi((.2126729*f+.7151522*g+.072175*b)/Lt.Yn),P=Gi((.0193339*f+.119192*g+.9503041*b)/Lt.Zn);return[N,L,P]},Is=ym,bm=u.unpack,wm=Math.pow,Dm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=bm(f,"lab");var b=f[0],N=f[1],L=f[2],P,I,G,U,K,ae;return I=(b+16)/116,P=isNaN(N)?I:I+N/500,G=isNaN(L)?I:I-L/200,I=Lt.Yn*zi(I),P=Lt.Xn*zi(P),G=Lt.Zn*zi(G),U=Ui(3.2404542*P-1.5371385*I-.4985314*G),K=Ui(-.969266*P+1.8760108*I+.041556*G),ae=Ui(.0556434*P-.2040259*I+1.0572252*G),[U,K,ae,f.length>3?f[3]:1]},Ui=function(f){return 255*(f<=.00304?12.92*f:1.055*wm(f,1/2.4)-.055)},zi=function(f){return f>Lt.t1?f*f*f:Lt.t2*(f-Lt.t0)},Os=Dm,_m=u.unpack,Em=u.type;p.prototype.lab=function(){return Is(this._rgb)},C.lab=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["lab"])))},c.format.lab=Os,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=_m(f,"lab"),Em(f)==="array"&&f.length===3)return"lab"}});var Cm=u.unpack,Am=u.RAD2DEG,km=Math.sqrt,xm=Math.atan2,Fm=Math.round,Tm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Cm(f,"lab"),N=b[0],L=b[1],P=b[2],I=km(L*L+P*P),G=(xm(P,L)*Am+360)%360;return Fm(I*1e4)===0&&(G=Number.NaN),[N,I,G]},Sm=Tm,Bm=u.unpack,Mm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Bm(f,"rgb"),N=b[0],L=b[1],P=b[2],I=Is(N,L,P),G=I[0],U=I[1],K=I[2];return Sm(G,U,K)},qs=Mm,Nm=u.unpack,Im=u.DEG2RAD,Om=Math.sin,qm=Math.cos,Rm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Nm(f,"lch"),N=b[0],L=b[1],P=b[2];return isNaN(P)&&(P=0),P=P*Im,[N,qm(P)*L,Om(P)*L]},Lm=Rm,Pm=u.unpack,jm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Pm(f,"lch");var b=f[0],N=f[1],L=f[2],P=Lm(b,N,L),I=P[0],G=P[1],U=P[2],K=Os(I,G,U),ae=K[0],$=K[1],ye=K[2];return[ae,$,ye,f.length>3?f[3]:1]},Rs=jm,Vm=u.unpack,Hm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Vm(f,"hcl").reverse();return Rs.apply(void 0,b)},Wm=Hm,Gm=u.unpack,Um=u.type;p.prototype.lch=function(){return qs(this._rgb)},p.prototype.hcl=function(){return qs(this._rgb).reverse()},C.lch=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["lch"])))},C.hcl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hcl"])))},c.format.lch=Rs,c.format.hcl=Wm,["lch","hcl"].forEach(function(f){return c.autodetect.push({p:2,test:function(){for(var g=[],b=arguments.length;b--;)g[b]=arguments[b];if(g=Gm(g,f),Um(g)==="array"&&g.length===3)return f}})});var zm={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},da=zm,Ym=u.type;p.prototype.name=function(){for(var f=Ss(this._rgb,"rgb"),g=0,b=Object.keys(da);g0;)g[b]=arguments[b+1];if(!g.length&&Ym(f)==="string"&&da[f.toLowerCase()])return"named"}});var Zm=u.unpack,Km=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Zm(f,"rgb"),N=b[0],L=b[1],P=b[2];return(N<<16)+(L<<8)+P},Qm=Km,Xm=u.type,Jm=function(f){if(Xm(f)=="number"&&f>=0&&f<=16777215){var g=f>>16,b=f>>8&255,N=f&255;return[g,b,N,1]}throw new Error("unknown num color: "+f)},$m=Jm,ep=u.type;p.prototype.num=function(){return Qm(this._rgb)},C.num=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["num"])))},c.format.num=$m,c.autodetect.push({p:5,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f.length===1&&ep(f[0])==="number"&&f[0]>=0&&f[0]<=16777215)return"num"}});var Ls=u.unpack,Ps=u.type,js=Math.round;p.prototype.rgb=function(f){return f===void 0&&(f=!0),f===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(js)},p.prototype.rgba=function(f){return f===void 0&&(f=!0),this._rgb.slice(0,4).map(function(g,b){return b<3?f===!1?g:js(g):g})},C.rgb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["rgb"])))},c.format.rgb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Ls(f,"rgba");return b[3]===void 0&&(b[3]=1),b},c.autodetect.push({p:3,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Ls(f,"rgba"),Ps(f)==="array"&&(f.length===3||f.length===4&&Ps(f[3])=="number"&&f[3]>=0&&f[3]<=1))return"rgb"}});var Dr=Math.log,tp=function(f){var g=f/100,b,N,L;return g<66?(b=255,N=-155.25485562709179-.44596950469579133*(N=g-2)+104.49216199393888*Dr(N),L=g<20?0:-254.76935184120902+.8274096064007395*(L=g-10)+115.67994401066147*Dr(L)):(b=351.97690566805693+.114206453784165*(b=g-55)-40.25366309332127*Dr(b),N=325.4494125711974+.07943456536662342*(N=g-50)-28.0852963507957*Dr(N),L=255),[b,N,L,1]},Vs=tp,np=u.unpack,ap=Math.round,rp=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];for(var b=np(f,"rgb"),N=b[0],L=b[2],P=1e3,I=4e4,G=.4,U;I-P>G;){U=(I+P)*.5;var K=Vs(U);K[2]/K[0]>=L/N?I=U:P=U}return ap(U)},ip=rp;p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return ip(this._rgb)},C.temp=C.kelvin=C.temperature=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["temp"])))},c.format.temp=c.format.kelvin=c.format.temperature=Vs;var op=u.type;p.prototype.alpha=function(f,g){return g===void 0&&(g=!1),f!==void 0&&op(f)==="number"?g?(this._rgb[3]=f,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],f],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(f){f===void 0&&(f=1);var g=this,b=g.lab();return b[0]-=Lt.Kn*f,new p(b,"lab").alpha(g.alpha(),!0)},p.prototype.brighten=function(f){return f===void 0&&(f=1),this.darken(-f)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(f){var g=f.split("."),b=g[0],N=g[1],L=this[b]();if(N){var P=b.indexOf(N);if(P>-1)return L[P];throw new Error("unknown channel "+N+" in mode "+b)}else return L};var sp=u.type,lp=Math.pow,up=1e-7,cp=20;p.prototype.luminance=function(f){if(f!==void 0&&sp(f)==="number"){if(f===0)return new p([0,0,0,this._rgb[3]],"rgb");if(f===1)return new p([255,255,255,this._rgb[3]],"rgb");var g=this.luminance(),b="rgb",N=cp,L=function(I,G){var U=I.interpolate(G,.5,b),K=U.luminance();return Math.abs(f-K)f?L(I,U):L(U,G)},P=(g>f?L(new p([0,0,0]),this):L(this,new p([255,255,255]))).rgb();return new p(P.concat([this._rgb[3]]))}return dp.apply(void 0,this._rgb.slice(0,3))};var dp=function(f,g,b){return f=Yi(f),g=Yi(g),b=Yi(b),.2126*f+.7152*g+.0722*b},Yi=function(f){return f/=255,f<=.03928?f/12.92:lp((f+.055)/1.055,2.4)},Pt={},Hs=u.type,Ws=function(f,g,b){b===void 0&&(b=.5);for(var N=[],L=arguments.length-3;L-- >0;)N[L]=arguments[L+3];var P=N[0]||"lrgb";if(!Pt[P]&&!N.length&&(P=Object.keys(Pt)[0]),!Pt[P])throw new Error("interpolation mode "+P+" is not defined");return Hs(f)!=="object"&&(f=new p(f)),Hs(g)!=="object"&&(g=new p(g)),Pt[P](f,g,b).alpha(f.alpha()+b*(g.alpha()-f.alpha()))};p.prototype.mix=p.prototype.interpolate=function(f,g){g===void 0&&(g=.5);for(var b=[],N=arguments.length-2;N-- >0;)b[N]=arguments[N+2];return Ws.apply(void 0,[this,f,g].concat(b))},p.prototype.premultiply=function(f){f===void 0&&(f=!1);var g=this._rgb,b=g[3];return f?(this._rgb=[g[0]*b,g[1]*b,g[2]*b,b],this):new p([g[0]*b,g[1]*b,g[2]*b,b],"rgb")},p.prototype.saturate=function(f){f===void 0&&(f=1);var g=this,b=g.lch();return b[1]+=Lt.Kn*f,b[1]<0&&(b[1]=0),new p(b,"lch").alpha(g.alpha(),!0)},p.prototype.desaturate=function(f){return f===void 0&&(f=1),this.saturate(-f)};var Gs=u.type;p.prototype.set=function(f,g,b){b===void 0&&(b=!1);var N=f.split("."),L=N[0],P=N[1],I=this[L]();if(P){var G=L.indexOf(P);if(G>-1){if(Gs(g)=="string")switch(g.charAt(0)){case"+":I[G]+=+g;break;case"-":I[G]+=+g;break;case"*":I[G]*=+g.substr(1);break;case"/":I[G]/=+g.substr(1);break;default:I[G]=+g}else if(Gs(g)==="number")I[G]=g;else throw new Error("unsupported value for Color.set");var U=new p(I,L);return b?(this._rgb=U._rgb,this):U}throw new Error("unknown channel "+P+" in mode "+L)}else return I};var fp=function(f,g,b){var N=f._rgb,L=g._rgb;return new p(N[0]+b*(L[0]-N[0]),N[1]+b*(L[1]-N[1]),N[2]+b*(L[2]-N[2]),"rgb")};Pt.rgb=fp;var Zi=Math.sqrt,fa=Math.pow,hp=function(f,g,b){var N=f._rgb,L=N[0],P=N[1],I=N[2],G=g._rgb,U=G[0],K=G[1],ae=G[2];return new p(Zi(fa(L,2)*(1-b)+fa(U,2)*b),Zi(fa(P,2)*(1-b)+fa(K,2)*b),Zi(fa(I,2)*(1-b)+fa(ae,2)*b),"rgb")};Pt.lrgb=hp;var mp=function(f,g,b){var N=f.lab(),L=g.lab();return new p(N[0]+b*(L[0]-N[0]),N[1]+b*(L[1]-N[1]),N[2]+b*(L[2]-N[2]),"lab")};Pt.lab=mp;var Va=function(f,g,b,N){var L,P,I,G;N==="hsl"?(I=f.hsl(),G=g.hsl()):N==="hsv"?(I=f.hsv(),G=g.hsv()):N==="hcg"?(I=f.hcg(),G=g.hcg()):N==="hsi"?(I=f.hsi(),G=g.hsi()):(N==="lch"||N==="hcl")&&(N="hcl",I=f.hcl(),G=g.hcl());var U,K,ae,$,ye,ge;N.substr(0,1)==="h"&&(L=I,U=L[0],ae=L[1],ye=L[2],P=G,K=P[0],$=P[1],ge=P[2]);var ke,qe,Te,He;return!isNaN(U)&&!isNaN(K)?(K>U&&K-U>180?He=K-(U+360):K180?He=K+360-U:He=K-U,qe=U+b*He):isNaN(U)?isNaN(K)?qe=Number.NaN:(qe=K,(ye==1||ye==0)&&N!="hsv"&&(ke=$)):(qe=U,(ge==1||ge==0)&&N!="hsv"&&(ke=ae)),ke===void 0&&(ke=ae+b*($-ae)),Te=ye+b*(ge-ye),new p([qe,ke,Te],N)},Us=function(f,g,b){return Va(f,g,b,"lch")};Pt.lch=Us,Pt.hcl=Us;var pp=function(f,g,b){var N=f.num(),L=g.num();return new p(N+b*(L-N),"num")};Pt.num=pp;var gp=function(f,g,b){return Va(f,g,b,"hcg")};Pt.hcg=gp;var yp=function(f,g,b){return Va(f,g,b,"hsi")};Pt.hsi=yp;var vp=function(f,g,b){return Va(f,g,b,"hsl")};Pt.hsl=vp;var bp=function(f,g,b){return Va(f,g,b,"hsv")};Pt.hsv=bp;var wp=u.clip_rgb,Ki=Math.pow,Qi=Math.sqrt,Xi=Math.PI,zs=Math.cos,Ys=Math.sin,Dp=Math.atan2,_p=function(f,g,b){g===void 0&&(g="lrgb"),b===void 0&&(b=null);var N=f.length;b||(b=Array.from(new Array(N)).map(function(){return 1}));var L=N/b.reduce(function(qe,Te){return qe+Te});if(b.forEach(function(qe,Te){b[Te]*=L}),f=f.map(function(qe){return new p(qe)}),g==="lrgb")return Ep(f,b);for(var P=f.shift(),I=P.get(g),G=[],U=0,K=0,ae=0;ae=360;)ke-=360;I[ge]=ke}else I[ge]=I[ge]/G[ge];return ye/=N,new p(I,g).alpha(ye>.99999?1:ye,!0)},Ep=function(f,g){for(var b=f.length,N=[0,0,0,0],L=0;L.9999999&&(N[3]=1),new p(wp(N))},ha=u.type,Cp=Math.pow,_r=function(f){var g="rgb",b=C("#ccc"),N=0,L=[0,1],P=[],I=[0,0],G=!1,U=[],K=!1,ae=0,$=1,ye=!1,ge={},ke=!0,qe=1,Te=function(re){if(re=re||["#fff","#000"],re&&ha(re)==="string"&&C.brewer&&C.brewer[re.toLowerCase()]&&(re=C.brewer[re.toLowerCase()]),ha(re)==="array"){re.length===1&&(re=[re[0],re[0]]),re=re.slice(0);for(var Ae=0;Ae=G[Re];)Re++;return Re-1}return 0},Ze=function(re){return re},_t=function(re){return re},Et=function(re,Ae){var Re,Oe;if(Ae==null&&(Ae=!1),isNaN(re)||re===null)return b;if(Ae)Oe=re;else if(G&&G.length>2){var jt=He(re);Oe=jt/(G.length-2)}else $!==ae?Oe=(re-ae)/($-ae):Oe=1;Oe=_t(Oe),Ae||(Oe=Ze(Oe)),qe!==1&&(Oe=Cp(Oe,qe)),Oe=I[0]+Oe*(1-I[0]-I[1]),Oe=Math.min(1,Math.max(0,Oe));var tt=Math.floor(Oe*1e4);if(ke&&ge[tt])Re=ge[tt];else{if(ha(U)==="array")for(var ze=0;ze=Ye&&ze===P.length-1){Re=U[ze];break}if(Oe>Ye&&Oe2){var ze=re.map(function(ut,Ke){return Ke/(re.length-1)}),Ye=re.map(function(ut){return(ut-ae)/($-ae)});Ye.every(function(ut,Ke){return ze[Ke]===ut})||(_t=function(ut){if(ut<=0||ut>=1)return ut;for(var Ke=0;ut>=Ye[Ke+1];)Ke++;var Tn=(ut-Ye[Ke])/(Ye[Ke+1]-Ye[Ke]),ma=ze[Ke]+Tn*(ze[Ke+1]-ze[Ke]);return ma})}}return L=[ae,$],Le},Le.mode=function(re){return arguments.length?(g=re,zt(),Le):g},Le.range=function(re,Ae){return Te(re,Ae),Le},Le.out=function(re){return K=re,Le},Le.spread=function(re){return arguments.length?(N=re,Le):N},Le.correctLightness=function(re){return re==null&&(re=!0),ye=re,zt(),ye?Ze=function(Ae){for(var Re=Et(0,!0).lab()[0],Oe=Et(1,!0).lab()[0],jt=Re>Oe,tt=Et(Ae,!0).lab()[0],ze=Re+(Oe-Re)*Ae,Ye=tt-ze,ut=0,Ke=1,Tn=20;Math.abs(Ye)>.01&&Tn-- >0;)(function(){return jt&&(Ye*=-1),Ye<0?(ut=Ae,Ae+=(Ke-Ae)*.5):(Ke=Ae,Ae+=(ut-Ae)*.5),tt=Et(Ae,!0).lab()[0],Ye=tt-ze})();return Ae}:Ze=function(Ae){return Ae},Le},Le.padding=function(re){return re!=null?(ha(re)==="number"&&(re=[re,re]),I=re,Le):I},Le.colors=function(re,Ae){arguments.length<2&&(Ae="hex");var Re=[];if(arguments.length===0)Re=U.slice(0);else if(re===1)Re=[Le(.5)];else if(re>1){var Oe=L[0],jt=L[1]-Oe;Re=Ap(0,re,!1).map(function(Ke){return Le(Oe+Ke/(re-1)*jt)})}else{f=[];var tt=[];if(G&&G.length>2)for(var ze=1,Ye=G.length,ut=1<=Ye;ut?zeYe;ut?ze++:ze--)tt.push((G[ze-1]+G[ze])*.5);else tt=L;Re=tt.map(function(Ke){return Le(Ke)})}return C[Ae]&&(Re=Re.map(function(Ke){return Ke[Ae]()})),Re},Le.cache=function(re){return re!=null?(ke=re,Le):ke},Le.gamma=function(re){return re!=null?(qe=re,Le):qe},Le.nodata=function(re){return re!=null?(b=C(re),Le):b},Le};function Ap(f,g,b){for(var N=[],L=fP;L?I++:I--)N.push(I);return N}var Ji=function(f){var g,b,N,L,P,I,G;if(f=f.map(function($){return new p($)}),f.length===2)g=f.map(function($){return $.lab()}),P=g[0],I=g[1],L=function($){var ye=[0,1,2].map(function(ge){return P[ge]+$*(I[ge]-P[ge])});return new p(ye,"lab")};else if(f.length===3)b=f.map(function($){return $.lab()}),P=b[0],I=b[1],G=b[2],L=function($){var ye=[0,1,2].map(function(ge){return(1-$)*(1-$)*P[ge]+2*(1-$)*$*I[ge]+$*$*G[ge]});return new p(ye,"lab")};else if(f.length===4){var U;N=f.map(function($){return $.lab()}),P=N[0],I=N[1],G=N[2],U=N[3],L=function($){var ye=[0,1,2].map(function(ge){return(1-$)*(1-$)*(1-$)*P[ge]+3*(1-$)*(1-$)*$*I[ge]+3*(1-$)*$*$*G[ge]+$*$*$*U[ge]});return new p(ye,"lab")}}else if(f.length===5){var K=Ji(f.slice(0,3)),ae=Ji(f.slice(2,5));L=function($){return $<.5?K($*2):ae(($-.5)*2)}}return L},kp=function(f){var g=Ji(f);return g.scale=function(){return _r(g)},g},nn=function(f,g,b){if(!nn[b])throw new Error("unknown blend mode "+b);return nn[b](f,g)},xn=function(f){return function(g,b){var N=C(b).rgb(),L=C(g).rgb();return C.rgb(f(N,L))}},Fn=function(f){return function(g,b){var N=[];return N[0]=f(g[0],b[0]),N[1]=f(g[1],b[1]),N[2]=f(g[2],b[2]),N}},xp=function(f){return f},Fp=function(f,g){return f*g/255},Tp=function(f,g){return f>g?g:f},Sp=function(f,g){return f>g?f:g},Bp=function(f,g){return 255*(1-(1-f/255)*(1-g/255))},Mp=function(f,g){return g<128?2*f*g/255:255*(1-2*(1-f/255)*(1-g/255))},Np=function(f,g){return 255*(1-(1-g/255)/(f/255))},Ip=function(f,g){return f===255?255:(f=255*(g/255)/(1-f/255),f>255?255:f)};nn.normal=xn(Fn(xp)),nn.multiply=xn(Fn(Fp)),nn.screen=xn(Fn(Bp)),nn.overlay=xn(Fn(Mp)),nn.darken=xn(Fn(Tp)),nn.lighten=xn(Fn(Sp)),nn.dodge=xn(Fn(Ip)),nn.burn=xn(Fn(Np));for(var Op=nn,$i=u.type,qp=u.clip_rgb,Rp=u.TWOPI,Lp=Math.pow,Pp=Math.sin,jp=Math.cos,Vp=function(f,g,b,N,L){f===void 0&&(f=300),g===void 0&&(g=-1.5),b===void 0&&(b=1),N===void 0&&(N=1),L===void 0&&(L=[0,1]);var P=0,I;$i(L)==="array"?I=L[1]-L[0]:(I=0,L=[L,L]);var G=function(U){var K=Rp*((f+120)/360+g*U),ae=Lp(L[0]+I*U,N),$=P!==0?b[0]+U*P:b,ye=$*ae*(1-ae)/2,ge=jp(K),ke=Pp(K),qe=ae+ye*(-.14861*ge+1.78277*ke),Te=ae+ye*(-.29227*ge-.90649*ke),He=ae+ye*(1.97294*ge);return C(qp([qe*255,Te*255,He*255,1]))};return G.start=function(U){return U==null?f:(f=U,G)},G.rotations=function(U){return U==null?g:(g=U,G)},G.gamma=function(U){return U==null?N:(N=U,G)},G.hue=function(U){return U==null?b:(b=U,$i(b)==="array"?(P=b[1]-b[0],P===0&&(b=b[1])):P=0,G)},G.lightness=function(U){return U==null?L:($i(U)==="array"?(L=U,I=U[1]-U[0]):(L=[U,U],I=0),G)},G.scale=function(){return C.scale(G)},G.hue(b),G},Hp="0123456789abcdef",Wp=Math.floor,Gp=Math.random,Up=function(){for(var f="#",g=0;g<6;g++)f+=Hp.charAt(Wp(Gp()*16));return new p(f,"hex")},Zs=Math.log,zp=Math.pow,Yp=Math.floor,Zp=Math.abs,Ks=function(f,g){g===void 0&&(g=null);var b={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return o(f)==="object"&&(f=Object.values(f)),f.forEach(function(N){g&&o(N)==="object"&&(N=N[g]),N!=null&&!isNaN(N)&&(b.values.push(N),b.sum+=N,Nb.max&&(b.max=N),b.count+=1)}),b.domain=[b.min,b.max],b.limits=function(N,L){return Qs(b,N,L)},b},Qs=function(f,g,b){g===void 0&&(g="equal"),b===void 0&&(b=7),o(f)=="array"&&(f=Ks(f));var N=f.min,L=f.max,P=f.values.sort(function(io,oo){return io-oo});if(b===1)return[N,L];var I=[];if(g.substr(0,1)==="c"&&(I.push(N),I.push(L)),g.substr(0,1)==="e"){I.push(N);for(var G=1;G 0");var U=Math.LOG10E*Zs(N),K=Math.LOG10E*Zs(L);I.push(N);for(var ae=1;ae200&&(_t=!1)}for(var Ha={},no=0;noN?(b+.05)/(N+.05):(N+.05)/(b+.05)},Er=Math.sqrt,Qp=Math.atan2,Js=Math.abs,$s=Math.cos,eo=Math.PI,Xp=function(f,g,b,N){b===void 0&&(b=1),N===void 0&&(N=1),f=new p(f),g=new p(g);for(var L=Array.from(f.lab()),P=L[0],I=L[1],G=L[2],U=Array.from(g.lab()),K=U[0],ae=U[1],$=U[2],ye=Er(I*I+G*G),ge=Er(ae*ae+$*$),ke=P<16?.511:.040975*P/(1+.01765*P),qe=.0638*ye/(1+.0131*ye)+.638,Te=ye<1e-6?0:Qp(G,I)*180/eo;Te<0;)Te+=360;for(;Te>=360;)Te-=360;var He=Te>=164&&Te<=345?.56+Js(.2*$s(eo*(Te+168)/180)):.36+Js(.4*$s(eo*(Te+35)/180)),Ze=ye*ye*ye*ye,_t=Er(Ze/(Ze+1900)),Et=qe*(_t*He+1-_t),zt=P-K,Le=ye-ge,re=I-ae,Ae=G-$,Re=re*re+Ae*Ae-Le*Le,Oe=zt/(b*ke),jt=Le/(N*qe),tt=Et;return Er(Oe*Oe+jt*jt+Re/(tt*tt))},Jp=function(f,g,b){b===void 0&&(b="lab"),f=new p(f),g=new p(g);var N=f.get(b),L=g.get(b),P=0;for(var I in N){var G=(N[I]||0)-(L[I]||0);P+=G*G}return Math.sqrt(P)},$p=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];try{return new(Function.prototype.bind.apply(p,[null].concat(f))),!0}catch{return!1}},eg={cool:function(){return _r([C.hsl(180,1,.9),C.hsl(250,.7,.4)])},hot:function(){return _r(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")}},Cr={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},to=0,el=Object.keys(Cr);to{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.default=void 0;var vo=Ir(al()),bo=Ir(yl()),y2=Ir(zl()),Nr=Ir(Yl());function Ir(t){return t&&t.__esModule?t:{default:t}}function v2(t){if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(t=b2(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(s){throw s},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,r=!0,i=!1,o;return{s:function(){a=t[Symbol.iterator]()},n:function(){var s=a.next();return r=s.done,s},e:function(s){i=!0,o=s},f:function(){try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}}}function b2(t,e){if(!!t){if(typeof t=="string")return Zl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zl(t,e)}}function Zl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n=n.hueMin&&r[0]<=n.hueMax&&r[1]>=n.chromaMin&&r[1]<=n.chromaMax&&r[2]>=n.lightMin&&r[2]<=n.lightMax&&o[0]>=e[0]-l&&o[0]<=e[0]+l&&o[1]>=e[1]-l&&o[1]<=e[1]+l&&o[2]>=e[2]-l&&o[2]<=e[2]+l},C2=function(e){for(var n=e.slice(0),a=[n.shift()];n.length>0;){for(var r=a[a.length-1],i=0,o=Number.MIN_SAFE_INTEGER,l=0;lo&&(o=s,i=l)}a.push(n.splice(i,1)[0])}return a},A2=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=w2({},_2,{},e);if(n.count<=0)return[];n.samples=n.count));v+=m);for(var p=1;p<=n.quality;p+=1){for(var k=(0,bo.default)(r),C=(0,bo.default)(i),A=0;A{(function(t){var e=typeof qr=="object"&&qr,n=typeof za=="object"&&za&&za.exports==e&&za,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(t=a);var r=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,i=/[\x01-\x7F]/g,o=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,s={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},d=/["&'<>`]/g,u={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},c=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,m={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` -`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},v={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},p={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"},k=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],C=String.fromCharCode,A={},S=A.hasOwnProperty,_=function(Z,z){return S.call(Z,z)},F=function(Z,z){for(var Q=-1,De=Z.length;++Q=55296&&Z<=57343||Z>1114111?(z&&B("character reference outside the permissible Unicode range"),"\uFFFD"):_(p,Z)?(z&&B("disallowed character reference"),p[Z]):(z&&F(k,Z)&&B("disallowed character reference"),Z>65535&&(Z-=65536,Q+=C(Z>>>10&1023|55296),Z=56320|Z&1023),Q+=C(Z),Q)},x=function(Z){return"&#x"+Z.toString(16).toUpperCase()+";"},V=function(Z){return"&#"+Z+";"},B=function(Z){throw Error("Parse error: "+Z)},H=function(Z,z){z=w(z,H.options);var Q=z.strict;Q&&h.test(Z)&&B("forbidden code point");var De=z.encodeEverything,ve=z.useNamedReferences,Ne=z.allowUnsafeSymbols,je=z.decimal?V:x,at=function(Pe){return je(Pe.charCodeAt(0))};return De?(Z=Z.replace(i,function(Pe){return ve&&_(s,Pe)?"&"+s[Pe]+";":at(Pe)}),ve&&(Z=Z.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),ve&&(Z=Z.replace(l,function(Pe){return"&"+s[Pe]+";"}))):ve?(Ne||(Z=Z.replace(d,function(Pe){return"&"+s[Pe]+";"})),Z=Z.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),Z=Z.replace(l,function(Pe){return"&"+s[Pe]+";"})):Ne||(Z=Z.replace(d,at)),Z.replace(r,function(Pe){var gt=Pe.charCodeAt(0),xt=Pe.charCodeAt(1),Je=(gt-55296)*1024+xt-56320+65536;return je(Je)}).replace(o,at)};H.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var Y=function(Z,z){z=w(z,Y.options);var Q=z.strict;return Q&&c.test(Z)&&B("malformed character reference"),Z.replace(y,function(De,ve,Ne,je,at,Pe,gt,xt,Je){var Fe,Ve,Rt,Gt,Ft,Mt;return ve?(Ft=ve,m[Ft]):Ne?(Ft=Ne,Mt=je,Mt&&z.isAttributeValue?(Q&&Mt=="="&&B("`&` did not start a character reference"),De):(Q&&B("named character reference was not terminated by a semicolon"),v[Ft]+(Mt||""))):at?(Rt=at,Ve=Pe,Q&&!Ve&&B("character reference was not terminated by a semicolon"),Fe=parseInt(Rt,10),M(Fe,Q)):gt?(Gt=gt,Ve=xt,Q&&!Ve&&B("character reference was not terminated by a semicolon"),Fe=parseInt(Gt,16),M(Fe,Q)):(Q&&B("named character reference was not terminated by a semicolon"),De)})};Y.options={isAttributeValue:!1,strict:!1};var he=function(Z){return Z.replace(d,function(z){return u[z]})},oe={version:"1.2.0",encode:H,decode:Y,escape:he,unescape:Y};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return oe});else if(e&&!e.nodeType)if(n)n.exports=oe;else for(var ce in oe)_(oe,ce)&&(e[ce]=oe[ce]);else t.he=oe})(qr)});var Wd=Qe((gr,yr)=>{(function(t,e){if(typeof gr=="object"){var n=e();typeof yr=="object"&&yr&&yr.exports&&(gr=yr.exports=n),gr.randomColor=n}else typeof define=="function"&&define.amd?define([],e):t.randomColor=e()})(gr,function(){var t=null,e={};v();var n=[],a=function(_){if(_=_||{},_.seed!==void 0&&_.seed!==null&&_.seed===parseInt(_.seed,10))t=_.seed;else if(typeof _.seed=="string")t=A(_.seed);else{if(_.seed!==void 0&&_.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var F,w,M;if(_.count!==null&&_.count!==void 0){for(var x=_.count,V=[],B=0;B<_.count;B++)n.push(!1);for(_.count=null;x>V.length;){var H=a(_);t!==null&&(_.seed=t),V.push(H)}return _.count=x,V}return F=r(_),w=i(F,_),M=o(F,w,_),l([F,w,M],_)};function r(_){if(n.length>0){var F=S(_.hue),w=h(F),M=(F[1]-F[0])/n.length,x=parseInt((w-F[0])/M);n[x]===!0?x=(x+2)%n.length:n[x]=!0;var V=(F[0]+x*M)%359,B=(F[0]+(x+1)*M)%359;return F=[V,B],w=h(F),w<0&&(w=360+w),w}else{var F=d(_.hue);return w=h(F),w<0&&(w=360+w),w}}function i(_,F){if(F.hue==="monochrome")return 0;if(F.luminosity==="random")return h([0,100]);var w=u(_),M=w[0],x=w[1];switch(F.luminosity){case"bright":M=55;break;case"dark":M=x-10;break;case"light":x=55;break}return h([M,x])}function o(_,F,w){var M=s(_,F),x=100;switch(w.luminosity){case"dark":x=M+20;break;case"light":M=(x+M)/2;break;case"random":M=0,x=100;break}return h([M,x])}function l(_,F){switch(F.format){case"hsvArray":return _;case"hslArray":return C(_);case"hsl":var w=C(_);return"hsl("+w[0]+", "+w[1]+"%, "+w[2]+"%)";case"hsla":var M=C(_),x=F.alpha||Math.random();return"hsla("+M[0]+", "+M[1]+"%, "+M[2]+"%, "+x+")";case"rgbArray":return p(_);case"rgb":var V=p(_);return"rgb("+V.join(", ")+")";case"rgba":var B=p(_),x=F.alpha||Math.random();return"rgba("+B.join(", ")+", "+x+")";default:return y(_)}}function s(_,F){for(var w=c(_).lowerBounds,M=0;M=x&&F<=B){var Y=(H-V)/(B-x),he=V-Y*x;return Y*F+he}}return 0}function d(_){if(typeof parseInt(_)=="number"){var F=parseInt(_);if(F<360&&F>0)return[F,F]}if(typeof _=="string"){if(e[_]){var w=e[_];if(w.hueRange)return w.hueRange}else if(_.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var M=k(_)[0];return[M,M]}}return[0,360]}function u(_){return c(_).saturationRange}function c(_){_>=334&&_<=360&&(_-=360);for(var F in e){var w=e[F];if(w.hueRange&&_>=w.hueRange[0]&&_<=w.hueRange[1])return e[F]}return"Color not found"}function h(_){if(t===null){var F=.618033988749895,w=Math.random();return w+=F,w%=1,Math.floor(_[0]+w*(_[1]+1-_[0]))}else{var M=_[1]||1,x=_[0]||0;t=(t*9301+49297)%233280;var V=t/233280;return Math.floor(x+V*(M-x))}}function y(_){var F=p(_);function w(x){var V=x.toString(16);return V.length==1?"0"+V:V}var M="#"+w(F[0])+w(F[1])+w(F[2]);return M}function m(_,F,w){var M=w[0][0],x=w[w.length-1][0],V=w[w.length-1][1],B=w[0][1];e[_]={hueRange:F,lowerBounds:w,saturationRange:[M,x],brightnessRange:[V,B]}}function v(){m("monochrome",null,[[0,0],[100,0]]),m("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),m("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),m("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),m("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),m("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),m("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),m("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function p(_){var F=_[0];F===0&&(F=1),F===360&&(F=359),F=F/360;var w=_[1]/100,M=_[2]/100,x=Math.floor(F*6),V=F*6-x,B=M*(1-w),H=M*(1-V*w),Y=M*(1-(1-V)*w),he=256,oe=256,ce=256;switch(x){case 0:he=M,oe=Y,ce=B;break;case 1:he=H,oe=M,ce=B;break;case 2:he=B,oe=M,ce=Y;break;case 3:he=B,oe=H,ce=M;break;case 4:he=Y,oe=B,ce=M;break;case 5:he=M,oe=B,ce=H;break}var Z=[Math.floor(he*255),Math.floor(oe*255),Math.floor(ce*255)];return Z}function k(_){_=_.replace(/^#/,""),_=_.length===3?_.replace(/(.)/g,"$1$1"):_;var F=parseInt(_.substr(0,2),16)/255,w=parseInt(_.substr(2,2),16)/255,M=parseInt(_.substr(4,2),16)/255,x=Math.max(F,w,M),V=x-Math.min(F,w,M),B=x?V/x:0;switch(x){case F:return[60*((w-M)/V%6)||0,B,x];case w:return[60*((M-F)/V+2)||0,B,x];case M:return[60*((F-w)/V+4)||0,B,x]}}function C(_){var F=_[0],w=_[1]/100,M=_[2]/100,x=(2-w)*M;return[F,Math.round(w*M/(x<1?x:2-x)*1e4)/100,x/2*100]}function A(_){for(var F=0,w=0;w!==_.length&&!(F>=Number.MAX_SAFE_INTEGER);w++)F+=_.charCodeAt(w);return F}function S(_){if(isNaN(_)){if(typeof _=="string"){if(e[_]){var w=e[_];if(w.hueRange)return w.hueRange}else if(_.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var M=k(_)[0];return c(M).hueRange}}}else{var F=parseInt(_);if(F<360&&F>0)return c(_).hueRange}return[0,360]}return a})});lg(exports,{DEFAULT_CALENDAR:()=>or,DEFAULT_DATA:()=>jh,MODIFIER_KEY:()=>Ph,default:()=>Ts});var ja=xe(require("obsidian"));var Ge=xe(require("obsidian")),Ra=xe(Vn());var $l=xe(Xl());function wo(t,e){let n=window.moment(t),a=window.moment(e),r=a.diff(n,"days");return(n.year()a.hour()||n.minute()>a.minute()||n.second()>a.second()||n.millisecond()>a.millisecond())&&(r+=1),r}function Sn(t,e){return(t%e+e)%e}function et(t){return"ID_xyxyxyxyxyxy".replace(/[xy]/g,function(e){var n=Math.random()*16|0,a=e=="x"?n:n&3|8;return a.toString(16)})}function Ua(t){if(!t.interval?.length)return"";let e=t.interval.sort((r,i)=>r.interval-i.interval),n=[];for(let r of e){let i=r.interval,o=t.offset&&!r.ignore?` (offset by ${t.offset})`:"";if(r.exclusive)i==1?n.push(`not every year${o}`):n.push(`not every ${Nt(i)} year${o}`);else{let l=e.indexOf(r),s=l>0&&e[l-1].exclusive;i==1?n.push(`${s?"also ":""}every year${o}`):n.push(`${s?"also ":""}every ${Nt(i)} year${o}`)}}let a=n.join(", but ");return a[0].toUpperCase()+a.slice(1).toLowerCase()}function Nt(t){let e=t%10,n=t%100;return e==1&&n!=11?t+"st":e==2&&n!=12?t+"nd":e==3&&n!=13?t+"rd":t+"th"}function yn(t,e,n){if(!t||t.day==null)return"";let{day:a,month:r,year:i}=t;if(r!=null&&!e[r])return"Invalid Date";if(n&&n.day){let o=n.day,l=n.month,s=n.year;if(l!=null&&s!=null&&r!=null&&i!=null)return i!=s?`${e[r].name} ${Nt(a)}, ${i} - ${e[l].name} ${Nt(o)}, ${s}`:l==r?`${e[r].name} ${Nt(a)}-${Nt(o)}, ${i}`:r!=null&&i!=null?`${e[r].name} ${Nt(a)}-${e[l].name} ${Nt(o)}, ${i}`:r!=null?`${e[r].name} ${Nt(a)}-${e[l].name} ${Nt(o)} of every year`:`${Nt(a)}-${Nt(o)} of every month`}return r!=null&&i!=null?`${e[r].name} ${Nt(a)}, ${i}`:r!=null?`${e[r].name} ${Nt(a)} of every year`:`${Nt(a)} of every month`}function Hn(t,e){return!(t==null||e?.current?.month==null||t<1||t<1||t>e?.static?.months[e.current?.month]?.length||!e?.static?.months[e.current?.month]?.length)}function Wn(t,e){return!(t==null||!e?.static?.months?.length||t<0||t>=e?.static?.months?.length)}function Gn(t,e){return!(t==null||t<1&&!e.static?.useCustomYears||e?.static?.useCustomYears&&(!e?.static?.years?.length||t<0||t>=e?.static?.years?.length))}var eu=xe(Jl()),Rr=class{static import(e){let n=[];for(let a of e){let r=a.name??"Imported Calendar",i=a.static_data;if(!i)continue;let o=i.year_data;if(!o)continue;let l=o.first_day-1,s=o.overflow??!0,d=o.global_week;if(!d)continue;let u=d.map(w=>({type:"day",name:w,id:et(6)})),c=o.timespans;if(!c)continue;let h=c.map(w=>({name:(0,eu.decode)(w.name),type:w.type,length:w.length,id:et(6)})),y=h.reduce((w,M)=>M.type=="month"?w+M.length:w,0),m=[];if("leap_days"in o)for(let w of o.leap_days){let x=(w.interval.split(",")??["1"]).map(V=>{let B=/\+/.test(V),H=/\!/.test(V),Y=V.match(/(\d+)/).first();return{ignore:B,exclusive:H,interval:Number(Y)}});m.push({name:w.name??`Leap Day ${m.length+1}`,type:"leapday",interval:x,timespan:w.timespan??0,intercalary:w.intercalary??!1,numbered:!w.not_numbered,after:w.day,offset:w.offset??0,id:et(6)})}let v=[];if("moons"in i)for(let w of i.moons)v.push({name:w.name??`Moon ${v.length+1}`,cycle:Number(w.cycle)??y,offset:w.shift??0,faceColor:w.color??"#ffffff",shadowColor:w.shadow_color??"#000000",id:et(6)});let p=[];if("eras"in i)for(let w of i.eras)p.push({name:w.name??`Era ${p.length+1}`,description:w.description,format:w.formatting??"Year {{year}} - {{era_name}}",start:{year:w.date?.year??1,month:w.date?.timespan??0,day:w.date?.day??0}});let k={firstWeekDay:l,overflow:s,weekdays:u,months:h,moons:v,leapDays:m,eras:p,displayMoons:!0,incrementDay:!1,displayDayNumber:!1},C={year:1,day:1,month:0};a.dynamic_data&&(C.year=Math.max(1,a.dynamic_data.year??C.year),C.day=a.dynamic_data.day??C.day,C.month=a.dynamic_data.timespan??C.month);let A=[],S=new Map;if("categories"in a)for(let w of a.categories){let M=w.name,x=M?.split(" ").join("-").toLowerCase()??et(6),V=w.event_settings.color;if(V in tu)V=tu[V];else{V=V.split("-").join("");let B=createEl("canvas"),H=B.getContext("2d");H.fillStyle=V,V=H.fillStyle,B.detach()}S.set(x,{name:M,id:x,color:V})}if(a.events&&Array.isArray(a.events)&&a.events.length)for(let w of a.events){let M={day:null,year:null,month:null};if(w.data&&w.data.date&&Array.isArray(w.data?.date)&&w.data.date.length)M.day=w.data.date[2],M.month=w.data.date[1],M.year=w.data.date[0];else if(w.data&&w.data.conditions&&Array.isArray(w.data.conditions)){let V=w.data.conditions;try{let B=V.find(he=>he[0]==="Year"),H=V.find(he=>he[0]==="Month"),Y=V.find(he=>he[0]==="Day");B&&(M.year=Number(B[2][0])),H&&(M.month=Number(H[2][0])),Y&&(M.day=Number(Y[2][0]))}catch{}}let x;if(w.description){let V=createDiv();V.innerHTML=w.description,x=V.textContent}A.push({name:w.name,description:x,id:`${w.id}`,note:null,date:M,category:S.get(w.event_category_id)?.id??null})}let _=(0,$l.default)({count:S.size});for(let w of S.keys()){let M=S.get(w);M.color||(M.color=_.shift().hex(),S.set(w,M))}let F={name:r,description:null,static:k,current:C,events:A,id:et(6),categories:Array.from(S.values())};n.push(F)}return n}},tu={"Dark-Solid":"#000000",Red:"#9b2c2c",Pink:"#880E4F",Purple:"#4A148C","Deep-Purple":"#311B92",Blue:"#0D47A1","Light-Blue":"#0288D1",Cyan:"#006064",Teal:"#004D40",Green:"#2E7D32","Light-Green":"#7CB342",Lime:"#9e9d24",Yellow:"#FFEB3B",Orange:"#FF9100","Blue-Grey":"#455A64"};function X(){}var Lr=t=>t;function nu(t,e){for(let n in e)t[n]=e[n];return t}function Do(t){return t()}function au(){return Object.create(null)}function _e(t){t.forEach(Do)}function rt(t){return typeof t=="function"}function se(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function ru(t){return Object.keys(t).length===0}function Pr(t,e,n,a){if(t){let r=iu(t,e,n,a);return t[0](r)}}function iu(t,e,n,a){return t[1]&&a?nu(n.ctx.slice(),t[1](a(e))):n.ctx}function jr(t,e,n,a){if(t[2]&&a){let r=t[2](a(n));if(e.dirty===void 0)return r;if(typeof r=="object"){let i=[],o=Math.max(e.dirty.length,r.length);for(let l=0;l32){let e=[],n=t.ctx.length/32;for(let a=0;awindow.performance.now():()=>Date.now(),Eo=ou?t=>requestAnimationFrame(t):X;var pa=new Set;function lu(t){pa.forEach(e=>{e.c(t)||(pa.delete(e),e.f())}),pa.size!==0&&Eo(lu)}function uu(t){let e;return pa.size===0&&Eo(lu),{promise:new Promise(n=>{pa.add(e={c:t,f:n})}),abort(){pa.delete(e)}}}var cu=!1;function x2(){cu=!0}function F2(){cu=!1}function E(t,e){t.appendChild(e)}function be(t,e,n){let a=Co(t);if(!a.getElementById(e)){let r=T("style");r.id=e,r.textContent=n,du(a,r)}}function Co(t){if(!t)return document;let e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function T2(t){let e=T("style");return du(Co(t),e),e.sheet}function du(t,e){E(t.head||t,e)}function q(t,e,n){t.insertBefore(e,n||null)}function O(t){t.parentNode.removeChild(t)}function We(t,e){for(let n=0;nt.removeEventListener(e,n,a)}function D(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function rn(t){return t===""?null:+t}function S2(t){return Array.from(t.childNodes)}function we(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function yt(t,e){t.value=e??""}function $e(t,e,n,a){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,a?"important":"")}function Vt(t,e){for(let n=0;n>>0}function M2(t,e){let n={stylesheet:T2(e),rules:{}};return Wr.set(t,n),n}function Ao(t,e,n,a,r,i,o,l=0){let s=16.666/a,d=`{ -`;for(let p=0;p<=1;p+=s){let k=e+(n-e)*i(p);d+=p*100+`%{${o(k,1-k)}} -`}let u=d+`100% {${o(n,1-n)}} -}`,c=`__svelte_${B2(u)}_${l}`,h=Co(t),{stylesheet:y,rules:m}=Wr.get(h)||M2(h,t);m[c]||(m[c]=!0,y.insertRule(`@keyframes ${c} ${u}`,y.cssRules.length));let v=t.style.animation||"";return t.style.animation=`${v?`${v}, `:""}${c} ${a}ms linear ${r}ms 1 both`,Gr+=1,c}function hu(t,e){let n=(t.style.animation||"").split(", "),a=n.filter(e?i=>i.indexOf(e)<0:i=>i.indexOf("__svelte")===-1),r=n.length-a.length;r&&(t.style.animation=a.join(", "),Gr-=r,Gr||N2())}function N2(){Eo(()=>{Gr||(Wr.forEach(t=>{let{stylesheet:e}=t,n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}}),Wr.clear())})}function ga(t,e,n,a){if(!e)return X;let r=t.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return X;let{delay:i=0,duration:o=300,easing:l=Lr,start:s=su()+i,end:d=s+o,tick:u=X,css:c}=n(t,{from:e,to:r},a),h=!0,y=!1,m;function v(){c&&(m=Ao(t,0,1,o,i,l,c)),i||(y=!0)}function p(){c&&hu(t,m),h=!1}return uu(k=>{if(!y&&k>=s&&(y=!0),y&&k>=d&&(u(1,0),p()),!h)return!1;if(y){let C=k-s,A=0+1*l(C/o);u(A,1-A)}return!0}),v(),u(0,1),p}function ya(t){let e=getComputedStyle(t);if(e.position!=="absolute"&&e.position!=="fixed"){let{width:n,height:a}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=a,I2(t,r)}}function I2(t,e){let n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){let a=getComputedStyle(t),r=a.transform==="none"?"":a.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}var Ya;function Za(t){Ya=t}function Ka(){if(!Ya)throw new Error("Function called outside component initialization");return Ya}function Un(t){Ka().$$.on_mount.push(t)}function ko(t){Ka().$$.on_destroy.push(t)}function Se(){let t=Ka();return(e,n)=>{let a=t.$$.callbacks[e];if(a){let r=fu(e,n);a.slice().forEach(i=>{i.call(t,r)})}}}function zn(t,e){Ka().$$.context.set(t,e)}function Xe(t){return Ka().$$.context.get(t)}function ue(t,e){let n=t.$$.callbacks[e.type];n&&n.slice().forEach(a=>a.call(this,e))}var Qa=[];var va=[],Ur=[],mu=[],pu=Promise.resolve(),xo=!1;function gu(){xo||(xo=!0,pu.then(yu))}function Yn(){return gu(),pu}function It(t){Ur.push(t)}var Fo=new Set,zr=0;function yu(){let t=Ya;do{for(;zr{Xa=null})),Xa}function To(t,e,n){t.dispatchEvent(fu(`${e?"intro":"outro"}${n}`))}var Yr=new Set,bn;function Ee(){bn={r:0,c:[],p:bn}}function Ce(){bn.r||_e(bn.c),bn=bn.p}function R(t,e){t&&t.i&&(Yr.delete(t),t.i(e))}function W(t,e,n,a){if(t&&t.o){if(Yr.has(t))return;Yr.add(t),bn.c.push(()=>{Yr.delete(t),a&&(n&&t.d(1),a())}),t.o(e)}}var R2={duration:0};function So(t,e,n,a){let r=e(t,n),i=a?0:1,o=null,l=null,s=null;function d(){s&&hu(t,s)}function u(h,y){let m=h.b-i;return y*=Math.abs(m),{a:i,b:h.b,d:m,duration:y,start:h.start,end:h.start+y,group:h.group}}function c(h){let{delay:y=0,duration:m=300,easing:v=Lr,tick:p=X,css:k}=r||R2,C={start:su()+y,b:h};h||(C.group=bn,bn.r+=1),o||l?l=C:(k&&(d(),s=Ao(t,i,h,m,y,v,k)),h&&p(0,1),o=u(C,m),It(()=>To(t,h,"start")),uu(A=>{if(l&&A>l.start&&(o=u(l,m),l=null,To(t,o.b,"start"),k&&(d(),s=Ao(t,i,o.b,o.duration,0,v,r.css))),o){if(A>=o.end)p(i=o.b,1-i),To(t,o.b,"end"),l||(o.b?d():--o.group.r||_e(o.group.c)),o=null;else if(A>=o.start){let S=A-o.start;i=o.a+o.d*v(S/o.duration),p(i,1-i)}}return!!(o||l)}))}return{run(h){rt(r)?q2().then(()=>{r=r(),c(h)}):c(h)},end(){d(),o=l=null}}}var Zb=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function L2(t,e){t.d(1),e.delete(t.key)}function P2(t,e){W(t,1,1,()=>{e.delete(t.key)})}function Zr(t,e){t.f(),L2(t,e)}function vu(t,e){t.f(),P2(t,e)}function ba(t,e,n,a,r,i,o,l,s,d,u,c){let h=t.length,y=i.length,m=h,v={};for(;m--;)v[t[m].key]=m;let p=[],k=new Map,C=new Map;for(m=y;m--;){let F=c(r,i,m),w=n(F),M=o.get(w);M?a&&M.p(F,e):(M=d(w,F),M.c()),k.set(w,p[m]=M),w in v&&C.set(w,Math.abs(m-v[w]))}let A=new Set,S=new Set;function _(F){R(F,1),F.m(l,u),o.set(F.key,F),u=F.first,y--}for(;h&&y;){let F=p[y-1],w=t[h-1],M=F.key,x=w.key;F===w?(u=F.first,h--,y--):k.has(x)?!o.has(M)||A.has(M)?_(F):S.has(x)?h--:C.get(M)>C.get(x)?(S.add(M),_(F)):(A.add(x),h--):(s(w,o),h--)}for(;h--;){let F=t[h];k.has(F.key)||s(F,o)}for(;y;)_(p[y-1]);return p}var Kb=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);function te(t){t&&t.c()}function ee(t,e,n,a){let{fragment:r,on_mount:i,on_destroy:o,after_update:l}=t.$$;r&&r.m(e,n),a||It(()=>{let s=i.map(Do).filter(rt);o?o.push(...s):_e(s),t.$$.on_mount=[]}),l.forEach(It)}function J(t,e){let n=t.$$;n.fragment!==null&&(_e(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function j2(t,e){t.$$.dirty[0]===-1&&(Qa.push(t),gu(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let m=y.length?y[0]:h;return d.ctx&&r(d.ctx[c],d.ctx[c]=m)&&(!d.skip_bound&&d.bound[c]&&d.bound[c](m),u&&j2(t,c)),h}):[],d.update(),u=!0,_e(d.before_update),d.fragment=a?a(d.ctx):!1,e.target){if(e.hydrate){x2();let c=S2(e.target);d.fragment&&d.fragment.l(c),c.forEach(O)}else d.fragment&&d.fragment.c();e.intro&&R(t.$$.fragment),ee(t,e.target,e.anchor,e.customElement),F2(),yu()}Za(s)}var V2;typeof HTMLElement=="function"&&(V2=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(Do).filter(rt);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){_e(this.$$.on_disconnect)}$destroy(){J(this,1),this.$destroy=X}$on(t,e){let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let a=n.indexOf(e);a!==-1&&n.splice(a,1)}}$set(t){this.$$set&&!ru(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var de=class{$destroy(){J(this,1),this.$destroy=X}$on(e,n){let a=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return a.push(n),()=>{let r=a.indexOf(n);r!==-1&&a.splice(r,1)}}$set(e){this.$$set&&!ru(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Df=xe(Vn()),kn=xe(require("obsidian"));var wu=xe(Vn()),Zn=xe(require("obsidian"));var bu=[{name:"Gregorian Calendar",description:"A calendar for the real world.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,incrementDay:!0,displayMoons:!0,firstWeekDay:1,overflow:!0,weekdays:[{type:"day",name:"Sunday",id:"ID_19ea684b4a08"},{type:"day",name:"Monday",id:"ID_2928b90ab949"},{type:"day",name:"Tuesday",id:"ID_0ad9a8f9e95b"},{type:"day",name:"Wednesday",id:"ID_195a4b290bc9"},{type:"day",name:"Thursday",id:"ID_abe8c89b0999"},{type:"day",name:"Friday",id:"ID_2b5b8a79fa4a"},{type:"day",name:"Saturday",id:"ID_1a78cb79c8cb"}],months:[{name:"January",type:"month",length:31,id:"ID_e9997a780b3a"},{name:"February",type:"month",length:28,id:"ID_b8c9ebeb0b89"},{name:"March",type:"month",length:31,id:"ID_b83bda2b9be8"},{name:"April",type:"month",length:30,id:"ID_29baea7b28ab"},{name:"May",type:"month",length:31,id:"ID_6a3899fad909"},{name:"June",type:"month",length:30,id:"ID_384aeb1afa8a"},{name:"July",type:"month",length:31,id:"ID_48b8cba87b8a"},{name:"August",type:"month",length:31,id:"ID_fa0b1a6bab8a"},{name:"September",type:"month",length:30,id:"ID_da880b8af849"},{name:"October",type:"month",length:31,id:"ID_babba8186968"},{name:"November",type:"month",length:30,id:"ID_da582bfaf9b9"},{name:"December",type:"month",length:31,id:"ID_ba1bab4a3a28"}],moons:[{name:"Moon",cycle:29.530588853,offset:9.24953,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_a9ab186b1819"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:400},{ignore:!1,exclusive:!0,interval:100},{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:1,intercalary:!1,id:"ID_b91ad86a887a"}],eras:[{name:"Before Christ",description:"",format:"Year {{abs_year}} - {{era_name}}",start:{year:-1,month:0,day:31}},{name:"Anno Domini",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1}}],offset:0},current:{year:null,day:null,month:null},events:[{name:"Summer Solstice",description:"At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824599",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824600",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824601",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824602",note:null,date:{day:null,year:null,month:null},category:null},{name:"Christmas",description:"Christmas is a Christian holiday celebrating the birth of Christ. Due to a combination of marketability and long lasting traditions it is popular even among many non-Christians, especially in countries that have a strong Christian tradition.",id:"824603",note:null,date:{day:25,year:null,month:11},category:"christian-holidays"},{name:"Paschal Full Moon",description:"The first full moon after march 21st, which is considered the fixed date for the spring equinox.",id:"824604",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Easter",description:"Easter is considered the most important feast for Christians, celebrating the resurrection of Christ. It is classed as a moveable feast occurring on the first full moon after the spring equinox, which is considered to be fixed at March 21st for the sake of computing the date.",id:"824605",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Easter Monday",description:"The Monday following the Easter Sunday is often considered part of the Easter Celebration and is a day off in many countries with a strong Christian tradition.",id:"824606",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Good Friday",description:"Good Friday is the Friday preceding Easter. It comemmorates the crucifixion of Christ according to the Bible.",id:"824607",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Pentecost",description:"Celebrated exactly 50 days after Easter, Pentecost is the celebration of the Holy Spirit appearing before the Apostles as described in the Bible.",id:"824608",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"New Year's Day",description:"New Year's Day marks the start of a new year on the Gregorian Calendar. It starts when the clock strikes midnight and is often celebrated with fireworks, champagne and kissing.",id:"824609",note:null,date:{day:1,year:null,month:0},category:"secular-holidays"},{name:"Valentine's Day",description:"Valentine's day is a celebration of love and romance that is popular across the world. Many more cynically minded people mostly consider it an attempt to monetize the expectation of romantic gestures on the holiday through gift cards, flowers, chocolate and dates.",id:"824610",note:null,date:{day:14,year:null,month:1},category:"secular-holidays"},{name:"Halloween",description:'Halloween is holiday popular in the US, Canada and Ireland that has gradually been adopted by more and more countries. It is often celebrated by people dressing up, usually as something scary. Children will often go from door to door shouting "trick or treat" in the hopes of receiving candy, while adults tend to go to parties.',id:"824611",note:null,date:{day:31,year:null,month:9},category:"secular-holidays"},{name:"Work on the first version of this calendar started.",description:"Aecius started work on the first version Gregorian Calendar for Fantasy Calendar on this day.",id:"824612",note:null,date:{day:23,year:2019,month:5},category:"miscellaneous-events"},{name:"Work on this version of the Gregorian Calendar started.",description:"On this day, Aecius started to rework the Gregorian Calendar from scratch to make it work with the updates Wasp and Alex implemented since the summer of 2019.",id:"824613",note:null,date:{day:21,year:2020,month:0},category:"miscellaneous-events"},{name:"Introduction of the Gregorian Calendar",description:"On this day in 1582 the Gregorian calendar was officially introduced, following Thursday October 4th on the Julian Calendar",id:"824614",note:null,date:{day:15,year:1582,month:9},category:"historical-events"}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Christian Holidays",id:"christian-holidays",color:"#9b2c2c"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Historical Events",id:"historical-events",color:"#455A64"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Greyhawk",description:"Calendar of the world of Greyhawk.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,incrementDay:!1,displayMoons:!0,firstWeekDay:0,overflow:!1,weekdays:[{type:"day",name:"Starday",id:"ID_a8e979984938"},{type:"day",name:"Sunday",id:"ID_1b68bb78ca1b"},{type:"day",name:"Moonday",id:"ID_c8b86aea0998"},{type:"day",name:"Godsday",id:"ID_b8097a18e95b"},{type:"day",name:"Waterday",id:"ID_1918c99949ca"},{type:"day",name:"Earthday",id:"ID_fa295a1bab89"},{type:"day",name:"Freeday",id:"ID_6a485ada3ae8"}],months:[{name:"Needfest",type:"month",length:7,id:"ID_b8a9e9da8a48"},{name:"Fireseek",type:"month",length:28,id:"ID_39b90bd8189a"},{name:"Readying",type:"month",length:28,id:"ID_48a9081ad839"},{name:"Coldeven",type:"month",length:28,id:"ID_5a7b6beadb68"},{name:"Growfest",type:"month",length:7,id:"ID_48c8d82b1908"},{name:"Planting",type:"month",length:28,id:"ID_081a793a49da"},{name:"Flocktime",type:"month",length:28,id:"ID_eb68a89a0a2a"},{name:"Wealsun",type:"month",length:28,id:"ID_9b3a098ae908"},{name:"Richfest",type:"month",length:7,id:"ID_f99b4b3a08b8"},{name:"Reaping",type:"month",length:28,id:"ID_ebe9eb68ea39"},{name:"Goodmonth",type:"month",length:28,id:"ID_fb3b6af9895b"},{name:"Harvester",type:"month",length:28,id:"ID_395bcb399b8a"},{name:"Brewfest",type:"month",length:7,id:"ID_e8b908181afa"},{name:"Patchwall",type:"month",length:28,id:"ID_cbda3b399969"},{name:"Ready'reat",type:"month",length:28,id:"ID_592a2a690bf8"},{name:"Sunsebb",type:"month",length:28,id:"ID_39e8faf8e9b8"}],moons:[{name:"Luna",cycle:28,offset:3,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_f8997b39b8b8"},{name:"Celene",cycle:91,offset:46,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_7afbb9b88be8"}],leapDays:[],eras:[{name:"Common Year",description:"",format:"Year {{year}} CY",start:{year:1,month:0,day:1}}]},current:{year:591,day:1,month:0},events:[{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824573",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:`The 4th of Growfest is the first day of Low Summer in Oerth's Calendar. This is the point where the sun crosses Oerth's equator. Holidays celebrated on this date include Saint Cuthbert's Day, the Feast of Edoira, the Spring Feast, and Raxivort's Orgy. This is also the day on which the priests of Tlaloc ritually sacrifice and eat the flesh of human children or babies in their patron's honor. Worshippers of Rillifane Rallathil celebrate the Budding on this day, a joyful celebration of new life celebrated through dance and song in oak groves in the heart of the forest. A ritual hunt of a noble heart is held on this day, after which the venison is eaten in celebration of Rillifane's bounty. - -Also celebrated on this date is the Sanctification of Renewal, a sacred holiday to the followers of Garyx.`,id:"824574",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824575",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The 4th of Brewfest is the Autumnal Equinox, when the sun crosses the equator from north to south. This date is the official end of high summer and the beginning of autumn on the Greyhawk Calendar. This date is holy to Wenta and is sometimes regarded as an unofficial holy day of Velnius. Among the xvarts, it also marks the celebration of Raxivort's Orgy. The worshippers of Rillifane Rallathil celebrate the Transformation on this day, a time of dancing and spiritual rebirth marking the beginning of autumn and the promise that spring will come again.",id:"824576",note:null,date:{day:null,year:null,month:null},category:null},{name:"Great Moons Glory",description:"The night of Great Moon's Glory on Readying 11th, when Luna is full but Celene is new. It is holy to Celestian, and a time when offerings are left to Atroa to beg her to come early and to Telchur to request that he peacefully leave. Druids of the Old Faith are known to also hold this night as auspicious, but few outside their circles know the details.",id:"824577",note:null,date:{day:null,year:null,month:null},category:null},{name:"Dark Night",description:`Dark Night, also called Black Night, Star Night, and the Night of Hopeful Dawn, is observed on Goodmonth 11. It is a holy night for the church of Celestian because the stars are so easy to observe without the light of one of the moons getting in the way. - -It is also a holy night for the church of Rao, who refer to it as the Night of Hopeful Judgment. They believe that Rao chooses this time to separate the sinful from the righteous in the afterworld. There is also a prophecy in the Raoan holy text, the Book of Incarum, that claims that Rao will cleanse the world of evil on this night, sometime in the future. - -The priesthood of Kurell consider it holy, too, calling it Kurell's Night, requiring the faithful to undertake special missions on this night to prove their cleverness and skill. Kurell smiles particularly on acts of theft or vengeance performed on his holy night, blessing those who do so successfully. Donations to Kurell's church are encouraged afterwards, for Kurell may take vengeance against those who do not properly thank him for his aid. - -Most other people regard Dark Night as a time of ill omen, fearing it as much as the night of the Blood Moon Festival. Bonfires are burned from dusk till dawn, particularly in small villages and in Elmshire and Narwell. Orc and goblin religions view it as an excellent night for raiding settlements. Certain evil cults perform kidnappings, murders, and vile rites during this period. On the other hand, lycanthropic activity is at its lowest. - -Iggwilv and Tuerny attempted to summon a demonic army to Luna on this night in 585 CY.`,id:"824578",note:null,date:{day:null,year:null,month:null},category:null},{name:"Agelong",description:`Agelong, observed on the 4th of Richfest (the Summer Solstice), is the celebration of the legendary creation of the elves. According to myth, after Corellon Larethian spilled his blood during the battle with Gruumsh, the rest of the Seldarine gathered this sacred blood and mingled it with the tears shed during the same battle by Sehanine Moonbow. The Seldarine then infused these divine fluids into vessels they had created to be the bodies of the elven race. - -This day is, among the elves, mostly an excuse to go orc-hunting. Elven warriors cut themselves with daggers carved from volcanic glass to remind themselves of Corellon's own wound from Gruumsh's spear, then strive to slaughter as many orcs as possible during the night.`,id:"824579",note:null,date:{day:4,year:null,month:8},category:null},{name:"Blood Moon Festival",description:`The Blood Moon Festival is celebrated on Coldeven 11, the night when Luna is full just before the Spring Equinox. On this night, curses are said to be twice as powerful and the forces of evil are at their strongest. Fiends roam the lands, and human sacrifice is common. This night is held especially sacred by cultists of Nerull, but worshipers of Kurell also mark this night as especially auspicious for acts of vengeance. Goodly folk superstitiously guard their homes with horseshoes, holy water, bottles of milk, and iron filings. - -Demonic forces sent by Iuz destroyed the leadership of the Horned Society during the Blood Moon Festival of 583 CY. - -It's possible that this is also the night the elves celebrate as Faerieluck.`,id:"824580",note:null,date:{day:11,year:null,month:3},category:null},{name:"Breadgiving Day",description:`Celebrated on on the Winter Solstice (Needfest 4), Breadgiving Day, is a day of charity observed in the Free City of Greyhawk by the faiths of Pelor, Rao, and Saint Cuthbert. - -This was not originally a religious holiday as such. It is a new practice that began after the Greyhawk Wars to feed the refugees that flooded the city during that time. Since of Old City who line up by the hundreds along the Processional from the Black Gate. The booths are worked by low-ranking priests from all three religions, with armed priests of St. Cuthbert providing security. A smaller event is held simultaneously below Wharfgate in Greyhawk City's Shacktown. - -The clergies of Heironeous, Pholtus, and Trithereon do not participate, but they compete with one another to perform good deeds the whole week of Needfest. The rivalries between Trithereon and Pholtus, Trithereon and Heironeous, and Pholtus and St. Cuthbert are such that the faiths sometimes fall into arguments and even blows if their "good deeds" conflict with each other. Greyhawk's rowdy citizens often cheer and place bets on the outcomes of these quarrels. - -The priests of Pelor hold a morning ceremony on this day with a sermon, singing, and music.`,id:"824581",note:null,date:{day:4,year:null,month:0},category:null},{name:"Brewfest",description:`Also called Drunken Days or the Feast of Brewers, Brewfest, the fourth festival week of Oerth's calendar, is a rowdy period unsurprisingly claimed as a holy time by the churches of Olidammara and Wenta. The Free City of Greyhawk does not celebrate the entire week, but Brewfest 1 and Brewfest 7 are both set aside as public holidays. In Elmshire, the week is spent in restful, carefree music, drinking, and dancing. In Hardby it is spent with fistfights, riots, and ensuing hangovers. In Narwell it is celebrated with ale-brewing contests, horse races, beatings, and robbery. In Safeton it is celebrated with nervous violence and nightly orc hunts. The week is also sacred to the Old Faith. - -The elves call this week Fallrite, and use it to contemplate the spirits of their ancestors, the passage to the afterworld, and the fragility of life. They believe other races make merry during Brewfest because they are "hiding" to avoid facing death's reality. In contrast, the olvenfolk strive to fulfill the most important of their duties and reach the most crucial of their decisions during this time of year. The elven kings and queens traditionally judge capital cases during Fallrite.`,id:"824582",note:null,date:{day:4,year:null,month:12},category:null},{name:"Faerieluck",description:"Faerieluck is a holiday celebrated by the elves in early spring, when the power of Faerie runs high and they celebrate with their fey cousins: the sprites, buckawns, pixies, nymphs and so forth. The point of the festival is to remind the elves of their ancient kinship with these creatures. The day is spent playing practical jokes, engaging in battles of wit, and general merriment.",id:"824583",note:null,date:{day:11,year:null,month:2},category:null},{name:"Feast of Edoira",description:`The Feast of Edoira is a holiday celebrated in the Domain of Greyhawk on Growfest 4, during the Spring Equinox. It is named after Edoira, a priest of Rao who centuries ago established the Edoiran Compact, a pact by which many of the lawful good-aligned faiths and people of the Domain could agree to cooperate. The Compact was later extended to non-lawful good and neutral faiths. - -Edoira was never deified but was revered by many good faiths in the Domain. The holiday was marked by religious services on Godsday of Growfest led by the clerics of the good faiths who partook of the Compact, and secular festivals by the ordinary citizenry. Observance of the holiday has declined over the years, though the clergies of Rao and Pelor still hold their traditional interfaith services, with occasional participation by the priesthoods of Heironeous and Mayaheine. Since the end of the Greyhawk Wars most of the Domain's outlying communities no longer observe the holiday. Only one church in Safeton still does so.`,id:"824584",note:null,date:{day:4,year:null,month:4},category:null},{name:"Desportium of Magic",description:`The highlight of Growfest is the Desportium of Magic. During this day torchlight only, no magic illumination is supposed to be used. Wizards and Sorcerers then perform feats of illusion and magic trying to outdo one another with their displays. Usually there is a panel of judges to decide, in the larger cities there is usually a limit of 5-person teams competing. Each performance during the Desportium of Magic uses a long established theme, that of an attack on the town by various monsters and Dark Elves, repelled by brave warriors and spellcasters. The displays, made up of any number of spells cast without the use of magic devices, cannot actually cause any harm to property or people, but must be as wonderful, striking, detailed, and lifelike as possible. - -This motif is based on actual attacks through the years from the Uttermost War to the most recent Great Slave Raids. The idea is to make the attackers as dreadful as possible and the defenders as heroic as possible, secondary is to make sure that people will always remember the terror of the Uttermost War. In large cities like the CSIO and CSWE and Tarantis, these performances last all night and are amazing to watch. In smaller villages without spellcasters, puppet plays are often done in its stead.`,id:"824585",note:null,date:{day:7,year:null,month:4},category:null},{name:"Holy Day of Pelor",description:`The Holy Day of Pelor, also known as Giving Day and Midsummer's Day, is celebrated on the Summer Solstice. - -Because Pelor is widely loved by the commoners, this day is set aside as a day of rest in the Free City of Greyhawk. Only essential work is done on this day. Many merchants close their shops on Giving Day as well out of respect for the Sun Father and his teachings. Gambling houses are closed, but not hostelries, for Giving Day is a day of feasting and goodwill, a time for enjoying the fruits of the Oerth. - -Public services are held from dawn until noon by Pelor's priests, outdoors if the weather permits (which if almost always does, as the clerics use weather-controlling magic for maximum sunlight). Even Greyhawk City's large temple of Pelor is not big enough to hold the throngs who come to celebrate on this day, so throngs of the faithful fill the temple grounds in the Garden Quarter, spilling out from the Millstream to the Nobles' Wall, and to the road leading toward Greyhawk's Grand Theater. Many come, of course, for the free meal the priests provide after the service. The Pelorian priests are well aware of this, but believe that for the needy, a full stomach must come before wisdom and learning. Members of Greyhawk's Guild of Thieves and Beggar's Union, many of whom remember Midsummer's Day fondly from their orphaned childhoods, both protect priests of Pelor on this day, and woe onto those who attempt to test them on this matter. - -Priests of Pelor, bedecked in yellow and gold, parade about the streets, demanding donations for their charitable works, freely using guilt to squeeze more from stingy purses. Free healings are given out, particularly to children. Most Greyhawkers wear at least one item of yellow cloth on this day out of respect. - -Some crusading Pelorians crusade against evil lycanthropes on this night, since both Celene and Luna are full.`,id:"824586",note:null,date:{day:4,year:null,month:8},category:null},{name:"Holy Day of Serenity",description:"The Holy Day of Serenity, on Reaping 10, is celebrated in Veluna as a holy day of Rao, though it's actually the anniversary of Veluna's secession from Furyondy in 476 CY. It is celebrated with religious singing and worship.",id:"824587",note:null,date:{day:10,year:null,month:9},category:null}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Religious Holidays",id:"religious-holidays",color:"#FFEB3B"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Magical Events",id:"magical-events",color:"#311B92"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Golarion",description:"Calendar for the world of Pathfinder.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Moonday",id:"ID_db8af8f85b8a"},{type:"day",name:"Toilday",id:"ID_f87a094b2849"},{type:"day",name:"Wealday",id:"ID_2a5bb88b3ae8"},{type:"day",name:"Oathday",id:"ID_c93a0be8981b"},{type:"day",name:"Fireday",id:"ID_2b7b59794a0b"},{type:"day",name:"Starday",id:"ID_baaa6a89ca1b"},{type:"day",name:"Sunday",id:"ID_f9baca088b28"}],months:[{name:"Abadius",type:"month",length:31,id:"ID_dad9da89f818"},{name:"Calistril",type:"month",length:28,id:"ID_980a88cb9b68"},{name:"Pharast",type:"month",length:31,id:"ID_a9c96ac80908"},{name:"Gozran",type:"month",length:30,id:"ID_a99a697b9abb"},{name:"Desnus",type:"month",length:31,id:"ID_8bcad9a8f84a"},{name:"Sarenith",type:"month",length:30,id:"ID_484a49a998db"},{name:"Erastus",type:"month",length:31,id:"ID_9a48e9b96938"},{name:"Arodus",type:"month",length:31,id:"ID_bbe99b2afaea"},{name:"Rova",type:"month",length:30,id:"ID_ba39fbe8c8b8"},{name:"Lamashan",type:"month",length:31,id:"ID_69d93ba9dba8"},{name:"Neth",type:"month",length:30,id:"ID_4ad8fb79eb6a"},{name:"Kuthona",type:"month",length:31,id:"ID_9a3a8b388939"}],moons:[{name:"Somal",cycle:29.5,offset:9.5,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_b87ab959cac9"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:8}],offset:0,timespan:1,intercalary:!1,id:"ID_88c8da3b8b2b"}],eras:[{name:"Age of Serpents",description:"",format:"Year {{year}} - {{era_name}}",start:{year:4720,month:8,day:15}},{name:"Age of Darkness",description:"",format:"Year {{abs_year}} - {{era_name}}",start:{year:-5300,month:0,day:1}},{name:"Age of Anguish",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-4500,month:8,day:1}},{name:"Age of Destiny",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-3500,month:8,day:1}},{name:"Age of Enthronement",description:"",format:"Year {{year}} AR - {{era_name}}",start:{year:1,month:8,day:1}},{name:"Age of Lost Omens",description:"",format:"Year {{year}} AR - {{era_name}}",start:{year:4606,month:8,day:1}}]},current:{year:4720,day:15,month:0},events:[{name:"Summer Solstice",description:"At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824492",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824493",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824494",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824495",note:null,date:{day:null,year:null,month:null},category:null},{name:"Eternal Kiss",description:`Zon-Kuthon - -Culminating on the first new moon of the new year, the Eternal Kiss is an 11 day ceremony honoring Zon-Kuthon. On the final day, a living sacrifice is made to the Dark Prince, after the victim is pampered and pleasured for the ten days prior. The sacrifice can either be an enemy or a great devotee of the church, and is kept alive for as long as possible during the torture using magic. This holiday often involves fortune-telling as a part of the torture, using the victim's entrails or their cries of pain to determine the Midnight Lord's will. Occasionally it is believed that the sacrifice will prophesy with the voice of Zon-Kuthon himself.`,id:"824496",note:null,date:{day:null,year:null,month:null},category:null},{name:"Longnight",description:"Longnight is a holiday celebrated on the full moon in the winter month of Abadius. During the festival, revelers stay up all night to greet the dawn to defy the long winter months. It is even celebrated in Irrisen, where there are no natural seasons.",id:"824497",note:null,date:{day:null,year:null,month:0},category:null},{name:"Foundation Day",description:`Absalom, Milani - -Foundation Day is a civil holiday celebrated on the New Year (1 Abadius) in Absalom to commemorate the city's founding by the god Aroden in 1 AR.`,id:"824498",note:null,date:{day:1,year:null,month:0},category:null},{name:"Pjallarane Day",description:`Irrisen - -Pjallarane Day is an ancient holiday in Irrisen celebrated on 1 Abadius (New Year's Day). Every 100 years, Baba Yaga returns to Golarion to remove her daughter from the throne of Irrisen, and put another daughter on the throne instead. In 3713 AR the third Queen of Irrisen, Pjallarane, and her children chose to resist. Baba Yaga ruthlessly crushed the rebellion in a single day, which is now celebrated as a holiday. The festival includes feasting and the burning of effigies of tar and straw. This is a reminder of the fate of Pjallarane's followers, who were burned alive as a warning to all those who would oppose Baba Yaga.`,id:"824499",note:null,date:{day:1,year:null,month:0},category:null},{name:"Vault Day",description:`Abadar - -Vault Day is a holiday held on 6 Abadius in honor of Abadar, Master of the First Vault.`,id:"824500",note:null,date:{day:6,year:null,month:0},category:null},{name:"Ruby Prince's Birthday",description:`Osirion - -The Ruby Prince's Birthday is a national holiday in Osirion in honor of the birthday of Khemet III, the Ruby Prince. It is celebrated annually on the 20 Abadius.`,id:"824501",note:null,date:{day:20,year:null,month:0},category:null},{name:"Merrymead",description:`Druma, Cayden Cailean - -A holiday occurring on 2 Calistril, Merrymead was started in Druma and is supposed to be a time to share of the last of the previous year's mead with the rest of the community. - -In current times, most people just use it as an excuse to drink excessively. The poor travel from bar to bar drinking whatever alcohol they can afford, while the wealthy will set aside specific vintages for this day. A known consequence of this day are 'mead riots' that happen when there are more celebrants than there is alcohol to serve them. This leads to a violent, destructive group of people in a crowded bar. If this is a common occurrence for particular cities, they may reinforce their guard force for the inevitably eventful night.`,id:"824502",note:null,date:{day:2,year:null,month:1},category:null},{name:"King Eodred II's Birthday",description:`Korvosa - -King Eodred II's Birthday was a local holiday in the Varisian city-state of Korvosa and was celebrated on 16 Calistril. It commemorated the birthday of its former ruler, King Eodred Arabasti II, who decreed that on the day, scantily clad women would dance and serve free wine to celebrants.`,id:"824503",note:null,date:{day:16,year:null,month:1},category:null},{name:"Loyalty Day",description:`Cheliax, Asmodeus - -Loyalty Day is a holiday in the nation of Cheliax commemorating the date on Calistril 19, 4640 AR when House Thrune signed the Treaty of Egorian, declaring it the victor in the Chelish Civil War and ruler of the empire. Because of House Thrune's well-known ties to the infernal, this holiday is also observed by the Church of Asmodeus who consider it a feast day. The church along with local governments provide a free meal to all citizens to remind them of the benefits House Thrune provides them with.`,id:"824504",note:null,date:{day:19,year:null,month:1},category:null},{name:"Fateless Day",description:`Mahathallah - -Followers of Mahathallah mark each leap day as Fateless Day, when the River of Souls temporarily stops and souls can escape Pharasma's judgment. They perform many sacrificial and suicidal rituals on Fateless Day.`,id:"824505",note:null,date:{day:29,year:null,month:1},category:null},{name:"Golemwalk Parade",description:`Magnimar, Varisia - -The Golemwalk Parade is a parade of golems created by amateurs hoping to win a monetary grant, or even a job, from the Golemworks in Magnimar. At the end of the parade along the Avenue of Honors, the constructs are judged.`,id:"824506",note:null,date:{day:null,year:null,month:2},category:null},{name:"Day of Bones",description:`Pharasma - -Priests and worshipers of the Lady of Graves parade the bodies of the recently dead on this holiday, holding free burials afterwards.`,id:"824507",note:null,date:{day:5,year:null,month:2},category:null},{name:"Sable Company Founding Day",description:`Korvosa - -Sable Company Founding Day is a holiday marking the founding of the Sable Company of the Varisian city-state of Korvosa. Celebrated on 6 Pharast, the day is marked by somber military parades that generally preclude the consumption of alcohol, a staple on most other holidays.`,id:"824508",note:null,date:{day:6,year:null,month:2},category:null},{name:"Night of Tears",description:`Solku - -The Night of Tears held annually on 7 Pharast in the Katapeshi town of Solku. It is a solemn vigil commemorating those lost in the Battle of Red Hail in 4701 AR.`,id:"824509",note:null,date:{day:7,year:null,month:2},category:null},{name:"Kaliashahrim",description:`Qadira - -Kaliashahrim is a national holiday celebrated on Pharast 13 in Qadira that celebrates the Padishah Emperor of distant Katheer, and Qadira's loyalty to him.`,id:"824510",note:null,date:{day:13,year:null,month:2},category:null},{name:"Conquest Day",description:`Nex - -Every year, on the 26th of Pharast, Elder Architect Oblosk \u2014 oldest member of Nex's Council of Three and Nine \u2014 ascends to the highest balconies of the Bandeshar in Quantium. In a voice made thunderous by the platform's magic, the wizened pech councilman spends the hours from dusk to just past noon enumerating the atrocities committed by the necromancers of Geb upon the people of Nex, culminating with the disappearance of the archwizard Nex himself. At the conclusion of this record of national wounds, the country's eleven other council members join Oblosk in renewing their yearly vow to neither forget nor forgive the Gebbites' atrocities and to again swear in their lost ruler's name to endlessly wage war against their ancient enemies. - -On this day, known as Conquest Day, all the people of Nex are expected to share in their leaders' oaths, to celebrate the shared patriotism of their wondrous nation, and to remember the sacrifices of heroes past. This also makes it a day for many Nexian wizards to reveal deadly new spells, gigantic constructs, and audacious arcane masterworks\u2014which many creators promise to be the doom of their foes. Even throughout the rest of the Inner Sea region, many crusaders, rebels, and zealots observe Conquest Day as a day to renew blood oaths, launch long-planned battles, and finally take revenge. It is a day for words of honor, a day for battle cries, and a day where glory most favors the bold.`,id:"824511",note:null,date:{day:26,year:null,month:2},category:null},{name:"Days of Wrath",description:`Asmodeus, Cheliax - -The Days of Wrath, or Dies Irae, are a holiday celebrated on both solstices and equinoxes in the nation of Cheliax and wherever Asmodeus is worshiped. They are primarily a national holiday and not truly a religious one, but the two are often confused due to Cheliax's current political climate. Various contests and blood sports are held on these days, promoting those elites who can clearly demonstrate their superiority over others. Some believe that these competitions are watched and judged by devils themselves. In the parts of the world where the Prince of Darkness is not openly venerated, these holidays take on a different tone: they are used to settle old grievances and also to end contracts. - -In these days, bloodsports are organized into cities' stadiums. Slaves and servants of any master may choose to enter the arena for one-on-one bloody battles to the death. Free men and women of all classes are free to enter the arena as well. The entrants fight in rounds until at last one stands alone. The winner is granted freedom from slavery or servitude, erasure of all debts, and a purse of gold. - -The winter solstice sees the culmination of the Dies Irae, with all the winners of the three previous bouts summoned to Egorian to fight to the death for the amusement of the nobles. The winner is given a title of baronet and a plot of land.`,id:"824512",note:null,date:{day:null,year:null,month:null},category:null},{name:"Firstbloom",description:`Gozreh - -Firstbloom is a holiday celebrating the first planting of the agricultural season, and generally associated with the weather god Gozreh. It falls on the vernal equinox. Many farming communities see it as the beginning of the year, even though conventional calendars begin two months earlier. Despite weariness after a full day planting, many farming communities hold celebrations come the night: feasting, dancing and courtship feature showing the cycle of nature.`,id:"824513",note:null,date:{day:null,year:null,month:null},category:null},{name:"First Cut",description:`Falcon's Hollow - -The First Cut celebration in Falcon's Hollow used to mark the start of the work in the woods each spring. Now, however, it is a meaningless ramshackle ceremony as Thuldrin Kreed forces the lumber crews to work through even during the coldest months in the winter. Still, First Cut brings people out to celebrate the start of the spring.`,id:"824514",note:null,date:{day:null,year:null,month:null},category:null},{name:"Currentseve",description:`Gozreh - -On this religious holiday, all who travel on the water make offerings to Gozreh in the hopes of safe passage for the coming year.`,id:"824515",note:null,date:{day:7,year:null,month:3},category:null},{name:"Taxfest",description:`Abadar - -No one enjoys paying taxes but the collection of fair taxes is considered an integral part of the maintenance of society, and is therefore holy to the god Abadar. Every year on the 15th of Gozran, priests of the church of Abadar spend the day walking city streets, doing what they can to make the bitter pill of annual taxes a bit easier to swallow. - -The Business of the Day - -From dawn to dusk, clerics of Abadar attend the tax collectors of sizeable communities as the tax wagons roll from door to door. The church officials monitor these activities to make sure that the process is conducted respectfully and justly, and that citizens know that the process is monitored. More than just aiding in the yearly errand, the faithful personally thank every citizen for contributing to the improvement of their city, extol the public works funded by their contributions, and foretell the grandeur of civic projects to come. The disenfranchised and destitute they attempt to comfort as best they can, quoting from their god's dogma on work and worthiness, but this is not a day for discounts or deferrals. The citizens are able to voice their concerns and ideas as to where the monies levied should best be applied. Citizens are free to speak their mind on any issue here without fear of repercussion. - -The Celebrations of the Day - -At dusk, the Abadarans host several celebrations in parks, plazas, and other communal areas about the city, organizing donations and contributions from local vendors to feed and entertain all-comers. Having already preached to most of the city over the course of the day, the clerics perform only a brief opening ceremony, dedicating the feast to Abadar, the city, and its great people. These celebrations are often quite distinct from neighbourhood to neighbourhood and are almost always divided along economic boundaries. - -The festivities involving the wealthiest citizens usually happen on the steps of city hall or other grand civic buildings and feature the best music and food, but often little more than polite card and guessing games. These galas usually wrap up by midnight. - -For the common folk, the parks and marketplaces take on a carnival atmosphere, with simple but good food, local ales, performances by talented citizens, and games of chance going on well into the night. A prevailing superstition through these festivals is that, during the celebration, it is lucky to kiss\u2014or in some regions, pinch\u2014a cleric of Abadar, leading to many a rosy-cheeked cleric. - -Even the city's poor are given reason to celebrate, as the local temple of Abadar hosts a cheery but unabashedly religious gathering on its steps, feeding all comers, doling out a hearty ration of wine, singing hymns of the faith, and providing tokens for a second wine ration for any who return to attend a service within the month. - -For a holiday that revolves around paying taxes, this Abadaran festival is not as reviled as one might expect.`,id:"824516",note:null,date:{day:15,year:null,month:3},category:null},{name:"Wrights of Augustana",description:`Andoran, Brigh - -This local festival in the Andoran port city of Augustana is held to honor and celebrate the local shipbuilding industry as well as the navy. The mathematics and engineering required for the building of the ships is praised by Brigh's faithful.`,id:"824517",note:null,date:{day:16,year:null,month:3},category:null},{name:"Gala of Sails",description:`Absalom - -One of two local festivals where kite-battlers compete.`,id:"824518",note:null,date:{day:27,year:null,month:3},category:null},{name:"Remembrance Moon",description:`Iomedae, Lastwall, Ustalav - -A national holiday to commemorate those who died in the Shining Crusade against the Whispering Tyrant. Although not strictly a religious holiday, Iomedae's name is heavily invoked, due to her many military accomplishments during the war.`,id:"824519",note:null,date:{day:null,year:null,month:4},category:null},{name:"Angel Day",description:`Magnimar, Varisia - -Angel Day is a local Magnimarian holiday celebrated on 31 Desnus. The annual celebration marks the founding of the city, and its founders' flight from Korvosa. It also honors the presence and popular worship of the empyreal lords, which predates the city by centuries. During the festival, nearly all local businesses shut their doors and the citizens take part in countless feasts, masquerade balls dressed as angels, and the burning of devil effigies meant to symbolize infernally-influenced Korvosa.`,id:"824520",note:null,date:{day:31,year:null,month:4},category:null},{name:"Old-Mage Day",description:"Holiday celebrating Old-Mage Jatembe, the father of Garundi magic.",id:"824521",note:null,date:{day:13,year:null,month:4},category:null},{name:"Multiple Events",description:`Festival of the Ruling Sun - -Shizuru - -Celebrates the longest day. - -Founder's FollyUlar Kel - -Adventurers and children follow a hallucinatory red stripe along zigzagging paths, amusing residents. - -Harvest Bounty Festival - -Segada - -Marking the beginning of the harvest season, this festival involves sporting tournaments, dancing, storytelling, and feasts. Celebrants give thanks and eliminate grudges. - -Longwalk - -Grandmother Spider, Nurvatchta; southern hemisphere winter solstice - -Celebrates the escape of Nurvatchta's anadi people from bondage, in part thanks to Grandmother Spider lengthening their cover of darkness in their escape. - -Ritual of Stardust - -Desna - -Festival held in the evening and through the night, where Desna's faithful sing songs and throw sand and powdered gems into bonfires. - -Runefeast - -Magrim - -Day marking the day dwarves learnt the first runes and the proper way to pray. - -Sunwrought FestivalSarenrae, Brigh - -Day commemorating the defeat of Rovagug by Sarenrae, celebrated with the flying of kites, fireworks, and gift giving.`,id:"824522",note:null,date:{day:null,year:null,month:null},category:null},{name:"Burning Blades",description:`Sarenrae - -The holy, month-long festival ends on this day, featuring dances with flaming blades.`,id:"824523",note:null,date:{day:10,year:null,month:5},category:null},{name:"Liberty Day",description:`Andoran, Milani - -Holiday celebrating Andoran's independence. Milanites celebrate that very little violence occurred.`,id:"824524",note:null,date:{day:3,year:null,month:5},category:null},{name:"Talon Tag",description:`Andoran - -The Eagle Knights perform aerial displays in Almas on this day.`,id:"824525",note:null,date:{day:21,year:null,month:5},category:null},{name:"Riverwind Festival",description:`Korvosa - -An early summer holiday that honors a cooling shift in the winds, celebrated with much drinking.`,id:"824526",note:null,date:{day:22,year:null,month:5},category:null},{name:"Inheritor's Ascendance ",description:`Iomedae - -Inheritor's Ascendance, originally called 'Herald's Day', honours the day that Iomedae was chosen by the god Aroden to become his herald (thus replacing Arazni), thus boosting her power beyond that of a fledgling goddess. This holiday was renamed after the demise of Aroden.`,id:"824527",note:null,date:{day:1,year:null,month:7},category:null},{name:"First Crusader Day",description:`Mendev - -Holiday in celebration of the continuing crusade against the demons of the Worldwound.`,id:"824528",note:null,date:{day:6,year:null,month:7},category:null},{name:"Day of Silenced Whispers",description:`Ustalav - -The Day of Silenced Whispers is an Ustalavic holiday celebrated every 9 Arodus marking the defeat of the Whispering Tyrant in 3827 AR by the coalition forces of the Shining Crusade and the liberation of the country after centuries of undead domination.`,id:"824529",note:null,date:{day:9,year:null,month:7},category:null},{name:"Founding Day",description:`Ilsurian, Varisia - -Festival celebrating the founding by Ilsur of the town of Ilsurian in 4631 AR.`,id:"824530",note:null,date:{day:10,year:null,month:7},category:null},{name:"Armasse",description:`Aroden, Iomedae, Milani - -The raucous, week-long festival known as Armasse is held each year beginning on 16 Arodus. The celebration \u2014 once dedicated to the god Aroden \u2014 is still important to the faithful of Iomedae, who use it to train commoners in combat, ordain apprentice clergy, pick squires for knights, and teach military history, hoping to prevent the mistakes of the past from being repeated. Among those not dedicated to the Inheritor the holiday has lost most of its religious significance since Aroden's death, tending now only toward wild partying, a fact that has precluded the diabolist authorities of Cheliax from prohibiting Armasse outright. Nevertheless, in places where the church of Asmodeus is openly allowed, it hosts special activities for its parishioners during the same week in an effort to counter the influence of the holiday. The city of Corentyn is especially known for its extravagant Armasse festivities.`,id:"824531",note:null,date:{day:16,year:null,month:7},category:null},{name:"Saint Alika's Birthday",description:`Korvosa - -Quiet holiday honoring the birth of Saint Alika the Martyr.`,id:"824532",note:null,date:{day:31,year:null,month:7},category:null},{name:"Archerfeast",description:`Erastil - -Archer's Day or Archerfeast is a holiday of the god Erastil held annually on the 3rd of Erastus. Despite the holiday's origins in the worship of Erastil, common country folk from the Lands of the Linnorm Kings to Taldor celebrate the height of summer with a day set aside for establishing new relationships, enjoying current camaraderie, and celebrating the gifts of the gods. Archery competitions are held frequently in which the men test their skill with the bow through progressively harder trials. The exact form of competition is different from place to place, and the winner is awarded a rack of elk horns and a quiver of blessed arrows. He is also given the title of "Protector", which he holds until the next year. - -While the festival's traditions emphasize contests of marksmanship, most have expanded to exhibit talents of all types, from baking and storytelling to racing and mock combat. Aside from encouraging a fair-like atmosphere, many of the displays and competitions serve one of two secondary purposes: either as a way for merchants to show off their superior livestock and wares, or (more popularly) as a way for eligible men and women to show off to each other. - -While the day's events at most Archerfeast fairs are filled with games, food, and crafts, the night brings dancing, drinking, pranks, and the crowning of the princes and princesses of spring and summer for the two single youths and two single adults who fared best in the day's events. The festivities continue late into the evening, but end promptly at midnight, so that in true Erastilian fashion the next day's responsibilities are not overly impeded. For those not of Erastil's flock, however, private parties, drinking, and trysting carry on long into the next morning.`,id:"824533",note:null,date:{day:3,year:null,month:6},category:null},{name:"Founding Festival",description:`Korvosa - -Founding Festival is a local Korvosan celebration marking the establishment of the city in 4407 AR. Held annually on 14 Erastus, the festival is a chance for the citizens to let off some steam, drink copiously, and watch magical light shows late into the night.`,id:"824534",note:null,date:{day:14,year:null,month:6},category:null},{name:"Burning Night",description:`Razmiran - -Items or people who have transgressed against the god-king of Razmiran are burned on this day.`,id:"824535",note:null,date:{day:17,year:null,month:6},category:null},{name:"Kianidi Festival",description:`Garundi - -The Kianidi Festival is a week long event held annually between 15 and 21 Erastus by Garundi people everywhere. The Garundi have a powerful belief in belonging to a specific location in this world, with clans or tribes sometimes traveling for years in search of their true home. In these travels each individual will collect small mementos of the places she or he has visited in order to remember them and maintain a spiritual connection. During the Kianidi, a tribe will gather and display these mementos to the group. The best ones are chosen and made part of the clan or tribal history, something which Garundi feel is a great honor.`,id:"824536",note:null,date:{day:15,year:null,month:6},category:null},{name:"Harvest Moon",description:null,id:"824537",note:null,date:{day:null,year:null,month:8},category:null},{name:"Multiple Events",description:`Festival of Night's Return - -Nidal - -Celebrated throughout Nidal, this holiday involves the burning of effigies and self-flagellation. - -Swallowtail Festival - -Desna - -Holiday celebrated with storytelling, feasting, and the release of butterflies. - -Waning Light Festival - -Segada - -Also called Blessing of the Sun and Night of Spirits, participants bid farewell to the long days of sunshine with feasting, dancing, and music.`,id:"824538",note:null,date:{day:null,year:null,month:null},category:null},{name:"Signing Day",description:`Andoran, Cheliax, Galt, Isger - -Signing Day is a Chelish holiday, dating back to the height of the empire. Observed on the second Oathday of Rova, this is the day on which new laws in the empire took effect. The significance of this day expanded over many years until imperial marriages, significant business arrangements and oaths of fealty were all conducted on this day. - -Originally, the holiday began as a celebration of the mutual-defense pact between Cheliax, Isger, Galt and Andoran when the united nations threw off the shackles of Taldor, declaring themselves independent from the empire. Observances of the holiday vary, but often include firework displays, feats of strength, and public debates to showcase speaking and rhetorical skills. - -As Cheliax degenerated to civil war and diabolism after 4606 AR, blood pacts and infernal contracts also began to be signed on this day. As a result of Cheliax's new affiliation, Andoran and Galt began to distance themselves from Cheliax and the original interpretation of the holiday. In Andoran it continues to be the day that most national laws take effect as well as being a traditional day of marriage, and the date on which new Steel Falcons are inducted.`,id:"824539",note:null,date:{day:null,year:null,month:8},category:null},{name:"Crabfest",description:`Korvosa - -Crabfest is a Korvosan holiday held on the first Wealday of Rova. It celebrates the return of the crabs from the cooler waters of the Jeggare River to their winter habitat in Conqueror's Bay, and is marked by crab boil feasts held throughout the city and its surrounding communities.`,id:"824540",note:null,date:{day:null,year:null,month:8},category:null},{name:"Feast of Szurpade",description:`Irrisen - -This "celebration of plenty" festival mocks the traditional harvest festivals celebrated in the region before Baba Yaga and her eternal winter descended upon the land.`,id:"824541",note:null,date:{day:26,year:null,month:8},category:null},{name:"Day of Sundering",description:`Ydersius - -Once many holidays were celebrated by the faith of Ydersius, but today only this date has much significance.`,id:"824542",note:null,date:{day:29,year:null,month:8},category:null},{name:"Admani Upastuti",description:`Jalmeri - -Admani Upastuti is a Jalmeri holiday celebrated on the first full moon of Lamashan that marks the founding of Jalmeray as a Vudran colony.`,id:"824543",note:null,date:{day:null,year:null,month:9},category:null},{name:"Ascendance Day",description:`Iomedae - -Ascendance Day is an Iomedaean holiday, held on the 6th of Lamashan. The day marks the anniversary of the day Iomedae took the Test of the Starstone in the autumn of 3832 AR and ascended to godhood. - -Celebration - -The day is a joyous celebration for the faithful, with singing, pledging of friendships, and forgiving of old grudges. - -To many, the Test of the Starstone represents the greatest of all challenges, yet for Iomedae it was one of three storied promotions in her rise from Aroden's herald to a goddess in her own right. On the 6th of Lamashan, the Inheritor's faithful observe the heroism of Iomedae's life before her moment of ascension and celebrate the anniversary of the apotheosis itself. - -The celebration takes place in several stages. Early in the day, troupes of performers\u2014as often passionate amateurs as professionals\u2014stage morality plays featuring the Eleven Acts of Iomedae, the heroic near-miracles and sacrifices she made leading up to her trials in the Starstone Cathedral. Scripts vary by region, city, and even neighborhood, but despite differences in setting, performance medium, and word choice, the themes and morals are all the same. - -As the day continues, the priests organize jousts and mock battles, allowing anyone to participate so long as she can demonstrate enough skill to not be a risk to herself or others. The winners of these contests then face tests of mental acuity such as solving riddles, deciphering philosophical quandaries, and answering questions of honor and justice. Those who prove themselves in both contests are awarded a white cloak\u2014representing the Inheritor at peace\u2014styled after Iomedae's own red garment to wear for the rest of the celebration. Feasting and singing follow the competitions, mirroring the jubilation that followed Iomedae's ascension. This is occasion for making pledges of friendship and forgiving enemies, and priests circulate about the crowd offering the Inheritor's blessing to those who do and providing a moment's counsel or mediation for those who need an extra nudge. - -The celebration typically ends before midnight, and the following day the priests and previous day's champions gather up the blunted swords from the mock battles, sharpen them, and distribute them among the church's armory and those of like-minded organizations so that all may remain vigilant against evil and prepared to strike it down.`,id:"824544",note:null,date:{day:6,year:null,month:9},category:null},{name:"Bastion Day",description:`Solku - -Bastion Day is a two-day festival held annually on 19 and 20 Lamashan in the Katapeshi town of Solku honoring the founding of the town, when it is traditional to host a stranger from one noon until the next.`,id:"824545",note:null,date:{day:19,year:4712,month:9},category:null},{name:"Jestercap",description:`Andoran, Druma, Taldor - -Jestercap occurs at the end of the month of Lamashan, traditionally on the 27th (although a few regions have taken to moving the exact day around slightly so it always falls on the last Starday of the month, allowing people who wish to celebrate in excess to have the following day of rest to recover). - -History - -While Jestercap has been embraced with excited open arms by the gnome communities of the Inner Sea region, its original genesis is said to have been in one of Taldor's coastal cities not long after King Aspex the Even-Tongued broke from the nation, significantly weakening Taldor's power and beginning that nation's long decline. The holiday was originally intended to distract the distraught Taldan populace with a night of revelry and comedic entertainment, but the antics of jesters were simply not enough. - -Over the course of the first few years, Jestercap evolved from a holiday of observation to a holiday of participation. Today, the holiday is a time where anyone can pull pranks or jokes or japes on companions, on neighbors, and (most typically) on rivals, with the understanding that provided no lasting harm is done, any humiliations inflicted before midnight are to be taken in stride. Of course, come morning the day after, there are inevitably jokes that went too far, and grudges and feuds borne from Jestercap antics have a way of lingering for months to follow. - -In Religion - -Followers of Chaldira Zuzaristan, a halfling deity of mischief, treat Jestercap as a holy day and their pranks \u2014 often elaborate and extravagant in nature and plotted for months in advance \u2014 as displays of their faith.`,id:"824546",note:null,date:{day:27,year:null,month:9},category:null},{name:"Feast of the Survivors",description:`Zon-Kuthon, Nidal - -A harvest festival signifying the centuries of Nidalese ancestors protected by Zon-Kuthon. The ceremonial tables are made of human bones of community members from past generations.`,id:"824547",note:null,date:{day:null,year:null,month:9},category:null},{name:"Kraken Carnival",description:`Absalom - -The second of two local festivals where kite-battlers compete.`,id:"824548",note:null,date:{day:15,year:null,month:9},category:null},{name:"Independence Day",description:`Galt - -Marks the beginning of the Red Revolution.`,id:"824549",note:null,date:{day:5,year:null,month:10},category:null},{name:"Seven Veils",description:`Sivanah - -The holiday known as Seven Veils, which takes place on the 23rd of Neth in most realms of the Inner Sea region, is a celebration of the region's diversity \u2014 a time when social boundaries break down even further in a day-long event filled with dancing, feasting, and courting. The evening traditionally closes out with the Seven Veil masquerade, a ball wherein the participants wear disguises that hide their race or gender (often using minor magical trinkets and spells) or disguise these features as entirely new characteristics. At the end of the ball, the participants remove their disguises to their partners, often with unpredictable and sometimes delightfully awkward results. Traditionalists and conservative minds often find the Seven Veils masquerades to be scandalous or off-putting, yet they remain particularly popular in most of the larger cities of the land. - -Historians note that the original "Dance of the Seven Veils" has a much different genesis than one promoting diversity \u2014 the mysterious cult of Sivanah, goddess of illusions, mystery, and reflections, is generally cited as the source of this festival, and indeed, worshippers of the goddess (herself known as the Seventh Veil) count the 23rd of Neth as one of their most sacred of days. What rituals the church of Sivanah performs on this date, however, are unknown to outsiders, for the cult enjoys its secrets. This secrecy has, unsurprisingly, given rise to all manner of sinister rumour, yet when Seven Veils rolls around each year, its eager participants are quick to set aside rumour in preference for the night's fun and games.`,id:"824550",note:null,date:{day:23,year:null,month:10},category:null},{name:"Abjurant Day",description:`Nethys - -Abjurant Day occurs on 8 Neth and is known as a day of cooperation between neighbors to shore up mutual defenses and train allies in magic. Potential apprentices are often tested on the day.`,id:"824551",note:null,date:{day:8,year:null,month:10},category:null},{name:"Great Fire Remembrance",description:`Korvosa - -Great Fire Remembrance is a holiday celebrated on each 13 Neth in the Varisian city of Korvosa. It commemorates the Great Fire of 4429 AR, which devastated the then still fledgling Chelish colony of Fort Korvosa. On this somber day, most of the city shuts down and people generally remain at home. It has become tradition not to light any fires (not even cooking fires) on Great Fire Remembrance.`,id:"824552",note:null,date:{day:13,year:null,month:10},category:null},{name:"Even-Tongued Day",description:`Cheliax, Asmodeus, Milani - -Observed on 14 of Neth, Even-Tongued Day was once a day of joy and celebration in Cheliax, but has become instead one of mourning. - -Originally, the date marked the conquest of Aspex the Even-Tongued, who brought the nations of Galt, Andoran and Isger under Chelish control. Since the death of Aroden and the loss of these nations, the holiday instead marks the loss of territory and glory once held by Cheliax. Oaths are sometimes made, typically to Asmodeus, and rarely of a pleasant nature (such as the reclaiming of the lost empire and vengeance against treacherous former allies). - -Citizens wear black on this day, public speaking is forbidden, and old feuds and vendettas are rekindled.`,id:"824553",note:null,date:{day:14,year:null,month:10},category:null},{name:"Evoking Day",description:`Nethys - -A holy day to followers of Nethys, Evoking Day is full of vibrant explosions, skillful wielding of spells, and much dancing. Evoking Day is observed on the 18th of Neth, and while this holiday is mostly celebrated in Garund, temples dedicated to Nethys host celebrations throughout the Inner Sea region. Traditional celebrations of Evoking Day have changed over the thousands of years since its first incarnation, but to this day every occurrence of Evoking Day still features a grand meal shared by celebrants during the afternoon and a wondrous exhibition of brilliant and explosive magic once the sun sets. These days, such colorful magical displays are augmented with fireworks of a dozen different colors and patterns. - -In temples of Nethys dedicated to revering evocation magic, priests and prominent arcanists participate in spell duels where each contestant stands on a raised platform and takes turns trying to incapacitate her opponent. The magic wielded in theses duels favors the flashy over the dangerous, but clerics of Nethys are on hand to treat any injuries. These duels gather large crowds eager to lend their applause to their favorite contestant. - -It is also during this festival when wizards who worship Nethys open their spellbooks to others who share their craft. Wizards normally guard their spellbooks with their lives and covet the eldritch information therein, but on Evoking Day these wizards meet with one another prior to the afternoon feast to share their spells just as they prepare to share a grand meal. - -Though Evoking Day is primarily a day of grand magic, those with no spellcasting talent still flock to local temples of Nethys to partake in the shared feast and flashy evening displays of magic and fireworks. Between the meal and into the night, celebrants wear black-and-white robes and perform joyous dances meant to give thanks to the wonders Nethys brought to humankind. These dances are grand affairs involving dozens of dancers all spinning and clapping to the accompanying music as their black-and-white robes fan out around them with each spin. As night descends and the fireworks and magical displays begin, the dancing rises to a climax erupting in shouts and calls to Nethys with each thunderous boom.`,id:"824554",note:null,date:{day:18,year:null,month:10},category:null},{name:"Baptism of Ice",description:`Irrisen - -In the Irriseni Baptism of Ice, an annual fertility festival held from the 24th to the 30th of Neth, locals parade all children born during the year through the town in fine clothes. In most towns, the festival ends with a symbolic sacrifice of a child to the cold. However, in Whitethrone and Irrisen's provincial capitals, a peasant child is killed through exposure.`,id:"824555",note:null,date:{day:24,year:null,month:10},category:null},{name:"Transmutatum",description:`Nethys - -Transmutatum is one of the three major holidays of the church of Nethys, on 28th of Neth. It is a day of reflection and self-improvement. Many followers of Nethys begin research and crafting projects on this day.`,id:"824556",note:null,date:{day:28,year:null,month:10},category:null},{name:"Winter Week",description:"Traditional feast; time for courting and spending time with friends.",id:"824557",note:null,date:{day:null,year:null,month:11},category:null},{name:"The Shadowchaining",description:`Zon-Kuthon, Nidal - -Commemorating the Midnight Lord's gift of shadow animals.`,id:"824558",note:null,date:{day:1,year:null,month:11},category:null},{name:"Pseudodragon Festival",description:`Korvosa - -Korvosa's Pseudodragon Festival, a holiday celebrated annually on 7 Kuthona, marks the winter migration of wild pseudodragons from the Mindspin Mountains to Conqueror's Bay, which inspires the creatures already in the city\u2014even those domesticated\u2014to play with their wild kin in the skies over the city. Locals mark the day with a joyous inebriation.`,id:"824559",note:null,date:{day:7,year:null,month:11},category:null},{name:"Ascension Day",description:`Cayden Cailean - -Much like the god to whom it is dedicated, the Caydenite holiday of Ascension Day is generally celebrated in a very informal style. Occurring annually on 11 Kuthona, it commemorates the day Cayden Cailean passed the Test of the Starstone and ascended to godhood in 2765 AR. In all likelihood, the 11th of Kuthona is not the exact date on which it actually happened, but since the god was dead drunk when it happened, it will probably be never known.`,id:"824560",note:null,date:{day:11,year:null,month:11},category:null},{name:"Winterbloom",description:`Naderi - -Holiday celebrating Naderi's ascension. Celebrations are typically understated but include readings of The Lay of Arden and Lysena.`,id:"824561",note:null,date:{day:15,year:null,month:11},category:null},{name:"Final Day",description:`Groetus - -Cultists of Groetus perform an hour's silence at dusk on the last day of the year and seek guidance from their god about the End Time.`,id:"824562",note:null,date:{day:31,year:null,month:11},category:null},{name:"Night of the Pale",description:`Not all of Golarion's holidays and festivals are times of rejoicing and delight. Holidays worshiped by dark and sinister cults and religions tend to be hidden affairs, their rituals and ceremonies involving cruelties and vile practices that send shivers of fear through gentler society. Scholars suspect that the Night of the Pale\u2014a holiday that traditionally takes place on the last day of the year, the 31st of Kuthona\u2014has links to several sinister religions, but today no one church has specific association with the event. Nonetheless, the Night of the Pale is an event that many look forward to all year, whether in fear or excitement. - -On the Night of the Pale, it is said that the ghosts of those who died during the previous year manifest upon the world and come to visit the homes they lived in during life. Although some might think that the chance of seeing even the shade of a dearly departed one might be a blessing, the Night of the Pale is not a time for tearful reunions, for these ghosts, tradition says, do not return out of love for those they left behind but out of darker compulsions. Lingering jealousy, unfinished arguments, or the simmering need for revenge are said to be what compels the dead to return to torment the living on the Night of the Pale. - -The evening of this night in many communities is celebrated by a morbid feast, the food prepared with themes revolving around graveyards, the dead, and other spooky traditions. This feast, on one level, helps the celebrants to make light of their fears while sharing good company with similarly nervous neighbors, but at another level is believed to placate vengeful spirits as toasts are raised to the memories of the recently departed. These feasts include retellings of favorite memories of the departed, in hopes of reminding the approaching ghosts of brighter and kinder memories than those that compel them to return. The feast always ends at least an hour before midnight in order to give participants time to return home, decorate doors and windows with salt and other trinkets taken from the feasting table (salted bread baked into crook-like shapes are a favorite, as these can be hung from doorknobs and eaves) to ward off evil spirits, and hide in their bedrooms until dawn. Brave youths and adventurers often deliberately stay out after midnight, either to dare the ghosts to challenge them or simply for the thrill of bucking tradition. Every Night of the Pale, it seems, there are disappearances among those who stay out after midnight, although whether these vanishings are the result of dissatisfied locals taking the opportunity to run away from home, murderers or wild animals or other mundane dangers, or the vengeful spirits carrying off their victims depends upon the circumstances. - -The morning after a Night of the Pale is also the first day of the new year\u2014a time that many celebrate more as a relief for surviving the night before than in anticipation of what the new year might bring, although regional preferences for how this day is celebrated vary enough that no single tradition holds over the other. Save, of course, the lingering fears of what dread spirits might come knocking upon warded doors one year away...`,id:"824563",note:null,date:{day:31,year:null,month:11},category:null},{name:"Turning Day",description:`Alseta - -The changing of the year is celebrated with the forgiveness of old debts and grudges, and embracing new opportunities.`,id:"824564",note:null,date:{day:31,year:null,month:11},category:null},{name:"Ritual of Stardust",description:`Desna - -The Ritual of Stardust is one of the few formal religious holidays in honor of the goddess Desna. It is held on both the summer and winter solstices. - -Followers of the Song of Spheres gather at dusk and light enormous bonfires and hold feasts, watching the sparks and embers float out into the darkening sky. After it is fully dark, the celebrants chant and sing songs as they watch the fires burn low. When only embers remain, sand mixed with ground star gems (either star rubies, star sapphires, or rose quartz) is thrown on them or into the air downwind. At this point it is common to make proclamations of love and friendship and of promised journeys to come. The twinkling of the sand is thought to mirror the night sky and demonstrate Desna's witnessing of these pronouncements.`,id:"824565",note:null,date:{day:null,year:null,month:null},category:null},{name:"Planting Week",description:`Erastil - -This holy week to the god Erastil is a time of heavy work in the fields for farmers.`,id:"824566",note:null,date:{day:null,year:null,month:null},category:null},{name:"Ascendance Night",description:`Norgorber - -Day marking the apotheosis of the Reaper of Reputation.`,id:"824567",note:null,date:{day:2,year:null,month:4},category:null},{name:"Azvadeva Dejal",description:`Gruhastha - -Celebration of the revelation of the Azvadeva Pujila, with gifts of books, celebrations of knowledge, blessing of animals, and a vegetarian feast.`,id:"824568",note:null,date:{day:3,year:null,month:4},category:null},{name:"Goblin Flea Market",description:`Andoran - -A market day that focuses on unusual crafts and offers games to children who dress up for the occasion.`,id:"824569",note:null,date:{day:null,year:null,month:null},category:null},{name:"Breaching Festival",description:`Korvosa - -Yearly festival in which contestants try to break through the magical wards protecting the Academae.`,id:"824570",note:null,date:{day:null,year:null,month:4},category:null},{name:"Silverglazer Sunday",description:`Andoran - -Silverglazer Sunday is a two-part Andoren national festival that is held on the last Sunday of Arodus and the first Sunday of Rova every year. Celebrants spend the two Sundays fishing, holding swimming competitions, and making enormous puppets.`,id:"824571",note:null,date:{day:null,year:null,month:null},category:null},{name:"Batul al-Alim",description:`Qadira - -Batul al-Alim is a holiday celebrated on the last Oathday of Calistril in Qadira. It commemorates the birthday of the popular romantic poet of the same name.`,id:"824572",note:null,date:{day:null,year:null,month:1},category:null}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Religious Holidays",id:"religious-holidays",color:"#9b2c2c"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Historical Events",id:"historical-events",color:"#455A64"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Galifar",description:"Calendar of the world of Eberron.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!1,weekdays:[{type:"day",name:"Sul",id:"ID_598a7bd9b8b9"},{type:"day",name:"Mol",id:"ID_69088ac8f818"},{type:"day",name:"Zol",id:"ID_a8c85a98f8fa"},{type:"day",name:"Wir",id:"ID_fa4b687aaba9"},{type:"day",name:"Zor",id:"ID_58e9a82a6bc8"},{type:"day",name:"Far",id:"ID_9a18cb889ada"},{type:"day",name:"Sar",id:"ID_3b9bfa38c979"}],months:[{name:"Zarantyr",type:"month",length:28,id:"ID_7a8afb09aa6a"},{name:"Olarune",type:"month",length:28,id:"ID_386b188b2a89"},{name:"Therendor",type:"month",length:28,id:"ID_599a0ad859c8"},{name:"Eyre",type:"month",length:28,id:"ID_98a95869e90b"},{name:"Dravago",type:"month",length:28,id:"ID_eb5a194bcbf8"},{name:"Nymm",type:"month",length:28,id:"ID_bb596aa9ca5b"},{name:"Lharvion",type:"month",length:28,id:"ID_fb1bb9dabb88"},{name:"Barrakas",type:"month",length:28,id:"ID_8bcb19c8f90a"},{name:"Rhaan",type:"month",length:28,id:"ID_0a09eb5b7b9b"},{name:"Sypheros",type:"month",length:28,id:"ID_3b98ab1a29e8"},{name:"Aryth",type:"month",length:28,id:"ID_899b59faaba9"},{name:"Vult",type:"month",length:28,id:"ID_8a286b78aac9"}],moons:[{name:"Nymm",cycle:28,offset:-14,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_a8b88988a94a"},{name:"Sypheros",cycle:35,offset:-11,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_5ba80b4b096a"},{name:"Therendor",cycle:42,offset:21,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_c999085a499b"},{name:"Rhaan",cycle:49,offset:9,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_39f91ab8a85a"},{name:"Olarune",cycle:56,offset:27,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_2ada8b99788b"},{name:"Eyre",cycle:63,offset:10,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_49285b79d988"},{name:"Vult",cycle:70,offset:6,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_eaebb94a9acb"},{name:"Zarantyr",cycle:77,offset:31,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_98d86aabcbb9"},{name:"Aryth",cycle:84,offset:41,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_d989b809d97b"},{name:"Dravago",cycle:91,offset:31,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_1a293959eaab"},{name:"Lharvion",cycle:98,offset:34,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_cbf919491a5b"},{name:"Barrakas",cycle:105,offset:-11,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_4a1a2a6b589b"}],leapDays:[],eras:[]},current:{year:998,day:1,month:0},events:[{name:"The Tain Gala - Sharn",description:"The Tain Gala is a notable event held on the first Far of each month in Sharn.",id:"824461",note:null,date:{day:null,year:null,month:null},category:null},{name:"Revelation Day - Blood of Vol",description:"Meditation ceremony for Seekers (also called Ascension Day).",id:"824462",note:null,date:{day:13,year:null,month:0},category:null},{name:"Winter Solstice",description:"The longest night of the year.",id:"824463",note:null,date:{day:14,year:null,month:0},category:null},{name:"Rebirth Eve - The Silver Flame",description:"The Purified new year; a night for spiritual vigil and guarding against evil. ",id:"824464",note:null,date:{day:14,year:null,month:0},category:null},{name:"Crystalfall - Sharn",description:"A day of remembrance; Ice sculptures are created (and destroyed) to commemorate the destruction of the Glass Tower on 9 Olarune in 918 by abjurers. ",id:"824465",note:null,date:{day:9,year:998,month:1},category:null},{name:"Bright Souls' Day - The Silver Flame",description:"On this day each year, the Purified celebrate the lives and sacrifice of all followers of the Flame who died while fighting evil and protecting the faithful. ",id:"824466",note:null,date:{day:18,year:null,month:1},category:null},{name:"The Day of Mourning - Sharn",description:"In commemoration of the destruction of the nation of Cyre, those who survived gather to remember the loss of their kingdom on this date in the year 994. ",id:"824467",note:null,date:{day:20,year:995,month:1},category:null},{name:"Tirasday - The Silver Flame",description:"On this day, the Silver Flame work, give gifts, and partake in joyous celebration out of thankfulness for the new planting season and the birth of Tira Miron - the Voice of the Silver Flame.",id:"824468",note:null,date:{day:5,year:null,month:2},category:null},{name:"Sun's Blessing - The Sovereign Host",description:"The Sovereign Host enjoys this festival of peace, and of setting aside differences, in the name of Dol Arrah.",id:"824469",note:null,date:{day:15,year:null,month:2},category:null},{name:"Initiation Day - The Silver Flame",description:"Seminary graduations and breaking grounds for new churches are common on this day as the Silver Flame recalls their declarations of independent faith and the construction of their first cathedral on this special day each year. ",id:"824470",note:null,date:{day:11,year:null,month:3},category:null},{name:"Baker's Night - The Silver Flame",description:"An old and misunderstood, yet immensely popular, holiday wherein followers of the Silver Flame gather to share pastries and treats created by bakers within their fold. ",id:"824471",note:null,date:{day:6,year:null,month:4},category:null},{name:"Aureon's Crown - Sharn and The Sovereign Host",description:`The Sovereign Host celebrate knowledge on this day with lectures and sermons.Secular institutions hold graduation and commencement ceremonies on this date, as do the monastic schools of the Silver Flame.In Sharn this has become a common secular holiday, wherein even non-devout members of the Five Nations attend lectures and sermons held by the priests of Aureon on philosophical, historical, and a range of other topics - including discussions on the nature of the gods. - -`,id:"824472",note:null,date:{day:26,year:null,month:4},category:null},{name:"Promisetide - The Silver Flame",description:"A controversial holiday outside of the Silver Flame faith, on this day the Purified honor the Silver Flame for the promise of paradise. They also honor (without worship) the Sovereign Host for having created the world, before stepping aside to allow the Flame its rightful place as the last god of Eberron.\xA0 ",id:"824473",note:null,date:{day:28,year:null,month:4},category:null},{name:"Brightblade - Sharn and The Sovereign Host",description:`This Sovereign Host festival, dedicated to Dol Dorn, is marked by gladiatorial and athletic contests. - -In Sharn, festival celebrations occur throughout the temple districts with events culminating in a combined contest of champions at the Cornerstone Arena. `,id:"824474",note:null,date:{day:12,year:null,month:5},category:null},{name:"First Dawn - The Silver Flame",description:"On this day in 914, the Church of the Silver Flame officially assumed control of the government of Thrane. On each anniversary, the Purified give thanks for their just rule, while also honoring the memory of King Thalin, whose death paved the way for their governance.",id:"824475",note:null,date:{day:21,year:915,month:5},category:null},{name:"Silvertide - The Silver Flame",description:"Commemoration of both the couatl sacrifice and the entry, thousands of years ago, of the Silver Flame into Eberron mark this highest of holy days. The vast majority of Purified spend this day in prayer and observance.\xA0 ",id:"824476",note:null,date:{day:14,year:null,month:6},category:null},{name:"The Race of Eight Winds - Sharn",description:`Legend tells of King Galifar II's fascination with aerial scouts and cavalry. The evolution of this annual contest took centuries, but has given Sharn an exotic and well anticipated event involving beasts and their riders in a symbiotic quest for glory* over a course that finds them weaving through the spires of the city. - - - -*the winner also receives 500gp and a land grant located elsewhere in Breland.`,id:"824477",note:null,date:{day:21,year:201,month:6},category:null},{name:"The Hunt - Sharn and The Sovereign Host",description:`The Sovereign Host celebrate Balinor with communal hunts of dangerous creatures. - -In Sharn, a dangerous beast*, whose transport to the city was arranged by the priests of Balinor, is released into the Depths of the Lower-City. Open to any who would participate (and pay an entry fee in the form of a 5gp donation), the victor must return with the beast's head to receive a 500gp purse, local fame, and the blessing of Balinor. - - - -*often a singular beast, it can be several - which then requires the victor to return with the most skins. `,id:"824478",note:null,date:{day:4,year:null,month:7},category:null},{name:"Victory Day - The Silver Flame",description:"Commemorating the conclusion of the lycanthropic purge (832 YK - 880 YK), on Victory Day the adult faithful of the Silver Flame attend sermons on triumph, defeat, and the somewhat questionable methods utilized by the templars during the purge - while the children of the faithful act out great battles with toy swords. ",id:"824479",note:null,date:{day:9,year:881,month:7},category:null},{name:"Fathen's Fall - Sharn",description:"Honoring the memory of Fathen, a great hero of the Silver Crusade (832 YK - 880 YK), who, in the last days of the purge, was torn apart by wererats on the streets of North Market. Faithful gather on this day at the Shrine of Fathen the Martyr to listen to a sermon from the priest of High Hope. This holiday is often uncomfortable and tense for shifter communities in Sharn. ",id:"824480",note:null,date:{day:25,year:881,month:7},category:null},{name:"Boldrei's Feast - Sharn and The Sovereign Host",description:`A feast of community in the name of Boldrei, extravagant parties are often held on this holiday and it has also become the traditional day for elections. - -In Sharn, a great feast is held at the Pavilion of the Host with goods and services donated\xA0 from local merchants, as well as House Ghallanda. Many grand parties, some quite astonishing in their opulence, are hosted by the wealthiest members of varying districts - often in competition with one another for social standing. `,id:"824481",note:null,date:{day:9,year:null,month:8},category:null},{name:"The Ascension - Sharn",description:"Each year on The Ascension, followers reaffirm their faith and give thanks as well as attend blessing ceremonies at temples throughout the city - the grandest of which occurs at the Cathedral of the Cleansing Flame. All of this is to honor the sacrifice of Tira Miron, the Voice of the Flame, without which there would be no Church of the Silver Flame. Contributions to their community on this day are a high priority for the faithful.",id:"824482",note:null,date:{day:1,year:null,month:9},category:null},{name:"Wildnight - Sharn",description:"With the The Fury (the Sovereign of Passion and Madness) reaching the height of her power on this night, people find it difficult to control or restrain their impulses - once the sun sets, public revelry in the streets climbs to joyous or, all too often, dangerous levels, calming only as the sun rises on the following morning. ",id:"824483",note:null,date:{day:18,year:null,month:9},category:null},{name:"Saint Voltros's Day - The Silver Flame",description:"Though one of the least high holy days, it is marked by brief prayers and church services in the honor of the birth of Saint Voltros - the first paladin called to only serve the Silver Flame.",id:"824484",note:null,date:{day:25,year:null,month:9},category:null},{name:"Thronehold - Sharn",description:"On this day in 996, the Treaty of Thronehold was signed, formally ending the Last War. Annual celebratory feasts are held throughout the Five Nations to mark this auspicious and long-awaited event. ",id:"824485",note:null,date:{day:11,year:997,month:10},category:null},{name:"Rampartide - The Silver Flame",description:"In accordance with scripture, on this day the Purified steel themselves against wickedness, both without and within, through repentance and fasting. Children, elderly, and the sick are required only to give up their favorite foods for the day. ",id:"824486",note:null,date:{day:24,year:null,month:10},category:null},{name:"Long Shadows - Sharn",description:"As dark magic dominates over these three days of the Long Shadows, the myth of Sovereign Lord Aureon's stolen shadow is forefront in the minds of the people. Most will spend these days indoors huddled around the warmth of a fire, but those few who worship the dark deity use this time to prey upon the weak and the foolish. ",id:"824487",note:null,date:{day:26,year:null,month:11},category:null},{name:"Khybersef - The Silver Flame",description:`Originally called Khyber's Eve, the Purified spend the night in intense prayer and spiritual vigilance against the, according to scripture, "thinning of the bonds that hold the demon lords in Khyber" between now (the beginning of winter) and the solstice. Quests and crusades often begin on Khybersef. `,id:"824488",note:null,date:{day:27,year:null,month:11},category:null},{name:"Spring Equinox",description:"The spring equinox is when the day and the night are equally as long, and are getting longer.",id:"824489",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824490",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The autumn equinox is when the day and the night are equally as long, and are getting shorter.",id:"824491",note:null,date:{day:null,year:null,month:null},category:null}],id:null,categories:[]},{name:"Barovian Calendar",description:"Calendar of the realm of Barovia, home of Strahd.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Monday",id:"ID_6a183b08c8eb"},{type:"day",name:"Tuesday",id:"ID_892b7b7a5ae9"},{type:"day",name:"Wednesday",id:"ID_6bb98899ba68"},{type:"day",name:"Thursday",id:"ID_4a7b683aea19"},{type:"day",name:"Friday",id:"ID_78690a099b89"},{type:"day",name:"Saturday",id:"ID_ba5b09ba5a89"},{type:"day",name:"Sunday",id:"ID_29b90acaead9"}],months:[{name:"1st Moon",type:"month",length:31,id:"ID_7b4978ab581a"},{name:"2nd Moon",type:"month",length:28,id:"ID_cb99fbb9395b"},{name:"3rd Moon",type:"month",length:31,id:"ID_79881a89cb18"},{name:"4th Moon",type:"month",length:30,id:"ID_5b9a8a397908"},{name:"5th Moon",type:"month",length:31,id:"ID_f8399ab80818"},{name:"6th Moon",type:"month",length:30,id:"ID_3ac84a7bc869"},{name:"7th Moon",type:"month",length:31,id:"ID_e98bc86bc809"},{name:"8th Moon",type:"month",length:31,id:"ID_89ea78ca5988"},{name:"9th Moon",type:"month",length:30,id:"ID_798a3b990a4b"},{name:"10th Moon",type:"month",length:31,id:"ID_3a9999e8eb59"},{name:"11th Moon",type:"month",length:30,id:"ID_db39383b990a"},{name:"12th Moon",type:"month",length:31,id:"ID_1bfa3b180a48"}],moons:[{name:"Moon",cycle:29.530588853,offset:10.24953,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_e98b3a8ab8da"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:400},{ignore:!1,exclusive:!0,interval:100},{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:1,intercalary:!1,id:"ID_6a28dbb81a48"}],eras:[{name:"Before Christ",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-9e3,month:0,day:0}},{name:"Anno Domini",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1}}]},current:{year:735,day:1,month:0},events:[{name:"Winter Solstice",description:"The Winter Solstice is the day of the year with the least time between sunrise and sunset. Many western cultures consider it the official start of winter.",id:"824455",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Summer Solstice",description:`The Summer Solstice is the day of the year with the most time between -sunrise and sunset. Many western cultures consider it the official start - of summer.`,id:"824456",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Spring Equinox",description:`The Spring Equinox, -also called the Vernal Equinox, is the day between the winter and -summer solstices where the day is the exact same length as the night. -Many western cultures consider it the official start of Spring. -`,id:"824457",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Autumnal Equinox",description:`The Autumnal Equinox, -also called the Fall Equinox, is the midpoint between the summer and -winter solstices, where the day is the exact same length as the night. -Many western cultures consider it the official start of Autumn. -`,id:"824458",note:null,date:{day:null,year:null,month:null},category:null},{name:"New Year's Day",description:"New Year's day marks the start of a new year.",id:"824459",note:null,date:{day:1,year:null,month:null},category:null},{name:"Paschal Full Moon",description:"The first full moon after march 21st, which is considered the fixed date for the spring equinox.",id:"824460",note:null,date:{day:null,year:null,month:null},category:"natural-event"}],id:null,categories:[{name:"Natural Event",id:"natural-event",color:"#9e9d24"}]},{name:"Exandrian Calendar",description:"Calendar of the world of Wildemount.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:2,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Miresen",id:"ID_3b38aaa81bca"},{type:"day",name:"Grissen",id:"ID_da6b19882baa"},{type:"day",name:"Whelsen",id:"ID_a9cae8f88b98"},{type:"day",name:"Conthsen",id:"ID_e87859eb5aaa"},{type:"day",name:"Folsen",id:"ID_59180abbea8a"},{type:"day",name:"Yulisen",id:"ID_98082bd8d8ca"},{type:"day",name:"Da'leysen",id:"ID_da4ba92b299a"}],months:[{name:"Horisal",type:"month",length:29,id:"ID_e89a4ab9995b"},{name:"Misuthar",type:"month",length:30,id:"ID_18b8894bab7b"},{name:"Dualahei",type:"month",length:30,id:"ID_0a9b29f8f8db"},{name:"Thunsheer",type:"month",length:31,id:"ID_6a8a8a5bea5b"},{name:"Unndilar",type:"month",length:28,id:"ID_b8295bdbcafa"},{name:"Brussendar",type:"month",length:31,id:"ID_c92a489bb909"},{name:"Sydenstar",type:"month",length:32,id:"ID_7b48bb1b0a4a"},{name:"Fessuran",type:"month",length:29,id:"ID_289858c97849"},{name:"Quen'pillar",type:"month",length:27,id:"ID_f8abd9a86aa9"},{name:"Cuersaar",type:"month",length:29,id:"ID_7aba59fa2b69"},{name:"Duscar",type:"month",length:32,id:"ID_5819f86b99cb"}],moons:[{name:"Catha",cycle:33,offset:7,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_0ab929092b5b"},{name:"Ruidus",cycle:328,offset:80,faceColor:"#ff6161",shadowColor:"#1f1f1f",id:"ID_b9783ac818e9"}],leapDays:[],eras:[{name:"The Founding",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1}},{name:"Age of Arcanum",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-1500,month:0,day:1}},{name:"The Calamity",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-665,month:0,day:1}},{name:"Post-Divergence",description:"",format:"Year {{year}} P.D.",start:{year:1,month:0,day:1}}]},current:{day:1,month:0,year:836},events:[{name:"Spring Equinox",description:"The spring equinox is when the day and the night are equally as long, and are getting longer.",id:"824430",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824431",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The autumn equinox is when the day and the night are equally as long, and are getting shorter.",id:"824432",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824433",note:null,date:{day:null,year:null,month:null},category:null},{name:"New Dawn",description:`The first day of the new year is also the holy day of the Changebringer, as the old year gives way to a new path. - -In Tal'Dorei, Emon celebrates New Dawn with a grand midnight feast, which commonly features a short play celebrating the changes witnessed in the past year. - -On the Menagerie Coast, people celebrate by having a feast on the shore at dusk to watch the sunset. They feast and discuss their hopes for the new year until the sun rises.`,id:"824434",note:null,date:{day:1,year:null,month:0},category:"religious-holidays"},{name:"Hillsgold",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824435",note:null,date:{day:27,year:null,month:0},category:"secular-holidays"},{name:"Day of Challenging",description:`The holy day of the Stormlord is one of the most raucous holidays in Emon. Thousands of spectators attend the annual Godsbrawl, which is held in the fighting ring within the Temple of the Stormlord. The people root for their deity's favored champion, and there is a fierce (yet friendly) rivalry between the Champion of the Stormlord and the Champion of the Platinum Dragon. The winner earns the title of "Supreme Champion" for an entire year. - -The Day of Challenging is one of the most raucous holidays in Port Damali, and thousands of spectators attend the annual Godsbrawl held in the Temple of\xA0Kord to root for their favored deity's champion, particularly the chosen champions of the Storm Lord and the\xA0All-Hammer.\xA0`,id:"824436",note:null,date:{day:7,year:null,month:1},category:"religious-holidays"},{name:"Renewal Festival",description:"Spring begins early in the month of Dualahei, officially starting on the 13th with the Renewal Festival.",id:"824437",note:null,date:{day:13,year:null,month:2},category:"secular-holidays"},{name:"Wild's Grandeur",description:`Though the Archeart is the god of spring, the peak of the spring season is the holy day of the Wildmother. - -The people in the southern wilds of Tal'Dorei celebrate the Wildmother's strength by journeying to a place of great natural beauty. This could be the top of a mountainous waterfall, the center of a desert, or even an old and peaceful city park (such as Azalea Street Park in Emon). Though Emon rarely celebrates Wild's Grandeur, the few who do will plant trees in observance of the holiday. - -The people of the Menagerie Coast set aside this day to sail for no reason other than the pleasure of observing the natural beauty of their surroundings. Those who still partake in elements of Ki'Nau culture take this day to appreciate the fruits and foods granted by the sea, leaving offerings of delicacies and small handmade crafts at temporary altars of twisted roots and grasses.`,id:"824438",note:null,date:{day:20,year:null,month:2},category:"religious-holidays"},{name:"Harvest's Rise",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824439",note:null,date:{day:11,year:null,month:3},category:"secular-holidays"},{name:"Merryfrond's Day",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824440",note:null,date:{day:31,year:null,month:3},category:"secular-holidays"},{name:"Deep Solace",description:`Moradin's holy day is Deep Solace, which is celebrated on the eighteenth day of the fifth month. Especially devout followers of the All-Hammer spend the day in isolation, meditating on the meaning of family and how they may be better mothers, fathers, siblings, and children. - -The dwarven communities across Exandria, such as the ones in Grimgolir and Kraghammer, celebrate with a full day of feasting and drinking.\xA0`,id:"824441",note:null,date:{day:18,year:null,month:4},category:"religious-holidays"},{name:"Zenith",description:"Summer begins in the middle of Unndilar, officially starting at noon on the 26th day known as the Zenith.",id:"824442",note:null,date:{day:26,year:null,month:4},category:"secular-holidays"},{name:"Artisan's Faire",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824443",note:null,date:{day:15,year:null,month:5},category:"secular-holidays"},{name:"Elvendawn",description:`Corellon's holy day is called Elvendawn, -or Midsummer. It is celebrated on the twentieth day -of the sixth month, and commemorates the elves' first -emergence from the Feywild. - -In Syngorn, the Elves open small doorways into the Feywild and celebrate alongside the wild fey with uncharacteristic vigor. - -Though the Dwendalian -Empire doesn't promote the worship of the Arch Heart, -the elves of Bysaes Tyl quietly celebrate in private by -opening small doors to the Feywild and having a little -more wine than usual.\xA0`,id:"824444",note:null,date:{day:20,year:null,month:5},category:"religious-holidays"},{name:"Highsummer",description:`The holy day of the Dawnfather is the peak of the summer season. - -Emon celebrates with an entire week of gift-giving and feasting, ending at midnight on the 21st of Sydenstar (the anniversary of the Battle of the Umbra Hills, where Zan Tal'Dorei dethroned Trist Drassig). - -Whitestone (where the Dawnfather is the city's patron god) celebrates with gift-giving and a festival of lights around the Sun Tree. Due to the Briarwood occupation, money is thin, so most Whitestone folk choose to recount the small things they are thankful for, rather than buy gifts. - -While other parts of Exandria feast, the Dwendalian -Empire uses this day as an opportunity to enlist more -soldiers in its army. The military holds great feasts and -hands out toy soldiers and other propaganda, encouraging people to enlist and help fight against the evil that -threatens the king.\xA0`,id:"824445",note:null,date:{day:7,year:null,month:6},category:"religious-holidays"},{name:"Morn of Largesse",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824446",note:null,date:{day:14,year:null,month:6},category:"secular-holidays"},{name:"Harvest's Close",description:"Autumn begins on the 3rd of Fessuran\xA0and is typically celebrated with feasting in rural regions and with carnivals in the cities.\xA0",id:"824447",note:null,date:{day:3,year:null,month:7},category:"secular-holidays"},{name:"The Hazel Festival",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824448",note:null,date:{day:12,year:null,month:8},category:"secular-holidays"},{name:"Civilization's Dawn",description:`The Law Bearer's holy day is Civilization's -Dawn, which is celebrated on the autumnal equinox, -usually the twenty-second day of the ninth month. - -Emon celebrates with a great bonfire in the square of each neighborhood, around which each community dances and gives gifts. - -In the -Dwendalian Empire, people celebrate by having feasts -in honor of the laws of the Dwendal bloodline. One seat -at every table is left open for the king, who eats in spirit -with the people he rules.\xA0`,id:"824449",note:null,date:{day:22,year:null,month:8},category:"religious-holidays"},{name:"Night of Ascension",description:`The Raven Queen's holy day is called the Night of Ascension, celebrating her apotheosis. The actual date of the her rise to divinity is unclear, but the Night of Ascension is celebrated on the thirteenth day of the tenth month. - -Though most in Emon see this celebration of the dead as unnerving and macabre, the followers of the Matron of Ravens believe that the honored dead would prefer to be venerated with cheer, not misery. - -What was once a night of cheery celebration of the dead in the Dwendalian Empire has recently become an occasion to burn effigies and decry the Kryn Dynasty for their unnatural relationship with death.`,id:"824450",note:null,date:{day:13,year:null,month:9},category:"religious-holidays"},{name:"Zan's Cup",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824451",note:null,date:{day:21,year:null,month:9},category:"secular-holidays"},{name:"Barren Eve",description:"Winter begins on the 2nd day of Duscar, the Barren Eve, which is a nighttime celebration and remembrance of those who fell in battle.",id:"824452",note:null,date:{day:2,year:null,month:10},category:"secular-holidays"},{name:"Embertide",description:"Bahamut's holy day is called Embertide,\xA0and is celebrated on the fifth day of Duscar. This is a day\xA0of remembrance, solemnity, and respect for those who\xA0have fallen in the defense of others.",id:"824453",note:null,date:{day:5,year:null,month:10},category:"religious-holidays"},{name:"Winter's Crest",description:`This day celebrates the freedom of Tal'Dorei from Errevon the Rimelord. It is the peak of the winter season, so devout followers of the Matron of Ravens (as the goddess of winter) consider it to be one of her holy days. - -However, in most of the land, people see Winter's Crest as a secular holiday, often celebrated with omnipresent music in public areas, lavish gift-giving to relatives and loved ones, and the cutting and decorating of trees placed indoors. The Sun Tree in Whitestone is often decorated with lights and other baubles for Winter's Crest.`,id:"824454",note:null,date:{day:20,year:null,month:10},category:"secular-holidays"}],id:null,categories:[{name:"Religious Holidays",id:"religious-holidays",color:"#0D47A1"},{name:"Secular Holidays",id:"secular-holidays",color:"#4A148C"}]},{name:"Calendar of Harptos",description:"Calendar of Faer\xFBn of the Forgotten Realms.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!1,weekdays:[{type:"day",name:"I",id:"ID_9999882bb94a"},{type:"day",name:"II",id:"ID_8a0b4b79d888"},{type:"day",name:"III",id:"ID_da483aca8bf9"},{type:"day",name:"IV",id:"ID_a8fbea39cac8"},{type:"day",name:"V",id:"ID_9b19d9787b0b"},{type:"day",name:"VI",id:"ID_382a590a8a28"},{type:"day",name:"VII",id:"ID_fbca0ab80afb"},{type:"day",name:"VIII",id:"ID_ca093bca5ad9"},{type:"day",name:"IX",id:"ID_d95b39098bf8"},{type:"day",name:"X",id:"ID_389bfb5858db"}],months:[{name:"Hammer (Deepwinter)",type:"month",length:30,id:"ID_cbeb4b190b6a"},{name:"Midwinter",type:"intercalary",length:1,id:"ID_89bad9089b7b"},{name:"Alturiak (The Claw of Winter)",type:"month",length:30,id:"ID_6a08a8aacb7b"},{name:"Ches (The Claw of the Sunsets)",type:"month",length:30,id:"ID_db2a7bf97afa"},{name:"Tarsakh (The Claw of Storms)",type:"month",length:30,id:"ID_6b48982b0bda"},{name:"Greengrass",type:"intercalary",length:1,id:"ID_08790af92809"},{name:"Mirtul (The Melting)",type:"month",length:30,id:"ID_b91b39f95a28"},{name:"Kythorn (The Time of Flowers)",type:"month",length:30,id:"ID_f8e9585a2bf8"},{name:"Flamerule (Summertide)",type:"month",length:30,id:"ID_fa895bdb38e9"},{name:"Midsummer",type:"intercalary",length:1,id:"ID_a9181b5a683a"},{name:"Eleasis (Highsun)",type:"month",length:30,id:"ID_1b1b1b287b0a"},{name:"Eleint (The Fading)",type:"month",length:30,id:"ID_1aca5918993a"},{name:"Highharvestide",type:"intercalary",length:1,id:"ID_a94a183b4b88"},{name:"Marpenoth (Leaffall)",type:"month",length:30,id:"ID_58d97969eb79"},{name:"Uktar (The Rotting)",type:"month",length:30,id:"ID_4b090b787b18"},{name:"The Feast of the Moon",type:"intercalary",length:1,id:"ID_1b0ae8dbdb4a"},{name:"Nightal (The Drawing Down)",type:"month",length:30,id:"ID_abb82afab80a"}],moons:[{name:"Sel\xFAne",cycle:30.4375,offset:13.9,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_48ea2a69a888"}],leapDays:[{name:"Shieldsmeet",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:9,intercalary:!1,id:"ID_5b08faa88ada"}],eras:[]},current:{year:1491,day:1,month:0},events:[{name:"Winter Solstice",description:null,id:"824588",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Vernal Equinox",description:null,id:"824589",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Summer Solstice",description:null,id:"824590",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Autumnal Equinox",description:null,id:"824591",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Shieldmeet",description:`Shieldmeet was the equivalent of a leap year day in the Calendar of Harptos, occurring once every four years, adding a day after the festival of Midsummer and before Eleasis 1. Traditionally the day was used for fairs, bazaars, musical and theatrical performances, and tournaments of skill and magical ability. Nobles usually held court to hear the petitions of their people and to make or renew trade pacts, alliances, and agreements. Shieldmeet was known as Cinnaelos'Cor (also seen as Cinnaeloscor), "the Day of Corellon's Peace" in elvish and marked the end of an aeloulaev and the beginning of a new one in the elven Aryselmalyn calendar.`,id:"824592",note:null,date:{day:2,year:null,month:9},category:"festivals"},{name:"Feast of the Moon",description:`The Feast of the Moon, or Moonfest, was an annual festival in the Calendar of Harptos, occurring between the final night of Uktar and the first day of Nightal. It was the last great festival of the calendar year. - -The day traditionally marked the onset of winter. It was also a time to celebrate and honor the ancestors and the respected dead. On this day, folk blessed their ancestors' graves and performed the Ritual of Remembrance. People also gathered to tell stories of the deeds of their ancestors and of the gods until deep into the night, until they merged and became legend. This was a time to hear of past heroes, great treasures, and lost cities. - -In Faer\xC3\u0192\xC2\xBBn, battles were typically fought between harvest-time and the coming of winter. This meant that most of the fighting usually occurred in the month of Uktar. The timing of the Feast of the Moon\xC3\xA2\xE2\u201A\xAC\xE2\u20ACafter recently slain soldiers had joined the ranks of the dead\xC3\xA2\xE2\u201A\xAC\xE2\u20ACwas thus practical, if sadly ironic. - -The Heralds of Faer\xC3\u0192\xC2\xBBn had a number of special duties on the Feast of the Moon. Prime among these was to perform the Bloodsong ceremony, at which a Herald publicly recited the genealogies of each noble family in the area. In this way, the Heralds reaffirmed a noble family's traditional authority and status, as well as the respect accorded to them. - -Priests of a number of deities of various pantheons held rites, ceremonies, and festivals on the Feast of the Moon. Many, though not all, focused on remembering the dead in one way or another.`,id:"824593",note:null,date:{day:1,year:null,month:15},category:"festivals"},{name:"Highharvesttide",description:`Highharvestide was an annual festival in the Calendar of Harptos, taking place between 30 Eleint and 1 Marpenoth. It was traditionally a feast to celebrate the harvest and the abundance of food, but also the time when those wishing to travel left on their journeys before winter set in. - -Preparations for the feast started as early as a tenday before, while preparing, cooking, and preserving the harvest for the cold winter months. Traditions varied from community to community, but examples of festive activity included food-related contests; races and challenges of skill and strength; receiving homemade sweets from the local clergy; and priests blessing larders, wine cellars, grain bins, and food preserves. - -This day was often an important anniversary to various governments. Often, taxes and tithes came due, rulers held "open courts" to hear the concerns of their citizens, oaths were publicly renewed, troops received marching orders to new duty stations, and guilds met to confer on prices and rate changes for goods and services. - -According to tradition, dwarves only drank water and elves drank only dew on this day. However, these traditions began to fade in the 14th and 15th century DR. - -It was said that children born on this day were favored by Tymora to have lifelong good luck but be smitten with wanderlust. Another legend was that human females born on this day had control over their reproductive system (i.e., got pregnant only when they wanted to) by force of will alone, and that they could instantly sense when they had been poisoned, either by ingestion or being bitten by a venomous creature for example.`,id:"824594",note:null,date:{day:1,year:null,month:12},category:"festivals"},{name:"Greengrass",description:"Greengrass was a festival to welcome in the first day of spring in the Calendar of Harptos. It occured annually on a special day between Tarsakh 30 and Mirtul 1. Traditionally, the wealthier people brought out flowers to give to the less wealthy, who either wore them or spread them on the ground to encourage the deities to usher in the summer.",id:"824595",note:null,date:{day:1,year:null,month:5},category:"festivals"},{name:"Midwinter",description:`Midwinter (also known as Deadwinter Day) was a festival to mark the midpoint of winter in the Calendar of Harptos. It occured on a special day between Hammer 30 and Alturiak 1. Amongst nobles and monarchs it was known as Midwinter and was traditionally used to make or renew alliances, although the common people called it Deadwinter Day, a reference to the cold and hard times that remained before the spring. - -On Midwinter Day the Red Fellowship of the Deity known as the Red Knight observes the Retreat. This solemn ceremony consists of an assembly wherein the clergy discuss the previous year's campaigns. Strategies are discussed, battles analyzed, and the accumulated lore integrated into the church's teachings. - -The holiest day of the year for the Church of Shevarash is Midwinter Night, during which the Dark Court Slaughter is remembered. Inductions into the ranks of the clergy occur at this time. Each new cleric screams vows of vengeance into the night air and swears neither to laugh nor smile until the Spider Queen and her followers are no more.`,id:"824596",note:null,date:{day:1,year:null,month:1},category:"festivals"},{name:"Midsummer",description:"Midsummer was a festival that celebrated love and music through feast. It occurred between Flamerule 30 and Eleasis 1 on the Calendar of Harptos. It was a time when love advanced, and it was said the deities themselves took a hand to ensure good weather. If bad weather was experienced on this night it was considered an extremely bad omen. Shieldmeet occurred the day after Midsummer on leap years.",id:"824597",note:null,date:{day:1,year:null,month:9},category:"festivals"}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Festivals",id:"festivals",color:"#9b2c2c"}]}];var Bo=class extends Zn.Modal{async onOpen(){await this.display()}async display(){this.containerEl.addClass("fantasy-calendar-choose-preset"),this.contentEl.empty(),this.contentEl.createEl("h3",{text:"Choose a Preset Calendar"});let e=this.contentEl.createDiv("fantasy-calendar-preset-container");for(let a of bu){let r=new Zn.ButtonComponent(e).onClick(()=>{this.preset=a,this.display()});this.preset==a&&r.setCta(),r.buttonEl.createDiv({cls:"setting-item-name",text:a.name}),r.buttonEl.createDiv({cls:"setting-item-description",text:a.description})}let n=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new Zn.ButtonComponent(n).setButtonText("Apply").onClick(()=>{this.saved=!0,this.preset=(0,wu.default)(this.preset),this.preset.id=et(6),this.close()}).setCta(),new Zn.ExtraButtonComponent(n).setIcon("cross").onClick(()=>{this.close()})}};function Kr(t){let e=t-1;return e*e*e+1}function Du(t,{delay:e=0,duration:n=400,easing:a=Kr,x:r=0,y:i=0,opacity:o=0}={}){let l=getComputedStyle(t),s=+l.opacity,d=l.transform==="none"?"":l.transform,u=s*(1-o);return{delay:e,duration:n,easing:a,css:(c,h)=>` - transform: ${d} translate(${(1-c)*r}px, ${(1-c)*i}px); - opacity: ${s-u*h}`}}var wa=[];function Da(t,e=X){let n,a=new Set;function r(l){if(se(t,l)&&(t=l,n)){let s=!wa.length;for(let d of a)d[1](),wa.push(d,t);if(s){for(let d=0;d{a.delete(d),a.size===0&&(n(),n=null)}}return{set:r,update:i,subscribe:o}}var Qr=xe(require("obsidian"));var _u=xe(require("obsidian"));function hn(t){(0,_u.setIcon)(t,"fantasy-calendar-warning")}function Eu(t){let e=[];if(t.name?.length||e.push("A calendar must have a name."),(!Hn(t.current.day,t)||!Wn(t.current.month,t)||!Gn(t.current.year,t))&&e.push("Specified current date is not valid."),!t.static.weekdays?.length)e.push("A calendar must have at least 1 weekday.");else{if(!t.static.weekdays?.every(n=>n.name?.length)){let n=t.static.weekdays?.filter(a=>!a.name?.length).length;n==1?e.push(`${n} weekday does not have a name.`):e.push(`${n} weekdays do not have names.`)}t.static.firstWeekDay>=(t.static.weekdays?.length??1/0)&&e.push(`Invalid first weekday selection: ${t.static.weekdays[t.static.firstWeekDay]}`)}if(!t.static.months?.length)e.push("A calendar must have at least 1 month.");else{if(!t.static.months?.every(n=>n.name?.length)){let n=t.static.months?.filter(a=>!a.name?.length).length;n==1?e.push(`${n} month does not have a name.`):e.push(`${n} months do not have names.`)}if(!t.static.months?.every(n=>n.length>0)){let n=t.static.months?.filter(a=>!(a.length>0)).length;n==1?e.push(`${n} month does not have a length.`):e.push(`${n} months do not have lengths.`)}}if(t.static.useCustomYears){if(!t.static.years?.length)e.push("Use Custom Years is on but no years have been created.");else if(!t.static.years.every(n=>n.name?.length)){let n=t.static.years.filter(a=>!a.name?.length).length;n==1?e.push(`${n} year does not have a name.`):e.push(`${n} years do not have names.`)}}return e.join(` -`)}function Cu(t){return!!(Hn(t.current.day,t)&&Wn(t.current.month,t)&&Gn(t.current.year,t)&&t.static.months?.length&&t.static.months?.every(e=>e.name?.length)&&t.static.months?.every(e=>e.length>0)&&t.static.weekdays?.length&&t.static.weekdays?.every(e=>e.name?.length)&&t.name?.length&&t.static.firstWeekDay<(t.static.weekdays?.length??1/0)&&(!t.static.useCustomYears||t.static.useCustomYears&&t.static.years?.length&&t.static.years.every(e=>e.name?.length)))}function Mo(t,e){if(t==null)return"No day specified";if(e?.current?.month==null)return"No month selected";if(t<1||t>e?.static?.months[e.current?.month]?.length||!e?.static?.months[e.current?.month]?.length)return"Day does not exist in selected month"}function No(t,e){if(t==null)return"No month specified";if(!e?.static?.months?.length)return"No months exist";if(t<0||t>=e?.static?.months?.length)return"Selected month does not exist"}function Io(t,e){if(t==null)return"No year specified";if(t<1&&!e.static?.useCustomYears)return"Years start at 1";if(e?.static?.useCustomYears){if(!e?.static?.years?.length)return"No custom years exist";if(t<0||t>=e?.static?.years?.length)return"Year does not exist in custom years"}}function H2(t){be(t,"svelte-13g7dwb",'.fantasy-calendar-nested-settings.svelte-13g7dwb.svelte-13g7dwb{position:relative}.warning-label-container.svelte-13g7dwb.svelte-13g7dwb{display:flex;justify-content:flex-end;position:absolute;right:0}.warning-label.svelte-13g7dwb.svelte-13g7dwb{color:var(--text-error)}.fantasy-calendar-nested-summary.svelte-13g7dwb.svelte-13g7dwb{outline:none;display:block !important;list-style:none !important;list-style-type:none !important;min-height:1rem;border-top-left-radius:0.1rem;border-top-right-radius:0.1rem;cursor:pointer;position:sticky;top:0;z-index:2;background-color:var(--creator-background-color)}summary.svelte-13g7dwb.svelte-13g7dwb::-webkit-details-marker,summary.svelte-13g7dwb.svelte-13g7dwb::marker{display:none !important}.collapser.svelte-13g7dwb.svelte-13g7dwb{position:absolute;top:50%;right:8px;transform:translateY(-50%);content:""}.handle.svelte-13g7dwb.svelte-13g7dwb{transform:rotate(0deg);transition:transform 0.25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--admonition-details-icon);mask-image:var(--admonition-details-icon);width:20px;height:20px}details[open].svelte-13g7dwb .handle.svelte-13g7dwb{transform:rotate(90deg)}')}function Au(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function ku(t){let e,n,a;return{c(){e=T("div"),n=T("div"),a=me(t[3]),D(n,"class","setting-item-description warning-label svelte-13g7dwb"),D(e,"class","warning-label-container svelte-13g7dwb")},m(r,i){q(r,e,i),E(e,n),E(n,a)},p(r,i){i&8&&we(a,r[3])},d(r){r&&O(e)}}}function W2(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_=t[2]&&Au(t),F=t[2]&&t[3]&&ku(t),w=t[7].default,M=Pr(w,t,t[6],null);return{c(){e=T("details"),n=T("summary"),a=T("div"),r=T("div"),i=T("div"),o=me(t[0]),l=j(),s=T("div"),d=me(t[1]),u=j(),c=T("div"),h=T("div"),_&&_.c(),y=j(),m=T("div"),v=j(),F&&F.c(),p=j(),M&&M.c(),D(i,"class","setting-item-name"),D(s,"class","setting-item-description"),D(r,"class","setting-item-info"),D(a,"class","setting-item setting-item-heading"),D(m,"class","handle svelte-13g7dwb"),D(h,"class","warning-container"),D(c,"class","collapser svelte-13g7dwb"),D(n,"class","fantasy-calendar-nested-summary svelte-13g7dwb"),D(e,"class","fantasy-calendar-nested-settings svelte-13g7dwb")},m(x,V){q(x,e,V),E(e,n),E(n,a),E(a,r),E(r,i),E(i,o),E(r,l),E(r,s),E(s,d),E(n,u),E(n,c),E(c,h),_&&_.m(h,null),E(h,y),E(h,m),E(e,v),F&&F.m(e,null),E(e,p),M&&M.m(e,null),C=!0,A||(S=le(k=t[4].call(null,e)),A=!0)},p(x,[V]){(!C||V&1)&&we(o,x[0]),(!C||V&2)&&we(d,x[1]),x[2]?_||(_=Au(x),_.c(),_.m(h,y)):_&&(_.d(1),_=null),x[2]&&x[3]?F?F.p(x,V):(F=ku(x),F.c(),F.m(e,p)):F&&(F.d(1),F=null),M&&M.p&&(!C||V&64)&&Vr(M,w,x,x[6],C?jr(w,x[6],V,null):Hr(x[6]),null)},i(x){C||(R(M,x),C=!0)},o(x){W(M,x),C=!1},d(x){x&&O(e),_&&_.d(),F&&F.d(),M&&M.d(x),A=!1,S()}}}function G2(t,e,n){let{$$slots:a={},$$scope:r}=e,{open:i=!Qr.Platform.isMobile}=e,{name:o}=e,{desc:l=""}=e,{warn:s=!1}=e,{label:d=null}=e,u=h=>{i&&h.setAttr("open","open")},c=h=>{new Qr.Setting(h).setHeading().setName(o)};return t.$$set=h=>{"open"in h&&n(5,i=h.open),"name"in h&&n(0,o=h.name),"desc"in h&&n(1,l=h.desc),"warn"in h&&n(2,s=h.warn),"label"in h&&n(3,d=h.label),"$$scope"in h&&n(6,r=h.$$scope)},[o,l,s,d,u,i,r,a]}var xu=class extends de{constructor(e){super();fe(this,e,G2,W2,se,{open:5,name:0,desc:1,warn:2,label:3},H2)}},ct=xu;function U2(t){be(t,"svelte-uulo5f",".fantasy-calendar-date-field-container.fantasy-calendar-date-field-container.svelte-uulo5f.svelte-uulo5f{display:flex;flex-direction:row;gap:1rem;border:0}.fantasy-calendar-date-field.svelte-uulo5f.svelte-uulo5f{display:grid;grid-auto-rows:1fr;flex:1 1 0;gap:0.5rem}.fantasy-calendar-date-field.svelte-uulo5f .setting-item-description.svelte-uulo5f{padding-top:0}.fantasy-calendar-date-field.svelte-uulo5f .invalid.svelte-uulo5f{border:1px solid var(--text-error)}")}function Fu(t,e,n){let a=t.slice();return a[11]=e[n],a[13]=n,a}function Tu(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Su(t){let e,n=!t[3]&&Bu(t);return{c(){e=T("div"),n&&n.c(),D(e,"class","setting-item-description svelte-uulo5f")},m(a,r){q(a,e,r),n&&n.m(e,null)},p(a,r){a[3]?n&&(n.d(1),n=null):n?n.p(a,r):(n=Bu(a),n.c(),n.m(e,null))},d(a){a&&O(e),n&&n.d()}}}function Bu(t){let e=Mo(t[4].day,t[0])+"",n;return{c(){n=me(e)},m(a,r){q(a,n,r)},p(a,r){r&17&&e!==(e=Mo(a[4].day,a[0])+"")&&we(n,e)},d(a){a&&O(n)}}}function Mu(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Nu(t){let e,n=t[11].name+"",a,r;return{c(){e=T("option"),a=me(n),e.__value=r=t[13],e.value=e.__value},m(i,o){q(i,e,o),E(e,a)},p(i,o){o&64&&n!==(n=i[11].name+"")&&we(a,n)},d(i){i&&O(e)}}}function Iu(t){let e,n=!t[2]&&Ou(t);return{c(){e=T("div"),n&&n.c(),D(e,"class","setting-item-description svelte-uulo5f")},m(a,r){q(a,e,r),n&&n.m(e,null)},p(a,r){a[2]?n&&(n.d(1),n=null):n?n.p(a,r):(n=Ou(a),n.c(),n.m(e,null))},d(a){a&&O(e),n&&n.d()}}}function Ou(t){let e=No(t[4].month,t[0])+"",n;return{c(){n=me(e)},m(a,r){q(a,n,r)},p(a,r){r&17&&e!==(e=No(a[4].month,a[0])+"")&&we(n,e)},d(a){a&&O(n)}}}function qu(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Ru(t){let e,n=!t[1]&&Lu(t);return{c(){e=T("div"),n&&n.c(),D(e,"class","setting-item-description svelte-uulo5f")},m(a,r){q(a,e,r),n&&n.m(e,null)},p(a,r){a[1]?n&&(n.d(1),n=null):n?n.p(a,r):(n=Lu(a),n.c(),n.m(e,null))},d(a){a&&O(e),n&&n.d()}}}function Lu(t){let e=Io(t[4].year,t[0])+"",n;return{c(){n=me(e)},m(a,r){q(a,n,r)},p(a,r){r&17&&e!==(e=Io(a[4].year,a[0])+"")&&we(n,e)},d(a){a&&O(n)}}}function z2(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_,F,w,M,x,V,B=!t[3]&&Tu(t),H=t[5]&&Su(t),Y=!t[2]&&Mu(t),he=t[6].filter(Pu),oe=[];for(let Q=0;Qt[8].call(v)),pe(v,"invalid",!t[2]),D(u,"class","fantasy-calendar-date-field svelte-uulo5f"),D(S,"for",""),D(A,"class","warning-container"),D(w,"type","number"),D(w,"spellcheck","false"),D(w,"placeholder","Year"),D(w,"class","svelte-uulo5f"),pe(w,"invalid",!t[1]),D(C,"class","fantasy-calendar-date-field svelte-uulo5f"),D(e,"class","fantasy-calendar-date-field-container setting-item svelte-uulo5f")},m(Q,De){q(Q,e,De),E(e,n),E(n,a),E(a,r),E(a,i),B&&B.m(a,null),E(n,o),E(n,l),yt(l,t[4].day),E(n,s),H&&H.m(n,null),E(e,d),E(e,u),E(u,c),E(c,h),E(c,y),Y&&Y.m(c,null),E(u,m),E(u,v);for(let ve=0;vet.name;function Z2(t,e,n){let a,r,i,o,l,s,d;Xe("store").subscribe(m=>n(0,d=m));function c(){a.day=rn(this.value),n(4,a),n(0,d)}function h(){a.month=vn(this),n(4,a),n(0,d)}function y(){a.year=rn(this.value),n(4,a),n(0,d)}return t.$$.update=()=>{if(t.$$.dirty&1){e:n(4,a=d.current)}if(t.$$.dirty&1){e:n(6,r=d.static.months)}if(t.$$.dirty&17){e:n(3,i=Hn(a.day,d))}if(t.$$.dirty&17){e:n(2,o=Wn(a.month,d))}if(t.$$.dirty&17){e:n(1,l=Gn(a.year,d))}if(t.$$.dirty&14){e:n(5,s=!i||!o||!l)}},[d,l,o,i,a,s,r,c,h,y]}var ju=class extends de{constructor(e){super();fe(this,e,Z2,Y2,se,{},U2)}},Vu=ju;var mn=xe(require("obsidian"));var uc=xe(require("obsidian"));var ri=xe(require("obsidian"));var it="top",mt="bottom",dt="right",ft="left",Xr="auto",Bn=[it,mt,dt,ft],wn="start",Kn="end",Hu="clippingParents",Jr="viewport",_a="popper",Wu="reference",Oo=Bn.reduce(function(t,e){return t.concat([e+"-"+wn,e+"-"+Kn])},[]),$r=[].concat(Bn,[Xr]).reduce(function(t,e){return t.concat([e,e+"-"+wn,e+"-"+Kn])},[]),K2="beforeRead",Q2="read",X2="afterRead",J2="beforeMain",$2="main",ey="afterMain",ty="beforeWrite",ny="write",ay="afterWrite",Gu=[K2,Q2,X2,J2,$2,ey,ty,ny,ay];function vt(t){return t?(t.nodeName||"").toLowerCase():null}function ot(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Dn(t){var e=ot(t).Element;return t instanceof e||t instanceof Element}function bt(t){var e=ot(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function ei(t){if(typeof ShadowRoot=="undefined")return!1;var e=ot(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function ry(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var a=e.styles[n]||{},r=e.attributes[n]||{},i=e.elements[n];!bt(i)||!vt(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(o){var l=r[o];l===!1?i.removeAttribute(o):i.setAttribute(o,l===!0?"":l)}))})}function iy(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(a){var r=e.elements[a],i=e.attributes[a]||{},o=Object.keys(e.styles.hasOwnProperty(a)?e.styles[a]:n[a]),l=o.reduce(function(s,d){return s[d]="",s},{});!bt(r)||!vt(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(s){r.removeAttribute(s)}))})}}var Uu={name:"applyStyles",enabled:!0,phase:"write",fn:ry,effect:iy,requires:["computeStyles"]};function wt(t){return t.split("-")[0]}function Kt(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),a=1,r=1;return{width:n.width/a,height:n.height/r,top:n.top/r,right:n.right/a,bottom:n.bottom/r,left:n.left/a,x:n.left/a,y:n.top/r}}function Qn(t){var e=Kt(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-a)<=1&&(a=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function Ja(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&ei(n)){var a=e;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Ot(t){return ot(t).getComputedStyle(t)}function qo(t){return["table","td","th"].indexOf(vt(t))>=0}function Ct(t){return((Dn(t)?t.ownerDocument:t.document)||window.document).documentElement}function _n(t){return vt(t)==="html"?t:t.assignedSlot||t.parentNode||(ei(t)?t.host:null)||Ct(t)}function zu(t){return!bt(t)||Ot(t).position==="fixed"?null:t.offsetParent}function oy(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&bt(t)){var a=Ot(t);if(a.position==="fixed")return null}for(var r=_n(t);bt(r)&&["html","body"].indexOf(vt(r))<0;){var i=Ot(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function on(t){for(var e=ot(t),n=zu(t);n&&qo(n)&&Ot(n).position==="static";)n=zu(n);return n&&(vt(n)==="html"||vt(n)==="body"&&Ot(n).position==="static")?e:n||oy(t)||e}function Xn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Qt=Math.max,Mn=Math.min,$a=Math.round;function Jn(t,e,n){return Qt(t,Mn(e,n))}function er(){return{top:0,right:0,bottom:0,left:0}}function tr(t){return Object.assign({},er(),t)}function nr(t,e){return e.reduce(function(n,a){return n[a]=t,n},{})}var sy=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,tr(typeof e!="number"?e:nr(e,Bn))};function ly(t){var e,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,l=wt(n.placement),s=Xn(l),d=[ft,dt].indexOf(l)>=0,u=d?"height":"width";if(!(!i||!o)){var c=sy(r.padding,n),h=Qn(i),y=s==="y"?it:ft,m=s==="y"?mt:dt,v=n.rects.reference[u]+n.rects.reference[s]-o[s]-n.rects.popper[u],p=o[s]-n.rects.reference[s],k=on(i),C=k?s==="y"?k.clientHeight||0:k.clientWidth||0:0,A=v/2-p/2,S=c[y],_=C-h[u]-c[m],F=C/2-h[u]/2+A,w=Jn(S,F,_),M=s;n.modifiersData[a]=(e={},e[M]=w,e.centerOffset=w-F,e)}}function uy(t){var e=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||!Ja(e.elements.popper,r)||(e.elements.arrow=r))}var Yu={name:"arrow",enabled:!0,phase:"main",fn:ly,effect:uy,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xt(t){return t.split("-")[1]}var cy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function dy(t){var e=t.x,n=t.y,a=window,r=a.devicePixelRatio||1;return{x:$a($a(e*r)/r)||0,y:$a($a(n*r)/r)||0}}function Zu(t){var e,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,o=t.offsets,l=t.position,s=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,c=u===!0?dy(o):typeof u=="function"?u(o):o,h=c.x,y=h===void 0?0:h,m=c.y,v=m===void 0?0:m,p=o.hasOwnProperty("x"),k=o.hasOwnProperty("y"),C=ft,A=it,S=window;if(d){var _=on(n),F="clientHeight",w="clientWidth";_===ot(n)&&(_=Ct(n),Ot(_).position!=="static"&&l==="absolute"&&(F="scrollHeight",w="scrollWidth")),_=_,(r===it||(r===ft||r===dt)&&i===Kn)&&(A=mt,v-=_[F]-a.height,v*=s?1:-1),(r===ft||(r===it||r===mt)&&i===Kn)&&(C=dt,y-=_[w]-a.width,y*=s?1:-1)}var M=Object.assign({position:l},d&&cy);if(s){var x;return Object.assign({},M,(x={},x[A]=k?"0":"",x[C]=p?"0":"",x.transform=(S.devicePixelRatio||1)<=1?"translate("+y+"px, "+v+"px)":"translate3d("+y+"px, "+v+"px, 0)",x))}return Object.assign({},M,(e={},e[A]=k?v+"px":"",e[C]=p?y+"px":"",e.transform="",e))}function fy(t){var e=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,o=i===void 0?!0:i,l=n.roundOffsets,s=l===void 0?!0:l;if(!1)var d;var u={placement:wt(e.placement),variation:Xt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Zu(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:s})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Zu(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Ku={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:fy,data:{}};var ti={passive:!0};function hy(t){var e=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,o=a.resize,l=o===void 0?!0:o,s=ot(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&d.forEach(function(u){u.addEventListener("scroll",n.update,ti)}),l&&s.addEventListener("resize",n.update,ti),function(){i&&d.forEach(function(u){u.removeEventListener("scroll",n.update,ti)}),l&&s.removeEventListener("resize",n.update,ti)}}var Qu={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:hy,data:{}};var my={left:"right",right:"left",bottom:"top",top:"bottom"};function Ea(t){return t.replace(/left|right|bottom|top/g,function(e){return my[e]})}var py={start:"end",end:"start"};function ni(t){return t.replace(/start|end/g,function(e){return py[e]})}function $n(t){var e=ot(t),n=e.pageXOffset,a=e.pageYOffset;return{scrollLeft:n,scrollTop:a}}function ea(t){return Kt(Ct(t)).left+$n(t).scrollLeft}function Ro(t){var e=ot(t),n=Ct(t),a=e.visualViewport,r=n.clientWidth,i=n.clientHeight,o=0,l=0;return a&&(r=a.width,i=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,l=a.offsetTop)),{width:r,height:i,x:o+ea(t),y:l}}function Lo(t){var e,n=Ct(t),a=$n(t),r=(e=t.ownerDocument)==null?void 0:e.body,i=Qt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Qt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-a.scrollLeft+ea(t),s=-a.scrollTop;return Ot(r||n).direction==="rtl"&&(l+=Qt(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:l,y:s}}function ta(t){var e=Ot(t),n=e.overflow,a=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ai(t){return["html","body","#document"].indexOf(vt(t))>=0?t.ownerDocument.body:bt(t)&&ta(t)?t:ai(_n(t))}function Nn(t,e){var n;e===void 0&&(e=[]);var a=ai(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=ot(a),o=r?[i].concat(i.visualViewport||[],ta(a)?a:[]):a,l=e.concat(o);return r?l:l.concat(Nn(_n(o)))}function Ca(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gy(t){var e=Kt(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Xu(t,e){return e===Jr?Ca(Ro(t)):bt(e)?gy(e):Ca(Lo(Ct(t)))}function yy(t){var e=Nn(_n(t)),n=["absolute","fixed"].indexOf(Ot(t).position)>=0,a=n&&bt(t)?on(t):t;return Dn(a)?e.filter(function(r){return Dn(r)&&Ja(r,a)&&vt(r)!=="body"}):[]}function Po(t,e,n){var a=e==="clippingParents"?yy(t):[].concat(e),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(l,s){var d=Xu(t,s);return l.top=Qt(d.top,l.top),l.right=Mn(d.right,l.right),l.bottom=Mn(d.bottom,l.bottom),l.left=Qt(d.left,l.left),l},Xu(t,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function ar(t){var e=t.reference,n=t.element,a=t.placement,r=a?wt(a):null,i=a?Xt(a):null,o=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,s;switch(r){case it:s={x:o,y:e.y-n.height};break;case mt:s={x:o,y:e.y+e.height};break;case dt:s={x:e.x+e.width,y:l};break;case ft:s={x:e.x-n.width,y:l};break;default:s={x:e.x,y:e.y}}var d=r?Xn(r):null;if(d!=null){var u=d==="y"?"height":"width";switch(i){case wn:s[d]=s[d]-(e[u]/2-n[u]/2);break;case Kn:s[d]=s[d]+(e[u]/2-n[u]/2);break;default:}}return s}function sn(t,e){e===void 0&&(e={});var n=e,a=n.placement,r=a===void 0?t.placement:a,i=n.boundary,o=i===void 0?Hu:i,l=n.rootBoundary,s=l===void 0?Jr:l,d=n.elementContext,u=d===void 0?_a:d,c=n.altBoundary,h=c===void 0?!1:c,y=n.padding,m=y===void 0?0:y,v=tr(typeof m!="number"?m:nr(m,Bn)),p=u===_a?Wu:_a,k=t.rects.popper,C=t.elements[h?p:u],A=Po(Dn(C)?C:C.contextElement||Ct(t.elements.popper),o,s),S=Kt(t.elements.reference),_=ar({reference:S,element:k,strategy:"absolute",placement:r}),F=Ca(Object.assign({},k,_)),w=u===_a?F:S,M={top:A.top-w.top+v.top,bottom:w.bottom-A.bottom+v.bottom,left:A.left-w.left+v.left,right:w.right-A.right+v.right},x=t.modifiersData.offset;if(u===_a&&x){var V=x[r];Object.keys(M).forEach(function(B){var H=[dt,mt].indexOf(B)>=0?1:-1,Y=[it,mt].indexOf(B)>=0?"y":"x";M[B]+=V[Y]*H})}return M}function jo(t,e){e===void 0&&(e={});var n=e,a=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,d=s===void 0?$r:s,u=Xt(a),c=u?l?Oo:Oo.filter(function(m){return Xt(m)===u}):Bn,h=c.filter(function(m){return d.indexOf(m)>=0});h.length===0&&(h=c);var y=h.reduce(function(m,v){return m[v]=sn(t,{placement:v,boundary:r,rootBoundary:i,padding:o})[wt(v)],m},{});return Object.keys(y).sort(function(m,v){return y[m]-y[v]})}function vy(t){if(wt(t)===Xr)return[];var e=Ea(t);return[ni(t),e,ni(e)]}function by(t){var e=t.state,n=t.options,a=t.name;if(!e.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,l=o===void 0?!0:o,s=n.fallbackPlacements,d=n.padding,u=n.boundary,c=n.rootBoundary,h=n.altBoundary,y=n.flipVariations,m=y===void 0?!0:y,v=n.allowedAutoPlacements,p=e.options.placement,k=wt(p),C=k===p,A=s||(C||!m?[Ea(p)]:vy(p)),S=[p].concat(A).reduce(function(at,Pe){return at.concat(wt(Pe)===Xr?jo(e,{placement:Pe,boundary:u,rootBoundary:c,padding:d,flipVariations:m,allowedAutoPlacements:v}):Pe)},[]),_=e.rects.reference,F=e.rects.popper,w=new Map,M=!0,x=S[0],V=0;V=0,oe=he?"width":"height",ce=sn(e,{placement:B,boundary:u,rootBoundary:c,altBoundary:h,padding:d}),Z=he?Y?dt:ft:Y?mt:it;_[oe]>F[oe]&&(Z=Ea(Z));var z=Ea(Z),Q=[];if(i&&Q.push(ce[H]<=0),l&&Q.push(ce[Z]<=0,ce[z]<=0),Q.every(function(at){return at})){x=B,M=!1;break}w.set(B,Q)}if(M)for(var De=m?3:1,ve=function(Pe){var gt=S.find(function(xt){var Je=w.get(xt);if(Je)return Je.slice(0,Pe).every(function(Fe){return Fe})});if(gt)return x=gt,"break"},Ne=De;Ne>0;Ne--){var je=ve(Ne);if(je==="break")break}e.placement!==x&&(e.modifiersData[a]._skip=!0,e.placement=x,e.reset=!0)}}var Ju={name:"flip",enabled:!0,phase:"main",fn:by,requiresIfExists:["offset"],data:{_skip:!1}};function $u(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function ec(t){return[it,dt,mt,ft].some(function(e){return t[e]>=0})}function wy(t){var e=t.state,n=t.name,a=e.rects.reference,r=e.rects.popper,i=e.modifiersData.preventOverflow,o=sn(e,{elementContext:"reference"}),l=sn(e,{altBoundary:!0}),s=$u(o,a),d=$u(l,r,i),u=ec(s),c=ec(d);e.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:c},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":c})}var tc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:wy};function Dy(t,e,n){var a=wt(t),r=[ft,it].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=i[0],l=i[1];return o=o||0,l=(l||0)*r,[ft,dt].indexOf(a)>=0?{x:l,y:o}:{x:o,y:l}}function _y(t){var e=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,o=$r.reduce(function(u,c){return u[c]=Dy(c,e.rects,i),u},{}),l=o[e.placement],s=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=s,e.modifiersData.popperOffsets.y+=d),e.modifiersData[a]=o}var nc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_y};function Ey(t){var e=t.state,n=t.name;e.modifiersData[n]=ar({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var ac={name:"popperOffsets",enabled:!0,phase:"read",fn:Ey,data:{}};function Vo(t){return t==="x"?"y":"x"}function Cy(t){var e=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,l=o===void 0?!1:o,s=n.boundary,d=n.rootBoundary,u=n.altBoundary,c=n.padding,h=n.tether,y=h===void 0?!0:h,m=n.tetherOffset,v=m===void 0?0:m,p=sn(e,{boundary:s,rootBoundary:d,padding:c,altBoundary:u}),k=wt(e.placement),C=Xt(e.placement),A=!C,S=Xn(k),_=Vo(S),F=e.modifiersData.popperOffsets,w=e.rects.reference,M=e.rects.popper,x=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,V={x:0,y:0};if(!!F){if(i||l){var B=S==="y"?it:ft,H=S==="y"?mt:dt,Y=S==="y"?"height":"width",he=F[S],oe=F[S]+p[B],ce=F[S]-p[H],Z=y?-M[Y]/2:0,z=C===wn?w[Y]:M[Y],Q=C===wn?-M[Y]:-w[Y],De=e.elements.arrow,ve=y&&De?Qn(De):{width:0,height:0},Ne=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:er(),je=Ne[B],at=Ne[H],Pe=Jn(0,w[Y],ve[Y]),gt=A?w[Y]/2-Z-Pe-je-x:z-Pe-je-x,xt=A?-w[Y]/2+Z+Pe+at+x:Q+Pe+at+x,Je=e.elements.arrow&&on(e.elements.arrow),Fe=Je?S==="y"?Je.clientTop||0:Je.clientLeft||0:0,Ve=e.modifiersData.offset?e.modifiersData.offset[e.placement][S]:0,Rt=F[S]+gt-Ve-Fe,Gt=F[S]+xt-Ve;if(i){var Ft=Jn(y?Mn(oe,Rt):oe,he,y?Qt(ce,Gt):ce);F[S]=Ft,V[S]=Ft-he}if(l){var Mt=S==="x"?it:ft,gn=S==="x"?mt:dt,Ut=F[_],tn=Ut+p[Mt],sa=Ut-p[gn],la=Jn(y?Mn(tn,Rt):tn,Ut,y?Qt(sa,Gt):sa);F[_]=la,V[_]=la-Ut}}e.modifiersData[a]=V}}var rc={name:"preventOverflow",enabled:!0,phase:"main",fn:Cy,requiresIfExists:["offset"]};function Ho(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Wo(t){return t===ot(t)||!bt(t)?$n(t):Ho(t)}function Ay(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,a=e.height/t.offsetHeight||1;return n!==1||a!==1}function Go(t,e,n){n===void 0&&(n=!1);var a=bt(e),r=bt(e)&&Ay(e),i=Ct(e),o=Kt(t,r),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&((vt(e)!=="body"||ta(i))&&(l=Wo(e)),bt(e)?(s=Kt(e,!0),s.x+=e.clientLeft,s.y+=e.clientTop):i&&(s.x=ea(i))),{x:o.left+l.scrollLeft-s.x,y:o.top+l.scrollTop-s.y,width:o.width,height:o.height}}function ky(t){var e=new Map,n=new Set,a=[];t.forEach(function(i){e.set(i.name,i)});function r(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var s=e.get(l);s&&r(s)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function Uo(t){var e=ky(t);return Gu.reduce(function(n,a){return n.concat(e.filter(function(r){return r.phase===a}))},[])}function zo(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Yo(t){var e=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(e).map(function(n){return e[n]})}var ic={placement:"bottom",modifiers:[],strategy:"absolute"};function oc(){for(var t=arguments.length,e=new Array(t),n=0;n(this.setSelectedItem(this.selectedItem-1,!0),!1)),a.register([],"ArrowDown",()=>(this.setSelectedItem(this.selectedItem+1,!0),!1)),a.register([],"Enter",r=>(this.useSelectedItem(r),!1)),a.register([],"Tab",r=>(this.chooseSuggestion(r),!1))}chooseSuggestion(e){if(!this.items||!this.items.length)return;let n=this.items[this.selectedItem];n&&this.owner.onChooseSuggestion(n,e)}onSuggestionClick(e,n){if(e.preventDefault(),!this.suggestions||!this.suggestions.length)return;let a=this.suggestions.indexOf(n);this.setSelectedItem(a,!1),this.useSelectedItem(e)}onSuggestionMouseover(e,n){if(!this.suggestions||!this.suggestions.length)return;let a=this.suggestions.indexOf(n);this.setSelectedItem(a,!1)}empty(){this.containerEl.empty()}setSuggestions(e){this.containerEl.empty();let n=[];e.forEach(a=>{let r=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(a,r),n.push(r)}),this.items=e,this.suggestions=n,this.setSelectedItem(0,!1)}useSelectedItem(e){if(!this.items||!this.items.length)return;let n=this.items[this.selectedItem];n&&this.owner.selectSuggestion(n,e)}wrap(e,n){return(e%n+n)%n}setSelectedItem(e,n){let a=this.wrap(e,this.suggestions.length),r=this.suggestions[this.selectedItem],i=this.suggestions[a];r&&r.removeClass("is-selected"),i&&i.addClass("is-selected"),this.selectedItem=a,n&&i.scrollIntoView(!1)}},rr=class extends ri.FuzzySuggestModal{constructor(e,n,a){super(e);this.items=[];this.scope=new ri.Scope;this.emptyStateText="No match found";this.limit=100;this.inputEl=n,this.items=a,this.suggestEl=createDiv("suggestion-container"),this.contentEl=this.suggestEl.createDiv("suggestion"),this.suggester=new lc(this,this.contentEl,this.scope),this.scope.register([],"Escape",this.onEscape.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onFocus.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",r=>{r.preventDefault()})}empty(){this.suggester.empty()}onInputChanged(){if(this.shouldNotOpen)return;let e=this.modifyInput(this.inputEl.value),n=this.getSuggestions(e);n.length>0?this.suggester.setSuggestions(n.slice(0,this.limit)):this.onNoSuggestion(),this.open()}onFocus(){this.shouldNotOpen=!1,this.onInputChanged()}modifyInput(e){return e}onNoSuggestion(){this.empty(),this.renderSuggestion(null,this.contentEl.createDiv("suggestion-item"))}open(){this.app.keymap.pushScope(this.scope),document.body.appendChild(this.suggestEl),this.popper=Zo(this.inputEl,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"flip",options:{fallbackPlacements:["top"]}}]})}onEscape(){this.close(),this.shouldNotOpen=!0}close(){this.app.keymap.popScope(this.scope),this.suggester.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}createPrompt(e){this.promptEl||(this.promptEl=this.suggestEl.createDiv("prompt-instructions"));let n=this.promptEl.createDiv("prompt-instruction");for(let a of e)n.appendChild(a)}};var ir=class extends rr{constructor(e,n,a){super(e,n.inputEl,a);this.folders=[...a],this.text=n,this.inputEl.addEventListener("input",()=>this.getFolder())}getFolder(){let e=this.inputEl.value,n=this.app.vault.getAbstractFileByPath(e);n!=this.folder&&n instanceof uc.TFolder&&(this.folder=n,this.onInputChanged())}getItemText(e){return e.path}onChooseItem(e){this.text.setValue(e.path),this.folder=e}selectSuggestion({item:e}){let n=e.path;this.text.setValue(n),this.onClose(),this.close()}renderSuggestion(e,n){let{item:a,match:r}=e||{},i=n.createDiv({cls:"suggestion-content"});if(!a){i.setText(this.emptyStateText),i.parentElement.addClass("is-selected");return}let o=a.path.length-a.name.length,l=r.matches.map(s=>createSpan("suggestion-highlight"));for(let s=o;su[0]===s);if(d){let u=l[r.matches.indexOf(d)];i.appendChild(u),u.appendText(a.path.substring(d[0],d[1])),s+=d[1]-d[0]-1;continue}i.appendText(a.path[s])}n.createDiv({cls:"suggestion-note",text:a.path})}getItems(){return this.folders}};function Fy(t){be(t,"svelte-1ezzfh1",".text-area-component.svelte-1ezzfh1{display:flex;flex-flow:column nowrap;align-items:flex-start;width:100%}textarea.svelte-1ezzfh1{width:100%}")}function Ty(t){let e,n,a,r,i,o,l;return{c(){e=T("div"),n=T("label"),a=me(t[1]),r=j(),i=T("textarea"),D(i,"spellcheck","false"),D(i,"placeholder",t[2]),D(i,"class","svelte-1ezzfh1"),D(e,"class","text-area-component setting-item svelte-1ezzfh1"),pe(e,"cls",t[3])},m(s,d){q(s,e,d),E(e,n),E(n,a),E(e,r),E(e,i),yt(i,t[0]),o||(l=[ie(i,"input",t[5]),ie(i,"blur",t[6])],o=!0)},p(s,[d]){d&2&&we(a,s[1]),d&4&&D(i,"placeholder",s[2]),d&1&&yt(i,s[0]),d&8&&pe(e,"cls",s[3])},i:X,o:X,d(s){s&&O(e),o=!1,_e(l)}}}function Sy(t,e,n){let a=Se(),{value:r}=e,{name:i}=e,{placeholder:o=i}=e,{cls:l=""}=e;function s(){r=this.value,n(0,r)}let d=()=>a("blur",r);return t.$$set=u=>{"value"in u&&n(0,r=u.value),"name"in u&&n(1,i=u.name),"placeholder"in u&&n(2,o=u.placeholder),"cls"in u&&n(3,l=u.cls)},[r,i,o,l,a,s,d]}var cc=class extends de{constructor(e){super();fe(this,e,Sy,Ty,se,{value:0,name:1,placeholder:2,cls:3},Fy)}},dc=cc;function By(t){be(t,"svelte-9iftg2","input.warn.svelte-9iftg2{border-color:var(--text-error)}")}function fc(t){let e;function n(i,o){return typeof i[4]=="string"?Ny:My}let a=n(t,-1),r=a(t);return{c(){r.c(),e=Ue()},m(i,o){r.m(i,o),q(i,e,o)},p(i,o){a===(a=n(i,o))&&r?r.p(i,o):(r.d(1),r=a(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){r.d(i),i&&O(e)}}}function My(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","setting-item-description")},m(i,o){q(i,e,o),a||(r=le(n=t[7].call(null,e)),a=!0)},p:X,d(i){i&&O(e),a=!1,r()}}}function Ny(t){let e,n;return{c(){e=T("div"),n=me(t[4]),D(e,"class","setting-item-description")},m(a,r){q(a,e,r),E(e,n)},p(a,r){r&16&&we(n,a[4])},d(a){a&&O(e)}}}function hc(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Iy(t){let e,n,a;return{c(){e=T("input"),D(e,"type","number"),D(e,"spellcheck","false"),D(e,"placeholder",t[5]),D(e,"class","svelte-9iftg2"),pe(e,"warn",t[2])},m(r,i){q(r,e,i),yt(e,t[0]),n||(a=[ie(e,"input",t[12]),ie(e,"blur",t[13])],n=!0)},p(r,i){i&32&&D(e,"placeholder",r[5]),i&1&&rn(e.value)!==r[0]&&yt(e,r[0]),i&4&&pe(e,"warn",r[2])},d(r){r&&O(e),n=!1,_e(a)}}}function Oy(t){let e,n,a;return{c(){e=T("input"),D(e,"type","text"),D(e,"spellcheck","false"),D(e,"placeholder",t[5]),D(e,"class","svelte-9iftg2"),pe(e,"warn",t[2])},m(r,i){q(r,e,i),yt(e,t[0]),n||(a=[ie(e,"input",t[10]),ie(e,"blur",t[11])],n=!0)},p(r,i){i&32&&D(e,"placeholder",r[5]),i&1&&e.value!==r[0]&&yt(e,r[0]),i&4&&pe(e,"warn",r[2])},d(r){r&&O(e),n=!1,_e(a)}}}function qy(t){let e,n,a=t[2]&&hc(t);function r(l,s){if(l[3]=="text")return Oy;if(l[3]=="number")return Iy}let i=r(t,-1),o=i&&i(t);return{c(){a&&a.c(),e=j(),o&&o.c(),n=Ue()},m(l,s){a&&a.m(l,s),q(l,e,s),o&&o.m(l,s),q(l,n,s)},p(l,s){l[2]?a||(a=hc(l),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),i===(i=r(l,s))&&o?o.p(l,s):(o&&o.d(1),o=i&&i(l),o&&(o.c(),o.m(n.parentNode,n)))},d(l){a&&a.d(l),l&&O(e),o&&o.d(l),l&&O(n)}}}function Ry(t){let e,n,a,r,i,o,l,s,d,u=t[4]&&fc(t),c=t[9].default,h=Pr(c,t,t[8],null),y=h||qy(t);return{c(){e=T("div"),n=T("div"),a=T("div"),r=me(t[1]),i=j(),u&&u.c(),o=j(),l=T("div"),s=T("div"),y&&y.c(),D(a,"class","setting-item-name"),D(n,"class","setting-item-info"),D(s,"class","warning-container"),D(l,"class","setting-item-control"),D(e,"class","setting-item")},m(m,v){q(m,e,v),E(e,n),E(n,a),E(a,r),E(n,i),u&&u.m(n,null),E(e,o),E(e,l),E(l,s),y&&y.m(s,null),d=!0},p(m,[v]){(!d||v&2)&&we(r,m[1]),m[4]?u?u.p(m,v):(u=fc(m),u.c(),u.m(n,null)):u&&(u.d(1),u=null),h?h.p&&(!d||v&256)&&Vr(h,c,m,m[8],d?jr(c,m[8],v,null):Hr(m[8]),null):y&&y.p&&(!d||v&45)&&y.p(m,d?v:-1)},i(m){d||(R(y,m),d=!0)},o(m){W(y,m),d=!1},d(m){m&&O(e),u&&u.d(),y&&y.d(m)}}}function Ly(t,e,n){let{$$slots:a={},$$scope:r}=e,i=Se(),{value:o}=e,{name:l}=e,{warn:s=!1}=e,{type:d="text"}=e,{desc:u}=e,{placeholder:c=l}=e,h=k=>{k.append(u.cloneNode(!0))};function y(){o=this.value,n(0,o)}let m=()=>{i("blur",o)};function v(){o=rn(this.value),n(0,o)}let p=()=>{i("blur",o)};return t.$$set=k=>{"value"in k&&n(0,o=k.value),"name"in k&&n(1,l=k.name),"warn"in k&&n(2,s=k.warn),"type"in k&&n(3,d=k.type),"desc"in k&&n(4,u=k.desc),"placeholder"in k&&n(5,c=k.placeholder),"$$scope"in k&&n(8,r=k.$$scope)},[o,l,s,d,u,c,i,h,r,a,y,m,v,p]}var mc=class extends de{constructor(e){super();fe(this,e,Ly,Ry,se,{value:0,name:1,warn:2,type:3,desc:4,placeholder:5},By)}},En=mc;function pc(t){let e;function n(i,o){return typeof i[1]=="string"?jy:Py}let a=n(t,-1),r=a(t);return{c(){r.c(),e=Ue()},m(i,o){r.m(i,o),q(i,e,o)},p(i,o){a===(a=n(i,o))&&r?r.p(i,o):(r.d(1),r=a(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){r.d(i),i&&O(e)}}}function Py(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","setting-item-description")},m(i,o){q(i,e,o),a||(r=le(n=t[4].call(null,e)),a=!0)},p:X,d(i){i&&O(e),a=!1,r()}}}function jy(t){let e,n;return{c(){e=T("div"),n=me(t[1]),D(e,"class","setting-item-description")},m(a,r){q(a,e,r),E(e,n)},p(a,r){r&2&&we(n,a[1])},d(a){a&&O(e)}}}function Vy(t){let e,n,a,r,i,o,l,s,d,u,c=t[1]&&pc(t);return{c(){e=T("div"),n=T("div"),a=T("div"),r=me(t[0]),i=j(),c&&c.c(),o=j(),l=T("div"),s=T("div"),D(a,"class","setting-item-name"),D(n,"class","setting-item-info"),D(s,"class","checkbox-container"),pe(s,"is-disabled",t[3]),pe(s,"is-enabled",t[2]),D(l,"class","setting-item-control"),D(e,"class","setting-item mod-toggle")},m(h,y){q(h,e,y),E(e,n),E(n,a),E(a,r),E(n,i),c&&c.m(n,null),E(e,o),E(e,l),E(l,s),d||(u=ie(s,"click",t[5]),d=!0)},p(h,[y]){y&1&&we(r,h[0]),h[1]?c?c.p(h,y):(c=pc(h),c.c(),c.m(n,null)):c&&(c.d(1),c=null),y&8&&pe(s,"is-disabled",h[3]),y&4&&pe(s,"is-enabled",h[2])},i:X,o:X,d(h){h&&O(e),c&&c.d(),d=!1,u()}}}function Hy(t,e,n){let{name:a}=e,{desc:r}=e,{value:i}=e,{disabled:o=!1}=e,l=d=>{d.append(r)};function s(d){ue.call(this,t,d)}return t.$$set=d=>{"name"in d&&n(0,a=d.name),"desc"in d&&n(1,r=d.desc),"value"in d&&n(2,i=d.value),"disabled"in d&&n(3,o=d.disabled)},[a,r,i,o,l,s]}var gc=class extends de{constructor(e){super();fe(this,e,Hy,Vy,se,{name:0,desc:1,value:2,disabled:3})}},Tt=gc;function Wy(t){be(t,"svelte-1uda69j",".fantasy-calendar-info.svelte-1uda69j .setting-item{padding-top:18px}.fantasy-calendar-info.svelte-1uda69j .fantasy-calendar-description{display:flex;flex-flow:column;align-items:flex-start}.fantasy-calendar-info.svelte-1uda69j .fantasy-calendar-description textarea{width:100%}")}function yc(t){let e,n,a,r,i,o;e=new En({props:{name:"Events Folder",desc:"The plugin will only parse files in this folder for events.",value:t[0].path,$$slots:{default:[Gy]},$$scope:{ctx:t}}}),a=new Tt({props:{name:"Support Timelines Events",desc:t[2],value:t[3]}}),a.$on("click",t[17]);let l=t[3]&&vc(t);return{c(){te(e.$$.fragment),n=j(),te(a.$$.fragment),r=j(),l&&l.c(),i=Ue()},m(s,d){ee(e,s,d),q(s,n,d),ee(a,s,d),q(s,r,d),l&&l.m(s,d),q(s,i,d),o=!0},p(s,d){let u={};d&1&&(u.value=s[0].path),d&262144&&(u.$$scope={dirty:d,ctx:s}),e.$set(u);let c={};d&4&&(c.desc=s[2]),d&8&&(c.value=s[3]),a.$set(c),s[3]?l?(l.p(s,d),d&8&&R(l,1)):(l=vc(s),l.c(),R(l,1),l.m(i.parentNode,i)):l&&(Ee(),W(l,1,1,()=>{l=null}),Ce())},i(s){o||(R(e.$$.fragment,s),R(a.$$.fragment,s),R(l),o=!0)},o(s){W(e.$$.fragment,s),W(a.$$.fragment,s),W(l),o=!1},d(s){J(e,s),s&&O(n),J(a,s),s&&O(r),l&&l.d(s),s&&O(i)}}}function Gy(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=t[9].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function vc(t){let e=t[0].syncTimelines,n,a,r=bc(t);return{c(){r.c(),n=Ue()},m(i,o){r.m(i,o),q(i,n,o),a=!0},p(i,o){o&1&&se(e,e=i[0].syncTimelines)?(Ee(),W(r,1,1,X),Ce(),r=bc(i),r.c(),R(r),r.m(n.parentNode,n)):r.p(i,o)},i(i){a||(R(r),a=!0)},o(i){W(r),a=!1},d(i){i&&O(n),r.d(i)}}}function Uy(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","setting-item-control")},m(i,o){q(i,e,o),a||(r=le(n=t[10].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function bc(t){let e,n;return e=new En({props:{name:"Default Timelines Tag",desc:t[1],value:"",$$slots:{default:[Uy]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.desc=a[1]),r&262144&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function zy(t){let e,n,a,r,i,o,l,s,d,u,c,h;n=new En({props:{name:"Calendar Name",warn:!t[5],desc:t[5]?"":"The calendar must have a name",value:t[0].name}}),n.$on("blur",t[12]),r=new dc({props:{name:"Calendar Description",value:t[0].description}}),r.$on("blur",t[13]),o=new Tt({props:{name:"Display Day Number",desc:"Display day of year in Day View",value:t[7]}}),o.$on("click",t[14]),s=new Tt({props:{name:"Auto Increment Day",desc:"Automatically increment the current day every real-world day.",value:t[6]}}),s.$on("click",t[15]),u=new Tt({props:{name:"Parse Files for Events",desc:"The plugin will automatically parse files in the vault for events.",value:t[4]}}),u.$on("click",t[16]);let y=t[4]&&yc(t);return{c(){e=T("div"),te(n.$$.fragment),a=j(),te(r.$$.fragment),i=j(),te(o.$$.fragment),l=j(),te(s.$$.fragment),d=j(),te(u.$$.fragment),c=j(),y&&y.c(),D(e,"class","fantasy-calendar-info svelte-1uda69j")},m(m,v){q(m,e,v),ee(n,e,null),E(e,a),ee(r,e,null),E(e,i),ee(o,e,null),E(e,l),ee(s,e,null),E(e,d),ee(u,e,null),E(e,c),y&&y.m(e,null),h=!0},p(m,v){let p={};v&32&&(p.warn=!m[5]),v&32&&(p.desc=m[5]?"":"The calendar must have a name"),v&1&&(p.value=m[0].name),n.$set(p);let k={};v&1&&(k.value=m[0].description),r.$set(k);let C={};v&128&&(C.value=m[7]),o.$set(C);let A={};v&64&&(A.value=m[6]),s.$set(A);let S={};v&16&&(S.value=m[4]),u.$set(S),m[4]?y?(y.p(m,v),v&16&&R(y,1)):(y=yc(m),y.c(),R(y,1),y.m(e,null)):y&&(Ee(),W(y,1,1,()=>{y=null}),Ce())},i(m){h||(R(n.$$.fragment,m),R(r.$$.fragment,m),R(o.$$.fragment,m),R(s.$$.fragment,m),R(u.$$.fragment,m),R(y),h=!0)},o(m){W(n.$$.fragment,m),W(r.$$.fragment,m),W(o.$$.fragment,m),W(s.$$.fragment,m),W(u.$$.fragment,m),W(y),h=!1},d(m){m&&O(e),J(n),J(r),J(o),J(s),J(u),y&&y.d()}}}function Yy(t){let e,n;return e=new ct({props:{name:"Basic Info",warn:!t[5],label:"The calendar must have a name",$$slots:{default:[zy]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&32&&(i.warn=!a[5]),r&262399&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Zy(t,e,n){let a,r,i,o,l,s,d,{plugin:u}=e,{calendar:c}=e,h=Xe("store");h.subscribe(_=>n(0,c=_)),c.timelineTag||(c.timelineTag=or.timelineTag);let y=_=>{let F=u.app.vault.getAllLoadedFiles().filter(x=>x instanceof mn.TFolder),w=new mn.TextComponent(_);c.path||n(0,c.path="/",c),w.setPlaceholder(c.path??"/");let M=new ir(u.app,w,[...F]);M.onClose=async()=>{let x=w.inputEl.value?.trim()?w.inputEl.value.trim():"/";n(0,c.path=(0,mn.normalizePath)(x),c)},w.inputEl.onblur=async()=>{let x=w.inputEl.value?.trim()?w.inputEl.value.trim():"/";n(0,c.path=(0,mn.normalizePath)(x),c)}},m=_=>{new mn.TextComponent(_).setValue(`${c.timelineTag??""}`.replace("#","")).setDisabled(c.syncTimelines).onChange(M=>{n(0,c.timelineTag=M.startsWith("#")?M:`#${M}`,c),u.saveSettings()});let w=new mn.ExtraButtonComponent(_);if(!u.canUseTimelines){n(0,c.syncTimelines=!1,c),w.extraSettingsEl.detach();return}c.syncTimelines?w.setIcon("checkmark").setTooltip("Unsync from Timelines Plugin").onClick(async()=>{n(0,c.syncTimelines=!1,c),await u.saveSettings()}):w.setIcon("sync").setTooltip("Sync with Timelines Plugin").onClick(async()=>{n(0,c.syncTimelines=!0,c),n(0,c.timelineTag=u.app.plugins.getPlugin("obsidian-timelines").settings.timelineTag,c),await u.saveSettings()})},v=_=>{n(0,c.name=_.detail,c),h.set(c)},p=_=>n(0,c.description=_.detail,c),k=()=>{n(0,c.static.displayDayNumber=!c.static.displayDayNumber,c)},C=()=>{n(0,c.static.incrementDay=!c.static.incrementDay,c)},A=()=>{n(0,c.autoParse=!c.autoParse,c)},S=()=>{n(0,c.supportTimelines=!c.supportTimelines,c)};t.$$set=_=>{"plugin"in _&&n(11,u=_.plugin),"calendar"in _&&n(0,c=_.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(7,a=c.static.displayDayNumber)}if(t.$$.dirty&1){e:n(6,r=c.static.incrementDay)}if(t.$$.dirty&1){e:n(5,i=c.name!=null&&c.name.length)}if(t.$$.dirty&1){e:n(4,o=c.autoParse)}if(t.$$.dirty&1){e:n(3,l=c.supportTimelines)}};e:n(2,s=createFragment(_=>{_.createSpan({text:"Support "}),_.createEl("code",{text:""}),_.createSpan({text:" elements used by the "}),_.createEl("a",{text:"Obsidian Timelines",href:"obsidian://show-plugin?id=obsidian-timelines"}),_.createSpan({text:" plugin (by Darakah)."})}));e:n(1,d=createFragment(_=>{_.createSpan({text:"Tag to specify which notes to include in created timelines, e.g. "}),_.createEl("code",{text:"timeline"}),_.createSpan({text:" to use the "}),_.createEl("code",{text:"#timeline"}),_.createSpan({text:" tag."})}));return[c,d,s,l,o,i,r,a,h,y,m,u,v,p,k,C,A,S]}var wc=class extends de{constructor(e){super();fe(this,e,Zy,Yy,se,{plugin:11,calendar:0},Wy)}},Dc=wc;function Aa(t,{from:e,to:n},a={}){let r=getComputedStyle(t),i=r.transform==="none"?"":r.transform,[o,l]=r.transformOrigin.split(" ").map(parseFloat),s=e.left+e.width*o/n.width-(n.left+o),d=e.top+e.height*l/n.height-(n.top+l),{delay:u=0,duration:c=y=>Math.sqrt(y)*120,easing:h=Kr}=a;return{delay:u,duration:rt(c)?c(Math.sqrt(s*s+d*d)):c,easing:h,css:(y,m)=>{let v=m*s,p=m*d,k=y+m*e.width/n.width,C=y+m*e.height/n.height;return`transform: ${i} translate(${v}px, ${p}px) scale(${k}, ${C});`}}}function sr(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sr=function(e){return typeof e}:sr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sr(t)}function lr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function na(t){for(var e=1;e=0)&&(n[r]=t[r]);return n}function Qy(t,e){if(t==null)return{};var n=Ky(t,e),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0)&&(!Object.prototype.propertyIsEnumerable.call(t,a)||(n[a]=t[a]))}return n}function Xy(t,e){return $y(t)||tv(t,e)||Ko(t,e)||av()}function ii(t){return Jy(t)||ev(t)||Ko(t)||nv()}function Jy(t){if(Array.isArray(t))return Qo(t)}function $y(t){if(Array.isArray(t))return t}function ev(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}function tv(t,e){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(t)))){var n=[],a=!0,r=!1,i=void 0;try{for(var o=t[Symbol.iterator](),l;!(a=(l=o.next()).done)&&(n.push(l.value),!(e&&n.length===e));a=!0);}catch(s){r=!0,i=s}finally{try{!a&&o.return!=null&&o.return()}finally{if(r)throw i}}return n}}function Ko(t,e){if(!!t){if(typeof t=="string")return Qo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qo(t,e)}}function Qo(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(s){throw s},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,l;return{s:function(){n=t[Symbol.iterator]()},n:function(){var s=n.next();return i=s.done,s},e:function(s){o=!0,l=s},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}}}var rv="finalize",iv="consider";function ka(t,e,n){t.dispatchEvent(new CustomEvent(rv,{detail:{items:e,info:n}}))}function In(t,e,n){t.dispatchEvent(new CustomEvent(iv,{detail:{items:e,info:n}}))}var oi="draggedEntered",ur="draggedLeft",si="draggedOverIndex",Jo="draggedLeftDocument",li={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function ov(t,e,n){t.dispatchEvent(new CustomEvent(oi,{detail:{indexObj:e,draggedEl:n}}))}function sv(t,e,n){t.dispatchEvent(new CustomEvent(ur,{detail:{draggedEl:e,type:li.LEFT_FOR_ANOTHER,theOtherDz:n}}))}function lv(t,e){t.dispatchEvent(new CustomEvent(ur,{detail:{draggedEl:e,type:li.OUTSIDE_OF_ANY}}))}function uv(t,e,n){t.dispatchEvent(new CustomEvent(si,{detail:{indexObj:e,draggedEl:n}}))}function cv(t){window.dispatchEvent(new CustomEvent(Jo,{detail:{draggedEl:t}}))}var st={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:oi,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:si,DRAGGED_LEFT:ur,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},nt={POINTER:"pointer",KEYBOARD:"keyboard"},ui="isDndShadowItem",$o="data-is-dnd-shadow-item",es="id:dnd-shadow-placeholder-0000",dv="dnd-action-dragged-el",Dt="id",ts=0;function Ec(){ts++}function Cc(){if(ts===0)throw new Error("Bug! trying to decrement when there are no dropzones");ts--}var fv=typeof window=="undefined",Be=function(){};function Ac(t){var e,n=t.getBoundingClientRect(),a=getComputedStyle(t),r=a.transform;if(r){var i,o,l,s;if(r.startsWith("matrix3d("))e=r.slice(9,-1).split(/, /),i=+e[0],o=+e[5],l=+e[12],s=+e[13];else if(r.startsWith("matrix("))e=r.slice(7,-1).split(/, /),i=+e[0],o=+e[3],l=+e[4],s=+e[5];else return n;var d=a.transformOrigin,u=n.x-l-(1-i)*parseFloat(d),c=n.y-s-(1-o)*parseFloat(d.slice(d.indexOf(" ")+1)),h=i?n.width/i:t.offsetWidth,y=o?n.height/o:t.offsetHeight;return{x:u,y:c,width:h,height:y,top:c,right:u+h,bottom:c+y,left:u}}else return n}function kc(t){var e=Ac(t);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function ns(t){var e=t.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function xc(t){return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function hv(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function as(t,e){return t.y<=e.bottom&&t.y>=e.top&&t.x>=e.left&&t.x<=e.right}function cr(t){return xc(ns(t))}function Fc(t,e){var n=cr(t),a=kc(e);return as(n,a)}function mv(t,e){var n=cr(t),a=cr(e);return hv(n,a)}function pv(t){var e=ns(t);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}function gv(t,e){var n=ns(e);return as(t,n)?{top:t.y-n.top,bottom:n.bottom-t.y,left:t.x-n.left,right:Math.min(n.right,document.documentElement.clientWidth)-t.x}:null}var xa;function Tc(){Be(function(){return"resetting indexes cache"}),xa=new Map}Tc();function yv(t){var e=Array.from(t.children).findIndex(function(n){return n.getAttribute($o)});if(e>=0)return xa.has(t)||xa.set(t,new Map),xa.get(t).set(e,kc(t.children[e])),e}function vv(t,e){if(!Fc(t,e))return null;var n=e.children;if(n.length===0)return{index:0,isProximityBased:!0};for(var a=yv(e),r=0;ro.clientHeight&&(l.bottomo.clientWidth&&(l.right1&&arguments[1]!==void 0?arguments[1]:0;return t.parentElement?Mc(t.parentElement,e+1):e-1}function bv(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!{}.hasOwnProperty.call(e,n)||e[n]!==t[n])return!1;return!0}function wv(t,e){if(t.length!==e.length)return!1;for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:Dv,a,r,i=!1,o,l=Array.from(e).sort(function(d,u){return Bc(u)-Bc(d)});function s(){var d=cr(t),u=_v(d,a);if(!u&&o&&Math.abs(o.x-d.x)1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(a){var r=e(a);Object.keys(r).forEach(function(i){a.style[i]=r[i]}),n(a).forEach(function(i){return a.classList.add(i)})})}function hi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(a){var r=e(a);Object.keys(r).forEach(function(i){a.style[i]=""}),n(a).forEach(function(i){return a.classList.contains(i)&&a.classList.remove(i)})})}function Pv(t){var e=t.style.minHeight;t.style.minHeight=window.getComputedStyle(t).getPropertyValue("height");var n=t.style.minWidth;return t.style.minWidth=window.getComputedStyle(t).getPropertyValue("width"),function(){t.style.minHeight=e,t.style.minWidth=n}}var jv="--any--",Vv=100,Pc=3,jc={outline:"rgba(255, 255, 102, 0.7) solid 2px"},pn,At,Yt,mi,ht,pi,Fa,Ht,On,Jt,Ta=!1,is=!1,os,fr=!1,ln=new Map,pt=new Map,ss=new WeakMap;function Hv(t,e){Be(function(){return"registering drop-zone if absent"}),ln.has(e)||ln.set(e,new Set),ln.get(e).has(t)||(ln.get(e).add(t),Ec())}function Vc(t,e){ln.get(e).delete(t),Cc(),ln.get(e).size===0&&ln.delete(e)}function Wv(){Be(function(){return"watching dragged element"}),Tv();var t=ln.get(mi),e=Xo(t),n;try{for(e.s();!(n=e.n()).done;){var a=n.value;a.addEventListener(oi,Hc),a.addEventListener(ur,Wc),a.addEventListener(si,Gc)}}catch(i){e.e(i)}finally{e.f()}window.addEventListener(Jo,Sa);var r=Math.max.apply(Math,[Vv].concat(ii(Array.from(t.keys()).map(function(i){return pt.get(i).dropAnimationDurationMs}))));Cv(At,t,r*1.07)}function Gv(){Be(function(){return"unwatching dragged element"}),Sv();var t=ln.get(mi),e=Xo(t),n;try{for(e.s();!(n=e.n()).done;){var a=n.value;a.removeEventListener(oi,Hc),a.removeEventListener(ur,Wc),a.removeEventListener(si,Gc)}}catch(r){e.e(r)}finally{e.f()}window.removeEventListener(Jo,Sa),Av()}function Uv(t){return t.findIndex(function(e){return e[Dt]===es})}function gi(t){return t.findIndex(function(e){return!!e[ui]&&e[Dt]!==es})}function Hc(t){Be(function(){return["dragged entered",t.currentTarget,t.detail]});var e=pt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==ht){Be(function(){return"ignoring dragged entered because drop is currently disabled"});return}if(fr=!1,n=n.filter(function(c){return c[Dt]!==Fa[Dt]}),Be(function(){return"dragged entered items ".concat(Cn(n))}),ht!==t.currentTarget){var r=pt.get(ht).items,i=r.filter(function(c){return!c[ui]});In(ht,i,{trigger:st.DRAGGED_ENTERED_ANOTHER,id:Yt[Dt],source:nt.POINTER})}else{var o=Uv(n);o!==-1&&(Be(function(){return"removing placeholder item from origin dz"}),n.splice(o,1))}var l=t.detail.indexObj,s=l.index,d=l.isProximityBased,u=d&&s===t.currentTarget.children.length-1?s+1:s;Ht=t.currentTarget,n.splice(u,0,Fa),In(t.currentTarget,n,{trigger:st.DRAGGED_ENTERED,id:Yt[Dt],source:nt.POINTER})}function Wc(t){if(!!Ta){Be(function(){return["dragged left",t.currentTarget,t.detail]});var e=pt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==ht&&t.currentTarget!==Ht){Be(function(){return"drop is currently disabled"});return}var r=gi(n),i=n.splice(r,1)[0];Ht=void 0;var o=t.detail,l=o.type,s=o.theOtherDz;if(l===li.OUTSIDE_OF_ANY||l===li.LEFT_FOR_ANOTHER&&s!==ht&&pt.get(s).dropFromOthersDisabled){Be(function(){return"dragged left all, putting shadow element back in the origin dz"}),fr=!0,Ht=ht;var d=pt.get(ht).items;d.splice(pi,0,i),In(ht,d,{trigger:st.DRAGGED_LEFT_ALL,id:Yt[Dt],source:nt.POINTER})}In(t.currentTarget,n,{trigger:st.DRAGGED_LEFT,id:Yt[Dt],source:nt.POINTER})}}function Gc(t){Be(function(){return["dragged is over index",t.currentTarget,t.detail]});var e=pt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==ht){Be(function(){return"drop is currently disabled"});return}fr=!1;var r=t.detail.indexObj.index,i=gi(n);n.splice(i,1),n.splice(r,0,Fa),In(t.currentTarget,n,{trigger:st.DRAGGED_OVER_INDEX,id:Yt[Dt],source:nt.POINTER})}function yi(t){t.preventDefault();var e=t.touches?t.touches[0]:t;Jt={x:e.clientX,y:e.clientY},At.style.transform="translate3d(".concat(Jt.x-On.x,"px, ").concat(Jt.y-On.y,"px, 0)")}function Sa(){Be(function(){return"dropped"}),is=!0,window.removeEventListener("mousemove",yi),window.removeEventListener("touchmove",yi),window.removeEventListener("mouseup",Sa),window.removeEventListener("touchend",Sa),Gv(),Nv(At),Ht||(Be(function(){return"element was dropped right after it left origin but before entering somewhere else"}),Ht=ht),Be(function(){return["dropped in dz",Ht]});var t=pt.get(Ht),e=t.items,n=t.type;hi(ln.get(n),function(i){return pt.get(i).dropTargetStyle},function(i){return pt.get(i).dropTargetClasses});var a=gi(e);a===-1&&(a=pi),e=e.map(function(i){return i[ui]?Yt:i});function r(){os(),ka(Ht,e,{trigger:fr?st.DROPPED_OUTSIDE_OF_ANY:st.DROPPED_INTO_ZONE,id:Yt[Dt],source:nt.POINTER}),Ht!==ht&&ka(ht,pt.get(ht).items,{trigger:st.DROPPED_INTO_ANOTHER,id:Yt[Dt],source:nt.POINTER}),Lv(Ht.children[a]),Yv()}zv(a,r)}function zv(t,e){var n=Ac(Ht.children[t]),a={x:n.left-parseFloat(At.style.left),y:n.top-parseFloat(At.style.top)},r=pt.get(Ht),i=r.dropAnimationDurationMs,o="transform ".concat(i,"ms ease");At.style.transition=At.style.transition?At.style.transition+","+o:o,At.style.transform="translate3d(".concat(a.x,"px, ").concat(a.y,"px, 0)"),window.setTimeout(e,i)}function Yv(){At.remove(),pn.remove(),At=void 0,pn=void 0,Yt=void 0,mi=void 0,ht=void 0,pi=void 0,Fa=void 0,Ht=void 0,On=void 0,Jt=void 0,Ta=!1,is=!1,os=void 0,fr=!1}function Zv(t,e){var n={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:jc,dropTargetClasses:[],transformDraggedElement:function(){},centreDraggedOnCursor:!1};Be(function(){return["dndzone good to go options: ".concat(Cn(e),", config: ").concat(Cn(n)),{node:t}]});var a=new Map;function r(){window.addEventListener("mousemove",l,{passive:!1}),window.addEventListener("touchmove",l,{passive:!1,capture:!1}),window.addEventListener("mouseup",o,{passive:!1}),window.addEventListener("touchend",o,{passive:!1})}function i(){window.removeEventListener("mousemove",l),window.removeEventListener("touchmove",l),window.removeEventListener("mouseup",o),window.removeEventListener("touchend",o)}function o(){i(),pn=void 0,On=void 0,Jt=void 0}function l(c){c.preventDefault();var h=c.touches?c.touches[0]:c;Jt={x:h.clientX,y:h.clientY},(Math.abs(Jt.x-On.x)>=Pc||Math.abs(Jt.y-On.y)>=Pc)&&(i(),d())}function s(c){if(c.target!==c.currentTarget&&(c.target.value!==void 0||c.target.isContentEditable)){Be(function(){return"won't initiate drag on a nested input element"});return}if(c.button){Be(function(){return"ignoring none left click button: ".concat(c.button)});return}if(Ta){Be(function(){return"cannot start a new drag before finalizing previous one"});return}c.stopPropagation();var h=c.touches?c.touches[0]:c;On={x:h.clientX,y:h.clientY},Jt=na({},On),pn=c.currentTarget,r()}function d(){Be(function(){return["drag start config: ".concat(Cn(n)),pn]}),Ta=!0;var c=a.get(pn);pi=c,ht=pn.parentElement;var h=ht.getRootNode(),y=h.body||h,m=n.items,v=n.type,p=n.centreDraggedOnCursor;Yt=na({},m[c]),mi=v,Fa=na(na({},Yt),{},lr({},ui,!0));var k=na(na({},Fa),{},lr({},Dt,es));At=Mv(pn,p&&Jt);function C(){At.parentElement?window.requestAnimationFrame(C):(y.appendChild(At),At.focus(),Wv(),qv(pn),y.appendChild(pn))}window.requestAnimationFrame(C),fi(Array.from(ln.get(n.type)).filter(function(A){return A===ht||!pt.get(A).dropFromOthersDisabled}),function(A){return pt.get(A).dropTargetStyle},function(A){return pt.get(A).dropTargetClasses}),m.splice(c,1,k),os=Pv(ht),In(ht,m,{trigger:st.DRAG_STARTED,id:Yt[Dt],source:nt.POINTER}),window.addEventListener("mousemove",yi,{passive:!1}),window.addEventListener("touchmove",yi,{passive:!1,capture:!1}),window.addEventListener("mouseup",Sa,{passive:!1}),window.addEventListener("touchend",Sa,{passive:!1})}function u(c){var h=c.items,y=h===void 0?void 0:h,m=c.flipDurationMs,v=m===void 0?0:m,p=c.type,k=p===void 0?jv:p,C=c.dragDisabled,A=C===void 0?!1:C,S=c.morphDisabled,_=S===void 0?!1:S,F=c.dropFromOthersDisabled,w=F===void 0?!1:F,M=c.dropTargetStyle,x=M===void 0?jc:M,V=c.dropTargetClasses,B=V===void 0?[]:V,H=c.transformDraggedElement,Y=H===void 0?function(){}:H,he=c.centreDraggedOnCursor,oe=he===void 0?!1:he;n.dropAnimationDurationMs=v,n.type&&k!==n.type&&Vc(t,n.type),n.type=k,Hv(t,k),n.items=ii(y),n.dragDisabled=A,n.morphDisabled=_,n.transformDraggedElement=Y,n.centreDraggedOnCursor=oe,Ta&&!is&&(!bv(x,n.dropTargetStyle)||!wv(B,n.dropTargetClasses))&&(hi([t],function(){return n.dropTargetStyle},function(){return B}),fi([t],function(){return x},function(){return B})),n.dropTargetStyle=x,n.dropTargetClasses=ii(B);function ce(ve,Ne){return pt.get(ve)?pt.get(ve)[Ne]:n[Ne]}Ta&&n.dropFromOthersDisabled!==w&&(w?hi([t],function(ve){return ce(ve,"dropTargetStyle")},function(ve){return ce(ve,"dropTargetClasses")}):fi([t],function(ve){return ce(ve,"dropTargetStyle")},function(ve){return ce(ve,"dropTargetClasses")})),n.dropFromOthersDisabled=w,pt.set(t,n);for(var Z=gi(n.items),z=function(Ne){var je=t.children[Ne];if(Ov(je,A),Ne===Z)return _||Iv(At,je,Jt.x,Jt.y,function(){return n.transformDraggedElement(At,Yt,Ne)}),Rv(je),"continue";je.removeEventListener("mousedown",ss.get(je)),je.removeEventListener("touchstart",ss.get(je)),A||(je.addEventListener("mousedown",s),je.addEventListener("touchstart",s),ss.set(je,s)),a.set(je,Ne)},Q=0;Q".concat(e,"

"),n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}function Ba(t){qt.innerHTML="";var e=document.createTextNode(t);qt.appendChild(e),qt.style.display="none",qt.style.display="inline"}var $v="--any--",zc={outline:"rgba(255, 255, 102, 0.7) solid 2px"},$t=!1,us,St,ra="",ia,un,qn="",bi=new WeakSet,Yc=new WeakMap,Zc=new WeakMap,cs=new Map,kt=new Map,cn=new Map,Kc=Xv();function e0(t,e){Be(function(){return"registering drop-zone if absent"}),cn.size===0&&(Be(function(){return"adding global keydown and click handlers"}),window.addEventListener("keydown",Xc),window.addEventListener("click",Jc)),cn.has(e)||cn.set(e,new Set),cn.get(e).has(t)||(cn.get(e).add(t),Ec())}function Qc(t,e){Be(function(){return"unregistering drop-zone"}),St===t&&hr(),cn.get(e).delete(t),Cc(),cn.get(e).size===0&&cn.delete(e),cn.size===0&&(Be(function(){return"removing global keydown and click handlers"}),window.removeEventListener("keydown",Xc),window.removeEventListener("click",Jc))}function Xc(t){if(!!$t)switch(t.key){case"Escape":{hr();break}}}function Jc(){!$t||bi.has(document.activeElement)||(Be(function(){return"clicked outside of any draggable"}),hr())}function t0(t){if(Be(function(){return"zone focus"}),!!$t){var e=t.currentTarget;if(e!==St){ra=e.getAttribute("aria-label")||"";var n=kt.get(St),a=n.items,r=a.find(function(c){return c[Dt]===un}),i=a.indexOf(r),o=a.splice(i,1)[0],l=kt.get(e),s=l.items,d=l.autoAriaDisabled;e.getBoundingClientRect().top0&&arguments[0]!==void 0?arguments[0]:!0;Be(function(){return"drop"}),kt.get(St).autoAriaDisabled||Ba("Stopped dragging item ".concat(qn)),bi.has(document.activeElement)&&document.activeElement.blur(),t&&In(St,kt.get(St).items,{trigger:st.DRAG_STOPPED,id:un,source:nt.KEYBOARD}),hi(cn.get(us),function(e){return kt.get(e).dropTargetStyle},function(e){return kt.get(e).dropTargetClasses}),ia=null,un=null,qn="",us=null,St=null,ra="",$t=!1,$c()}function n0(t,e){var n={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:zc,dropTargetClasses:[],autoAriaDisabled:!1};function a(u,c,h){u.length<=1||u.splice(h,1,u.splice(c,1,u[h])[0])}function r(u){switch(Be(function(){return["handling key down",u.key]}),u.key){case"Enter":case" ":{if((u.target.disabled!==void 0||u.target.href||u.target.isContentEditable)&&!bi.has(u.target))return;u.preventDefault(),u.stopPropagation(),$t?hr():i(u);break}case"ArrowDown":case"ArrowRight":{if(!$t)return;u.preventDefault(),u.stopPropagation();var c=kt.get(t),h=c.items,y=Array.from(t.children),m=y.indexOf(u.currentTarget);Be(function(){return["arrow down",m]}),m0&&(n.autoAriaDisabled||Ba("Moved item ".concat(qn," to position ").concat(C," in the list ").concat(ra)),a(p,C,C-1),ka(t,p,{trigger:st.DROPPED_INTO_ZONE,id:un,source:nt.KEYBOARD}));break}}}function i(u){Be(function(){return"drag start"}),l(u.currentTarget),St=t,us=n.type,$t=!0;var c=Array.from(cn.get(n.type)).filter(function(y){return y===St||!kt.get(y).dropFromOthersDisabled});if(fi(c,function(y){return kt.get(y).dropTargetStyle},function(y){return kt.get(y).dropTargetClasses}),!n.autoAriaDisabled){var h="Started dragging item ".concat(qn,". Use the arrow keys to move it within its list ").concat(ra);c.length>1&&(h+=", or tab to another list in order to move the item into it"),Ba(h)}In(t,kt.get(t).items,{trigger:st.DRAG_STARTED,id:un,source:nt.KEYBOARD}),$c()}function o(u){!$t||u.currentTarget!==ia&&(u.stopPropagation(),hr(!1),i(u))}function l(u){var c=kt.get(t),h=c.items,y=Array.from(t.children),m=y.indexOf(u);ia=u,ia.tabIndex=0,un=h[m][Dt],qn=y[m].getAttribute("aria-label")||""}function s(u){var c=u.items,h=c===void 0?[]:c,y=u.type,m=y===void 0?$v:y,v=u.dragDisabled,p=v===void 0?!1:v,k=u.zoneTabIndex,C=k===void 0?0:k,A=u.dropFromOthersDisabled,S=A===void 0?!1:A,_=u.dropTargetStyle,F=_===void 0?zc:_,w=u.dropTargetClasses,M=w===void 0?[]:w,x=u.autoAriaDisabled,V=x===void 0?!1:x;n.items=ii(h),n.dragDisabled=p,n.dropFromOthersDisabled=S,n.zoneTabIndex=C,n.dropTargetStyle=F,n.dropTargetClasses=M,n.autoAriaDisabled=V,V||(t.setAttribute("aria-disabled",p),t.setAttribute("role","list"),t.setAttribute("aria-describedby",p?Kc.DND_ZONE_DRAG_DISABLED:Kc.DND_ZONE_ACTIVE)),n.type&&m!==n.type&&Qc(t,n.type),n.type=m,e0(t,m),kt.set(t,n),$t?t.tabIndex=t===St||ia.contains(t)||n.dropFromOthersDisabled||St&&n.type!==kt.get(St).type?-1:0:t.tabIndex=n.zoneTabIndex,t.addEventListener("focus",t0);for(var B=function(he){var oe=t.children[he];bi.add(oe),oe.tabIndex=$t?-1:0,V||oe.setAttribute("role","listitem"),oe.removeEventListener("keydown",Yc.get(oe)),oe.removeEventListener("click",Zc.get(oe)),p||(oe.addEventListener("keydown",r),Yc.set(oe,r),oe.addEventListener("click",o),Zc.set(oe,o)),$t&&n.items[he][Dt]===un&&(Be(function(){return["focusing on",{i:he,focusedItemId:un}]}),ia=oe,ia.tabIndex=0,oe.focus())},H=0;H0&&console.warn("dndzone will ignore unknown options",y),!e)throw new Error("no 'items' key provided to dndzone");var m=e.find(function(v){return!{}.hasOwnProperty.call(v,Dt)});if(m)throw new Error("missing '".concat(Dt,"' property for item ").concat(Cn(m)));if(d&&!Array.isArray(d))throw new Error("dropTargetClasses should be an array but instead it is a ".concat(sr(d),", ").concat(Cn(d)));if(l&&!a0(l))throw new Error("zoneTabIndex should be a number but instead it is a ".concat(sr(l),", ").concat(Cn(l)))}function a0(t){return!isNaN(t)&&function(e){return(e|0)===e}(parseFloat(t))}var Na=xe(require("obsidian"));var td=xe(require("obsidian"));function r0(t){be(t,"svelte-l6axd",".add-new.svelte-l6axd,.add-new.svelte-l6axd button{width:100%}.disabled.svelte-l6axd button{cursor:not-allowed}")}function i0(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","add-new setting-item svelte-l6axd"),D(e,"aria-label",t[1]),pe(e,"disabled",t[0])},m(i,o){q(i,e,o),a||(r=[le(n=t[2].call(null,e)),ie(e,"click",t[4])],a=!0)},p(i,[o]){o&2&&D(e,"aria-label",i[1]),o&1&&pe(e,"disabled",i[0])},i:X,o:X,d(i){i&&O(e),a=!1,_e(r)}}}function o0(t,e,n){let{disabled:a=!1}=e,{label:r="Add New"}=e,i,o=s=>{n(3,i=new td.ButtonComponent(s).setButtonText("+").setDisabled(a))};function l(s){ue.call(this,t,s)}return t.$$set=s=>{"disabled"in s&&n(0,a=s.disabled),"label"in s&&n(1,r=s.label)},t.$$.update=()=>{if(t.$$.dirty&9){e:i&&i.setDisabled(a)}},[a,r,o,i,l]}var nd=class extends de{constructor(e){super();fe(this,e,o0,i0,se,{disabled:0,label:1},r0)}},Bt=nd;function s0(t){be(t,"svelte-1o5puim",".no-existing-items.svelte-1o5puim.svelte-1o5puim{width:100%}.no-existing-items.svelte-1o5puim span.svelte-1o5puim{width:100%;text-align:center;color:var(--text-faint)}")}function l0(t){let e,n,a;return{c(){e=T("div"),n=T("span"),a=me(t[0]),D(n,"class","svelte-1o5puim"),D(e,"class","no-existing-items setting-item svelte-1o5puim")},m(r,i){q(r,e,i),E(e,n),E(n,a)},p(r,[i]){i&1&&we(a,r[0])},i:X,o:X,d(r){r&&O(e)}}}function u0(t,e,n){let{message:a}=e;return t.$$set=r=>{"message"in r&&n(0,a=r.message)},[a]}var ad=class extends de{constructor(e){super();fe(this,e,u0,l0,se,{message:0},s0)}},Wt=ad;function c0(t){be(t,"svelte-1ddbnom",".existing-items.svelte-1ddbnom.svelte-1ddbnom{width:100%}.weekday.svelte-1ddbnom.svelte-1ddbnom{display:grid;grid-template-columns:auto 1fr auto;align-items:center;justify-content:space-between;gap:1rem;width:100%}.weekday.svelte-1ddbnom .icon.svelte-1ddbnom{align-items:center}.weekday.svelte-1ddbnom.svelte-1ddbnom{margin-top:0.5rem}")}function rd(t,e,n){let a=t.slice();return a[15]=e[n],a[17]=n,a}function id(t,e,n){let a=t.slice();return a[18]=e[n],a}function d0(t){let e,n=[],a=new Map,r,i,o,l=t[1],s=d=>d[18].id;for(let d=0;dFirst Day -
The day of the week the first year starts on.
`,u=j(),c=T("div"),h=T("select"),y=T("option"),y.textContent="Select a Weekday";for(let w=0;wt[13].call(h)),D(c,"class","setting-item-control"),D(s,"class","setting-item")},m(w,M){ee(e,w,M),q(w,n,M),ee(a,w,M),q(w,r,M),A[i].m(w,M),q(w,l,M),q(w,s,M),E(s,d),E(s,u),E(s,c),E(c,h),E(h,y);for(let x=0;x{A[V]=null}),Ce(),o=A[i],o?o.p(w,M):(o=A[i]=C[i](w),o.c()),R(o,1),o.m(l.parentNode,l)),M&6){_=w[1].filter(ld);let B;for(B=0;B<_.length;B+=1){let H=rd(w,_,B);F[B]?F[B].p(H,M):(F[B]=sd(H),F[B].c(),F[B].m(h,null))}for(;Bt.name?.length,ud=t=>t.name?.length;function p0(t,e,n){let a,r,i=Se(),{calendar:o}=e,l=o.static.firstWeekDay,s=C=>{(0,Na.setIcon)(C,"fantasy-calendar-grip")},d=(C,A)=>{new Na.ExtraButtonComponent(C).setIcon("trash").onClick(()=>n(1,a=a.filter(S=>S.id!==A.id)))};function u(C){C.preventDefault(),n(3,c=!1)}let c=!1;function h(C){let{items:A,info:{source:S,trigger:_}}=C.detail;n(1,a=A),S===nt.KEYBOARD&&_===st.DRAG_STOPPED&&n(3,c=!0)}function y(C){let{items:A,info:{source:S}}=C.detail;n(1,a=A),S===nt.POINTER&&n(3,c=!0)}let m=(C,A)=>{new Na.TextComponent(C).setValue(A.name).setPlaceholder("Name").onChange(S=>{A.name=S,i("weekday-update",a),n(1,a),n(0,o)}).inputEl.setAttr("style","width: 100%;")},v=()=>n(0,o.static.overflow=!o.static.overflow,o),p=()=>n(0,o.static.weekdays=[...a,{type:"day",name:null,id:et(6)}],o);function k(){o.static.firstWeekDay=vn(this),n(0,o)}return t.$$set=C=>{"calendar"in C&&n(0,o=C.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=o.static.weekdays)}if(t.$$.dirty&1){e:n(10,l=o.static.firstWeekDay)}if(t.$$.dirty&1){e:n(2,r=o.static.overflow)}if(t.$$.dirty&2){e:i("weekday-update",a)}if(t.$$.dirty&1024){e:i("first-weekday-update",l)}if(t.$$.dirty&4){e:i("overflow-update",r)}},[o,a,r,c,s,d,u,h,y,m,l,v,p,k]}var cd=class extends de{constructor(e){super();fe(this,e,p0,m0,se,{calendar:0},c0)}},dd=cd;var md=xe(require("obsidian"));var wi=xe(require("obsidian"));function g0(t){be(t,"svelte-1e37bk8",".month.svelte-1e37bk8.svelte-1e37bk8{display:grid;grid-template-columns:1fr 1fr auto auto;align-items:center;justify-content:space-between;gap:1rem;width:100%}.month.svelte-1e37bk8 .icon.svelte-1e37bk8{align-items:center}")}function y0(t){let e,n,a,r,i,o,l,s,d,u,c,h,y;return{c(){e=T("div"),n=T("input"),a=j(),r=T("input"),i=j(),o=T("select"),l=T("option"),l.textContent="Month",s=T("option"),s.textContent="Intercalary",d=j(),u=T("div"),D(n,"type","text"),D(n,"spellcheck","false"),D(n,"placeholder","Name"),$e(n,"width","100%"),D(r,"type","number"),D(r,"spellcheck","false"),D(r,"placeholder","Length"),$e(r,"width","100%"),D(r,"min","0"),l.__value="month",l.value=l.__value,s.__value="intercalary",s.value=s.__value,D(o,"class","dropdown"),t[0]===void 0&&It(()=>t[8].call(o)),D(u,"class","icon svelte-1e37bk8"),D(e,"class","month svelte-1e37bk8")},m(m,v){q(m,e,v),E(e,n),yt(n,t[1]),E(e,a),E(e,r),yt(r,t[2]),E(e,i),E(e,o),E(o,l),E(o,s),Vt(o,t[0]),E(e,d),E(e,u),h||(y=[ie(n,"input",t[6]),ie(n,"input",t[4]),ie(r,"input",t[7]),ie(r,"input",t[4]),ie(o,"change",t[8]),ie(o,"input",t[4]),le(c=t[3].call(null,u))],h=!0)},p(m,[v]){v&2&&n.value!==m[1]&&yt(n,m[1]),v&4&&rn(r.value)!==m[2]&&yt(r,m[2]),v&1&&Vt(o,m[0])},i:X,o:X,d(m){m&&O(e),h=!1,_e(y)}}}function v0(t,e,n){let a=Se(),{month:r}=e,i=r.name,o=r.type,l=r.length,s=y=>{new wi.ExtraButtonComponent(y).setIcon("trash").onClick(()=>{a("month-delete")})},d=(0,wi.debounce)(()=>{n(5,r.name=i,r),n(5,r.type=o,r),n(5,r.length=l,r),a("month-update",r)},300,!0);function u(){i=this.value,n(1,i)}function c(){l=rn(this.value),n(2,l)}function h(){o=vn(this),n(0,o)}return t.$$set=y=>{"month"in y&&n(5,r=y.month)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(5,r.type=o,r)}},[o,i,l,s,d,r,u,c,h]}var fd=class extends de{constructor(e){super();fe(this,e,v0,y0,se,{month:5},g0)}},hd=fd;function b0(t){be(t,"svelte-xv4vbj",".month.svelte-xv4vbj{display:flex;align-items:center;margin-top:0.5rem;gap:1rem}")}function pd(t,e,n){let a=t.slice();return a[14]=e[n],a}function w0(t){let e,n=[],a=new Map,r,i,o,l,s=t[2],d=u=>u[14].id;for(let u=0;u{s[h]=null}),Ce(),r=s[a],r?r.p(u,c):(r=s[a]=l[a](u),r.c()),R(r,1),r.m(i.parentNode,i))},i(u){o||(R(e.$$.fragment,u),R(r),o=!0)},o(u){W(e.$$.fragment,u),W(r),o=!1},d(u){J(e,u),u&&O(n),s[a].d(u),u&&O(i)}}}function E0(t){let e,n;return e=new ct({props:{name:"Months",warn:!t[2]?.length,label:"At least one month is required",$$slots:{default:[_0]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&4&&(i.warn=!a[2]?.length),r&131079&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var fs=300;function C0(t,e,n){let a,r,i=Xe("store");i.subscribe(k=>n(0,r=k));let o=k=>{n(2,a=a.filter(C=>C.id!=k.id)),i.set(r)},l=k=>{(0,md.setIcon)(k,"fantasy-calendar-grip")};function s(k){k.preventDefault(),n(1,d=!1)}let d=!1;function u(k){let{items:C,info:{source:A,trigger:S}}=k.detail;n(2,a=C),A===nt.KEYBOARD&&S===st.DRAG_STOPPED&&n(1,d=!0)}function c(k){let{items:C,info:{source:A}}=k.detail;n(2,a=C),h("month-update",a),A===nt.POINTER&&n(1,d=!0)}let h=Se(),y=()=>{n(0,r.static.months=[...a,{type:"month",name:null,length:null,id:et(6)}],r),i.set(r)},m=()=>y(),v=k=>o(k),p=()=>{i.set(r)};return t.$$.update=()=>{if(t.$$.dirty&1){e:n(2,a=r.static.months)}},[r,d,a,i,o,l,s,u,c,y,m,v,p]}var yd=class extends de{constructor(e){super();fe(this,e,C0,E0,se,{},b0)}},vd=yd;var Ia=xe(require("obsidian"));var dn=xe(require("obsidian"));async function mr(t,e,n={cta:"Yes",secondary:"No"}){return new Promise((a,r)=>{try{let i=new bd(t,e,n);i.onClose=()=>{a(i.confirmed)},i.open()}catch{r()}})}var bd=class extends dn.Modal{constructor(e,n,a){super(e);this.text=n;this.buttons=a;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:this.text});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new dn.ButtonComponent(e).setButtonText(this.buttons.cta).setCta().onClick(()=>{this.confirmed=!0,this.close()}),new dn.ButtonComponent(e).setButtonText(this.buttons.secondary).onClick(()=>{this.close()})}onOpen(){this.display()}};async function wd(t){return new Promise((e,n)=>{try{let a=new Dd(t);a.onClose=()=>{e(a.confirmed)},a.open()}catch{n()}})}var Dd=class extends dn.Modal{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Are you sure you want to delete this calendar?"});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Delete and don't ask again"}).onclick=()=>{this.confirmed=!0,this.plugin.data.exit.calendar=!0,this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new dn.ButtonComponent(n).setButtonText("Delete").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Cancel"}).onclick=()=>{this.close()}}onOpen(){this.display()}},hs=class extends dn.Modal{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Additional information is required to save this calendar. Any changes you may have made will be discarded if you exit now."});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Exit and don't ask again"}).onclick=()=>{this.confirmed=!0,this.plugin.data.exit.saving=!0,this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new dn.ButtonComponent(n).setButtonText("Exit").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Keep editing"}).onclick=()=>{this.close()}}onOpen(){this.display()}};async function _d(t){return new Promise((e,n)=>{try{let a=new Ed(t);a.onClose=()=>{e(a.confirmed)},a.open()}catch{n()}})}var Ed=class extends dn.Modal{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Are you sure you wish to delete this event?"});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Delete and don't ask again"}).onclick=()=>{this.confirmed=!0,this.plugin.data.exit.event=!0,this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new dn.ButtonComponent(n).setButtonText("Delete").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Cancel"}).onclick=()=>{this.close()}}onOpen(){this.display()}};function A0(t){be(t,"svelte-1c4m78g",".weekday.svelte-1c4m78g.svelte-1c4m78g{display:grid;grid-template-columns:auto 1fr auto;align-items:center;justify-content:space-between;gap:1rem}.weekday.svelte-1c4m78g .icon.svelte-1c4m78g{align-items:center}.weekday.svelte-1c4m78g.svelte-1c4m78g{margin-top:0.5rem}")}function Cd(t,e,n){let a=t.slice();return a[17]=e[n],a}function Ad(t){let e,n,a,r,i,o;e=new Bt({}),e.$on("click",t[15]);let l=[x0,k0],s=[];function d(u,c){return!u[2]||!u[2].length?0:1}return a=d(t,-1),r=s[a]=l[a](t),{c(){te(e.$$.fragment),n=j(),r.c(),i=Ue()},m(u,c){ee(e,u,c),q(u,n,c),s[a].m(u,c),q(u,i,c),o=!0},p(u,c){let h=a;a=d(u,c),a===h?s[a].p(u,c):(Ee(),W(s[h],1,1,()=>{s[h]=null}),Ce(),r=s[a],r?r.p(u,c):(r=s[a]=l[a](u),r.c()),R(r,1),r.m(i.parentNode,i))},i(u){o||(R(e.$$.fragment,u),R(r),o=!0)},o(u){W(e.$$.fragment,u),W(r),o=!1},d(u){J(e,u),u&&O(n),s[a].d(u),u&&O(i)}}}function k0(t){let e,n=[],a=new Map,r,i,o,l=t[2],s=d=>d[17].id;for(let d=0;d{i=null}),Ce())},i(o){r||(R(e.$$.fragment,o),R(i),r=!0)},o(o){W(e.$$.fragment,o),W(i),r=!1},d(o){J(e,o),o&&O(n),i&&i.d(o),o&&O(a)}}}function T0(t){let e,n;return e=new ct({props:{name:"Years",warn:t[1]&&!t[2]?.length,label:"At least one year is required when using custom years",$$slots:{default:[F0]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&6&&(i.warn=a[1]&&!a[2]?.length),r&1048591&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var ms=300;function S0(t,e,n){let a,r,{calendar:i}=e,o=Xe("store");o.subscribe(S=>n(0,i=S));let l=S=>{(0,Ia.setIcon)(S,"fantasy-calendar-grip")},s=(S,_)=>{new Ia.ExtraButtonComponent(S).setIcon("trash").onClick(()=>n(2,a=a.filter(F=>F.id!==_.id)))},d=(S,_)=>{new Ia.TextComponent(S).setValue(_.name).setPlaceholder("Name").onChange(w=>{_.name=w,k("years-update",a),n(2,a),n(0,i)}).inputEl.setAttr("style","width: 100%;")},{app:u}=e,c=createFragment(S=>(S.createSpan({text:"Create custom years to display instead of incrementing from 1."}),S.createEl("br"),S.createSpan({text:"If on, "}),S.createEl("strong",{text:"only the years added below will be displayed."}),S)),h=async()=>{i.static.useCustomYears&&a?.length&&await mr(u,"The custom years you have created will be removed. Proceed?")&&n(0,i.static.years=[],i),n(0,i.static.useCustomYears=!i.static.useCustomYears,i),o.set(i)};function y(S){S.preventDefault(),n(3,m=!1)}let m=!1;function v(S){let{items:_,info:{source:F,trigger:w}}=S.detail;n(2,a=_),F===nt.KEYBOARD&&w===st.DRAG_STOPPED&&n(3,m=!0)}function p(S){let{items:_,info:{source:F}}=S.detail;n(2,a=_),F===nt.POINTER&&n(3,m=!0)}let k=Se(),C=()=>h(),A=()=>{n(0,i.static.years=[...a??[],{name:null,id:et(6),type:"year"}],i),o.set(i)};return t.$$set=S=>{"calendar"in S&&n(0,i=S.calendar),"app"in S&&n(13,u=S.app)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(2,a=i.static.years)}if(t.$$.dirty&1){e:n(1,r=i.static.useCustomYears)}if(t.$$.dirty&4){e:k("years-update",a)}if(t.$$.dirty&2){e:k("use-custom-update",r)}},[i,r,a,m,o,l,s,d,c,h,y,v,p,u,C,A]}var xd=class extends de{constructor(e){super();fe(this,e,S0,T0,se,{calendar:0,app:13},A0)}},Fd=xd;var ps=xe(require("obsidian"));function B0(t){be(t,"svelte-1ldxqlp",".dot.svelte-1ldxqlp{display:inline-block;height:0.875em;width:0.875em;margin:0 1px}")}function M0(t){let e,n;return{c(){e=an("svg"),n=an("circle"),D(n,"stroke",t[0]),D(n,"fill",t[0]),D(n,"cx","3"),D(n,"cy","3"),D(n,"r","2"),D(e,"class","dot svelte-1ldxqlp"),D(e,"viewBox","0 0 6 6"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"aria-label",t[1])},m(a,r){q(a,e,r),E(e,n)},p(a,[r]){r&1&&D(n,"stroke",a[0]),r&1&&D(n,"fill",a[0]),r&2&&D(e,"aria-label",a[1])},i:X,o:X,d(a){a&&O(e)}}}function N0(t,e,n){let{color:a}=e,{label:r}=e;return t.$$set=i=>{"color"in i&&n(0,a=i.color),"label"in i&&n(1,r=i.label)},[a,r]}var Td=class extends de{constructor(e){super();fe(this,e,N0,M0,se,{color:0,label:1},B0)}},Sd=Td;function I0(t){be(t,"svelte-3snb0d",".event.svelte-3snb0d.svelte-3snb0d{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.event-info.svelte-3snb0d.svelte-3snb0d{width:100%}.icons.svelte-3snb0d.svelte-3snb0d{display:flex;align-self:flex-start;justify-self:flex-end;align-items:center}.event.svelte-3snb0d .icon.svelte-3snb0d{align-items:center}.date.svelte-3snb0d.svelte-3snb0d{display:flex;justify-content:flex-start;gap:0.25rem}.clamp.svelte-3snb0d.svelte-3snb0d{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;word-break:keep-all;overflow:hidden;width:calc(var(--event-max-width) * 0.75)}")}function Bd(t){let e,n;return e=new Sd({props:{color:t[1].color,label:t[1].name}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.color=a[1].color),r&2&&(i.label=a[1].name),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function O0(t){let e,n,a,r,i=t[0].name+"",o,l,s,d,u,c,h,y=(t[0].description??"")+"",m,v,p,k,C,A,S,_,F,w,M,x=t[1]!=null&&Bd(t);return{c(){e=T("div"),n=T("div"),a=T("span"),x&&x.c(),r=j(),o=me(i),l=j(),s=T("div"),d=T("div"),u=me(t[2]),c=j(),h=T("span"),m=me(y),v=j(),p=T("div"),k=T("div"),A=j(),S=T("div"),D(a,"class","setting-item-name"),D(d,"class","date svelte-3snb0d"),D(h,"class","clamp svelte-3snb0d"),D(s,"class","setting-item-description"),D(n,"class","event-info svelte-3snb0d"),D(k,"class","icon svelte-3snb0d"),D(S,"class","icon svelte-3snb0d"),D(p,"class","icons svelte-3snb0d"),D(e,"class","event svelte-3snb0d")},m(V,B){q(V,e,B),E(e,n),E(n,a),x&&x.m(a,null),E(a,r),E(a,o),E(n,l),E(n,s),E(s,d),E(d,u),E(s,c),E(s,h),E(h,m),E(e,v),E(e,p),E(p,k),E(p,A),E(p,S),F=!0,w||(M=[le(C=t[5].call(null,k)),ie(k,"click",t[6]),le(_=t[4].call(null,S)),ie(S,"click",t[7])],w=!0)},p(V,[B]){V[1]!=null?x?(x.p(V,B),B&2&&R(x,1)):(x=Bd(V),x.c(),R(x,1),x.m(a,r)):x&&(Ee(),W(x,1,1,()=>{x=null}),Ce()),(!F||B&1)&&i!==(i=V[0].name+"")&&we(o,i),(!F||B&4)&&we(u,V[2]),(!F||B&1)&&y!==(y=(V[0].description??"")+"")&&we(m,y)},i(V){F||(R(x),F=!0)},o(V){W(x),F=!1},d(V){V&&O(e),x&&x.d(),w=!1,_e(M)}}}function q0(t,e,n){let a=Se(),r=c=>{new ps.ExtraButtonComponent(c).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},i=c=>{new ps.ExtraButtonComponent(c).setIcon("pencil").setTooltip("Edit")},{event:o}=e,{category:l}=e,{date:s}=e,d=()=>a("edit"),u=()=>a("delete");return t.$$set=c=>{"event"in c&&n(0,o=c.event),"category"in c&&n(1,l=c.category),"date"in c&&n(2,s=c.date)},[o,l,s,a,r,i,d,u]}var Md=class extends de{constructor(e){super();fe(this,e,q0,O0,se,{event:0,category:1,date:2},I0)}},Nd=Md;var lt=xe(require("obsidian"));var pr=xe(require("obsidian")),Di=class extends rr{constructor(e,n,a){super(e,n.inputEl,a);this.files=[...a],this.text=n,this.createPrompts(),this.inputEl.addEventListener("input",this.getFile.bind(this))}createPrompts(){this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Type #"}),createSpan({text:"to link heading"})]),this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Type ^"}),createSpan({text:"to link blocks"})]),this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Note: "}),createSpan({text:"Blocks must have been created already"})])}getFile(){let e=this.inputEl.value,n=this.app.metadataCache.getFirstLinkpathDest(e.split(/[\^#]/).shift()||"","");n!=this.file&&(this.file=n,this.file&&(this.cache=this.app.metadataCache.getFileCache(this.file)),this.onInputChanged())}getItemText(e){if(e instanceof pr.TFile)return e.path;if(Object.prototype.hasOwnProperty.call(e,"heading"))return e.heading;if(Object.prototype.hasOwnProperty.call(e,"id"))return e.id}onChooseItem(e){e instanceof pr.TFile?(this.text.setValue(e.basename),this.file=e,this.cache=this.app.metadataCache.getFileCache(this.file)):Object.prototype.hasOwnProperty.call(e,"heading")?this.text.setValue(this.file.basename+"#"+e.heading):Object.prototype.hasOwnProperty.call(e,"id")&&this.text.setValue(this.file.basename+"^"+e.id)}selectSuggestion({item:e}){let n;e instanceof pr.TFile?(this.file=e,n=e.basename):Object.prototype.hasOwnProperty.call(e,"heading")?n=this.file.basename+"#"+e.heading:Object.prototype.hasOwnProperty.call(e,"id")&&(n=this.file.basename+"^"+e.id);let a=this.file.path.split("/").slice(0,-1);a.length?this.link=a.join("/")+"/"+n:this.link=n,this.text.setValue(n),this.close(),this.onClose()}renderSuggestion(e,n){let{item:a,match:r}=e||{},i=n.createDiv({cls:"suggestion-content"});if(!a){i.setText(this.emptyStateText),i.parentElement.addClass("is-selected");return}if(a instanceof pr.TFile){let o=a.path.length-a.name.length,l=r.matches.map(s=>createSpan("suggestion-highlight"));for(let s=o;su[0]===s);if(d){let u=l[r.matches.indexOf(d)];i.appendChild(u),u.appendText(a.path.substring(d[0],d[1])),s+=d[1]-d[0]-1;continue}i.appendText(a.path[s])}n.createDiv({cls:"suggestion-note",text:a.path})}else Object.prototype.hasOwnProperty.call(a,"heading")?(i.setText(a.heading),i.prepend(createSpan({cls:"suggestion-flair",text:`H${a.level}`}))):Object.prototype.hasOwnProperty.call(a,"id")&&i.setText(a.id)}get headings(){return this.file?(this.cache||(this.cache=this.app.metadataCache.getFileCache(this.file)),this.cache.headings||[]):[]}get blocks(){return this.file?(this.cache||(this.cache=this.app.metadataCache.getFileCache(this.file)),Object.values(this.cache.blocks||{})||[]):[]}getItems(){let e=this.inputEl.value;return/#/.test(e)?(this.modifyInput=n=>n.split(/#/).pop(),this.headings):/\^/.test(e)?(this.modifyInput=n=>n.split(/\^/).pop(),this.blocks):this.files}};var gs=xe(Vn());var Oa=class extends lt.Modal{constructor(e,n,a,r){super(e.app);this.plugin=e;this.calendar=n;this.saved=!1;this.event={name:null,description:null,date:{month:null,day:null,year:null},id:et(6),note:null,category:null};a&&(this.event=(0,gs.default)(a),this.editing=!0),r&&(this.event.date=(0,gs.default)(r)),this.containerEl.addClass("fantasy-calendar-create-event")}async display(){this.contentEl.empty(),this.titleEl.setText(this.editing?"Edit Event":"New Event"),this.infoEl=this.contentEl.createDiv("event-info"),this.buildInfo(),this.dateEl=this.contentEl.createDiv("event-date"),this.buildDate(),new lt.Setting(this.contentEl).addButton(e=>{e.setButtonText("Save").setCta().onClick(async()=>{if(!this.event.name?.length){new lt.Notice("The event must have a name.");return}if(this.event.end){this.event.end={year:this.event.end.year??this.event.date.year,month:this.event.end.month??this.event.date.month,day:this.event.end.day??this.event.date.day};let n=this.event.date,a=this.event.end,r=Math.max(...this.calendar.static.months.map(s=>s.length)),i=r*this.calendar.static.months.length,o=(n.year-1)*i+(n.month??-1)*r+n.day,l=(a.year-1)*i+(a.month??-1)*r+a.day;if(o>l){let s={...this.event.end};this.event.end={...this.event.date},this.event.date={...s}}}if(this.saved=!0,this.plugin.data.eventFrontmatter&&this.event.note){let[n,a]=this.event.note.split(/[#^]/),r=this.app.metadataCache.getFirstLinkpathDest(n,""),i=this.plugin.format.replace(/[Yy]+/g,`${this.event.date.year}`).replace(/[Mm]+/g,`${this.event.date.month}`).replace(/[Dd]+/g,`${this.event.date.day}`),o=[`fc-calendar: ${this.calendar.name}`,`fc-date: ${i}`];if(this.event.end){let l=this.plugin.format.replace(/[Yy]+/g,`${this.event.end.year}`).replace(/[Mm]+/g,`${this.event.end.month}`).replace(/[Dd]+/g,`${this.event.end.day}`);o.push(`fc-end: ${l}`)}if(this.event.category){let l=this.calendar.categories.find(s=>s.id==this.event.category)?.name;o.push(`fc-category: ${l}`)}if(r){let l=await this.app.vault.read(r);if(/^\-\-\-$\n[\s\S]*?^\-\-\-$/m.test(l)){let[,s]=l.match(/^\-\-\-$\n([\s\S]*?)^\-\-\-$/m),d=s.split(` -`).filter(u=>!/^fc-calendar/.test(u)&&!/^fc-date/.test(u)&&!/^fc-end/.test(u)&&!/^fc-category/.test(u)&&!/^fc-display-name/.test(u));d.unshift(...o),l=l.replace(/^\-\-\-$\n[\s\S]*?^\-\-\-$/m,`--- -${d.join(` -`)}---`)}else l=`--- -${o.join(` -`)} ---- -${l}`;await this.app.vault.modify(r,l)}else await this.app.vault.create(this.event.note,`---${o.join(` -`)}---`)}this.event.name||(this.event.name="Event"),this.close()})}).addExtraButton(e=>{e.setIcon("cross").setTooltip("Cancel").onClick(()=>this.close())})}buildDate(){this.dateEl.empty(),this.buildStartDate(),this.endEl=this.dateEl.createDiv(),this.event.end?this.buildEndDate():new lt.Setting(this.endEl).setName("Add End Date").addToggle(n=>{n.setValue(!1).onChange(a=>this.buildEndDate())});let e=this.dateEl.createDiv("fantasy-calendar-event-formula");this.event.formulas?.length?this.buildEventFormulas(e):new lt.Setting(e).setName("Add Interval").addToggle(n=>{n.setValue(!1).onChange(a=>this.buildEventFormulas(e))}),this.stringEl=this.dateEl.createDiv("event-date-string setting-item-description"),this.buildDateString()}buildEventFormulas(e){e.empty(),this.event.formulas=this.event.formulas??[{type:"interval",number:1,timespan:"days"}],new lt.Setting(e).setName("Event Interval").addText(n=>{n.setValue(`${this.event.formulas[0].number}`).onChange(a=>{this.event.formulas[0].number=Number(a)}).inputEl.setAttr("type","number")}).addDropdown(n=>{n.addOption("days","days")})}buildStartDate(){this.startEl=this.dateEl.createDiv("fantasy-calendar-event-date"),this.startEl.createSpan({text:"Start:"}),this.startDateEl=this.startEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(this.startDateEl,this.event.date)}buildEndDate(){this.event.end=this.event.end??{...this.event.date},this.endEl.empty(),this.endEl.addClass("fantasy-calendar-event-date"),this.endEl.createSpan({text:"End:"}),this.endDateEl=this.endEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(this.endDateEl,this.event.end)}buildDateString(){this.stringEl.empty(),this.stringEl.createSpan({text:yn(this.event.date,this.calendar.static.months,this.event.end)})}buildDateFields(e,n=this.event.date){e.empty();let a=e.createDiv("fantasy-calendar-date-field");a.createEl("label",{text:"Day"}),new lt.TextComponent(a).setPlaceholder("Day").setValue(`${n.day}`).onChange(s=>{n.day=Number(s),this.buildDateString()}).inputEl.setAttr("type","number");let i=e.createDiv("fantasy-calendar-date-field");i.createEl("label",{text:"Month"}),new lt.DropdownComponent(i).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map(s=>[s.name,s.name])])).setValue(n.month!=null?this.calendar.static.months[n.month].name:"select").onChange(s=>{s==="select"&&(n.month=null);let d=this.calendar.static.months.find(u=>u.name==s);n.month=this.calendar.static.months.indexOf(d),this.buildDateString()});let o=e.createDiv("fantasy-calendar-date-field");o.createEl("label",{text:"Year"}),new lt.TextComponent(o).setPlaceholder("Year").setValue(`${n.year}`).onChange(s=>{!s||s==null?n.year=void 0:n.year=Number(s),this.buildDateString()}).inputEl.setAttr("type","number")}buildInfo(){this.infoEl.empty(),new lt.Setting(this.infoEl).setName("Note").setDesc("Link the event to a note.").addText(n=>{let a=this.app.vault.getFiles();if(n.setPlaceholder("Path"),this.event.note){let[i,o]=this.event.note.split(/[#^]/),l=this.app.metadataCache.getFirstLinkpathDest(i,"");l&&l instanceof lt.TFile&&n.setValue(`${l.basename}${o?"#":""}${o||""}`)}let r=new Di(this.app,n,[...a]);r.onClose=async()=>{n.inputEl.blur(),this.event.note=r.link,this.tryParse(r.file)}}),new lt.Setting(this.infoEl).setName("Event Name").addText(n=>n.setPlaceholder("Event Name").setValue(this.event.name).onChange(a=>{this.event.name=a}));let e=this.infoEl.createDiv("event-description");e.createEl("label",{text:"Event Description"}),new lt.TextAreaComponent(e).setPlaceholder("Event Description").setValue(this.event.description).onChange(n=>{this.event.description=n}),new lt.Setting(this.infoEl).setName("Event Category").addDropdown(n=>{let a=Object.fromEntries(this.calendar.categories.map(r=>[r.id,r.name]));n.addOptions(a).setValue(this.event.category).onChange(r=>this.event.category=r)})}async tryParse(e){this.event.name=e.basename;let n=this.app.metadataCache.getFileCache(e),{frontmatter:a}=n;if(a){if("fc-display-name"in a&&(this.event.name=a["fc-display-name"]),"fc-date"in a){let{day:r,month:i,year:o}=a["fc-date"];if(r&&(this.event.date.day=r),i){if(typeof i=="string"){let l=this.calendar.static.months?.find(s=>s.name==i)??this.calendar.static.months?.[0];this.event.date.month=this.calendar.static.months?.indexOf(l)}typeof i=="number"&&(this.event.date.month=i-1)}o&&(this.event.date.year=o)}"fc-category"in a&&(this.calendar.categories.find(r=>r.name===a["fc-category"])||this.calendar.categories.push({name:a["fantasy-category"],color:"#808080",id:et(6)}),this.event.category=this.calendar.categories.find(r=>r.name===a["fc-category"])?.id)}await this.display()}async onOpen(){await this.display()}};var Id=xe(require("obsidian"));function R0(t){let e;return{c(){e=me(t[4])},m(n,a){q(n,e,a)},p(n,a){a&16&&we(e,n[4])},d(n){n&&O(e)}}}function L0(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=t[5].call(null,e)),a=!0)},p:X,d(i){i&&O(e),a=!1,r()}}}function P0(t){let e,n,a,r,i,o,l,s,d,u,c,h;function y(p,k){if(p[3])return L0;if(p[4])return R0}let m=y(t,-1),v=m&&m(t);return{c(){e=T("div"),n=T("div"),a=T("div"),r=me(t[0]),i=j(),o=T("div"),l=me(t[1]),s=j(),d=T("div"),u=T("button"),v&&v.c(),D(a,"class","setting-item-name"),D(o,"class","setting-item-description"),D(n,"class","setting-item-info"),D(u,"aria-label",t[2]),D(d,"class","setting-item-control"),D(e,"class","setting-item")},m(p,k){q(p,e,k),E(e,n),E(n,a),E(a,r),E(n,i),E(n,o),E(o,l),E(e,s),E(e,d),E(d,u),v&&v.m(u,null),c||(h=ie(u,"click",t[6]),c=!0)},p(p,[k]){k&1&&we(r,p[0]),k&2&&we(l,p[1]),m===(m=y(p,k))&&v?v.p(p,k):(v&&v.d(1),v=m&&m(p),v&&(v.c(),v.m(u,null))),k&4&&D(u,"aria-label",p[2])},i:X,o:X,d(p){p&&O(e),v&&v.d(),c=!1,h()}}}function j0(t,e,n){let{name:a}=e,{desc:r=""}=e,{label:i=null}=e,{icon:o=null}=e,{text:l=null}=e,s=u=>{(0,Id.setIcon)(u,o)};function d(u){ue.call(this,t,u)}return t.$$set=u=>{"name"in u&&n(0,a=u.name),"desc"in u&&n(1,r=u.desc),"label"in u&&n(2,i=u.label),"icon"in u&&n(3,o=u.icon),"text"in u&&n(4,l=u.text)},[a,r,i,o,l,s,d]}var Od=class extends de{constructor(e){super();fe(this,e,j0,P0,se,{name:0,desc:1,label:2,icon:3,text:4})}},qd=Od;var qa=xe(require("obsidian"));function V0(t){be(t,"svelte-1cuaalj",".more.svelte-1cuaalj{text-align:center;padding-top:10px;text-decoration:underline;font-style:italic;cursor:pointer}")}function Rd(t,e,n){let a=t.slice();return a[17]=e[n],a}function Ld(t){let e,n,a,r,i,o;return r=new Wt({props:{message:"Create a new event to see it here."}}),{c(){e=T("div"),n=j(),a=T("div"),te(r.$$.fragment),i=j(),D(a,"class","setting-item")},m(l,s){q(l,e,s),q(l,n,s),q(l,a,s),ee(r,a,null),E(a,i),o=!0},p:X,i(l){o||(R(r.$$.fragment,l),o=!0)},o(l){W(r.$$.fragment,l),o=!1},d(l){l&&O(e),l&&O(n),l&&O(a),J(r)}}}function Pd(t){let e,n;function a(){return t[14](t[17])}function r(){return t[15](t[17])}return e=new Nd({props:{event:t[17],category:t[6](t[17].category),date:yn(t[17].date,t[4],t[17].end)}}),e.$on("edit",a),e.$on("delete",r),{c(){te(e.$$.fragment)},m(i,o){ee(e,i,o),n=!0},p(i,o){t=i;let l={};o&8&&(l.event=t[17]),o&8&&(l.category=t[6](t[17].category)),o&24&&(l.date=yn(t[17].date,t[4],t[17].end)),e.$set(l)},i(i){n||(R(e.$$.fragment,i),n=!0)},o(i){W(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function jd(t){let e,n,a;return{c(){e=T("div"),e.innerHTML="Load More Events...",D(e,"class","more svelte-1cuaalj")},m(r,i){q(r,e,i),n||(a=ie(e,"click",t[16]),n=!0)},p:X,d(r){r&&O(e),n=!1,a()}}}function H0(t){let e,n,a,r,i,o,l,s,d,u,c,h,y;e=new qd({props:{name:"Delete All Events",icon:"trash"}}),e.$on("click",t[12]),o=new Bt({}),o.$on("click",t[13]);let m=t[3],v=[];for(let A=0;AW(v[A],1,1,()=>{v[A]=null}),k=null;m.length||(k=Ld(t));let C=!t[2]&&t[3].length{k=null}),Ce()):(k=Ld(A),k.c(),R(k,1),k.m(s,null))}!A[2]&&A[3].length{n(3,r=r.filter(_=>_.id!==S.id))},c=S=>o.categories.find(({id:_})=>_==S),h=S=>{let _=new Oa(l,o,S);_.onClose=()=>{if(!!_.saved){if(_.editing){let F=o.events.findIndex(w=>w.id===_.event.id);o.events.splice(F,1,{..._.event})}else o.events.push({..._.event});n(3,r=o.events)}},_.open()},y=async()=>{await mr(l.app,"Are you sure you want to delete all events from this calendar?")&&n(0,o.events=[],o)},m=S=>{S.createDiv();let _;new qa.Setting(S).setName("Filter events").addSearch(F=>{_=F,F.onChange((0,qa.debounce)(w=>{if(!w){n(11,a=o.events.sort((x,V)=>x.date.year!=V.date.year?x.date.year-V.date.year:x.date.month!=V.date.month?x.date.month-V.date.month:x.date.day-V.date.day)),n(2,d=!1);return}let M=[];for(let x of a)(0,qa.prepareFuzzySearch)(w)(x.name)&&M.push(x);n(11,a=M),n(2,d=!0)},250))}).addExtraButton(F=>{F.setIcon("trash").setTooltip("Delete Filtered Events").onClick(async()=>{await mr(l.app,"Are you sure you want to delete the filtered events from this calendar?")&&(n(0,o.events=o.events.filter(w=>!a.includes(w)),o),_.setValue(""))})})},v=()=>y(),p=()=>h(),k=S=>h(S),C=S=>u(S),A=()=>n(1,s++,s);return t.$$set=S=>{"calendar"in S&&n(0,o=S.calendar),"plugin"in S&&n(10,l=S.plugin)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(11,a=o.events.sort((S,_)=>S.date.year!=_.date.year?S.date.year-_.date.year:S.date.month!=_.date.month?S.date.month-_.date.month:S.date.day-_.date.day))}if(t.$$.dirty&2050){e:n(3,r=a.slice(0,100*s))}if(t.$$.dirty&1){e:n(4,i=o.static.months)}},[o,s,d,r,i,u,c,h,y,m,l,a,v,p,k,C,A]}var Vd=class extends de{constructor(e){super();fe(this,e,G0,W0,se,{calendar:0,plugin:10},V0)}},Hd=Vd;var _i=xe(require("obsidian"));var Gd=xe(Wd());function U0(t){be(t,"svelte-1ok7o99",".category.svelte-1ok7o99{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:0.5rem;padding-top:0.75rem}")}function Ud(t,e,n){let a=t.slice();return a[8]=e[n],a}function z0(t){let e,n=t[1],a=[];for(let r=0;r{s[h]=null}),Ce(),r=s[a],r?r.p(u,c):(r=s[a]=l[a](u),r.c()),R(r,1),r.m(i.parentNode,i))},i(u){o||(R(e.$$.fragment,u),R(r),o=!0)},o(u){W(e.$$.fragment,u),W(r),o=!1},d(u){J(e,u),u&&O(n),s[a].d(u),u&&O(i)}}}function K0(t){let e,n;return e=new ct({props:{name:"Categories",$$slots:{default:[Z0]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&2051&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Q0(t,e,n){let a,r=Se(),{calendar:i}=e,o=(c,h)=>{new _i.TextComponent(c).setValue(h.name).setPlaceholder("Name").onChange(m=>{h.name=m,r("update",h)}).inputEl.setAttr("style","width: 100%;")},l=(c,h)=>{new _i.ExtraButtonComponent(c).setIcon("trash").onClick(()=>{n(1,a=a.filter(y=>y.id!==h.id)),r("delete",h)})},s=(c,h)=>{let{target:y}=c;y instanceof HTMLInputElement&&(h.color=y.value,r("update",h))},d=()=>n(0,i.categories=[...a,{id:et(6),color:(0,Gd.default)(),name:"Category"}],i),u=(c,h)=>s(h,c);return t.$$set=c=>{"calendar"in c&&n(0,i=c.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=i.categories)}},[i,a,o,l,s,d,u]}var Yd=class extends de{constructor(e){super();fe(this,e,Q0,K0,se,{calendar:0},U0)}},Zd=Yd;var bs=xe(require("obsidian"));var ys="#808080",Ie=["M6.5,16a9.5,9.5 0 1,0 19,0a9.5,9.5 0 1,0 -19,0","M19.79,6C22.25,7.2,25,9.92,25,16s-2.75,8.8-5.21,10a10.59,10.59,0,0,1-3.79.71A10.72,10.72,0,0,1,16,5.28,10.59,10.59,0,0,1,19.79,6Z","M19.43,5.86C21.79,7,24.5,9.7,24.5,16s-2.71,9-5.07,10.14a10.55,10.55,0,0,1-3.43.58A10.72,10.72,0,0,1,16,5.28,10.55,10.55,0,0,1,19.43,5.86Z","M17.87,5.46C20.23,6.34,24,8.88,24,16.17c0,6.85-3.33,9.36-5.69,10.29a11,11,0,0,1-2.31.26A10.72,10.72,0,0,1,16,5.28,10.49,10.49,0,0,1,17.87,5.46Z","M17.79,5.45C20,6.3,23.5,8.77,23.5,15.88c0,7.37-3.75,9.87-5.95,10.71a9.92,9.92,0,0,1-1.55.13A10.72,10.72,0,0,1,16,5.28,10.54,10.54,0,0,1,17.79,5.45Z","M17.35,5.38c1.9.79,5.15,3.25,5.15,10.72,0,7.25-3.06,9.68-5,10.5a10.87,10.87,0,0,1-1.52.12A10.72,10.72,0,0,1,16,5.28,10.1,10.1,0,0,1,17.35,5.38Z","M17.05,5.34c1.6.75,4.45,3.17,4.45,10.79,0,7.39-2.68,9.76-4.3,10.52a11.9,11.9,0,0,1-1.2.07A10.72,10.72,0,0,1,16,5.28,9,9,0,0,1,17.05,5.34Z","M16.85,5.33c1.3.74,3.65,3.12,3.65,10.67s-2.35,9.93-3.65,10.67c-.28,0-.56,0-.85,0A10.72,10.72,0,0,1,16,5.28,7.92,7.92,0,0,1,16.85,5.33Z","M16.46,5.31c.95.78,3,3.34,3,10.69s-2.09,9.91-3,10.69l-.46,0A10.72,10.72,0,0,1,16,5.28Z","M16.29,5.3c.65.8,2.21,3.48,2.21,10.78S17,25.91,16.3,26.7l-.3,0A10.72,10.72,0,0,1,16,5.28Z","M16.13,5.29c.37.89,1.37,3.92,1.37,10.79s-1,9.76-1.36,10.63H16A10.72,10.72,0,0,1,16,5.28Z","M16,5.29A85.5,85.5,0,0,1,16.5,16,85.5,85.5,0,0,1,16,26.71h0A10.72,10.72,0,0,1,16,5.28Z","M16,26.72A10.72,10.72,0,0,1,16,5.28Z","M15.5,16A85.59,85.59,0,0,0,16,26.72,10.72,10.72,0,0,1,16,5.28,85.59,85.59,0,0,0,15.5,16Z","M14.5,16.08c0,6.84,1,9.77,1.36,10.63a10.71,10.71,0,0,1,0-21.42C15.5,6.17,14.5,9.2,14.5,16.08Z","M15.7,26.7a10.7,10.7,0,0,1,0-21.4c-.65.8-2.21,3.47-2.21,10.78S15,25.92,15.7,26.7Z","M15.55,26.7a10.71,10.71,0,0,1,0-21.4c-1,.78-3.05,3.34-3.05,10.7S14.6,25.92,15.55,26.7Z","M15.16,26.68a10.71,10.71,0,0,1,0-21.36C13.85,6.06,11.5,8.43,11.5,16S13.85,25.94,15.16,26.68Z","M14.81,26.65A10.72,10.72,0,0,1,15,5.33c-1.59.76-4.45,3.17-4.45,10.8C10.5,23.53,13.19,25.9,14.81,26.65Z","M14.49,26.6a10.71,10.71,0,0,1,.17-21.23c-1.9.8-5.16,3.24-5.16,10.73C9.5,23.37,12.57,25.79,14.49,26.6Z","M14.46,26.6a10.71,10.71,0,0,1-.24-21.16C12,6.29,8.5,8.76,8.5,15.88,8.5,23.26,12.27,25.76,14.46,26.6Z","M13.72,26.47a10.71,10.71,0,0,1,.43-21C11.78,6.33,8,8.87,8,16.17,8,23,11.35,25.55,13.72,26.47Z","M12.6,26.19a10.73,10.73,0,0,1,0-20.35C10.23,7,7.5,9.67,7.5,16s2.73,9,5.1,10.16Z","M12.23,26a10.7,10.7,0,0,1,0-20C9.77,7.19,7,9.9,7,16S9.77,24.81,12.23,26Z",null,"M19.77,26C22.23,24.81,25,22.1,25,16S22.23,7.19,19.77,6a10.7,10.7,0,0,1,0,20Z","M19.4,26.16C21.77,25,24.5,22.33,24.5,16S21.77,7,19.4,5.84a10.71,10.71,0,0,1,0,20.32Z","M18.28,26.47C20.65,25.55,24,23,24,16.17c0-7.3-3.78-9.84-6.15-10.72a10.71,10.71,0,0,1,.43,21Z","M17.54,26.6c2.19-.84,6-3.34,6-10.72,0-7.12-3.5-9.59-5.72-10.44a10.71,10.71,0,0,1-.24,21.16Z","M17.51,26.6c1.92-.81,5-3.23,5-10.5,0-7.49-3.26-9.93-5.16-10.73a10.71,10.71,0,0,1,.17,21.23Z","M17.19,26.65c1.62-.75,4.31-3.12,4.31-10.52,0-7.63-2.86-10-4.45-10.8a10.72,10.72,0,0,1,.14,21.32Z","M16.84,26.68c1.31-.74,3.66-3.11,3.66-10.68S18.15,6.06,16.84,5.32a10.71,10.71,0,0,1,0,21.36Z","M16.45,26.7c.95-.78,3.05-3.34,3.05-10.7S17.4,6.08,16.45,5.3a10.71,10.71,0,0,1,0,21.4Z","M16.3,26.7c.67-.78,2.2-3.37,2.2-10.62S16.94,6.1,16.29,5.3a10.7,10.7,0,0,1,0,21.4Z","M16.14,26.71c.37-.86,1.36-3.79,1.36-10.63s-1-9.91-1.37-10.79a10.71,10.71,0,0,1,0,21.42Z","M16,26.72A85.59,85.59,0,0,0,16.5,16,85.59,85.59,0,0,0,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72V5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72h0A85.59,85.59,0,0,1,15.5,16,85.59,85.59,0,0,1,16,5.28h0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72h-.14c-.37-.86-1.36-3.79-1.36-10.63s1-9.91,1.37-10.79H16a10.72,10.72,0,0,1,0,21.44Z","M16,26.72l-.3,0c-.67-.78-2.2-3.37-2.2-10.62s1.56-10,2.21-10.78l.29,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72l-.45,0c-1-.78-3.05-3.34-3.05-10.7s2.1-9.92,3.05-10.7l.45,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72c-.28,0-.56,0-.84,0C13.85,25.94,11.5,23.57,11.5,16s2.35-9.94,3.66-10.68c.28,0,.56,0,.84,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a11.7,11.7,0,0,1-1.19-.07c-1.62-.75-4.31-3.12-4.31-10.52,0-7.63,2.86-10,4.45-10.8.35,0,.7,0,1.05,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.85,10.85,0,0,1-1.51-.12c-1.92-.81-5-3.23-5-10.5,0-7.49,3.26-9.93,5.16-10.73A11.9,11.9,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a11.16,11.16,0,0,1-1.54-.12c-2.19-.84-6-3.34-6-10.72,0-7.12,3.5-9.59,5.72-10.44A10.43,10.43,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.69,10.69,0,0,1-2.28-.25C11.35,25.55,8,23,8,16.17c0-7.3,3.78-9.84,6.15-10.72A11.26,11.26,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.63,10.63,0,0,1-3.4-.56C10.23,25,7.5,22.33,7.5,16s2.73-9,5.1-10.16A10.72,10.72,0,1,1,16,26.72Z","M16,26.72a10.52,10.52,0,0,1-3.77-.7C9.77,24.81,7,22.1,7,16S9.77,7.19,12.23,6A10.52,10.52,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z"],Kd={"New Moon":Ie[0],"New Moon Fading":Ie[1],"New Moon Faded":Ie[2],"Waxing Crescent Rising":Ie[3],"Waxing Crescent Risen":Ie[4],"Waxing Crescent":Ie[6],"Waxing Crescent Fading":Ie[7],"Waxing Crescent Faded":Ie[8],"First Quarter Rising":Ie[9],"First Quarter Risen":Ie[10],"First Quarter":Ie[12],"First Quarter Fading":Ie[13],"First Quarter Faded":Ie[14],"Waxing Gibbous Rising":Ie[15],"Waxing Gibbous Risen":Ie[16],"Waxing Gibbous":Ie[18],"Waxing Gibbous Fading":Ie[19],"Waxing Gibbous Faded":Ie[20],"Full Moon Rising":Ie[21],"Full Moon Risen":Ie[22],"Full Moon":Ie[24],"Full Moon Fading":Ie[25],"Full Moon Faded":Ie[26],"Waning Gibbous Rising":Ie[27],"Waning Gibbous Risen":Ie[28],"Waning Gibbous":Ie[30],"Waning Gibbous Fading":Ie[31],"Waning Gibbous Faded":Ie[32],"Last Quarter Rising":Ie[33],"Last Quarter Risen":Ie[34],"Last Quarter":Ie[36],"Last Quarter Fading":Ie[37],"Last Quarter Faded":Ie[38],"Waning Crescent Rising":Ie[39],"Waning Crescent Risen":Ie[40],"Waning Crescent":Ie[42],"Waning Crescent Fading":Ie[43],"Waning Crescent Faded":Ie[44],"New Moon Rising":Ie[45],"New Moon Risen":Ie[46]},Qd={4:["New Moon","First Quarter","Full Moon","Last Quarter"],8:["New Moon","Waxing Crescent","First Quarter","Waxing Gibbous","Full Moon","Waning Gibbous","Last Quarter","Waning Crescent"],16:["New Moon","New Moon Fading","Waxing Crescent","Waxing Crescent Fading","First Quarter","First Quarter Fading","Waxing Gibbous","Waxing Gibbous Fading","Full Moon","Full Moon Fading","Waning Gibbous","Waning Gibbous Fading","Last Quarter","Last Quarter Fading","Waning Crescent","Waning Crescent Fading"],24:["New Moon","New Moon Fading","Waxing Crescent Rising","Waxing Crescent","Waxing Crescent Fading","First Quarter Rising","First Quarter","First Quarter Fading","Waxing Gibbous Rising","Waxing Gibbous","Waxing Gibbous Fading","Full Moon Rising","Full Moon","Full Moon Fading","Waning Gibbous Rising","Waning Gibbous","Waning Gibbous Fading","Last Quarter Rising","Last Quarter","Last Quarter Fading","Waning Crescent Rising","Waning Crescent","Waning Crescent Fading","New Moon Rising"],40:["New Moon","New Moon Fading","New Moon Faded","Waxing Crescent Rising","Waxing Crescent Risen","Waxing Crescent","Waxing Crescent Fading","Waxing Crescent Faded","First Quarter Rising","First Quarter Risen","First Quarter","First Quarter Fading","First Quarter Faded","Waxing Gibbous Rising","Waxing Gibbous Risen","Waxing Gibbous","Waxing Gibbous Fading","Waxing Gibbous Faded","Full Moon Rising","Full Moon Risen","Full Moon","Full Moon Fading","Full Moon Faded","Waning Gibbous Rising","Waning Gibbous Risen","Waning Gibbous","Waning Gibbous Fading","Waning Gibbous Faded","Last Quarter Rising","Last Quarter Risen","Last Quarter","Last Quarter Fading","Last Quarter Faded","Waning Crescent Rising","Waning Crescent Risen","Waning Crescent","Waning Crescent Fading","Waning Crescent Faded","New Moon Rising","New Moon Risen"]};function X0(t){let e,n,a,r,i,o,l,s;return{c(){e=an("svg"),n=an("circle"),r=an("path"),o=an("circle"),D(n,"cx","16"),D(n,"cy","16"),D(n,"r","10"),D(n,"fill",a=t[0].faceColor),D(r,"class","shadow"),D(r,"fill",i=t[0].shadowColor),D(r,"d",t[4]),D(o,"cx","16"),D(o,"cy","16"),D(o,"r","10"),D(o,"fill","none"),D(o,"stroke","#000"),D(o,"stroke-width","2px"),D(e,"class","moon"),D(e,"id",l=t[0].id),D(e,"preserveAspectRatio","xMidYMid"),D(e,"aria-label",s=t[1]?`${t[0].name} -${t[3]}`:null),D(e,"width",t[2]),D(e,"height",t[2]),D(e,"viewBox","0 0 32 32")},m(d,u){q(d,e,u),E(e,n),E(e,r),E(e,o)},p(d,[u]){u&1&&a!==(a=d[0].faceColor)&&D(n,"fill",a),u&1&&i!==(i=d[0].shadowColor)&&D(r,"fill",i),u&16&&D(r,"d",d[4]),u&1&&l!==(l=d[0].id)&&D(e,"id",l),u&11&&s!==(s=d[1]?`${d[0].name} -${d[3]}`:null)&&D(e,"aria-label",s),u&4&&D(e,"width",d[2]),u&4&&D(e,"height",d[2])},i:X,o:X,d(d){d&&O(e)}}}function J0(t,e,n){let a,{moon:r}=e,{label:i=!0}=e,{size:o=28}=e,{phase:l}=e;return t.$$set=s=>{"moon"in s&&n(0,r=s.moon),"label"in s&&n(1,i=s.label),"size"in s&&n(2,o=s.size),"phase"in s&&n(3,l=s.phase)},t.$$.update=()=>{if(t.$$.dirty&8){e:n(4,a=Kd[l])}},[r,i,o,l,a]}var Xd=class extends de{constructor(e){super();fe(this,e,J0,X0,se,{moon:0,label:1,size:2,phase:3})}},Rn=Xd;var en=xe(require("obsidian"));var vs=class extends en.Modal{constructor(e,n,a){super(e);this.calendar=n;this.saved=!1;this.moon={name:null,cycle:null,offset:null,faceColor:"#fff",shadowColor:"#000",id:et(6)};a&&(this.moon={...a},this.editing=!0),this.containerEl.addClass("fantasy-calendar-create-moon")}async display(){this.contentEl.empty(),this.contentEl.createEl("h3",{text:this.editing?"Edit Moon":"New Moon"}),this.infoEl=this.contentEl.createDiv("moon-info"),this.buildInfo(),new en.Setting(this.contentEl).addButton(e=>{e.setButtonText("Save").setCta().onClick(()=>{if(!this.moon.name?.length){new en.Notice("The moon must have a name.");return}if(!this.moon.cycle){new en.Notice("The moon must have a positive cycle.");return}this.saved=!0,this.close()})}).addExtraButton(e=>{e.setIcon("cross").setTooltip("Cancel").onClick(()=>this.close())})}buildInfo(){this.infoEl.empty(),new en.Setting(this.infoEl).setName("Name").addText(e=>{e.setValue(this.moon.name).onChange(n=>{this.moon.name=n})}),new en.Setting(this.infoEl).setName("Cycle").setDesc("How many days it takes for the moon to complete a full cycle.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.moon.cycle}`).onChange(n=>{isNaN(Number(n))||(this.moon.cycle=Number(n))})}),new en.Setting(this.infoEl).setName("Offset").setDesc("Shift the starting moon phase by a number of days.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.moon.offset}`).onChange(n=>{isNaN(Number(n))||(this.moon.offset=Number(n))})}),new en.Setting(this.infoEl).setName("Face Color").addText(e=>{e.inputEl.setAttr("type","color"),e.setValue(this.moon.faceColor).onChange(n=>{this.moon.faceColor=n})}),new en.Setting(this.infoEl).setName("Shadow Color").addText(e=>{e.inputEl.setAttr("type","color"),e.setValue(this.moon.shadowColor).onChange(n=>{this.moon.shadowColor=n})})}async onOpen(){await this.display()}};function $0(t){be(t,"svelte-v24qmo",".moon.svelte-v24qmo{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.setting-item-name.svelte-v24qmo{display:flex;align-items:center}.icons.svelte-v24qmo{display:flex;align-self:flex-start;justify-self:flex-end;align-items:center}.icon.svelte-v24qmo{align-items:center}")}function Jd(t,e,n){let a=t.slice();return a[13]=e[n],a}function e1(t){let e,n,a=t[1],r=[];for(let o=0;oW(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o{u[v]=null}),Ce(),o=u[i],o?o.p(h,y):(o=u[i]=d[i](h),o.c()),R(o,1),o.m(l.parentNode,l))},i(h){s||(R(e.$$.fragment,h),R(a.$$.fragment,h),R(o),s=!0)},o(h){W(e.$$.fragment,h),W(a.$$.fragment,h),W(o),s=!1},d(h){J(e,h),h&&O(n),J(a,h),h&&O(r),u[i].d(h),h&&O(l)}}}function a1(t){let e,n;return e=new ct({props:{name:"Moons",$$slots:{default:[n1]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&65543&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function r1(t,e,n){let a,r,{calendar:i}=e,{plugin:o}=e,l=Se(),s=p=>{let k=new bs.ExtraButtonComponent(p).setIcon("trash").setTooltip("Delete")},d=p=>{new bs.ExtraButtonComponent(p).setIcon("pencil").setTooltip("Edit")},u=p=>{n(0,i.static.moons=i.static.moons.filter(k=>k.id!==p.id),i)},c=p=>{let k=new vs(o.app,i,p);k.onClose=()=>{if(!!k.saved){if(k.editing){let C=i.static.moons.findIndex(A=>A.id===k.moon.id);i.static.moons.splice(C,1,{...k.moon})}else i.static.moons.push({...k.moon});n(1,a=i.static.moons)}},k.open()},h=()=>n(0,i.static.displayMoons=!i.static.displayMoons,i),y=()=>c(),m=p=>c(p),v=p=>u(p);return t.$$set=p=>{"calendar"in p&&n(0,i=p.calendar),"plugin"in p&&n(7,o=p.plugin)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=i.static.moons)}if(t.$$.dirty&1){e:n(2,r=i.static.displayMoons)}},[i,a,r,s,d,u,c,o,h,y,m,v]}var ef=class extends de{constructor(e){super();fe(this,e,r1,a1,se,{calendar:0,plugin:7},$0)}},tf=ef;var ws=xe(require("obsidian"));function i1(t){be(t,"svelte-1rh93fc",".leapday.svelte-1rh93fc.svelte-1rh93fc{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.leapday-info.svelte-1rh93fc.svelte-1rh93fc{width:100%}.icons.svelte-1rh93fc.svelte-1rh93fc{display:flex;align-self:center;justify-self:flex-end;align-items:center}.leapday.svelte-1rh93fc .icon.svelte-1rh93fc{align-items:center}")}function o1(t){let e,n,a,r=t[0].name+"",i,o,l,s,d,u,c,h,y,m,v,p,k;return{c(){e=T("div"),n=T("div"),a=T("span"),i=me(r),o=j(),l=T("div"),s=me(t[1]),d=j(),u=T("div"),c=T("div"),y=j(),m=T("div"),D(a,"class","setting-item-name"),D(l,"class","setting-item-description"),D(n,"class","leapday-info svelte-1rh93fc"),D(c,"class","icon svelte-1rh93fc"),D(m,"class","icon svelte-1rh93fc"),D(u,"class","icons svelte-1rh93fc"),D(e,"class","leapday svelte-1rh93fc")},m(C,A){q(C,e,A),E(e,n),E(n,a),E(a,i),E(n,o),E(n,l),E(l,s),E(e,d),E(e,u),E(u,c),E(u,y),E(u,m),p||(k=[le(h=t[4].call(null,c)),ie(c,"click",t[5]),le(v=t[3].call(null,m)),ie(m,"click",t[6])],p=!0)},p(C,[A]){A&1&&r!==(r=C[0].name+"")&&we(i,r),A&2&&we(s,C[1])},i:X,o:X,d(C){C&&O(e),p=!1,_e(k)}}}function s1(t,e,n){let a,r=Se(),i=u=>{new ws.ExtraButtonComponent(u).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},o=u=>{new ws.ExtraButtonComponent(u).setIcon("pencil").setTooltip("Edit")},{leapday:l}=e,s=()=>r("edit"),d=()=>r("delete");return t.$$set=u=>{"leapday"in u&&n(0,l=u.leapday)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=Ua(l))}},[l,a,r,i,o,s,d]}var nf=class extends de{constructor(e){super();fe(this,e,s1,o1,se,{leapday:0},i1)}},af=nf;var gf=xe(Vn()),An=xe(require("obsidian"));var vr=xe(require("obsidian"));function l1(t){be(t,"svelte-n1tx0h",".intercalary-settings.svelte-n1tx0h{display:flex;justify-content:space-around}.buttons.svelte-n1tx0h{display:flex;justify-content:flex-end}")}function rf(t,e,n){let a=t.slice();return a[24]=e[n],a}function of(t,e,n){let a=t.slice();return a[27]=e[n],a}function sf(t,e,n){let a=t.slice();return a[30]=e[n],a[32]=n,a}function lf(t){let e,n=(t[30].name??"")+"",a,r,i,o;return{c(){e=T("option"),a=me(n),r=j(),e.__value=i=t[32],e.value=e.__value,e.selected=o=t[32]==t[0].timespan},m(l,s){q(l,e,s),E(e,a),E(e,r)},p(l,s){s[0]&2&&n!==(n=(l[30].name??"")+"")&&we(a,n),s[0]&1&&o!==(o=l[32]==l[0].timespan)&&(e.selected=o)},d(l){l&&O(e)}}}function uf(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k=t[3],C=[];for(let A=0;At[18].call(c)),D(s,"class","after intercalary-field"),D(e,"class","setting-item intercalary-settings svelte-n1tx0h")},m(A,S){q(A,e,S),E(e,n),E(n,a),E(n,i),E(n,o),E(e,l),E(e,s),E(s,d),E(s,u),E(s,c),E(c,h),E(h,y);for(let _=0;_Month -
The leap day will be added to this month.
`,o=j(),l=T("div"),s=T("select");for(let M=0;Mt[15].call(s)),D(l,"class","setting-item-control"),D(r,"class","setting-item"),D(e,"class","fantasy-calendar-nested-settings"),D(v,"class","buttons svelte-n1tx0h")},m(M,x){q(M,e,x),ee(n,e,null),E(e,a),E(e,r),E(r,i),E(r,o),E(r,l),E(l,s);for(let V=0;V{let H=new Ds(d,u.interval.length>0,B);H.onClose=()=>{!H.saved||!H.condition.interval||(B?u.interval.splice(u.interval.indexOf(B),1,H.condition):u.interval.push(H.condition),n(0,u))},H.open()},y=B=>{let H=[`${B.interval}`];return B.exclusive&&H.push("(Exclusive)"),B.ignore&&H.push(" - Ignoring Offset"),H.join(" ")},m=B=>{new vr.ExtraButtonComponent(B).setIcon("pencil")},v=B=>{new vr.ExtraButtonComponent(B).setIcon("trash")},p=B=>{new vr.ButtonComponent(B).setButtonText("Cancel").setCta()},k=B=>n(0,u.name=B.detail,u);function C(){u.timespan=vn(this),n(0,u)}let A=B=>n(0,u.intercalary=!u.intercalary,u),S=()=>n(0,u.numbered=!u.numbered,u);function _(){u.after=vn(this),n(0,u)}let F=B=>n(0,u.offset=B.detail,u),w=()=>h(),M=B=>h(B),x=B=>n(0,u.interval=u.interval.filter(H=>H!=B),u),V=()=>s("cancel");return t.$$set=B=>{"app"in B&&n(11,d=B.app),"leapDay"in B&&n(0,u=B.leapDay),"calendar"in B&&n(12,c=B.calendar)},t.$$.update=()=>{if(t.$$.dirty[0]&1){e:n(4,a=u.intercalary)}if(t.$$.dirty[0]&4096){e:n(1,r=c.static.months)}if(t.$$.dirty[0]&3){e:n(13,i=r[u.timespan])}if(t.$$.dirty[0]&8192){e:n(3,o=i.length?[...Array(i.length).keys()].map(B=>B+1):[])}if(t.$$.dirty[0]&1){e:n(2,l=u.interval.sort((B,H)=>B.interval-H.interval))}},[u,r,l,o,a,s,h,y,m,v,p,d,c,i,k,C,A,S,_,F,w,M,x,V]}var ff=class extends de{constructor(e){super();fe(this,e,d1,c1,se,{app:11,leapDay:0,calendar:12},l1,[-1,-1])}},hf=ff;function f1(t){let e,n,a,r,i,o;return e=new En({props:{type:"number",name:"Interval",desc:"How often the condition applies.",value:t[0].interval,warn:!t[0].interval}}),e.$on("blur",t[2]),a=new Tt({props:{disabled:!t[1],name:"Exclusive",desc:"If true, the leap day will not apply when the year meets the condition.\\n\\nRequires the leap day to have at least one non-exclusive condition.",value:t[0].exclusive}}),a.$on("click",t[3]),i=new Tt({props:{name:"Ignore Offset",desc:"The condition will ignore the leap day's offset when checking to apply.",value:t[0].ignore}}),i.$on("click",t[4]),{c(){te(e.$$.fragment),n=j(),te(a.$$.fragment),r=j(),te(i.$$.fragment)},m(l,s){ee(e,l,s),q(l,n,s),ee(a,l,s),q(l,r,s),ee(i,l,s),o=!0},p(l,[s]){let d={};s&1&&(d.value=l[0].interval),s&1&&(d.warn=!l[0].interval),e.$set(d);let u={};s&2&&(u.disabled=!l[1]),s&1&&(u.value=l[0].exclusive),a.$set(u);let c={};s&1&&(c.value=l[0].ignore),i.$set(c)},i(l){o||(R(e.$$.fragment,l),R(a.$$.fragment,l),R(i.$$.fragment,l),o=!0)},o(l){W(e.$$.fragment,l),W(a.$$.fragment,l),W(i.$$.fragment,l),o=!1},d(l){J(e,l),l&&O(n),J(a,l),l&&O(r),J(i,l)}}}function h1(t,e,n){let{canBeExclusive:a}=e,{condition:r}=e,i=s=>n(0,r.interval=s.detail,r),o=()=>a?n(0,r.exclusive=!r.exclusive,r):null,l=()=>n(0,r.ignore=!r.ignore,r);return t.$$set=s=>{"canBeExclusive"in s&&n(1,a=s.canBeExclusive),"condition"in s&&n(0,r=s.condition)},[r,a,i,o,l]}var mf=class extends de{constructor(e){super();fe(this,e,h1,f1,se,{canBeExclusive:1,condition:0})}},pf=mf;var _s=class extends An.Modal{constructor(e,n,a){super(e);this.calendar=n;this.saved=!0;this.leapday={id:et(6),name:"Leap Day",interval:[],intercalary:!1,timespan:0,offset:0,type:"leapday"};a&&(this.leapday=(0,gf.default)(a),this.editing=!0),this.containerEl.addClasses(["fantasy-calendar-create-leapday","fantasy-calendar-settings"])}async display(){this.titleEl.setText(this.editing?"Edit Leap Day":"New Leap Day"),new hf({target:this.contentEl,props:{leapDay:this.leapday,calendar:this.calendar,app:this.app}}).$on("cancel",()=>{this.saved=!1,this.close()})}async onOpen(){await this.display()}},Ds=class extends An.Modal{constructor(e,n,a){super(e);this.app=e;this.canBeExclusive=n;this.saved=!0;this.editing=!1;this.condition={interval:null,exclusive:!1,ignore:!1};a&&(this.condition={...a},this.editing=!0)}onOpen(){this.containerEl.addClasses(["fantasy-calendar-settings","fantasy-calendar-nested-settings"]),this.contentEl.empty(),this.titleEl.setText("Leap Day Condition"),new pf({target:this.contentEl,props:{canBeExclusive:this.canBeExclusive,condition:this.condition}}),this.buttonsEl=this.contentEl.createDiv("fantasy-context-buttons setting-item"),new An.ButtonComponent(this.buttonsEl).setCta().setButtonText("Cancel").onClick(()=>{this.saved=!1,this.close()})}old(){new An.Setting(this.contentEl).setName("Interval").setDesc("How often the condition applies.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.condition.interval}`).onChange(n=>{isNaN(Number(n))||(this.condition.interval=Number(n))})}),new An.Setting(this.contentEl).setName("Exclusive").setDesc(`If true, the leap day will not apply when the year meets the condition. - -Requires the leap day to have at least one non-exclusive condition.`).addToggle(e=>e.setDisabled(!this.canBeExclusive).setValue(this.condition.exclusive).onChange(n=>this.condition.exclusive=n)),new An.Setting(this.contentEl).setName("Ignore Offset").setDesc("The condition will ignore the leap day's offset when checking to apply.").addToggle(e=>e.setValue(this.condition.ignore).onChange(n=>this.condition.ignore=n))}};function yf(t,e,n){let a=t.slice();return a[10]=e[n],a}function m1(t){let e,n,a=t[1],r=[];for(let o=0;oW(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o{s[y]=null}),Ce(),r=s[a],r?r.p(u,c):(r=s[a]=l[a](u),r.c()),R(r,1),r.m(i.parentNode,i))},i(u){o||(R(e.$$.fragment,u),R(r),o=!0)},o(u){W(e.$$.fragment,u),W(r),o=!1},d(u){J(e,u),u&&O(n),s[a].d(u),u&&O(i)}}}function y1(t){let e,n;return e=new ct({props:{name:"Leap Days",$$slots:{default:[g1]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&8195&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function v1(t,e,n){let a,{calendar:r}=e,{plugin:i}=e;Xe("store").subscribe(y=>n(4,r=y));let l=r.static.months?.filter(y=>y.name?.length).length==0,s=y=>{n(1,a=a.filter(m=>m.id!==y.id))},d=y=>{let m=new _s(i.app,r,y);m.onClose=()=>{if(!!m.saved&&!!m.leapday.interval.length&&!!m.leapday.name){if(m.editing){let v=r.static.leapDays.findIndex(p=>p.id===m.leapday.id);r.static.leapDays.splice(v,1,{...m.leapday})}else r.static.leapDays.push({...m.leapday});n(1,a=r.static.leapDays)}},m.open()},u=()=>d(),c=y=>d(y),h=y=>s(y);return t.$$set=y=>{"calendar"in y&&n(4,r=y.calendar),"plugin"in y&&n(5,i=y.plugin)},t.$$.update=()=>{if(t.$$.dirty&16){e:n(1,a=r.static.leapDays)}if(t.$$.dirty&16){e:n(0,l=r.static.months?.filter(y=>y.name?.length).length==0)}},[l,a,s,d,r,i,u,c,h]}var bf=class extends de{constructor(e){super();fe(this,e,v1,y1,se,{calendar:4,plugin:5})}},wf=bf;function b1(t){be(t,"svelte-v5i9t2","body:not(.is-mobile) .fantasy-calendar-creator.svelte-v5i9t2.svelte-v5i9t2{position:absolute;top:var(--top, 0);height:100%}body:not(.is-mobile) .fantasy-calendar-creator-inner.svelte-v5i9t2.svelte-v5i9t2{position:absolute;top:0;left:-2px;bottom:0;overflow:auto;display:grid;grid-template-rows:auto 1fr}.fantasy-calendar-creator.svelte-v5i9t2.svelte-v5i9t2,.fantasy-calendar-creator.svelte-v5i9t2 .fantasy-calendar-creator-inner.svelte-v5i9t2,.fantasy-calendar-creator.svelte-v5i9t2 .fantasy-creator-app.svelte-v5i9t2{background-color:var(--creator-background-color)}body.is-mobile .fantasy-calendar-creator.svelte-v5i9t2.svelte-v5i9t2,body.is-mobile .fantasy-calendar-creator.svelte-v5i9t2 .fantasy-creator-app.svelte-v5i9t2{padding:0px 10px;width:100%}.fantasy-creator-app.svelte-v5i9t2.svelte-v5i9t2{overflow:auto;height:100%}.fantasy-calendar-creator-header.svelte-v5i9t2.svelte-v5i9t2{margin:0}.top-nav.svelte-v5i9t2.svelte-v5i9t2{position:sticky;top:0;padding:10px 0px;background-color:inherit;z-index:3}.icons.svelte-v5i9t2.svelte-v5i9t2{display:flex;justify-content:space-between}.icons.svelte-v5i9t2 .left.svelte-v5i9t2{display:flex;align-items:center}.check.svelte-v5i9t2.svelte-v5i9t2{display:flex;gap:0.25rem;align-items:center}.additional.svelte-v5i9t2.svelte-v5i9t2{color:var(--text-faint)}.save.svelte-v5i9t2.svelte-v5i9t2{color:var(--text-error)}.save.can-save.svelte-v5i9t2.svelte-v5i9t2{color:var(--interactive-success)}.back.svelte-v5i9t2.svelte-v5i9t2{width:min-content}.back.svelte-v5i9t2 .clickable-icon{margin-left:0}")}function _f(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_,F,w,M,x,V,B,H,Y,he,oe,ce,Z,z,Q,De,ve,Ne,je,at,Pe;function gt(Fe,Ve){return Fe[7]?D1:w1}let xt=gt(t,-1),Je=xt(t);return S=new Dc({props:{calendar:t[0],plugin:t[2]}}),F=new dd({props:{calendar:t[0]}}),M=new vd({}),V=new Fd({props:{calendar:t[0],app:t[2].app}}),H=new Vu({}),he=new Hd({props:{plugin:t[2],calendar:t[0]}}),ce=new Zd({props:{calendar:t[0]}}),z=new tf({props:{plugin:t[2],calendar:t[0]}}),De=new wf({props:{calendar:t[0],plugin:t[2]}}),{c(){e=T("div"),n=T("div"),a=T("div"),r=T("div"),i=T("div"),s=j(),d=T("div"),Je.c(),u=j(),c=T("div"),y=j(),m=T("h3"),m.textContent="Calendar Creator",v=j(),p=T("div"),k=T("div"),A=j(),te(S.$$.fragment),_=j(),te(F.$$.fragment),w=j(),te(M.$$.fragment),x=j(),te(V.$$.fragment),B=j(),te(H.$$.fragment),Y=j(),te(he.$$.fragment),oe=j(),te(ce.$$.fragment),Z=j(),te(z.$$.fragment),Q=j(),te(De.$$.fragment),D(i,"class","back svelte-v5i9t2"),D(i,"aria-label",o=t[7]?"Save and exit":"Exit without saving"),D(d,"class","check svelte-v5i9t2"),D(r,"class","left svelte-v5i9t2"),D(c,"class","cancel"),D(a,"class","icons svelte-v5i9t2"),D(m,"class","fantasy-calendar-creator-header svelte-v5i9t2"),D(n,"class","top-nav svelte-v5i9t2"),D(p,"class","fantasy-creator-app svelte-v5i9t2"),D(e,"class","inherit fantasy-calendar-creator-inner svelte-v5i9t2"),D(e,"style",ve=t[9]?"":`width: ${t[1]+4}px;`)},m(Fe,Ve){q(Fe,e,Ve),E(e,n),E(n,a),E(a,r),E(r,i),E(r,s),E(r,d),Je.m(d,null),E(a,u),E(a,c),E(n,y),E(n,m),E(e,v),E(e,p),E(p,k),E(p,A),ee(S,p,null),E(p,_),ee(F,p,null),E(p,w),ee(M,p,null),E(p,x),ee(V,p,null),E(p,B),ee(H,p,null),E(p,Y),ee(he,p,null),E(p,oe),ee(ce,p,null),E(p,Z),ee(z,p,null),E(p,Q),ee(De,p,null),je=!0,at||(Pe=[le(l=t[11].call(null,i)),ie(i,"click",t[17]),le(h=t[12].call(null,c)),ie(c,"click",t[18]),le(C=t[13].call(null,k)),ie(e,"introend",t[19]),ie(e,"outroend",t[20])],at=!0)},p(Fe,Ve){t=Fe,(!je||Ve&128&&o!==(o=t[7]?"Save and exit":"Exit without saving"))&&D(i,"aria-label",o),xt===(xt=gt(t,Ve))&&Je?Je.p(t,Ve):(Je.d(1),Je=xt(t),Je&&(Je.c(),Je.m(d,null)));let Rt={};Ve&1&&(Rt.calendar=t[0]),Ve&4&&(Rt.plugin=t[2]),S.$set(Rt);let Gt={};Ve&1&&(Gt.calendar=t[0]),F.$set(Gt);let Ft={};Ve&1&&(Ft.calendar=t[0]),Ve&4&&(Ft.app=t[2].app),V.$set(Ft);let Mt={};Ve&4&&(Mt.plugin=t[2]),Ve&1&&(Mt.calendar=t[0]),he.$set(Mt);let gn={};Ve&1&&(gn.calendar=t[0]),ce.$set(gn);let Ut={};Ve&4&&(Ut.plugin=t[2]),Ve&1&&(Ut.calendar=t[0]),z.$set(Ut);let tn={};Ve&1&&(tn.calendar=t[0]),Ve&4&&(tn.plugin=t[2]),De.$set(tn),(!je||Ve&2&&ve!==(ve=t[9]?"":`width: ${t[1]+4}px;`))&&D(e,"style",ve)},i(Fe){je||(R(S.$$.fragment,Fe),R(F.$$.fragment,Fe),R(M.$$.fragment,Fe),R(V.$$.fragment,Fe),R(H.$$.fragment,Fe),R(he.$$.fragment,Fe),R(ce.$$.fragment,Fe),R(z.$$.fragment,Fe),R(De.$$.fragment,Fe),It(()=>{Ne||(Ne=So(e,t[16],{x:t[1]*1.5,opacity:1},!0)),Ne.run(1)}),je=!0)},o(Fe){W(S.$$.fragment,Fe),W(F.$$.fragment,Fe),W(M.$$.fragment,Fe),W(V.$$.fragment,Fe),W(H.$$.fragment,Fe),W(he.$$.fragment,Fe),W(ce.$$.fragment,Fe),W(z.$$.fragment,Fe),W(De.$$.fragment,Fe),Ne||(Ne=So(e,t[16],{x:t[1]*1.5,opacity:1},!1)),Ne.run(0),je=!1},d(Fe){Fe&&O(e),Je.d(),J(S),J(F),J(M),J(V),J(H),J(he),J(ce),J(z),J(De),Fe&&Ne&&Ne.end(),at=!1,_e(Pe)}}}function w1(t){let e,n,a,r,i,o;return{c(){e=T("div"),a=j(),r=T("span"),r.textContent=`Additional information is required before - saving`,D(e,"class","save svelte-v5i9t2"),D(e,"aria-label",t[8]),D(r,"class","additional svelte-v5i9t2")},m(l,s){q(l,e,s),q(l,a,s),q(l,r,s),i||(o=le(n=t[15].call(null,e)),i=!0)},p(l,s){s&256&&D(e,"aria-label",l[8])},d(l){l&&O(e),l&&O(a),l&&O(r),i=!1,o()}}}function D1(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","save can-save svelte-v5i9t2"),D(e,"aria-label",t[8])},m(i,o){q(i,e,o),a||(r=le(n=t[15].call(null,e)),a=!0)},p(i,o){o&256&&D(e,"aria-label",i[8])},d(i){i&&O(e),a=!1,r()}}}function _1(t){let e,n,a=t[5]&&_f(t);return{c(){e=T("div"),a&&a.c(),D(e,"class","fantasy-calendar-creator svelte-v5i9t2"),$e(e,"--creator-background-color",t[3]),$e(e,"--top",t[4]+"px")},m(r,i){q(r,e,i),a&&a.m(e,null),n=!0},p(r,[i]){r[5]?a?(a.p(r,i),i&32&&R(a,1)):(a=_f(r),a.c(),R(a,1),a.m(e,null)):a&&(Ee(),W(a,1,1,()=>{a=null}),Ce()),(!n||i&8)&&$e(e,"--creator-background-color",r[3]),(!n||i&16)&&$e(e,"--top",r[4]+"px")},i(r){n||(R(a),n=!0)},o(r){W(a),n=!1},d(r){r&&O(e),a&&a.d()}}}function E1(t,e,n){let a,r,i=kn.Platform.isMobile,o=i;Un(()=>{n(5,o=!0)});let l=Se(),{width:s}=e,{calendar:d}=e,{plugin:u}=e,{color:c=null}=e,{top:h}=e,y=Da(d);y.subscribe(x=>{n(0,d=x)}),zn("store",y);let m=x=>{new kn.ExtraButtonComponent(x).setIcon("left-arrow-with-tail")},v=x=>{new kn.ExtraButtonComponent(x).setIcon("cross").setTooltip("Exit without saving")},p=x=>{let V=x.createDiv("fantasy-calendar-apply-preset");new kn.Setting(V).setName("Apply Preset").setDesc("Apply a common fantasy calendar as a preset.").addButton(B=>{B.setCta().setButtonText("Choose Preset").onClick(()=>{let H=new Bo(u.app);H.onClose=()=>{if(!!H.saved){if(n(0,d=(0,Df.default)(H.preset)),d?.name=="Gregorian Calendar"){let Y=new Date;n(0,d.current={year:Y.getFullYear(),month:Y.getMonth(),day:Y.getDate()},d)}y.set(d)}},H.open()})})},k=!1,C=()=>{if(!r&&!u.data.exit.saving){let x=new hs(u);x.onClose=()=>{x.confirmed&&n(5,o=!1),i&&l("exit",{saved:k,calendar:d})},x.open()}else n(6,k=!0),n(5,o=!1)},A=x=>{r?(0,kn.setIcon)(x,"checkmark"):hn(x)},S=(x,V)=>i?null:Du(x,V),_=()=>{C()},F=()=>n(5,o=!1),w=()=>l("flown"),M=()=>l("exit",{saved:k,calendar:d});return t.$$set=x=>{"width"in x&&n(1,s=x.width),"calendar"in x&&n(0,d=x.calendar),"plugin"in x&&n(2,u=x.plugin),"color"in x&&n(3,c=x.color),"top"in x&&n(4,h=x.top)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(8,a=Eu(d))}if(t.$$.dirty&1){e:n(7,r=Cu(d))}},[d,s,u,c,h,o,k,r,a,i,l,m,v,p,C,A,S,_,F,w,M]}var Ef=class extends de{constructor(e){super();fe(this,e,E1,_1,se,{width:1,calendar:0,plugin:2,color:3,top:4},b1)}},Es=Ef;var Cf;(function(a){a.none="None",a.monthly="Monthly",a.yearly="Yearly"})(Cf||(Cf={}));(0,Ge.addIcon)("fantasy-calendar-grip",'');(0,Ge.addIcon)("fantasy-calendar-warning",'');var Ei=class extends Ge.PluginSettingTab{constructor(e){super(e.app,e);this.plugin=e}get data(){return this.plugin.data}async display(){this.containerEl.empty(),this.containerEl.createEl("h2",{text:"Fantasy Calendars"}),this.containerEl.addClass("fantasy-calendar-settings"),this.contentEl=this.containerEl.createDiv("fantasy-calendar-settings-content"),this.buildInfo(this.contentEl.createDiv("fantasy-calendar-nested-settings")),this.calendarsEl=this.contentEl.createEl("details",{cls:"fantasy-calendar-nested-settings",attr:{...this.data.settingsToggleState.calendars?{open:"open"}:{}}}),this.buildCalendars(),this.buildEvents(this.contentEl.createEl("details",{cls:"fantasy-calendar-nested-settings",attr:{...this.data.settingsToggleState.events?{open:"open"}:{}}}))}buildInfo(e){e.empty(),new Ge.Setting(e).setName(`Reset "Don't Ask Again" Prompts`).setDesc(`All confirmations set to "Don't Ask Again" will be reset.`).addButton(n=>{n.setIcon("reset").onClick(()=>{this.plugin.data.exit={saving:!1,event:!1,calendar:!1},this.plugin.saveSettings()})}),new Ge.Setting(e).setName(createFragment(n=>{let a=n.createSpan("fantasy-calendar-warning");(0,Ge.setIcon)(a.createSpan("fantasy-calendar-warning"),"fantasy-calendar-warning"),a.createSpan({text:"Default Config Directory"})})).setDesc(createFragment(n=>{n.createSpan({text:"Please back up your data before changing this setting. Hidden directories must be manually entered."}),n.createEl("br"),n.createSpan({text:"Current directory: "});let a=this.data.configDirectory??this.app.vault.configDir;n.createEl("code",{text:a})})).addText(async n=>{let a=this.app.vault.getAllLoadedFiles().filter(i=>i instanceof Ge.TFolder);n.setPlaceholder(this.data.configDirectory??this.app.vault.configDir);let r=new ir(this.app,n,[...a]);r.onClose=async()=>{n.inputEl.value?await this.app.vault.adapter.exists(n.inputEl.value)||(this.data.configDirectory=n.inputEl.value,await this.plugin.saveSettings()):this.data.configDirectory=null},n.inputEl.onblur=async()=>{if(!n.inputEl.value)return;let i=await this.app.vault.adapter.exists(n.inputEl.value);this.data.configDirectory=n.inputEl.value,await this.plugin.saveSettings(),this.display()}}).addExtraButton(n=>{n.setTooltip("Reset to Default").setIcon("reset").onClick(async()=>{this.data.configDirectory=null,await this.plugin.saveSettings(),this.display()})})}buildCalendars(){this.calendarsEl.empty(),this.calendarsEl.ontoggle=()=>{this.data.settingsToggleState.calendars=this.calendarsEl.open};let e=this.calendarsEl.createEl("summary");new Ge.Setting(e).setHeading().setName("Calendar Management"),e.createDiv("collapser").createDiv("handle"),new Ge.Setting(this.calendarsEl).setName("Show Intercalary Months Separately").setDesc("Intercalary months will appear a distinct months in the calendar.").addToggle(n=>{n.setValue(this.data.showIntercalary).onChange(a=>{this.data.showIntercalary=a,this.plugin.saveCalendar()})}),new Ge.Setting(this.calendarsEl).setName("Default Calendar").setDesc("Views will open to this calendar by default.").addDropdown(n=>{n.addOption("none","None");for(let a of this.data.calendars)n.addOption(a.id,a.name);n.setValue(this.plugin.data.defaultCalendar),n.onChange(async a=>{if(a==="none"){this.plugin.data.defaultCalendar=null,this.plugin.saveSettings();return}this.plugin.data.defaultCalendar=a,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new Ge.Setting(this.calendarsEl).setName("Import Calendar").setDesc(createFragment(n=>{n.createSpan({text:"Import calendar from "}),n.createEl("a",{href:"https://app.fantasy-calendar.com",text:"Fantasy Calendar",cls:"external-link"})})).addButton(n=>{let a=createEl("input",{attr:{type:"file",name:"merge",accept:".json",multiple:!0,style:"display: none;"}});a.onchange=async()=>{let{files:r}=a;if(!!r.length){try{let i=[];for(let l of Array.from(r))i.push(JSON.parse(await l.text()));let o=Rr.import(i);for(let l of o)await this.plugin.addNewCalendar(l);this.display()}catch(i){new Ge.Notice(`There was an error while importing the calendar${r.length==1?"":"s"}.`),console.error(i)}a.value=null}},n.setButtonText("Choose Files"),n.buttonEl.addClass("calendar-file-upload"),n.buttonEl.appendChild(a),n.onClick(()=>a.click())}),new Ge.Setting(this.calendarsEl).setName("Create New Calendar").addButton(n=>n.setTooltip("Launch Calendar Creator").setIcon("plus-with-circle").onClick(async()=>{let a=await this.launchCalendarCreator();a&&(await this.plugin.addNewCalendar(a),this.display())})),this.existingEl=this.calendarsEl.createDiv("existing-calendars"),this.showCalendars()}showCalendars(){if(this.existingEl.empty(),!this.data.calendars.length){this.existingEl.createSpan({text:"No calendars created! Create a calendar to see it here."});return}for(let e of this.data.calendars)new Ge.Setting(this.existingEl).setName(e.name).setDesc(e.description??"").addExtraButton(n=>{n.setIcon("pencil").onClick(async()=>{let a=await this.launchCalendarCreator(e);a&&(this.plugin.addNewCalendar(a,e),await this.plugin.saveCalendar(),this.display())})}).addExtraButton(n=>{n.setIcon("trash").onClick(async()=>{!this.plugin.data.exit.calendar&&!await wd(this.plugin)||(this.plugin.data.calendars=this.plugin.data.calendars.filter(a=>a.id!=e.id),e.id==this.data.defaultCalendar&&(this.plugin.data.defaultCalendar=this.plugin.data.calendars[0]?.id,this.plugin.watcher.start()),await this.plugin.saveCalendar(),this.display())})})}buildEvents(e){e.empty(),e.ontoggle=()=>{this.data.settingsToggleState.events=e.open};let n=e.createEl("summary");new Ge.Setting(n).setHeading().setName("Events"),n.createDiv("collapser").createDiv("handle"),new Ge.Setting(e).setName("Add Events to Default Calendar").setDesc(createFragment(a=>{a.createSpan({text:"Add events found in notes to the default calendar if the "}),a.createEl("code",{text:"fc-calendar"}),a.createSpan({text:" frontmatter tag is not present."})})).addToggle(a=>{a.setValue(this.data.addToDefaultIfMissing).onChange(async r=>{this.data.addToDefaultIfMissing=r,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new Ge.Setting(e).setName("Display Event Previews").setDesc("Use the core Note Preview plugin to display event notes when hovered.").addToggle(a=>{a.setValue(this.data.eventPreview).onChange(r=>{this.data.eventPreview=r,this.plugin.saveSettings()})}),new Ge.Setting(e).setName("Write Event Data to Frontmatter").setDesc("Events linked to notes will write their data to the note frontmatter.").addToggle(a=>{a.setValue(this.data.eventFrontmatter).onChange(r=>{this.data.eventFrontmatter=r,this.plugin.saveSettings()})}),new Ge.Setting(e).setName("Parse Note Titles for Event Dates").setDesc("The plugin will parse note titles for event dates.").addToggle(a=>{a.setValue(this.data.parseDates).onChange(async r=>{this.data.parseDates=r,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new Ge.Setting(e).setName("Date Format").setClass(this.data.dailyNotes?"daily-notes":"no-daily-notes").setDesc(createFragment(a=>{if(a.createSpan({text:"Event dates will be parsed using this format."}),a.createSpan({text:"Only the "}),a.createEl("code",{text:"Y"}),a.createSpan({text:", "}),a.createEl("code",{text:"M"}),a.createSpan({text:", and "}),a.createEl("code",{text:"D"}),a.createEl("a",{text:"tokens",href:"https://momentjs.com/docs/#/displaying/format/",cls:"external-link"}),a.createSpan({text:" are supported."}),["Y","M","D"].some(r=>!this.data.dateFormat.includes(r))){a.createEl("br");let r=a.createSpan({cls:"fantasy-calendar-warning date-format"});(0,Ge.setIcon)(r.createSpan("fantasy-calendar-warning"),"fantasy-calendar-warning");let i=["Y","M","D"].filter(o=>!this.data.dateFormat.includes(o));r.createSpan({text:` Date format is missing: ${i.join(", ").replace(/, ([^,]*)$/," and $1")}`})}})).addText(a=>{a.setDisabled(this.data.dailyNotes).setValue(this.plugin.format).onChange(r=>{this.data.dateFormat=r,this.plugin.saveSettings()}),a.inputEl.onblur=()=>this.buildEvents(e)}).addExtraButton(a=>{if(!this.plugin.canUseDailyNotes){a.extraSettingsEl.detach();return}this.data.dailyNotes?a.setIcon("checkmark").setTooltip("Unlink from Daily Notes").onClick(()=>{this.data.dailyNotes=!1,this.buildEvents(e)}):a.setIcon("sync").setTooltip("Link with Daily Notes").onClick(()=>{this.data.dailyNotes=!0,this.buildEvents(e)})})}launchCalendarCreator(e=or){let n=(0,Ra.default)(e);if(Ge.Platform.isMobile){let a=new Af(this.plugin,n);return new Promise((r,i)=>{try{a.onClose=()=>{a.saved&&(e=(0,Ra.default)(a.calendar),r(e)),r()},a.open()}catch{i()}})}else return this.containerEl.addClass("fantasy-calendar-creator-open"),new Promise(a=>{let r=getComputedStyle(this.containerEl.closest(".modal")).backgroundColor,i=new Es({target:this.containerEl,props:{calendar:n,plugin:this.plugin,width:this.contentEl.clientWidth,color:r,top:this.containerEl.scrollTop}}),o=new ResizeObserver(()=>{i.$set({width:this.contentEl.clientWidth})});o.observe(this.contentEl),i.$on("exit",l=>{this.containerEl.removeClass("fantasy-calendar-creator-open"),i.$destroy(),l.detail.saved&&(e=(0,Ra.default)(l.detail.calendar),o.disconnect(),a(e)),a()})})}},Af=class extends Ge.Modal{constructor(e,n){super(e.app);this.plugin=e;this.saved=!1;this.calendar=(0,Ra.default)(n)}onOpen(){this.contentEl.setAttr("style","background-color: inherit; padding-top: 0px;");let e=new Es({target:this.contentEl,props:{calendar:this.calendar,plugin:this.plugin,width:this.contentEl.clientWidth,top:0}});e.$on("exit",n=>{n.detail.saved&&(this.calendar=(0,Ra.default)(n.detail.calendar),this.saved=!0),this.close(),e.$destroy()})}};var Me=xe(require("obsidian"));var br=xe(require("obsidian"));var kf=class{constructor(e,n,a){this.month=e;this.number=n;this.leapday=a;this.shouldUpdate=!1}get calendar(){return this.month.calendar}get date(){return{day:this.number,month:this.month.number,year:this.year}}get events(){return(!this._events||!this._events.length||this.shouldUpdate)&&(this._events=this.month.getEventsOnDay(this.date)),this._events}get longDate(){return{day:this.number,month:this.month.name,year:this.year}}get daysBefore(){return this.month.daysBefore+this.number-1-this.month.leapDays.filter(e=>e.numbered&&e.after!i.intercalary||i.intercalary&&i.numbered).length).keys()].map(i=>new kf(this,i+1,this.leapDays.find(o=>o.after==i)))}get id(){return this.data.id}get index(){return this.calendar.data.months.indexOf(this.data)}get name(){return this.data.name}get length(){return this.days.length}get firstWeekday(){return this.calendar.data.overflow?this.days[0].weekday:0}get lastWeekday(){return this.days[this.days.length-1].weekday}get type(){return this.data.type}getEventsOnDay(e){return(!this.events||!this.events.length||this.shouldUpdate)&&(this.days.forEach(n=>n.shouldUpdate=!0),this.events=this.calendar.getEventsForMonth(this),this.shouldUpdate=!1),this.events.filter(n=>{if((!n.date.year||n.date.year==e.year)&&(!n.date.month||n.date.month==e.month)&&n.date.day==e.day)return!0;if(!n.end&&!n.formulas?.length)return!1;let a={...n.date},r={...n.end??{}};a.year||(a.year=r.year=this.year),a.month||(a.month=r.month=this.number);let i=Number(this.calendar.hash(e));if(Number(this.calendar.hash(a))<=i&&i<=Number(this.calendar.hash(r)??1/0))if(n.formulas?.length){let o=this.calendar.totalDaysBeforeYear(a.year)+this.calendar.daysBeforeMonth(a.month,a.year,!0)+a.day;return(this.calendar.totalDaysBeforeYear(e.year)+this.calendar.daysBeforeMonth(e.month,e.year,!0)+e.day-o)%n.formulas[0].number==0}else return!0;return!1})}getMoonsForDay(e){return(!this.moons||!this.moons.length||this.shouldUpdateMoons)&&(this.moons=this.calendar.getMoonsForMonth(this)),this.moons[e.day-1]}},La=class extends br.Events{constructor(e,n){super();this.calendar=e;this.plugin=n;this._cache=new Map;this.displayed={year:null,month:null,day:null};this.viewing={year:null,month:null,day:null};this.displayed={...this.current},this.update(this.calendar),this.plugin.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-event-update",a=>{if(!a.has(this.calendar.id))return;let r=a.get(this.calendar.id);for(let i of r)!this._cache.has(i)||this.refreshYear(i)}))}addEvent(e){let n=e.date.year,a=e.date.month;this.refreshMonth(a,n)}refreshMonth(e,n){!this._cache.has(n)||!this._cache.get(n).months.has(e)||(this._cache.get(n).shouldUpdate=!0,this._cache.get(n).months.forEach(a=>a.shouldUpdate=!0),(n==this.displayed.year&&e==this.displayed.month||n==this.viewing.year&&e==this.viewing.month)&&this.trigger("month-update"))}refreshYear(e){!this._cache.has(e)||(this._cache.get(e).shouldUpdate=!0,this._cache.get(e).months.forEach(n=>n.shouldUpdate=!0),(e==this.displayed.year||e==this.viewing.year)&&this.trigger("month-update"))}getDayForDate(e){return this.getMonth(e.month,e.year).days[e.day-1]}getEventsForMonth(e){let{year:n,number:a}=e;if(this._cache.has(n)||this._cache.set(n,{events:[],shouldUpdate:!0,months:new Map}),this._cache.get(n).shouldUpdate){let i=this.calendar.events.filter(o=>{let l={...o.date},s={...o.end};return l.year==n||l.year==null?!0:l.year>n||!s&&!o.formulas?.length&&l.year=n||o.formulas?.length))});this._cache.set(n,{months:this._cache.get(n).months,events:i,shouldUpdate:!1})}return this._cache.get(n).events.filter(i=>{let o={...i.date},l={...i.end};return o.month==null||(o.year==n||o.year==null)&&o.month==a?!0:o.year>n||o.year==n&&o.month>a||!l&&!i.formulas?.length&&(o.month!=a||o.year=n&&l.month>=a)))})}getNameForYear(e){if(!this.data.useCustomYears)return`${e}`;if(this.data.useCustomYears&&e-1>=0&&e<=this.data.years?.length)return this.data.years[e-1].name}get displayWeeks(){return this.calendar.displayWeeks}getMonthsForYear(e){return this._cache.has(e)||this._cache.set(e,{events:[],shouldUpdate:!0,months:new Map(this.data.months.map((n,a)=>[a,new Ci(n,a,e,this)]))}),this._cache.get(e).months.size!=this.data.months.length&&this._cache.set(e,{...this._cache.get(e),months:new Map(this.data.months.map((n,a)=>[a,new Ci(n,a,e,this)]))}),Array.from(this._cache.get(e).months.values())}hash(e){if(e.year==null||e.month==null||e.day==null)return null;let n=`${this.data.months.length}`.length,a=`${e.month}`.padStart(n,"0"),r=`${this.maxDays}`.length,i=`${e.day}`.padStart(r,"0");return`${e.year}${a}${i}`}update(e){this.calendar=e??this.calendar,this.maxDays=Math.max(...this.data.months.map(n=>n.length)),this.standardMonths=this.data.months.filter(n=>n.type!="intercalary"),this.calendar?.current||(this.calendar.current={day:null,month:null,year:null}),Gn(this.calendar?.current.year,this.calendar)||(this.calendar.current.year=1),Wn(this.calendar?.current.month,this.calendar)||(this.calendar.current.month=0),Hn(this.calendar?.current.day,this.calendar)||(this.calendar.current.day=1),this.trigger("month-update"),this.trigger("day-update")}get categories(){return this.calendar.categories}get data(){return this.calendar.static}get current(){return this.calendar.current}get leapdays(){return this.data.leapDays??[]}get currentDate(){return yn(this.current,this.data.months)}get displayedDate(){return yn(this.displayed,this.data.months)}get viewedDate(){return yn(this.viewing,this.data.months)}reset(){this.displayed={...this.current},this.viewing={...this.current},this.trigger("month-update"),this.trigger("day-update")}setCurrentMonth(e){this.displayed.month=e,this.trigger("month-update")}goToNextDay(){let e=this.getDayForDate(this.viewing);this.viewing.day+=1,this.viewing.day>e.month.days.length&&(this.goToNext(),this.viewing.month=this.displayed.month,this.viewing.year=this.displayed.year,this.viewing.day=1),this.trigger("day-update")}goToNextCurrentDay(){this.current.day+=1;let e=this.getMonth(this.current.month,this.current.year);this.current.day>=e.days.length&&(this.current.day=1,this.current.month+=1,this.current.month>=this.data.months.length&&(this.current.month=0,this.current.year+=1)),this.trigger("day-update")}get nextMonthIndex(){return Sn(this.displayed.month+1,this.data.months.length)}get nextMonth(){return this.getMonth(this.displayed.month+1,this.displayed.year)}canGoToNextYear(e=this.displayed.year){return!this.data.useCustomYears||ethis.displayed.month){if(this.displayed.year==1){new br.Notice("This is the earliest year.");return}this.goToPreviousYear()}this.setCurrentMonth(e)}goToPreviousDay(){this.viewing.day-=1,this.viewing.day<1&&(this.goToPrevious(),this.viewing.month=this.displayed.month,this.viewing.year=this.displayed.year,this.viewing.day=this.currentMonth.days.length),this.trigger("day-update")}goToPreviousYear(){this.displayed.year-=1,this.trigger("year-update")}get weekdays(){return this.data.weekdays}get currentMonth(){return this.getMonth(this.displayed.month,this.displayed.year)}testLeapDay(e,n){return e.interval.sort((a,r)=>a.interval-r.interval).some(({interval:a,exclusive:r},i,o)=>{if(r&&i==0)return(n-e.offset)%a!=0;if(!r)return o[i+1]&&o[i+1].exclusive?(n-e.offset)%a==0&&(n-e.offset)%o[i+1].interval!=0:(n-e.offset)%a==0})}leapDaysForYear(e){return this.leapdays.filter(n=>this.testLeapDay(n,e))}leapDaysForMonth(e,n=this.displayed.year){return this.leapdays.filter(a=>a.timespan!=e?!1:this.testLeapDay(a,n))}getMonth(e,n,a=0){let r=this.data.months,i=Sn(e,r.length);if(e<0&&(n-=1),n==0)return null;if(e>=r.length&&(n+=1),this._cache.has(n)){if(this._cache.get(n).months.has(i))return this._cache.get(n).months.get(i)}else this._cache.set(n,{events:[],shouldUpdate:!0,months:new Map});if(r[i].type=="intercalary"&&a!=0)return this.getMonth(e+a,n,a);let o=new Ci(r[i],i,n,this);return this._cache.get(n).months.set(i,o),this._cache.set(n,this._cache.get(n)),o}getPaddedDaysForMonth(e){let n=e.days,a=[],r=this.getMonth(e.index-1,this.displayed.year,-1);e.firstWeekday>0&&e.type=="month"&&(a=r!=null?r.days.slice(-e.firstWeekday):Array(e.firstWeekday).fill(null));let i=[],o=this.getMonth(e.index+1,this.displayed.year,1);return e.lastWeekdaye.type==="month").reduce((e,n)=>e+n.length,0)}daysBeforeMonth(e,n,a=!1){return!e||e==0?0:this.data.months.slice(0,e).filter(r=>a?!0:r.type=="month").map((r,i)=>{let o=this.leapDaysForMonth(i,n);return r.length+o.filter(l=>!l.intercalary).length}).reduce((r,i)=>r+i,0)}dayNumberForDate(e){return this.daysBeforeMonth(e.month,e.year,!0)+e.day}get firstWeekday(){return this.data.firstWeekDay}get leapDaysBefore(){return this.displayed.year==1?0:this.leapDaysBeforeYear(this.displayed.year-1)}leapDaysBeforeYear(e){if(e==1)return 0;let n=e-1,a=0;for(let{interval:r,offset:i}of this.leapdays.filter(o=>!o.intercalary)){let o=0;for(let l=0;l!c.exclusive).map(c=>Math.floor((n+(c.ignore?0:i))/c.interval)).reduce((c,h)=>c+h,0),u=Math.floor((n+(s.ignore?0:i))/s.interval);s.exclusive?(o-=u,o+=d):(o+=u,o-=d)}a+=o}return a}get totalDaysBefore(){return this.totalDaysBeforeYear(this.displayed.year)}totalDaysBeforeYear(e,n=!1){return e<1?0:Math.abs(e-1)*this.data.months.filter(a=>n||a.type=="month").reduce((a,r)=>a+r.length,0)+this.leapDaysBeforeYear(e)}firstDayOfYear(e=this.displayed.year){return this.data.overflow?e==1?this.firstWeekday:Sn(this.totalDaysBeforeYear(e)%this.data.weekdays.length+this.firstWeekday+(this.data.offset??0),this.data.weekdays.length):0}get moons(){return this.data.moons}getMoonsForMonth(e){let n=[];for(let a of e.days){let r=this.totalDaysBeforeYear(e.year,!0)+this.daysBeforeMonth(e.number,e.year,!0)+a.number-1,i=[];for(let o of this.moons){let{offset:l,cycle:s}=o,d=24,u=(r-l)/s,h=(u-Math.floor(u))*d%d,y=Qd[d];i.push([o,y[Sn(Math.round(h),y.length)]])}n.push(i)}return n}};var Pa=xe(require("obsidian"));var Ai=xe(require("obsidian"));function C1(t){be(t,"svelte-1e1nyi2",".flag.svelte-1e1nyi2.svelte-1e1nyi2{cursor:pointer;position:relative;padding-left:0.125rem;text-align:left;width:100%;background-color:var(--hex-alpha);border-left:2px solid var(--color)}.flag-content.svelte-1e1nyi2.svelte-1e1nyi2{display:flex;gap:0.25rem;align-items:flex-start;justify-content:space-between}.day-view.svelte-1e1nyi2 .flag-content.svelte-1e1nyi2{justify-content:space-between}.clamp.svelte-1e1nyi2.svelte-1e1nyi2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:keep-all;overflow:hidden;text-overflow:ellipsis}.note.svelte-1e1nyi2.svelte-1e1nyi2{display:flex;align-self:center}.multi.svelte-1e1nyi2.svelte-1e1nyi2{flex-shrink:0;overflow:visible;width:unset}.multi.svelte-1e1nyi2 .clamp.svelte-1e1nyi2{-webkit-line-clamp:1;overflow:visible}.multi.start.svelte-1e1nyi2.svelte-1e1nyi2{margin-left:0}.multi.end.svelte-1e1nyi2.svelte-1e1nyi2{margin-right:0}.multi.first.svelte-1e1nyi2.svelte-1e1nyi2{overflow:visible;white-space:nowrap}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.first){color:transparent;overflow:hidden}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.start){border:0;margin-left:-6px}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.end){margin-right:-6px}.start.svelte-1e1nyi2>.flag-content.svelte-1e1nyi2{justify-content:flex-start;gap:1em}")}function xf(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","note svelte-1e1nyi2")},m(i,o){q(i,e,o),a||(r=le(n=t[9].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function A1(t){let e,n,a,r=t[0].name+"",i,o,l,s,d,u=t[0].note&&xf(t);return{c(){e=T("div"),n=T("div"),a=T("span"),i=me(r),o=j(),u&&u.c(),D(a,"class","svelte-1e1nyi2"),pe(a,"clamp",!t[1]),pe(a,"day-view",t[1]),D(n,"class","flag-content svelte-1e1nyi2"),D(e,"class","flag svelte-1e1nyi2"),D(e,"aria-label",l=t[1]?null:t[0].name),$e(e,"--hex-alpha",t[6]+"40"),$e(e,"--color",t[6]),pe(e,"multi",t[4]),pe(e,"start",t[2]),pe(e,"end",t[3]),pe(e,"first",t[5]),pe(e,"day-view",t[1])},m(c,h){q(c,e,h),E(e,n),E(n,a),E(a,i),E(n,o),u&&u.m(n,null),s||(d=[ie(e,"click",t[12]),ie(e,"mouseover",t[13]),ie(e,"focus",k1),ie(e,"contextmenu",t[14])],s=!0)},p(c,[h]){h&1&&r!==(r=c[0].name+"")&&we(i,r),h&2&&pe(a,"clamp",!c[1]),h&2&&pe(a,"day-view",c[1]),c[0].note?u||(u=xf(c),u.c(),u.m(n,null)):u&&(u.d(1),u=null),h&3&&l!==(l=c[1]?null:c[0].name)&&D(e,"aria-label",l),h&64&&$e(e,"--hex-alpha",c[6]+"40"),h&64&&$e(e,"--color",c[6]),h&16&&pe(e,"multi",c[4]),h&4&&pe(e,"start",c[2]),h&8&&pe(e,"end",c[3]),h&32&&pe(e,"first",c[5]),h&2&&pe(e,"day-view",c[1])},i:X,o:X,d(c){c&&O(e),u&&u.d(),s=!1,_e(d)}}}var k1=()=>{};function x1(t,e,n){let a=Se(),{event:r}=e,{date:i}=e,{dayView:o=!1}=e,l=!1,s=!1,d=!1,u=!1,{categories:c}=e,h=c.find(C=>C.id==r.category)?.color??ys,y=Ai.Platform.isMacOS?"Meta":"Control",m=C=>{(0,Ai.setIcon)(C,"note-glyph")},v=C=>{C.stopPropagation(),a("event-click",{event:r,modifier:C.getModifierState(y)})},p=C=>a("event-mouseover",{target:C.target,event:r}),k=C=>{C.stopPropagation(),a("event-context",{evt:C,event:r})};return t.$$set=C=>{"event"in C&&n(0,r=C.event),"date"in C&&n(10,i=C.date),"dayView"in C&&n(1,o=C.dayView),"categories"in C&&n(11,c=C.categories)},t.$$.update=()=>{if(t.$$.dirty&1039){e:r.end!=null&&!o&&(n(4,l=!0),n(2,s=i.day===r.date.day&&(r.date.month==null||i.month==r.date.month)&&(r.date.year==null||i.year===r.date.year)),n(5,u=s||i.day==1),n(3,d=i.day===r.end.day&&(r.end.month==null||i.month==r.end.month)&&(r.end.year==null||i.year===r.end.year)),s&&d&&(n(4,l=!1),n(2,s=!1),n(3,d=!1)))}if(t.$$.dirty&2049){e:n(6,h=c.find(C=>C.id==r.category)?.color??ys)}},[r,o,s,d,l,u,h,a,y,m,i,c,v,p,k]}var Ff=class extends de{constructor(e){super();fe(this,e,x1,A1,se,{event:0,date:10,dayView:1,categories:11},C1)}},Tf=Ff;function F1(t){be(t,"svelte-qnut28",".flags-container.svelte-qnut28{height:100%}.flag-container.svelte-qnut28{display:flex;flex-flow:column nowrap;gap:0.25rem}.overflow.svelte-qnut28{color:var(--text-muted);display:flex;justify-content:flex-end;width:100%}")}function Sf(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","flag-container svelte-qnut28")},m(i,o){q(i,e,o),a||(r=le(n=t[2].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Bf(t){let e,n,a;return{c(){e=T("span"),n=me("+"),a=me(t[1])},m(r,i){q(r,e,i),E(e,n),E(e,a)},p(r,i){i&2&&we(a,r[1])},d(r){r&&O(e)}}}function T1(t){let e,n=t[0],a,r,i=Sf(t),o=t[1]>0&&Bf(t);return{c(){e=T("div"),i.c(),a=j(),r=T("div"),o&&o.c(),D(r,"class","overflow svelte-qnut28"),D(e,"class","flags-container svelte-qnut28")},m(l,s){q(l,e,s),i.m(e,null),E(e,a),E(e,r),o&&o.m(r,null)},p(l,[s]){s&1&&se(n,n=l[0])&&(i.d(1),i=Sf(l),i.c(),i.m(e,a)),l[1]>0?o?o.p(l,s):(o=Bf(l),o.c(),o.m(r,null)):o&&(o.d(1),o=null)},i:X,o:X,d(l){l&&O(e),i.d(l),o&&o.d()}}}function S1(t,e,n){let{events:a=[]}=e,{categories:r}=e,{dayView:i=!1}=e,{date:o}=e,{calendar:l}=e,s=0,d=Se(),u,c=0,h=y=>{if(a.length){let m=y?.parentElement?.getBoundingClientRect()?.height;if(!i&&(m==null||Math.floor(m)==Math.floor(c)))return;c=m,u=y,y.empty(),n(1,s=0);let v=m;for(let p of a){let k=new Tf({target:y,props:{event:p,categories:r,dayView:i,date:o}});if(k.$on("event-click",C=>d("event-click",C.detail)),k.$on("event-mouseover",C=>d("event-mouseover",C.detail)),k.$on("event-context",C=>d("event-context",C.detail)),!i){if(v=m-y.getBoundingClientRect().height,v<0){y.lastElementChild.detach(),n(1,s=a.length-a.indexOf(p));break}else if(v==0){n(1,s=a.length-a.indexOf(p)-1);break}}}}};return l.on("view-resized",()=>{i||h(u)}),t.$$set=y=>{"events"in y&&n(0,a=y.events),"categories"in y&&n(3,r=y.categories),"dayView"in y&&n(4,i=y.dayView),"date"in y&&n(5,o=y.date),"calendar"in y&&n(6,l=y.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(0,a=[...a])}},[a,s,h,r,i,o,l]}var Mf=class extends de{constructor(e){super();fe(this,e,S1,T1,se,{events:0,categories:3,dayView:4,date:5,calendar:6},F1)}},ki=Mf;function B1(t){be(t,"svelte-1uhffao",".day-view.svelte-1uhffao{padding:5px 15px;display:flex;flex-flow:column nowrap;gap:0.5rem}.nav.svelte-1uhffao,.date.svelte-1uhffao{display:flex;justify-content:space-between;align-items:center}.left-nav.svelte-1uhffao{display:flex}.left-nav.svelte-1uhffao .clickable-icon{margin-right:0}.calendar-clickable.svelte-1uhffao{align-items:center;cursor:pointer;display:flex;justify-content:center}h3.svelte-1uhffao{margin:0}.day-view.svelte-1uhffao .flag-container > .flag{padding-left:0.5rem}.title-container.svelte-1uhffao{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center}.day-number.svelte-1uhffao{font-size:small}")}function Nf(t,e,n){let a=t.slice();return a[24]=e[n][0],a[25]=e[n][1],a}function If(t){let e,n,a,r;return{c(){e=T("div"),n=T("em"),a=me("Day "),r=me(t[8]),D(e,"class","day-number svelte-1uhffao")},m(i,o){q(i,e,o),E(e,n),E(n,a),E(n,r)},p(i,o){o&256&&we(r,i[8])},d(i){i&&O(e)}}}function Of(t){let e,n,a=t[5],r=[];for(let o=0;oW(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o{ce=null}),Ce());let Q={};z&8&&(Q.events=Z[3].events),z&128&&(Q.categories=Z[7]),z&4&&(Q.date=Z[2]),z&2&&(Q.calendar=Z[1]),B.$set(Q)},i(Z){H||(R(ce),R(B.$$.fragment,Z),H=!0)},o(Z){W(ce),W(B.$$.fragment,Z),H=!1},d(Z){Z&&O(e),oe&&oe.d(),ce&&ce.d(),J(B),Y=!1,_e(he)}}}function N1(t,e,n){let a,r,i,o,l,s,{displayDayNumber:d}=e,u=Xe("calendar"),c;u.subscribe(B=>{n(1,c=B)});let h;Xe("displayMoons").subscribe(B=>n(4,h=B)),c.on("day-update",()=>{n(2,r=c.viewing),n(6,a=c.viewedDate),n(3,i=c.getDayForDate(r)),n(5,l=i.moons)});let m=Se(),v=B=>{new Pa.ExtraButtonComponent(B).setIcon("cross").setTooltip("Close")},p=B=>{new Pa.ExtraButtonComponent(B).setIcon("fantasy-calendar-reveal").setTooltip("Show on Calendar").onClick(()=>{n(1,c.displayed.year=c.viewing.year,c),c.setCurrentMonth(c.viewing.month)})},k=B=>{new Pa.ExtraButtonComponent(B).setIcon("plus-with-circle").setTooltip("New Event").onClick(()=>m("event",r))},C=B=>{new Pa.ExtraButtonComponent(B).setIcon("left-arrow")},A=B=>{new Pa.ExtraButtonComponent(B).setIcon("right-arrow")},S=()=>m("reveal"),_=()=>m("close"),F=()=>c.goToPreviousDay(),w=()=>c.goToNextDay();function M(B){ue.call(this,t,B)}function x(B){ue.call(this,t,B)}function V(B){ue.call(this,t,B)}return t.$$set=B=>{"displayDayNumber"in B&&n(0,d=B.displayDayNumber)},t.$$.update=()=>{if(t.$$.dirty&2){e:n(6,a=c.viewedDate)}if(t.$$.dirty&2){e:n(2,r=c.viewing)}if(t.$$.dirty&6){e:n(3,i=c.getDayForDate(r))}if(t.$$.dirty&6){e:n(8,o=c.dayNumberForDate(r))}if(t.$$.dirty&8){e:n(5,l=i.moons)}if(t.$$.dirty&2){e:n(7,s=c.categories)}},[d,c,r,i,h,l,a,s,o,m,v,p,k,C,A,S,_,F,w,M,x,V]}var Rf=class extends de{constructor(e){super();fe(this,e,N1,M1,se,{displayDayNumber:0},B1)}},Lf=Rf;function I1(t){be(t,"svelte-1gou5hh",".dot.svelte-1gou5hh{display:inline-block;min-height:6px;min-width:6px;height:6px;width:6px;margin:0 2px}.active.svelte-1gou5hh{color:var(--text-on-accent)}")}function O1(t){let e,n,a,r;return{c(){e=an("svg"),n=an("circle"),D(n,"stroke",a=t[2]??"currentColor"),D(n,"fill",r=t[2]??"currentColor"),D(n,"cx","3"),D(n,"cy","3"),D(n,"r","2"),D(e,"class","dot svelte-1gou5hh"),D(e,"viewBox","0 0 6 6"),D(e,"xmlns","http://www.w3.org/2000/svg"),pe(e,"filled",t[0]),pe(e,"active",t[1])},m(i,o){q(i,e,o),E(e,n)},p(i,[o]){o&4&&a!==(a=i[2]??"currentColor")&&D(n,"stroke",a),o&4&&r!==(r=i[2]??"currentColor")&&D(n,"fill",r),o&1&&pe(e,"filled",i[0]),o&2&&pe(e,"active",i[1])},i:X,o:X,d(i){i&&O(e)}}}function q1(t,e,n){let{isFilled:a=!0}=e,{isActive:r=!1}=e,{color:i}=e;return t.$$set=o=>{"isFilled"in o&&n(0,a=o.isFilled),"isActive"in o&&n(1,r=o.isActive),"color"in o&&n(2,i=o.color)},[a,r,i]}var Pf=class extends de{constructor(e){super();fe(this,e,q1,O1,se,{isFilled:0,isActive:1,color:2},I1)}},jf=Pf;function R1(t){be(t,"svelte-1w3ytba",".dots-container.svelte-1w3ytba{width:100%}.dot-container.svelte-1w3ytba{display:flex;flex-flow:row nowrap;width:fit-content;margin:auto;line-height:6px;min-height:6px}.centered.svelte-1w3ytba{justify-content:center;align-items:center}.overflow.svelte-1w3ytba{color:var(--text-muted);font-size:xx-small;display:flex;justify-content:flex-end;width:100%;line-height:1.25}")}function Vf(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","dot-container centered svelte-1w3ytba")},m(i,o){q(i,e,o),a||(r=le(n=t[2].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Hf(t){let e,n,a;return{c(){e=T("span"),n=me("+"),a=me(t[1])},m(r,i){q(r,e,i),E(e,n),E(e,a)},p(r,i){i&2&&we(a,r[1])},d(r){r&&O(e)}}}function L1(t){let e,n=t[0],a,r,i=Vf(t),o=t[1]>0&&Hf(t);return{c(){e=T("div"),i.c(),a=j(),r=T("div"),o&&o.c(),D(r,"class","overflow svelte-1w3ytba"),D(e,"class","dots-container svelte-1w3ytba")},m(l,s){q(l,e,s),i.m(e,null),E(e,a),E(e,r),o&&o.m(r,null)},p(l,[s]){s&1&&se(n,n=l[0])&&(i.d(1),i=Vf(l),i.c(),i.m(e,a)),l[1]>0?o?o.p(l,s):(o=Hf(l),o.c(),o.m(r,null)):o&&(o.d(1),o=null)},i:X,o:X,d(l){l&&O(e),i.d(l),o&&o.d()}}}function P1(t,e,n){let{events:a=[]}=e,{categories:r}=e,{calendar:i}=e,o=0,l,s=0,d=c=>{if(l=c,a.length){let h=c.parentElement?.getBoundingClientRect()?.width;if(!h||Math.floor(h)==Math.floor(s))return;s=h;let y=h;c.empty(),n(1,o=0);for(let m of a)if(new jf({target:c,props:{color:u(m)}}),y=h-c.getBoundingClientRect().width,y<0){c.lastElementChild.detach(),n(1,o=a.length-a.indexOf(m));break}else if(y==0){n(1,o=a.length-a.indexOf(m)-1);break}}};i.on("view-resized",()=>{!l||d(l)});let u=c=>r.find(h=>h.id==c.category)?.color;return t.$$set=c=>{"events"in c&&n(0,a=c.events),"categories"in c&&n(3,r=c.categories),"calendar"in c&&n(4,i=c.calendar)},[a,o,d,r,i]}var Wf=class extends de{constructor(e){super();fe(this,e,P1,L1,se,{events:0,categories:3,calendar:4},R1)}},Gf=Wf;function j1(t){be(t,"svelte-3pptg2",".day.svelte-3pptg2{background-color:transparent;border:2px solid transparent;border-radius:4px;color:var(--color-text-day);cursor:pointer;font-size:0.8em;height:100%;padding:2px;position:relative;text-align:center;vertical-align:baseline;overflow:visible;display:flex;flex-flow:column nowrap}.active.svelte-3pptg2{background-color:var(--background-secondary)}.viewing.svelte-3pptg2{border:2px solid var(--background-modifier-border)}.adjacent-month.svelte-3pptg2{opacity:0.25}")}function Uf(t,e,n){let a=t.slice();return a[20]=e[n][0],a[21]=e[n][1],a}function V1(t){let e,n;return e=new Gf({props:{events:t[4],categories:t[9],calendar:t[0].calendar}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&16&&(i.events=a[4]),r&512&&(i.categories=a[9]),r&1&&(i.calendar=a[0].calendar),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function H1(t){let e,n,a,r=t[5]&&t[10]&&t[10].length&&zf(t);return n=new ki({props:{events:t[4],categories:t[9],date:t[8],calendar:t[0].calendar}}),n.$on("event-click",t[12]),n.$on("event-mouseover",t[13]),n.$on("event-context",t[14]),{c(){r&&r.c(),e=j(),te(n.$$.fragment)},m(i,o){r&&r.m(i,o),q(i,e,o),ee(n,i,o),a=!0},p(i,o){i[5]&&i[10]&&i[10].length?r?(r.p(i,o),o&1056&&R(r,1)):(r=zf(i),r.c(),R(r,1),r.m(e.parentNode,e)):r&&(Ee(),W(r,1,1,()=>{r=null}),Ce());let l={};o&16&&(l.events=i[4]),o&512&&(l.categories=i[9]),o&256&&(l.date=i[8]),o&1&&(l.calendar=i[0].calendar),n.$set(l)},i(i){a||(R(r),R(n.$$.fragment,i),a=!0)},o(i){W(r),W(n.$$.fragment,i),a=!1},d(i){r&&r.d(i),i&&O(e),J(n,i)}}}function zf(t){let e,n,a=t[10],r=[];for(let o=0;oW(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o{m[C]=null}),Ce(),l=m[o],l?l.p(p,k):(l=m[o]=y[o](p),l.c()),R(l,1),l.m(e,null)),(!u||k&2&&s!==(s=""+(_o(p[1]?"adjacent-month fantasy-adjacent-month":"")+" svelte-3pptg2")))&&D(e,"class",s),(!u||k&20&&d!==(d=!p[2]&&p[4].length?`${p[4].length} event${p[4].length==1?"":"s"}`:void 0))&&D(e,"aria-label",d),k&2&&pe(e,"day",!0),k&2&&pe(e,"fantasy-day",!0),k&130&&pe(e,"active",p[7]&&!p[1]),k&74&&pe(e,"viewing",p[3]&&p[6]&&!p[1])},i(p){u||(R(l),u=!0)},o(p){W(l),u=!1},d(p){p&&O(e),m[o].d(),c=!1,_e(h)}}}function G1(t,e,n){let a,r,i,o,l,s=Se(),{day:d}=e,{adjacent:u}=e,{fullView:c}=e,h=[],y;Xe("dayView").subscribe(w=>n(3,y=w));let v;Xe("displayMoons").subscribe(w=>n(5,v=w)),d.calendar.on("month-update",()=>{n(7,o=d.isCurrentDay),n(6,l=d.isDisplaying),n(4,h=d.events)}),d.calendar.on("day-update",()=>{n(7,o=d.isCurrentDay),n(6,l=d.isDisplaying)});function k(w){ue.call(this,t,w)}function C(w){ue.call(this,t,w)}function A(w){ue.call(this,t,w)}let S=()=>s("day-click",d),_=()=>s("day-doubleclick",d),F=w=>s("day-context-menu",{day:d,evt:w});return t.$$set=w=>{"day"in w&&n(0,d=w.day),"adjacent"in w&&n(1,u=w.adjacent),"fullView"in w&&n(2,c=w.fullView)},t.$$.update=()=>{if(t.$$.dirty&3){e:u||n(4,h=d.events)}if(t.$$.dirty&1){e:n(10,a=d.moons)}if(t.$$.dirty&1){e:n(9,r=d.calendar.categories)}if(t.$$.dirty&1){e:n(8,i=d.date)}if(t.$$.dirty&1){e:n(7,o=d.isCurrentDay)}if(t.$$.dirty&1){e:n(6,l=d.isDisplaying)}if(t.$$.dirty&8){e:n(3,y)}},[d,u,c,y,h,v,l,o,i,r,a,s,k,C,A,S,_,F]}var Zf=class extends de{constructor(e){super();fe(this,e,G1,W1,se,{day:0,adjacent:1,fullView:2},j1)}},wr=Zf;function U1(t){be(t,"svelte-1cfzxxk",`.fantasy-month.svelte-1cfzxxk.svelte-1cfzxxk{display:grid;grid-template-columns:repeat( - var(--calendar-columns), - var(--column-widths) - );grid-auto-rows:var(--calendar-rows)}.intercalary.svelte-1cfzxxk.svelte-1cfzxxk{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;border-top:1px solid var(--background-modifier-border);border-bottom:1px solid var(--background-modifier-border);border-radius:0;align-items:center}.intercalary.svelte-1cfzxxk span.month.svelte-1cfzxxk{text-align:center}.intercalary.svelte-1cfzxxk .fantasy-month.svelte-1cfzxxk{grid-template-columns:unset;grid-auto-columns:var(--column-widths);align-items:center;justify-content:center}.leapday-container.svelte-1cfzxxk.svelte-1cfzxxk{grid-column:span var(--calendar-columns);display:flex;justify-content:center;align-items:center;border-top:1px solid var(--background-modifier-border);border-bottom:1px solid var(--background-modifier-border);color:var(--text-accent)}.full-view.svelte-1cfzxxk.svelte-1cfzxxk{height:100%;margin-bottom:0.5rem}.month.svelte-1cfzxxk.svelte-1cfzxxk{padding:0.25rem}.month-name.svelte-1cfzxxk.svelte-1cfzxxk{margin:0}.month.svelte-1cfzxxk .fantasy-day.day{padding:0px}`)}function Kf(t,e,n){let a=t.slice();return a[24]=e[n],a}function Qf(t,e,n){let a=t.slice();return a[24]=e[n],a}function Xf(t,e,n){let a=t.slice();return a[29]=e[n],a}function Jf(t,e,n){let a=t.slice();return a[29]=e[n],a}function $f(t,e,n){let a=t.slice();return a[24]=e[n],a}function eh(t){let e,n=t[1].name+"",a;return{c(){e=T("h3"),a=me(n),D(e,"class","month-name svelte-1cfzxxk")},m(r,i){q(r,e,i),E(e,a)},p(r,i){i[0]&2&&n!==(n=r[1].name+"")&&we(a,n)},d(r){r&&O(e)}}}function th(t){let e,n=t[1].name+"",a;return{c(){e=T("span"),a=me(n),D(e,"class","month svelte-1cfzxxk")},m(r,i){q(r,e,i),E(e,a)},p(r,i){i[0]&2&&n!==(n=r[1].name+"")&&we(a,n)},d(r){r&&O(e)}}}function z1(t){let e;return{c(){e=T("div")},m(n,a){q(n,e,a)},p:X,i:X,o:X,d(n){n&&O(e)}}}function Y1(t){let e,n;return e=new wr({props:{day:t[24],adjacent:!0,fullView:t[3]}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&512&&(i.day=a[24]),r[0]&8&&(i.fullView=a[3]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function nh(t){let e,n,a,r,i=[Y1,z1],o=[];function l(s,d){return s[6]&&s[24]!=null?0:1}return e=l(t,[-1,-1]),n=o[e]=i[e](t),{c(){n.c(),a=Ue()},m(s,d){o[e].m(s,d),q(s,a,d),r=!0},p(s,d){let u=e;e=l(s,d),e===u?o[e].p(s,d):(Ee(),W(o[u],1,1,()=>{o[u]=null}),Ce(),n=o[e],n?n.p(s,d):(n=o[e]=i[e](s),n.c()),R(n,1),n.m(a.parentNode,a))},i(s){r||(R(n),r=!0)},o(s){W(n),r=!1},d(s){o[e].d(s),s&&O(a)}}}function ah(t){let e,n,a,r,i,o,l,s=t[10](t[24]).next,d=[];for(let v=0;v{c[k]=null}),Ce(),r=c[a],r?r.p(v,p):(r=c[a]=u[a](v),r.c()),R(r,1),r.m(n,null)),p[0]&256){let C=y.length;y=v[10](v[24]).prev;let A;for(A=C;A{r=null}),Ce()),o[24].leapday?.numbered?i&&(Ee(),W(i,1,1,()=>{i=null}),Ce()):i?(i.p(o,l),l[0]&256&&R(i,1)):(i=oh(o),i.c(),R(i,1),i.m(n.parentNode,n))},i(o){a||(R(r),R(i),a=!0)},o(o){W(r),W(i),a=!1},d(o){r&&r.d(o),o&&O(e),i&&i.d(o),o&&O(n)}}}function Q1(t){let e;return{c(){e=T("div")},m(n,a){q(n,e,a)},p:X,i:X,o:X,d(n){n&&O(e)}}}function X1(t){let e,n;return e=new wr({props:{day:t[24],adjacent:!0,fullView:t[3]}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&128&&(i.day=a[24]),r[0]&8&&(i.fullView=a[3]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function lh(t){let e,n,a,r,i=[X1,Q1],o=[];function l(s,d){return s[6]?0:1}return e=l(t,[-1,-1]),n=o[e]=i[e](t),{c(){n.c(),a=Ue()},m(s,d){o[e].m(s,d),q(s,a,d),r=!0},p(s,d){let u=e;e=l(s,d),e===u?o[e].p(s,d):(Ee(),W(o[u],1,1,()=>{o[u]=null}),Ce(),n=o[e],n?n.p(s,d):(n=o[e]=i[e](s),n.c()),R(n,1),n.m(a.parentNode,a))},i(s){r||(R(n),r=!0)},o(s){W(n),r=!1},d(s){o[e].d(s),s&&O(a)}}}function uh(t){let e,n,a,r,i=t[9],o=[];for(let m=0;mW(o[m],1,1,()=>{o[m]=null}),s=t[8],d=[];for(let m=0;mW(d[m],1,1,()=>{d[m]=null}),c=t[7],h=[];for(let m=0;mW(h[m],1,1,()=>{h[m]=null});return{c(){e=T("div");for(let m=0;m{let H=B.weekday,Y=B.calendar.weekdays.length-H,he=[];Y!=0&&(he=[...Array(Y).keys()]);let oe=[];return H!=0&&(oe=[...Array(H).keys()]),{next:he,prev:oe}};function v(B){ue.call(this,t,B)}function p(B){ue.call(this,t,B)}function k(B){ue.call(this,t,B)}function C(B){ue.call(this,t,B)}function A(B){ue.call(this,t,B)}function S(B){ue.call(this,t,B)}function _(B){ue.call(this,t,B)}function F(B){ue.call(this,t,B)}function w(B){ue.call(this,t,B)}function M(B){ue.call(this,t,B)}function x(B){ue.call(this,t,B)}function V(B){ue.call(this,t,B)}return t.$$set=B=>{"yearView"in B&&n(0,l=B.yearView),"month"in B&&n(1,s=B.month),"columns"in B&&n(2,d=B.columns),"fullView"in B&&n(3,u=B.fullView),"weeks"in B&&n(4,c=B.weeks),"intercalary"in B&&n(5,h=B.intercalary),"showPad"in B&&n(6,y=B.showPad)},t.$$.update=()=>{if(t.$$.dirty[0]&2){e:n(11,a=s.calendar.getPaddedDaysForMonth(s))}if(t.$$.dirty[0]&2048){e:n(9,r=a.previous)}if(t.$$.dirty[0]&2){e:n(8,i=s.days)}if(t.$$.dirty[0]&2048){e:n(7,o=a.next)}},[l,s,d,u,c,h,y,o,i,r,m,a,v,p,k,C,A,S,_,F,w,M,x,V]}var ch=class extends de{constructor(e){super();fe(this,e,$1,J1,se,{yearView:0,month:1,columns:2,fullView:3,weeks:4,intercalary:5,showPad:6},U1,[-1,-1])}},Ln=ch;var xi=xe(require("obsidian"));function eb(t){be(t,"svelte-131055d",".fantasy-nav.nav.nav.svelte-131055d{padding:10px 0px;margin:0;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:stretch}.container.svelte-131055d{display:flex;align-items:center}.fantasy-title.svelte-131055d{margin:0;line-height:1.25}.fantasy-right-nav.svelte-131055d{display:flex;justify-content:center;align-items:flex-start}.calendar-clickable.svelte-131055d{align-items:center;cursor:pointer;display:flex;justify-content:center}.title-container.svelte-131055d{display:flex;flex-flow:column nowrap;align-items:flex-start}")}function tb(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_,F,w,M,x,V,B;return{c(){e=T("div"),n=T("div"),a=T("h3"),r=T("span"),i=me(t[0]),o=j(),l=T("span"),s=me(t[1]),d=j(),u=T("div"),c=T("div"),h=T("div"),v=j(),p=T("div"),k=T("span"),k.textContent="Today",A=j(),S=T("div"),w=j(),M=T("div"),D(r,"class","fantasy-month month"),D(l,"class","fantasy-year year"),D(a,"class","fantasy-title title svelte-131055d"),D(n,"class","title-container svelte-131055d"),D(h,"class","arrow calendar-clickable svelte-131055d"),D(h,"aria-label",y=t[3].name),D(p,"class","reset-button calendar-clickable svelte-131055d"),D(p,"aria-label",C="Today is "+t[2]),D(S,"class","arrow right calendar-clickable svelte-131055d"),D(S,"aria-label",_=t[4].name),D(M,"class","calendar-clickable svelte-131055d"),D(M,"aria-label","Calendar Settings"),D(c,"class","container svelte-131055d"),D(u,"class","right-nav fantasy-right-nav svelte-131055d"),D(e,"class","fantasy-nav nav svelte-131055d")},m(H,Y){q(H,e,Y),E(e,n),E(n,a),E(a,r),E(r,i),E(a,o),E(a,l),E(l,s),E(e,d),E(e,u),E(u,c),E(c,h),E(c,v),E(c,p),E(p,k),E(c,A),E(c,S),E(c,w),E(c,M),V||(B=[le(m=t[6].call(null,h)),ie(h,"click",t[9]),ie(p,"click",t[10]),le(F=t[7].call(null,S)),ie(S,"click",t[11]),le(x=t[8].call(null,M)),ie(M,"click",t[12])],V=!0)},p(H,[Y]){Y&1&&we(i,H[0]),Y&2&&we(s,H[1]),Y&8&&y!==(y=H[3].name)&&D(h,"aria-label",y),Y&4&&C!==(C="Today is "+H[2])&&D(p,"aria-label",C),Y&16&&_!==(_=H[4].name)&&D(S,"aria-label",_)},i:X,o:X,d(H){H&&O(e),V=!1,_e(B)}}}function nb(t,e,n){let a=Se(),{month:r}=e,{year:i}=e,{current:o}=e,l=Xe("calendar"),s;l.subscribe(C=>{s=C});let d=s.getPreviousMonth(),u=s.getNextMonth();s.on("month-update",()=>{n(3,d=s.getPreviousMonth()),n(4,u=s.getNextMonth())});let c=C=>{new xi.ExtraButtonComponent(C).setIcon("left-arrow")},h=C=>{new xi.ExtraButtonComponent(C).setIcon("right-arrow")},y=C=>{new xi.ExtraButtonComponent(C).setIcon("gear")},m=()=>a("previous"),v=()=>a("reset"),p=C=>a("next"),k=C=>a("settings",C);return t.$$set=C=>{"month"in C&&n(0,r=C.month),"year"in C&&n(1,i=C.year),"current"in C&&n(2,o=C.current)},[r,i,o,d,u,a,c,h,y,m,v,p,k]}var dh=class extends de{constructor(e){super();fe(this,e,nb,tb,se,{month:0,year:1,current:2},eb)}},fh=dh;var Fi=xe(require("obsidian"));function ab(t){be(t,"svelte-i3pajt","#calendar-container .fantasy-nav.nav.nav.svelte-i3pajt{padding:0;margin:0;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2}.fantasy-year-nav.svelte-i3pajt{display:flex;align-items:center;margin-right:auto}.container.svelte-i3pajt{display:flex;align-items:center}.fantasy-title.svelte-i3pajt{margin:0}.fantasy-right-nav.svelte-i3pajt{display:flex;justify-content:center;align-items:flex-start}.calendar-clickable.svelte-i3pajt{align-items:center;cursor:pointer;display:flex;justify-content:center}")}function hh(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","arrow calendar-clickable svelte-i3pajt"),D(e,"aria-label","Previous Year")},m(i,o){q(i,e,o),a||(r=[le(n=t[4].call(null,e)),ie(e,"click",t[7])],a=!0)},p:X,d(i){i&&O(e),a=!1,_e(r)}}}function mh(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","arrow right calendar-clickable svelte-i3pajt"),D(e,"aria-label","Next Year")},m(i,o){q(i,e,o),a||(r=[le(n=t[5].call(null,e)),ie(e,"click",t[9])],a=!0)},p:X,d(i){i&&O(e),a=!1,_e(r)}}}function rb(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A=t[1]&&hh(t),S=t[1]&&mh(t);return{c(){e=T("div"),n=T("div"),a=T("h2"),r=T("span"),i=me(t[0]),o=j(),l=T("div"),s=T("div"),A&&A.c(),d=j(),u=T("div"),c=T("span"),c.textContent="Today",y=j(),S&&S.c(),m=j(),v=T("div"),D(r,"class","fantasy-year"),D(a,"class","fantasy-title svelte-i3pajt"),D(n,"class","fantasy-year-nav svelte-i3pajt"),D(u,"class","reset-button calendar-clickable svelte-i3pajt"),D(u,"aria-label",h="Today is "+t[2]),D(v,"class","calendar-clickable svelte-i3pajt"),D(v,"aria-label","Calendar Settings"),D(s,"class","container svelte-i3pajt"),D(l,"class","right-nav fantasy-right-nav svelte-i3pajt"),D(e,"class","fantasy-nav nav svelte-i3pajt")},m(_,F){q(_,e,F),E(e,n),E(n,a),E(a,r),E(r,i),E(e,o),E(e,l),E(l,s),A&&A.m(s,null),E(s,d),E(s,u),E(u,c),E(s,y),S&&S.m(s,null),E(s,m),E(s,v),k||(C=[ie(u,"click",t[8]),le(p=t[6].call(null,v)),ie(v,"click",t[10])],k=!0)},p(_,[F]){F&1&&we(i,_[0]),_[1]?A?A.p(_,F):(A=hh(_),A.c(),A.m(s,d)):A&&(A.d(1),A=null),F&4&&h!==(h="Today is "+_[2])&&D(u,"aria-label",h),_[1]?S?S.p(_,F):(S=mh(_),S.c(),S.m(s,m)):S&&(S.d(1),S=null)},i:X,o:X,d(_){_&&O(e),A&&A.d(),S&&S.d(),k=!1,_e(C)}}}function ib(t,e,n){let a=Se(),{year:r}=e,{arrows:i=!1}=e,{current:o}=e,l=m=>{new Fi.ExtraButtonComponent(m).setIcon("left-arrow")},s=m=>{new Fi.ExtraButtonComponent(m).setIcon("right-arrow")},d=m=>{new Fi.ExtraButtonComponent(m).setIcon("gear")},u=()=>a("previous"),c=()=>a("reset"),h=m=>a("next"),y=m=>a("settings",m);return t.$$set=m=>{"year"in m&&n(0,r=m.year),"arrows"in m&&n(1,i=m.arrows),"current"in m&&n(2,o=m.current)},[r,i,o,a,l,s,d,u,c,h,y]}var ph=class extends de{constructor(e){super();fe(this,e,ib,rb,se,{year:0,arrows:1,current:2},ab)}},Ti=ph;function ob(t){be(t,"svelte-15hvixf",".year-view.svelte-15hvixf{height:100%;position:relative;display:flex;flex-direction:column}.year.svelte-15hvixf{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem;overflow:auto;flex:1}.year.svelte-15hvixf:not(.full-view){grid-template-columns:1fr}")}function sb(t){let e,n,a,r,i,o,l;return n=new Ti({props:{year:t[3],current:t[0]}}),n.$on("next",t[9]),n.$on("previous",t[10]),n.$on("reset",t[11]),n.$on("settings",t[12]),{c(){e=T("div"),te(n.$$.fragment),a=j(),r=T("div"),D(r,"class","year svelte-15hvixf"),pe(r,"full-view",t[1]),D(e,"class","year-view svelte-15hvixf")},m(s,d){q(s,e,d),ee(n,e,null),E(e,a),E(e,r),t[13](r),i=!0,o||(l=ie(r,"scroll",t[5],{once:!0}),o=!0)},p(s,[d]){let u={};d&8&&(u.year=s[3]),d&1&&(u.current=s[0]),n.$set(u),d&2&&pe(r,"full-view",s[1])},i(s){i||(R(n.$$.fragment,s),i=!0)},o(s){W(n.$$.fragment,s),i=!1},d(s){s&&O(e),J(n),t[13](null),o=!1,l()}}}function lb(t,e,n){let a,r=Se(),{current:i}=e,{year:o}=e,{columns:l}=e,{fullView:s}=e,d,u,c,h=Xe("calendar"),y;h.subscribe(z=>{n(8,y=z)});let m=[],v=Xe("dayView"),p=Xe("displayMoons"),k=new IntersectionObserver((z,Q)=>{Q===k&&(!z.length||!z[0].isIntersecting||(k.disconnect(),!(!y.canGoToNextYear(c.year)&&c.number===y.data.months.length-1)&&(S(),V(m.shift()),C())))},{root:d,rootMargin:"0px",threshold:.25}),C=()=>{let z=d.children[d.children.length-2];!z||k.observe(z)},A=new IntersectionObserver((z,Q)=>{if(Q!==A||!z&&!z.length||z[0].isIntersecting)return;let De=d.getBoundingClientRect();z[0].boundingClientRect.top{if(!(!y.canGoToNextYear(c.year)&&c.number===y.data.months.length-1)){if(c=y.getMonth(c.number+1,c.year),c.number===0&&!(d.lastElementChild instanceof HTMLHeadingElement)){let Q=d.createEl("h2",{text:y.getNameForYear(c.year),cls:"fantasy-title"});m.push(Q),A.disconnect(),A.observe(Q)}m.push(x(c,!1)),z&&(u=y.getMonth((u?.number??0)+1,u?.year??1)),F()}},_=new IntersectionObserver((z,Q)=>{Q===_&&(!z.length||!z[0].isIntersecting||(_.disconnect(),!!u&&(M(),V(m.pop()),F())))},{root:d,rootMargin:"0px",threshold:.25}),F=()=>{let z=d.children[1];!z||_.observe(z)},w=new IntersectionObserver((z,Q)=>{Q===w&&(!z&&!z.length||z[0].isIntersecting&&(n(6,o-=1),A.observe(z[0].target),w.disconnect()))},{root:d,rootMargin:"0px",threshold:0}),M=(z=!0)=>{if(u=y.getMonth(u.number-1,u.year),!!u){if(m.unshift(x(u,!0)),u.number===0&&!(d.firstElementChild instanceof HTMLHeadingElement)){let Q=createEl("h2",{text:y.getNameForYear(u.year),cls:"fantasy-title"});d.prepend(Q),m.unshift(Q),w.disconnect(),w.observe(Q)}z&&(c=y.getMonth(c.number-1,c.year)),C()}},x=(z,Q)=>{let De=new Ln({target:d,anchor:Q?d.children[0]:null,props:{month:z,fullView:!1,yearView:!0,columns:l,weeks:y.weekdays.length,showPad:!1},context:new Map([["dayView",v],["displayMoons",p]])});return De.$on("day-click",ve=>r("day-click",ve.detail)),De.$on("day-doubleclick",ve=>r("day-doubleclick",ve.detail)),De.$on("day-context-menu",ve=>r("day-context-menu",ve.detail)),De.$on("event-mouseover",ve=>r("event-mouseover",ve.detail)),De.$on("event-mouseover",ve=>r("event-mouseover",ve.detail)),De},V=z=>{z instanceof HTMLHeadingElement?z.detach():z.$destroy()},B=async(z=!1)=>{for(let De of m)V(De);m.splice(0,m.length),d.empty(),await Yn(),n(6,o=y.current.year),u=y.getMonth(y.displayed.month-1,y.displayed.year),c=u;for(let De=0;De{_.disconnect(),k.disconnect(),w.disconnect(),A.disconnect()}),Un(B);let H=async()=>{await Yn(),_.observe(d.children[1]),k.observe(d.children[d.children.length-2])};function Y(z){ue.call(this,t,z)}function he(z){ue.call(this,t,z)}let oe=()=>B(!0);function ce(z){ue.call(this,t,z)}function Z(z){va[z?"unshift":"push"](()=>{d=z,n(2,d)})}return t.$$set=z=>{"current"in z&&n(0,i=z.current),"year"in z&&n(6,o=z.year),"columns"in z&&n(7,l=z.columns),"fullView"in z&&n(1,s=z.fullView)},t.$$.update=()=>{if(t.$$.dirty&320){e:n(3,a=y.getNameForYear(o))}},[i,s,d,a,B,H,o,l,y,Y,he,oe,ce,Z]}var gh=class extends de{constructor(e){super();fe(this,e,lb,sb,se,{current:0,year:6,columns:7,fullView:1},ob)}},yh=gh;var Cs=xe(require("obsidian"));function ub(t){be(t,"svelte-ztrrn8",".year.svelte-ztrrn8{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem;overflow:auto;flex:1}.year.svelte-ztrrn8:not(.full-view){grid-template-columns:1fr}")}function vh(t,e,n){let a=t.slice();return a[8]=e[n],a}function bh(t){let e,n;return e=new Ln({props:{month:t[8],fullView:!1,yearView:!0,columns:t[2],weeks:t[8].calendar.weekdays.length,showPad:!1}}),e.$on("day-click",t[3]),e.$on("day-doubleclick",t[4]),e.$on("day-context-menu",t[5]),e.$on("event-click",t[6]),e.$on("event-mouseover",t[7]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.month=a[8]),r&4&&(i.columns=a[2]),r&2&&(i.weeks=a[8].calendar.weekdays.length),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function cb(t){let e,n,a=t[1],r=[];for(let o=0;oW(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o{"fullView"in c&&n(0,a=c.fullView),"months"in c&&n(1,r=c.months),"columns"in c&&n(2,i=c.columns)},[a,r,i,o,l,s,d,u]}var wh=class extends de{constructor(e){super();fe(this,e,db,cb,se,{fullView:0,months:1,columns:2},ub)}},Dh=wh;function fb(t){be(t,"svelte-1xpvbi",".year-view.svelte-1xpvbi{height:100%;position:relative;display:flex;flex-direction:column}.year-container.svelte-1xpvbi{flex:1;overflow:auto}")}function hb(t){let e,n,a,r,i;return n=new Ti({props:{year:t[2],current:t[0],arrows:!0}}),n.$on("next",t[9]),n.$on("previous",t[10]),n.$on("reset",t[11]),n.$on("settings",t[12]),{c(){e=T("div"),te(n.$$.fragment),a=j(),r=T("div"),D(r,"class","year-container svelte-1xpvbi"),D(e,"class","year-view svelte-1xpvbi")},m(o,l){q(o,e,l),ee(n,e,null),E(e,a),E(e,r),t[13](r),i=!0},p(o,[l]){let s={};l&4&&(s.year=o[2]),l&1&&(s.current=o[0]),n.$set(s)},i(o){i||(R(n.$$.fragment,o),i=!0)},o(o){W(n.$$.fragment,o),i=!1},d(o){o&&O(e),J(n),t[13](null)}}}function mb(t,e,n){let a,r=Se(),i=Xe("calendar"),o=Xe("dayView"),l=Xe("displayMoons"),s;i.subscribe(x=>{n(8,s=x)});let{year:d}=e,{current:u}=e,{columns:c}=e,h,y=(x,V=!1)=>{let B=s.getMonthsForYear(x),H=new Dh({target:h,anchor:V?h.children[0]:null,props:{months:B,fullView:!0,columns:c},context:new Map([["dayView",o],["displayMoons",l]])});return H.$on("day-click",Y=>r("day-click",Y.detail)),H.$on("day-doubleclick",Y=>r("day-doubleclick",Y.detail)),H.$on("day-context-menu",Y=>r("day-context-menu",Y.detail)),H.$on("event-mouseover",Y=>r("event-mouseover",Y.detail)),H.$on("event-mouseover",Y=>r("event-mouseover",Y.detail)),H},m=x=>{x instanceof HTMLHeadingElement?x.detach():x.$destroy()},v=[],p=()=>{if(!s.canGoToNextYear(d)){new Cs.Notice("This is the last year. Additional years can be created in settings.");return}n(6,d=d+1),A(d)},k=()=>{if(d===1){new Cs.Notice("This is the earliest year.");return}n(6,d=d-1),A(d)},C=()=>{n(6,d=s.current.year),A(d)},A=async x=>{v.forEach(V=>m(V)),h.empty(),await Yn(),x=x,v.push(y(x))};Un(()=>v.push(y(d)));let S=()=>p(),_=()=>k(),F=()=>C();function w(x){ue.call(this,t,x)}function M(x){va[x?"unshift":"push"](()=>{h=x,n(1,h)})}return t.$$set=x=>{"year"in x&&n(6,d=x.year),"current"in x&&n(0,u=x.current),"columns"in x&&n(7,c=x.columns)},t.$$.update=()=>{if(t.$$.dirty&320){e:n(2,a=s.getNameForYear(d))}},[u,h,a,p,k,C,d,c,s,S,_,F,w,M]}var _h=class extends de{constructor(e){super();fe(this,e,mb,hb,se,{year:6,current:0,columns:7},fb)}},Eh=_h;function pb(t){be(t,"svelte-li8ss6","#calendar-container.year-view.svelte-li8ss6.svelte-li8ss6{height:100%}#calendar-container.fantasy-calendar.full-view.svelte-li8ss6.svelte-li8ss6{width:100%;padding:0 0.5rem 0.5rem;height:100%;display:flex;flex-flow:column}.fantasy-calendar.full-view.svelte-li8ss6 .month-container.svelte-li8ss6{height:100%}.month-container.svelte-li8ss6.svelte-li8ss6{display:flex}.month-view.svelte-li8ss6.svelte-li8ss6{flex-grow:2}.weeks.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-rows:auto 1fr}.week-num-container.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-rows:repeat(var(--calendar-rows), auto);padding:0.25rem 0}.week-num.svelte-li8ss6.svelte-li8ss6{background-color:transparent;border:2px solid transparent;border-radius:4px;color:var(--color-text-day);cursor:pointer;font-size:0.8em;height:100%;padding:2px;position:relative;text-align:center;vertical-align:baseline;overflow:visible}.weekdays.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-columns:repeat(var(--calendar-columns), 1fr);grid-template-rows:auto;padding:0 0.25rem;gap:2px}.weekday.svelte-li8ss6.svelte-li8ss6{background-color:var(--color-background-heading);color:var(--color-text-heading);font-size:0.6em;letter-spacing:1px;padding:4px;text-transform:uppercase;text-align:center;border:2px solid transparent}hr.svelte-li8ss6.svelte-li8ss6{margin:1rem 0}.moon-container{display:flex;flex-flow:row wrap;align-items:center;justify-content:center}")}function Ch(t,e,n){let a=t.slice();return a[64]=e[n],a}function Ah(t,e,n){let a=t.slice();return a[67]=e[n],a}function gb(t){let e,n,a,r,i,o,l,s,d,u,c;e=new fh({props:{month:t[6].name,year:t[11],current:t[3].currentDate}}),e.$on("next",t[34]),e.$on("previous",t[35]),e.$on("reset",t[36]),e.$on("settings",t[37]);let h=t[5]&&kh(t),y=t[9]&&t[9].type=="intercalary"&&!t[14]&&Fh(t),m=t[6].type=="month"&&Th(t);d=new Ln({props:{columns:t[13].length,weeks:t[7],month:t[6],fullView:t[1]}}),d.$on("day-click",t[44]),d.$on("day-doubleclick",t[45]),d.$on("day-context-menu",t[46]),d.$on("event-click",t[47]),d.$on("event-mouseover",t[48]),d.$on("event-context",t[49]);let v=t[10]&&t[10].type=="intercalary"&&!t[14]&&Bh(t);return{c(){te(e.$$.fragment),n=j(),a=T("div"),r=T("div"),h&&h.c(),i=j(),o=T("div"),y&&y.c(),l=j(),m&&m.c(),s=j(),te(d.$$.fragment),u=j(),v&&v.c(),D(r,"class","weeks svelte-li8ss6"),D(o,"class","month-view svelte-li8ss6"),D(a,"class","month-container svelte-li8ss6")},m(p,k){ee(e,p,k),q(p,n,k),q(p,a,k),E(a,r),h&&h.m(r,null),E(a,i),E(a,o),y&&y.m(o,null),E(o,l),m&&m.m(o,null),E(o,s),ee(d,o,null),E(o,u),v&&v.m(o,null),c=!0},p(p,k){let C={};k[0]&64&&(C.month=p[6].name),k[0]&2048&&(C.year=p[11]),k[0]&8&&(C.current=p[3].currentDate),e.$set(C),p[5]?h?h.p(p,k):(h=kh(p),h.c(),h.m(r,null)):h&&(h.d(1),h=null),p[9]&&p[9].type=="intercalary"&&!p[14]?y?(y.p(p,k),k[0]&16896&&R(y,1)):(y=Fh(p),y.c(),R(y,1),y.m(o,l)):y&&(Ee(),W(y,1,1,()=>{y=null}),Ce()),p[6].type=="month"?m?m.p(p,k):(m=Th(p),m.c(),m.m(o,s)):m&&(m.d(1),m=null);let A={};k[0]&8192&&(A.columns=p[13].length),k[0]&128&&(A.weeks=p[7]),k[0]&64&&(A.month=p[6]),k[0]&2&&(A.fullView=p[1]),d.$set(A),p[10]&&p[10].type=="intercalary"&&!p[14]?v?(v.p(p,k),k[0]&17408&&R(v,1)):(v=Bh(p),v.c(),R(v,1),v.m(o,null)):v&&(Ee(),W(v,1,1,()=>{v=null}),Ce())},i(p){c||(R(e.$$.fragment,p),R(y),R(d.$$.fragment,p),R(v),c=!0)},o(p){W(e.$$.fragment,p),W(y),W(d.$$.fragment,p),W(v),c=!1},d(p){J(e,p),p&&O(n),p&&O(a),h&&h.d(),y&&y.d(),m&&m.d(),J(d),v&&v.d()}}}function yb(t){let e,n;return e=new Eh({props:{year:t[12],columns:t[13].length,current:t[3].displayedDate}}),e.$on("next",t[25]),e.$on("previous",t[26]),e.$on("reset",t[27]),e.$on("settings",t[28]),e.$on("day-click",t[29]),e.$on("day-doubleclick",t[30]),e.$on("day-context-menu",t[31]),e.$on("event-click",t[32]),e.$on("event-mouseover",t[33]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&4096&&(i.year=a[12]),r[0]&8192&&(i.columns=a[13].length),r[0]&8&&(i.current=a[3].displayedDate),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function vb(t){let e,n;return e=new yh({props:{year:t[12],fullView:t[1],columns:t[13].length,current:t[3].displayedDate}}),e.$on("next",t[16]),e.$on("previous",t[17]),e.$on("reset",t[18]),e.$on("settings",t[19]),e.$on("day-click",t[20]),e.$on("day-doubleclick",t[21]),e.$on("day-context-menu",t[22]),e.$on("event-click",t[23]),e.$on("event-mouseover",t[24]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&4096&&(i.year=a[12]),r[0]&2&&(i.fullView=a[1]),r[0]&8192&&(i.columns=a[13].length),r[0]&8&&(i.current=a[3].displayedDate),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function kh(t){let e,n,a,r=[...Array(t[7]).keys()],i=[];for(let o=0;o{s[y]=null}),Ce(),a=s[n],a?a.p(c,h):(a=s[n]=l[n](c),a.c()),R(a,1),a.m(e,null)),(!o||h[0]&8)&&$e(e,"--calendar-columns",c[3].weekdays.length),(!o||h[0]&8)&&$e(e,"--column-widths",1/c[3].weekdays.length*100+"%"),(!o||h[0]&8)&&$e(e,"--calendar-rows",c[3].weeksPerCurrentMonth),h[0]&2&&pe(e,"full-view",c[1]),h[0]&4&&pe(e,"year-view",c[2]),c[0]&&!c[1]?u?(u.p(c,h),h[0]&3&&R(u,1)):(u=Mh(c),u.c(),R(u,1),u.m(i.parentNode,i)):u&&(Ee(),W(u,1,1,()=>{u=null}),Ce())},i(c){o||(R(a),R(u),o=!0)},o(c){W(a),W(u),o=!1},d(c){c&&O(e),s[n].d(),c&&O(r),u&&u.d(c),c&&O(i)}}}function wb(t,e,n){let a,r,i,o,l,s,d,u,c,{fullView:h=!1}=e,{dayView:y=!1}=e,{yearView:m=!1}=e,{calendar:v}=e,{moons:p}=e,{displayDayNumber:k}=e,{displayWeeks:C}=e,A=Da(y),S=Da(p),_=Da(v);zn("dayView",A),zn("displayMoons",S),zn("calendar",_),v.on("month-update",()=>{n(12,i=v.displayed.year),n(11,o=v.getNameForYear(v.displayed.year)),n(6,l=v.currentMonth),n(10,s=v.nextMonth),n(9,d=v.previousMonth),n(7,c=v.weeksOfMonth(l)),n(8,u=v.weekNumbersOfMonth(l))});let F=()=>v.goToNextYear(),w=()=>v.goToPreviousYear();function M(ne){ue.call(this,t,ne)}function x(ne){ue.call(this,t,ne)}function V(ne){ue.call(this,t,ne)}function B(ne){ue.call(this,t,ne)}function H(ne){ue.call(this,t,ne)}function Y(ne){ue.call(this,t,ne)}function he(ne){ue.call(this,t,ne)}let oe=()=>v.goToNextYear(),ce=()=>v.goToPreviousYear();function Z(ne){ue.call(this,t,ne)}function z(ne){ue.call(this,t,ne)}function Q(ne){ue.call(this,t,ne)}function De(ne){ue.call(this,t,ne)}function ve(ne){ue.call(this,t,ne)}function Ne(ne){ue.call(this,t,ne)}function je(ne){ue.call(this,t,ne)}let at=()=>v.goToNext(),Pe=()=>v.goToPrevious();function gt(ne){ue.call(this,t,ne)}function xt(ne){ue.call(this,t,ne)}function Je(ne){ue.call(this,t,ne)}function Fe(ne){ue.call(this,t,ne)}function Ve(ne){ue.call(this,t,ne)}function Rt(ne){ue.call(this,t,ne)}function Gt(ne){ue.call(this,t,ne)}function Ft(ne){ue.call(this,t,ne)}function Mt(ne){ue.call(this,t,ne)}function gn(ne){ue.call(this,t,ne)}function Ut(ne){ue.call(this,t,ne)}function tn(ne){ue.call(this,t,ne)}function sa(ne){ue.call(this,t,ne)}function la(ne){ue.call(this,t,ne)}function Si(ne){ue.call(this,t,ne)}function Bi(ne){ue.call(this,t,ne)}function Mi(ne){ue.call(this,t,ne)}function Ni(ne){ue.call(this,t,ne)}function Ii(ne){ue.call(this,t,ne)}function Oi(ne){ue.call(this,t,ne)}let qi=()=>n(0,y=!1);function Ri(ne){ue.call(this,t,ne)}function Li(ne){ue.call(this,t,ne)}function Pi(ne){ue.call(this,t,ne)}function ji(ne){ue.call(this,t,ne)}return t.$$set=ne=>{"fullView"in ne&&n(1,h=ne.fullView),"dayView"in ne&&n(0,y=ne.dayView),"yearView"in ne&&n(2,m=ne.yearView),"calendar"in ne&&n(3,v=ne.calendar),"moons"in ne&&n(15,p=ne.moons),"displayDayNumber"in ne&&n(4,k=ne.displayDayNumber),"displayWeeks"in ne&&n(5,C=ne.displayWeeks)},t.$$.update=()=>{if(t.$$.dirty[0]&4){e:m&&n(0,y=!1)}if(t.$$.dirty[0]&1){e:A.set(y)}if(t.$$.dirty[0]&32768){e:S.set(p)}if(t.$$.dirty[0]&8){e:_.set(v)}if(t.$$.dirty[0]&8){e:n(14,a=v.plugin.data.showIntercalary)}if(t.$$.dirty[0]&8){e:n(13,r=v.weekdays)}if(t.$$.dirty[0]&8){e:n(12,i=v.displayed.year)}if(t.$$.dirty[0]&8){e:n(11,o=v.getNameForYear(v.displayed.year))}if(t.$$.dirty[0]&8){e:n(6,l=v.currentMonth)}if(t.$$.dirty[0]&8){e:n(10,s=v.nextMonth)}if(t.$$.dirty[0]&8){e:n(9,d=v.previousMonth)}if(t.$$.dirty[0]&72){e:n(8,u=v.weekNumbersOfMonth(l))}if(t.$$.dirty[0]&72){e:n(7,c=v.weeksOfMonth(l))}},[y,h,m,v,k,C,l,c,u,d,s,o,i,r,a,p,F,w,M,x,V,B,H,Y,he,oe,ce,Z,z,Q,De,ve,Ne,je,at,Pe,gt,xt,Je,Fe,Ve,Rt,Gt,Ft,Mt,gn,Ut,tn,sa,la,Si,Bi,Mi,Ni,Ii,Oi,qi,Ri,Li,Pi,ji]}var Nh=class extends de{constructor(e){super();fe(this,e,wb,bb,se,{fullView:1,dayView:0,yearView:2,calendar:3,moons:15,displayDayNumber:4,displayWeeks:5},pb,[-1,-1,-1])}},Ih=Nh;var Zt="FANTASY_CALENDAR",oa="FANTASY_CALENDAR_FULL_VIEW";(0,Me.addIcon)(Zt,'');(0,Me.addIcon)("fantasy-calendar-reveal",'');var Pn=class extends Me.ItemView{constructor(e,n,a={}){super(n);this.plugin=e;this.leaf=n;this.options=a;this.updateMe=!0;this.yearView=!1;this.moons=!0;this.containerEl.addClass("fantasy-calendar-view"),this.contentEl.addClass("fantasy-calendar-view-content"),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-updated",()=>{this.plugin.onSettingsLoad(()=>this.updateCalendars())})),this.registerEvent(this.plugin.app.workspace.on("layout-change",()=>{!this._app||this._app.$set({fullView:this.full,...this.full?{dayView:!1}:{}})}))}get root(){return this.leaf.getRoot()}get full(){return!("collapse"in this.root)}updateCalendars(){if(!this.updateMe){this.updateMe=!0;return}if(!this.plugin.data.calendars.length){this._app?.$destroy(),this.contentEl.empty(),this.noCalendarEl=this.contentEl.createDiv("fantasy-no-calendar"),this.noCalendarEl.createSpan({text:"No calendars created! Create a calendar to see it here."});return}let e=this.plugin.data.calendars.find(n=>n.id==this.calendar?.id)??this.plugin.defaultCalendar??this.plugin.data.calendars[0];this.helper&&this.helper.calendar.id==e.id?this.update(e):this.setCurrentCalendar(e)}update(e){this.calendar=e,this.helper.update(this.calendar),this.registerCalendarInterval(),this._app?this._app.$set({calendar:this.helper}):this.build()}registerCalendarInterval(){if(this.interval&&(clearInterval(this.interval),this.interval=null),this.calendar.static.incrementDay){let e=new Date;this.calendar.date||(this.calendar.date=e.valueOf());let n=wo(new Date(this.calendar.date),e);if(n>=1){for(let a=0;a{wo(new Date,e)>=1&&(this.helper.goToNextCurrentDay(),this.helper.current,e=new Date,this.calendar.date=e.valueOf(),this.saveCalendars())},60*1e3),this.registerInterval(this.interval)}}saveCalendars(){this.updateMe=!1,this.plugin.saveCalendar()}setCurrentCalendar(e){this.noCalendarEl?.detach(),this.calendar=e,this.moons=this.calendar.static.displayMoons,this.dayNumber=this.calendar.static.displayDayNumber,this.helper=new La(this.calendar,this.plugin),this.registerCalendarInterval(),this.build()}createEventForDay(e){let n=new Oa(this.plugin,this.calendar,null,e);n.onClose=()=>{!n.saved||(this.calendar.events.push(n.event),this.helper.addEvent(n.event),this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update"))},n.open()}async onOpen(){this.plugin.onSettingsLoad(()=>this.updateCalendars())}build(){this.contentEl.empty(),this._app=new Ih({target:this.contentEl,props:{calendar:this.helper,fullView:this.full,yearView:this.yearView,moons:this.moons,displayWeeks:this.helper.displayWeeks,displayDayNumber:this.dayNumber}}),this._app.$on("day-click",e=>{let n=e.detail;n.events.length||this.createEventForDay(n.date)}),this._app.$on("day-doubleclick",e=>{let n=e.detail;!n.events.length||(this.helper.viewing.day=n.number,this.helper.viewing.month=n.month.number,this.helper.viewing.year=n.month.year,this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1))}),this._app.$on("day-context-menu",e=>{let{day:n,evt:a}=e.detail,r=new Me.Menu(this.app);r.setNoIcon(),this.full||r.addItem(i=>{i.setTitle("Open Day").onClick(()=>{this.openDay({day:n.number,month:this.helper.displayed.month,year:this.helper.displayed.year})})}),r.addItem(i=>{i.setTitle("Set as Today").onClick(()=>{this.calendar.current=n.date,this.helper.current.day=n.number,this.triggerHelperEvent("day-update"),this.saveCalendars()})}),r.addItem(i=>i.setTitle("New Event").onClick(()=>{this.createEventForDay(n.date)})),r.showAtMouseEvent(a)}),this._app.$on("settings",e=>{let n=e.detail,a=new Me.Menu(this.app);a.setNoIcon(),a.addItem(r=>{r.setTitle(`${this.calendar.displayWeeks?"Hide":"Show"} Weeks`).onClick(()=>{this.calendar.displayWeeks=!this.calendar.displayWeeks,this.helper.update(this.calendar),this._app.$set({displayWeeks:this.calendar.displayWeeks}),this.saveCalendars()})}),a.addItem(r=>{r.setTitle(`Open ${this.yearView?"Month":"Year"}`).onClick(()=>{this.yearView=!this.yearView,this._app.$set({yearView:this.yearView})})}),a.addItem(r=>{r.setTitle(this.moons?"Hide Moons":"Display Moons").onClick(()=>{this.toggleMoons()})}),a.addItem(r=>{r.setTitle(this.dayNumber?"Hide Day Number":"Display Day Number").onClick(()=>{this.dayNumber=!this.dayNumber,this.calendar.static.displayDayNumber=this.dayNumber,this._app.$set({displayDayNumber:this.dayNumber}),this.saveCalendars()})}),a.addItem(r=>{r.setTitle("View Day"),r.onClick(()=>{this.openDate()})}),a.addItem(r=>{r.setTitle("Switch Calendars"),r.setDisabled(this.plugin.data.calendars.length<=1),r.onClick(()=>{let i=new Oh(this.plugin,this.calendar);i.onClose=()=>{!i.confirmed||this.setCurrentCalendar(i.calendar)},i.open()})}),a.showAtMouseEvent(n)}),this._app.$on("event-click",e=>{let{event:n,modifier:a}=e.detail;if(n.note){let r=[];this.app.workspace.iterateAllLeaves(i=>{i.view instanceof Me.MarkdownView&&i.view.file.basename===n.note&&r.push(i)}),r.length?this.app.workspace.setActiveLeaf(r[0]):this.app.workspace.openLinkText(n.note,"",this.full||a)}else new Rh(n,this.plugin).open()}),this._app.$on("event-mouseover",e=>{if(!this.plugin.data.eventPreview)return;let{target:n,event:a}=e.detail;a.note&&this.app.workspace.trigger("link-hover",this,n,a.note,"")}),this._app.$on("event-context",e=>{let{evt:n,event:a}=e.detail,r=new Me.Menu(this.app);r.setNoIcon(),a.note||r.addItem(i=>{i.setTitle("Create Note").onClick(async()=>{let o=this.app.workspace.getActiveFile()?.path,l=o?this.app.fileManager.getNewFileParent(o)?.parent??"/":"/",s=`${a.date.year}-${a.date.month+1}-${a.date.day}`,d;a.end&&(d=`${a.end.year}-${a.end.month+1}-${a.end.day}`);let u={"fc-calendar":this.calendar.name,"fc-date":s,...a.end?{"fc-end":d}:{},...a.category?{"fc-category":this.calendar.categories.find(h=>h.id==a.category)?.name}:{},"fc-display-name":a.name};a.note=(0,Me.normalizePath)(`${l}/${a.name}.md`);let c=this.app.vault.getAbstractFileByPath(a.note);if(c||(c=await this.app.vault.create(a.note,`--- -${(0,Me.stringifyYaml)(u)} ----`)),this.saveCalendars(),c instanceof Me.TFile){let y=this.app.workspace.getLeavesOfType("markdown").find(m=>{m.view instanceof Me.FileView&&m.view.file.path==a.note});y?this.app.workspace.setActiveLeaf(y):await this.app.workspace.getUnpinnedLeaf().openFile(c,{active:!0})}})}),r.addItem(i=>{i.setTitle("Edit Event").onClick(()=>{let o=new Oa(this.plugin,this.calendar,a);o.onClose=()=>{if(!o.saved)return;let l=this.calendar.events.find(s=>s.id==a.id);this.calendar.events.splice(this.calendar.events.indexOf(l),1,o.event),this.helper.refreshMonth(o.event.date.month,o.event.date.year),(o.event.date.month!=l.date.month||o.event.date.year!=l.date.year)&&this.helper.refreshMonth(l.date.month,l.date.year),this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update")},o.open()})}),r.addItem(i=>{i.setTitle("Delete Event").onClick(async()=>{if(!this.plugin.data.exit.event&&!await _d(this.plugin))return;let o=this.calendar.events.find(l=>l.id==a.id);this.calendar.events.splice(this.calendar.events.indexOf(o),1),this.helper.refreshMonth(o.date.month,o.date.year),this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update")})}),r.showAtMouseEvent(n)}),this._app.$on("event",e=>{let n=e.detail;this.createEventForDay(n)}),this._app.$on("reset",()=>{this.helper.reset(),this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1)})}openDay(e){this.helper.viewing.day=e.day,this.helper.viewing.month=e.month,this.helper.viewing.year=e.year,this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1)}openDate(){if(!this.helper||!this.calendar)return;let e=new qh(this.plugin,this.calendar);e.onClose=()=>{!e.confirmed||(e.setCurrent?(this.calendar.current={...e.date},this.setCurrentCalendar(this.calendar)):(this.helper.displayed={...e.date},this.helper.update(),this._app.$set({calendar:this.helper})),this.saveCalendars())},e.open()}toggleMoons(){this.moons=!this.moons,this._app.$set({moons:this.moons})}async onClose(){}onResize(){this.triggerHelperEvent("view-resized",!1)}getViewType(){return Zt}getDisplayText(){return"Fantasy Calendar"}getIcon(){return Zt}triggerHelperEvent(e,n=!0){!this.helper||(this.helper.trigger(e),n&&(this.updateMe=!1,this.plugin.app.workspace.trigger("fantasy-calendars-updated")))}async onunload(){}},Oh=class extends Me.Modal{constructor(e,n){super(e.app);this.plugin=e;this.calendar=n;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:"Switch Calendars"});let e=this.contentEl.createDiv("fantasy-calendar-dropdown");e.createEl("label",{text:"Choose a Calendar"}),new Me.DropdownComponent(e).onChange(r=>{this.calendar=this.plugin.data.calendars.find(i=>i.id==r)}).addOptions(Object.fromEntries(this.plugin.data.calendars.map(r=>[r.id,r.name]))).setValue(this.calendar?this.calendar.id:null);let a=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new Me.ButtonComponent(a).setButtonText("Switch").setCta().onClick(()=>{this.confirmed=!0,this.close()}),new Me.ButtonComponent(a).setButtonText("Cancel").onClick(()=>{this.close()})}onOpen(){this.display()}},qh=class extends Me.Modal{constructor(e,n){super(e.app);this.plugin=e;this.calendar=n;this.confirmed=!1;this.setCurrent=!1;this.date={...this.calendar.current},this.tempCurrentDays=this.date.day}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:"View Day"}),this.dateFieldEl=this.contentEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(),new Me.Setting(this.contentEl).setName("Set as Current Date").setDesc("Also set this date to today's date.").addToggle(n=>n.setValue(this.setCurrent).onChange(a=>{this.setCurrent=a}));let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new Me.ButtonComponent(e).setButtonText("Switch").setCta().onClick(()=>{this.confirmed=!0,this.date.day=this.tempCurrentDays,this.close()}),new Me.ButtonComponent(e).setButtonText("Cancel").onClick(()=>{this.close()})}buildDateFields(){this.dateFieldEl.empty(),this.tempCurrentDays!=null&&this.date.month!=null&&this.tempCurrentDays>this.calendar.static.months[this.date.month]?.length&&(this.tempCurrentDays=this.calendar.static.months[this.date.month]?.length);let e=this.dateFieldEl.createDiv("fantasy-calendar-date-field");e.createEl("label",{text:"Day"}),new Me.TextComponent(e).setPlaceholder("Day").setValue(`${this.tempCurrentDays}`).setDisabled(this.date.month==null).onChange(i=>{if(Number(i)<1||Number(i)>this.calendar.static.months[this.date.month]?.length){new Me.Notice(`The current day must be between 1 and ${this.calendar.static.months[this.date.month].length}`),this.tempCurrentDays=this.date.day,this.buildDateFields();return}this.tempCurrentDays=Number(i)}).inputEl.setAttr("type","number");let a=this.dateFieldEl.createDiv("fantasy-calendar-date-field");a.createEl("label",{text:"Month"}),new Me.DropdownComponent(a).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map(i=>[i.name,i.name])])).setValue(this.date.month!=null?this.calendar.static.months[this.date.month].name:"select").onChange(i=>{i==="select"&&(this.date.month=null);let o=this.calendar.static.months.find(l=>l.name==i);this.date.month=this.calendar.static.months.indexOf(o),this.buildDateFields()});let r=this.dateFieldEl.createDiv("fantasy-calendar-date-field");if(r.createEl("label",{text:"Year"}),this.calendar.static.useCustomYears){let i=new Me.DropdownComponent(r);(this.calendar.static.years??[]).forEach(o=>{i.addOption(o.id,o.name)}),this.date.year>this.calendar.static.years?.length&&(this.date.year=this.calendar.static.years?this.calendar.static.years.length:null),i.setValue(this.calendar.static.years?.[this.date.year-1]?.id).onChange(o=>{this.date.year=this.calendar.static.years.findIndex(l=>l.id==o)+1})}else new Me.TextComponent(r).setPlaceholder("Year").setValue(`${this.date.year}`).onChange(o=>{this.date.year=Number(o)}).inputEl.setAttr("type","number")}onOpen(){this.display()}},Rh=class extends Me.Modal{constructor(e,n){super(n.app);this.event=e;this.plugin=n;this.containerEl.addClass("fantasy-calendar-view-event")}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:this.event.name}),await Me.MarkdownRenderer.renderMarkdown(this.event.description,this.contentEl,this.event.note,null)}async onOpen(){await this.display()}};var h4=xe(require("fs")),fn=xe(require("obsidian"));function As(t){let e=new Blob([t],{type:"text/javascript"}),n=URL.createObjectURL(e),a=new Worker(n);return URL.revokeObjectURL(n),a}function ks(){return As(`var te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Re=te(Ae=>{Ae.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\\xC0",Aacute:"\\xC1",Acirc:"\\xC2",Atilde:"\\xC3",Auml:"\\xC4",Aring:"\\xC5",AElig:"\\xC6",Ccedil:"\\xC7",Egrave:"\\xC8",Eacute:"\\xC9",Ecirc:"\\xCA",Euml:"\\xCB",Igrave:"\\xCC",Iacute:"\\xCD",Icirc:"\\xCE",Iuml:"\\xCF",ETH:"\\xD0",Ntilde:"\\xD1",Ograve:"\\xD2",Oacute:"\\xD3",Ocirc:"\\xD4",Otilde:"\\xD5",Ouml:"\\xD6",Oslash:"\\xD8",Ugrave:"\\xD9",Uacute:"\\xDA",Ucirc:"\\xDB",Uuml:"\\xDC",Yacute:"\\xDD",THORN:"\\xDE",szlig:"\\xDF",agrave:"\\xE0",aacute:"\\xE1",acirc:"\\xE2",atilde:"\\xE3",auml:"\\xE4",aring:"\\xE5",aelig:"\\xE6",ccedil:"\\xE7",egrave:"\\xE8",eacute:"\\xE9",ecirc:"\\xEA",euml:"\\xEB",igrave:"\\xEC",iacute:"\\xED",icirc:"\\xEE",iuml:"\\xEF",eth:"\\xF0",ntilde:"\\xF1",ograve:"\\xF2",oacute:"\\xF3",ocirc:"\\xF4",otilde:"\\xF5",ouml:"\\xF6",oslash:"\\xF8",ugrave:"\\xF9",uacute:"\\xFA",ucirc:"\\xFB",uuml:"\\xFC",yacute:"\\xFD",thorn:"\\xFE",yuml:"\\xFF",nbsp:"\\xA0",iexcl:"\\xA1",cent:"\\xA2",pound:"\\xA3",curren:"\\xA4",yen:"\\xA5",brvbar:"\\xA6",sect:"\\xA7",uml:"\\xA8",copy:"\\xA9",ordf:"\\xAA",laquo:"\\xAB",not:"\\xAC",shy:"\\xAD\\xAD",reg:"\\xAE",macr:"\\xAF",deg:"\\xB0",plusmn:"\\xB1",sup2:"\\xB2",sup3:"\\xB3",acute:"\\xB4",micro:"\\xB5",para:"\\xB6",middot:"\\xB7",cedil:"\\xB8",sup1:"\\xB9",ordm:"\\xBA",raquo:"\\xBB",frac14:"\\xBC",frac12:"\\xBD",frac34:"\\xBE",iquest:"\\xBF",times:"\\xD7",divide:"\\xF7",forall:"\\u2200",part:"\\u2202",exist:"\\u2203",empty:"\\u2205",nabla:"\\u2207",isin:"\\u2208",notin:"\\u2209",ni:"\\u220B",prod:"\\u220F",sum:"\\u2211",minus:"\\u2212",lowast:"\\u2217",radic:"\\u221A",prop:"\\u221D",infin:"\\u221E",ang:"\\u2220",and:"\\u2227",or:"\\u2228",cap:"\\u2229",cup:"\\u222A",int:"\\u222B",there4:"\\u2234",sim:"\\u223C",cong:"\\u2245",asymp:"\\u2248",ne:"\\u2260",equiv:"\\u2261",le:"\\u2264",ge:"\\u2265",sub:"\\u2282",sup:"\\u2283",nsub:"\\u2284",sube:"\\u2286",supe:"\\u2287",oplus:"\\u2295",otimes:"\\u2297",perp:"\\u22A5",sdot:"\\u22C5",Alpha:"\\u0391",Beta:"\\u0392",Gamma:"\\u0393",Delta:"\\u0394",Epsilon:"\\u0395",Zeta:"\\u0396",Eta:"\\u0397",Theta:"\\u0398",Iota:"\\u0399",Kappa:"\\u039A",Lambda:"\\u039B",Mu:"\\u039C",Nu:"\\u039D",Xi:"\\u039E",Omicron:"\\u039F",Pi:"\\u03A0",Rho:"\\u03A1",Sigma:"\\u03A3",Tau:"\\u03A4",Upsilon:"\\u03A5",Phi:"\\u03A6",Chi:"\\u03A7",Psi:"\\u03A8",Omega:"\\u03A9",alpha:"\\u03B1",beta:"\\u03B2",gamma:"\\u03B3",delta:"\\u03B4",epsilon:"\\u03B5",zeta:"\\u03B6",eta:"\\u03B7",theta:"\\u03B8",iota:"\\u03B9",kappa:"\\u03BA",lambda:"\\u03BB",mu:"\\u03BC",nu:"\\u03BD",xi:"\\u03BE",omicron:"\\u03BF",pi:"\\u03C0",rho:"\\u03C1",sigmaf:"\\u03C2",sigma:"\\u03C3",tau:"\\u03C4",upsilon:"\\u03C5",phi:"\\u03C6",chi:"\\u03C7",psi:"\\u03C8",omega:"\\u03C9",thetasym:"\\u03D1",upsih:"\\u03D2",piv:"\\u03D6",OElig:"\\u0152",oelig:"\\u0153",Scaron:"\\u0160",scaron:"\\u0161",Yuml:"\\u0178",fnof:"\\u0192",circ:"\\u02C6",tilde:"\\u02DC",ensp:"\\u2002",emsp:"\\u2003",thinsp:"\\u2009",zwnj:"\\u200C",zwj:"\\u200D",lrm:"\\u200E",rlm:"\\u200F",ndash:"\\u2013",mdash:"\\u2014",lsquo:"\\u2018",rsquo:"\\u2019",sbquo:"\\u201A",ldquo:"\\u201C",rdquo:"\\u201D",bdquo:"\\u201E",dagger:"\\u2020",Dagger:"\\u2021",bull:"\\u2022",hellip:"\\u2026",permil:"\\u2030",prime:"\\u2032",Prime:"\\u2033",lsaquo:"\\u2039",rsaquo:"\\u203A",oline:"\\u203E",euro:"\\u20AC",trade:"\\u2122",larr:"\\u2190",uarr:"\\u2191",rarr:"\\u2192",darr:"\\u2193",harr:"\\u2194",crarr:"\\u21B5",lceil:"\\u2308",rceil:"\\u2309",lfloor:"\\u230A",rfloor:"\\u230B",loz:"\\u25CA",spades:"\\u2660",clubs:"\\u2663",hearts:"\\u2665",diams:"\\u2666"}});var Pe=te(me=>{var pe=/[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,Oe=new RegExp("[\\\\-\\\\.0-9"+pe.source.slice(1,-1)+"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]"),Se=new RegExp("^"+pe.source+Oe.source+"*(?::"+pe.source+Oe.source+"*)?$"),j=0,S=1,U=2,G=3,L=4,P=5,Q=6,ne=7;function k(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,k)}k.prototype=new Error;k.prototype.name=k.name;function Me(){}Me.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),Ue(t,t={}),vt(e,t,n,r,this.errorHandler),r.endDocument()}};function vt(e,t,n,r,i){function s(g){if(g>65535){g-=65536;var x=55296+(g>>10),dt=56320+(g&1023);return String.fromCharCode(x,dt)}else return String.fromCharCode(g)}function a(g){var x=g.slice(1,-1);return x in n?n[x]:x.charAt(0)==="#"?s(parseInt(x.substr(1).replace("x","0x"))):(i.error("entity not found:"+g),g)}function o(g){if(g>v){var x=e.substring(v,g).replace(/&#?\\w+;/g,a);m&&c(v),r.characters(x,0,g-v),v=g}}function c(g,x){for(;g>=u&&(x=h.exec(e));)l=x.index,u=l+x[0].length,m.lineNumber++;m.columnNumber=g-l+1}for(var l=0,u=0,h=/.*(?:\\r\\n?|\\n)|.*$/g,m=r.locator,d=[{currentNSMap:t}],b={},v=0;;){try{var f=e.indexOf("<",v);if(f<0){if(!e.substr(v).match(/^\\s*$/)){var p=r.doc,$=p.createTextNode(e.substr(v));p.appendChild($),r.currentElement=$}return}switch(f>v&&o(f),e.charAt(f+1)){case"/":var D=e.indexOf(">",f+3),C=e.substring(f+2,D),R=d.pop();D<0?(C=e.substring(f+2).replace(/[\\s<].*/,""),i.error("end tag name: "+C+" is not complete:"+R.tagName),D=f+1+C.length):C.match(/\\sv?v=D:o(Math.max(f,v)+1)}}function $e(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function gt(e,t,n,r,i,s){function a(d,b,v){d in n.attributeNames&&s.fatalError("Attribute "+d+" redefined"),n.addValue(d,b,v)}for(var o,c,l=++t,u=j;;){var h=e.charAt(l);switch(h){case"=":if(u===S)o=e.slice(t,l),u=G;else if(u===U)u=G;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(u===G||u===S)if(u===S&&(s.warning('attribute value must after "="'),o=e.slice(t,l)),t=l+1,l=e.indexOf(h,t),l>0)c=e.slice(t,l).replace(/&#?\\w+;/g,i),a(o,c,t-1),u=P;else throw new Error("attribute value no end '"+h+"' match");else if(u==L)c=e.slice(t,l).replace(/&#?\\w+;/g,i),a(o,c,t),s.warning('attribute "'+o+'" missed start quot('+h+")!!"),t=l+1,u=P;else throw new Error('attribute value must after "="');break;case"/":switch(u){case j:n.setTagName(e.slice(t,l));case P:case Q:case ne:u=ne,n.closed=!0;case L:case S:case U:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),u==j&&n.setTagName(e.slice(t,l)),l;case">":switch(u){case j:n.setTagName(e.slice(t,l));case P:case Q:case ne:break;case L:case S:c=e.slice(t,l),c.slice(-1)==="/"&&(n.closed=!0,c=c.slice(0,-1));case U:u===U&&(c=o),u==L?(s.warning('attribute "'+c+'" missed quot(")!'),a(o,c.replace(/&#?\\w+;/g,i),t)):((r[""]!=="http://www.w3.org/1999/xhtml"||!c.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),a(c,c,t));break;case G:throw new Error("attribute value missed!!")}return l;case"\\x80":h=" ";default:if(h<=" ")switch(u){case j:n.setTagName(e.slice(t,l)),u=Q;break;case S:o=e.slice(t,l),u=U;break;case L:var c=e.slice(t,l).replace(/&#?\\w+;/g,i);s.warning('attribute "'+c+'" missed quot(")!!'),a(o,c,t);case P:u=Q;break}else switch(u){case U:var m=n.tagName;(r[""]!=="http://www.w3.org/1999/xhtml"||!o.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),a(o,o,t),t=l,u=S;break;case P:s.warning('attribute space is required"'+o+'"!!');case Q:u=S,t=l;break;case G:u=L,t=l;break;case ne:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function Fe(e,t,n){for(var r=e.tagName,i=null,s=e.length;s--;){var a=e[s],o=a.qName,c=a.value,m=o.indexOf(":");if(m>0)var l=a.prefix=o.slice(0,m),u=o.slice(m+1),h=l==="xmlns"&&u;else u=o,l=null,h=o==="xmlns"&&"";a.localName=u,h!==!1&&(i==null&&(i={},Ue(n,n={})),n[h]=i[h]=c,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,c))}for(var s=e.length;s--;){a=e[s];var l=a.prefix;l&&(l==="xml"&&(a.uri="http://www.w3.org/XML/1998/namespace"),l!=="xmlns"&&(a.uri=n[l||""]))}var m=r.indexOf(":");m>0?(l=e.prefix=r.slice(0,m),u=e.localName=r.slice(m+1)):(l=null,u=e.localName=r);var d=e.uri=n[l||""];if(t.startElement(d,u,r,e),e.closed){if(t.endElement(d,u,r),i)for(l in i)t.endPrefixMapping(l)}else return e.currentNSMap=n,e.localNSMap=i,!0}function Et(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var s=e.indexOf("",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),s):(a=a.replace(/&#?\\w+;/g,r),i.characters(a,0,a.length),s)}return t+1}function Nt(e,t,n,r){var i=r[n];return i==null&&(i=e.lastIndexOf(""),i",t+4);return s>t?(n.comment(e,t+4,s-t-4),s+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(e.substr(t+3,6)=="CDATA["){var s=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,s-t-9),n.endCDATA(),s+3}var a=wt(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var c=a[1][0],l=!1,u=!1;o>3&&(/^public$/i.test(a[2][0])?(l=a[3][0],u=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(u=a[3][0]));var h=a[o-1];return n.startDTD(c,l,u),n.endDTD(),h.index+h[0].length}}return-1}function Dt(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);if(i){var s=i[0].length;return n.processingInstruction(i[1],i[2]),r+2}else return-1}return-1}function Le(){this.attributeNames={}}Le.prototype={setTagName:function(e){if(!Se.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!Se.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};function wt(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}me.XMLReader=Me;me.ParseError=k});var Te=te(J=>{function W(e,t){for(var n in e)t[n]=e[n]}function w(e,t){var n=e.prototype;if(!(n instanceof t)){let i=function(){};var r=i;i.prototype=t.prototype,i=new i,W(n,i),e.prototype=n=i}n.constructor!=e&&(typeof e!="function"&&console.error("unknow Class:"+e),n.constructor=e)}var Tt="http://www.w3.org/1999/xhtml",T={},I=T.ELEMENT_NODE=1,V=T.ATTRIBUTE_NODE=2,re=T.TEXT_NODE=3,ke=T.CDATA_SECTION_NODE=4,Ve=T.ENTITY_REFERENCE_NODE=5,bt=T.ENTITY_NODE=6,qe=T.PROCESSING_INSTRUCTION_NODE=7,Ye=T.COMMENT_NODE=8,Xe=T.DOCUMENT_NODE=9,ze=T.DOCUMENT_TYPE_NODE=10,O=T.DOCUMENT_FRAGMENT_NODE=11,_t=T.NOTATION_NODE=12,N={},E={},qt=N.INDEX_SIZE_ERR=(E[1]="Index size error",1),Yt=N.DOMSTRING_SIZE_ERR=(E[2]="DOMString size error",2),Ct=N.HIERARCHY_REQUEST_ERR=(E[3]="Hierarchy request error",3),Xt=N.WRONG_DOCUMENT_ERR=(E[4]="Wrong document",4),zt=N.INVALID_CHARACTER_ERR=(E[5]="Invalid character",5),jt=N.NO_DATA_ALLOWED_ERR=(E[6]="No data allowed",6),Gt=N.NO_MODIFICATION_ALLOWED_ERR=(E[7]="No modification allowed",7),xt=N.NOT_FOUND_ERR=(E[8]="Not found",8),Qt=N.NOT_SUPPORTED_ERR=(E[9]="Not supported",9),je=N.INUSE_ATTRIBUTE_ERR=(E[10]="Attribute in use",10),Wt=N.INVALID_STATE_ERR=(E[11]="Invalid state",11),Bt=N.SYNTAX_ERR=(E[12]="Syntax error",12),Zt=N.INVALID_MODIFICATION_ERR=(E[13]="Invalid modification",13),Kt=N.NAMESPACE_ERR=(E[14]="Invalid namespace",14),Jt=N.INVALID_ACCESS_ERR=(E[15]="Invalid access",15);function F(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,E[e]),this.message=E[e],Error.captureStackTrace&&Error.captureStackTrace(this,F);return n.code=e,t&&(this.message=this.message+": "+t),n}F.prototype=Error.prototype;W(N,F);function M(){}M.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r=0){for(var i=t.length-1;r0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(n[r]==e)return r}t=t.nodeType==V?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==V?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return t==null}};function Ze(e){return e=="<"&&"<"||e==">"&&">"||e=="&"&&"&"||e=='"'&&"""||"&#"+e.charCodeAt()+";"}W(T,y);W(T,y.prototype);function B(e,t){if(t(e))return!0;if(e=e.firstChild)do if(B(e,t))return!0;while(e=e.nextSibling)}function Z(){}function It(e,t,n){e&&e._inc++;var r=n.namespaceURI;r=="http://www.w3.org/2000/xmlns/"&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function Ke(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;i=="http://www.w3.org/2000/xmlns/"&&delete t._nsMap[n.prefix?n.localName:""]}function de(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,s=0;i;)r[s++]=i,i=i.nextSibling;r.length=s}}}function Je(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,de(e.ownerDocument,e),t}function He(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===O){var i=t.firstChild;if(i==null)return t;var s=t.lastChild}else i=s=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,s.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,n==null?e.lastChild=s:n.previousSibling=s;do i.parentNode=e;while(i!==s&&(i=i.nextSibling));return de(e.ownerDocument||e,e),t.nodeType==O&&(t.firstChild=t.lastChild=null),t}function At(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,de(e.ownerDocument,e,t),t}Z.prototype={nodeName:"#document",nodeType:Xe,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==O){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return this.documentElement==null&&e.nodeType==I&&(this.documentElement=e),He(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Je(this,e)},importNode:function(e,t){return at(this,e,t)},getElementById:function(e){var t=null;return B(this.documentElement,function(n){if(n.nodeType==I&&n.getAttribute("id")==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\\\s)"+e+"(\\\\s|$)");return new q(this,function(n){var r=[];return B(n.documentElement,function(i){i!==n&&i.nodeType==I&&t.test(i.getAttribute("class"))&&r.push(i)}),r})},createElement:function(e){var t=new Y;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new M;var n=t.attributes=new ie;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new se;return e.ownerDocument=this,e.childNodes=new M,e},createTextNode:function(e){var t=new ve;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ge;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ee;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new De;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new ae;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ye;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new Y,r=t.split(":"),i=n.attributes=new ie;return n.childNodes=new M,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new ae,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}};w(Z,y);function Y(){this._nsMap={}}Y.prototype={nodeType:I,hasAttribute:function(e){return this.getAttributeNode(e)!=null},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===O?this.insertBefore(e,null):At(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new q(this,function(t){var n=[];return B(t,function(r){r!==t&&r.nodeType==I&&(e==="*"||r.tagName==e)&&n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new q(this,function(n){var r=[];return B(n,function(i){i!==n&&i.nodeType===I&&(e==="*"||i.namespaceURI===e)&&(t==="*"||i.localName==t)&&r.push(i)}),r})}};Z.prototype.getElementsByTagName=Y.prototype.getElementsByTagName;Z.prototype.getElementsByTagNameNS=Y.prototype.getElementsByTagNameNS;w(Y,y);function ae(){}ae.prototype.nodeType=V;w(ae,y);function K(){}K.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(E[Ct])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}};w(K,y);function ve(){}ve.prototype={nodeName:"#text",nodeType:re,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};w(ve,K);function ge(){}ge.prototype={nodeName:"#comment",nodeType:Ye};w(ge,K);function Ee(){}Ee.prototype={nodeName:"#cdata-section",nodeType:ke};w(Ee,K);function Ne(){}Ne.prototype.nodeType=ze;w(Ne,y);function et(){}et.prototype.nodeType=_t;w(et,y);function tt(){}tt.prototype.nodeType=bt;w(tt,y);function ye(){}ye.prototype.nodeType=Ve;w(ye,y);function se(){}se.prototype.nodeName="#document-fragment";se.prototype.nodeType=O;w(se,y);function De(){}De.prototype.nodeType=qe;w(De,y);function nt(){}nt.prototype.serializeToString=function(e,t,n){return rt.call(e,t,n)};y.prototype.toString=rt;function rt(e,t){var n=[],r=this.nodeType==9&&this.documentElement||this,i=r.prefix,s=r.namespaceURI;if(s&&i==null){var i=r.lookupPrefix(s);if(i==null)var a=[{namespace:s,prefix:null}]}return X(this,n,e,t,a),n.join("")}function it(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i||r==="xml"&&i==="http://www.w3.org/XML/1998/namespace"||i=="http://www.w3.org/2000/xmlns/")return!1;for(var s=n.length;s--;){var a=n[s];if(a.prefix==r)return a.namespace!=i}return!0}function X(e,t,n,r,i){if(r)if(e=r(e),e){if(typeof e=="string"){t.push(e);return}}else return;switch(e.nodeType){case I:i||(i=[]);var s=i.length,a=e.attributes,o=a.length,c=e.firstChild,l=e.tagName;n=Tt===e.namespaceURI||n,t.push("<",l);for(var u=0;u"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):X(c,t,n,r,i),c=c.nextSibling;else for(;c;)X(c,t,n,r,i),c=c.nextSibling;t.push("")}else t.push("/>");return;case Xe:case O:for(var c=e.firstChild;c;)X(c,t,n,r,i),c=c.nextSibling;return;case V:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,Ze),'"');case re:return t.push(e.data.replace(/[<&]/g,Ze).replace(/]]>/g,"]]>"));case ke:return t.push("");case Ye:return t.push("");case ze:var v=e.publicId,f=e.systemId;if(t.push("");else if(f&&f!=".")t.push(" SYSTEM ",f,">");else{var p=e.internalSubset;p&&t.push(" [",p,"]"),t.push(">")}return;case qe:return t.push("");case Ve:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function at(e,t,n){var r;switch(t.nodeType){case I:r=t.cloneNode(!1),r.ownerDocument=e;case O:break;case V:n=!0;break}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(at(e,i,n)),i=i.nextSibling;return r}function we(e,t,n){var r=new t.constructor;for(var i in t){var s=t[i];typeof s!="object"&&s!=r[i]&&(r[i]=s)}switch(t.childNodes&&(r.childNodes=new M),r.ownerDocument=e,r.nodeType){case I:var a=t.attributes,o=r.attributes=new ie,c=a.length;o._ownerElement=r;for(var l=0;l{function ot(e){this.options=e||{locator:{}}}ot.prototype.parseFromString=function(e,t){var n=this.options,r=new St,i=n.domBuilder||new H,s=n.errorHandler,a=n.locator,o=n.xmlns||{},c=/\\/x?html?$/.test(t),l=c?Ot.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return a&&i.setDocumentLocator(a),r.errorHandler=Rt(s,i,a),r.domBuilder=n.domBuilder||i,c&&(o[""]="http://www.w3.org/1999/xhtml"),o.xml=o.xml||"http://www.w3.org/XML/1998/namespace",e&&typeof e=="string"?r.parse(e,o,l):r.errorHandler.error("invalid doc source"),i.doc};function Rt(e,t,n){if(!e){if(t instanceof H)return t;e=t}var r={},i=e instanceof Function;n=n||{};function s(a){var o=e[a];!o&&i&&(o=e.length==2?function(c){e(a,c)}:e),r[a]=o&&function(c){o("[xmldom "+a+"] "+c+be(n))}||function(){}}return s("warning"),s("error"),s("fatalError"),r}function H(){this.cdata=!1}function z(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}H.prototype={startDocument:function(){this.doc=new $t().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,s=i.createElementNS(e,n||t),a=r.length;oe(this,s),this.currentElement=s,this.locator&&z(this.locator,s);for(var o=0;o=t+n||t?new java.lang.String(e,t,n)+"":e}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\\w+/g,function(e){H.prototype[e]=function(){return null}});function oe(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}var Ot=Re(),lt=Pe(),St=lt.XMLReader,Mt=lt.ParseError,$t=ee.DOMImplementation=Te().DOMImplementation;ee.XMLSerializer=Te().XMLSerializer;ee.DOMParser=ot;ee.__DOMHandler=H});function ce(e,t){return(e%t+t)%t}function fe(e){return"ID_xyxyxyxyxyxy".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t=="x"?n:n&3|8;return r.toString(16)})}var{DOMParser:Ft}=ct(),Ut=/(<(span|div).*?<\\/(span|div)>)/g,A=self,ft=class{constructor(){this.queue=[];this.parsing=!1;this.parseTitle=!1;A.addEventListener("message",t=>{if(t.data.type=="options"){let{defaultCalendar:n,addToDefaultIfMissing:r,format:i,parseTitle:s}=t.data;this.addToDefaultIfMissing=r,this.defaultCalendar=n,this.format=i,this.parseTitle=s}}),A.addEventListener("message",t=>{if(t.data.type=="calendars"){let{calendars:n}=t.data;this.calendars=[...n]}}),A.addEventListener("message",t=>{t.data.type=="queue"&&this.add(...t.data.paths)})}add(...t){this.queue.push(...t),this.parsing||this.parse()}async parse(){for(this.parsing=!0;this.queue.length;){let t=this.queue.shift();await this.getFileData(t)}this.parsing=!1,A.postMessage({type:"save"})}async getFileData(t){let n=this;return new Promise(r=>{function i(s){if(s.data.type=="queue"){A.removeEventListener("message",i),r();return}if(s.data.type!="file"||s.data.path!=t)return;A.removeEventListener("message",i);let{data:a,cache:o,allTags:c,file:l}=s.data;n.parseFileForEvents(a,o,c,l),r()}setTimeout(()=>r,500),A.addEventListener("message",i),A.postMessage({path:t,type:"get"})})}getDataFromFrontmatter(t){let n,r,i;return t&&"fc-ignore"in t?{}:(t&&(n=t==null?void 0:t["fc-calendar"],r=t==null?void 0:t["fc-category"],i=t==null?void 0:t["fc-display-name"]),this.addToDefaultIfMissing&&(!n||!n.length)&&(n=this.defaultCalendar),n=n==null?void 0:n.toLowerCase(),{calendar:this.calendars.find(a=>n==a.name.toLowerCase()),fcCategory:r,eventDisplayName:i})}removeEventsFromFile(t){for(let n of this.calendars)for(let r=0;r$.note==i.path&&(!f.timestamp||$.timestamp==f.timestamp));(p==null?void 0:p.date.day)==f.date.day&&(p==null?void 0:p.date.month)==f.date.month&&(p==null?void 0:p.date.year)==f.date.year&&((u=p==null?void 0:p.end)==null?void 0:u.day)==((h=f.end)==null?void 0:h.day)&&((m=p==null?void 0:p.end)==null?void 0:m.month)==((d=f.end)==null?void 0:d.month)&&((b=p==null?void 0:p.end)==null?void 0:b.year)==((v=f.end)==null?void 0:v.year)&&(p==null?void 0:p.category)==f.category&&(p==null?void 0:p.name)==f.name&&(!f.timestamp&&!(p==null?void 0:p.timestamp)||(p==null?void 0:p.timestamp)==f.timestamp)||A.postMessage({type:"update",id:o.id,index:p?o.events.findIndex($=>$.id==(p==null?void 0:p.id)):-1,event:f,original:p})}}parseFrontmatterEvents(t,n,r,i,s){let{date:a,end:o}=this.getDates(r,this.parseTitle?i.basename:"");if(!a)return this.removeEventsFromFile(i.path),[];if((a==null?void 0:a.month)&&typeof(a==null?void 0:a.month)=="string"){let u=t.static.months.find(h=>h.name==a.month);u?a.month=t.static.months.indexOf(u):a.month=null}else(a==null?void 0:a.month)&&typeof(a==null?void 0:a.month)=="number"&&(a.month=ce(a.month-1,t.static.months.length));if((o==null?void 0:o.month)&&typeof(o==null?void 0:o.month)=="string"){let u=t.static.months.find(h=>h.name==o.month);u?o.month=t.static.months.indexOf(u):o.month=null}else(o==null?void 0:o.month)&&typeof(o==null?void 0:o.month)=="number"&&(o.month=ce(o.month-1,t.static.months.length));let c=Number(\`\${a.year}\${a.month}\${a.day}00\`),l=t.categories.find(u=>(u==null?void 0:u.name)==n);return[{id:fe(6),name:s!=null?s:i.basename,note:i.path,date:a,end:o,category:l==null?void 0:l.id,description:"",auto:!0}]}parseTimelineEvents(t,n,r,i){var o;let s=[],a=new Ft;for(let c of n.matchAll(Ut)){let l=a.parseFromString(c[0],"text/html"),u={class:l.documentElement.getAttribute("class"),dataset:{date:l.documentElement.getAttribute("data-date"),title:l.documentElement.getAttribute("data-title"),class:l.documentElement.getAttribute("data-class"),end:l.documentElement.getAttribute("data-end")},content:l.documentElement.textContent};if(u.class!=="ob-timelines"||!u.dataset.date)continue;let h=Number(u.dataset.date[0]=="-"?+u.dataset.date.substring(1,u.dataset.date.length).split("-").join("")*-1:+u.dataset.date.split("-").join("")),m=u.dataset.date.split(/(?(f==null?void 0:f.name)==i);s.push({id:fe(6),name:(o=u.dataset.title)!=null?o:r.basename,note:r.path,date:d,end:b,timestamp:h,category:v==null?void 0:v.id,description:u.content,auto:!0})}return s}parseDate(t){var n;if(typeof t=="string"){if(!/\\d+[./-]\\d+[./-]\\d+/.test(t))return;try{let[r]=(n=t.match(/\\d+[./-]\\d+[./-]\\d+/))!=null?n:[];if(!r)return;let i=r.split(/[.\\-\\/]/).map(a=>Number(a)),s=[...new Set(this.format.replace(/[^\\w]/g,"").toUpperCase().split(""))];return{year:i[s.indexOf("Y")],month:i[s.indexOf("M")],day:i[s.indexOf("D")]}}catch(r){return}}else return t}getDates(t={},n){let r="fc-date"in t?"fc-date":"fc-start",i;t&&r in t&&(i=t[r]),i||(i=n);let s=this.parseDate(i),a="fc-end"in t?t["fc-end"]:null,o=this.parseDate(a);return{date:s,end:o}}};new ft; -`)}var xs=class extends fn.Component{constructor(e){super();this.plugin=e;this.parsing=new Set;this.tree=new Map;this.worker=new ks}get calendars(){return this.plugin.data.calendars}get metadataCache(){return this.plugin.app.metadataCache}get vault(){return this.plugin.app.vault}onload(){this.worker.postMessage({type:"calendars",calendars:this.calendars}),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-updated",()=>{this.worker.postMessage({type:"calendars",calendars:this.calendars})})),this.worker.postMessage({type:"options",parseTitle:this.plugin.data.parseDates,addToDefaultIfMissing:this.plugin.data.addToDefaultIfMissing,format:this.plugin.format,defaultCalendar:this.plugin.defaultCalendar?.name}),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendar-settings-change",()=>{this.worker.postMessage({type:"options",parseTitle:this.plugin.data.parseDates,addToDefaultIfMissing:this.plugin.data.addToDefaultIfMissing,format:this.plugin.format,defaultCalendar:this.plugin.defaultCalendar?.name})})),this.registerEvent(this.metadataCache.on("changed",e=>{this.startParsing([e.path])})),this.registerEvent(this.vault.on("rename",async(e,n)=>{if(!!this.calendars.length&&e instanceof fn.TFile){for(let a of this.calendars)a.events=a.events.filter(r=>r.note!=n);this.worker.postMessage({type:"calendars",calendars:this.calendars}),this.startParsing([e.path])}})),this.registerEvent(this.vault.on("delete",e=>{if(!(e instanceof fn.TFile))return;let n=Date.now();for(let a of this.calendars){let r=a.events.filter(i=>i.note===e.path);a.events=a.events.filter(i=>i.note!=e.path);for(let i of r)this.addToTree(a,i)}this.plugin.saveCalendar(),this.plugin.app.workspace.trigger("fantasy-calendars-event-update",this.tree),this.tree=new Map})),this.worker.addEventListener("message",async e=>{if(e.data.type=="get"){let{path:n}=e.data,a=this.plugin.app.vault.getAbstractFileByPath(n);if(a instanceof fn.TFile){let r=this.metadataCache.getFileCache(a),i=(0,fn.getAllTags)(r),o=await this.vault.cachedRead(a);this.worker.postMessage({type:"file",path:n,cache:r,file:{path:a.path,basename:a.basename},allTags:i,data:o})}else if(a instanceof fn.TFolder){let r=a.children.map(i=>i.path);this.startParsing(r)}}}),this.worker.addEventListener("message",async e=>{if(e.data.type=="update"){let{id:n,index:a,event:r,original:i}=e.data,o=this.calendars.find(l=>l.id==n);if(!o)return;a==-1?o.events.push(r):o.events.splice(a,a>=0?1:0,r),this.addToTree(o,r),i&&this.addToTree(o,i)}}),this.worker.addEventListener("message",async e=>{if(e.data.type=="delete"){let{id:n,index:a,event:r}=e.data;if(!r)return;let i=this.calendars.find(o=>o.id==n);if(!i)return;i.events=i.events.filter(o=>o.id!=r.id),this.addToTree(i,r)}}),this.worker.addEventListener("message",async e=>{e.data.type=="save"&&(this.plugin.app.workspace.trigger("fantasy-calendars-event-update",this.tree),this.tree=new Map,await this.plugin.saveCalendar())}),this.start()}start(e){let n=e?[e]:this.calendars;if(!n.length)return;let a=new Set;for(let r of n){if(!r||!r.autoParse)continue;let i=this.vault.getAbstractFileByPath(r.path);if(!(!i||!(i instanceof fn.TFolder)))for(let o of i.children)a.add(o.path)}!a.size||this.startParsing([...a])}addToTree(e,n){this.tree.has(e.id)||this.tree.set(e.id,new Set);let a=this.tree.get(e.id);if(!a.has(n.date.year)&&(a.add(n.date.year),n.end&&n.end.year!=n.date.year))for(let r=n.date.year+1;r<=n.end.year;r++)a.add(n.date.year)}startParsing(e){this.worker.postMessage({type:"queue",paths:e})}onunload(){this.worker.terminate(),this.worker=null}};var Fs=class{constructor(e){this.plugin=e}getMoons(e,n){let a=n?this.plugin.data.calendars.find(({name:s})=>s==n):this.plugin.defaultCalendar??this.plugin.defaultCalendar,r=this._getHelper(a),i=e||r.current,o=r.getDayForDate(i),l=[];for(let[s,d]of o.moons){let u=createSpan();new Rn({target:u,props:{moon:s,phase:d}}),l.push({icon:u,moon:s,phase:d})}return l}_getHelper(e=this.plugin.defaultCalendar){return new La(e,this.plugin)}};var Lh=xe(Vn()),Ph=ja.Platform.isMacOS?"Meta":"Control",or={name:null,description:null,id:null,static:{incrementDay:!1,firstWeekDay:null,overflow:!0,weekdays:[],months:[],moons:[],displayMoons:!0,displayDayNumber:!1,leapDays:[],eras:[]},current:{year:null,month:null,day:null},events:[],categories:[],autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!0,timelineTag:"#timeline"},jh={addToDefaultIfMissing:!0,calendars:[],configDirectory:null,currentCalendar:null,dailyNotes:!1,dateFormat:"YYYY-MM-DD",defaultCalendar:null,eventPreview:!1,exit:{saving:!1,event:!1,calendar:!1},eventFrontmatter:!1,parseDates:!1,settingsToggleState:{calendars:!1,events:!1},showIntercalary:!1,version:{major:null,minor:null,patch:null}},Ts=class extends ja.Plugin{constructor(){super(...arguments);this.api=new Fs(this);this.watcher=new xs(this)}async addNewCalendar(e,n){let a=!n||e.name!=n?.name||e.autoParse&&!n?.autoParse||e.path!=n?.path;n==null?this.data.calendars.push(e):this.data.calendars.splice(this.data.calendars.indexOf(n),1,e),this.data.defaultCalendar||(this.data.defaultCalendar=e.id),a&&this.watcher.start(e),await this.saveCalendar()}get currentCalendar(){return this.data.calendars.find(e=>e.id==this.data.currentCalendar)}get canUseDailyNotes(){return this.dailyNotes._loaded}get dailyNotes(){return this.app.internalPlugins.getPluginById("daily-notes")}get canUseTimelines(){return this.app.plugins.getPlugin("obsidian-timelines")!=null}syncTimelines(e){return e.syncTimelines&&this.canUseTimelines}timelineTag(e){return this.syncTimelines?this.app.plugins.getPlugin("obsidian-timelines").settings.timelineTag:e.timelineTag}get format(){return(this.data.dailyNotes&&this.canUseDailyNotes?this.dailyNotes.instance.options.format:this.data.dateFormat)??"YYYY-MM-DD"}get defaultCalendar(){return this.data.calendars.find(e=>e.id==this.data.defaultCalendar)??this.data.calendars[0]}get view(){let e=this.app.workspace.getLeavesOfType(Zt),n=e.length?e[0]:null;if(n&&n.view&&n.view instanceof Pn)return n.view}get full(){let e=this.app.workspace.getLeavesOfType(oa),n=e.length?e[0]:null;if(n&&n.view&&n.view instanceof Pn)return n.view}async onload(){console.log("Loading Fantasy Calendars v"+this.manifest.version),this.registerView(Zt,e=>new Pn(this,e)),this.registerView(oa,e=>new Pn(this,e,{full:!0})),this.app.workspace.onLayoutReady(async()=>{await this.loadSettings(),this.watcher.load(),this.addCommands(),this.addSettingTab(new Ei(this)),this.addCalendarView(!0)}),this.addRibbonIcon(Zt,"Open Large Fantasy Calendar",e=>{this.app.workspace.getLeaf(e.getModifierState(Ph)).setViewState({type:oa})})}async onunload(){console.log("Unloading Fantasy Calendars v"+this.manifest.version),this.app.workspace.getLeavesOfType(Zt).forEach(e=>e.detach()),this.app.workspace.getLeavesOfType(oa).forEach(e=>e.detach()),this.watcher.unload()}addCommands(){this.addCommand({id:"open-fantasy-calendar",name:"Open Fantasy Calendar",callback:()=>{this.addCalendarView()}}),this.addCommand({id:"open-big-fantasy-calendar",name:"Open Large Fantasy Calendar",callback:()=>{this.addFullCalendarView()}}),this.addCommand({id:"toggle-moons",name:"Toggle Moons",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Zt);if(n&&n.length)return e||n[0].view.toggleMoons(),!0}}),this.addCommand({id:"view-date",name:"View Date",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Zt);if(n&&n.length)return e||n[0].view.openDate(),!0}}),this.addCommand({id:"view-date",name:"View Note Event",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Zt);if(n&&n.length&&n[0].view instanceof Pn){let a=this.app.workspace.getActiveFile();if(a){let r=n[0].view.calendar.events.find(i=>i.note==a.path);if(r)return e||n[0].view.openDay(r.date),!0}}}})}async addCalendarView(e=!1){e&&this.app.workspace.getLeavesOfType(Zt)?.length||(await this.app.workspace.getRightLeaf(!1).setViewState({type:Zt}),this.view&&this.app.workspace.revealLeaf(this.view.leaf))}async addFullCalendarView(e=!1){e&&this.app.workspace.getLeavesOfType(oa)?.length||(this.app.workspace.getLeaf(!1).setViewState({type:oa}),this.full&&this.app.workspace.revealLeaf(this.full.leaf))}async loadSettings(){if(this.data={...(0,Lh.default)(jh),...await this.loadData()},this.configDirectory&&await this.app.vault.adapter.exists(this.configFilePath)&&(this.data=Object.assign({},this.data,JSON.parse(await this.app.vault.adapter.read(this.configFilePath)))),!this.data.defaultCalendar&&this.data.calendars.length&&(this.data.defaultCalendar=this.data.calendars[0].id),this.data.calendars.length&&!this.data.calendars.find(e=>e.id==this.data.defaultCalendar)&&(this.data.defaultCalendar=this.data.calendars[0].id),this.data.autoParse&&this.data.calendars.length){for(let e of this.data.calendars)e.autoParse=this.data.autoParse,e.path=this.data.path;delete this.data.autoParse,delete this.data.path}this.settingsLoaded=!0,this.app.workspace.trigger("fantasy-calendars-settings-loaded")}onSettingsLoad(e){this.settingsLoaded?e():this.app.workspace.on("fantasy-calendars-settings-loaded",()=>e())}async saveCalendar(){await this.saveSettings(),this.app.workspace.trigger("fantasy-calendars-updated")}get configDirectory(){if(!(!this.data||!this.data.configDirectory))return`${this.data.configDirectory}/plugins/fantasy-calendar`}get configFilePath(){if(!!this.data.configDirectory)return`${this.configDirectory}/data.json`}async saveSettings(){await this.saveData(this.data),this.app.workspace.trigger("fantasy-calendar-settings-change")}async saveData(e){if(this.configDirectory)try{await this.app.vault.adapter.exists(this.configDirectory)||await this.app.vault.adapter.mkdir(this.configDirectory),await this.app.vault.adapter.write(this.configFilePath,JSON.stringify(e))}catch(n){console.error(n),new ja.Notice("There was an error saving into the configured directory.")}await super.saveData(e)}}; -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/*! https://mths.be/he v1.2.0 by @mathias | MIT license */ -/** - * chroma.js - JavaScript library for color conversions - * - * Copyright (c) 2011-2019, Gregor Aisch - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name Gregor Aisch may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ------------------------------------------------------- - * - * chroma.js includes colors from colorbrewer2.org, which are released under - * the following license: - * - * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, - * and The Pennsylvania State University. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific - * language governing permissions and limitations under the License. - * - * ------------------------------------------------------ - * - * Named colors are taken from X11 Color Names. - * http://www.w3.org/TR/css3-color/#svg-color - * - * @preserve - */ diff --git a/.obsidian/plugins/fantasy-calendar/manifest.json b/.obsidian/plugins/fantasy-calendar/manifest.json deleted file mode 100644 index 5dc3583c..00000000 --- a/.obsidian/plugins/fantasy-calendar/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "fantasy-calendar", - "name": "Fantasy Calendar", - "version": "2.2.0", - "minAppVersion": "0.12.10", - "author": "Jeremy Valentine", - "description": "Fantasy calendars in Obsidian!", - "authorUrl": "https://github.com/valentine195/obsidian-fantasy-calendar", - "isDesktopOnly": false -} diff --git a/.obsidian/plugins/fantasy-calendar/styles.css b/.obsidian/plugins/fantasy-calendar/styles.css deleted file mode 100644 index 1665721c..00000000 --- a/.obsidian/plugins/fantasy-calendar/styles.css +++ /dev/null @@ -1 +0,0 @@ -.fantasy-calendar-date-fields{display:flex;justify-content:space-between;align-items:flex-start;gap:.5rem;padding-bottom:.75rem}.fantasy-calendar-date-fields .fantasy-calendar-date-field{display:flex;flex-flow:column nowrap}.fantasy-calendar-picker{padding:5px 15px;display:flex;flex-flow:column nowrap;justify-content:flex-start}.fantasy-calendar-view .view-content{padding:.5rem}.fantasy-calendar-full.view-content{display:flex;flex-flow:column;width:100%}.fantasy-calendar-dropdown{display:flex;flex-flow:column;width:100%;padding-bottom:.75rem}.fantasy-calendar-view-event .modal-content{max-width:75vw}.fantasy-no-calendar{color:var(--text-muted);display:flex;justify-content:center;text-align:center;padding:.5rem}.fantasy-title{margin:0}.full-view .fantasy-title{grid-column:span 3}body:not(.is-mobile) .modal.mod-settings .vertical-tab-content-container .vertical-tab-content.fantasy-calendar-settings.fantasy-calendar-creator-open{overflow:hidden}.fantasy-calendar-settings,.fantasy-calendar-settings-content{background-color:inherit;position:relative}.fantasy-calendar-confirm-buttons-container{display:flex;justify-content:space-between;align-items:center}.fantasy-calendar-confirm-buttons-container .dont-ask{cursor:pointer}.fantasy-calendar-confirm-buttons{display:flex;justify-content:flex-end;align-items:center;gap:.5rem}.modal.mod-settings .vertical-tab-content-container .vertical-tab-content.fantasy-calendar-settings{position:relative}.modal.mod-settings .vertical-tab-content.fantasy-calendar-settings .fantasy-calendar-settings-content h2:first-child{margin-top:initial}.fantasy-calendar-settings details>summary{outline:none;display:block!important;list-style:none!important;list-style-type:none!important;min-height:1rem;border-top-left-radius:.1rem;border-top-right-radius:.1rem;cursor:pointer;position:relative}.fantasy-calendar-settings details>summary::-webkit-details-marker,.fantasy-calendar-settings details>summary::marker{display:none!important}.fantasy-calendar-settings details>summary>.collapser{position:absolute;top:50%;right:8px;transform:translateY(-50%);content:""}.fantasy-calendar-settings details>summary>.collapser>.handle{transform:rotate(0);transition:transform .25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--admonition-details-icon);mask-image:var(--admonition-details-icon);width:20px;height:20px}.fantasy-calendar-settings details[open]>summary>.collapser>.handle{transform:rotate(90deg)}.fantasy-calendar-settings .fantasy-calendars{border-bottom:1px solid var(--background-modifier-border);border-top:1px solid var(--background-modifier-border);padding:18px 0 0}.fantasy-calendar-create-calendar input[disabled]{cursor:not-allowed}.fantasy-calendar-settings .fantasy-calendar-warning.date-format{color:red}.fantasy-calendar-settings .fantasy-calendar-warning{display:flex;align-items:center;gap:.25rem}.fantasy-calendar-settings .existing-calendars{padding:18px}.fantasy-calendar-settings .existing-calendars>span{display:block;text-align:center;color:var(--text-muted)}.fantasy-calendar-nested-settings .setting-item{border:0px;padding-bottom:0}.fantasy-calendar-nested-settings{padding-bottom:18px}.fantasy-calendar-nested-settings[open] .setting-item-heading,.fantasy-calendar-nested-settings:not(details) .setting-item-heading{border-top:0px;border-bottom:1px solid var(--background-modifier-border)}.fantasy-calendar-nested-settings .warning-container{position:relative;display:flex;align-items:center;gap:.25rem}.fantasy-calendar-settings .fantasy-calendar-config .setting-item-name{display:flex;gap:.25rem;align-items:center}.fantasy-context-buttons{display:flex;justify-content:flex-end;align-items:center;gap:.25rem}.fantasy-calendar-create-event .event-info{display:flex;flex-flow:column nowrap;width:100%;justify-content:flex-start;align-items:flex-start;gap:.5rem}.fantasy-calendar-create-event .event-info>*,.fantasy-calendar-create-event .setting-item{width:100%;padding-top:0;padding-bottom:.75rem;border:0}.fantasy-calendar-create-event .event-info>.event-description{display:flex;flex-flow:column nowrap}.fantasy-calendar-create-event .event-info textarea{resize:vertical}.fantasy-calendar-choose-preset .fantasy-calendar-preset-container{display:grid;grid-template-columns:1fr 1fr 1fr;grid-auto-rows:1fr;gap:1rem;align-items:center;justify-content:flex-start;margin:5px}.fantasy-calendar-choose-preset .fantasy-calendar-preset-container button{height:100%;width:100%;white-space:pre-line;max-width:250px}.fantasy-calendar-choose-preset .fantasy-calendar-preset-container button.mod-cta{box-shadow:0 0 10px var(--background-modifier-success)}.fantasy-leap-day-interval-description{color:var(--text-muted);border:0}.fantasy-calendar-event-date{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.5rem}.fantasy-calendar-event-formula .setting-item-control{gap:.25rem} diff --git a/.obsidian/plugins/meld-encrypt/main.js b/.obsidian/plugins/meld-encrypt/main.js index 590098f9..2c71d155 100644 --- a/.obsidian/plugins/meld-encrypt/main.js +++ b/.obsidian/plugins/meld-encrypt/main.js @@ -28,11 +28,12 @@ function __awaiter(thisArg, _arguments, P, generator) { } class DecryptModal extends obsidian.Modal { - constructor(app, title, text = '') { + constructor(app, title, text = '', showButton) { super(app); this.decryptInPlace = false; this.text = text; this.titleEl.innerText = title; + this.showButton = showButton; } onOpen() { let { contentEl } = this; @@ -44,6 +45,12 @@ class DecryptModal extends obsidian.Modal { //textEl.focus(); // Doesn't seem to work here... setTimeout(() => { textEl.focus(); }, 100); //... but this does const btnContainerEl = contentEl.createDiv(''); + if (this.showButton) { + const copyBtnEl = btnContainerEl.createEl('button', { text: 'Copy' }); + copyBtnEl.addEventListener('click', () => { + navigator.clipboard.writeText(textEl.value); + }); + } const decryptInPlaceBtnEl = btnContainerEl.createEl('button', { text: 'Decrypt in-place' }); decryptInPlaceBtnEl.addEventListener('click', () => { this.decryptInPlace = true; @@ -381,6 +388,18 @@ class MeldEncryptSettingsTab extends obsidian.PluginSettingTab { this.updateSettingsUi(); })); }); + new obsidian.Setting(containerEl) + .setName('Copy button?') + .setDesc('Show a button to copy decrypted text.') + .addToggle(toggle => { + toggle + .setValue(this.plugin.settings.showButton) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.showButton = value; + yield this.plugin.saveSettings(); + this.updateSettingsUi(); + })); + }); new obsidian.Setting(containerEl) .setName('Remember password?') .setDesc('Remember the last used password for this session.') @@ -435,6 +454,7 @@ const _HINT = '💡'; const DEFAULT_SETTINGS = { expandToWholeLines: true, confirmPassword: true, + showButton: false, rememberPassword: true, rememberPasswordTimeout: 30 }; @@ -524,7 +544,8 @@ class MeldEncrypt extends obsidian.Plugin { } getClosestNextTextCursorPos(editor, text, defaultValue) { const initOffset = editor.posToOffset(editor.getCursor("from")); - let maxOffset = editor.posToOffset({ line: editor.lastLine(), ch: Number.MAX_VALUE }); + const lastLineNum = editor.lastLine(); + let maxOffset = editor.posToOffset({ line: lastLineNum, ch: editor.getLine(lastLineNum).length }); for (let offset = initOffset; offset <= maxOffset - text.length; offset++) { const offsetPos = editor.offsetToPos(offset); const textEndOffset = offset + text.length; @@ -642,7 +663,7 @@ class MeldEncrypt extends obsidian.Plugin { editor.replaceSelection(decryptedText); } else { - const decryptModal = new DecryptModal(this.app, '🔓', decryptedText); + const decryptModal = new DecryptModal(this.app, '🔓', decryptedText, this.settings.showButton); decryptModal.onClose = () => { editor.focus(); if (decryptModal.decryptInPlace) { @@ -670,7 +691,7 @@ class MeldEncrypt extends obsidian.Plugin { editor.replaceSelection(decryptedText); } else { - const decryptModal = new DecryptModal(this.app, '🔓', decryptedText); + const decryptModal = new DecryptModal(this.app, '🔓', decryptedText, this.settings.showButton); decryptModal.onClose = () => { editor.focus(); if (decryptModal.decryptInPlace) { @@ -740,4 +761,4 @@ class Decryptable { } module.exports = MeldEncrypt; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsiLi4vbm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsIi4uL3NyYy9EZWNyeXB0TW9kYWwudHMiLCIuLi9zcmMvUGFzc3dvcmRNb2RhbC50cyIsIi4uL3NyYy9DcnlwdG9IZWxwZXIudHMiLCIuLi9zcmMvTWVsZEVuY3J5cHRTZXR0aW5nc1RhYi50cyIsIi4uL3NyYy9tYWluLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMgc29mdHdhcmUgZm9yIGFueVxyXG5wdXJwb3NlIHdpdGggb3Igd2l0aG91dCBmZWUgaXMgaGVyZWJ5IGdyYW50ZWQuXHJcblxyXG5USEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiIEFORCBUSEUgQVVUSE9SIERJU0NMQUlNUyBBTEwgV0FSUkFOVElFUyBXSVRIXHJcblJFR0FSRCBUTyBUSElTIFNPRlRXQVJFIElOQ0xVRElORyBBTEwgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUk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gICAgZnVuY3Rpb24gc3RlcChvcCkge1xyXG4gICAgICAgIGlmIChmKSB0aHJvdyBuZXcgVHlwZUVycm9yKFwiR2VuZXJhdG9yIGlzIGFscmVhZHkgZXhlY3V0aW5nLlwiKTtcclxuICAgICAgICB3aGlsZSAoXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBd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xuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRb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BO0FBR2hCLENBQUE7QUFFRCxNQUFNLFdBQVcsQ0FBQTtBQUloQjs7OzsifQ== diff --git a/.obsidian/plugins/meld-encrypt/manifest.json b/.obsidian/plugins/meld-encrypt/manifest.json index 536874e7..58a8ba9e 100644 --- a/.obsidian/plugins/meld-encrypt/manifest.json +++ b/.obsidian/plugins/meld-encrypt/manifest.json @@ -1,7 +1,7 @@ { "id": "meld-encrypt", "name": "Meld Encrypt", - "version": "1.6.0", + "version": "1.6.2", "minAppVersion": "0.12.15", "description": "Hide secrets in your notes", "author": "meld-cp", diff --git a/.obsidian/plugins/obsidian-activity-history/data.json b/.obsidian/plugins/obsidian-activity-history/data.json index cd0c6cdb..74b27b75 100644 --- a/.obsidian/plugins/obsidian-activity-history/data.json +++ b/.obsidian/plugins/obsidian-activity-history/data.json @@ -12,8 +12,8 @@ "checkpointList": [ { "path": "/", - "date": "2022-03-11", - "size": 2660075 + "date": "2022-03-13", + "size": 2853750 } ], "activityHistory": [ @@ -270,7 +270,15 @@ }, { "date": "2022-03-11", - "value": 1715 + "value": 1716 + }, + { + "date": "2022-03-12", + "value": 63712 + }, + { + "date": "2022-03-13", + "value": 135114 } ] } diff --git a/.obsidian/plugins/obsidian-commits/data.json b/.obsidian/plugins/obsidian-commits/data.json index b9873dcc..65d8e489 100644 --- a/.obsidian/plugins/obsidian-commits/data.json +++ b/.obsidian/plugins/obsidian-commits/data.json @@ -2324,11 +2324,6 @@ "tags": 4, "links": 1 }, - "00.05 Media/Kids for Cash.md": { - "size": 369, - "tags": 0, - "links": 2 - }, "00.03 News/@News.md": { "size": 2574, "tags": 1, @@ -2369,11 +2364,6 @@ "tags": 3, "links": 8 }, - "01.01 Life Orga/@Life Admin.md": { - "size": 2433, - "tags": 4, - "links": 4 - }, "01.01 Life Orga/@Lifestyle.md": { "size": 2339, "tags": 4, @@ -2665,7 +2655,7 @@ "links": 1 }, "01.02 Home/Fashion.md": { - "size": 1221, + "size": 1577, "tags": 2, "links": 2 }, @@ -2844,16 +2834,6 @@ "tags": 0, "links": 4 }, - "00.01 Admin/Templates/FastStart-StartUpScript.md": { - "size": 415, - "tags": 0, - "links": 0 - }, - "00.01 Admin/Templates/FastStart-GenerateListOfInstalledPlugins.md": { - "size": 98, - "tags": 0, - "links": 0 - }, "00.01 Admin/Templater scripts/FastStart-Plugins-ShortDelay.md": { "size": 398, "tags": 0, @@ -2975,7 +2955,7 @@ "links": 1 }, "00.01 Admin/Memos/2022-03-02.md": { - "size": 942, + "size": 1062, "tags": 0, "links": 6 }, @@ -3059,11 +3039,6 @@ "tags": 0, "links": 4 }, - "00.02 Inbox/Babylone.md": { - "size": 1598, - "tags": 3, - "links": 1 - }, "03.01 Reading list/On the Road.md": { "size": 2582, "tags": 3, @@ -3080,9 +3055,9 @@ "links": 4 }, "05.02 Networks/Configuring Telegram bots.md": { - "size": 1702, + "size": 3131, "tags": 0, - "links": 8 + "links": 9 }, "05.02 Networks/GitHub - fxkjdlogwatch-telegram-bot Send logwatch results to your telegram account.md": { "size": 2903, @@ -3098,14 +3073,94 @@ "size": 932, "tags": 0, "links": 4 + }, + "00.01 Admin/Memos/2022-03-12.md": { + "size": 933, + "tags": 0, + "links": 4 + }, + "00.03 News/The cells that can give you super-immunity.md": { + "size": 17375, + "tags": 3, + "links": 1 + }, + "00.03 News/We Need to Retire the Term “Microaggressions”.md": { + "size": 11173, + "tags": 2, + "links": 1 + }, + "00.03 News/Simone de Beauvoir recommends we fight for ourselves as we age Psyche Ideas.md": { + "size": 14874, + "tags": 3, + "links": 1 + }, + "00.03 News/Seneca On Coping with the Shortness of Life.md": { + "size": 18344, + "tags": 3, + "links": 1 + }, + "00.01 Admin/Templater scripts/FastStart-GenerateListOfInstalledPlugins.md": { + "size": 98, + "tags": 0, + "links": 0 + }, + "00.01 Admin/Templater scripts/FastStart-StartUpScript.md": { + "size": 415, + "tags": 0, + "links": 0 + }, + "00.01 Admin/Memos/2022-03-13.md": { + "size": 961, + "tags": 0, + "links": 4 + }, + "00.04 IT/40+ of the best open-source tools to build your startup, from project management to infrastructure.md": { + "size": 6595, + "tags": 0, + "links": 1 + }, + "00.03 News/Amateur open-source researchers went viral unpacking the war in Ukraine.md": { + "size": 9459, + "tags": 3, + "links": 1 + }, + "03.01 Reading list/Babylone.md": { + "size": 1598, + "tags": 3, + "links": 1 + }, + "00.05 Media/2022-03-15 Kids for Cash.md": { + "size": 451, + "tags": 0, + "links": 2 + }, + "05.02 Networks/GitHub - deividgdtfail2ban_telegram_notifications Sending fail2ban notifications using a Telegram bot.md": { + "size": 5337, + "tags": 0, + "links": 2 + }, + "00.03 News/Three Bodies in Texas.md": { + "size": 49841, + "tags": 2, + "links": 1 + }, + "00.03 News/For the West, the Worst Is Yet to Come.md": { + "size": 15963, + "tags": 3, + "links": 1 + }, + "00.03 News/Jeff Zucker Scandal Inside the CNN President's Downfall.md": { + "size": 43055, + "tags": 4, + "links": 1 } }, "commitTypes": { "/": { - "Refactor": 262, - "Create": 226, - "Link": 395, - "Expand": 220 + "Refactor": 282, + "Create": 241, + "Link": 416, + "Expand": 229 } }, "dailyCommits": { @@ -3116,17 +3171,17 @@ "3": 0, "4": 2, "5": 3, - "6": 12, - "7": 92, - "8": 112, - "9": 116, - "10": 72, - "11": 38, - "12": 70, - "13": 142, + "6": 14, + "7": 98, + "8": 115, + "9": 119, + "10": 79, + "11": 58, + "12": 71, + "13": 148, "14": 59, "15": 58, - "16": 15, + "16": 32, "17": 47, "18": 19, "19": 40, @@ -3144,12 +3199,21 @@ "Thu": 131, "Fri": 124, "Sat": 0, - "Sun": 555 + "Sun": 620 } }, "recentCommits": { "/": { "Expanded": [ + " Configuring Telegram bots ", + " GitHub - deividgdtfail2ban_telegram_notifications Sending fail2ban notifications using a Telegram bot ", + " GitHub - deividgdtfail2ban_telegram_notifications Sending fail2ban notifications using a Telegram bot ", + " Configuring Telegram bots ", + " 2022-03-15 Kids for Cash ", + " 2022-03-13 ", + " Fashion ", + " 2022-03-02 ", + " 2022-03-12 ", " Obsidian website publish - comments ", " 2022-03-11 ", " Configuring Telegram bots ", @@ -3191,18 +3255,24 @@ " 2022-02-28 ", " On the Road ", " On the Road ", - " 2022-02-27 ", - " Afghan Anar ", - " FastStart-Plugins-LongDelay ", - " FastStart-Plugins-ShortDelay ", - " FastStart-Plugins-LongDelay ", - " FastStart-Plugins-ShortDelay ", - " FastStart-Plugins-LongDelay ", - " List of plugins ", - " FastStart-StartUpScript ", - " FastStart-GenerateListOfInstalledPlugins " + " 2022-02-27 " ], "Created": [ + " Jeff Zucker Scandal Inside the CNN President's Downfall ", + " ‘I’m the Operator’ The Aftermath of a Self-Driving Tragedy ", + " For the West, the Worst Is Yet to Come ", + " Three Bodies in Texas - Believer Magazine ", + " Three Bodies in Texas - Believer Magazine ", + " GitHub - deividgdtfail2ban_telegram_notifications Sending fail2ban notifications using a Telegram bot ", + " Amateur open-source researchers went viral unpacking the war in Ukraine ", + " 40+ of the best open-source tools to build your startup, from project management to infrastructure ", + " 2022-03-13 ", + " Seneca On Coping with the Shortness of Life ", + " Simone de Beauvoir recommends we fight for ourselves as we age Psyche Ideas ", + " We Need to Retire the Term “Microaggressions” ", + " The cells that can give you super-immunity ", + " 2022-03-12 ", + " Docker config ", " 2022-03-11 ", " GitHub - matriphemonit2telegram A simple script to send Monit alerts using Telegram bot. ", " GitHub - fxkjdlogwatch-telegram-bot Send logwatch results to your telegram account ", @@ -3238,24 +3308,25 @@ " On the Road Introduction & Summary ", " On the Road ", " Red Lentil Soup With Preserved Lemon and Crispy Garlic ", - " The Taliban Confront the Realities of Power ", - " Always Be Suspicious of the “Cool Mom” ", - " Putin’s New Iron Curtain ", - " Opinion The Russia Sanctions That Could Actually Stop Putin ", - " Vladimir Putin’s Revisionist History of Russia and Ukraine ", - " 2022-02-27 ", - " The Power of Emotional Honesty ", - " On the pleasures of hand-writing letters you’ll never send ", - " A Vibe Shift Is Coming ", - " In Kashmir, indigenous Muslim healers cure broken bones with spirituality — and science ", - " As rents rise, Americans are stuck in homes even when they want to move ", - " Shilla ", - " 2022-02-26 ", - " Afghan Anar ", - " A view from across the river ", - " Notes apps are where ideas go to die. And that’s good. " + " The Taliban Confront the Realities of Power " ], "Renamed": [ + " Jeff Zucker Scandal Inside the CNN President's Downfall ", + " For the West, the Worst Is Yet to Come ", + " Three Bodies in Texas ", + " Three Bodies in Texas ", + " GitHub - deividgdtfail2ban_telegram_notifications Sending fail2ban notifications using a Telegram bot ", + " 2022-03-15 Kids for Cash ", + " 2022-03-15 Kids for Cash ", + " Babylone ", + " Amateur open-source researchers went viral unpacking the war in Ukraine ", + " 40+ of the best open-source tools to build your startup, from project management to infrastructure ", + " FastStart-StartUpScript ", + " FastStart-GenerateListOfInstalledPlugins ", + " Seneca On Coping with the Shortness of Life ", + " Simone de Beauvoir recommends we fight for ourselves as we age Psyche Ideas ", + " We Need to Retire the Term “Microaggressions” ", + " The cells that can give you super-immunity ", " GitHub - matriphemonit2telegram A simple script to send Monit alerts using Telegram bot. ", " GitHub - fxkjdlogwatch-telegram-bot Send logwatch results to your telegram account ", " Configuring Telegram bots ", @@ -3290,25 +3361,17 @@ " Notes apps are where ideas go to die. And that’s good. ", " The Science of How Alive You Really Are Alan Turing, Trees, and the Wonder of Life ", " Gaming Wall Street ", - " Gaming Wall Street ", - " List of plugins ", - " FastStart-Plugins-LongDelay ", - " FastStart-Plugins-ShortDelay ", - " FastStart-GenerateListOfInstalledPlugins ", - " FastStart-StartUpScript ", - " 4 Non-Traditional Workplace Practices For Leaders To Consider Adopting ", - " The curse of sliced bread ", - " Visualise your finances with hledger, InfluxDB, and Grafana ", - " Crypto industry makes push into regulated derivatives markets ", - " The Great Resignation has morphed into the Great Sabbatical ", - " A Vibe Shift Is Coming ", - " Schluessel ", - " Toto ", - " Bimi ", - " Iroquois ", - " L’enquête « Suisse Secrets » relance le débat sur la liberté de la presse face au secret bancaire " + " Gaming Wall Street " ], "Tagged": [ + " Jeff Zucker Scandal Inside the CNN President's Downfall ", + " For the West, the Worst Is Yet to Come ", + " Three Bodies in Texas ", + " Amateur open-source researchers went viral unpacking the war in Ukraine ", + " Seneca On Coping with the Shortness of Life ", + " Simone de Beauvoir recommends we fight for ourselves as we age Psyche Ideas ", + " The cells that can give you super-immunity ", + " We Need to Retire the Term “Microaggressions” ", " Babylone ", " The twitching generation ", " Slow sex, long life ", @@ -3351,15 +3414,7 @@ " Confessions of a Bitcoin Widow How a Dream Life Turned into a Nightmare The Walrus ", " Cowboys paid $2.4M over cheerleader allegations ", " If they could turn back time how tech billionaires are trying to reverse the ageing process ", - " Nurses Have Finally Learned What They’re Worth ", - " Are Greeting Card Messages Getting Longer A Very Serious Investigation ", - " La Baracca ", - " Fashion ", - " Understanding Argument Styles Is The Secret To A Happy Relationship ", - " What Is the Metaverse A Beginner's Guide to Tech's Latest Obsession ", - " What’s the Matter with American Cities ", - " Tous les hommes n'habitent pas le monde de la même façon - Jean-Paul Dubois ", - " What Is the Metaverse A Beginner's Guide to Tech's Latest Obsession " + " Nurses Have Finally Learned What They’re Worth " ], "Refactored": [ " @Main Dashboard ", @@ -3415,9 +3470,26 @@ " Banana Foster ", " Waco biker shootout - why was noone convicted? ", " Untitled ", - " mbvservers_bot " + " mbvservers_bot ", + " Docker config ", + " @Life Admin ", + " Three Bodies in Texas - Believer Magazine ", + " ‘I’m the Operator’ The Aftermath of a Self-Driving Tragedy " ], "Linked": [ + " Jeff Zucker Scandal Inside the CNN President's Downfall ", + " For the West, the Worst Is Yet to Come ", + " Three Bodies in Texas ", + " Configuring Telegram bots ", + " GitHub - deividgdtfail2ban_telegram_notifications Sending fail2ban notifications using a Telegram bot ", + " Amateur open-source researchers went viral unpacking the war in Ukraine ", + " 40+ of the best open-source tools to build your startup, from project management to infrastructure ", + " 2022-03-13 ", + " Seneca On Coping with the Shortness of Life ", + " Simone de Beauvoir recommends we fight for ourselves as we age Psyche Ideas ", + " The cells that can give you super-immunity ", + " We Need to Retire the Term “Microaggressions” ", + " 2022-03-12 ", " 2022-03-11 ", " Server VPN ", " Server Tools ", @@ -3455,20 +3527,7 @@ " Managing people 🤯 Andreas Klinger ", " 2022-03-01 ", " Reading Simone de Beauvoir’s ‘Ethics of Ambiguity’ in prison Aeon Essays ", - " 2022-02-28 ", - " On the Road ", - " On the Road ", - " Red Lentil Soup With Preserved Lemon and Crispy Garlic ", - " The Taliban Confront the Realities of Power ", - " Always Be Suspicious of the “Cool Mom” ", - " Vladimir Putin’s Revisionist History of Russia and Ukraine ", - " Opinion The Russia Sanctions That Could Actually Stop Putin ", - " Putin’s New Iron Curtain ", - " 2022-02-27 ", - " The Power of Emotional Honesty ", - " On the pleasures of hand-writing letters you’ll never send ", - " As rents rise, Americans are stuck in homes even when they want to move ", - " In Kashmir, indigenous Muslim healers cure broken bones with spirituality — and science " + " 2022-02-28 " ], "Removed Tags from": [ " Le Miel de Paris ", diff --git a/.obsidian/plugins/obsidian-dice-roller/manifest.json b/.obsidian/plugins/obsidian-dice-roller/manifest.json index e1829a20..29e91b99 100644 --- a/.obsidian/plugins/obsidian-dice-roller/manifest.json +++ b/.obsidian/plugins/obsidian-dice-roller/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-dice-roller", "name": "Dice Roller", - "version": "8.3.0", + "version": "8.3.1", "minAppVersion": "0.12.15", "description": "Inline dice rolling for Obsidian.md", "author": "Jeremy Valentine", diff --git a/.obsidian/plugins/obsidian-dice-roller/styles.css b/.obsidian/plugins/obsidian-dice-roller/styles.css index d5a3f132..b9b57b02 100644 --- a/.obsidian/plugins/obsidian-dice-roller/styles.css +++ b/.obsidian/plugins/obsidian-dice-roller/styles.css @@ -1 +1 @@ -.dice-roller{position:relative;display:inline-block;cursor:pointer;margin:0 .25em 0 0}.dice-roller.no-icon{margin:0}.dice-roller>div{display:inline-block}.dice-roller span{font-weight:700}.dice-roller>.dice-roller-button{display:inline-block;position:relative;font-size:inherit;margin-left:.25em}.dice-roller.has-embed .dice-roller-result{width:100%;padding:1rem}.dice-roller.has-embed .dice-roller-result .markdown-embed{display:flex;margin-top:.5rem;padding-right:0}.dice-roller.has-embed .dice-roller-button{padding-top:.5rem}.dice.tooltip{max-width:unset!important}.workspace .markdown-preview-view .dice-roller.has-embed{display:flex;padding-right:.25rem;margin:.25rem 0}.dice-no-results{font-style:italic;text-align:center}.dice-roller.has-embed .internal-embed{width:100%}.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-button,.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-result{display:inline;padding:0}.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-result .embedded-table-result{margin-bottom:0}.dice-roller.has-embed .internal-embed *:last-child:not(svg):not(.dice-content-copy):not(.markdown-embed .dice-roller):not(.dice-roller-result > .embedded-table-result *){margin-bottom:15px}.dice-roller.has-embed .dice-file-name{font-style:italic}.dice-section-result{position:relative}.dice-content-copy{color:var(--text-faint);cursor:pointer;height:fit-content}.dice-content-copy.no-show{display:none}.dice-content-copy:hover{color:var(--text-normal)}.dice-roller.has-embed .dice-section-result .dice-content-copy,.dice-content-copy:hover{opacity:1}.dice-roller-result{position:relative}.dice-roller-result .embedded-table-result p{margin:0;display:inline-block}.dice-roller-settings .coffee{width:60%;color:var(--text-faint);margin:.5rem auto;text-align:center}.dice-roller-settings .coffee img{height:30px}.dice-roller-setting-additional-container>.setting-item:not(.setting-item-heading){border:0px}.dice-roller-setting-additional-container{border-bottom:1px solid var(--background-modifier-border);border-top:1px solid var(--background-modifier-border);padding:18px 0}.dice-roller-setting-additional-container>.setting-item-heading:only-child{padding-bottom:18px}.dice-roller-setting-additional-container>.additional .no-formulas{width:auto;display:block;text-align:center}.dice-roller-setting-additional-container>.additional>.setting-item{border-top:0;padding-top:9px}.dice-roller-setting-additional-container>.additional>.setting-item>.setting-item-control>*:first-child{margin:0 6px}.dice-roller-setting-additional-container .add-new-formula{margin:0 1rem;padding:1rem 1rem 0;border-radius:.5rem;box-shadow:0 0 .25rem var(--background-modifier-box-shadow)}.dice-roller-setting-additional-container .add-new-formula .formula-data .setting-item{border:0}.renderer-container{position:absolute;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:9999999;transition:opacity 1s ease-out}.dice-roller-view .dice-roller-roll:disabled{cursor:not-allowed;opacity:.75}.workspace-split.mod-right-split .view-content.dice-roller-view{padding:.5rem;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:12px}.dice-roller-view .dice-roller-grid{display:grid;grid-template-rows:auto auto;justify-content:center;gap:6px}.dice-roller-view .dice-roller-grid .dice-buttons{display:flex;flex-flow:row wrap;align-items:center;justify-content:center;width:fit-content}.dice-roller-view .dice-roller-grid .dice-custom-formula-container{display:flex;justify-content:space-between;align-items:center}.dice-roller-view .dice-roller-grid .dice-custom-formula{display:flex;justify-content:flex-start;align-items:center}.dice-roller-view .setting-editor-extra-setting-button{width:fit-content}.dice-roller-view .dice-button .clickable-icon>svg{width:36px;height:36px}.dice-roller-view .dice-context{display:grid;grid-template-columns:1fr auto}.dice-roller-view .dice-context .add-subtract{display:flex;align-items:center}.dice-roller-view input,.dice-roller-view textarea{width:100%}.dice-roller-view .dice-roller-grid .advantage-disadvantage{display:flex;justify-content:center;align-items:center;gap:.5rem}.dice-roller-view .dice-roller-grid .advantage-disadvantage button{margin:0;min-width:66px}.dice-roller-view .dice-roller-formula{display:flex;flex-flow:column nowrap;justify-content:space-between;align-items:flex-end;gap:12px}.dice-roller-view .dice-roller-formula .action-buttons{display:flex;justify-content:flex-end}.dice-roller-view .dice-roller-formula button{margin-right:0;margin-left:12px}.dice-roller-view hr{margin-bottom:0}.dice-roller-view .dice-roller-results-container .dice-roller-results-header{display:flex;justify-content:space-between;align-items:center;margin:6px 0;width:100%;border-bottom:1px solid var(--background-modifier-border)}.dice-roller-view .dice-roller-results-container .dice-roller-results-header h4{margin:0}.dice-roller-view .dice-roller-results{display:flex;flex-flow:column nowrap;gap:6px}.dice-roller-view .dice-roller-results .view-result{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;border:1px solid var(--background-modifier-border);border-radius:.25rem;position:relative}.dice-roller-view .dice-roller-results .view-result .dice-content-copy{position:absolute;top:0;right:0;padding:.25rem}.dice-roller-view .dice-roller-results .view-result .dice-result-reroll{position:absolute;top:0;left:0;padding:.25rem;margin:0}.dice-roller-view .dice-roller-results .view-result strong{font-size:x-large}.dice-roller-view .dice-roller-results .view-result .result-context{align-self:flex-end;width:100%;display:flex;align-items:center;justify-content:space-between;padding:.25rem;font-size:x-small}.dice-roller-view .dice-roller-results .view-result .result-context .clickable-icon{margin-right:0}.dice-roller-view .dice-roller-results>span{color:var(--text-muted);margin:0 auto}.dice-renderer{position:absolute;top:0;left:0} +.dice-roller{position:relative;display:inline-flex;align-items:flex-start;cursor:pointer;margin:0 .25em 0 0}.dice-roller.no-icon{margin:0}.dice-roller>div{display:inline-block}.dice-roller span{font-weight:700}.dice-roller>.dice-roller-button{display:inline-block;position:relative;font-size:inherit;margin-left:.25em}.dice-roller.has-embed .dice-roller-result{width:100%;padding:1rem}.dice-roller.has-embed .dice-roller-result .markdown-embed{display:flex;margin-top:.5rem;padding-right:0}.dice-roller.has-embed .dice-roller-button{padding-top:.5rem}.dice.tooltip{max-width:unset!important}.workspace .markdown-preview-view .dice-roller.has-embed{display:flex;padding-right:.25rem;margin:.25rem 0}.dice-no-results{font-style:italic;text-align:center}.dice-roller.has-embed .internal-embed{width:100%}.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-button,.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-result{display:inline;padding:0}.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-result .embedded-table-result{margin-bottom:0}.dice-roller.has-embed .internal-embed *:last-child:not(svg):not(.dice-content-copy):not(.markdown-embed .dice-roller):not(.dice-roller-result > .embedded-table-result *){margin-bottom:15px}.dice-roller.has-embed .dice-file-name{font-style:italic}.dice-section-result{position:relative}.dice-content-copy{color:var(--text-faint);cursor:pointer;height:fit-content}.dice-content-copy.no-show{display:none}.dice-content-copy:hover{color:var(--text-normal)}.dice-roller.has-embed .dice-section-result .dice-content-copy,.dice-content-copy:hover{opacity:1}.dice-roller-result{position:relative}.dice-roller-result .embedded-table-result p{margin:0;display:inline-flex}.dice-roller-settings .coffee{width:60%;color:var(--text-faint);margin:.5rem auto;text-align:center}.dice-roller-settings .coffee img{height:30px}.dice-roller-setting-additional-container>.setting-item:not(.setting-item-heading){border:0px}.dice-roller-setting-additional-container{border-bottom:1px solid var(--background-modifier-border);border-top:1px solid var(--background-modifier-border);padding:18px 0}.dice-roller-setting-additional-container>.setting-item-heading:only-child{padding-bottom:18px}.dice-roller-setting-additional-container>.additional .no-formulas{width:auto;display:block;text-align:center}.dice-roller-setting-additional-container>.additional>.setting-item{border-top:0;padding-top:9px}.dice-roller-setting-additional-container>.additional>.setting-item>.setting-item-control>*:first-child{margin:0 6px}.dice-roller-setting-additional-container .add-new-formula{margin:0 1rem;padding:1rem 1rem 0;border-radius:.5rem;box-shadow:0 0 .25rem var(--background-modifier-box-shadow)}.dice-roller-setting-additional-container .add-new-formula .formula-data .setting-item{border:0}.renderer-container{position:absolute;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:9999999;transition:opacity 1s ease-out}.dice-roller-view .dice-roller-roll:disabled{cursor:not-allowed;opacity:.75}.workspace-split.mod-right-split .view-content.dice-roller-view{padding:.5rem;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:12px}.dice-roller-view .dice-roller-grid{display:grid;grid-template-rows:auto auto;justify-content:center;gap:6px}.dice-roller-view .dice-roller-grid .dice-buttons{display:flex;flex-flow:row wrap;align-items:center;justify-content:center;width:fit-content}.dice-roller-view .dice-roller-grid .dice-custom-formula-container{display:flex;justify-content:space-between;align-items:center}.dice-roller-view .dice-roller-grid .dice-custom-formula{display:flex;justify-content:flex-start;align-items:center}.dice-roller-view .setting-editor-extra-setting-button{width:fit-content}.dice-roller-view .dice-button .clickable-icon>svg{width:36px;height:36px}.dice-roller-view .dice-context{display:grid;grid-template-columns:1fr auto}.dice-roller-view .dice-context .add-subtract{display:flex;align-items:center}.dice-roller-view input,.dice-roller-view textarea{width:100%}.dice-roller-view .dice-roller-grid .advantage-disadvantage{display:flex;justify-content:center;align-items:center;gap:.5rem}.dice-roller-view .dice-roller-grid .advantage-disadvantage button{margin:0;min-width:66px}.dice-roller-view .dice-roller-formula{display:flex;flex-flow:column nowrap;justify-content:space-between;align-items:flex-end;gap:12px}.dice-roller-view .dice-roller-formula .action-buttons{display:flex;justify-content:flex-end}.dice-roller-view .dice-roller-formula button{margin-right:0;margin-left:12px}.dice-roller-view hr{margin-bottom:0}.dice-roller-view .dice-roller-results-container .dice-roller-results-header{display:flex;justify-content:space-between;align-items:center;margin:6px 0;width:100%;border-bottom:1px solid var(--background-modifier-border)}.dice-roller-view .dice-roller-results-container .dice-roller-results-header h4{margin:0}.dice-roller-view .dice-roller-results{display:flex;flex-flow:column nowrap;gap:6px}.dice-roller-view .dice-roller-results .view-result{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;border:1px solid var(--background-modifier-border);border-radius:.25rem;position:relative}.dice-roller-view .dice-roller-results .view-result .dice-content-copy{position:absolute;top:0;right:0;padding:.25rem}.dice-roller-view .dice-roller-results .view-result .dice-result-reroll{position:absolute;top:0;left:0;padding:.25rem;margin:0}.dice-roller-view .dice-roller-results .view-result strong{font-size:x-large}.dice-roller-view .dice-roller-results .view-result .result-context{align-self:flex-end;width:100%;display:flex;align-items:center;justify-content:space-between;padding:.25rem;font-size:x-small}.dice-roller-view .dice-roller-results .view-result .result-context .clickable-icon{margin-right:0}.dice-roller-view .dice-roller-results>span{color:var(--text-muted);margin:0 auto}.dice-renderer{position:absolute;top:0;left:0} diff --git a/.obsidian/plugins/obsidian-full-calendar/data.json b/.obsidian/plugins/obsidian-full-calendar/data.json new file mode 100644 index 00000000..03a4ce63 --- /dev/null +++ b/.obsidian/plugins/obsidian-full-calendar/data.json @@ -0,0 +1,11 @@ +{ + "calendarSources": [ + { + "type": "local", + "color": "#4d95f7", + "directory": "00.01 Admin/Calendars" + } + ], + "defaultCalendar": 0, + "recursiveLocal": true +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-full-calendar/main.js b/.obsidian/plugins/obsidian-full-calendar/main.js new file mode 100644 index 00000000..4b707f77 --- /dev/null +++ b/.obsidian/plugins/obsidian-full-calendar/main.js @@ -0,0 +1,46184 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a3, b3) => { + for (var prop in b3 || (b3 = {})) + if (__hasOwnProp.call(b3, prop)) + __defNormalProp(a3, prop, b3[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b3)) { + if (__propIsEnum.call(b3, prop)) + __defNormalProp(a3, prop, b3[prop]); + } + return a3; +}; +var __spreadProps = (a3, b3) => __defProps(a3, __getOwnPropDescs(b3)); +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __reExport = (target, module2, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && key !== "default") + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toModule = (module2) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; +var __async = (__this, __arguments, generator) => { + return new Promise((resolve, reject) => { + var fulfilled = (value) => { + try { + step(generator.next(value)); + } catch (e3) { + reject(e3); + } + }; + var rejected = (value) => { + try { + step(generator.throw(value)); + } catch (e3) { + reject(e3); + } + }; + var step = (x3) => x3.done ? resolve(x3.value) : Promise.resolve(x3.value).then(fulfilled, rejected); + step((generator = generator.apply(__this, __arguments)).next()); + }); +}; + +// node_modules/tslib/tslib.js +var require_tslib = __commonJS({ + "node_modules/tslib/tslib.js"(exports, module2) { + var __extends2; + var __assign2; + var __rest2; + var __decorate2; + var __param2; + var __metadata2; + var __awaiter2; + var __generator2; + var __exportStar2; + var __values2; + var __read2; + var __spread2; + var __spreadArrays2; + var __spreadArray2; + var __await2; + var __asyncGenerator2; + var __asyncDelegator2; + var __asyncValues2; + var __makeTemplateObject2; + var __importStar2; + var __importDefault2; + var __classPrivateFieldGet2; + var __classPrivateFieldSet2; + var __createBinding2; + (function(factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function(exports2) { + factory(createExporter(root, createExporter(exports2))); + }); + } else if (typeof module2 === "object" && typeof module2.exports === "object") { + factory(createExporter(root, createExporter(module2.exports))); + } else { + factory(createExporter(root)); + } + function createExporter(exports2, previous) { + if (exports2 !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports2, "__esModule", { value: true }); + } else { + exports2.__esModule = true; + } + } + return function(id, v3) { + return exports2[id] = previous ? previous(id, v3) : v3; + }; + } + })(function(exporter) { + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) { + d3.__proto__ = b3; + } || function(d3, b3) { + for (var p3 in b3) + if (Object.prototype.hasOwnProperty.call(b3, p3)) + d3[p3] = b3[p3]; + }; + __extends2 = function(d3, b3) { + if (typeof b3 !== "function" && b3 !== null) + throw new TypeError("Class extends value " + String(b3) + " is not a constructor or null"); + extendStatics(d3, b3); + function __() { + this.constructor = d3; + } + d3.prototype = b3 === null ? Object.create(b3) : (__.prototype = b3.prototype, new __()); + }; + __assign2 = Object.assign || function(t3) { + for (var s3, i3 = 1, n2 = arguments.length; i3 < n2; i3++) { + s3 = arguments[i3]; + for (var p3 in s3) + if (Object.prototype.hasOwnProperty.call(s3, p3)) + t3[p3] = s3[p3]; + } + return t3; + }; + __rest2 = function(s3, e3) { + var t3 = {}; + for (var p3 in s3) + if (Object.prototype.hasOwnProperty.call(s3, p3) && e3.indexOf(p3) < 0) + t3[p3] = s3[p3]; + if (s3 != null && typeof Object.getOwnPropertySymbols === "function") + for (var i3 = 0, p3 = Object.getOwnPropertySymbols(s3); i3 < p3.length; i3++) { + if (e3.indexOf(p3[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s3, p3[i3])) + t3[p3[i3]] = s3[p3[i3]]; + } + return t3; + }; + __decorate2 = function(decorators, target, key, desc) { + var c3 = arguments.length, r3 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") + r3 = Reflect.decorate(decorators, target, key, desc); + else + for (var i3 = decorators.length - 1; i3 >= 0; i3--) + if (d3 = decorators[i3]) + r3 = (c3 < 3 ? d3(r3) : c3 > 3 ? d3(target, key, r3) : d3(target, key)) || r3; + return c3 > 3 && r3 && Object.defineProperty(target, key, r3), r3; + }; + __param2 = function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + __metadata2 = function(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") + return Reflect.metadata(metadataKey, metadataValue); + }; + __awaiter2 = function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve) { + resolve(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e3) { + reject(e3); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e3) { + reject(e3); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + __generator2 = function(thisArg, body) { + var _3 = { label: 0, sent: function() { + if (t3[0] & 1) + throw t3[1]; + return t3[1]; + }, trys: [], ops: [] }, f3, y3, t3, g3; + return g3 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g3[Symbol.iterator] = function() { + return this; + }), g3; + function verb(n2) { + return function(v3) { + return step([n2, v3]); + }; + } + function step(op) { + if (f3) + throw new TypeError("Generator is already executing."); + while (_3) + try { + if (f3 = 1, y3 && (t3 = op[0] & 2 ? y3["return"] : op[0] ? y3["throw"] || ((t3 = y3["return"]) && t3.call(y3), 0) : y3.next) && !(t3 = t3.call(y3, op[1])).done) + return t3; + if (y3 = 0, t3) + op = [op[0] & 2, t3.value]; + switch (op[0]) { + case 0: + case 1: + t3 = op; + break; + case 4: + _3.label++; + return { value: op[1], done: false }; + case 5: + _3.label++; + y3 = op[1]; + op = [0]; + continue; + case 7: + op = _3.ops.pop(); + _3.trys.pop(); + continue; + default: + if (!(t3 = _3.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _3 = 0; + continue; + } + if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) { + _3.label = op[1]; + break; + } + if (op[0] === 6 && _3.label < t3[1]) { + _3.label = t3[1]; + t3 = op; + break; + } + if (t3 && _3.label < t3[2]) { + _3.label = t3[2]; + _3.ops.push(op); + break; + } + if (t3[2]) + _3.ops.pop(); + _3.trys.pop(); + continue; + } + op = body.call(thisArg, _3); + } catch (e3) { + op = [6, e3]; + y3 = 0; + } finally { + f3 = t3 = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + __exportStar2 = function(m2, o2) { + for (var p3 in m2) + if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(o2, p3)) + __createBinding2(o2, m2, p3); + }; + __createBinding2 = Object.create ? function(o2, m2, k2, k22) { + if (k22 === void 0) + k22 = k2; + Object.defineProperty(o2, k22, { enumerable: true, get: function() { + return m2[k2]; + } }); + } : function(o2, m2, k2, k22) { + if (k22 === void 0) + k22 = k2; + o2[k22] = m2[k2]; + }; + __values2 = function(o2) { + var s3 = typeof Symbol === "function" && Symbol.iterator, m2 = s3 && o2[s3], i3 = 0; + if (m2) + return m2.call(o2); + if (o2 && typeof o2.length === "number") + return { + next: function() { + if (o2 && i3 >= o2.length) + o2 = void 0; + return { value: o2 && o2[i3++], done: !o2 }; + } + }; + throw new TypeError(s3 ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read2 = function(o2, n2) { + var m2 = typeof Symbol === "function" && o2[Symbol.iterator]; + if (!m2) + return o2; + var i3 = m2.call(o2), r3, ar = [], e3; + try { + while ((n2 === void 0 || n2-- > 0) && !(r3 = i3.next()).done) + ar.push(r3.value); + } catch (error) { + e3 = { error }; + } finally { + try { + if (r3 && !r3.done && (m2 = i3["return"])) + m2.call(i3); + } finally { + if (e3) + throw e3.error; + } + } + return ar; + }; + __spread2 = function() { + for (var ar = [], i3 = 0; i3 < arguments.length; i3++) + ar = ar.concat(__read2(arguments[i3])); + return ar; + }; + __spreadArrays2 = function() { + for (var s3 = 0, i3 = 0, il = arguments.length; i3 < il; i3++) + s3 += arguments[i3].length; + for (var r3 = Array(s3), k2 = 0, i3 = 0; i3 < il; i3++) + for (var a3 = arguments[i3], j4 = 0, jl = a3.length; j4 < jl; j4++, k2++) + r3[k2] = a3[j4]; + return r3; + }; + __spreadArray2 = function(to, from, pack) { + if (pack || arguments.length === 2) + for (var i3 = 0, l3 = from.length, ar; i3 < l3; i3++) { + if (ar || !(i3 in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i3); + ar[i3] = from[i3]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + __await2 = function(v3) { + return this instanceof __await2 ? (this.v = v3, this) : new __await2(v3); + }; + __asyncGenerator2 = function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g3 = generator.apply(thisArg, _arguments || []), i3, q3 = []; + return i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { + return this; + }, i3; + function verb(n2) { + if (g3[n2]) + i3[n2] = function(v3) { + return new Promise(function(a3, b3) { + q3.push([n2, v3, a3, b3]) > 1 || resume(n2, v3); + }); + }; + } + function resume(n2, v3) { + try { + step(g3[n2](v3)); + } catch (e3) { + settle(q3[0][3], e3); + } + } + function step(r3) { + r3.value instanceof __await2 ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle(q3[0][2], r3); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f3, v3) { + if (f3(v3), q3.shift(), q3.length) + resume(q3[0][0], q3[0][1]); + } + }; + __asyncDelegator2 = function(o2) { + var i3, p3; + return i3 = {}, verb("next"), verb("throw", function(e3) { + throw e3; + }), verb("return"), i3[Symbol.iterator] = function() { + return this; + }, i3; + function verb(n2, f3) { + i3[n2] = o2[n2] ? function(v3) { + return (p3 = !p3) ? { value: __await2(o2[n2](v3)), done: n2 === "return" } : f3 ? f3(v3) : v3; + } : f3; + } + }; + __asyncValues2 = function(o2) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m2 = o2[Symbol.asyncIterator], i3; + return m2 ? m2.call(o2) : (o2 = typeof __values2 === "function" ? __values2(o2) : o2[Symbol.iterator](), i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { + return this; + }, i3); + function verb(n2) { + i3[n2] = o2[n2] && function(v3) { + return new Promise(function(resolve, reject) { + v3 = o2[n2](v3), settle(resolve, reject, v3.done, v3.value); + }); + }; + } + function settle(resolve, reject, d3, v3) { + Promise.resolve(v3).then(function(v4) { + resolve({ value: v4, done: d3 }); + }, reject); + } + }; + __makeTemplateObject2 = function(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; + }; + var __setModuleDefault = Object.create ? function(o2, v3) { + Object.defineProperty(o2, "default", { enumerable: true, value: v3 }); + } : function(o2, v3) { + o2["default"] = v3; + }; + __importStar2 = function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k2 in mod) + if (k2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k2)) + __createBinding2(result, mod, k2); + } + __setModuleDefault(result, mod); + return result; + }; + __importDefault2 = function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + __classPrivateFieldGet2 = function(receiver, state, kind, f3) { + if (kind === "a" && !f3) + throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f3 : kind === "a" ? f3.call(receiver) : f3 ? f3.value : state.get(receiver); + }; + __classPrivateFieldSet2 = function(receiver, state, value, kind, f3) { + if (kind === "m") + throw new TypeError("Private method is not writable"); + if (kind === "a" && !f3) + throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f3.call(receiver, value) : f3 ? f3.value = value : state.set(receiver, value), value; + }; + exporter("__extends", __extends2); + exporter("__assign", __assign2); + exporter("__rest", __rest2); + exporter("__decorate", __decorate2); + exporter("__param", __param2); + exporter("__metadata", __metadata2); + exporter("__awaiter", __awaiter2); + exporter("__generator", __generator2); + exporter("__exportStar", __exportStar2); + exporter("__createBinding", __createBinding2); + exporter("__values", __values2); + exporter("__read", __read2); + exporter("__spread", __spread2); + exporter("__spreadArrays", __spreadArrays2); + exporter("__spreadArray", __spreadArray2); + exporter("__await", __await2); + exporter("__asyncGenerator", __asyncGenerator2); + exporter("__asyncDelegator", __asyncDelegator2); + exporter("__asyncValues", __asyncValues2); + exporter("__makeTemplateObject", __makeTemplateObject2); + exporter("__importStar", __importStar2); + exporter("__importDefault", __importDefault2); + exporter("__classPrivateFieldGet", __classPrivateFieldGet2); + exporter("__classPrivateFieldSet", __classPrivateFieldSet2); + }); + } +}); + +// node_modules/ical.js/build/ical.js +var require_ical = __commonJS({ + "node_modules/ical.js/build/ical.js"(exports, module2) { + var ICAL3; + (function() { + if (typeof module2 === "object") { + ICAL3 = module2.exports; + } else if (typeof HTMLScriptElement !== "undefined" && "noModule" in HTMLScriptElement.prototype) { + window.ICAL = ICAL3 = {}; + } else if (typeof ICAL3 !== "object") { + ICAL3 = {}; + } + })(); + ICAL3.foldLength = 75; + ICAL3.newLineChar = "\r\n"; + ICAL3.helpers = { + updateTimezones: function(vcal) { + var allsubs, properties, vtimezones, reqTzid, i3, tzid; + if (!vcal || vcal.name !== "vcalendar") { + return vcal; + } + allsubs = vcal.getAllSubcomponents(); + properties = []; + vtimezones = {}; + for (i3 = 0; i3 < allsubs.length; i3++) { + if (allsubs[i3].name === "vtimezone") { + tzid = allsubs[i3].getFirstProperty("tzid").getFirstValue(); + vtimezones[tzid] = allsubs[i3]; + } else { + properties = properties.concat(allsubs[i3].getAllProperties()); + } + } + reqTzid = {}; + for (i3 = 0; i3 < properties.length; i3++) { + if (tzid = properties[i3].getParameter("tzid")) { + reqTzid[tzid] = true; + } + } + for (i3 in vtimezones) { + if (vtimezones.hasOwnProperty(i3) && !reqTzid[i3]) { + vcal.removeSubcomponent(vtimezones[i3]); + } + } + for (i3 in reqTzid) { + if (reqTzid.hasOwnProperty(i3) && !vtimezones[i3] && ICAL3.TimezoneService.has(i3)) { + vcal.addSubcomponent(ICAL3.TimezoneService.get(i3).component); + } + } + return vcal; + }, + isStrictlyNaN: function(number) { + return typeof number === "number" && isNaN(number); + }, + strictParseInt: function(string) { + var result = parseInt(string, 10); + if (ICAL3.helpers.isStrictlyNaN(result)) { + throw new Error('Could not extract integer from "' + string + '"'); + } + return result; + }, + formatClassType: function formatClassType(data, type) { + if (typeof data === "undefined") { + return void 0; + } + if (data instanceof type) { + return data; + } + return new type(data); + }, + unescapedIndexOf: function(buffer, search, pos) { + while ((pos = buffer.indexOf(search, pos)) !== -1) { + if (pos > 0 && buffer[pos - 1] === "\\") { + pos += 1; + } else { + return pos; + } + } + return -1; + }, + binsearchInsert: function(list, seekVal, cmpfunc) { + if (!list.length) + return 0; + var low = 0, high = list.length - 1, mid, cmpval; + while (low <= high) { + mid = low + Math.floor((high - low) / 2); + cmpval = cmpfunc(seekVal, list[mid]); + if (cmpval < 0) + high = mid - 1; + else if (cmpval > 0) + low = mid + 1; + else + break; + } + if (cmpval < 0) + return mid; + else if (cmpval > 0) + return mid + 1; + else + return mid; + }, + dumpn: function() { + if (!ICAL3.debug) { + return; + } + if (typeof console !== "undefined" && "log" in console) { + ICAL3.helpers.dumpn = function consoleDumpn(input) { + console.log(input); + }; + } else { + ICAL3.helpers.dumpn = function geckoDumpn(input) { + dump(input + "\n"); + }; + } + ICAL3.helpers.dumpn(arguments[0]); + }, + clone: function(aSrc, aDeep) { + if (!aSrc || typeof aSrc != "object") { + return aSrc; + } else if (aSrc instanceof Date) { + return new Date(aSrc.getTime()); + } else if ("clone" in aSrc) { + return aSrc.clone(); + } else if (Array.isArray(aSrc)) { + var arr = []; + for (var i3 = 0; i3 < aSrc.length; i3++) { + arr.push(aDeep ? ICAL3.helpers.clone(aSrc[i3], true) : aSrc[i3]); + } + return arr; + } else { + var obj = {}; + for (var name in aSrc) { + if (Object.prototype.hasOwnProperty.call(aSrc, name)) { + if (aDeep) { + obj[name] = ICAL3.helpers.clone(aSrc[name], true); + } else { + obj[name] = aSrc[name]; + } + } + } + return obj; + } + }, + foldline: function foldline(aLine) { + var result = ""; + var line = aLine || "", pos = 0, line_length = 0; + while (line.length) { + var cp = line.codePointAt(pos); + if (cp < 128) + ++line_length; + else if (cp < 2048) + line_length += 2; + else if (cp < 65536) + line_length += 3; + else + line_length += 4; + if (line_length < ICAL3.foldLength + 1) + pos += cp > 65535 ? 2 : 1; + else { + result += ICAL3.newLineChar + " " + line.substring(0, pos); + line = line.substring(pos); + pos = line_length = 0; + } + } + return result.substr(ICAL3.newLineChar.length + 1); + }, + pad2: function pad(data) { + if (typeof data !== "string") { + if (typeof data === "number") { + data = parseInt(data); + } + data = String(data); + } + var len = data.length; + switch (len) { + case 0: + return "00"; + case 1: + return "0" + data; + default: + return data; + } + }, + trunc: function trunc(number) { + return number < 0 ? Math.ceil(number) : Math.floor(number); + }, + inherits: function(base, child, extra) { + function F2() { + } + F2.prototype = base.prototype; + child.prototype = new F2(); + if (extra) { + ICAL3.helpers.extend(extra, child.prototype); + } + }, + extend: function(source, target) { + for (var key in source) { + var descr = Object.getOwnPropertyDescriptor(source, key); + if (descr && !Object.getOwnPropertyDescriptor(target, key)) { + Object.defineProperty(target, key, descr); + } + } + return target; + } + }; + ICAL3.design = function() { + "use strict"; + var FROM_ICAL_NEWLINE = /\\\\|\\;|\\,|\\[Nn]/g; + var TO_ICAL_NEWLINE = /\\|;|,|\n/g; + var FROM_VCARD_NEWLINE = /\\\\|\\,|\\[Nn]/g; + var TO_VCARD_NEWLINE = /\\|,|\n/g; + function createTextType(fromNewline, toNewline) { + var result = { + matches: /.*/, + fromICAL: function(aValue, structuredEscape) { + return replaceNewline(aValue, fromNewline, structuredEscape); + }, + toICAL: function(aValue, structuredEscape) { + var regEx = toNewline; + if (structuredEscape) + regEx = new RegExp(regEx.source + "|" + structuredEscape); + return aValue.replace(regEx, function(str) { + switch (str) { + case "\\": + return "\\\\"; + case ";": + return "\\;"; + case ",": + return "\\,"; + case "\n": + return "\\n"; + default: + return str; + } + }); + } + }; + return result; + } + var DEFAULT_TYPE_TEXT = { defaultType: "text" }; + var DEFAULT_TYPE_TEXT_MULTI = { defaultType: "text", multiValue: "," }; + var DEFAULT_TYPE_TEXT_STRUCTURED = { defaultType: "text", structuredValue: ";" }; + var DEFAULT_TYPE_INTEGER = { defaultType: "integer" }; + var DEFAULT_TYPE_DATETIME_DATE = { defaultType: "date-time", allowedTypes: ["date-time", "date"] }; + var DEFAULT_TYPE_DATETIME = { defaultType: "date-time" }; + var DEFAULT_TYPE_URI = { defaultType: "uri" }; + var DEFAULT_TYPE_UTCOFFSET = { defaultType: "utc-offset" }; + var DEFAULT_TYPE_RECUR = { defaultType: "recur" }; + var DEFAULT_TYPE_DATE_ANDOR_TIME = { defaultType: "date-and-or-time", allowedTypes: ["date-time", "date", "text"] }; + function replaceNewlineReplace(string) { + switch (string) { + case "\\\\": + return "\\"; + case "\\;": + return ";"; + case "\\,": + return ","; + case "\\n": + case "\\N": + return "\n"; + default: + return string; + } + } + function replaceNewline(value, newline, structuredEscape) { + if (value.indexOf("\\") === -1) { + return value; + } + if (structuredEscape) + newline = new RegExp(newline.source + "|\\\\" + structuredEscape); + return value.replace(newline, replaceNewlineReplace); + } + var commonProperties = { + "categories": DEFAULT_TYPE_TEXT_MULTI, + "url": DEFAULT_TYPE_URI, + "version": DEFAULT_TYPE_TEXT, + "uid": DEFAULT_TYPE_TEXT + }; + var commonValues = { + "boolean": { + values: ["TRUE", "FALSE"], + fromICAL: function(aValue) { + switch (aValue) { + case "TRUE": + return true; + case "FALSE": + return false; + default: + return false; + } + }, + toICAL: function(aValue) { + if (aValue) { + return "TRUE"; + } + return "FALSE"; + } + }, + float: { + matches: /^[+-]?\d+\.\d+$/, + fromICAL: function(aValue) { + var parsed = parseFloat(aValue); + if (ICAL3.helpers.isStrictlyNaN(parsed)) { + return 0; + } + return parsed; + }, + toICAL: function(aValue) { + return String(aValue); + } + }, + integer: { + fromICAL: function(aValue) { + var parsed = parseInt(aValue); + if (ICAL3.helpers.isStrictlyNaN(parsed)) { + return 0; + } + return parsed; + }, + toICAL: function(aValue) { + return String(aValue); + } + }, + "utc-offset": { + toICAL: function(aValue) { + if (aValue.length < 7) { + return aValue.substr(0, 3) + aValue.substr(4, 2); + } else { + return aValue.substr(0, 3) + aValue.substr(4, 2) + aValue.substr(7, 2); + } + }, + fromICAL: function(aValue) { + if (aValue.length < 6) { + return aValue.substr(0, 3) + ":" + aValue.substr(3, 2); + } else { + return aValue.substr(0, 3) + ":" + aValue.substr(3, 2) + ":" + aValue.substr(5, 2); + } + }, + decorate: function(aValue) { + return ICAL3.UtcOffset.fromString(aValue); + }, + undecorate: function(aValue) { + return aValue.toString(); + } + } + }; + var icalParams = { + "cutype": { + values: ["INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN"], + allowXName: true, + allowIanaToken: true + }, + "delegated-from": { + valueType: "cal-address", + multiValue: ",", + multiValueSeparateDQuote: true + }, + "delegated-to": { + valueType: "cal-address", + multiValue: ",", + multiValueSeparateDQuote: true + }, + "encoding": { + values: ["8BIT", "BASE64"] + }, + "fbtype": { + values: ["FREE", "BUSY", "BUSY-UNAVAILABLE", "BUSY-TENTATIVE"], + allowXName: true, + allowIanaToken: true + }, + "member": { + valueType: "cal-address", + multiValue: ",", + multiValueSeparateDQuote: true + }, + "partstat": { + values: [ + "NEEDS-ACTION", + "ACCEPTED", + "DECLINED", + "TENTATIVE", + "DELEGATED", + "COMPLETED", + "IN-PROCESS" + ], + allowXName: true, + allowIanaToken: true + }, + "range": { + values: ["THISANDFUTURE"] + }, + "related": { + values: ["START", "END"] + }, + "reltype": { + values: ["PARENT", "CHILD", "SIBLING"], + allowXName: true, + allowIanaToken: true + }, + "role": { + values: [ + "REQ-PARTICIPANT", + "CHAIR", + "OPT-PARTICIPANT", + "NON-PARTICIPANT" + ], + allowXName: true, + allowIanaToken: true + }, + "rsvp": { + values: ["TRUE", "FALSE"] + }, + "sent-by": { + valueType: "cal-address" + }, + "tzid": { + matches: /^\// + }, + "value": { + values: [ + "binary", + "boolean", + "cal-address", + "date", + "date-time", + "duration", + "float", + "integer", + "period", + "recur", + "text", + "time", + "uri", + "utc-offset" + ], + allowXName: true, + allowIanaToken: true + } + }; + var icalValues = ICAL3.helpers.extend(commonValues, { + text: createTextType(FROM_ICAL_NEWLINE, TO_ICAL_NEWLINE), + uri: {}, + "binary": { + decorate: function(aString) { + return ICAL3.Binary.fromString(aString); + }, + undecorate: function(aBinary) { + return aBinary.toString(); + } + }, + "cal-address": {}, + "date": { + decorate: function(aValue, aProp) { + if (design.strict) { + return ICAL3.Time.fromDateString(aValue, aProp); + } else { + return ICAL3.Time.fromString(aValue, aProp); + } + }, + undecorate: function(aValue) { + return aValue.toString(); + }, + fromICAL: function(aValue) { + if (!design.strict && aValue.length >= 15) { + return icalValues["date-time"].fromICAL(aValue); + } else { + return aValue.substr(0, 4) + "-" + aValue.substr(4, 2) + "-" + aValue.substr(6, 2); + } + }, + toICAL: function(aValue) { + var len = aValue.length; + if (len == 10) { + return aValue.substr(0, 4) + aValue.substr(5, 2) + aValue.substr(8, 2); + } else if (len >= 19) { + return icalValues["date-time"].toICAL(aValue); + } else { + return aValue; + } + } + }, + "date-time": { + fromICAL: function(aValue) { + if (!design.strict && aValue.length == 8) { + return icalValues.date.fromICAL(aValue); + } else { + var result = aValue.substr(0, 4) + "-" + aValue.substr(4, 2) + "-" + aValue.substr(6, 2) + "T" + aValue.substr(9, 2) + ":" + aValue.substr(11, 2) + ":" + aValue.substr(13, 2); + if (aValue[15] && aValue[15] === "Z") { + result += "Z"; + } + return result; + } + }, + toICAL: function(aValue) { + var len = aValue.length; + if (len == 10 && !design.strict) { + return icalValues.date.toICAL(aValue); + } else if (len >= 19) { + var result = aValue.substr(0, 4) + aValue.substr(5, 2) + aValue.substr(8, 5) + aValue.substr(14, 2) + aValue.substr(17, 2); + if (aValue[19] && aValue[19] === "Z") { + result += "Z"; + } + return result; + } else { + return aValue; + } + }, + decorate: function(aValue, aProp) { + if (design.strict) { + return ICAL3.Time.fromDateTimeString(aValue, aProp); + } else { + return ICAL3.Time.fromString(aValue, aProp); + } + }, + undecorate: function(aValue) { + return aValue.toString(); + } + }, + duration: { + decorate: function(aValue) { + return ICAL3.Duration.fromString(aValue); + }, + undecorate: function(aValue) { + return aValue.toString(); + } + }, + period: { + fromICAL: function(string) { + var parts = string.split("/"); + parts[0] = icalValues["date-time"].fromICAL(parts[0]); + if (!ICAL3.Duration.isValueString(parts[1])) { + parts[1] = icalValues["date-time"].fromICAL(parts[1]); + } + return parts; + }, + toICAL: function(parts) { + if (!design.strict && parts[0].length == 10) { + parts[0] = icalValues.date.toICAL(parts[0]); + } else { + parts[0] = icalValues["date-time"].toICAL(parts[0]); + } + if (!ICAL3.Duration.isValueString(parts[1])) { + if (!design.strict && parts[1].length == 10) { + parts[1] = icalValues.date.toICAL(parts[1]); + } else { + parts[1] = icalValues["date-time"].toICAL(parts[1]); + } + } + return parts.join("/"); + }, + decorate: function(aValue, aProp) { + return ICAL3.Period.fromJSON(aValue, aProp, !design.strict); + }, + undecorate: function(aValue) { + return aValue.toJSON(); + } + }, + recur: { + fromICAL: function(string) { + return ICAL3.Recur._stringToData(string, true); + }, + toICAL: function(data) { + var str = ""; + for (var k2 in data) { + if (!Object.prototype.hasOwnProperty.call(data, k2)) { + continue; + } + var val = data[k2]; + if (k2 == "until") { + if (val.length > 10) { + val = icalValues["date-time"].toICAL(val); + } else { + val = icalValues.date.toICAL(val); + } + } else if (k2 == "wkst") { + if (typeof val === "number") { + val = ICAL3.Recur.numericDayToIcalDay(val); + } + } else if (Array.isArray(val)) { + val = val.join(","); + } + str += k2.toUpperCase() + "=" + val + ";"; + } + return str.substr(0, str.length - 1); + }, + decorate: function decorate(aValue) { + return ICAL3.Recur.fromData(aValue); + }, + undecorate: function(aRecur) { + return aRecur.toJSON(); + } + }, + time: { + fromICAL: function(aValue) { + if (aValue.length < 6) { + return aValue; + } + var result = aValue.substr(0, 2) + ":" + aValue.substr(2, 2) + ":" + aValue.substr(4, 2); + if (aValue[6] === "Z") { + result += "Z"; + } + return result; + }, + toICAL: function(aValue) { + if (aValue.length < 8) { + return aValue; + } + var result = aValue.substr(0, 2) + aValue.substr(3, 2) + aValue.substr(6, 2); + if (aValue[8] === "Z") { + result += "Z"; + } + return result; + } + } + }); + var icalProperties = ICAL3.helpers.extend(commonProperties, { + "action": DEFAULT_TYPE_TEXT, + "attach": { defaultType: "uri" }, + "attendee": { defaultType: "cal-address" }, + "calscale": DEFAULT_TYPE_TEXT, + "class": DEFAULT_TYPE_TEXT, + "comment": DEFAULT_TYPE_TEXT, + "completed": DEFAULT_TYPE_DATETIME, + "contact": DEFAULT_TYPE_TEXT, + "created": DEFAULT_TYPE_DATETIME, + "description": DEFAULT_TYPE_TEXT, + "dtend": DEFAULT_TYPE_DATETIME_DATE, + "dtstamp": DEFAULT_TYPE_DATETIME, + "dtstart": DEFAULT_TYPE_DATETIME_DATE, + "due": DEFAULT_TYPE_DATETIME_DATE, + "duration": { defaultType: "duration" }, + "exdate": { + defaultType: "date-time", + allowedTypes: ["date-time", "date"], + multiValue: "," + }, + "exrule": DEFAULT_TYPE_RECUR, + "freebusy": { defaultType: "period", multiValue: "," }, + "geo": { defaultType: "float", structuredValue: ";" }, + "last-modified": DEFAULT_TYPE_DATETIME, + "location": DEFAULT_TYPE_TEXT, + "method": DEFAULT_TYPE_TEXT, + "organizer": { defaultType: "cal-address" }, + "percent-complete": DEFAULT_TYPE_INTEGER, + "priority": DEFAULT_TYPE_INTEGER, + "prodid": DEFAULT_TYPE_TEXT, + "related-to": DEFAULT_TYPE_TEXT, + "repeat": DEFAULT_TYPE_INTEGER, + "rdate": { + defaultType: "date-time", + allowedTypes: ["date-time", "date", "period"], + multiValue: ",", + detectType: function(string) { + if (string.indexOf("/") !== -1) { + return "period"; + } + return string.indexOf("T") === -1 ? "date" : "date-time"; + } + }, + "recurrence-id": DEFAULT_TYPE_DATETIME_DATE, + "resources": DEFAULT_TYPE_TEXT_MULTI, + "request-status": DEFAULT_TYPE_TEXT_STRUCTURED, + "rrule": DEFAULT_TYPE_RECUR, + "sequence": DEFAULT_TYPE_INTEGER, + "status": DEFAULT_TYPE_TEXT, + "summary": DEFAULT_TYPE_TEXT, + "transp": DEFAULT_TYPE_TEXT, + "trigger": { defaultType: "duration", allowedTypes: ["duration", "date-time"] }, + "tzoffsetfrom": DEFAULT_TYPE_UTCOFFSET, + "tzoffsetto": DEFAULT_TYPE_UTCOFFSET, + "tzurl": DEFAULT_TYPE_URI, + "tzid": DEFAULT_TYPE_TEXT, + "tzname": DEFAULT_TYPE_TEXT + }); + var vcardValues = ICAL3.helpers.extend(commonValues, { + text: createTextType(FROM_VCARD_NEWLINE, TO_VCARD_NEWLINE), + uri: createTextType(FROM_VCARD_NEWLINE, TO_VCARD_NEWLINE), + date: { + decorate: function(aValue) { + return ICAL3.VCardTime.fromDateAndOrTimeString(aValue, "date"); + }, + undecorate: function(aValue) { + return aValue.toString(); + }, + fromICAL: function(aValue) { + if (aValue.length == 8) { + return icalValues.date.fromICAL(aValue); + } else if (aValue[0] == "-" && aValue.length == 6) { + return aValue.substr(0, 4) + "-" + aValue.substr(4); + } else { + return aValue; + } + }, + toICAL: function(aValue) { + if (aValue.length == 10) { + return icalValues.date.toICAL(aValue); + } else if (aValue[0] == "-" && aValue.length == 7) { + return aValue.substr(0, 4) + aValue.substr(5); + } else { + return aValue; + } + } + }, + time: { + decorate: function(aValue) { + return ICAL3.VCardTime.fromDateAndOrTimeString("T" + aValue, "time"); + }, + undecorate: function(aValue) { + return aValue.toString(); + }, + fromICAL: function(aValue) { + var splitzone = vcardValues.time._splitZone(aValue, true); + var zone = splitzone[0], value = splitzone[1]; + if (value.length == 6) { + value = value.substr(0, 2) + ":" + value.substr(2, 2) + ":" + value.substr(4, 2); + } else if (value.length == 4 && value[0] != "-") { + value = value.substr(0, 2) + ":" + value.substr(2, 2); + } else if (value.length == 5) { + value = value.substr(0, 3) + ":" + value.substr(3, 2); + } + if (zone.length == 5 && (zone[0] == "-" || zone[0] == "+")) { + zone = zone.substr(0, 3) + ":" + zone.substr(3); + } + return value + zone; + }, + toICAL: function(aValue) { + var splitzone = vcardValues.time._splitZone(aValue); + var zone = splitzone[0], value = splitzone[1]; + if (value.length == 8) { + value = value.substr(0, 2) + value.substr(3, 2) + value.substr(6, 2); + } else if (value.length == 5 && value[0] != "-") { + value = value.substr(0, 2) + value.substr(3, 2); + } else if (value.length == 6) { + value = value.substr(0, 3) + value.substr(4, 2); + } + if (zone.length == 6 && (zone[0] == "-" || zone[0] == "+")) { + zone = zone.substr(0, 3) + zone.substr(4); + } + return value + zone; + }, + _splitZone: function(aValue, isFromIcal) { + var lastChar = aValue.length - 1; + var signChar = aValue.length - (isFromIcal ? 5 : 6); + var sign = aValue[signChar]; + var zone, value; + if (aValue[lastChar] == "Z") { + zone = aValue[lastChar]; + value = aValue.substr(0, lastChar); + } else if (aValue.length > 6 && (sign == "-" || sign == "+")) { + zone = aValue.substr(signChar); + value = aValue.substr(0, signChar); + } else { + zone = ""; + value = aValue; + } + return [zone, value]; + } + }, + "date-time": { + decorate: function(aValue) { + return ICAL3.VCardTime.fromDateAndOrTimeString(aValue, "date-time"); + }, + undecorate: function(aValue) { + return aValue.toString(); + }, + fromICAL: function(aValue) { + return vcardValues["date-and-or-time"].fromICAL(aValue); + }, + toICAL: function(aValue) { + return vcardValues["date-and-or-time"].toICAL(aValue); + } + }, + "date-and-or-time": { + decorate: function(aValue) { + return ICAL3.VCardTime.fromDateAndOrTimeString(aValue, "date-and-or-time"); + }, + undecorate: function(aValue) { + return aValue.toString(); + }, + fromICAL: function(aValue) { + var parts = aValue.split("T"); + return (parts[0] ? vcardValues.date.fromICAL(parts[0]) : "") + (parts[1] ? "T" + vcardValues.time.fromICAL(parts[1]) : ""); + }, + toICAL: function(aValue) { + var parts = aValue.split("T"); + return vcardValues.date.toICAL(parts[0]) + (parts[1] ? "T" + vcardValues.time.toICAL(parts[1]) : ""); + } + }, + timestamp: icalValues["date-time"], + "language-tag": { + matches: /^[a-zA-Z0-9-]+$/ + } + }); + var vcardParams = { + "type": { + valueType: "text", + multiValue: "," + }, + "value": { + values: [ + "text", + "uri", + "date", + "time", + "date-time", + "date-and-or-time", + "timestamp", + "boolean", + "integer", + "float", + "utc-offset", + "language-tag" + ], + allowXName: true, + allowIanaToken: true + } + }; + var vcardProperties = ICAL3.helpers.extend(commonProperties, { + "adr": { defaultType: "text", structuredValue: ";", multiValue: "," }, + "anniversary": DEFAULT_TYPE_DATE_ANDOR_TIME, + "bday": DEFAULT_TYPE_DATE_ANDOR_TIME, + "caladruri": DEFAULT_TYPE_URI, + "caluri": DEFAULT_TYPE_URI, + "clientpidmap": DEFAULT_TYPE_TEXT_STRUCTURED, + "email": DEFAULT_TYPE_TEXT, + "fburl": DEFAULT_TYPE_URI, + "fn": DEFAULT_TYPE_TEXT, + "gender": DEFAULT_TYPE_TEXT_STRUCTURED, + "geo": DEFAULT_TYPE_URI, + "impp": DEFAULT_TYPE_URI, + "key": DEFAULT_TYPE_URI, + "kind": DEFAULT_TYPE_TEXT, + "lang": { defaultType: "language-tag" }, + "logo": DEFAULT_TYPE_URI, + "member": DEFAULT_TYPE_URI, + "n": { defaultType: "text", structuredValue: ";", multiValue: "," }, + "nickname": DEFAULT_TYPE_TEXT_MULTI, + "note": DEFAULT_TYPE_TEXT, + "org": { defaultType: "text", structuredValue: ";" }, + "photo": DEFAULT_TYPE_URI, + "related": DEFAULT_TYPE_URI, + "rev": { defaultType: "timestamp" }, + "role": DEFAULT_TYPE_TEXT, + "sound": DEFAULT_TYPE_URI, + "source": DEFAULT_TYPE_URI, + "tel": { defaultType: "uri", allowedTypes: ["uri", "text"] }, + "title": DEFAULT_TYPE_TEXT, + "tz": { defaultType: "text", allowedTypes: ["text", "utc-offset", "uri"] }, + "xml": DEFAULT_TYPE_TEXT + }); + var vcard3Values = ICAL3.helpers.extend(commonValues, { + binary: icalValues.binary, + date: vcardValues.date, + "date-time": vcardValues["date-time"], + "phone-number": {}, + uri: icalValues.uri, + text: icalValues.text, + time: icalValues.time, + vcard: icalValues.text, + "utc-offset": { + toICAL: function(aValue) { + return aValue.substr(0, 7); + }, + fromICAL: function(aValue) { + return aValue.substr(0, 7); + }, + decorate: function(aValue) { + return ICAL3.UtcOffset.fromString(aValue); + }, + undecorate: function(aValue) { + return aValue.toString(); + } + } + }); + var vcard3Params = { + "type": { + valueType: "text", + multiValue: "," + }, + "value": { + values: [ + "text", + "uri", + "date", + "date-time", + "phone-number", + "time", + "boolean", + "integer", + "float", + "utc-offset", + "vcard", + "binary" + ], + allowXName: true, + allowIanaToken: true + } + }; + var vcard3Properties = ICAL3.helpers.extend(commonProperties, { + fn: DEFAULT_TYPE_TEXT, + n: { defaultType: "text", structuredValue: ";", multiValue: "," }, + nickname: DEFAULT_TYPE_TEXT_MULTI, + photo: { defaultType: "binary", allowedTypes: ["binary", "uri"] }, + bday: { + defaultType: "date-time", + allowedTypes: ["date-time", "date"], + detectType: function(string) { + return string.indexOf("T") === -1 ? "date" : "date-time"; + } + }, + adr: { defaultType: "text", structuredValue: ";", multiValue: "," }, + label: DEFAULT_TYPE_TEXT, + tel: { defaultType: "phone-number" }, + email: DEFAULT_TYPE_TEXT, + mailer: DEFAULT_TYPE_TEXT, + tz: { defaultType: "utc-offset", allowedTypes: ["utc-offset", "text"] }, + geo: { defaultType: "float", structuredValue: ";" }, + title: DEFAULT_TYPE_TEXT, + role: DEFAULT_TYPE_TEXT, + logo: { defaultType: "binary", allowedTypes: ["binary", "uri"] }, + agent: { defaultType: "vcard", allowedTypes: ["vcard", "text", "uri"] }, + org: DEFAULT_TYPE_TEXT_STRUCTURED, + note: DEFAULT_TYPE_TEXT_MULTI, + prodid: DEFAULT_TYPE_TEXT, + rev: { + defaultType: "date-time", + allowedTypes: ["date-time", "date"], + detectType: function(string) { + return string.indexOf("T") === -1 ? "date" : "date-time"; + } + }, + "sort-string": DEFAULT_TYPE_TEXT, + sound: { defaultType: "binary", allowedTypes: ["binary", "uri"] }, + class: DEFAULT_TYPE_TEXT, + key: { defaultType: "binary", allowedTypes: ["binary", "text"] } + }); + var icalSet = { + value: icalValues, + param: icalParams, + property: icalProperties + }; + var vcardSet = { + value: vcardValues, + param: vcardParams, + property: vcardProperties + }; + var vcard3Set = { + value: vcard3Values, + param: vcard3Params, + property: vcard3Properties + }; + var design = { + strict: true, + defaultSet: icalSet, + defaultType: "unknown", + components: { + vcard: vcardSet, + vcard3: vcard3Set, + vevent: icalSet, + vtodo: icalSet, + vjournal: icalSet, + valarm: icalSet, + vtimezone: icalSet, + daylight: icalSet, + standard: icalSet + }, + icalendar: icalSet, + vcard: vcardSet, + vcard3: vcard3Set, + getDesignSet: function(componentName) { + var isInDesign = componentName && componentName in design.components; + return isInDesign ? design.components[componentName] : design.defaultSet; + } + }; + return design; + }(); + ICAL3.stringify = function() { + "use strict"; + var LINE_ENDING = "\r\n"; + var DEFAULT_VALUE_TYPE = "unknown"; + var design = ICAL3.design; + var helpers = ICAL3.helpers; + function stringify(jCal) { + if (typeof jCal[0] == "string") { + jCal = [jCal]; + } + var i3 = 0; + var len = jCal.length; + var result = ""; + for (; i3 < len; i3++) { + result += stringify.component(jCal[i3]) + LINE_ENDING; + } + return result; + } + stringify.component = function(component, designSet) { + var name = component[0].toUpperCase(); + var result = "BEGIN:" + name + LINE_ENDING; + var props = component[1]; + var propIdx = 0; + var propLen = props.length; + var designSetName = component[0]; + if (designSetName === "vcard" && component[1].length > 0 && !(component[1][0][0] === "version" && component[1][0][3] === "4.0")) { + designSetName = "vcard3"; + } + designSet = designSet || design.getDesignSet(designSetName); + for (; propIdx < propLen; propIdx++) { + result += stringify.property(props[propIdx], designSet) + LINE_ENDING; + } + var comps = component[2] || []; + var compIdx = 0; + var compLen = comps.length; + for (; compIdx < compLen; compIdx++) { + result += stringify.component(comps[compIdx], designSet) + LINE_ENDING; + } + result += "END:" + name; + return result; + }; + stringify.property = function(property, designSet, noFold) { + var name = property[0].toUpperCase(); + var jsName = property[0]; + var params = property[1]; + var line = name; + var paramName; + for (paramName in params) { + var value = params[paramName]; + if (params.hasOwnProperty(paramName)) { + var multiValue = paramName in designSet.param && designSet.param[paramName].multiValue; + if (multiValue && Array.isArray(value)) { + if (designSet.param[paramName].multiValueSeparateDQuote) { + multiValue = '"' + multiValue + '"'; + } + value = value.map(stringify._rfc6868Unescape); + value = stringify.multiValue(value, multiValue, "unknown", null, designSet); + } else { + value = stringify._rfc6868Unescape(value); + } + line += ";" + paramName.toUpperCase(); + line += "=" + stringify.propertyValue(value); + } + } + if (property.length === 3) { + return line + ":"; + } + var valueType = property[2]; + if (!designSet) { + designSet = design.defaultSet; + } + var propDetails; + var multiValue = false; + var structuredValue = false; + var isDefault = false; + if (jsName in designSet.property) { + propDetails = designSet.property[jsName]; + if ("multiValue" in propDetails) { + multiValue = propDetails.multiValue; + } + if ("structuredValue" in propDetails && Array.isArray(property[3])) { + structuredValue = propDetails.structuredValue; + } + if ("defaultType" in propDetails) { + if (valueType === propDetails.defaultType) { + isDefault = true; + } + } else { + if (valueType === DEFAULT_VALUE_TYPE) { + isDefault = true; + } + } + } else { + if (valueType === DEFAULT_VALUE_TYPE) { + isDefault = true; + } + } + if (!isDefault) { + line += ";VALUE=" + valueType.toUpperCase(); + } + line += ":"; + if (multiValue && structuredValue) { + line += stringify.multiValue(property[3], structuredValue, valueType, multiValue, designSet, structuredValue); + } else if (multiValue) { + line += stringify.multiValue(property.slice(3), multiValue, valueType, null, designSet, false); + } else if (structuredValue) { + line += stringify.multiValue(property[3], structuredValue, valueType, null, designSet, structuredValue); + } else { + line += stringify.value(property[3], valueType, designSet, false); + } + return noFold ? line : ICAL3.helpers.foldline(line); + }; + stringify.propertyValue = function(value) { + if (helpers.unescapedIndexOf(value, ",") === -1 && helpers.unescapedIndexOf(value, ":") === -1 && helpers.unescapedIndexOf(value, ";") === -1) { + return value; + } + return '"' + value + '"'; + }; + stringify.multiValue = function(values, delim, type, innerMulti, designSet, structuredValue) { + var result = ""; + var len = values.length; + var i3 = 0; + for (; i3 < len; i3++) { + if (innerMulti && Array.isArray(values[i3])) { + result += stringify.multiValue(values[i3], innerMulti, type, null, designSet, structuredValue); + } else { + result += stringify.value(values[i3], type, designSet, structuredValue); + } + if (i3 !== len - 1) { + result += delim; + } + } + return result; + }; + stringify.value = function(value, type, designSet, structuredValue) { + if (type in designSet.value && "toICAL" in designSet.value[type]) { + return designSet.value[type].toICAL(value, structuredValue); + } + return value; + }; + stringify._rfc6868Unescape = function(val) { + return val.replace(/[\n^"]/g, function(x3) { + return RFC6868_REPLACE_MAP[x3]; + }); + }; + var RFC6868_REPLACE_MAP = { '"': "^'", "\n": "^n", "^": "^^" }; + return stringify; + }(); + ICAL3.parse = function() { + "use strict"; + var CHAR = /[^ \t]/; + var MULTIVALUE_DELIMITER = ","; + var VALUE_DELIMITER = ":"; + var PARAM_DELIMITER = ";"; + var PARAM_NAME_DELIMITER = "="; + var DEFAULT_VALUE_TYPE = "unknown"; + var DEFAULT_PARAM_TYPE = "text"; + var design = ICAL3.design; + var helpers = ICAL3.helpers; + function ParserError(message) { + this.message = message; + this.name = "ParserError"; + try { + throw new Error(); + } catch (e3) { + if (e3.stack) { + var split = e3.stack.split("\n"); + split.shift(); + this.stack = split.join("\n"); + } + } + } + ParserError.prototype = Error.prototype; + function parser(input) { + var state = {}; + var root = state.component = []; + state.stack = [root]; + parser._eachLine(input, function(err, line) { + parser._handleContentLine(line, state); + }); + if (state.stack.length > 1) { + throw new ParserError("invalid ical body. component began but did not end"); + } + state = null; + return root.length == 1 ? root[0] : root; + } + parser.property = function(str, designSet) { + var state = { + component: [[], []], + designSet: designSet || design.defaultSet + }; + parser._handleContentLine(str, state); + return state.component[1][0]; + }; + parser.component = function(str) { + return parser(str); + }; + parser.ParserError = ParserError; + parser._handleContentLine = function(line, state) { + var valuePos = line.indexOf(VALUE_DELIMITER); + var paramPos = line.indexOf(PARAM_DELIMITER); + var lastParamIndex; + var lastValuePos; + var name; + var value; + var params = {}; + if (paramPos !== -1 && valuePos !== -1) { + if (paramPos > valuePos) { + paramPos = -1; + } + } + var parsedParams; + if (paramPos !== -1) { + name = line.substring(0, paramPos).toLowerCase(); + parsedParams = parser._parseParameters(line.substring(paramPos), 0, state.designSet); + if (parsedParams[2] == -1) { + throw new ParserError("Invalid parameters in '" + line + "'"); + } + params = parsedParams[0]; + lastParamIndex = parsedParams[1].length + parsedParams[2] + paramPos; + if ((lastValuePos = line.substring(lastParamIndex).indexOf(VALUE_DELIMITER)) !== -1) { + value = line.substring(lastParamIndex + lastValuePos + 1); + } else { + throw new ParserError("Missing parameter value in '" + line + "'"); + } + } else if (valuePos !== -1) { + name = line.substring(0, valuePos).toLowerCase(); + value = line.substring(valuePos + 1); + if (name === "begin") { + var newComponent = [value.toLowerCase(), [], []]; + if (state.stack.length === 1) { + state.component.push(newComponent); + } else { + state.component[2].push(newComponent); + } + state.stack.push(state.component); + state.component = newComponent; + if (!state.designSet) { + state.designSet = design.getDesignSet(state.component[0]); + } + return; + } else if (name === "end") { + state.component = state.stack.pop(); + return; + } + } else { + throw new ParserError('invalid line (no token ";" or ":") "' + line + '"'); + } + var valueType; + var multiValue = false; + var structuredValue = false; + var propertyDetails; + if (name in state.designSet.property) { + propertyDetails = state.designSet.property[name]; + if ("multiValue" in propertyDetails) { + multiValue = propertyDetails.multiValue; + } + if ("structuredValue" in propertyDetails) { + structuredValue = propertyDetails.structuredValue; + } + if (value && "detectType" in propertyDetails) { + valueType = propertyDetails.detectType(value); + } + } + if (!valueType) { + if (!("value" in params)) { + if (propertyDetails) { + valueType = propertyDetails.defaultType; + } else { + valueType = DEFAULT_VALUE_TYPE; + } + } else { + valueType = params.value.toLowerCase(); + } + } + delete params.value; + var result; + if (multiValue && structuredValue) { + value = parser._parseMultiValue(value, structuredValue, valueType, [], multiValue, state.designSet, structuredValue); + result = [name, params, valueType, value]; + } else if (multiValue) { + result = [name, params, valueType]; + parser._parseMultiValue(value, multiValue, valueType, result, null, state.designSet, false); + } else if (structuredValue) { + value = parser._parseMultiValue(value, structuredValue, valueType, [], null, state.designSet, structuredValue); + result = [name, params, valueType, value]; + } else { + value = parser._parseValue(value, valueType, state.designSet, false); + result = [name, params, valueType, value]; + } + if (state.component[0] === "vcard" && state.component[1].length === 0 && !(name === "version" && value === "4.0")) { + state.designSet = design.getDesignSet("vcard3"); + } + state.component[1].push(result); + }; + parser._parseValue = function(value, type, designSet, structuredValue) { + if (type in designSet.value && "fromICAL" in designSet.value[type]) { + return designSet.value[type].fromICAL(value, structuredValue); + } + return value; + }; + parser._parseParameters = function(line, start, designSet) { + var lastParam = start; + var pos = 0; + var delim = PARAM_NAME_DELIMITER; + var result = {}; + var name, lcname; + var value, valuePos = -1; + var type, multiValue, mvdelim; + while (pos !== false && (pos = helpers.unescapedIndexOf(line, delim, pos + 1)) !== -1) { + name = line.substr(lastParam + 1, pos - lastParam - 1); + if (name.length == 0) { + throw new ParserError("Empty parameter name in '" + line + "'"); + } + lcname = name.toLowerCase(); + mvdelim = false; + multiValue = false; + if (lcname in designSet.param && designSet.param[lcname].valueType) { + type = designSet.param[lcname].valueType; + } else { + type = DEFAULT_PARAM_TYPE; + } + if (lcname in designSet.param) { + multiValue = designSet.param[lcname].multiValue; + if (designSet.param[lcname].multiValueSeparateDQuote) { + mvdelim = parser._rfc6868Escape('"' + multiValue + '"'); + } + } + var nextChar = line[pos + 1]; + if (nextChar === '"') { + valuePos = pos + 2; + pos = helpers.unescapedIndexOf(line, '"', valuePos); + if (multiValue && pos != -1) { + var extendedValue = true; + while (extendedValue) { + if (line[pos + 1] == multiValue && line[pos + 2] == '"') { + pos = helpers.unescapedIndexOf(line, '"', pos + 3); + } else { + extendedValue = false; + } + } + } + if (pos === -1) { + throw new ParserError('invalid line (no matching double quote) "' + line + '"'); + } + value = line.substr(valuePos, pos - valuePos); + lastParam = helpers.unescapedIndexOf(line, PARAM_DELIMITER, pos); + if (lastParam === -1) { + pos = false; + } + } else { + valuePos = pos + 1; + var nextPos = helpers.unescapedIndexOf(line, PARAM_DELIMITER, valuePos); + var propValuePos = helpers.unescapedIndexOf(line, VALUE_DELIMITER, valuePos); + if (propValuePos !== -1 && nextPos > propValuePos) { + nextPos = propValuePos; + pos = false; + } else if (nextPos === -1) { + if (propValuePos === -1) { + nextPos = line.length; + } else { + nextPos = propValuePos; + } + pos = false; + } else { + lastParam = nextPos; + pos = nextPos; + } + value = line.substr(valuePos, nextPos - valuePos); + } + value = parser._rfc6868Escape(value); + if (multiValue) { + var delimiter = mvdelim || multiValue; + value = parser._parseMultiValue(value, delimiter, type, [], null, designSet); + } else { + value = parser._parseValue(value, type, designSet); + } + if (multiValue && lcname in result) { + if (Array.isArray(result[lcname])) { + result[lcname].push(value); + } else { + result[lcname] = [ + result[lcname], + value + ]; + } + } else { + result[lcname] = value; + } + } + return [result, value, valuePos]; + }; + parser._rfc6868Escape = function(val) { + return val.replace(/\^['n^]/g, function(x3) { + return RFC6868_REPLACE_MAP[x3]; + }); + }; + var RFC6868_REPLACE_MAP = { "^'": '"', "^n": "\n", "^^": "^" }; + parser._parseMultiValue = function(buffer, delim, type, result, innerMulti, designSet, structuredValue) { + var pos = 0; + var lastPos = 0; + var value; + if (delim.length === 0) { + return buffer; + } + while ((pos = helpers.unescapedIndexOf(buffer, delim, lastPos)) !== -1) { + value = buffer.substr(lastPos, pos - lastPos); + if (innerMulti) { + value = parser._parseMultiValue(value, innerMulti, type, [], null, designSet, structuredValue); + } else { + value = parser._parseValue(value, type, designSet, structuredValue); + } + result.push(value); + lastPos = pos + delim.length; + } + value = buffer.substr(lastPos); + if (innerMulti) { + value = parser._parseMultiValue(value, innerMulti, type, [], null, designSet, structuredValue); + } else { + value = parser._parseValue(value, type, designSet, structuredValue); + } + result.push(value); + return result.length == 1 ? result[0] : result; + }; + parser._eachLine = function(buffer, callback) { + var len = buffer.length; + var lastPos = buffer.search(CHAR); + var pos = lastPos; + var line; + var firstChar; + var newlineOffset; + do { + pos = buffer.indexOf("\n", lastPos) + 1; + if (pos > 1 && buffer[pos - 2] === "\r") { + newlineOffset = 2; + } else { + newlineOffset = 1; + } + if (pos === 0) { + pos = len; + newlineOffset = 0; + } + firstChar = buffer[lastPos]; + if (firstChar === " " || firstChar === " ") { + line += buffer.substr(lastPos + 1, pos - lastPos - (newlineOffset + 1)); + } else { + if (line) + callback(null, line); + line = buffer.substr(lastPos, pos - lastPos - newlineOffset); + } + lastPos = pos; + } while (pos !== len); + line = line.trim(); + if (line.length) + callback(null, line); + }; + return parser; + }(); + ICAL3.Component = function() { + "use strict"; + var PROPERTY_INDEX = 1; + var COMPONENT_INDEX = 2; + var NAME_INDEX = 0; + function Component4(jCal, parent) { + if (typeof jCal === "string") { + jCal = [jCal, [], []]; + } + this.jCal = jCal; + this.parent = parent || null; + } + Component4.prototype = { + _hydratedPropertyCount: 0, + _hydratedComponentCount: 0, + get name() { + return this.jCal[NAME_INDEX]; + }, + get _designSet() { + var parentDesign = this.parent && this.parent._designSet; + return parentDesign || ICAL3.design.getDesignSet(this.name); + }, + _hydrateComponent: function(index) { + if (!this._components) { + this._components = []; + this._hydratedComponentCount = 0; + } + if (this._components[index]) { + return this._components[index]; + } + var comp = new Component4(this.jCal[COMPONENT_INDEX][index], this); + this._hydratedComponentCount++; + return this._components[index] = comp; + }, + _hydrateProperty: function(index) { + if (!this._properties) { + this._properties = []; + this._hydratedPropertyCount = 0; + } + if (this._properties[index]) { + return this._properties[index]; + } + var prop = new ICAL3.Property(this.jCal[PROPERTY_INDEX][index], this); + this._hydratedPropertyCount++; + return this._properties[index] = prop; + }, + getFirstSubcomponent: function(name) { + if (name) { + var i3 = 0; + var comps = this.jCal[COMPONENT_INDEX]; + var len = comps.length; + for (; i3 < len; i3++) { + if (comps[i3][NAME_INDEX] === name) { + var result = this._hydrateComponent(i3); + return result; + } + } + } else { + if (this.jCal[COMPONENT_INDEX].length) { + return this._hydrateComponent(0); + } + } + return null; + }, + getAllSubcomponents: function(name) { + var jCalLen = this.jCal[COMPONENT_INDEX].length; + var i3 = 0; + if (name) { + var comps = this.jCal[COMPONENT_INDEX]; + var result = []; + for (; i3 < jCalLen; i3++) { + if (name === comps[i3][NAME_INDEX]) { + result.push(this._hydrateComponent(i3)); + } + } + return result; + } else { + if (!this._components || this._hydratedComponentCount !== jCalLen) { + for (; i3 < jCalLen; i3++) { + this._hydrateComponent(i3); + } + } + return this._components || []; + } + }, + hasProperty: function(name) { + var props = this.jCal[PROPERTY_INDEX]; + var len = props.length; + var i3 = 0; + for (; i3 < len; i3++) { + if (props[i3][NAME_INDEX] === name) { + return true; + } + } + return false; + }, + getFirstProperty: function(name) { + if (name) { + var i3 = 0; + var props = this.jCal[PROPERTY_INDEX]; + var len = props.length; + for (; i3 < len; i3++) { + if (props[i3][NAME_INDEX] === name) { + var result = this._hydrateProperty(i3); + return result; + } + } + } else { + if (this.jCal[PROPERTY_INDEX].length) { + return this._hydrateProperty(0); + } + } + return null; + }, + getFirstPropertyValue: function(name) { + var prop = this.getFirstProperty(name); + if (prop) { + return prop.getFirstValue(); + } + return null; + }, + getAllProperties: function(name) { + var jCalLen = this.jCal[PROPERTY_INDEX].length; + var i3 = 0; + if (name) { + var props = this.jCal[PROPERTY_INDEX]; + var result = []; + for (; i3 < jCalLen; i3++) { + if (name === props[i3][NAME_INDEX]) { + result.push(this._hydrateProperty(i3)); + } + } + return result; + } else { + if (!this._properties || this._hydratedPropertyCount !== jCalLen) { + for (; i3 < jCalLen; i3++) { + this._hydrateProperty(i3); + } + } + return this._properties || []; + } + }, + _removeObjectByIndex: function(jCalIndex, cache, index) { + cache = cache || []; + if (cache[index]) { + var obj = cache[index]; + if ("parent" in obj) { + obj.parent = null; + } + } + cache.splice(index, 1); + this.jCal[jCalIndex].splice(index, 1); + }, + _removeObject: function(jCalIndex, cache, nameOrObject) { + var i3 = 0; + var objects = this.jCal[jCalIndex]; + var len = objects.length; + var cached = this[cache]; + if (typeof nameOrObject === "string") { + for (; i3 < len; i3++) { + if (objects[i3][NAME_INDEX] === nameOrObject) { + this._removeObjectByIndex(jCalIndex, cached, i3); + return true; + } + } + } else if (cached) { + for (; i3 < len; i3++) { + if (cached[i3] && cached[i3] === nameOrObject) { + this._removeObjectByIndex(jCalIndex, cached, i3); + return true; + } + } + } + return false; + }, + _removeAllObjects: function(jCalIndex, cache, name) { + var cached = this[cache]; + var objects = this.jCal[jCalIndex]; + var i3 = objects.length - 1; + for (; i3 >= 0; i3--) { + if (!name || objects[i3][NAME_INDEX] === name) { + this._removeObjectByIndex(jCalIndex, cached, i3); + } + } + }, + addSubcomponent: function(component) { + if (!this._components) { + this._components = []; + this._hydratedComponentCount = 0; + } + if (component.parent) { + component.parent.removeSubcomponent(component); + } + var idx = this.jCal[COMPONENT_INDEX].push(component.jCal); + this._components[idx - 1] = component; + this._hydratedComponentCount++; + component.parent = this; + return component; + }, + removeSubcomponent: function(nameOrComp) { + var removed = this._removeObject(COMPONENT_INDEX, "_components", nameOrComp); + if (removed) { + this._hydratedComponentCount--; + } + return removed; + }, + removeAllSubcomponents: function(name) { + var removed = this._removeAllObjects(COMPONENT_INDEX, "_components", name); + this._hydratedComponentCount = 0; + return removed; + }, + addProperty: function(property) { + if (!(property instanceof ICAL3.Property)) { + throw new TypeError("must instance of ICAL.Property"); + } + if (!this._properties) { + this._properties = []; + this._hydratedPropertyCount = 0; + } + if (property.parent) { + property.parent.removeProperty(property); + } + var idx = this.jCal[PROPERTY_INDEX].push(property.jCal); + this._properties[idx - 1] = property; + this._hydratedPropertyCount++; + property.parent = this; + return property; + }, + addPropertyWithValue: function(name, value) { + var prop = new ICAL3.Property(name); + prop.setValue(value); + this.addProperty(prop); + return prop; + }, + updatePropertyWithValue: function(name, value) { + var prop = this.getFirstProperty(name); + if (prop) { + prop.setValue(value); + } else { + prop = this.addPropertyWithValue(name, value); + } + return prop; + }, + removeProperty: function(nameOrProp) { + var removed = this._removeObject(PROPERTY_INDEX, "_properties", nameOrProp); + if (removed) { + this._hydratedPropertyCount--; + } + return removed; + }, + removeAllProperties: function(name) { + var removed = this._removeAllObjects(PROPERTY_INDEX, "_properties", name); + this._hydratedPropertyCount = 0; + return removed; + }, + toJSON: function() { + return this.jCal; + }, + toString: function() { + return ICAL3.stringify.component(this.jCal, this._designSet); + } + }; + Component4.fromString = function(str) { + return new Component4(ICAL3.parse.component(str)); + }; + return Component4; + }(); + ICAL3.Property = function() { + "use strict"; + var NAME_INDEX = 0; + var PROP_INDEX = 1; + var TYPE_INDEX = 2; + var VALUE_INDEX = 3; + var design = ICAL3.design; + function Property(jCal, parent) { + this._parent = parent || null; + if (typeof jCal === "string") { + this.jCal = [jCal, {}, design.defaultType]; + this.jCal[TYPE_INDEX] = this.getDefaultType(); + } else { + this.jCal = jCal; + } + this._updateType(); + } + Property.prototype = { + get type() { + return this.jCal[TYPE_INDEX]; + }, + get name() { + return this.jCal[NAME_INDEX]; + }, + get parent() { + return this._parent; + }, + set parent(p3) { + var designSetChanged = !this._parent || p3 && p3._designSet != this._parent._designSet; + this._parent = p3; + if (this.type == design.defaultType && designSetChanged) { + this.jCal[TYPE_INDEX] = this.getDefaultType(); + this._updateType(); + } + return p3; + }, + get _designSet() { + return this.parent ? this.parent._designSet : design.defaultSet; + }, + _updateType: function() { + var designSet = this._designSet; + if (this.type in designSet.value) { + var designType = designSet.value[this.type]; + if ("decorate" in designSet.value[this.type]) { + this.isDecorated = true; + } else { + this.isDecorated = false; + } + if (this.name in designSet.property) { + this.isMultiValue = "multiValue" in designSet.property[this.name]; + this.isStructuredValue = "structuredValue" in designSet.property[this.name]; + } + } + }, + _hydrateValue: function(index) { + if (this._values && this._values[index]) { + return this._values[index]; + } + if (this.jCal.length <= VALUE_INDEX + index) { + return null; + } + if (this.isDecorated) { + if (!this._values) { + this._values = []; + } + return this._values[index] = this._decorate(this.jCal[VALUE_INDEX + index]); + } else { + return this.jCal[VALUE_INDEX + index]; + } + }, + _decorate: function(value) { + return this._designSet.value[this.type].decorate(value, this); + }, + _undecorate: function(value) { + return this._designSet.value[this.type].undecorate(value, this); + }, + _setDecoratedValue: function(value, index) { + if (!this._values) { + this._values = []; + } + if (typeof value === "object" && "icaltype" in value) { + this.jCal[VALUE_INDEX + index] = this._undecorate(value); + this._values[index] = value; + } else { + this.jCal[VALUE_INDEX + index] = value; + this._values[index] = this._decorate(value); + } + }, + getParameter: function(name) { + if (name in this.jCal[PROP_INDEX]) { + return this.jCal[PROP_INDEX][name]; + } else { + return void 0; + } + }, + getFirstParameter: function(name) { + var parameters = this.getParameter(name); + if (Array.isArray(parameters)) { + return parameters[0]; + } + return parameters; + }, + setParameter: function(name, value) { + var lcname = name.toLowerCase(); + if (typeof value === "string" && lcname in this._designSet.param && "multiValue" in this._designSet.param[lcname]) { + value = [value]; + } + this.jCal[PROP_INDEX][name] = value; + }, + removeParameter: function(name) { + delete this.jCal[PROP_INDEX][name]; + }, + getDefaultType: function() { + var name = this.jCal[NAME_INDEX]; + var designSet = this._designSet; + if (name in designSet.property) { + var details = designSet.property[name]; + if ("defaultType" in details) { + return details.defaultType; + } + } + return design.defaultType; + }, + resetType: function(type) { + this.removeAllValues(); + this.jCal[TYPE_INDEX] = type; + this._updateType(); + }, + getFirstValue: function() { + return this._hydrateValue(0); + }, + getValues: function() { + var len = this.jCal.length - VALUE_INDEX; + if (len < 1) { + return []; + } + var i3 = 0; + var result = []; + for (; i3 < len; i3++) { + result[i3] = this._hydrateValue(i3); + } + return result; + }, + removeAllValues: function() { + if (this._values) { + this._values.length = 0; + } + this.jCal.length = 3; + }, + setValues: function(values) { + if (!this.isMultiValue) { + throw new Error(this.name + ": does not not support mulitValue.\noverride isMultiValue"); + } + var len = values.length; + var i3 = 0; + this.removeAllValues(); + if (len > 0 && typeof values[0] === "object" && "icaltype" in values[0]) { + this.resetType(values[0].icaltype); + } + if (this.isDecorated) { + for (; i3 < len; i3++) { + this._setDecoratedValue(values[i3], i3); + } + } else { + for (; i3 < len; i3++) { + this.jCal[VALUE_INDEX + i3] = values[i3]; + } + } + }, + setValue: function(value) { + this.removeAllValues(); + if (typeof value === "object" && "icaltype" in value) { + this.resetType(value.icaltype); + } + if (this.isDecorated) { + this._setDecoratedValue(value, 0); + } else { + this.jCal[VALUE_INDEX] = value; + } + }, + toJSON: function() { + return this.jCal; + }, + toICALString: function() { + return ICAL3.stringify.property(this.jCal, this._designSet, true); + } + }; + Property.fromString = function(str, designSet) { + return new Property(ICAL3.parse.property(str, designSet)); + }; + return Property; + }(); + ICAL3.UtcOffset = function() { + function UtcOffset(aData) { + this.fromData(aData); + } + UtcOffset.prototype = { + hours: 0, + minutes: 0, + factor: 1, + icaltype: "utc-offset", + clone: function() { + return ICAL3.UtcOffset.fromSeconds(this.toSeconds()); + }, + fromData: function(aData) { + if (aData) { + for (var key in aData) { + if (aData.hasOwnProperty(key)) { + this[key] = aData[key]; + } + } + } + this._normalize(); + }, + fromSeconds: function(aSeconds) { + var secs = Math.abs(aSeconds); + this.factor = aSeconds < 0 ? -1 : 1; + this.hours = ICAL3.helpers.trunc(secs / 3600); + secs -= this.hours * 3600; + this.minutes = ICAL3.helpers.trunc(secs / 60); + return this; + }, + toSeconds: function() { + return this.factor * (60 * this.minutes + 3600 * this.hours); + }, + compare: function icaltime_compare(other) { + var a3 = this.toSeconds(); + var b3 = other.toSeconds(); + return (a3 > b3) - (b3 > a3); + }, + _normalize: function() { + var secs = this.toSeconds(); + var factor = this.factor; + while (secs < -43200) { + secs += 97200; + } + while (secs > 50400) { + secs -= 97200; + } + this.fromSeconds(secs); + if (secs == 0) { + this.factor = factor; + } + }, + toICALString: function() { + return ICAL3.design.icalendar.value["utc-offset"].toICAL(this.toString()); + }, + toString: function toString() { + return (this.factor == 1 ? "+" : "-") + ICAL3.helpers.pad2(this.hours) + ":" + ICAL3.helpers.pad2(this.minutes); + } + }; + UtcOffset.fromString = function(aString) { + var options = {}; + options.factor = aString[0] === "+" ? 1 : -1; + options.hours = ICAL3.helpers.strictParseInt(aString.substr(1, 2)); + options.minutes = ICAL3.helpers.strictParseInt(aString.substr(4, 2)); + return new ICAL3.UtcOffset(options); + }; + UtcOffset.fromSeconds = function(aSeconds) { + var instance = new UtcOffset(); + instance.fromSeconds(aSeconds); + return instance; + }; + return UtcOffset; + }(); + ICAL3.Binary = function() { + function Binary(aValue) { + this.value = aValue; + } + Binary.prototype = { + icaltype: "binary", + decodeValue: function decodeValue() { + return this._b64_decode(this.value); + }, + setEncodedValue: function setEncodedValue(aValue) { + this.value = this._b64_encode(aValue); + }, + _b64_encode: function base64_encode(data) { + var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + var o1, o2, o3, h1, h22, h3, h4, bits, i3 = 0, ac = 0, enc = "", tmp_arr = []; + if (!data) { + return data; + } + do { + o1 = data.charCodeAt(i3++); + o2 = data.charCodeAt(i3++); + o3 = data.charCodeAt(i3++); + bits = o1 << 16 | o2 << 8 | o3; + h1 = bits >> 18 & 63; + h22 = bits >> 12 & 63; + h3 = bits >> 6 & 63; + h4 = bits & 63; + tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h22) + b64.charAt(h3) + b64.charAt(h4); + } while (i3 < data.length); + enc = tmp_arr.join(""); + var r3 = data.length % 3; + return (r3 ? enc.slice(0, r3 - 3) : enc) + "===".slice(r3 || 3); + }, + _b64_decode: function base64_decode(data) { + var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + var o1, o2, o3, h1, h22, h3, h4, bits, i3 = 0, ac = 0, dec = "", tmp_arr = []; + if (!data) { + return data; + } + data += ""; + do { + h1 = b64.indexOf(data.charAt(i3++)); + h22 = b64.indexOf(data.charAt(i3++)); + h3 = b64.indexOf(data.charAt(i3++)); + h4 = b64.indexOf(data.charAt(i3++)); + bits = h1 << 18 | h22 << 12 | h3 << 6 | h4; + o1 = bits >> 16 & 255; + o2 = bits >> 8 & 255; + o3 = bits & 255; + if (h3 == 64) { + tmp_arr[ac++] = String.fromCharCode(o1); + } else if (h4 == 64) { + tmp_arr[ac++] = String.fromCharCode(o1, o2); + } else { + tmp_arr[ac++] = String.fromCharCode(o1, o2, o3); + } + } while (i3 < data.length); + dec = tmp_arr.join(""); + return dec; + }, + toString: function() { + return this.value; + } + }; + Binary.fromString = function(aString) { + return new Binary(aString); + }; + return Binary; + }(); + (function() { + ICAL3.Period = function icalperiod(aData) { + this.wrappedJSObject = this; + if (aData && "start" in aData) { + if (aData.start && !(aData.start instanceof ICAL3.Time)) { + throw new TypeError(".start must be an instance of ICAL.Time"); + } + this.start = aData.start; + } + if (aData && aData.end && aData.duration) { + throw new Error("cannot accept both end and duration"); + } + if (aData && "end" in aData) { + if (aData.end && !(aData.end instanceof ICAL3.Time)) { + throw new TypeError(".end must be an instance of ICAL.Time"); + } + this.end = aData.end; + } + if (aData && "duration" in aData) { + if (aData.duration && !(aData.duration instanceof ICAL3.Duration)) { + throw new TypeError(".duration must be an instance of ICAL.Duration"); + } + this.duration = aData.duration; + } + }; + ICAL3.Period.prototype = { + start: null, + end: null, + duration: null, + icalclass: "icalperiod", + icaltype: "period", + clone: function() { + return ICAL3.Period.fromData({ + start: this.start ? this.start.clone() : null, + end: this.end ? this.end.clone() : null, + duration: this.duration ? this.duration.clone() : null + }); + }, + getDuration: function duration() { + if (this.duration) { + return this.duration; + } else { + return this.end.subtractDate(this.start); + } + }, + getEnd: function() { + if (this.end) { + return this.end; + } else { + var end = this.start.clone(); + end.addDuration(this.duration); + return end; + } + }, + toString: function toString() { + return this.start + "/" + (this.end || this.duration); + }, + toJSON: function() { + return [this.start.toString(), (this.end || this.duration).toString()]; + }, + toICALString: function() { + return this.start.toICALString() + "/" + (this.end || this.duration).toICALString(); + } + }; + ICAL3.Period.fromString = function fromString(str, prop) { + var parts = str.split("/"); + if (parts.length !== 2) { + throw new Error('Invalid string value: "' + str + '" must contain a "/" char.'); + } + var options = { + start: ICAL3.Time.fromDateTimeString(parts[0], prop) + }; + var end = parts[1]; + if (ICAL3.Duration.isValueString(end)) { + options.duration = ICAL3.Duration.fromString(end); + } else { + options.end = ICAL3.Time.fromDateTimeString(end, prop); + } + return new ICAL3.Period(options); + }; + ICAL3.Period.fromData = function fromData(aData) { + return new ICAL3.Period(aData); + }; + ICAL3.Period.fromJSON = function(aData, aProp, aLenient) { + function fromDateOrDateTimeString(aValue, aProp2) { + if (aLenient) { + return ICAL3.Time.fromString(aValue, aProp2); + } else { + return ICAL3.Time.fromDateTimeString(aValue, aProp2); + } + } + if (ICAL3.Duration.isValueString(aData[1])) { + return ICAL3.Period.fromData({ + start: fromDateOrDateTimeString(aData[0], aProp), + duration: ICAL3.Duration.fromString(aData[1]) + }); + } else { + return ICAL3.Period.fromData({ + start: fromDateOrDateTimeString(aData[0], aProp), + end: fromDateOrDateTimeString(aData[1], aProp) + }); + } + }; + })(); + (function() { + var DURATION_LETTERS = /([PDWHMTS]{1,1})/; + ICAL3.Duration = function icalduration(data) { + this.wrappedJSObject = this; + this.fromData(data); + }; + ICAL3.Duration.prototype = { + weeks: 0, + days: 0, + hours: 0, + minutes: 0, + seconds: 0, + isNegative: false, + icalclass: "icalduration", + icaltype: "duration", + clone: function clone() { + return ICAL3.Duration.fromData(this); + }, + toSeconds: function toSeconds() { + var seconds = this.seconds + 60 * this.minutes + 3600 * this.hours + 86400 * this.days + 7 * 86400 * this.weeks; + return this.isNegative ? -seconds : seconds; + }, + fromSeconds: function fromSeconds(aSeconds) { + var secs = Math.abs(aSeconds); + this.isNegative = aSeconds < 0; + this.days = ICAL3.helpers.trunc(secs / 86400); + if (this.days % 7 == 0) { + this.weeks = this.days / 7; + this.days = 0; + } else { + this.weeks = 0; + } + secs -= (this.days + 7 * this.weeks) * 86400; + this.hours = ICAL3.helpers.trunc(secs / 3600); + secs -= this.hours * 3600; + this.minutes = ICAL3.helpers.trunc(secs / 60); + secs -= this.minutes * 60; + this.seconds = secs; + return this; + }, + fromData: function fromData(aData) { + var propsToCopy = [ + "weeks", + "days", + "hours", + "minutes", + "seconds", + "isNegative" + ]; + for (var key in propsToCopy) { + if (!propsToCopy.hasOwnProperty(key)) { + continue; + } + var prop = propsToCopy[key]; + if (aData && prop in aData) { + this[prop] = aData[prop]; + } else { + this[prop] = 0; + } + } + }, + reset: function reset() { + this.isNegative = false; + this.weeks = 0; + this.days = 0; + this.hours = 0; + this.minutes = 0; + this.seconds = 0; + }, + compare: function compare(aOther) { + var thisSeconds = this.toSeconds(); + var otherSeconds = aOther.toSeconds(); + return (thisSeconds > otherSeconds) - (thisSeconds < otherSeconds); + }, + normalize: function normalize() { + this.fromSeconds(this.toSeconds()); + }, + toString: function toString() { + if (this.toSeconds() == 0) { + return "PT0S"; + } else { + var str = ""; + if (this.isNegative) + str += "-"; + str += "P"; + if (this.weeks) + str += this.weeks + "W"; + if (this.days) + str += this.days + "D"; + if (this.hours || this.minutes || this.seconds) { + str += "T"; + if (this.hours) + str += this.hours + "H"; + if (this.minutes) + str += this.minutes + "M"; + if (this.seconds) + str += this.seconds + "S"; + } + return str; + } + }, + toICALString: function() { + return this.toString(); + } + }; + ICAL3.Duration.fromSeconds = function icalduration_from_seconds(aSeconds) { + return new ICAL3.Duration().fromSeconds(aSeconds); + }; + function parseDurationChunk(letter, number, object) { + var type; + switch (letter) { + case "P": + if (number && number === "-") { + object.isNegative = true; + } else { + object.isNegative = false; + } + break; + case "D": + type = "days"; + break; + case "W": + type = "weeks"; + break; + case "H": + type = "hours"; + break; + case "M": + type = "minutes"; + break; + case "S": + type = "seconds"; + break; + default: + return 0; + } + if (type) { + if (!number && number !== 0) { + throw new Error('invalid duration value: Missing number before "' + letter + '"'); + } + var num = parseInt(number, 10); + if (ICAL3.helpers.isStrictlyNaN(num)) { + throw new Error('invalid duration value: Invalid number "' + number + '" before "' + letter + '"'); + } + object[type] = num; + } + return 1; + } + ICAL3.Duration.isValueString = function(string) { + return string[0] === "P" || string[1] === "P"; + }; + ICAL3.Duration.fromString = function icalduration_from_string(aStr) { + var pos = 0; + var dict = Object.create(null); + var chunks = 0; + while ((pos = aStr.search(DURATION_LETTERS)) !== -1) { + var type = aStr[pos]; + var numeric = aStr.substr(0, pos); + aStr = aStr.substr(pos + 1); + chunks += parseDurationChunk(type, numeric, dict); + } + if (chunks < 2) { + throw new Error('invalid duration value: Not enough duration components in "' + aStr + '"'); + } + return new ICAL3.Duration(dict); + }; + ICAL3.Duration.fromData = function icalduration_from_data(aData) { + return new ICAL3.Duration(aData); + }; + })(); + (function() { + var OPTIONS = [ + "tzid", + "location", + "tznames", + "latitude", + "longitude" + ]; + ICAL3.Timezone = function icaltimezone(data) { + this.wrappedJSObject = this; + this.fromData(data); + }; + ICAL3.Timezone.prototype = { + tzid: "", + location: "", + tznames: "", + latitude: 0, + longitude: 0, + component: null, + expandedUntilYear: 0, + icalclass: "icaltimezone", + fromData: function fromData(aData) { + this.expandedUntilYear = 0; + this.changes = []; + if (aData instanceof ICAL3.Component) { + this.component = aData; + } else { + if (aData && "component" in aData) { + if (typeof aData.component == "string") { + var jCal = ICAL3.parse(aData.component); + this.component = new ICAL3.Component(jCal); + } else if (aData.component instanceof ICAL3.Component) { + this.component = aData.component; + } else { + this.component = null; + } + } + for (var key in OPTIONS) { + if (OPTIONS.hasOwnProperty(key)) { + var prop = OPTIONS[key]; + if (aData && prop in aData) { + this[prop] = aData[prop]; + } + } + } + } + if (this.component instanceof ICAL3.Component && !this.tzid) { + this.tzid = this.component.getFirstPropertyValue("tzid"); + } + return this; + }, + utcOffset: function utcOffset(tt) { + if (this == ICAL3.Timezone.utcTimezone || this == ICAL3.Timezone.localTimezone) { + return 0; + } + this._ensureCoverage(tt.year); + if (!this.changes.length) { + return 0; + } + var tt_change = { + year: tt.year, + month: tt.month, + day: tt.day, + hour: tt.hour, + minute: tt.minute, + second: tt.second + }; + var change_num = this._findNearbyChange(tt_change); + var change_num_to_use = -1; + var step = 1; + for (; ; ) { + var change = ICAL3.helpers.clone(this.changes[change_num], true); + if (change.utcOffset < change.prevUtcOffset) { + ICAL3.Timezone.adjust_change(change, 0, 0, 0, change.utcOffset); + } else { + ICAL3.Timezone.adjust_change(change, 0, 0, 0, change.prevUtcOffset); + } + var cmp = ICAL3.Timezone._compare_change_fn(tt_change, change); + if (cmp >= 0) { + change_num_to_use = change_num; + } else { + step = -1; + } + if (step == -1 && change_num_to_use != -1) { + break; + } + change_num += step; + if (change_num < 0) { + return 0; + } + if (change_num >= this.changes.length) { + break; + } + } + var zone_change = this.changes[change_num_to_use]; + var utcOffset_change = zone_change.utcOffset - zone_change.prevUtcOffset; + if (utcOffset_change < 0 && change_num_to_use > 0) { + var tmp_change = ICAL3.helpers.clone(zone_change, true); + ICAL3.Timezone.adjust_change(tmp_change, 0, 0, 0, tmp_change.prevUtcOffset); + if (ICAL3.Timezone._compare_change_fn(tt_change, tmp_change) < 0) { + var prev_zone_change = this.changes[change_num_to_use - 1]; + var want_daylight = false; + if (zone_change.is_daylight != want_daylight && prev_zone_change.is_daylight == want_daylight) { + zone_change = prev_zone_change; + } + } + } + return zone_change.utcOffset; + }, + _findNearbyChange: function icaltimezone_find_nearby_change(change) { + var idx = ICAL3.helpers.binsearchInsert(this.changes, change, ICAL3.Timezone._compare_change_fn); + if (idx >= this.changes.length) { + return this.changes.length - 1; + } + return idx; + }, + _ensureCoverage: function(aYear) { + if (ICAL3.Timezone._minimumExpansionYear == -1) { + var today = ICAL3.Time.now(); + ICAL3.Timezone._minimumExpansionYear = today.year; + } + var changesEndYear = aYear; + if (changesEndYear < ICAL3.Timezone._minimumExpansionYear) { + changesEndYear = ICAL3.Timezone._minimumExpansionYear; + } + changesEndYear += ICAL3.Timezone.EXTRA_COVERAGE; + if (changesEndYear > ICAL3.Timezone.MAX_YEAR) { + changesEndYear = ICAL3.Timezone.MAX_YEAR; + } + if (!this.changes.length || this.expandedUntilYear < aYear) { + var subcomps = this.component.getAllSubcomponents(); + var compLen = subcomps.length; + var compIdx = 0; + for (; compIdx < compLen; compIdx++) { + this._expandComponent(subcomps[compIdx], changesEndYear, this.changes); + } + this.changes.sort(ICAL3.Timezone._compare_change_fn); + this.expandedUntilYear = changesEndYear; + } + }, + _expandComponent: function(aComponent, aYear, changes) { + if (!aComponent.hasProperty("dtstart") || !aComponent.hasProperty("tzoffsetto") || !aComponent.hasProperty("tzoffsetfrom")) { + return null; + } + var dtstart = aComponent.getFirstProperty("dtstart").getFirstValue(); + var change; + function convert_tzoffset(offset) { + return offset.factor * (offset.hours * 3600 + offset.minutes * 60); + } + function init_changes() { + var changebase = {}; + changebase.is_daylight = aComponent.name == "daylight"; + changebase.utcOffset = convert_tzoffset(aComponent.getFirstProperty("tzoffsetto").getFirstValue()); + changebase.prevUtcOffset = convert_tzoffset(aComponent.getFirstProperty("tzoffsetfrom").getFirstValue()); + return changebase; + } + if (!aComponent.hasProperty("rrule") && !aComponent.hasProperty("rdate")) { + change = init_changes(); + change.year = dtstart.year; + change.month = dtstart.month; + change.day = dtstart.day; + change.hour = dtstart.hour; + change.minute = dtstart.minute; + change.second = dtstart.second; + ICAL3.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); + changes.push(change); + } else { + var props = aComponent.getAllProperties("rdate"); + for (var rdatekey in props) { + if (!props.hasOwnProperty(rdatekey)) { + continue; + } + var rdate = props[rdatekey]; + var time = rdate.getFirstValue(); + change = init_changes(); + change.year = time.year; + change.month = time.month; + change.day = time.day; + if (time.isDate) { + change.hour = dtstart.hour; + change.minute = dtstart.minute; + change.second = dtstart.second; + if (dtstart.zone != ICAL3.Timezone.utcTimezone) { + ICAL3.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); + } + } else { + change.hour = time.hour; + change.minute = time.minute; + change.second = time.second; + if (time.zone != ICAL3.Timezone.utcTimezone) { + ICAL3.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); + } + } + changes.push(change); + } + var rrule = aComponent.getFirstProperty("rrule"); + if (rrule) { + rrule = rrule.getFirstValue(); + change = init_changes(); + if (rrule.until && rrule.until.zone == ICAL3.Timezone.utcTimezone) { + rrule.until.adjust(0, 0, 0, change.prevUtcOffset); + rrule.until.zone = ICAL3.Timezone.localTimezone; + } + var iterator = rrule.iterator(dtstart); + var occ; + while (occ = iterator.next()) { + change = init_changes(); + if (occ.year > aYear || !occ) { + break; + } + change.year = occ.year; + change.month = occ.month; + change.day = occ.day; + change.hour = occ.hour; + change.minute = occ.minute; + change.second = occ.second; + change.isDate = occ.isDate; + ICAL3.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); + changes.push(change); + } + } + } + return changes; + }, + toString: function toString() { + return this.tznames ? this.tznames : this.tzid; + } + }; + ICAL3.Timezone._compare_change_fn = function icaltimezone_compare_change_fn(a3, b3) { + if (a3.year < b3.year) + return -1; + else if (a3.year > b3.year) + return 1; + if (a3.month < b3.month) + return -1; + else if (a3.month > b3.month) + return 1; + if (a3.day < b3.day) + return -1; + else if (a3.day > b3.day) + return 1; + if (a3.hour < b3.hour) + return -1; + else if (a3.hour > b3.hour) + return 1; + if (a3.minute < b3.minute) + return -1; + else if (a3.minute > b3.minute) + return 1; + if (a3.second < b3.second) + return -1; + else if (a3.second > b3.second) + return 1; + return 0; + }; + ICAL3.Timezone.convert_time = function icaltimezone_convert_time(tt, from_zone, to_zone) { + if (tt.isDate || from_zone.tzid == to_zone.tzid || from_zone == ICAL3.Timezone.localTimezone || to_zone == ICAL3.Timezone.localTimezone) { + tt.zone = to_zone; + return tt; + } + var utcOffset = from_zone.utcOffset(tt); + tt.adjust(0, 0, 0, -utcOffset); + utcOffset = to_zone.utcOffset(tt); + tt.adjust(0, 0, 0, utcOffset); + return null; + }; + ICAL3.Timezone.fromData = function icaltimezone_fromData(aData) { + var tt = new ICAL3.Timezone(); + return tt.fromData(aData); + }; + ICAL3.Timezone.utcTimezone = ICAL3.Timezone.fromData({ + tzid: "UTC" + }); + ICAL3.Timezone.localTimezone = ICAL3.Timezone.fromData({ + tzid: "floating" + }); + ICAL3.Timezone.adjust_change = function icaltimezone_adjust_change(change, days, hours, minutes, seconds) { + return ICAL3.Time.prototype.adjust.call(change, days, hours, minutes, seconds, change); + }; + ICAL3.Timezone._minimumExpansionYear = -1; + ICAL3.Timezone.MAX_YEAR = 2035; + ICAL3.Timezone.EXTRA_COVERAGE = 5; + })(); + ICAL3.TimezoneService = function() { + var zones; + var TimezoneService = { + get count() { + return Object.keys(zones).length; + }, + reset: function() { + zones = Object.create(null); + var utc = ICAL3.Timezone.utcTimezone; + zones.Z = utc; + zones.UTC = utc; + zones.GMT = utc; + }, + has: function(tzid) { + return !!zones[tzid]; + }, + get: function(tzid) { + return zones[tzid]; + }, + register: function(name, timezone) { + if (name instanceof ICAL3.Component) { + if (name.name === "vtimezone") { + timezone = new ICAL3.Timezone(name); + name = timezone.tzid; + } + } + if (timezone instanceof ICAL3.Timezone) { + zones[name] = timezone; + } else { + throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component"); + } + }, + remove: function(tzid) { + return delete zones[tzid]; + } + }; + TimezoneService.reset(); + return TimezoneService; + }(); + (function() { + ICAL3.Time = function icaltime(data, zone) { + this.wrappedJSObject = this; + var time = this._time = Object.create(null); + time.year = 0; + time.month = 1; + time.day = 1; + time.hour = 0; + time.minute = 0; + time.second = 0; + time.isDate = false; + this.fromData(data, zone); + }; + ICAL3.Time._dowCache = {}; + ICAL3.Time._wnCache = {}; + ICAL3.Time.prototype = { + icalclass: "icaltime", + _cachedUnixTime: null, + get icaltype() { + return this.isDate ? "date" : "date-time"; + }, + zone: null, + _pendingNormalization: false, + clone: function() { + return new ICAL3.Time(this._time, this.zone); + }, + reset: function icaltime_reset() { + this.fromData(ICAL3.Time.epochTime); + this.zone = ICAL3.Timezone.utcTimezone; + }, + resetTo: function icaltime_resetTo(year, month, day, hour, minute, second, timezone) { + this.fromData({ + year, + month, + day, + hour, + minute, + second, + zone: timezone + }); + }, + fromJSDate: function icaltime_fromJSDate(aDate, useUTC) { + if (!aDate) { + this.reset(); + } else { + if (useUTC) { + this.zone = ICAL3.Timezone.utcTimezone; + this.year = aDate.getUTCFullYear(); + this.month = aDate.getUTCMonth() + 1; + this.day = aDate.getUTCDate(); + this.hour = aDate.getUTCHours(); + this.minute = aDate.getUTCMinutes(); + this.second = aDate.getUTCSeconds(); + } else { + this.zone = ICAL3.Timezone.localTimezone; + this.year = aDate.getFullYear(); + this.month = aDate.getMonth() + 1; + this.day = aDate.getDate(); + this.hour = aDate.getHours(); + this.minute = aDate.getMinutes(); + this.second = aDate.getSeconds(); + } + } + this._cachedUnixTime = null; + return this; + }, + fromData: function fromData(aData, aZone) { + if (aData) { + for (var key in aData) { + if (Object.prototype.hasOwnProperty.call(aData, key)) { + if (key === "icaltype") + continue; + this[key] = aData[key]; + } + } + } + if (aZone) { + this.zone = aZone; + } + if (aData && !("isDate" in aData)) { + this.isDate = !("hour" in aData); + } else if (aData && "isDate" in aData) { + this.isDate = aData.isDate; + } + if (aData && "timezone" in aData) { + var zone = ICAL3.TimezoneService.get(aData.timezone); + this.zone = zone || ICAL3.Timezone.localTimezone; + } + if (aData && "zone" in aData) { + this.zone = aData.zone; + } + if (!this.zone) { + this.zone = ICAL3.Timezone.localTimezone; + } + this._cachedUnixTime = null; + return this; + }, + dayOfWeek: function icaltime_dayOfWeek(aWeekStart) { + var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + var dowCacheKey = (this.year << 12) + (this.month << 8) + (this.day << 3) + firstDow; + if (dowCacheKey in ICAL3.Time._dowCache) { + return ICAL3.Time._dowCache[dowCacheKey]; + } + var q3 = this.day; + var m2 = this.month + (this.month < 3 ? 12 : 0); + var Y2 = this.year - (this.month < 3 ? 1 : 0); + var h3 = q3 + Y2 + ICAL3.helpers.trunc((m2 + 1) * 26 / 10) + ICAL3.helpers.trunc(Y2 / 4); + if (true) { + h3 += ICAL3.helpers.trunc(Y2 / 100) * 6 + ICAL3.helpers.trunc(Y2 / 400); + } else { + h3 += 5; + } + h3 = (h3 + 7 - firstDow) % 7 + 1; + ICAL3.Time._dowCache[dowCacheKey] = h3; + return h3; + }, + dayOfYear: function dayOfYear() { + var is_leap = ICAL3.Time.isLeapYear(this.year) ? 1 : 0; + var diypm = ICAL3.Time.daysInYearPassedMonth; + return diypm[is_leap][this.month - 1] + this.day; + }, + startOfWeek: function startOfWeek(aWeekStart) { + var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + var result = this.clone(); + result.day -= (this.dayOfWeek() + 7 - firstDow) % 7; + result.isDate = true; + result.hour = 0; + result.minute = 0; + result.second = 0; + return result; + }, + endOfWeek: function endOfWeek(aWeekStart) { + var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + var result = this.clone(); + result.day += (7 - this.dayOfWeek() + firstDow - ICAL3.Time.SUNDAY) % 7; + result.isDate = true; + result.hour = 0; + result.minute = 0; + result.second = 0; + return result; + }, + startOfMonth: function startOfMonth() { + var result = this.clone(); + result.day = 1; + result.isDate = true; + result.hour = 0; + result.minute = 0; + result.second = 0; + return result; + }, + endOfMonth: function endOfMonth() { + var result = this.clone(); + result.day = ICAL3.Time.daysInMonth(result.month, result.year); + result.isDate = true; + result.hour = 0; + result.minute = 0; + result.second = 0; + return result; + }, + startOfYear: function startOfYear() { + var result = this.clone(); + result.day = 1; + result.month = 1; + result.isDate = true; + result.hour = 0; + result.minute = 0; + result.second = 0; + return result; + }, + endOfYear: function endOfYear() { + var result = this.clone(); + result.day = 31; + result.month = 12; + result.isDate = true; + result.hour = 0; + result.minute = 0; + result.second = 0; + return result; + }, + startDoyWeek: function startDoyWeek(aFirstDayOfWeek) { + var firstDow = aFirstDayOfWeek || ICAL3.Time.SUNDAY; + var delta = this.dayOfWeek() - firstDow; + if (delta < 0) + delta += 7; + return this.dayOfYear() - delta; + }, + getDominicalLetter: function() { + return ICAL3.Time.getDominicalLetter(this.year); + }, + nthWeekDay: function icaltime_nthWeekDay(aDayOfWeek, aPos) { + var daysInMonth = ICAL3.Time.daysInMonth(this.month, this.year); + var weekday; + var pos = aPos; + var start = 0; + var otherDay = this.clone(); + if (pos >= 0) { + otherDay.day = 1; + if (pos != 0) { + pos--; + } + start = otherDay.day; + var startDow = otherDay.dayOfWeek(); + var offset = aDayOfWeek - startDow; + if (offset < 0) + offset += 7; + start += offset; + start -= aDayOfWeek; + weekday = aDayOfWeek; + } else { + otherDay.day = daysInMonth; + var endDow = otherDay.dayOfWeek(); + pos++; + weekday = endDow - aDayOfWeek; + if (weekday < 0) { + weekday += 7; + } + weekday = daysInMonth - weekday; + } + weekday += pos * 7; + return start + weekday; + }, + isNthWeekDay: function(aDayOfWeek, aPos) { + var dow = this.dayOfWeek(); + if (aPos === 0 && dow === aDayOfWeek) { + return true; + } + var day = this.nthWeekDay(aDayOfWeek, aPos); + if (day === this.day) { + return true; + } + return false; + }, + weekNumber: function weekNumber(aWeekStart) { + var wnCacheKey = (this.year << 12) + (this.month << 8) + (this.day << 3) + aWeekStart; + if (wnCacheKey in ICAL3.Time._wnCache) { + return ICAL3.Time._wnCache[wnCacheKey]; + } + var week1; + var dt = this.clone(); + dt.isDate = true; + var isoyear = this.year; + if (dt.month == 12 && dt.day > 25) { + week1 = ICAL3.Time.weekOneStarts(isoyear + 1, aWeekStart); + if (dt.compare(week1) < 0) { + week1 = ICAL3.Time.weekOneStarts(isoyear, aWeekStart); + } else { + isoyear++; + } + } else { + week1 = ICAL3.Time.weekOneStarts(isoyear, aWeekStart); + if (dt.compare(week1) < 0) { + week1 = ICAL3.Time.weekOneStarts(--isoyear, aWeekStart); + } + } + var daysBetween = dt.subtractDate(week1).toSeconds() / 86400; + var answer = ICAL3.helpers.trunc(daysBetween / 7) + 1; + ICAL3.Time._wnCache[wnCacheKey] = answer; + return answer; + }, + addDuration: function icaltime_add(aDuration) { + var mult = aDuration.isNegative ? -1 : 1; + var second = this.second; + var minute = this.minute; + var hour = this.hour; + var day = this.day; + second += mult * aDuration.seconds; + minute += mult * aDuration.minutes; + hour += mult * aDuration.hours; + day += mult * aDuration.days; + day += mult * 7 * aDuration.weeks; + this.second = second; + this.minute = minute; + this.hour = hour; + this.day = day; + this._cachedUnixTime = null; + }, + subtractDate: function icaltime_subtract(aDate) { + var unixTime = this.toUnixTime() + this.utcOffset(); + var other = aDate.toUnixTime() + aDate.utcOffset(); + return ICAL3.Duration.fromSeconds(unixTime - other); + }, + subtractDateTz: function icaltime_subtract_abs(aDate) { + var unixTime = this.toUnixTime(); + var other = aDate.toUnixTime(); + return ICAL3.Duration.fromSeconds(unixTime - other); + }, + compare: function icaltime_compare(other) { + var a3 = this.toUnixTime(); + var b3 = other.toUnixTime(); + if (a3 > b3) + return 1; + if (b3 > a3) + return -1; + return 0; + }, + compareDateOnlyTz: function icaltime_compareDateOnlyTz(other, tz) { + function cmp(attr) { + return ICAL3.Time._cmp_attr(a3, b3, attr); + } + var a3 = this.convertToZone(tz); + var b3 = other.convertToZone(tz); + var rc = 0; + if ((rc = cmp("year")) != 0) + return rc; + if ((rc = cmp("month")) != 0) + return rc; + if ((rc = cmp("day")) != 0) + return rc; + return rc; + }, + convertToZone: function convertToZone(zone) { + var copy = this.clone(); + var zone_equals = this.zone.tzid == zone.tzid; + if (!this.isDate && !zone_equals) { + ICAL3.Timezone.convert_time(copy, this.zone, zone); + } + copy.zone = zone; + return copy; + }, + utcOffset: function utc_offset() { + if (this.zone == ICAL3.Timezone.localTimezone || this.zone == ICAL3.Timezone.utcTimezone) { + return 0; + } else { + return this.zone.utcOffset(this); + } + }, + toICALString: function() { + var string = this.toString(); + if (string.length > 10) { + return ICAL3.design.icalendar.value["date-time"].toICAL(string); + } else { + return ICAL3.design.icalendar.value.date.toICAL(string); + } + }, + toString: function toString() { + var result = this.year + "-" + ICAL3.helpers.pad2(this.month) + "-" + ICAL3.helpers.pad2(this.day); + if (!this.isDate) { + result += "T" + ICAL3.helpers.pad2(this.hour) + ":" + ICAL3.helpers.pad2(this.minute) + ":" + ICAL3.helpers.pad2(this.second); + if (this.zone === ICAL3.Timezone.utcTimezone) { + result += "Z"; + } + } + return result; + }, + toJSDate: function toJSDate() { + if (this.zone == ICAL3.Timezone.localTimezone) { + if (this.isDate) { + return new Date(this.year, this.month - 1, this.day); + } else { + return new Date(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, 0); + } + } else { + return new Date(this.toUnixTime() * 1e3); + } + }, + _normalize: function icaltime_normalize() { + var isDate = this._time.isDate; + if (this._time.isDate) { + this._time.hour = 0; + this._time.minute = 0; + this._time.second = 0; + } + this.adjust(0, 0, 0, 0); + return this; + }, + adjust: function icaltime_adjust(aExtraDays, aExtraHours, aExtraMinutes, aExtraSeconds, aTime) { + var minutesOverflow, hoursOverflow, daysOverflow = 0, yearsOverflow = 0; + var second, minute, hour, day; + var daysInMonth; + var time = aTime || this._time; + if (!time.isDate) { + second = time.second + aExtraSeconds; + time.second = second % 60; + minutesOverflow = ICAL3.helpers.trunc(second / 60); + if (time.second < 0) { + time.second += 60; + minutesOverflow--; + } + minute = time.minute + aExtraMinutes + minutesOverflow; + time.minute = minute % 60; + hoursOverflow = ICAL3.helpers.trunc(minute / 60); + if (time.minute < 0) { + time.minute += 60; + hoursOverflow--; + } + hour = time.hour + aExtraHours + hoursOverflow; + time.hour = hour % 24; + daysOverflow = ICAL3.helpers.trunc(hour / 24); + if (time.hour < 0) { + time.hour += 24; + daysOverflow--; + } + } + if (time.month > 12) { + yearsOverflow = ICAL3.helpers.trunc((time.month - 1) / 12); + } else if (time.month < 1) { + yearsOverflow = ICAL3.helpers.trunc(time.month / 12) - 1; + } + time.year += yearsOverflow; + time.month -= 12 * yearsOverflow; + day = time.day + aExtraDays + daysOverflow; + if (day > 0) { + for (; ; ) { + daysInMonth = ICAL3.Time.daysInMonth(time.month, time.year); + if (day <= daysInMonth) { + break; + } + time.month++; + if (time.month > 12) { + time.year++; + time.month = 1; + } + day -= daysInMonth; + } + } else { + while (day <= 0) { + if (time.month == 1) { + time.year--; + time.month = 12; + } else { + time.month--; + } + day += ICAL3.Time.daysInMonth(time.month, time.year); + } + } + time.day = day; + this._cachedUnixTime = null; + return this; + }, + fromUnixTime: function fromUnixTime(seconds) { + this.zone = ICAL3.Timezone.utcTimezone; + var epoch = ICAL3.Time.epochTime.clone(); + epoch.adjust(0, 0, 0, seconds); + this.year = epoch.year; + this.month = epoch.month; + this.day = epoch.day; + this.hour = epoch.hour; + this.minute = epoch.minute; + this.second = Math.floor(epoch.second); + this._cachedUnixTime = null; + }, + toUnixTime: function toUnixTime() { + if (this._cachedUnixTime !== null) { + return this._cachedUnixTime; + } + var offset = this.utcOffset(); + var ms = Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second - offset); + this._cachedUnixTime = ms / 1e3; + return this._cachedUnixTime; + }, + toJSON: function() { + var copy = [ + "year", + "month", + "day", + "hour", + "minute", + "second", + "isDate" + ]; + var result = Object.create(null); + var i3 = 0; + var len = copy.length; + var prop; + for (; i3 < len; i3++) { + prop = copy[i3]; + result[prop] = this[prop]; + } + if (this.zone) { + result.timezone = this.zone.tzid; + } + return result; + } + }; + (function setupNormalizeAttributes() { + function defineAttr(attr) { + Object.defineProperty(ICAL3.Time.prototype, attr, { + get: function getTimeAttr() { + if (this._pendingNormalization) { + this._normalize(); + this._pendingNormalization = false; + } + return this._time[attr]; + }, + set: function setTimeAttr(val) { + if (attr === "isDate" && val && !this._time.isDate) { + this.adjust(0, 0, 0, 0); + } + this._cachedUnixTime = null; + this._pendingNormalization = true; + this._time[attr] = val; + return val; + } + }); + } + if ("defineProperty" in Object) { + defineAttr("year"); + defineAttr("month"); + defineAttr("day"); + defineAttr("hour"); + defineAttr("minute"); + defineAttr("second"); + defineAttr("isDate"); + } + })(); + ICAL3.Time.daysInMonth = function icaltime_daysInMonth(month, year) { + var _daysInMonth = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + var days = 30; + if (month < 1 || month > 12) + return days; + days = _daysInMonth[month]; + if (month == 2) { + days += ICAL3.Time.isLeapYear(year); + } + return days; + }; + ICAL3.Time.isLeapYear = function isLeapYear(year) { + if (year <= 1752) { + return year % 4 == 0; + } else { + return year % 4 == 0 && year % 100 != 0 || year % 400 == 0; + } + }; + ICAL3.Time.fromDayOfYear = function icaltime_fromDayOfYear(aDayOfYear, aYear) { + var year = aYear; + var doy = aDayOfYear; + var tt = new ICAL3.Time(); + tt.auto_normalize = false; + var is_leap = ICAL3.Time.isLeapYear(year) ? 1 : 0; + if (doy < 1) { + year--; + is_leap = ICAL3.Time.isLeapYear(year) ? 1 : 0; + doy += ICAL3.Time.daysInYearPassedMonth[is_leap][12]; + return ICAL3.Time.fromDayOfYear(doy, year); + } else if (doy > ICAL3.Time.daysInYearPassedMonth[is_leap][12]) { + is_leap = ICAL3.Time.isLeapYear(year) ? 1 : 0; + doy -= ICAL3.Time.daysInYearPassedMonth[is_leap][12]; + year++; + return ICAL3.Time.fromDayOfYear(doy, year); + } + tt.year = year; + tt.isDate = true; + for (var month = 11; month >= 0; month--) { + if (doy > ICAL3.Time.daysInYearPassedMonth[is_leap][month]) { + tt.month = month + 1; + tt.day = doy - ICAL3.Time.daysInYearPassedMonth[is_leap][month]; + break; + } + } + tt.auto_normalize = true; + return tt; + }; + ICAL3.Time.fromStringv2 = function fromString(str) { + return new ICAL3.Time({ + year: parseInt(str.substr(0, 4), 10), + month: parseInt(str.substr(5, 2), 10), + day: parseInt(str.substr(8, 2), 10), + isDate: true + }); + }; + ICAL3.Time.fromDateString = function(aValue) { + return new ICAL3.Time({ + year: ICAL3.helpers.strictParseInt(aValue.substr(0, 4)), + month: ICAL3.helpers.strictParseInt(aValue.substr(5, 2)), + day: ICAL3.helpers.strictParseInt(aValue.substr(8, 2)), + isDate: true + }); + }; + ICAL3.Time.fromDateTimeString = function(aValue, prop) { + if (aValue.length < 19) { + throw new Error('invalid date-time value: "' + aValue + '"'); + } + var zone; + if (aValue[19] && aValue[19] === "Z") { + zone = "Z"; + } else if (prop) { + zone = prop.getParameter("tzid"); + } + var time = new ICAL3.Time({ + year: ICAL3.helpers.strictParseInt(aValue.substr(0, 4)), + month: ICAL3.helpers.strictParseInt(aValue.substr(5, 2)), + day: ICAL3.helpers.strictParseInt(aValue.substr(8, 2)), + hour: ICAL3.helpers.strictParseInt(aValue.substr(11, 2)), + minute: ICAL3.helpers.strictParseInt(aValue.substr(14, 2)), + second: ICAL3.helpers.strictParseInt(aValue.substr(17, 2)), + timezone: zone + }); + return time; + }; + ICAL3.Time.fromString = function fromString(aValue, aProperty) { + if (aValue.length > 10) { + return ICAL3.Time.fromDateTimeString(aValue, aProperty); + } else { + return ICAL3.Time.fromDateString(aValue); + } + }; + ICAL3.Time.fromJSDate = function fromJSDate(aDate, useUTC) { + var tt = new ICAL3.Time(); + return tt.fromJSDate(aDate, useUTC); + }; + ICAL3.Time.fromData = function fromData(aData, aZone) { + var t3 = new ICAL3.Time(); + return t3.fromData(aData, aZone); + }; + ICAL3.Time.now = function icaltime_now() { + return ICAL3.Time.fromJSDate(new Date(), false); + }; + ICAL3.Time.weekOneStarts = function weekOneStarts(aYear, aWeekStart) { + var t3 = ICAL3.Time.fromData({ + year: aYear, + month: 1, + day: 1, + isDate: true + }); + var dow = t3.dayOfWeek(); + var wkst = aWeekStart || ICAL3.Time.DEFAULT_WEEK_START; + if (dow > ICAL3.Time.THURSDAY) { + t3.day += 7; + } + if (wkst > ICAL3.Time.THURSDAY) { + t3.day -= 7; + } + t3.day -= dow - wkst; + return t3; + }; + ICAL3.Time.getDominicalLetter = function(yr) { + var LTRS = "GFEDCBA"; + var dom = (yr + (yr / 4 | 0) + (yr / 400 | 0) - (yr / 100 | 0) - 1) % 7; + var isLeap = ICAL3.Time.isLeapYear(yr); + if (isLeap) { + return LTRS[(dom + 6) % 7] + LTRS[dom]; + } else { + return LTRS[dom]; + } + }; + ICAL3.Time.epochTime = ICAL3.Time.fromData({ + year: 1970, + month: 1, + day: 1, + hour: 0, + minute: 0, + second: 0, + isDate: false, + timezone: "Z" + }); + ICAL3.Time._cmp_attr = function _cmp_attr(a3, b3, attr) { + if (a3[attr] > b3[attr]) + return 1; + if (a3[attr] < b3[attr]) + return -1; + return 0; + }; + ICAL3.Time.daysInYearPassedMonth = [ + [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365], + [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366] + ]; + ICAL3.Time.SUNDAY = 1; + ICAL3.Time.MONDAY = 2; + ICAL3.Time.TUESDAY = 3; + ICAL3.Time.WEDNESDAY = 4; + ICAL3.Time.THURSDAY = 5; + ICAL3.Time.FRIDAY = 6; + ICAL3.Time.SATURDAY = 7; + ICAL3.Time.DEFAULT_WEEK_START = ICAL3.Time.MONDAY; + })(); + (function() { + ICAL3.VCardTime = function(data, zone, icaltype) { + this.wrappedJSObject = this; + var time = this._time = Object.create(null); + time.year = null; + time.month = null; + time.day = null; + time.hour = null; + time.minute = null; + time.second = null; + this.icaltype = icaltype || "date-and-or-time"; + this.fromData(data, zone); + }; + ICAL3.helpers.inherits(ICAL3.Time, ICAL3.VCardTime, { + icalclass: "vcardtime", + icaltype: "date-and-or-time", + zone: null, + clone: function() { + return new ICAL3.VCardTime(this._time, this.zone, this.icaltype); + }, + _normalize: function() { + return this; + }, + utcOffset: function() { + if (this.zone instanceof ICAL3.UtcOffset) { + return this.zone.toSeconds(); + } else { + return ICAL3.Time.prototype.utcOffset.apply(this, arguments); + } + }, + toICALString: function() { + return ICAL3.design.vcard.value[this.icaltype].toICAL(this.toString()); + }, + toString: function toString() { + var p22 = ICAL3.helpers.pad2; + var y3 = this.year, m2 = this.month, d3 = this.day; + var h3 = this.hour, mm = this.minute, s3 = this.second; + var hasYear = y3 !== null, hasMonth = m2 !== null, hasDay = d3 !== null; + var hasHour = h3 !== null, hasMinute = mm !== null, hasSecond = s3 !== null; + var datepart = (hasYear ? p22(y3) + (hasMonth || hasDay ? "-" : "") : hasMonth || hasDay ? "--" : "") + (hasMonth ? p22(m2) : "") + (hasDay ? "-" + p22(d3) : ""); + var timepart = (hasHour ? p22(h3) : "-") + (hasHour && hasMinute ? ":" : "") + (hasMinute ? p22(mm) : "") + (!hasHour && !hasMinute ? "-" : "") + (hasMinute && hasSecond ? ":" : "") + (hasSecond ? p22(s3) : ""); + var zone; + if (this.zone === ICAL3.Timezone.utcTimezone) { + zone = "Z"; + } else if (this.zone instanceof ICAL3.UtcOffset) { + zone = this.zone.toString(); + } else if (this.zone === ICAL3.Timezone.localTimezone) { + zone = ""; + } else if (this.zone instanceof ICAL3.Timezone) { + var offset = ICAL3.UtcOffset.fromSeconds(this.zone.utcOffset(this)); + zone = offset.toString(); + } else { + zone = ""; + } + switch (this.icaltype) { + case "time": + return timepart + zone; + case "date-and-or-time": + case "date-time": + return datepart + (timepart == "--" ? "" : "T" + timepart + zone); + case "date": + return datepart; + } + return null; + } + }); + ICAL3.VCardTime.fromDateAndOrTimeString = function(aValue, aIcalType) { + function part(v3, s3, e3) { + return v3 ? ICAL3.helpers.strictParseInt(v3.substr(s3, e3)) : null; + } + var parts = aValue.split("T"); + var dt = parts[0], tmz = parts[1]; + var splitzone = tmz ? ICAL3.design.vcard.value.time._splitZone(tmz) : []; + var zone = splitzone[0], tm = splitzone[1]; + var stoi = ICAL3.helpers.strictParseInt; + var dtlen = dt ? dt.length : 0; + var tmlen = tm ? tm.length : 0; + var hasDashDate = dt && dt[0] == "-" && dt[1] == "-"; + var hasDashTime = tm && tm[0] == "-"; + var o2 = { + year: hasDashDate ? null : part(dt, 0, 4), + month: hasDashDate && (dtlen == 4 || dtlen == 7) ? part(dt, 2, 2) : dtlen == 7 ? part(dt, 5, 2) : dtlen == 10 ? part(dt, 5, 2) : null, + day: dtlen == 5 ? part(dt, 3, 2) : dtlen == 7 && hasDashDate ? part(dt, 5, 2) : dtlen == 10 ? part(dt, 8, 2) : null, + hour: hasDashTime ? null : part(tm, 0, 2), + minute: hasDashTime && tmlen == 3 ? part(tm, 1, 2) : tmlen > 4 ? hasDashTime ? part(tm, 1, 2) : part(tm, 3, 2) : null, + second: tmlen == 4 ? part(tm, 2, 2) : tmlen == 6 ? part(tm, 4, 2) : tmlen == 8 ? part(tm, 6, 2) : null + }; + if (zone == "Z") { + zone = ICAL3.Timezone.utcTimezone; + } else if (zone && zone[3] == ":") { + zone = ICAL3.UtcOffset.fromString(zone); + } else { + zone = null; + } + return new ICAL3.VCardTime(o2, zone, aIcalType); + }; + })(); + (function() { + var DOW_MAP = { + SU: ICAL3.Time.SUNDAY, + MO: ICAL3.Time.MONDAY, + TU: ICAL3.Time.TUESDAY, + WE: ICAL3.Time.WEDNESDAY, + TH: ICAL3.Time.THURSDAY, + FR: ICAL3.Time.FRIDAY, + SA: ICAL3.Time.SATURDAY + }; + var REVERSE_DOW_MAP = {}; + for (var key in DOW_MAP) { + if (DOW_MAP.hasOwnProperty(key)) { + REVERSE_DOW_MAP[DOW_MAP[key]] = key; + } + } + var COPY_PARTS = [ + "BYSECOND", + "BYMINUTE", + "BYHOUR", + "BYDAY", + "BYMONTHDAY", + "BYYEARDAY", + "BYWEEKNO", + "BYMONTH", + "BYSETPOS" + ]; + ICAL3.Recur = function icalrecur(data) { + this.wrappedJSObject = this; + this.parts = {}; + if (data && typeof data === "object") { + this.fromData(data); + } + }; + ICAL3.Recur.prototype = { + parts: null, + interval: 1, + wkst: ICAL3.Time.MONDAY, + until: null, + count: null, + freq: null, + icalclass: "icalrecur", + icaltype: "recur", + iterator: function(aStart) { + return new ICAL3.RecurIterator({ + rule: this, + dtstart: aStart + }); + }, + clone: function clone() { + return new ICAL3.Recur(this.toJSON()); + }, + isFinite: function isfinite() { + return !!(this.count || this.until); + }, + isByCount: function isbycount() { + return !!(this.count && !this.until); + }, + addComponent: function addPart(aType, aValue) { + var ucname = aType.toUpperCase(); + if (ucname in this.parts) { + this.parts[ucname].push(aValue); + } else { + this.parts[ucname] = [aValue]; + } + }, + setComponent: function setComponent(aType, aValues) { + this.parts[aType.toUpperCase()] = aValues.slice(); + }, + getComponent: function getComponent(aType) { + var ucname = aType.toUpperCase(); + return ucname in this.parts ? this.parts[ucname].slice() : []; + }, + getNextOccurrence: function getNextOccurrence(aStartTime, aRecurrenceId) { + var iter = this.iterator(aStartTime); + var next, cdt; + do { + next = iter.next(); + } while (next && next.compare(aRecurrenceId) <= 0); + if (next && aRecurrenceId.zone) { + next.zone = aRecurrenceId.zone; + } + return next; + }, + fromData: function(data) { + for (var key2 in data) { + var uckey = key2.toUpperCase(); + if (uckey in partDesign) { + if (Array.isArray(data[key2])) { + this.parts[uckey] = data[key2]; + } else { + this.parts[uckey] = [data[key2]]; + } + } else { + this[key2] = data[key2]; + } + } + if (this.interval && typeof this.interval != "number") { + optionDesign.INTERVAL(this.interval, this); + } + if (this.wkst && typeof this.wkst != "number") { + this.wkst = ICAL3.Recur.icalDayToNumericDay(this.wkst); + } + if (this.until && !(this.until instanceof ICAL3.Time)) { + this.until = ICAL3.Time.fromString(this.until); + } + }, + toJSON: function() { + var res = Object.create(null); + res.freq = this.freq; + if (this.count) { + res.count = this.count; + } + if (this.interval > 1) { + res.interval = this.interval; + } + for (var k2 in this.parts) { + if (!this.parts.hasOwnProperty(k2)) { + continue; + } + var kparts = this.parts[k2]; + if (Array.isArray(kparts) && kparts.length == 1) { + res[k2.toLowerCase()] = kparts[0]; + } else { + res[k2.toLowerCase()] = ICAL3.helpers.clone(this.parts[k2]); + } + } + if (this.until) { + res.until = this.until.toString(); + } + if ("wkst" in this && this.wkst !== ICAL3.Time.DEFAULT_WEEK_START) { + res.wkst = ICAL3.Recur.numericDayToIcalDay(this.wkst); + } + return res; + }, + toString: function icalrecur_toString() { + var str = "FREQ=" + this.freq; + if (this.count) { + str += ";COUNT=" + this.count; + } + if (this.interval > 1) { + str += ";INTERVAL=" + this.interval; + } + for (var k2 in this.parts) { + if (this.parts.hasOwnProperty(k2)) { + str += ";" + k2 + "=" + this.parts[k2]; + } + } + if (this.until) { + str += ";UNTIL=" + this.until.toICALString(); + } + if ("wkst" in this && this.wkst !== ICAL3.Time.DEFAULT_WEEK_START) { + str += ";WKST=" + ICAL3.Recur.numericDayToIcalDay(this.wkst); + } + return str; + } + }; + function parseNumericValue(type, min, max, value) { + var result = value; + if (value[0] === "+") { + result = value.substr(1); + } + result = ICAL3.helpers.strictParseInt(result); + if (min !== void 0 && value < min) { + throw new Error(type + ': invalid value "' + value + '" must be > ' + min); + } + if (max !== void 0 && value > max) { + throw new Error(type + ': invalid value "' + value + '" must be < ' + min); + } + return result; + } + ICAL3.Recur.icalDayToNumericDay = function toNumericDay(string, aWeekStart) { + var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + return (DOW_MAP[string] - firstDow + 7) % 7 + 1; + }; + ICAL3.Recur.numericDayToIcalDay = function toIcalDay(num, aWeekStart) { + var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + var dow = num + firstDow - ICAL3.Time.SUNDAY; + if (dow > 7) { + dow -= 7; + } + return REVERSE_DOW_MAP[dow]; + }; + var VALID_DAY_NAMES = /^(SU|MO|TU|WE|TH|FR|SA)$/; + var VALID_BYDAY_PART = /^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/; + var ALLOWED_FREQ = [ + "SECONDLY", + "MINUTELY", + "HOURLY", + "DAILY", + "WEEKLY", + "MONTHLY", + "YEARLY" + ]; + var optionDesign = { + FREQ: function(value, dict, fmtIcal) { + if (ALLOWED_FREQ.indexOf(value) !== -1) { + dict.freq = value; + } else { + throw new Error('invalid frequency "' + value + '" expected: "' + ALLOWED_FREQ.join(", ") + '"'); + } + }, + COUNT: function(value, dict, fmtIcal) { + dict.count = ICAL3.helpers.strictParseInt(value); + }, + INTERVAL: function(value, dict, fmtIcal) { + dict.interval = ICAL3.helpers.strictParseInt(value); + if (dict.interval < 1) { + dict.interval = 1; + } + }, + UNTIL: function(value, dict, fmtIcal) { + if (value.length > 10) { + dict.until = ICAL3.design.icalendar.value["date-time"].fromICAL(value); + } else { + dict.until = ICAL3.design.icalendar.value.date.fromICAL(value); + } + if (!fmtIcal) { + dict.until = ICAL3.Time.fromString(dict.until); + } + }, + WKST: function(value, dict, fmtIcal) { + if (VALID_DAY_NAMES.test(value)) { + dict.wkst = ICAL3.Recur.icalDayToNumericDay(value); + } else { + throw new Error('invalid WKST value "' + value + '"'); + } + } + }; + var partDesign = { + BYSECOND: parseNumericValue.bind(this, "BYSECOND", 0, 60), + BYMINUTE: parseNumericValue.bind(this, "BYMINUTE", 0, 59), + BYHOUR: parseNumericValue.bind(this, "BYHOUR", 0, 23), + BYDAY: function(value) { + if (VALID_BYDAY_PART.test(value)) { + return value; + } else { + throw new Error('invalid BYDAY value "' + value + '"'); + } + }, + BYMONTHDAY: parseNumericValue.bind(this, "BYMONTHDAY", -31, 31), + BYYEARDAY: parseNumericValue.bind(this, "BYYEARDAY", -366, 366), + BYWEEKNO: parseNumericValue.bind(this, "BYWEEKNO", -53, 53), + BYMONTH: parseNumericValue.bind(this, "BYMONTH", 1, 12), + BYSETPOS: parseNumericValue.bind(this, "BYSETPOS", -366, 366) + }; + ICAL3.Recur.fromString = function(string) { + var data = ICAL3.Recur._stringToData(string, false); + return new ICAL3.Recur(data); + }; + ICAL3.Recur.fromData = function(aData) { + return new ICAL3.Recur(aData); + }; + ICAL3.Recur._stringToData = function(string, fmtIcal) { + var dict = Object.create(null); + var values = string.split(";"); + var len = values.length; + for (var i3 = 0; i3 < len; i3++) { + var parts = values[i3].split("="); + var ucname = parts[0].toUpperCase(); + var lcname = parts[0].toLowerCase(); + var name = fmtIcal ? lcname : ucname; + var value = parts[1]; + if (ucname in partDesign) { + var partArr = value.split(","); + var partArrIdx = 0; + var partArrLen = partArr.length; + for (; partArrIdx < partArrLen; partArrIdx++) { + partArr[partArrIdx] = partDesign[ucname](partArr[partArrIdx]); + } + dict[name] = partArr.length == 1 ? partArr[0] : partArr; + } else if (ucname in optionDesign) { + optionDesign[ucname](value, dict, fmtIcal); + } else { + dict[lcname] = value; + } + } + return dict; + }; + })(); + ICAL3.RecurIterator = function() { + function icalrecur_iterator(options) { + this.fromData(options); + } + icalrecur_iterator.prototype = { + completed: false, + rule: null, + dtstart: null, + last: null, + occurrence_number: 0, + by_indices: null, + initialized: false, + by_data: null, + days: null, + days_index: 0, + fromData: function(options) { + this.rule = ICAL3.helpers.formatClassType(options.rule, ICAL3.Recur); + if (!this.rule) { + throw new Error("iterator requires a (ICAL.Recur) rule"); + } + this.dtstart = ICAL3.helpers.formatClassType(options.dtstart, ICAL3.Time); + if (!this.dtstart) { + throw new Error("iterator requires a (ICAL.Time) dtstart"); + } + if (options.by_data) { + this.by_data = options.by_data; + } else { + this.by_data = ICAL3.helpers.clone(this.rule.parts, true); + } + if (options.occurrence_number) + this.occurrence_number = options.occurrence_number; + this.days = options.days || []; + if (options.last) { + this.last = ICAL3.helpers.formatClassType(options.last, ICAL3.Time); + } + this.by_indices = options.by_indices; + if (!this.by_indices) { + this.by_indices = { + "BYSECOND": 0, + "BYMINUTE": 0, + "BYHOUR": 0, + "BYDAY": 0, + "BYMONTH": 0, + "BYWEEKNO": 0, + "BYMONTHDAY": 0 + }; + } + this.initialized = options.initialized || false; + if (!this.initialized) { + this.init(); + } + }, + init: function icalrecur_iterator_init() { + this.initialized = true; + this.last = this.dtstart.clone(); + var parts = this.by_data; + if ("BYDAY" in parts) { + this.sort_byday_rules(parts.BYDAY); + } + if ("BYYEARDAY" in parts) { + if ("BYMONTH" in parts || "BYWEEKNO" in parts || "BYMONTHDAY" in parts || "BYDAY" in parts) { + throw new Error("Invalid BYYEARDAY rule"); + } + } + if ("BYWEEKNO" in parts && "BYMONTHDAY" in parts) { + throw new Error("BYWEEKNO does not fit to BYMONTHDAY"); + } + if (this.rule.freq == "MONTHLY" && ("BYYEARDAY" in parts || "BYWEEKNO" in parts)) { + throw new Error("For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear"); + } + if (this.rule.freq == "WEEKLY" && ("BYYEARDAY" in parts || "BYMONTHDAY" in parts)) { + throw new Error("For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear"); + } + if (this.rule.freq != "YEARLY" && "BYYEARDAY" in parts) { + throw new Error("BYYEARDAY may only appear in YEARLY rules"); + } + this.last.second = this.setup_defaults("BYSECOND", "SECONDLY", this.dtstart.second); + this.last.minute = this.setup_defaults("BYMINUTE", "MINUTELY", this.dtstart.minute); + this.last.hour = this.setup_defaults("BYHOUR", "HOURLY", this.dtstart.hour); + this.last.day = this.setup_defaults("BYMONTHDAY", "DAILY", this.dtstart.day); + this.last.month = this.setup_defaults("BYMONTH", "MONTHLY", this.dtstart.month); + if (this.rule.freq == "WEEKLY") { + if ("BYDAY" in parts) { + var bydayParts = this.ruleDayOfWeek(parts.BYDAY[0], this.rule.wkst); + var pos = bydayParts[0]; + var dow = bydayParts[1]; + var wkdy = dow - this.last.dayOfWeek(this.rule.wkst); + if (this.last.dayOfWeek(this.rule.wkst) < dow && wkdy >= 0 || wkdy < 0) { + this.last.day += wkdy; + } + } else { + var dayName = ICAL3.Recur.numericDayToIcalDay(this.dtstart.dayOfWeek()); + parts.BYDAY = [dayName]; + } + } + if (this.rule.freq == "YEARLY") { + for (; ; ) { + this.expand_year_days(this.last.year); + if (this.days.length > 0) { + break; + } + this.increment_year(this.rule.interval); + } + this._nextByYearDay(); + } + if (this.rule.freq == "MONTHLY" && this.has_by_data("BYDAY")) { + var tempLast = null; + var initLast = this.last.clone(); + var daysInMonth = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + for (var i3 in this.by_data.BYDAY) { + if (!this.by_data.BYDAY.hasOwnProperty(i3)) { + continue; + } + this.last = initLast.clone(); + var bydayParts = this.ruleDayOfWeek(this.by_data.BYDAY[i3]); + var pos = bydayParts[0]; + var dow = bydayParts[1]; + var dayOfMonth = this.last.nthWeekDay(dow, pos); + if (pos >= 6 || pos <= -6) { + throw new Error("Malformed values in BYDAY part"); + } + if (dayOfMonth > daysInMonth || dayOfMonth <= 0) { + if (tempLast && tempLast.month == initLast.month) { + continue; + } + while (dayOfMonth > daysInMonth || dayOfMonth <= 0) { + this.increment_month(); + daysInMonth = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + dayOfMonth = this.last.nthWeekDay(dow, pos); + } + } + this.last.day = dayOfMonth; + if (!tempLast || this.last.compare(tempLast) < 0) { + tempLast = this.last.clone(); + } + } + this.last = tempLast.clone(); + if (this.has_by_data("BYMONTHDAY")) { + this._byDayAndMonthDay(true); + } + if (this.last.day > daysInMonth || this.last.day == 0) { + throw new Error("Malformed values in BYDAY part"); + } + } else if (this.has_by_data("BYMONTHDAY")) { + if (this.last.day < 0) { + var daysInMonth = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + this.last.day = daysInMonth + this.last.day + 1; + } + } + }, + next: function icalrecur_iterator_next() { + var before = this.last ? this.last.clone() : null; + if (this.rule.count && this.occurrence_number >= this.rule.count || this.rule.until && this.last.compare(this.rule.until) > 0) { + this.completed = true; + return null; + } + if (this.occurrence_number == 0 && this.last.compare(this.dtstart) >= 0) { + this.occurrence_number++; + return this.last; + } + var valid; + do { + valid = 1; + switch (this.rule.freq) { + case "SECONDLY": + this.next_second(); + break; + case "MINUTELY": + this.next_minute(); + break; + case "HOURLY": + this.next_hour(); + break; + case "DAILY": + this.next_day(); + break; + case "WEEKLY": + this.next_week(); + break; + case "MONTHLY": + valid = this.next_month(); + break; + case "YEARLY": + this.next_year(); + break; + default: + return null; + } + } while (!this.check_contracting_rules() || this.last.compare(this.dtstart) < 0 || !valid); + if (this.last.compare(before) == 0) { + throw new Error("Same occurrence found twice, protecting you from death by recursion"); + } + if (this.rule.until && this.last.compare(this.rule.until) > 0) { + this.completed = true; + return null; + } else { + this.occurrence_number++; + return this.last; + } + }, + next_second: function next_second() { + return this.next_generic("BYSECOND", "SECONDLY", "second", "minute"); + }, + increment_second: function increment_second(inc) { + return this.increment_generic(inc, "second", 60, "minute"); + }, + next_minute: function next_minute() { + return this.next_generic("BYMINUTE", "MINUTELY", "minute", "hour", "next_second"); + }, + increment_minute: function increment_minute(inc) { + return this.increment_generic(inc, "minute", 60, "hour"); + }, + next_hour: function next_hour() { + return this.next_generic("BYHOUR", "HOURLY", "hour", "monthday", "next_minute"); + }, + increment_hour: function increment_hour(inc) { + this.increment_generic(inc, "hour", 24, "monthday"); + }, + next_day: function next_day() { + var has_by_day = "BYDAY" in this.by_data; + var this_freq = this.rule.freq == "DAILY"; + if (this.next_hour() == 0) { + return 0; + } + if (this_freq) { + this.increment_monthday(this.rule.interval); + } else { + this.increment_monthday(1); + } + return 0; + }, + next_week: function next_week() { + var end_of_data = 0; + if (this.next_weekday_by_week() == 0) { + return end_of_data; + } + if (this.has_by_data("BYWEEKNO")) { + var idx = ++this.by_indices.BYWEEKNO; + if (this.by_indices.BYWEEKNO == this.by_data.BYWEEKNO.length) { + this.by_indices.BYWEEKNO = 0; + end_of_data = 1; + } + this.last.month = 1; + this.last.day = 1; + var week_no = this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO]; + this.last.day += 7 * week_no; + if (end_of_data) { + this.increment_year(1); + } + } else { + this.increment_monthday(7 * this.rule.interval); + } + return end_of_data; + }, + normalizeByMonthDayRules: function(year, month, rules) { + var daysInMonth = ICAL3.Time.daysInMonth(month, year); + var newRules = []; + var ruleIdx = 0; + var len = rules.length; + var rule; + for (; ruleIdx < len; ruleIdx++) { + rule = rules[ruleIdx]; + if (Math.abs(rule) > daysInMonth) { + continue; + } + if (rule < 0) { + rule = daysInMonth + (rule + 1); + } else if (rule === 0) { + continue; + } + if (newRules.indexOf(rule) === -1) { + newRules.push(rule); + } + } + return newRules.sort(function(a3, b3) { + return a3 - b3; + }); + }, + _byDayAndMonthDay: function(isInit) { + var byMonthDay; + var byDay = this.by_data.BYDAY; + var date; + var dateIdx = 0; + var dateLen; + var dayLen = byDay.length; + var dataIsValid = 0; + var daysInMonth; + var self2 = this; + var lastDay = this.last.day; + function initMonth() { + daysInMonth = ICAL3.Time.daysInMonth(self2.last.month, self2.last.year); + byMonthDay = self2.normalizeByMonthDayRules(self2.last.year, self2.last.month, self2.by_data.BYMONTHDAY); + dateLen = byMonthDay.length; + while (byMonthDay[dateIdx] <= lastDay && !(isInit && byMonthDay[dateIdx] == lastDay) && dateIdx < dateLen - 1) { + dateIdx++; + } + } + function nextMonth() { + lastDay = 0; + self2.increment_month(); + dateIdx = 0; + initMonth(); + } + initMonth(); + if (isInit) { + lastDay -= 1; + } + var monthsCounter = 48; + while (!dataIsValid && monthsCounter) { + monthsCounter--; + date = lastDay + 1; + if (date > daysInMonth) { + nextMonth(); + continue; + } + var next = byMonthDay[dateIdx++]; + if (next >= date) { + lastDay = next; + } else { + nextMonth(); + continue; + } + for (var dayIdx = 0; dayIdx < dayLen; dayIdx++) { + var parts = this.ruleDayOfWeek(byDay[dayIdx]); + var pos = parts[0]; + var dow = parts[1]; + this.last.day = lastDay; + if (this.last.isNthWeekDay(dow, pos)) { + dataIsValid = 1; + break; + } + } + if (!dataIsValid && dateIdx === dateLen) { + nextMonth(); + continue; + } + } + if (monthsCounter <= 0) { + throw new Error("Malformed values in BYDAY combined with BYMONTHDAY parts"); + } + return dataIsValid; + }, + next_month: function next_month() { + var this_freq = this.rule.freq == "MONTHLY"; + var data_valid = 1; + if (this.next_hour() == 0) { + return data_valid; + } + if (this.has_by_data("BYDAY") && this.has_by_data("BYMONTHDAY")) { + data_valid = this._byDayAndMonthDay(); + } else if (this.has_by_data("BYDAY")) { + var daysInMonth = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + var setpos = 0; + var setpos_total = 0; + if (this.has_by_data("BYSETPOS")) { + var last_day = this.last.day; + for (var day = 1; day <= daysInMonth; day++) { + this.last.day = day; + if (this.is_day_in_byday(this.last)) { + setpos_total++; + if (day <= last_day) { + setpos++; + } + } + } + this.last.day = last_day; + } + data_valid = 0; + for (var day = this.last.day + 1; day <= daysInMonth; day++) { + this.last.day = day; + if (this.is_day_in_byday(this.last)) { + if (!this.has_by_data("BYSETPOS") || this.check_set_position(++setpos) || this.check_set_position(setpos - setpos_total - 1)) { + data_valid = 1; + break; + } + } + } + if (day > daysInMonth) { + this.last.day = 1; + this.increment_month(); + if (this.is_day_in_byday(this.last)) { + if (!this.has_by_data("BYSETPOS") || this.check_set_position(1)) { + data_valid = 1; + } + } else { + data_valid = 0; + } + } + } else if (this.has_by_data("BYMONTHDAY")) { + this.by_indices.BYMONTHDAY++; + if (this.by_indices.BYMONTHDAY >= this.by_data.BYMONTHDAY.length) { + this.by_indices.BYMONTHDAY = 0; + this.increment_month(); + } + var daysInMonth = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + var day = this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY]; + if (day < 0) { + day = daysInMonth + day + 1; + } + if (day > daysInMonth) { + this.last.day = 1; + data_valid = this.is_day_in_byday(this.last); + } else { + this.last.day = day; + } + } else { + this.increment_month(); + var daysInMonth = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + if (this.by_data.BYMONTHDAY[0] > daysInMonth) { + data_valid = 0; + } else { + this.last.day = this.by_data.BYMONTHDAY[0]; + } + } + return data_valid; + }, + next_weekday_by_week: function next_weekday_by_week() { + var end_of_data = 0; + if (this.next_hour() == 0) { + return end_of_data; + } + if (!this.has_by_data("BYDAY")) { + return 1; + } + for (; ; ) { + var tt = new ICAL3.Time(); + this.by_indices.BYDAY++; + if (this.by_indices.BYDAY == Object.keys(this.by_data.BYDAY).length) { + this.by_indices.BYDAY = 0; + end_of_data = 1; + } + var coded_day = this.by_data.BYDAY[this.by_indices.BYDAY]; + var parts = this.ruleDayOfWeek(coded_day); + var dow = parts[1]; + dow -= this.rule.wkst; + if (dow < 0) { + dow += 7; + } + tt.year = this.last.year; + tt.month = this.last.month; + tt.day = this.last.day; + var startOfWeek = tt.startDoyWeek(this.rule.wkst); + if (dow + startOfWeek < 1) { + if (!end_of_data) { + continue; + } + } + var next = ICAL3.Time.fromDayOfYear(startOfWeek + dow, this.last.year); + this.last.year = next.year; + this.last.month = next.month; + this.last.day = next.day; + return end_of_data; + } + }, + next_year: function next_year() { + if (this.next_hour() == 0) { + return 0; + } + if (++this.days_index == this.days.length) { + this.days_index = 0; + do { + this.increment_year(this.rule.interval); + this.expand_year_days(this.last.year); + } while (this.days.length == 0); + } + this._nextByYearDay(); + return 1; + }, + _nextByYearDay: function _nextByYearDay() { + var doy = this.days[this.days_index]; + var year = this.last.year; + if (doy < 1) { + doy += 1; + year += 1; + } + var next = ICAL3.Time.fromDayOfYear(doy, year); + this.last.day = next.day; + this.last.month = next.month; + }, + ruleDayOfWeek: function ruleDayOfWeek(dow, aWeekStart) { + var matches = dow.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/); + if (matches) { + var pos = parseInt(matches[1] || 0, 10); + dow = ICAL3.Recur.icalDayToNumericDay(matches[2], aWeekStart); + return [pos, dow]; + } else { + return [0, 0]; + } + }, + next_generic: function next_generic(aRuleType, aInterval, aDateAttr, aFollowingAttr, aPreviousIncr) { + var has_by_rule = aRuleType in this.by_data; + var this_freq = this.rule.freq == aInterval; + var end_of_data = 0; + if (aPreviousIncr && this[aPreviousIncr]() == 0) { + return end_of_data; + } + if (has_by_rule) { + this.by_indices[aRuleType]++; + var idx = this.by_indices[aRuleType]; + var dta = this.by_data[aRuleType]; + if (this.by_indices[aRuleType] == dta.length) { + this.by_indices[aRuleType] = 0; + end_of_data = 1; + } + this.last[aDateAttr] = dta[this.by_indices[aRuleType]]; + } else if (this_freq) { + this["increment_" + aDateAttr](this.rule.interval); + } + if (has_by_rule && end_of_data && this_freq) { + this["increment_" + aFollowingAttr](1); + } + return end_of_data; + }, + increment_monthday: function increment_monthday(inc) { + for (var i3 = 0; i3 < inc; i3++) { + var daysInMonth = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + this.last.day++; + if (this.last.day > daysInMonth) { + this.last.day -= daysInMonth; + this.increment_month(); + } + } + }, + increment_month: function increment_month() { + this.last.day = 1; + if (this.has_by_data("BYMONTH")) { + this.by_indices.BYMONTH++; + if (this.by_indices.BYMONTH == this.by_data.BYMONTH.length) { + this.by_indices.BYMONTH = 0; + this.increment_year(1); + } + this.last.month = this.by_data.BYMONTH[this.by_indices.BYMONTH]; + } else { + if (this.rule.freq == "MONTHLY") { + this.last.month += this.rule.interval; + } else { + this.last.month++; + } + this.last.month--; + var years = ICAL3.helpers.trunc(this.last.month / 12); + this.last.month %= 12; + this.last.month++; + if (years != 0) { + this.increment_year(years); + } + } + }, + increment_year: function increment_year(inc) { + this.last.year += inc; + }, + increment_generic: function increment_generic(inc, aDateAttr, aFactor, aNextIncrement) { + this.last[aDateAttr] += inc; + var nextunit = ICAL3.helpers.trunc(this.last[aDateAttr] / aFactor); + this.last[aDateAttr] %= aFactor; + if (nextunit != 0) { + this["increment_" + aNextIncrement](nextunit); + } + }, + has_by_data: function has_by_data(aRuleType) { + return aRuleType in this.rule.parts; + }, + expand_year_days: function expand_year_days(aYear) { + var t3 = new ICAL3.Time(); + this.days = []; + var parts = {}; + var rules = ["BYDAY", "BYWEEKNO", "BYMONTHDAY", "BYMONTH", "BYYEARDAY"]; + for (var p3 in rules) { + if (rules.hasOwnProperty(p3)) { + var part = rules[p3]; + if (part in this.rule.parts) { + parts[part] = this.rule.parts[part]; + } + } + } + if ("BYMONTH" in parts && "BYWEEKNO" in parts) { + var valid = 1; + var validWeeks = {}; + t3.year = aYear; + t3.isDate = true; + for (var monthIdx = 0; monthIdx < this.by_data.BYMONTH.length; monthIdx++) { + var month = this.by_data.BYMONTH[monthIdx]; + t3.month = month; + t3.day = 1; + var first_week = t3.weekNumber(this.rule.wkst); + t3.day = ICAL3.Time.daysInMonth(month, aYear); + var last_week = t3.weekNumber(this.rule.wkst); + for (monthIdx = first_week; monthIdx < last_week; monthIdx++) { + validWeeks[monthIdx] = 1; + } + } + for (var weekIdx = 0; weekIdx < this.by_data.BYWEEKNO.length && valid; weekIdx++) { + var weekno = this.by_data.BYWEEKNO[weekIdx]; + if (weekno < 52) { + valid &= validWeeks[weekIdx]; + } else { + valid = 0; + } + } + if (valid) { + delete parts.BYMONTH; + } else { + delete parts.BYWEEKNO; + } + } + var partCount = Object.keys(parts).length; + if (partCount == 0) { + var t1 = this.dtstart.clone(); + t1.year = this.last.year; + this.days.push(t1.dayOfYear()); + } else if (partCount == 1 && "BYMONTH" in parts) { + for (var monthkey in this.by_data.BYMONTH) { + if (!this.by_data.BYMONTH.hasOwnProperty(monthkey)) { + continue; + } + var t22 = this.dtstart.clone(); + t22.year = aYear; + t22.month = this.by_data.BYMONTH[monthkey]; + t22.isDate = true; + this.days.push(t22.dayOfYear()); + } + } else if (partCount == 1 && "BYMONTHDAY" in parts) { + for (var monthdaykey in this.by_data.BYMONTHDAY) { + if (!this.by_data.BYMONTHDAY.hasOwnProperty(monthdaykey)) { + continue; + } + var t32 = this.dtstart.clone(); + var day_ = this.by_data.BYMONTHDAY[monthdaykey]; + if (day_ < 0) { + var daysInMonth = ICAL3.Time.daysInMonth(t32.month, aYear); + day_ = day_ + daysInMonth + 1; + } + t32.day = day_; + t32.year = aYear; + t32.isDate = true; + this.days.push(t32.dayOfYear()); + } + } else if (partCount == 2 && "BYMONTHDAY" in parts && "BYMONTH" in parts) { + for (var monthkey in this.by_data.BYMONTH) { + if (!this.by_data.BYMONTH.hasOwnProperty(monthkey)) { + continue; + } + var month_ = this.by_data.BYMONTH[monthkey]; + var daysInMonth = ICAL3.Time.daysInMonth(month_, aYear); + for (var monthdaykey in this.by_data.BYMONTHDAY) { + if (!this.by_data.BYMONTHDAY.hasOwnProperty(monthdaykey)) { + continue; + } + var day_ = this.by_data.BYMONTHDAY[monthdaykey]; + if (day_ < 0) { + day_ = day_ + daysInMonth + 1; + } + t3.day = day_; + t3.month = month_; + t3.year = aYear; + t3.isDate = true; + this.days.push(t3.dayOfYear()); + } + } + } else if (partCount == 1 && "BYWEEKNO" in parts) { + } else if (partCount == 2 && "BYWEEKNO" in parts && "BYMONTHDAY" in parts) { + } else if (partCount == 1 && "BYDAY" in parts) { + this.days = this.days.concat(this.expand_by_day(aYear)); + } else if (partCount == 2 && "BYDAY" in parts && "BYMONTH" in parts) { + for (var monthkey in this.by_data.BYMONTH) { + if (!this.by_data.BYMONTH.hasOwnProperty(monthkey)) { + continue; + } + var month = this.by_data.BYMONTH[monthkey]; + var daysInMonth = ICAL3.Time.daysInMonth(month, aYear); + t3.year = aYear; + t3.month = this.by_data.BYMONTH[monthkey]; + t3.day = 1; + t3.isDate = true; + var first_dow = t3.dayOfWeek(); + var doy_offset = t3.dayOfYear() - 1; + t3.day = daysInMonth; + var last_dow = t3.dayOfWeek(); + if (this.has_by_data("BYSETPOS")) { + var set_pos_counter = 0; + var by_month_day = []; + for (var day = 1; day <= daysInMonth; day++) { + t3.day = day; + if (this.is_day_in_byday(t3)) { + by_month_day.push(day); + } + } + for (var spIndex = 0; spIndex < by_month_day.length; spIndex++) { + if (this.check_set_position(spIndex + 1) || this.check_set_position(spIndex - by_month_day.length)) { + this.days.push(doy_offset + by_month_day[spIndex]); + } + } + } else { + for (var daycodedkey in this.by_data.BYDAY) { + if (!this.by_data.BYDAY.hasOwnProperty(daycodedkey)) { + continue; + } + var coded_day = this.by_data.BYDAY[daycodedkey]; + var bydayParts = this.ruleDayOfWeek(coded_day); + var pos = bydayParts[0]; + var dow = bydayParts[1]; + var month_day; + var first_matching_day = (dow + 7 - first_dow) % 7 + 1; + var last_matching_day = daysInMonth - (last_dow + 7 - dow) % 7; + if (pos == 0) { + for (var day = first_matching_day; day <= daysInMonth; day += 7) { + this.days.push(doy_offset + day); + } + } else if (pos > 0) { + month_day = first_matching_day + (pos - 1) * 7; + if (month_day <= daysInMonth) { + this.days.push(doy_offset + month_day); + } + } else { + month_day = last_matching_day + (pos + 1) * 7; + if (month_day > 0) { + this.days.push(doy_offset + month_day); + } + } + } + } + } + this.days.sort(function(a3, b3) { + return a3 - b3; + }); + } else if (partCount == 2 && "BYDAY" in parts && "BYMONTHDAY" in parts) { + var expandedDays = this.expand_by_day(aYear); + for (var daykey in expandedDays) { + if (!expandedDays.hasOwnProperty(daykey)) { + continue; + } + var day = expandedDays[daykey]; + var tt = ICAL3.Time.fromDayOfYear(day, aYear); + if (this.by_data.BYMONTHDAY.indexOf(tt.day) >= 0) { + this.days.push(day); + } + } + } else if (partCount == 3 && "BYDAY" in parts && "BYMONTHDAY" in parts && "BYMONTH" in parts) { + var expandedDays = this.expand_by_day(aYear); + for (var daykey in expandedDays) { + if (!expandedDays.hasOwnProperty(daykey)) { + continue; + } + var day = expandedDays[daykey]; + var tt = ICAL3.Time.fromDayOfYear(day, aYear); + if (this.by_data.BYMONTH.indexOf(tt.month) >= 0 && this.by_data.BYMONTHDAY.indexOf(tt.day) >= 0) { + this.days.push(day); + } + } + } else if (partCount == 2 && "BYDAY" in parts && "BYWEEKNO" in parts) { + var expandedDays = this.expand_by_day(aYear); + for (var daykey in expandedDays) { + if (!expandedDays.hasOwnProperty(daykey)) { + continue; + } + var day = expandedDays[daykey]; + var tt = ICAL3.Time.fromDayOfYear(day, aYear); + var weekno = tt.weekNumber(this.rule.wkst); + if (this.by_data.BYWEEKNO.indexOf(weekno)) { + this.days.push(day); + } + } + } else if (partCount == 3 && "BYDAY" in parts && "BYWEEKNO" in parts && "BYMONTHDAY" in parts) { + } else if (partCount == 1 && "BYYEARDAY" in parts) { + this.days = this.days.concat(this.by_data.BYYEARDAY); + } else { + this.days = []; + } + return 0; + }, + expand_by_day: function expand_by_day(aYear) { + var days_list = []; + var tmp = this.last.clone(); + tmp.year = aYear; + tmp.month = 1; + tmp.day = 1; + tmp.isDate = true; + var start_dow = tmp.dayOfWeek(); + tmp.month = 12; + tmp.day = 31; + tmp.isDate = true; + var end_dow = tmp.dayOfWeek(); + var end_year_day = tmp.dayOfYear(); + for (var daykey in this.by_data.BYDAY) { + if (!this.by_data.BYDAY.hasOwnProperty(daykey)) { + continue; + } + var day = this.by_data.BYDAY[daykey]; + var parts = this.ruleDayOfWeek(day); + var pos = parts[0]; + var dow = parts[1]; + if (pos == 0) { + var tmp_start_doy = (dow + 7 - start_dow) % 7 + 1; + for (var doy = tmp_start_doy; doy <= end_year_day; doy += 7) { + days_list.push(doy); + } + } else if (pos > 0) { + var first; + if (dow >= start_dow) { + first = dow - start_dow + 1; + } else { + first = dow - start_dow + 8; + } + days_list.push(first + (pos - 1) * 7); + } else { + var last; + pos = -pos; + if (dow <= end_dow) { + last = end_year_day - end_dow + dow; + } else { + last = end_year_day - end_dow + dow - 7; + } + days_list.push(last - (pos - 1) * 7); + } + } + return days_list; + }, + is_day_in_byday: function is_day_in_byday(tt) { + for (var daykey in this.by_data.BYDAY) { + if (!this.by_data.BYDAY.hasOwnProperty(daykey)) { + continue; + } + var day = this.by_data.BYDAY[daykey]; + var parts = this.ruleDayOfWeek(day); + var pos = parts[0]; + var dow = parts[1]; + var this_dow = tt.dayOfWeek(); + if (pos == 0 && dow == this_dow || tt.nthWeekDay(dow, pos) == tt.day) { + return 1; + } + } + return 0; + }, + check_set_position: function check_set_position(aPos) { + if (this.has_by_data("BYSETPOS")) { + var idx = this.by_data.BYSETPOS.indexOf(aPos); + return idx !== -1; + } + return false; + }, + sort_byday_rules: function icalrecur_sort_byday_rules(aRules) { + for (var i3 = 0; i3 < aRules.length; i3++) { + for (var j4 = 0; j4 < i3; j4++) { + var one = this.ruleDayOfWeek(aRules[j4], this.rule.wkst)[1]; + var two = this.ruleDayOfWeek(aRules[i3], this.rule.wkst)[1]; + if (one > two) { + var tmp = aRules[i3]; + aRules[i3] = aRules[j4]; + aRules[j4] = tmp; + } + } + } + }, + check_contract_restriction: function check_contract_restriction(aRuleType, v3) { + var indexMapValue = icalrecur_iterator._indexMap[aRuleType]; + var ruleMapValue = icalrecur_iterator._expandMap[this.rule.freq][indexMapValue]; + var pass = false; + if (aRuleType in this.by_data && ruleMapValue == icalrecur_iterator.CONTRACT) { + var ruleType = this.by_data[aRuleType]; + for (var bydatakey in ruleType) { + if (ruleType.hasOwnProperty(bydatakey)) { + if (ruleType[bydatakey] == v3) { + pass = true; + break; + } + } + } + } else { + pass = true; + } + return pass; + }, + check_contracting_rules: function check_contracting_rules() { + var dow = this.last.dayOfWeek(); + var weekNo = this.last.weekNumber(this.rule.wkst); + var doy = this.last.dayOfYear(); + return this.check_contract_restriction("BYSECOND", this.last.second) && this.check_contract_restriction("BYMINUTE", this.last.minute) && this.check_contract_restriction("BYHOUR", this.last.hour) && this.check_contract_restriction("BYDAY", ICAL3.Recur.numericDayToIcalDay(dow)) && this.check_contract_restriction("BYWEEKNO", weekNo) && this.check_contract_restriction("BYMONTHDAY", this.last.day) && this.check_contract_restriction("BYMONTH", this.last.month) && this.check_contract_restriction("BYYEARDAY", doy); + }, + setup_defaults: function setup_defaults(aRuleType, req, deftime) { + var indexMapValue = icalrecur_iterator._indexMap[aRuleType]; + var ruleMapValue = icalrecur_iterator._expandMap[this.rule.freq][indexMapValue]; + if (ruleMapValue != icalrecur_iterator.CONTRACT) { + if (!(aRuleType in this.by_data)) { + this.by_data[aRuleType] = [deftime]; + } + if (this.rule.freq != req) { + return this.by_data[aRuleType][0]; + } + } + return deftime; + }, + toJSON: function() { + var result = Object.create(null); + result.initialized = this.initialized; + result.rule = this.rule.toJSON(); + result.dtstart = this.dtstart.toJSON(); + result.by_data = this.by_data; + result.days = this.days; + result.last = this.last.toJSON(); + result.by_indices = this.by_indices; + result.occurrence_number = this.occurrence_number; + return result; + } + }; + icalrecur_iterator._indexMap = { + "BYSECOND": 0, + "BYMINUTE": 1, + "BYHOUR": 2, + "BYDAY": 3, + "BYMONTHDAY": 4, + "BYYEARDAY": 5, + "BYWEEKNO": 6, + "BYMONTH": 7, + "BYSETPOS": 8 + }; + icalrecur_iterator._expandMap = { + "SECONDLY": [1, 1, 1, 1, 1, 1, 1, 1], + "MINUTELY": [2, 1, 1, 1, 1, 1, 1, 1], + "HOURLY": [2, 2, 1, 1, 1, 1, 1, 1], + "DAILY": [2, 2, 2, 1, 1, 1, 1, 1], + "WEEKLY": [2, 2, 2, 2, 3, 3, 1, 1], + "MONTHLY": [2, 2, 2, 2, 2, 3, 3, 1], + "YEARLY": [2, 2, 2, 2, 2, 2, 2, 2] + }; + icalrecur_iterator.UNKNOWN = 0; + icalrecur_iterator.CONTRACT = 1; + icalrecur_iterator.EXPAND = 2; + icalrecur_iterator.ILLEGAL = 3; + return icalrecur_iterator; + }(); + ICAL3.RecurExpansion = function() { + function formatTime(item) { + return ICAL3.helpers.formatClassType(item, ICAL3.Time); + } + function compareTime(a3, b3) { + return a3.compare(b3); + } + function isRecurringComponent(comp) { + return comp.hasProperty("rdate") || comp.hasProperty("rrule") || comp.hasProperty("recurrence-id"); + } + function RecurExpansion(options) { + this.ruleDates = []; + this.exDates = []; + this.fromData(options); + } + RecurExpansion.prototype = { + complete: false, + ruleIterators: null, + ruleDates: null, + exDates: null, + ruleDateInc: 0, + exDateInc: 0, + exDate: null, + ruleDate: null, + dtstart: null, + last: null, + fromData: function(options) { + var start = ICAL3.helpers.formatClassType(options.dtstart, ICAL3.Time); + if (!start) { + throw new Error(".dtstart (ICAL.Time) must be given"); + } else { + this.dtstart = start; + } + if (options.component) { + this._init(options.component); + } else { + this.last = formatTime(options.last) || start.clone(); + if (!options.ruleIterators) { + throw new Error(".ruleIterators or .component must be given"); + } + this.ruleIterators = options.ruleIterators.map(function(item) { + return ICAL3.helpers.formatClassType(item, ICAL3.RecurIterator); + }); + this.ruleDateInc = options.ruleDateInc; + this.exDateInc = options.exDateInc; + if (options.ruleDates) { + this.ruleDates = options.ruleDates.map(formatTime); + this.ruleDate = this.ruleDates[this.ruleDateInc]; + } + if (options.exDates) { + this.exDates = options.exDates.map(formatTime); + this.exDate = this.exDates[this.exDateInc]; + } + if (typeof options.complete !== "undefined") { + this.complete = options.complete; + } + } + }, + next: function() { + var iter; + var ruleOfDay; + var next; + var compare; + var maxTries = 500; + var currentTry = 0; + while (true) { + if (currentTry++ > maxTries) { + throw new Error("max tries have occured, rule may be impossible to forfill."); + } + next = this.ruleDate; + iter = this._nextRecurrenceIter(this.last); + if (!next && !iter) { + this.complete = true; + break; + } + if (!next || iter && next.compare(iter.last) > 0) { + next = iter.last.clone(); + iter.next(); + } + if (this.ruleDate === next) { + this._nextRuleDay(); + } + this.last = next; + if (this.exDate) { + compare = this.exDate.compare(this.last); + if (compare < 0) { + this._nextExDay(); + } + if (compare === 0) { + this._nextExDay(); + continue; + } + } + return this.last; + } + }, + toJSON: function() { + function toJSON(item) { + return item.toJSON(); + } + var result = Object.create(null); + result.ruleIterators = this.ruleIterators.map(toJSON); + if (this.ruleDates) { + result.ruleDates = this.ruleDates.map(toJSON); + } + if (this.exDates) { + result.exDates = this.exDates.map(toJSON); + } + result.ruleDateInc = this.ruleDateInc; + result.exDateInc = this.exDateInc; + result.last = this.last.toJSON(); + result.dtstart = this.dtstart.toJSON(); + result.complete = this.complete; + return result; + }, + _extractDates: function(component, propertyName) { + function handleProp(prop2) { + idx = ICAL3.helpers.binsearchInsert(result, prop2, compareTime); + result.splice(idx, 0, prop2); + } + var result = []; + var props = component.getAllProperties(propertyName); + var len = props.length; + var i3 = 0; + var prop; + var idx; + for (; i3 < len; i3++) { + props[i3].getValues().forEach(handleProp); + } + return result; + }, + _init: function(component) { + this.ruleIterators = []; + this.last = this.dtstart.clone(); + if (!isRecurringComponent(component)) { + this.ruleDate = this.last.clone(); + this.complete = true; + return; + } + if (component.hasProperty("rdate")) { + this.ruleDates = this._extractDates(component, "rdate"); + if (this.ruleDates[0] && this.ruleDates[0].compare(this.dtstart) < 0) { + this.ruleDateInc = 0; + this.last = this.ruleDates[0].clone(); + } else { + this.ruleDateInc = ICAL3.helpers.binsearchInsert(this.ruleDates, this.last, compareTime); + } + this.ruleDate = this.ruleDates[this.ruleDateInc]; + } + if (component.hasProperty("rrule")) { + var rules = component.getAllProperties("rrule"); + var i3 = 0; + var len = rules.length; + var rule; + var iter; + for (; i3 < len; i3++) { + rule = rules[i3].getFirstValue(); + iter = rule.iterator(this.dtstart); + this.ruleIterators.push(iter); + iter.next(); + } + } + if (component.hasProperty("exdate")) { + this.exDates = this._extractDates(component, "exdate"); + this.exDateInc = ICAL3.helpers.binsearchInsert(this.exDates, this.last, compareTime); + this.exDate = this.exDates[this.exDateInc]; + } + }, + _nextExDay: function() { + this.exDate = this.exDates[++this.exDateInc]; + }, + _nextRuleDay: function() { + this.ruleDate = this.ruleDates[++this.ruleDateInc]; + }, + _nextRecurrenceIter: function() { + var iters = this.ruleIterators; + if (iters.length === 0) { + return null; + } + var len = iters.length; + var iter; + var iterTime; + var iterIdx = 0; + var chosenIter; + for (; iterIdx < len; iterIdx++) { + iter = iters[iterIdx]; + iterTime = iter.last; + if (iter.completed) { + len--; + if (iterIdx !== 0) { + iterIdx--; + } + iters.splice(iterIdx, 1); + continue; + } + if (!chosenIter || chosenIter.last.compare(iterTime) > 0) { + chosenIter = iter; + } + } + return chosenIter; + } + }; + return RecurExpansion; + }(); + ICAL3.Event = function() { + function Event3(component, options) { + if (!(component instanceof ICAL3.Component)) { + options = component; + component = null; + } + if (component) { + this.component = component; + } else { + this.component = new ICAL3.Component("vevent"); + } + this._rangeExceptionCache = Object.create(null); + this.exceptions = Object.create(null); + this.rangeExceptions = []; + if (options && options.strictExceptions) { + this.strictExceptions = options.strictExceptions; + } + if (options && options.exceptions) { + options.exceptions.forEach(this.relateException, this); + } else if (this.component.parent && !this.isRecurrenceException()) { + this.component.parent.getAllSubcomponents("vevent").forEach(function(event) { + if (event.hasProperty("recurrence-id")) { + this.relateException(event); + } + }, this); + } + } + Event3.prototype = { + THISANDFUTURE: "THISANDFUTURE", + exceptions: null, + strictExceptions: false, + relateException: function(obj) { + if (this.isRecurrenceException()) { + throw new Error("cannot relate exception to exceptions"); + } + if (obj instanceof ICAL3.Component) { + obj = new ICAL3.Event(obj); + } + if (this.strictExceptions && obj.uid !== this.uid) { + throw new Error("attempted to relate unrelated exception"); + } + var id = obj.recurrenceId.toString(); + this.exceptions[id] = obj; + if (obj.modifiesFuture()) { + var item = [ + obj.recurrenceId.toUnixTime(), + id + ]; + var idx = ICAL3.helpers.binsearchInsert(this.rangeExceptions, item, compareRangeException); + this.rangeExceptions.splice(idx, 0, item); + } + }, + modifiesFuture: function() { + if (!this.component.hasProperty("recurrence-id")) { + return false; + } + var range = this.component.getFirstProperty("recurrence-id").getParameter("range"); + return range === this.THISANDFUTURE; + }, + findRangeException: function(time) { + if (!this.rangeExceptions.length) { + return null; + } + var utc = time.toUnixTime(); + var idx = ICAL3.helpers.binsearchInsert(this.rangeExceptions, [utc], compareRangeException); + idx -= 1; + if (idx < 0) { + return null; + } + var rangeItem = this.rangeExceptions[idx]; + if (utc < rangeItem[0]) { + return null; + } + return rangeItem[1]; + }, + getOccurrenceDetails: function(occurrence) { + var id = occurrence.toString(); + var utcId = occurrence.convertToZone(ICAL3.Timezone.utcTimezone).toString(); + var item; + var result = { + recurrenceId: occurrence + }; + if (id in this.exceptions) { + item = result.item = this.exceptions[id]; + result.startDate = item.startDate; + result.endDate = item.endDate; + result.item = item; + } else if (utcId in this.exceptions) { + item = this.exceptions[utcId]; + result.startDate = item.startDate; + result.endDate = item.endDate; + result.item = item; + } else { + var rangeExceptionId = this.findRangeException(occurrence); + var end; + if (rangeExceptionId) { + var exception = this.exceptions[rangeExceptionId]; + result.item = exception; + var startDiff = this._rangeExceptionCache[rangeExceptionId]; + if (!startDiff) { + var original = exception.recurrenceId.clone(); + var newStart = exception.startDate.clone(); + original.zone = newStart.zone; + startDiff = newStart.subtractDate(original); + this._rangeExceptionCache[rangeExceptionId] = startDiff; + } + var start = occurrence.clone(); + start.zone = exception.startDate.zone; + start.addDuration(startDiff); + end = start.clone(); + end.addDuration(exception.duration); + result.startDate = start; + result.endDate = end; + } else { + end = occurrence.clone(); + end.addDuration(this.duration); + result.endDate = end; + result.startDate = occurrence; + result.item = this; + } + } + return result; + }, + iterator: function(startTime) { + return new ICAL3.RecurExpansion({ + component: this.component, + dtstart: startTime || this.startDate + }); + }, + isRecurring: function() { + var comp = this.component; + return comp.hasProperty("rrule") || comp.hasProperty("rdate"); + }, + isRecurrenceException: function() { + return this.component.hasProperty("recurrence-id"); + }, + getRecurrenceTypes: function() { + var rules = this.component.getAllProperties("rrule"); + var i3 = 0; + var len = rules.length; + var result = Object.create(null); + for (; i3 < len; i3++) { + var value = rules[i3].getFirstValue(); + result[value.freq] = true; + } + return result; + }, + get uid() { + return this._firstProp("uid"); + }, + set uid(value) { + this._setProp("uid", value); + }, + get startDate() { + return this._firstProp("dtstart"); + }, + set startDate(value) { + this._setTime("dtstart", value); + }, + get endDate() { + var endDate = this._firstProp("dtend"); + if (!endDate) { + var duration = this._firstProp("duration"); + endDate = this.startDate.clone(); + if (duration) { + endDate.addDuration(duration); + } else if (endDate.isDate) { + endDate.day += 1; + } + } + return endDate; + }, + set endDate(value) { + if (this.component.hasProperty("duration")) { + this.component.removeProperty("duration"); + } + this._setTime("dtend", value); + }, + get duration() { + var duration = this._firstProp("duration"); + if (!duration) { + return this.endDate.subtractDateTz(this.startDate); + } + return duration; + }, + set duration(value) { + if (this.component.hasProperty("dtend")) { + this.component.removeProperty("dtend"); + } + this._setProp("duration", value); + }, + get location() { + return this._firstProp("location"); + }, + set location(value) { + return this._setProp("location", value); + }, + get attendees() { + return this.component.getAllProperties("attendee"); + }, + get summary() { + return this._firstProp("summary"); + }, + set summary(value) { + this._setProp("summary", value); + }, + get description() { + return this._firstProp("description"); + }, + set description(value) { + this._setProp("description", value); + }, + get color() { + return this._firstProp("color"); + }, + set color(value) { + this._setProp("color", value); + }, + get organizer() { + return this._firstProp("organizer"); + }, + set organizer(value) { + this._setProp("organizer", value); + }, + get sequence() { + return this._firstProp("sequence"); + }, + set sequence(value) { + this._setProp("sequence", value); + }, + get recurrenceId() { + return this._firstProp("recurrence-id"); + }, + set recurrenceId(value) { + this._setTime("recurrence-id", value); + }, + _setTime: function(propName, time) { + var prop = this.component.getFirstProperty(propName); + if (!prop) { + prop = new ICAL3.Property(propName); + this.component.addProperty(prop); + } + if (time.zone === ICAL3.Timezone.localTimezone || time.zone === ICAL3.Timezone.utcTimezone) { + prop.removeParameter("tzid"); + } else { + prop.setParameter("tzid", time.zone.tzid); + } + prop.setValue(time); + }, + _setProp: function(name, value) { + this.component.updatePropertyWithValue(name, value); + }, + _firstProp: function(name) { + return this.component.getFirstPropertyValue(name); + }, + toString: function() { + return this.component.toString(); + } + }; + function compareRangeException(a3, b3) { + if (a3[0] > b3[0]) + return 1; + if (b3[0] > a3[0]) + return -1; + return 0; + } + return Event3; + }(); + ICAL3.ComponentParser = function() { + function ComponentParser(options) { + if (typeof options === "undefined") { + options = {}; + } + var key; + for (key in options) { + if (options.hasOwnProperty(key)) { + this[key] = options[key]; + } + } + } + ComponentParser.prototype = { + parseEvent: true, + parseTimezone: true, + oncomplete: function() { + }, + onerror: function(err) { + }, + ontimezone: function(component) { + }, + onevent: function(component) { + }, + process: function(ical) { + if (typeof ical === "string") { + ical = ICAL3.parse(ical); + } + if (!(ical instanceof ICAL3.Component)) { + ical = new ICAL3.Component(ical); + } + var components = ical.getAllSubcomponents(); + var i3 = 0; + var len = components.length; + var component; + for (; i3 < len; i3++) { + component = components[i3]; + switch (component.name) { + case "vtimezone": + if (this.parseTimezone) { + var tzid = component.getFirstPropertyValue("tzid"); + if (tzid) { + this.ontimezone(new ICAL3.Timezone({ + tzid, + component + })); + } + } + break; + case "vevent": + if (this.parseEvent) { + this.onevent(new ICAL3.Event(component)); + } + break; + default: + continue; + } + } + this.oncomplete(); + } + }; + return ComponentParser; + }(); + } +}); + +// node_modules/object-assign/index.js +var require_object_assign = __commonJS({ + "node_modules/object-assign/index.js"(exports, module2) { + "use strict"; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === void 0) { + throw new TypeError("Object.assign cannot be called with null or undefined"); + } + return Object(val); + } + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + var test1 = new String("abc"); + test1[5] = "de"; + if (Object.getOwnPropertyNames(test1)[0] === "5") { + return false; + } + var test2 = {}; + for (var i3 = 0; i3 < 10; i3++) { + test2["_" + String.fromCharCode(i3)] = i3; + } + var order2 = Object.getOwnPropertyNames(test2).map(function(n2) { + return test2[n2]; + }); + if (order2.join("") !== "0123456789") { + return false; + } + var test3 = {}; + "abcdefghijklmnopqrst".split("").forEach(function(letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") { + return false; + } + return true; + } catch (err) { + return false; + } + } + module2.exports = shouldUseNative() ? Object.assign : function(target, source) { + var from; + var to = toObject(target); + var symbols; + for (var s3 = 1; s3 < arguments.length; s3++) { + from = Object(arguments[s3]); + for (var key in from) { + if (hasOwnProperty2.call(from, key)) { + to[key] = from[key]; + } + } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i3 = 0; i3 < symbols.length; i3++) { + if (propIsEnumerable.call(from, symbols[i3])) { + to[symbols[i3]] = from[symbols[i3]]; + } + } + } + } + return to; + }; + } +}); + +// node_modules/react/cjs/react.development.js +var require_react_development = __commonJS({ + "node_modules/react/cjs/react.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var _assign = require_object_assign(); + var ReactVersion = "17.0.2"; + var REACT_ELEMENT_TYPE = 60103; + var REACT_PORTAL_TYPE = 60106; + exports.Fragment = 60107; + exports.StrictMode = 60108; + exports.Profiler = 60114; + var REACT_PROVIDER_TYPE = 60109; + var REACT_CONTEXT_TYPE = 60110; + var REACT_FORWARD_REF_TYPE = 60112; + exports.Suspense = 60113; + var REACT_SUSPENSE_LIST_TYPE = 60120; + var REACT_MEMO_TYPE = 60115; + var REACT_LAZY_TYPE = 60116; + var REACT_BLOCK_TYPE = 60121; + var REACT_SERVER_BLOCK_TYPE = 60122; + var REACT_FUNDAMENTAL_TYPE = 60117; + var REACT_SCOPE_TYPE = 60119; + var REACT_OPAQUE_ID_TYPE = 60128; + var REACT_DEBUG_TRACING_MODE_TYPE = 60129; + var REACT_OFFSCREEN_TYPE = 60130; + var REACT_LEGACY_HIDDEN_TYPE = 60131; + if (typeof Symbol === "function" && Symbol.for) { + var symbolFor = Symbol.for; + REACT_ELEMENT_TYPE = symbolFor("react.element"); + REACT_PORTAL_TYPE = symbolFor("react.portal"); + exports.Fragment = symbolFor("react.fragment"); + exports.StrictMode = symbolFor("react.strict_mode"); + exports.Profiler = symbolFor("react.profiler"); + REACT_PROVIDER_TYPE = symbolFor("react.provider"); + REACT_CONTEXT_TYPE = symbolFor("react.context"); + REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref"); + exports.Suspense = symbolFor("react.suspense"); + REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list"); + REACT_MEMO_TYPE = symbolFor("react.memo"); + REACT_LAZY_TYPE = symbolFor("react.lazy"); + REACT_BLOCK_TYPE = symbolFor("react.block"); + REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block"); + REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental"); + REACT_SCOPE_TYPE = symbolFor("react.scope"); + REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id"); + REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode"); + REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen"); + REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden"); + } + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var ReactCurrentDispatcher = { + current: null + }; + var ReactCurrentBatchConfig = { + transition: 0 + }; + var ReactCurrentOwner = { + current: null + }; + var ReactDebugCurrentFrame = {}; + var currentExtraStackFrame = null; + function setExtraStackFrame(stack) { + { + currentExtraStackFrame = stack; + } + } + { + ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { + { + currentExtraStackFrame = stack; + } + }; + ReactDebugCurrentFrame.getCurrentStack = null; + ReactDebugCurrentFrame.getStackAddendum = function() { + var stack = ""; + if (currentExtraStackFrame) { + stack += currentExtraStackFrame; + } + var impl = ReactDebugCurrentFrame.getCurrentStack; + if (impl) { + stack += impl() || ""; + } + return stack; + }; + } + var IsSomeRendererActing = { + current: false + }; + var ReactSharedInternals = { + ReactCurrentDispatcher, + ReactCurrentBatchConfig, + ReactCurrentOwner, + IsSomeRendererActing, + assign: _assign + }; + { + ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; + } + function warn(format) { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + function error(format) { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return "" + item; + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + var didWarnStateUpdateForUnmountedComponent = {}; + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; + var warningKey = componentName + "." + callerName; + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + var ReactNoopUpdateQueue = { + isMounted: function(publicInstance) { + return false; + }, + enqueueForceUpdate: function(publicInstance, callback, callerName) { + warnNoop(publicInstance, "forceUpdate"); + }, + enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, "replaceState"); + }, + enqueueSetState: function(publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, "setState"); + } + }; + var emptyObject = {}; + { + Object.freeze(emptyObject); + } + function Component4(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + Component4.prototype.isReactComponent = {}; + Component4.prototype.setState = function(partialState, callback) { + if (!(typeof partialState === "object" || typeof partialState === "function" || partialState == null)) { + { + throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + } + } + this.updater.enqueueSetState(this, partialState, callback, "setState"); + }; + Component4.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); + }; + { + var deprecatedAPIs = { + isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], + replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] + }; + var defineDeprecationWarning = function(methodName, info) { + Object.defineProperty(Component4.prototype, methodName, { + get: function() { + warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); + return void 0; + } + }); + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + function ComponentDummy() { + } + ComponentDummy.prototype = Component4.prototype; + function PureComponent2(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + var pureComponentPrototype = PureComponent2.prototype = new ComponentDummy(); + pureComponentPrototype.constructor = PureComponent2; + _assign(pureComponentPrototype, Component4.prototype); + pureComponentPrototype.isPureReactComponent = true; + function createRef2() { + var refObject = { + current: null + }; + { + Object.seal(refObject); + } + return refObject; + } + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ""; + return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentName(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case exports.Fragment: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case exports.Profiler: + return "Profiler"; + case exports.StrictMode: + return "StrictMode"; + case exports.Suspense: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + return getComponentName(type.type); + case REACT_BLOCK_TYPE: + return getComponentName(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentName(init(payload)); + } catch (x3) { + return null; + } + } + } + } + return null; + } + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config2) { + { + if (hasOwnProperty2.call(config2, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config2.ref !== void 0; + } + function hasValidKey(config2) { + { + if (hasOwnProperty2.call(config2, "key")) { + var getter = Object.getOwnPropertyDescriptor(config2, "key").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config2.key !== void 0; + } + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function() { + { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function() { + { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); + } + function warnIfStringRefCannotBeAutoConverted(config2) { + { + if (typeof config2.ref === "string" && ReactCurrentOwner.current && config2.__self && ReactCurrentOwner.current.stateNode !== config2.__self) { + var componentName = getComponentName(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config2.ref); + didWarnAboutStringRefs[componentName] = true; + } + } + } + } + var ReactElement = function(type, key, ref, self2, source, owner, props) { + var element = { + $$typeof: REACT_ELEMENT_TYPE, + type, + key, + ref, + props, + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + return element; + }; + function createElement6(type, config2, children) { + var propName; + var props = {}; + var key = null; + var ref = null; + var self2 = null; + var source = null; + if (config2 != null) { + if (hasValidRef(config2)) { + ref = config2.ref; + { + warnIfStringRefCannotBeAutoConverted(config2); + } + } + if (hasValidKey(config2)) { + key = "" + config2.key; + } + self2 = config2.__self === void 0 ? null : config2.__self; + source = config2.__source === void 0 ? null : config2.__source; + for (propName in config2) { + if (hasOwnProperty2.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config2[propName]; + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i3 = 0; i3 < childrenLength; i3++) { + childArray[i3] = arguments[i3 + 2]; + } + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } + { + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); + } + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + return newElement; + } + function cloneElement(element, config2, children) { + if (!!(element === null || element === void 0)) { + { + throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); + } + } + var propName; + var props = _assign({}, element.props); + var key = element.key; + var ref = element.ref; + var self2 = element._self; + var source = element._source; + var owner = element._owner; + if (config2 != null) { + if (hasValidRef(config2)) { + ref = config2.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config2)) { + key = "" + config2.key; + } + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config2) { + if (hasOwnProperty2.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config2[propName] === void 0 && defaultProps !== void 0) { + props[propName] = defaultProps[propName]; + } else { + props[propName] = config2[propName]; + } + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i3 = 0; i3 < childrenLength; i3++) { + childArray[i3] = arguments[i3 + 2]; + } + props.children = childArray; + } + return ReactElement(element.type, key, ref, self2, source, owner, props); + } + function isValidElement(object) { + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + var SEPARATOR = "."; + var SUBSEPARATOR = ":"; + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + "=": "=0", + ":": "=2" + }; + var escapedString = key.replace(escapeRegex, function(match) { + return escaperLookup[match]; + }); + return "$" + escapedString; + } + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + function escapeUserProvidedKey(text) { + return text.replace(userProvidedKeyEscapeRegex, "$&/"); + } + function getElementKey(element, index) { + if (typeof element === "object" && element !== null && element.key != null) { + return escape("" + element.key); + } + return index.toString(36); + } + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if (type === "undefined" || type === "boolean") { + children = null; + } + var invokeCallback = false; + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case "string": + case "number": + invokeCallback = true; + break; + case "object": + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + if (invokeCallback) { + var _child = children; + var mappedChild = callback(_child); + var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; + if (Array.isArray(mappedChild)) { + var escapedChildKey = ""; + if (childKey != null) { + escapedChildKey = escapeUserProvidedKey(childKey) + "/"; + } + mapIntoArray(mappedChild, array, escapedChildKey, "", function(c3) { + return c3; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey(mappedChild, escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey("" + mappedChild.key) + "/" : "") + childKey); + } + array.push(mappedChild); + } + return 1; + } + var child; + var nextName; + var subtreeCount = 0; + var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; + if (Array.isArray(children)) { + for (var i3 = 0; i3 < children.length; i3++) { + child = children[i3]; + nextName = nextNamePrefix + getElementKey(child, i3); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else { + var iteratorFn = getIteratorFn(children); + if (typeof iteratorFn === "function") { + var iterableChildren = children; + { + if (iteratorFn === iterableChildren.entries) { + if (!didWarnAboutMaps) { + warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); + } + didWarnAboutMaps = true; + } + } + var iterator = iteratorFn.call(iterableChildren); + var step; + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getElementKey(child, ii++); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else if (type === "object") { + var childrenString = "" + children; + { + { + throw Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); + } + } + } + } + return subtreeCount; + } + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + var count = 0; + mapIntoArray(children, result, "", "", function(child) { + return func.call(context, child, count++); + }); + return result; + } + function countChildren(children) { + var n2 = 0; + mapChildren(children, function() { + n2++; + }); + return n2; + } + function forEachChildren(children, forEachFunc, forEachContext) { + mapChildren(children, function() { + forEachFunc.apply(this, arguments); + }, forEachContext); + } + function toArray(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + } + function onlyChild(children) { + if (!isValidElement(children)) { + { + throw Error("React.Children.only expected to receive a single React element child."); + } + } + return children; + } + function createContext3(defaultValue, calculateChangedBits) { + if (calculateChangedBits === void 0) { + calculateChangedBits = null; + } else { + { + if (calculateChangedBits !== null && typeof calculateChangedBits !== "function") { + error("createContext: Expected the optional second argument to be a function. Instead received: %s", calculateChangedBits); + } + } + } + var context = { + $$typeof: REACT_CONTEXT_TYPE, + _calculateChangedBits: calculateChangedBits, + _currentValue: defaultValue, + _currentValue2: defaultValue, + _threadCount: 0, + Provider: null, + Consumer: null + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + var hasWarnedAboutDisplayNameOnConsumer = false; + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context, + _calculateChangedBits: context._calculateChangedBits + }; + Object.defineProperties(Consumer, { + Provider: { + get: function() { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Provider; + }, + set: function(_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function() { + return context._currentValue; + }, + set: function(_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function() { + return context._currentValue2; + }, + set: function(_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function() { + return context._threadCount; + }, + set: function(_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function() { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Consumer; + } + }, + displayName: { + get: function() { + return context.displayName; + }, + set: function(displayName) { + if (!hasWarnedAboutDisplayNameOnConsumer) { + warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); + hasWarnedAboutDisplayNameOnConsumer = true; + } + } + } + }); + context.Consumer = Consumer; + } + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + return context; + } + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function lazyInitializer(payload) { + if (payload._status === Uninitialized) { + var ctor = payload._result; + var thenable = ctor(); + var pending = payload; + pending._status = Pending; + pending._result = thenable; + thenable.then(function(moduleObject) { + if (payload._status === Pending) { + var defaultExport = moduleObject.default; + { + if (defaultExport === void 0) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); + } + } + var resolved = payload; + resolved._status = Resolved; + resolved._result = defaultExport; + } + }, function(error2) { + if (payload._status === Pending) { + var rejected = payload; + rejected._status = Rejected; + rejected._result = error2; + } + }); + } + if (payload._status === Resolved) { + return payload._result; + } else { + throw payload._result; + } + } + function lazy(ctor) { + var payload = { + _status: -1, + _result: ctor + }; + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: payload, + _init: lazyInitializer + }; + { + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function() { + return defaultProps; + }, + set: function(newDefaultProps) { + error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + defaultProps = newDefaultProps; + Object.defineProperty(lazyType, "defaultProps", { + enumerable: true + }); + } + }, + propTypes: { + configurable: true, + get: function() { + return propTypes; + }, + set: function(newPropTypes) { + error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + propTypes = newPropTypes; + Object.defineProperty(lazyType, "propTypes", { + enumerable: true + }); + } + } + }); + } + return lazyType; + } + function forwardRef(render4) { + { + if (render4 != null && render4.$$typeof === REACT_MEMO_TYPE) { + error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); + } else if (typeof render4 !== "function") { + error("forwardRef requires a render function but was given %s.", render4 === null ? "null" : typeof render4); + } else { + if (render4.length !== 0 && render4.length !== 2) { + error("forwardRef render functions accept exactly two parameters: props and ref. %s", render4.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); + } + } + if (render4 != null) { + if (render4.defaultProps != null || render4.propTypes != null) { + error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); + } + } + } + var elementType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render: render4 + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (render4.displayName == null) { + render4.displayName = name; + } + } + }); + } + return elementType; + } + var enableScopeAPI = false; + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { + return true; + } + if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) { + return true; + } + } + return false; + } + function memo(type, compare) { + { + if (!isValidElementType(type)) { + error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); + } + } + var elementType = { + $$typeof: REACT_MEMO_TYPE, + type, + compare: compare === void 0 ? null : compare + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (type.displayName == null) { + type.displayName = name; + } + } + }); + } + return elementType; + } + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + if (!(dispatcher !== null)) { + { + throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); + } + } + return dispatcher; + } + function useContext(Context, unstable_observedBits) { + var dispatcher = resolveDispatcher(); + { + if (unstable_observedBits !== void 0) { + error("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s", unstable_observedBits, typeof unstable_observedBits === "number" && Array.isArray(arguments[2]) ? "\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks" : ""); + } + if (Context._context !== void 0) { + var realContext = Context._context; + if (realContext.Consumer === Context) { + error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); + } else if (realContext.Provider === Context) { + error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); + } + } + } + return dispatcher.useContext(Context, unstable_observedBits); + } + function useState3(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef2(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect2(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, deps); + } + function useLayoutEffect(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, deps); + } + function useCallback(callback, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, deps); + } + function useMemo(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, deps); + } + function useImperativeHandle(ref, create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, deps); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: _assign({}, props, { + value: prevLog + }), + info: _assign({}, props, { + value: prevInfo + }), + warn: _assign({}, props, { + value: prevWarn + }), + error: _assign({}, props, { + value: prevError + }), + group: _assign({}, props, { + value: prevGroup + }), + groupCollapsed: _assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: _assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x3) { + var match = x3.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x3) { + control = x3; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x3) { + control = x3; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x3) { + control = x3; + } + fn(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s3 = sampleLines.length - 1; + var c3 = controlLines.length - 1; + while (s3 >= 1 && c3 >= 0 && sampleLines[s3] !== controlLines[c3]) { + c3--; + } + for (; s3 >= 1 && c3 >= 0; s3--, c3--) { + if (sampleLines[s3] !== controlLines[c3]) { + if (s3 !== 1 || c3 !== 1) { + do { + s3--; + c3--; + if (c3 < 0 || sampleLines[s3] !== controlLines[c3]) { + var _frame = "\n" + sampleLines[s3].replace(" at new ", " at "); + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s3 >= 1 && c3 >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher$1.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component5) { + var prototype = Component5.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case exports.Suspense: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_BLOCK_TYPE: + return describeFunctionComponentFrame(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x3) { + } + } + } + } + return ""; + } + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } + } + } + function checkPropTypes(typeSpecs, values, location, componentName, element) { + { + var has = Function.call.bind(Object.prototype.hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); + } + } + } + } + } + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + setExtraStackFrame(stack); + } else { + setExtraStackFrame(null); + } + } + } + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; + } + function getSourceInfoErrorAddendum(source) { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + } + return ""; + } + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== void 0) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + return ""; + } + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; + } + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; + } + { + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + function validateChildKeys(node, parentType) { + if (typeof node !== "object") { + return; + } + if (Array.isArray(node)) { + for (var i3 = 0; i3 < node.length; i3++) { + var child = node[i3]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes; + if (typeof type === "function") { + propTypes = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { + return; + } + if (propTypes) { + var name = getComponentName(type); + checkPropTypes(propTypes, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentName(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + } + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i3 = 0; i3 < keys.length; i3++) { + var key = keys[i3]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } + } + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (Array.isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentName(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + { + error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + } + var element = createElement6.apply(this, arguments); + if (element == null) { + return element; + } + if (validType) { + for (var i3 = 2; i3 < arguments.length; i3++) { + validateChildKeys(arguments[i3], type); + } + } + if (type === exports.Fragment) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; + } + var didWarnAboutDeprecatedCreateFactory = false; + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; + { + if (!didWarnAboutDeprecatedCreateFactory) { + didWarnAboutDeprecatedCreateFactory = true; + warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); + } + Object.defineProperty(validatedFactory, "type", { + enumerable: false, + get: function() { + warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); + Object.defineProperty(this, "type", { + value: type + }); + return type; + } + }); + } + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + for (var i3 = 2; i3 < arguments.length; i3++) { + validateChildKeys(arguments[i3], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } + { + try { + var frozenObject = Object.freeze({}); + new Map([[frozenObject, null]]); + new Set([frozenObject]); + } catch (e3) { + } + } + var createElement$1 = createElementWithValidation; + var cloneElement$1 = cloneElementWithValidation; + var createFactory = createFactoryWithValidation; + var Children = { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray, + only: onlyChild + }; + exports.Children = Children; + exports.Component = Component4; + exports.PureComponent = PureComponent2; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; + exports.cloneElement = cloneElement$1; + exports.createContext = createContext3; + exports.createElement = createElement$1; + exports.createFactory = createFactory; + exports.createRef = createRef2; + exports.forwardRef = forwardRef; + exports.isValidElement = isValidElement; + exports.lazy = lazy; + exports.memo = memo; + exports.useCallback = useCallback; + exports.useContext = useContext; + exports.useDebugValue = useDebugValue; + exports.useEffect = useEffect2; + exports.useImperativeHandle = useImperativeHandle; + exports.useLayoutEffect = useLayoutEffect; + exports.useMemo = useMemo; + exports.useReducer = useReducer; + exports.useRef = useRef2; + exports.useState = useState3; + exports.version = ReactVersion; + })(); + } + } +}); + +// node_modules/react/index.js +var require_react = __commonJS({ + "node_modules/react/index.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_react_development(); + } + } +}); + +// node_modules/scheduler/cjs/scheduler.development.js +var require_scheduler_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var enableSchedulerDebugging = false; + var enableProfiling = false; + var requestHostCallback; + var requestHostTimeout; + var cancelHostTimeout; + var requestPaint; + var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function"; + if (hasPerformanceNow) { + var localPerformance = performance; + exports.unstable_now = function() { + return localPerformance.now(); + }; + } else { + var localDate = Date; + var initialTime = localDate.now(); + exports.unstable_now = function() { + return localDate.now() - initialTime; + }; + } + if (typeof window === "undefined" || typeof MessageChannel !== "function") { + var _callback = null; + var _timeoutID = null; + var _flushCallback = function() { + if (_callback !== null) { + try { + var currentTime = exports.unstable_now(); + var hasRemainingTime = true; + _callback(hasRemainingTime, currentTime); + _callback = null; + } catch (e3) { + setTimeout(_flushCallback, 0); + throw e3; + } + } + }; + requestHostCallback = function(cb) { + if (_callback !== null) { + setTimeout(requestHostCallback, 0, cb); + } else { + _callback = cb; + setTimeout(_flushCallback, 0); + } + }; + requestHostTimeout = function(cb, ms) { + _timeoutID = setTimeout(cb, ms); + }; + cancelHostTimeout = function() { + clearTimeout(_timeoutID); + }; + exports.unstable_shouldYield = function() { + return false; + }; + requestPaint = exports.unstable_forceFrameRate = function() { + }; + } else { + var _setTimeout = window.setTimeout; + var _clearTimeout = window.clearTimeout; + if (typeof console !== "undefined") { + var requestAnimationFrame2 = window.requestAnimationFrame; + var cancelAnimationFrame2 = window.cancelAnimationFrame; + if (typeof requestAnimationFrame2 !== "function") { + console["error"]("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); + } + if (typeof cancelAnimationFrame2 !== "function") { + console["error"]("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); + } + } + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; + var yieldInterval = 5; + var deadline = 0; + { + exports.unstable_shouldYield = function() { + return exports.unstable_now() >= deadline; + }; + requestPaint = function() { + }; + } + exports.unstable_forceFrameRate = function(fps) { + if (fps < 0 || fps > 125) { + console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"); + return; + } + if (fps > 0) { + yieldInterval = Math.floor(1e3 / fps); + } else { + yieldInterval = 5; + } + }; + var performWorkUntilDeadline = function() { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); + deadline = currentTime + yieldInterval; + var hasTimeRemaining = true; + try { + var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + if (!hasMoreWork) { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } else { + port.postMessage(null); + } + } catch (error) { + port.postMessage(null); + throw error; + } + } else { + isMessageLoopRunning = false; + } + }; + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + requestHostCallback = function(callback) { + scheduledHostCallback = callback; + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + port.postMessage(null); + } + }; + requestHostTimeout = function(callback, ms) { + taskTimeoutID = _setTimeout(function() { + callback(exports.unstable_now()); + }, ms); + }; + cancelHostTimeout = function() { + _clearTimeout(taskTimeoutID); + taskTimeoutID = -1; + }; + } + function push(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + function peek(heap) { + var first = heap[0]; + return first === void 0 ? null : first; + } + function pop(heap) { + var first = heap[0]; + if (first !== void 0) { + var last = heap.pop(); + if (last !== first) { + heap[0] = last; + siftDown(heap, last, 0); + } + return first; + } else { + return null; + } + } + function siftUp(heap, node, i3) { + var index = i3; + while (true) { + var parentIndex = index - 1 >>> 1; + var parent = heap[parentIndex]; + if (parent !== void 0 && compare(parent, node) > 0) { + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + return; + } + } + } + function siftDown(heap, node, i3) { + var index = i3; + var length = heap.length; + while (index < length) { + var leftIndex = (index + 1) * 2 - 1; + var left = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right = heap[rightIndex]; + if (left !== void 0 && compare(left, node) < 0) { + if (right !== void 0 && compare(right, left) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (right !== void 0 && compare(right, node) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + return; + } + } + } + function compare(a3, b3) { + var diff = a3.sortIndex - b3.sortIndex; + return diff !== 0 ? diff : a3.id - b3.id; + } + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + function markTaskErrored(task, ms) { + } + var maxSigned31BitInt = 1073741823; + var IMMEDIATE_PRIORITY_TIMEOUT = -1; + var USER_BLOCKING_PRIORITY_TIMEOUT = 250; + var NORMAL_PRIORITY_TIMEOUT = 5e3; + var LOW_PRIORITY_TIMEOUT = 1e4; + var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; + var taskQueue = []; + var timerQueue = []; + var taskIdCounter = 1; + var currentTask = null; + var currentPriorityLevel = NormalPriority; + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + function advanceTimers(currentTime) { + var timer = peek(timerQueue); + while (timer !== null) { + if (timer.callback === null) { + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push(taskQueue, timer); + } else { + return; + } + timer = peek(timerQueue); + } + } + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + function flushWork(hasTimeRemaining, initialTime2) { + isHostCallbackScheduled = false; + if (isHostTimeoutScheduled) { + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime2); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + throw error; + } + } else { + return workLoop(hasTimeRemaining, initialTime2); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + } + } + function workLoop(hasTimeRemaining, initialTime2) { + var currentTime = initialTime2; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + while (currentTask !== null && !enableSchedulerDebugging) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) { + break; + } + var callback = currentTask.callback; + if (typeof callback === "function") { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + if (typeof continuationCallback === "function") { + currentTask.callback = continuationCallback; + } else { + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + currentTask = peek(taskQueue); + } + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + return false; + } + } + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + default: + priorityLevel = NormalPriority; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + function unstable_next(eventHandler) { + var priorityLevel; + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + priorityLevel = NormalPriority; + break; + default: + priorityLevel = currentPriorityLevel; + break; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function() { + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime; + if (typeof options === "object" && options !== null) { + var delay = options.delay; + if (typeof delay === "number" && delay > 0) { + startTime = currentTime + delay; + } else { + startTime = currentTime; + } + } else { + startTime = currentTime; + } + var timeout; + switch (priorityLevel) { + case ImmediatePriority: + timeout = IMMEDIATE_PRIORITY_TIMEOUT; + break; + case UserBlockingPriority: + timeout = USER_BLOCKING_PRIORITY_TIMEOUT; + break; + case IdlePriority: + timeout = IDLE_PRIORITY_TIMEOUT; + break; + case LowPriority: + timeout = LOW_PRIORITY_TIMEOUT; + break; + case NormalPriority: + default: + timeout = NORMAL_PRIORITY_TIMEOUT; + break; + } + var expirationTime = startTime + timeout; + var newTask = { + id: taskIdCounter++, + callback, + priorityLevel, + startTime, + expirationTime, + sortIndex: -1 + }; + if (startTime > currentTime) { + newTask.sortIndex = startTime; + push(timerQueue, newTask); + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + if (isHostTimeoutScheduled) { + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } + requestHostTimeout(handleTimeout, startTime - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push(taskQueue, newTask); + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + return newTask; + } + function unstable_pauseExecution() { + } + function unstable_continueExecution() { + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + function unstable_cancelCallback(task) { + task.callback = null; + } + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + var unstable_requestPaint = requestPaint; + var unstable_Profiling = null; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_Profiling = unstable_Profiling; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_next = unstable_next; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_wrapCallback = unstable_wrapCallback; + })(); + } + } +}); + +// node_modules/scheduler/index.js +var require_scheduler = __commonJS({ + "node_modules/scheduler/index.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_scheduler_development(); + } + } +}); + +// node_modules/scheduler/cjs/scheduler-tracing.development.js +var require_scheduler_tracing_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler-tracing.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var DEFAULT_THREAD_ID = 0; + var interactionIDCounter = 0; + var threadIDCounter = 0; + exports.__interactionsRef = null; + exports.__subscriberRef = null; + { + exports.__interactionsRef = { + current: new Set() + }; + exports.__subscriberRef = { + current: null + }; + } + function unstable_clear(callback) { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = new Set(); + try { + return callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + } + } + function unstable_getCurrent() { + { + return exports.__interactionsRef.current; + } + } + function unstable_getThreadID() { + return ++threadIDCounter; + } + function unstable_trace(name, timestamp, callback) { + var threadID = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : DEFAULT_THREAD_ID; + var interaction = { + __count: 1, + id: interactionIDCounter++, + name, + timestamp + }; + var prevInteractions = exports.__interactionsRef.current; + var interactions = new Set(prevInteractions); + interactions.add(interaction); + exports.__interactionsRef.current = interactions; + var subscriber = exports.__subscriberRef.current; + var returnValue; + try { + if (subscriber !== null) { + subscriber.onInteractionTraced(interaction); + } + } finally { + try { + if (subscriber !== null) { + subscriber.onWorkStarted(interactions, threadID); + } + } finally { + try { + returnValue = callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + try { + if (subscriber !== null) { + subscriber.onWorkStopped(interactions, threadID); + } + } finally { + interaction.__count--; + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + } + } + } + } + return returnValue; + } + function unstable_wrap(callback) { + var threadID = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_THREAD_ID; + var wrappedInteractions = exports.__interactionsRef.current; + var subscriber = exports.__subscriberRef.current; + if (subscriber !== null) { + subscriber.onWorkScheduled(wrappedInteractions, threadID); + } + wrappedInteractions.forEach(function(interaction) { + interaction.__count++; + }); + var hasRun = false; + function wrapped() { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = wrappedInteractions; + subscriber = exports.__subscriberRef.current; + try { + var returnValue; + try { + if (subscriber !== null) { + subscriber.onWorkStarted(wrappedInteractions, threadID); + } + } finally { + try { + returnValue = callback.apply(void 0, arguments); + } finally { + exports.__interactionsRef.current = prevInteractions; + if (subscriber !== null) { + subscriber.onWorkStopped(wrappedInteractions, threadID); + } + } + } + return returnValue; + } finally { + if (!hasRun) { + hasRun = true; + wrappedInteractions.forEach(function(interaction) { + interaction.__count--; + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + } + } + wrapped.cancel = function cancel() { + subscriber = exports.__subscriberRef.current; + try { + if (subscriber !== null) { + subscriber.onWorkCanceled(wrappedInteractions, threadID); + } + } finally { + wrappedInteractions.forEach(function(interaction) { + interaction.__count--; + if (subscriber && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + }; + return wrapped; + } + var subscribers = null; + { + subscribers = new Set(); + } + function unstable_subscribe(subscriber) { + { + subscribers.add(subscriber); + if (subscribers.size === 1) { + exports.__subscriberRef.current = { + onInteractionScheduledWorkCompleted, + onInteractionTraced, + onWorkCanceled, + onWorkScheduled, + onWorkStarted, + onWorkStopped + }; + } + } + } + function unstable_unsubscribe(subscriber) { + { + subscribers.delete(subscriber); + if (subscribers.size === 0) { + exports.__subscriberRef.current = null; + } + } + } + function onInteractionTraced(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onInteractionTraced(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onInteractionScheduledWorkCompleted(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onWorkScheduled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkScheduled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onWorkStarted(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onWorkStopped(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkStopped(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onWorkCanceled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkCanceled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + exports.unstable_clear = unstable_clear; + exports.unstable_getCurrent = unstable_getCurrent; + exports.unstable_getThreadID = unstable_getThreadID; + exports.unstable_subscribe = unstable_subscribe; + exports.unstable_trace = unstable_trace; + exports.unstable_unsubscribe = unstable_unsubscribe; + exports.unstable_wrap = unstable_wrap; + })(); + } + } +}); + +// node_modules/scheduler/tracing.js +var require_tracing = __commonJS({ + "node_modules/scheduler/tracing.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_scheduler_tracing_development(); + } + } +}); + +// node_modules/react-dom/cjs/react-dom.development.js +var require_react_dom_development = __commonJS({ + "node_modules/react-dom/cjs/react-dom.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var React4 = require_react(); + var _assign = require_object_assign(); + var Scheduler = require_scheduler(); + var tracing = require_tracing(); + var ReactSharedInternals = React4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function warn(format) { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + function error(format) { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return "" + item; + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + if (!React4) { + { + throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM."); + } + } + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; + var HostRoot = 3; + var HostPortal = 4; + var HostComponent = 5; + var HostText = 6; + var Fragment3 = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var FundamentalComponent = 20; + var ScopeComponent = 21; + var Block = 22; + var OffscreenComponent = 23; + var LegacyHiddenComponent = 24; + var enableProfilerTimer = true; + var enableFundamentalAPI = false; + var enableNewReconciler = false; + var warnAboutStringRefs = false; + var allNativeEvents = new Set(); + var registrationNameDependencies = {}; + var possibleRegistrationNames = {}; + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + { + if (registrationNameDependencies[registrationName]) { + error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName); + } + } + registrationNameDependencies[registrationName] = dependencies; + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + if (registrationName === "onDoubleClick") { + possibleRegistrationNames.ondblclick = registrationName; + } + } + for (var i3 = 0; i3 < dependencies.length; i3++) { + allNativeEvents.add(dependencies[i3]); + } + } + var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); + var RESERVED = 0; + var STRING = 1; + var BOOLEANISH_STRING = 2; + var BOOLEAN = 3; + var OVERLOADED_BOOLEAN = 4; + var NUMERIC = 5; + var POSITIVE_NUMERIC = 6; + var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; + var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + var ROOT_ATTRIBUTE_NAME = "data-reactroot"; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$"); + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty2.call(validatedAttributeNameCache, attributeName)) { + return true; + } + if (hasOwnProperty2.call(illegalAttributeNameCache, attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + { + error("Invalid attribute name: `%s`", attributeName); + } + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + if (isCustomComponentTag) { + return false; + } + if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) { + return true; + } + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + switch (typeof value) { + case "function": + case "symbol": + return true; + case "boolean": { + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix2 = name.toLowerCase().slice(0, 5); + return prefix2 !== "data-" && prefix2 !== "aria-"; + } + } + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === "undefined") { + return true; + } + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + case OVERLOADED_BOOLEAN: + return value === false; + case NUMERIC: + return isNaN(value); + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) { + this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL2; + this.removeEmptyString = removeEmptyString; + } + var properties = {}; + var reservedProps = [ + "children", + "dangerouslySetInnerHTML", + "defaultValue", + "defaultChecked", + "innerHTML", + "suppressContentEditableWarning", + "suppressHydrationWarning", + "style" + ]; + reservedProps.forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, RESERVED, false, name, null, false, false); + }); + [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) { + var name = _ref[0], attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false); + }); + ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name.toLowerCase(), null, false, false); + }); + ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name, null, false, false); + }); + [ + "allowFullScreen", + "async", + "autoFocus", + "autoPlay", + "controls", + "default", + "defer", + "disabled", + "disablePictureInPicture", + "disableRemotePlayback", + "formNoValidate", + "hidden", + "loop", + "noModule", + "noValidate", + "open", + "playsInline", + "readOnly", + "required", + "reversed", + "scoped", + "seamless", + "itemScope" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, name.toLowerCase(), null, false, false); + }); + [ + "checked", + "multiple", + "muted", + "selected" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, name, null, false, false); + }); + [ + "capture", + "download" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, name, null, false, false); + }); + [ + "cols", + "rows", + "size", + "span" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, name, null, false, false); + }); + ["rowSpan", "start"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, NUMERIC, false, name.toLowerCase(), null, false, false); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + var capitalize = function(token) { + return token[1].toUpperCase(); + }; + [ + "accent-height", + "alignment-baseline", + "arabic-form", + "baseline-shift", + "cap-height", + "clip-path", + "clip-rule", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "dominant-baseline", + "enable-background", + "fill-opacity", + "fill-rule", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-name", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "horiz-adv-x", + "horiz-origin-x", + "image-rendering", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "overline-position", + "overline-thickness", + "paint-order", + "panose-1", + "pointer-events", + "rendering-intent", + "shape-rendering", + "stop-color", + "stop-opacity", + "strikethrough-position", + "strikethrough-thickness", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "underline-position", + "underline-thickness", + "unicode-bidi", + "unicode-range", + "units-per-em", + "v-alphabetic", + "v-hanging", + "v-ideographic", + "v-mathematical", + "vector-effect", + "vert-adv-y", + "vert-origin-x", + "vert-origin-y", + "word-spacing", + "writing-mode", + "xmlns:xlink", + "x-height" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false); + }); + [ + "xlink:actuate", + "xlink:arcrole", + "xlink:role", + "xlink:show", + "xlink:title", + "xlink:type" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/1999/xlink", false, false); + }); + [ + "xml:base", + "xml:lang", + "xml:space" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/XML/1998/namespace", false, false); + }); + ["tabIndex", "crossOrigin"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, false, false); + }); + var xlinkHref = "xlinkHref"; + properties[xlinkHref] = new PropertyInfoRecord("xlinkHref", STRING, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false); + ["src", "href", "action", "formAction"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, true, true); + }); + var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + function sanitizeURL(url) { + { + if (!didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url)); + } + } + } + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + if (propertyInfo.sanitizeURL) { + sanitizeURL("" + expected); + } + var attributeName = propertyInfo.attributeName; + var stringValue = null; + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + if (value === "") { + return true; + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + if (value === "" + expected) { + return expected; + } + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return node.getAttribute(attributeName); + } + if (propertyInfo.type === BOOLEAN) { + return expected; + } + stringValue = node.getAttribute(attributeName); + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === "" + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + function getValueForAttribute(node, name, expected) { + { + if (!isAttributeNameSafe(name)) { + return; + } + if (isOpaqueHydratingObject(expected)) { + return expected; + } + if (!node.hasAttribute(name)) { + return expected === void 0 ? void 0 : null; + } + var value = node.getAttribute(name); + if (value === "" + expected) { + return expected; + } + return value; + } + } + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + if (value === null) { + node.removeAttribute(_attributeName); + } else { + node.setAttribute(_attributeName, "" + value); + } + } + return; + } + var mustUseProperty = propertyInfo.mustUseProperty; + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ""; + } else { + node[propertyName] = value; + } + return; + } + var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace; + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { + attributeValue = ""; + } else { + { + attributeValue = "" + value; + } + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + if (attributeNamespace) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } else { + node.setAttribute(attributeName, attributeValue); + } + } + } + var REACT_ELEMENT_TYPE = 60103; + var REACT_PORTAL_TYPE = 60106; + var REACT_FRAGMENT_TYPE = 60107; + var REACT_STRICT_MODE_TYPE = 60108; + var REACT_PROFILER_TYPE = 60114; + var REACT_PROVIDER_TYPE = 60109; + var REACT_CONTEXT_TYPE = 60110; + var REACT_FORWARD_REF_TYPE = 60112; + var REACT_SUSPENSE_TYPE = 60113; + var REACT_SUSPENSE_LIST_TYPE = 60120; + var REACT_MEMO_TYPE = 60115; + var REACT_LAZY_TYPE = 60116; + var REACT_BLOCK_TYPE = 60121; + var REACT_SERVER_BLOCK_TYPE = 60122; + var REACT_FUNDAMENTAL_TYPE = 60117; + var REACT_SCOPE_TYPE = 60119; + var REACT_OPAQUE_ID_TYPE = 60128; + var REACT_DEBUG_TRACING_MODE_TYPE = 60129; + var REACT_OFFSCREEN_TYPE = 60130; + var REACT_LEGACY_HIDDEN_TYPE = 60131; + if (typeof Symbol === "function" && Symbol.for) { + var symbolFor = Symbol.for; + REACT_ELEMENT_TYPE = symbolFor("react.element"); + REACT_PORTAL_TYPE = symbolFor("react.portal"); + REACT_FRAGMENT_TYPE = symbolFor("react.fragment"); + REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode"); + REACT_PROFILER_TYPE = symbolFor("react.profiler"); + REACT_PROVIDER_TYPE = symbolFor("react.provider"); + REACT_CONTEXT_TYPE = symbolFor("react.context"); + REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref"); + REACT_SUSPENSE_TYPE = symbolFor("react.suspense"); + REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list"); + REACT_MEMO_TYPE = symbolFor("react.memo"); + REACT_LAZY_TYPE = symbolFor("react.lazy"); + REACT_BLOCK_TYPE = symbolFor("react.block"); + REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block"); + REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental"); + REACT_SCOPE_TYPE = symbolFor("react.scope"); + REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id"); + REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode"); + REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen"); + REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden"); + } + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: _assign({}, props, { + value: prevLog + }), + info: _assign({}, props, { + value: prevInfo + }), + warn: _assign({}, props, { + value: prevWarn + }), + error: _assign({}, props, { + value: prevError + }), + group: _assign({}, props, { + value: prevGroup + }), + groupCollapsed: _assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: _assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x3) { + var match = x3.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x3) { + control = x3; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x3) { + control = x3; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x3) { + control = x3; + } + fn(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s3 = sampleLines.length - 1; + var c3 = controlLines.length - 1; + while (s3 >= 1 && c3 >= 0 && sampleLines[s3] !== controlLines[c3]) { + c3--; + } + for (; s3 >= 1 && c3 >= 0; s3--, c3--) { + if (sampleLines[s3] !== controlLines[c3]) { + if (s3 !== 1 || c3 !== 1) { + do { + s3--; + c3--; + if (c3 < 0 || sampleLines[s3] !== controlLines[c3]) { + var _frame = "\n" + sampleLines[s3].replace(" at new ", " at "); + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s3 >= 1 && c3 >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeClassComponentFrame(ctor, source, ownerFn) { + { + return describeNativeComponentFrame(ctor, true); + } + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component4) { + var prototype = Component4.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_BLOCK_TYPE: + return describeFunctionComponentFrame(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x3) { + } + } + } + } + return ""; + } + function describeFiber(fiber) { + var owner = fiber._debugOwner ? fiber._debugOwner.type : null; + var source = fiber._debugSource; + switch (fiber.tag) { + case HostComponent: + return describeBuiltInComponentFrame(fiber.type); + case LazyComponent: + return describeBuiltInComponentFrame("Lazy"); + case SuspenseComponent: + return describeBuiltInComponentFrame("Suspense"); + case SuspenseListComponent: + return describeBuiltInComponentFrame("SuspenseList"); + case FunctionComponent: + case IndeterminateComponent: + case SimpleMemoComponent: + return describeFunctionComponentFrame(fiber.type); + case ForwardRef: + return describeFunctionComponentFrame(fiber.type.render); + case Block: + return describeFunctionComponentFrame(fiber.type._render); + case ClassComponent: + return describeClassComponentFrame(fiber.type); + default: + return ""; + } + } + function getStackByFiberInDevAndProd(workInProgress2) { + try { + var info = ""; + var node = workInProgress2; + do { + info += describeFiber(node); + node = node.return; + } while (node); + return info; + } catch (x3) { + return "\nError generating stack: " + x3.message + "\n" + x3.stack; + } + } + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ""; + return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentName(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + return getComponentName(type.type); + case REACT_BLOCK_TYPE: + return getComponentName(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentName(init(payload)); + } catch (x3) { + return null; + } + } + } + } + return null; + } + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var current = null; + var isRendering = false; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + var owner = current._debugOwner; + if (owner !== null && typeof owner !== "undefined") { + return getComponentName(owner.type); + } + } + return null; + } + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ""; + } + return getStackByFiberInDevAndProd(current); + } + } + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + isRendering = false; + } + } + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; + current = fiber; + isRendering = false; + } + } + function setIsRendering(rendering) { + { + isRendering = rendering; + } + } + function getIsRendering() { + { + return isRendering; + } + } + function toString(value) { + return "" + value; + } + function getToStringValue(value) { + switch (typeof value) { + case "boolean": + case "number": + case "object": + case "string": + case "undefined": + return value; + default: + return ""; + } + } + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true + }; + function checkControlledValueProps(tagName, props) { + { + if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { + error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); + } + if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { + error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); + } + } + } + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio"); + } + function getTracker(node) { + return node._valueTracker; + } + function detachTracker(node) { + node._valueTracker = null; + } + function getValueFromNode(node) { + var value = ""; + if (!node) { + return value; + } + if (isCheckable(node)) { + value = node.checked ? "true" : "false"; + } else { + value = node.value; + } + return value; + } + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? "checked" : "value"; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + var currentValue = "" + node[valueField]; + if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") { + return; + } + var get2 = descriptor.get, set2 = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function() { + return get2.call(this); + }, + set: function(value) { + currentValue = "" + value; + set2.call(this, value); + } + }); + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable + }); + var tracker = { + getValue: function() { + return currentValue; + }, + setValue: function(value) { + currentValue = "" + value; + }, + stopTracking: function() { + detachTracker(node); + delete node[valueField]; + } + }; + return tracker; + } + function track(node) { + if (getTracker(node)) { + return; + } + node._valueTracker = trackValueOnNode(node); + } + function updateValueIfChanged(node) { + if (!node) { + return false; + } + var tracker = getTracker(node); + if (!tracker) { + return true; + } + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + return false; + } + function getActiveElement(doc) { + doc = doc || (typeof document !== "undefined" ? document : void 0); + if (typeof doc === "undefined") { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e3) { + return doc.body; + } + } + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + function isControlled(props) { + var usesChecked = props.type === "checkbox" || props.type === "radio"; + return usesChecked ? props.checked != null : props.value != null; + } + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + var hostProps = _assign({}, props, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: checked != null ? checked : node._wrapperState.initialChecked + }); + return hostProps; + } + function initWrapperState(element, props) { + { + checkControlledValueProps("input", props); + if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) { + error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnCheckedDefaultChecked = true; + } + if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) { + error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnValueDefaultValue = true; + } + } + var node = element; + var defaultValue = props.defaultValue == null ? "" : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props) + }; + } + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + if (checked != null) { + setValueForProperty(node, "checked", checked, false); + } + } + function updateWrapper(element, props) { + var node = element; + { + var controlled = isControlled(props); + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnUncontrolledToControlled = true; + } + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnControlledToUncontrolled = true; + } + } + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + if (value != null) { + if (type === "number") { + if (value === 0 && node.value === "" || node.value != value) { + node.value = toString(value); + } + } else if (node.value !== toString(value)) { + node.value = toString(value); + } + } else if (type === "submit" || type === "reset") { + node.removeAttribute("value"); + return; + } + { + if (props.hasOwnProperty("value")) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty("defaultValue")) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + { + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + function postMountWrapper(element, props, isHydrating2) { + var node = element; + if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) { + var type = props.type; + var isButton = type === "submit" || type === "reset"; + if (isButton && (props.value === void 0 || props.value === null)) { + return; + } + var initialValue = toString(node._wrapperState.initialValue); + if (!isHydrating2) { + { + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + { + node.defaultValue = initialValue; + } + } + var name = node.name; + if (name !== "") { + node.name = ""; + } + { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + if (name !== "") { + node.name = name; + } + } + function restoreControlledState(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + function updateNamedCousins(rootNode, props) { + var name = props.name; + if (props.type === "radio" && name != null) { + var queryRoot = rootNode; + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'); + for (var i3 = 0; i3 < group.length; i3++) { + var otherNode = group[i3]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + var otherProps = getFiberCurrentPropsFromNode(otherNode); + if (!otherProps) { + { + throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."); + } + } + updateValueIfChanged(otherNode); + updateWrapper(otherNode, otherProps); + } + } + } + function setDefaultValue(node, type, value) { + if (type !== "number" || getActiveElement(node.ownerDocument) !== node) { + if (value == null) { + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); + } + } + } + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + function flattenChildren(children) { + var content = ""; + React4.Children.forEach(children, function(child) { + if (child == null) { + return; + } + content += child; + }); + return content; + } + function validateProps(element, props) { + { + if (typeof props.children === "object" && props.children !== null) { + React4.Children.forEach(props.children, function(child) { + if (child == null) { + return; + } + if (typeof child === "string" || typeof child === "number") { + return; + } + if (typeof child.type !== "string") { + return; + } + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + error("Only strings and numbers are supported as