diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json index b977c25..1e23978 100644 --- a/.obsidian/core-plugins.json +++ b/.obsidian/core-plugins.json @@ -27,5 +27,7 @@ "file-recovery": true, "publish": false, "sync": true, - "webviewer": false + "webviewer": false, + "footnotes": false, + "bases": true } \ No newline at end of file diff --git a/.obsidian/plugins/longform/data.json b/.obsidian/plugins/longform/data.json index 6f031b8..6262d20 100644 --- a/.obsidian/plugins/longform/data.json +++ b/.obsidian/plugins/longform/data.json @@ -5,6 +5,103 @@ "userScriptFolder": null, "sessionStorage": "data", "sessions": [ + { + "start": "2025-08-30T17:12:22.053Z", + "total": 0, + "drafts": { + "Stories/The Reed Remembers Her/Index.md": { + "total": 0, + "scenes": { + "1.1 Drifting Embers": 0 + } + }, + "Stories/Crown of Blood/Index.md": { + "total": 0, + "scenes": { + "C1S1 Snow on the towers and siege": 0, + "C1S2 Marcas preparing for the Siege": 0, + "C1S3 - Telaryn talking to her father": 0, + "C1S4 - Telaryn and Alisha": 0, + "C1S5 - The King rides": 0, + "C2S1 - The king is slain": 0, + "C2S2 - The gates are broken": 0, + "C2S3 - Arguing before the court": 0, + "C3S1 - To the Hall of Kings": 0, + "C3S2 - Alisha refuses to be left behind": 0, + "C3S3 - Whispers in Stone": 0, + "C3S4 - Blood That Binds": 0, + "C3S5 - The Old Gate": 0, + "Interlude - Cinder in the Halls": 0, + "C4S1 - Foothills": 0, + "C4S2 - Steel in Snow": 0, + "C4S3 - The Last Watch": 0, + "C4S4 - The Choice": 0, + "C4S5 - Winter's Edge": 0, + "Interlude - What the Dead Remember": 0, + "C4.1S1 - The Weight of Survival": 0, + "C4.1S2 - The Broken Garison": 0, + "C4.1S3 - Dreams beneath the ice": 0, + "C4.2S1 - Wounds in Silence": 0, + "C4.2S2 - Glimpse of the Past": 0, + "C4.2S3 - Nightfall Confession": 0, + "C4.2S4 - Foreshadowed Change": 0, + "C4.3S1 - Dust-Laden Past": 0, + "C4.3S2 - Sword of Fireless Flame": 0, + "C4.3S3 - Candle before the forgotten": 0, + "C4.4S1 - Morning Drills": 0, + "C4.4S2 - Ghosts of the Journey": 0, + "C4.4S3 - A Quiet Talk": 0, + "C4.4S4 - Banner in the Wind": 0, + "C4.5S1 - Scouts Return": 0, + "C4.5S2 - Decision atop the Walls": 0, + "C4.5S3 - Gathering the Loyals": 0, + "C4.5S4 - The Chosen Few": 0, + "Interlude - The Cold Trail": 0, + "C5S1 - The Veyari": 0, + "C5S2 - The Blood and the Stone": 0, + "C5S3 - What stirs below": 0, + "C6S1 - Erased Histories": 0, + "C6S2 - The Last to Remember": 0, + "C6S3 - The Fregment's Path": 0, + "C6S4 - Embers and Distance": 0, + "C6S4 - Whispers in the nIght": 0, + "C6S5 - The Leaving": 0, + "C7S1 - Transition": 0, + "C7S2 - Movement Reported": 0, + "C7S3 - Trap above the cloudline": 0, + "C7S4 - Avalanche Rite": 0, + "C7S5 - Aftermath": 0, + "C8S1 - Mouth of the Mountain": 0, + "C8S2 - Awaken the Gate": 0, + "C8S3 - Into the Darkness": 0, + "Interlude - The Limits of Discipline": 0, + "C9S1 - Deeper into the Keep": 0, + "C9S2 - Exploring the Keep": 0, + "C9S3 - Blood and Broken Sigil": 0, + "C10S1 - Descent": 0, + "C10S2 - The Whispering Blade": 0, + "C10S3 - Moment of Choice": 0, + "C10S4 - Drawing Ashmire": 0, + "Interlude - Raw Power": 0, + "C11S1 - The Price": 0, + "C11S2 - The Killing": 0, + "C11S3 - The Power": 0, + "C12S1 - She Returns": 0, + "C12S2 - Aftermath": 0, + "C12S3 - Alishas Gone": 0, + "C12S4 - Now what": 0, + "C13S1 - Return to village": 0, + "C13S2 - Atop the mountai": 0, + "C13S3 - The Debate": 0, + "C13S4 - Bargain with the Storm": 0, + "C13S5 - Conquest of Spirits": 0, + "C13S6 - Reckogning": 0, + "C13S7 - The Banner Rises": 0, + "Epilogue - The Sound Before the Storm": 0 + } + } + } + }, { "start": "2025-08-05T07:19:42.055Z", "total": 0, diff --git a/.obsidian/plugins/novel-word-count/data.json b/.obsidian/plugins/novel-word-count/data.json index 6dcfe0d..7eeb206 100644 --- a/.obsidian/plugins/novel-word-count/data.json +++ b/.obsidian/plugins/novel-word-count/data.json @@ -69,88 +69,7 @@ "debugMode": false }, "cachedCounts": { - "Rules/Skills.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 4792, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 11.98, - "characterCount": 34669, - "nonWhitespaceCharacterCount": 28393, - "newlineCount": 319, - "readingTimeInMinutes": 18.08301886792453, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433055, - "modifiedDate": 1753978989116, - "sizeInBytes": 34845, - "sessionStart": { - "noteCount": 1, - "pageCount": 11.98, - "wordCount": 4792, - "characterCount": 34669, - "nonWhitespaceCharacterCount": 28393, - "newlineCount": 319 - } - }, - "Rules/Combat.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 4911, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 12.2775, - "characterCount": 34845, - "nonWhitespaceCharacterCount": 29057, - "newlineCount": 464, - "readingTimeInMinutes": 18.532075471698114, - "linkCount": 2, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433083, - "modifiedDate": 1754169035564, - "sizeInBytes": 34956, - "sessionStart": { - "noteCount": 1, - "pageCount": 12.2775, - "wordCount": 4911, - "characterCount": 34845, - "nonWhitespaceCharacterCount": 29057, - "newlineCount": 464 - } - }, - "Rules/🎭 Social Intrigue.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 6735, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 16.8375, - "characterCount": 56590, - "nonWhitespaceCharacterCount": 42185, - "newlineCount": 815, - "readingTimeInMinutes": 25.41509433962264, - "linkCount": 1, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433148, - "modifiedDate": 1750713817500, - "sizeInBytes": 57090, - "sessionStart": { - "noteCount": 1, - "pageCount": 16.8375, - "wordCount": 6735, - "characterCount": 56590, - "nonWhitespaceCharacterCount": 42185, - "newlineCount": 815 - } - }, - "Rules/Untitled.md": { + "emberwhim-icon.png.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, @@ -165,8 +84,8 @@ "linkCount": 0, "embedCount": 0, "aliases": null, - "createdDate": 1754169104272, - "modifiedDate": 1754169104272, + "createdDate": 1756573898051, + "modifiedDate": 1756573898051, "sizeInBytes": 0, "sessionStart": { "noteCount": 1, @@ -177,2760 +96,6 @@ "newlineCount": 0 } }, - "Rules/Spirits & Dominion/Spirits and Their Power.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2069, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 5.1725, - "characterCount": 15882, - "nonWhitespaceCharacterCount": 12694, - "newlineCount": 273, - "readingTimeInMinutes": 7.807547169811321, - "linkCount": 1, - "embedCount": 0, - "aliases": null, - "createdDate": 1754256416268, - "modifiedDate": 1754426666864, - "sizeInBytes": 16021, - "sessionStart": { - "noteCount": 1, - "pageCount": 3.9525, - "wordCount": 1581, - "characterCount": 11782, - "nonWhitespaceCharacterCount": 9450, - "newlineCount": 219 - } - }, - "Rules/Spirits & Dominion/Almanach/_Structure.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 444, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.11, - "characterCount": 4156, - "nonWhitespaceCharacterCount": 3169, - "newlineCount": 140, - "readingTimeInMinutes": 1.6754716981132076, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754304081978, - "modifiedDate": 1754304123190, - "sizeInBytes": 4240, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.11, - "wordCount": 444, - "characterCount": 4156, - "nonWhitespaceCharacterCount": 3169, - "newlineCount": 140 - } - }, - "Rules/Spirits & Dominion/Almanach/Spirit Creation Framework.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 653, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.6325, - "characterCount": 4946, - "nonWhitespaceCharacterCount": 4053, - "newlineCount": 174, - "readingTimeInMinutes": 2.4641509433962265, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754344263767, - "modifiedDate": 1754344273488, - "sizeInBytes": 5050, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.6325, - "wordCount": 653, - "characterCount": 4946, - "nonWhitespaceCharacterCount": 4053, - "newlineCount": 174 - } - }, - "Rules/Spirits & Dominion/Dominion Almanach.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2301, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 5.7525, - "characterCount": 15036, - "nonWhitespaceCharacterCount": 12485, - "newlineCount": 201, - "readingTimeInMinutes": 8.683018867924527, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754257115459, - "modifiedDate": 1754258624389, - "sizeInBytes": 15185, - "sessionStart": { - "noteCount": 1, - "pageCount": 5.7525, - "wordCount": 2301, - "characterCount": 15036, - "nonWhitespaceCharacterCount": 12485, - "newlineCount": 201 - } - }, - "Rules/Playtest/Playtest Feedback 2025-08-01.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 122, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.305, - "characterCount": 775, - "nonWhitespaceCharacterCount": 640, - "newlineCount": 14, - "readingTimeInMinutes": 0.46037735849056605, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754169112398, - "modifiedDate": 1754197024539, - "sizeInBytes": 783, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.305, - "wordCount": 122, - "characterCount": 775, - "nonWhitespaceCharacterCount": 640, - "newlineCount": 14 - } - }, - "Rules/Magic Traditions/Pact Magic – Power Through Promises.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1230, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 3.075, - "characterCount": 11005, - "nonWhitespaceCharacterCount": 7639, - "newlineCount": 138, - "readingTimeInMinutes": 4.6415094339622645, - "linkCount": 17, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435448, - "modifiedDate": 1753998917969, - "sizeInBytes": 11087, - "sessionStart": { - "noteCount": 1, - "pageCount": 3.075, - "wordCount": 1230, - "characterCount": 11005, - "nonWhitespaceCharacterCount": 7639, - "newlineCount": 138 - } - }, - "Rules/Magic Traditions/_Magic Traditions.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 837, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.0925, - "characterCount": 5851, - "nonWhitespaceCharacterCount": 4891, - "newlineCount": 112, - "readingTimeInMinutes": 3.158490566037736, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435374, - "modifiedDate": 1753652055051, - "sizeInBytes": 5900, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.0925, - "wordCount": 837, - "characterCount": 5851, - "nonWhitespaceCharacterCount": 4891, - "newlineCount": 112 - } - }, - "Rules/Magic Traditions/Spirit Binding – Chaincraft, The Yoke.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1463, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 3.6575, - "characterCount": 10185, - "nonWhitespaceCharacterCount": 8566, - "newlineCount": 113, - "readingTimeInMinutes": 5.520754716981132, - "linkCount": 36, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435401, - "modifiedDate": 1753998939169, - "sizeInBytes": 10259, - "sessionStart": { - "noteCount": 1, - "pageCount": 3.6575, - "wordCount": 1463, - "characterCount": 10185, - "nonWhitespaceCharacterCount": 8566, - "newlineCount": 113 - } - }, - "Rules/Magic Traditions/Blood Sorcery – The Scarlet Path.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2115, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 5.2875, - "characterCount": 17388, - "nonWhitespaceCharacterCount": 14144, - "newlineCount": 203, - "readingTimeInMinutes": 7.981132075471698, - "linkCount": 31, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435420, - "modifiedDate": 1753998901538, - "sizeInBytes": 17532, - "sessionStart": { - "noteCount": 1, - "pageCount": 5.2875, - "wordCount": 2115, - "characterCount": 17388, - "nonWhitespaceCharacterCount": 14144, - "newlineCount": 203 - } - }, - "Rules/Assets/Rules Overview.pptx": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754040525551, - "modifiedDate": 1754055955257, - "sizeInBytes": 3814133, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "Rules/Assets/Rules Overview.pdf": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754040542461, - "modifiedDate": 1754040542477, - "sizeInBytes": 237618, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "Rules/Assets/Character Sheet.pptx": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031435543, - "modifiedDate": 1754056829607, - "sizeInBytes": 5398892, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "Rules/Assets/Character Sheet.pdf": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031435591, - "modifiedDate": 1754056844849, - "sizeInBytes": 180895, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "Rules/Dramatic Systems/Pursuit.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 688, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.72, - "characterCount": 4445, - "nonWhitespaceCharacterCount": 3696, - "newlineCount": 62, - "readingTimeInMinutes": 2.5962264150943395, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435528, - "modifiedDate": 1753701922279, - "sizeInBytes": 4593, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.72, - "wordCount": 688, - "characterCount": 4445, - "nonWhitespaceCharacterCount": 3696, - "newlineCount": 62 - } - }, - "Rules/Dramatic Systems/Fatigue.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 431, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.0775, - "characterCount": 2884, - "nonWhitespaceCharacterCount": 2431, - "newlineCount": 34, - "readingTimeInMinutes": 1.6264150943396227, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435496, - "modifiedDate": 1753702183681, - "sizeInBytes": 2934, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.0775, - "wordCount": 431, - "characterCount": 2884, - "nonWhitespaceCharacterCount": 2431, - "newlineCount": 34 - } - }, - "Rules/Dramatic Systems/Corruption.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1655, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 4.1375, - "characterCount": 11690, - "nonWhitespaceCharacterCount": 9322, - "newlineCount": 133, - "readingTimeInMinutes": 6.245283018867925, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435480, - "modifiedDate": 1753998745739, - "sizeInBytes": 12018, - "sessionStart": { - "noteCount": 1, - "pageCount": 4.1375, - "wordCount": 1655, - "characterCount": 11690, - "nonWhitespaceCharacterCount": 9322, - "newlineCount": 133 - } - }, - "Rules/Character Creation.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1431, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 3.5775, - "characterCount": 12948, - "nonWhitespaceCharacterCount": 10126, - "newlineCount": 204, - "readingTimeInMinutes": 5.4, - "linkCount": 0, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031433132, - "modifiedDate": 1754060049011, - "sizeInBytes": 13027, - "sessionStart": { - "noteCount": 1, - "pageCount": 3.5775, - "wordCount": 1431, - "characterCount": 12948, - "nonWhitespaceCharacterCount": 10126, - "newlineCount": 204 - } - }, - "Rules/Base Rules.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2717, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 6.7925, - "characterCount": 21092, - "nonWhitespaceCharacterCount": 17293, - "newlineCount": 268, - "readingTimeInMinutes": 10.252830188679246, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433098, - "modifiedDate": 1754035969031, - "sizeInBytes": 21190, - "sessionStart": { - "noteCount": 1, - "pageCount": 6.7925, - "wordCount": 2717, - "characterCount": 21092, - "nonWhitespaceCharacterCount": 17293, - "newlineCount": 268 - } - }, - "Rules/Background Table.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 413, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.0325, - "characterCount": 5444, - "nonWhitespaceCharacterCount": 3978, - "newlineCount": 63, - "readingTimeInMinutes": 1.558490566037736, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433219, - "modifiedDate": 1753981554588, - "sizeInBytes": 5444, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.0325, - "wordCount": 413, - "characterCount": 5444, - "nonWhitespaceCharacterCount": 3978, - "newlineCount": 63 - } - }, - "Rules/archive/Combat.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 5330, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 13.325, - "characterCount": 38534, - "nonWhitespaceCharacterCount": 32731, - "newlineCount": 539, - "readingTimeInMinutes": 20.11320754716981, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433348, - "modifiedDate": 1747433045606, - "sizeInBytes": 38859, - "sessionStart": { - "noteCount": 1, - "pageCount": 13.325, - "wordCount": 5330, - "characterCount": 38534, - "nonWhitespaceCharacterCount": 32731, - "newlineCount": 539 - } - }, - "Rules/archive/Quick Start.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 486, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.215, - "characterCount": 3722, - "nonWhitespaceCharacterCount": 3150, - "newlineCount": 72, - "readingTimeInMinutes": 1.8339622641509434, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433248, - "modifiedDate": 1747167084706, - "sizeInBytes": 3762, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.215, - "wordCount": 486, - "characterCount": 3722, - "nonWhitespaceCharacterCount": 3150, - "newlineCount": 72 - } - }, - "Rules/archive/Marked Dice.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 294, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.735, - "characterCount": 3236, - "nonWhitespaceCharacterCount": 1696, - "newlineCount": 21, - "readingTimeInMinutes": 1.109433962264151, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433281, - "modifiedDate": 1748348576782, - "sizeInBytes": 3238, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.735, - "wordCount": 294, - "characterCount": 3236, - "nonWhitespaceCharacterCount": 1696, - "newlineCount": 21 - } - }, - "Rules/archive/Attributes.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 149, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.3725, - "characterCount": 1921, - "nonWhitespaceCharacterCount": 1187, - "newlineCount": 24, - "readingTimeInMinutes": 0.5622641509433962, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433298, - "modifiedDate": 1748354621105, - "sizeInBytes": 1923, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.3725, - "wordCount": 149, - "characterCount": 1921, - "nonWhitespaceCharacterCount": 1187, - "newlineCount": 24 - } - }, - "Rules/archive/Actions.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 58, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.145, - "characterCount": 381, - "nonWhitespaceCharacterCount": 307, - "newlineCount": 9, - "readingTimeInMinutes": 0.2188679245283019, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433319, - "modifiedDate": 1747283206448, - "sizeInBytes": 397, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.145, - "wordCount": 58, - "characterCount": 381, - "nonWhitespaceCharacterCount": 307, - "newlineCount": 9 - } - }, - "Rules/Advancement & Growth.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 681, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.7025, - "characterCount": 4921, - "nonWhitespaceCharacterCount": 3793, - "newlineCount": 159, - "readingTimeInMinutes": 2.569811320754717, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433198, - "modifiedDate": 1753893633682, - "sizeInBytes": 4965, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.7025, - "wordCount": 681, - "characterCount": 4921, - "nonWhitespaceCharacterCount": 3793, - "newlineCount": 159 - } - }, - "Rules/Ability Trees.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 914, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.285, - "characterCount": 6977, - "nonWhitespaceCharacterCount": 5522, - "newlineCount": 198, - "readingTimeInMinutes": 3.449056603773585, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433165, - "modifiedDate": 1753598572970, - "sizeInBytes": 7013, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.285, - "wordCount": 914, - "characterCount": 6977, - "nonWhitespaceCharacterCount": 5522, - "newlineCount": 198 - } - }, - "Rules/Ability Trees/Skills/Social/Seduction (Presence).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 250, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.625, - "characterCount": 1573, - "nonWhitespaceCharacterCount": 1294, - "newlineCount": 17, - "readingTimeInMinutes": 0.9433962264150944, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434765, - "modifiedDate": 1753706170205, - "sizeInBytes": 1601, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.625, - "wordCount": 250, - "characterCount": 1573, - "nonWhitespaceCharacterCount": 1294, - "newlineCount": 17 - } - }, - "Rules/Ability Trees/Skills/Social/Performance (Presence).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 239, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5975, - "characterCount": 1472, - "nonWhitespaceCharacterCount": 1205, - "newlineCount": 17, - "readingTimeInMinutes": 0.9018867924528302, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434820, - "modifiedDate": 1753706191484, - "sizeInBytes": 1510, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5975, - "wordCount": 239, - "characterCount": 1472, - "nonWhitespaceCharacterCount": 1205, - "newlineCount": 17 - } - }, - "Rules/Ability Trees/Skills/Social/Persuasion (Presence).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 279, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.6975, - "characterCount": 1786, - "nonWhitespaceCharacterCount": 1465, - "newlineCount": 17, - "readingTimeInMinutes": 1.0528301886792453, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434674, - "modifiedDate": 1753706028148, - "sizeInBytes": 1834, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.6975, - "wordCount": 279, - "characterCount": 1786, - "nonWhitespaceCharacterCount": 1465, - "newlineCount": 17 - } - }, - "Rules/Ability Trees/Skills/Social/Intimidation (Presence or Might).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 230, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.575, - "characterCount": 1502, - "nonWhitespaceCharacterCount": 1231, - "newlineCount": 16, - "readingTimeInMinutes": 0.8679245283018868, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434730, - "modifiedDate": 1753706086568, - "sizeInBytes": 1528, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.575, - "wordCount": 230, - "characterCount": 1502, - "nonWhitespaceCharacterCount": 1231, - "newlineCount": 16 - } - }, - "Rules/Ability Trees/Skills/Social/Etiquette (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 255, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.6375, - "characterCount": 1597, - "nonWhitespaceCharacterCount": 1314, - "newlineCount": 17, - "readingTimeInMinutes": 0.9622641509433962, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434793, - "modifiedDate": 1753706149781, - "sizeInBytes": 1633, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.6375, - "wordCount": 255, - "characterCount": 1597, - "nonWhitespaceCharacterCount": 1314, - "newlineCount": 17 - } - }, - "Rules/Ability Trees/Skills/Social/Inquire (Wit) - Whispers & Wires.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 559, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.3975, - "characterCount": 5529, - "nonWhitespaceCharacterCount": 4103, - "newlineCount": 43, - "readingTimeInMinutes": 2.109433962264151, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434841, - "modifiedDate": 1753707497725, - "sizeInBytes": 5558, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.3975, - "wordCount": 559, - "characterCount": 5529, - "nonWhitespaceCharacterCount": 4103, - "newlineCount": 43 - } - }, - "Rules/Ability Trees/Skills/Social/Empathy (Spirit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 256, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.64, - "characterCount": 1561, - "nonWhitespaceCharacterCount": 1265, - "newlineCount": 17, - "readingTimeInMinutes": 0.9660377358490566, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434754, - "modifiedDate": 1753706118293, - "sizeInBytes": 1597, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.64, - "wordCount": 256, - "characterCount": 1561, - "nonWhitespaceCharacterCount": 1265, - "newlineCount": 17 - } - }, - "Rules/Ability Trees/Skills/Social/Deception (Cunning).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 261, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.6525, - "characterCount": 1661, - "nonWhitespaceCharacterCount": 1361, - "newlineCount": 16, - "readingTimeInMinutes": 0.9849056603773585, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434706, - "modifiedDate": 1753706057723, - "sizeInBytes": 1701, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.6525, - "wordCount": 261, - "characterCount": 1661, - "nonWhitespaceCharacterCount": 1361, - "newlineCount": 16 - } - }, - "Rules/Ability Trees/Skills/Occult/Attune (Spirit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 325, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.8125, - "characterCount": 2032, - "nonWhitespaceCharacterCount": 1676, - "newlineCount": 22, - "readingTimeInMinutes": 1.2264150943396226, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434546, - "modifiedDate": 1753705769472, - "sizeInBytes": 2068, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.8125, - "wordCount": 325, - "characterCount": 2032, - "nonWhitespaceCharacterCount": 1676, - "newlineCount": 22 - } - }, - "Rules/Ability Trees/Skills/Occult/Occultism (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 284, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.71, - "characterCount": 1766, - "nonWhitespaceCharacterCount": 1450, - "newlineCount": 18, - "readingTimeInMinutes": 1.0716981132075472, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434565, - "modifiedDate": 1753705809670, - "sizeInBytes": 1792, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.71, - "wordCount": 284, - "characterCount": 1766, - "nonWhitespaceCharacterCount": 1450, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Occult/Rituals (Focus).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 301, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.7525, - "characterCount": 1867, - "nonWhitespaceCharacterCount": 1522, - "newlineCount": 18, - "readingTimeInMinutes": 1.1358490566037736, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434514, - "modifiedDate": 1753705995421, - "sizeInBytes": 1897, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.7525, - "wordCount": 301, - "characterCount": 1867, - "nonWhitespaceCharacterCount": 1522, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Occult/Meditation (Focus).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 243, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.6075, - "characterCount": 1484, - "nonWhitespaceCharacterCount": 1199, - "newlineCount": 18, - "readingTimeInMinutes": 0.9169811320754717, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434595, - "modifiedDate": 1753705842495, - "sizeInBytes": 1508, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.6075, - "wordCount": 243, - "characterCount": 1484, - "nonWhitespaceCharacterCount": 1199, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Occult/Binding (Spirit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 268, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.67, - "characterCount": 1622, - "nonWhitespaceCharacterCount": 1310, - "newlineCount": 20, - "readingTimeInMinutes": 1.0113207547169811, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434643, - "modifiedDate": 1753705948866, - "sizeInBytes": 1658, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.67, - "wordCount": 268, - "characterCount": 1622, - "nonWhitespaceCharacterCount": 1310, - "newlineCount": 20 - } - }, - "Rules/Ability Trees/Skills/Occult/Alchemy (Focus).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 252, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.63, - "characterCount": 1558, - "nonWhitespaceCharacterCount": 1264, - "newlineCount": 18, - "readingTimeInMinutes": 0.9509433962264151, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434616, - "modifiedDate": 1753705894906, - "sizeInBytes": 1586, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.63, - "wordCount": 252, - "characterCount": 1558, - "nonWhitespaceCharacterCount": 1264, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Knowledge/Zoology (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 236, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.59, - "characterCount": 1477, - "nonWhitespaceCharacterCount": 1214, - "newlineCount": 17, - "readingTimeInMinutes": 0.8905660377358491, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434367, - "modifiedDate": 1753705597346, - "sizeInBytes": 1507, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.59, - "wordCount": 236, - "characterCount": 1477, - "nonWhitespaceCharacterCount": 1214, - "newlineCount": 17 - } - }, - "Rules/Ability Trees/Skills/Knowledge/Theology (Spirit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 235, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5875, - "characterCount": 1437, - "nonWhitespaceCharacterCount": 1173, - "newlineCount": 18, - "readingTimeInMinutes": 0.8867924528301887, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434274, - "modifiedDate": 1753705520269, - "sizeInBytes": 1467, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5875, - "wordCount": 235, - "characterCount": 1437, - "nonWhitespaceCharacterCount": 1173, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Knowledge/Philosophy (Spirit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 206, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.515, - "characterCount": 1374, - "nonWhitespaceCharacterCount": 1128, - "newlineCount": 18, - "readingTimeInMinutes": 0.7773584905660378, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434429, - "modifiedDate": 1753705656324, - "sizeInBytes": 1408, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.515, - "wordCount": 206, - "characterCount": 1374, - "nonWhitespaceCharacterCount": 1128, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Knowledge/Mechanics (Focus).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 224, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.56, - "characterCount": 1444, - "nonWhitespaceCharacterCount": 1179, - "newlineCount": 18, - "readingTimeInMinutes": 0.8452830188679246, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434399, - "modifiedDate": 1753705630352, - "sizeInBytes": 1472, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.56, - "wordCount": 224, - "characterCount": 1444, - "nonWhitespaceCharacterCount": 1179, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Knowledge/Mathematics (Focus).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 215, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5375, - "characterCount": 1385, - "nonWhitespaceCharacterCount": 1142, - "newlineCount": 18, - "readingTimeInMinutes": 0.8113207547169812, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434445, - "modifiedDate": 1753705678839, - "sizeInBytes": 1419, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5375, - "wordCount": 215, - "characterCount": 1385, - "nonWhitespaceCharacterCount": 1142, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Knowledge/Languages (Focus).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 227, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5675, - "characterCount": 1380, - "nonWhitespaceCharacterCount": 1125, - "newlineCount": 18, - "readingTimeInMinutes": 0.8566037735849057, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434309, - "modifiedDate": 1753705551928, - "sizeInBytes": 1408, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5675, - "wordCount": 227, - "characterCount": 1380, - "nonWhitespaceCharacterCount": 1125, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Knowledge/History (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 238, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.595, - "characterCount": 1532, - "nonWhitespaceCharacterCount": 1234, - "newlineCount": 18, - "readingTimeInMinutes": 0.8981132075471698, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434243, - "modifiedDate": 1753705475481, - "sizeInBytes": 1564, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.595, - "wordCount": 238, - "characterCount": 1532, - "nonWhitespaceCharacterCount": 1234, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Knowledge/Herbalism (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 215, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5375, - "characterCount": 1415, - "nonWhitespaceCharacterCount": 1171, - "newlineCount": 18, - "readingTimeInMinutes": 0.8113207547169812, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434481, - "modifiedDate": 1753705699033, - "sizeInBytes": 1443, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5375, - "wordCount": 215, - "characterCount": 1415, - "nonWhitespaceCharacterCount": 1171, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Martial/Throwing (Agility).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 316, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.79, - "characterCount": 2180, - "nonWhitespaceCharacterCount": 1758, - "newlineCount": 51, - "readingTimeInMinutes": 1.1924528301886792, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433619, - "modifiedDate": 1753599087180, - "sizeInBytes": 2208, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.79, - "wordCount": 316, - "characterCount": 2180, - "nonWhitespaceCharacterCount": 1758, - "newlineCount": 51 - } - }, - "Rules/Ability Trees/Skills/Martial/Tactics (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 350, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.875, - "characterCount": 2286, - "nonWhitespaceCharacterCount": 1834, - "newlineCount": 51, - "readingTimeInMinutes": 1.320754716981132, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433581, - "modifiedDate": 1753599065979, - "sizeInBytes": 2312, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.875, - "wordCount": 350, - "characterCount": 2286, - "nonWhitespaceCharacterCount": 1834, - "newlineCount": 51 - } - }, - "Rules/Ability Trees/Skills/Martial/Siegecraft (Focus).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 356, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.89, - "characterCount": 2489, - "nonWhitespaceCharacterCount": 2026, - "newlineCount": 52, - "readingTimeInMinutes": 1.3433962264150943, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433632, - "modifiedDate": 1753599164644, - "sizeInBytes": 2523, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.89, - "wordCount": 356, - "characterCount": 2489, - "nonWhitespaceCharacterCount": 2026, - "newlineCount": 52 - } - }, - "Rules/Ability Trees/Skills/Martial/Dodge (Agility).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 390, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.975, - "characterCount": 2673, - "nonWhitespaceCharacterCount": 2167, - "newlineCount": 58, - "readingTimeInMinutes": 1.471698113207547, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433531, - "modifiedDate": 1753598964657, - "sizeInBytes": 2709, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.975, - "wordCount": 390, - "characterCount": 2673, - "nonWhitespaceCharacterCount": 2167, - "newlineCount": 58 - } - }, - "Rules/Ability Trees/Skills/Martial/Shields (Might).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 360, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9, - "characterCount": 2458, - "nonWhitespaceCharacterCount": 1982, - "newlineCount": 58, - "readingTimeInMinutes": 1.3584905660377358, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433548, - "modifiedDate": 1753599012705, - "sizeInBytes": 2492, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9, - "wordCount": 360, - "characterCount": 2458, - "nonWhitespaceCharacterCount": 1982, - "newlineCount": 58 - } - }, - "Rules/Ability Trees/Skills/Martial/Brawl (Fortitude).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 362, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.905, - "characterCount": 2576, - "nonWhitespaceCharacterCount": 2091, - "newlineCount": 62, - "readingTimeInMinutes": 1.3660377358490565, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433465, - "modifiedDate": 1753598853589, - "sizeInBytes": 2618, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.905, - "wordCount": 362, - "characterCount": 2576, - "nonWhitespaceCharacterCount": 2091, - "newlineCount": 62 - } - }, - "Rules/Ability Trees/Skills/Martial/Melee (Might).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 240, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.6, - "characterCount": 1630, - "nonWhitespaceCharacterCount": 1306, - "newlineCount": 40, - "readingTimeInMinutes": 0.9056603773584906, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433433, - "modifiedDate": 1753598792554, - "sizeInBytes": 1658, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.6, - "wordCount": 240, - "characterCount": 1630, - "nonWhitespaceCharacterCount": 1306, - "newlineCount": 40 - } - }, - "Rules/Ability Trees/Skills/Martial/Archery (Agility).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 388, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.97, - "characterCount": 2549, - "nonWhitespaceCharacterCount": 2045, - "newlineCount": 56, - "readingTimeInMinutes": 1.4641509433962263, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433499, - "modifiedDate": 1753598899319, - "sizeInBytes": 2587, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.97, - "wordCount": 388, - "characterCount": 2549, - "nonWhitespaceCharacterCount": 2045, - "newlineCount": 56 - } - }, - "Rules/Ability Trees/Skills/Investigation/Smuggling (Cunning).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 204, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.51, - "characterCount": 1310, - "nonWhitespaceCharacterCount": 1078, - "newlineCount": 18, - "readingTimeInMinutes": 0.769811320754717, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434219, - "modifiedDate": 1753705391280, - "sizeInBytes": 1340, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.51, - "wordCount": 204, - "characterCount": 1310, - "nonWhitespaceCharacterCount": 1078, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Investigation/Subterfuge (Cunning).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 218, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.545, - "characterCount": 1436, - "nonWhitespaceCharacterCount": 1178, - "newlineCount": 18, - "readingTimeInMinutes": 0.8226415094339623, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434119, - "modifiedDate": 1753704944762, - "sizeInBytes": 1466, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.545, - "wordCount": 218, - "characterCount": 1436, - "nonWhitespaceCharacterCount": 1178, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Investigation/Streetwise (Cunning).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 213, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5325, - "characterCount": 1359, - "nonWhitespaceCharacterCount": 1107, - "newlineCount": 17, - "readingTimeInMinutes": 0.8037735849056604, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434085, - "modifiedDate": 1753704668851, - "sizeInBytes": 1391, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5325, - "wordCount": 213, - "characterCount": 1359, - "nonWhitespaceCharacterCount": 1107, - "newlineCount": 17 - } - }, - "Rules/Ability Trees/Skills/Investigation/Investigation (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 239, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5975, - "characterCount": 1520, - "nonWhitespaceCharacterCount": 1253, - "newlineCount": 17, - "readingTimeInMinutes": 0.9018867924528302, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434069, - "modifiedDate": 1753704385669, - "sizeInBytes": 1550, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5975, - "wordCount": 239, - "characterCount": 1520, - "nonWhitespaceCharacterCount": 1253, - "newlineCount": 17 - } - }, - "Rules/Ability Trees/Skills/Investigation/Forgery (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 205, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5125, - "characterCount": 1357, - "nonWhitespaceCharacterCount": 1124, - "newlineCount": 18, - "readingTimeInMinutes": 0.7735849056603774, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434142, - "modifiedDate": 1753704977051, - "sizeInBytes": 1381, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5125, - "wordCount": 205, - "characterCount": 1357, - "nonWhitespaceCharacterCount": 1124, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Investigation/Observation (Wit).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 241, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.6025, - "characterCount": 1498, - "nonWhitespaceCharacterCount": 1229, - "newlineCount": 18, - "readingTimeInMinutes": 0.909433962264151, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434038, - "modifiedDate": 1753703830156, - "sizeInBytes": 1528, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.6025, - "wordCount": 241, - "characterCount": 1498, - "nonWhitespaceCharacterCount": 1229, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Investigation/Evasion (Agility).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 183, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.4575, - "characterCount": 1163, - "nonWhitespaceCharacterCount": 952, - "newlineCount": 18, - "readingTimeInMinutes": 0.690566037735849, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434180, - "modifiedDate": 1753705343610, - "sizeInBytes": 1191, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.4575, - "wordCount": 183, - "characterCount": 1163, - "nonWhitespaceCharacterCount": 952, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Investigation/Interrogation (Presence).md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 223, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5575, - "characterCount": 1440, - "nonWhitespaceCharacterCount": 1188, - "newlineCount": 18, - "readingTimeInMinutes": 0.8415094339622642, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434164, - "modifiedDate": 1753705297819, - "sizeInBytes": 1468, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5575, - "wordCount": 223, - "characterCount": 1440, - "nonWhitespaceCharacterCount": 1188, - "newlineCount": 18 - } - }, - "Rules/Ability Trees/Skills/Exploration/Stealth.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 321, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.8025, - "characterCount": 2134, - "nonWhitespaceCharacterCount": 1784, - "newlineCount": 24, - "readingTimeInMinutes": 1.211320754716981, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433781, - "modifiedDate": 1753701922265, - "sizeInBytes": 2198, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.8025, - "wordCount": 321, - "characterCount": 2134, - "nonWhitespaceCharacterCount": 1784, - "newlineCount": 24 - } - }, - "Rules/Ability Trees/Skills/Exploration/Tracking.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 389, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9725, - "characterCount": 2471, - "nonWhitespaceCharacterCount": 2053, - "newlineCount": 24, - "readingTimeInMinutes": 1.4679245283018867, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433698, - "modifiedDate": 1753701982950, - "sizeInBytes": 2559, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9725, - "wordCount": 389, - "characterCount": 2471, - "nonWhitespaceCharacterCount": 2053, - "newlineCount": 24 - } - }, - "Rules/Ability Trees/Skills/Exploration/Ride.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 363, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9075, - "characterCount": 2324, - "nonWhitespaceCharacterCount": 1933, - "newlineCount": 24, - "readingTimeInMinutes": 1.369811320754717, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433748, - "modifiedDate": 1753701922248, - "sizeInBytes": 2384, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9075, - "wordCount": 363, - "characterCount": 2324, - "nonWhitespaceCharacterCount": 1933, - "newlineCount": 24 - } - }, - "Rules/Ability Trees/Skills/Exploration/Swimming.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 281, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.7025, - "characterCount": 1750, - "nonWhitespaceCharacterCount": 1436, - "newlineCount": 39, - "readingTimeInMinutes": 1.060377358490566, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433817, - "modifiedDate": 1753701922272, - "sizeInBytes": 1776, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.7025, - "wordCount": 281, - "characterCount": 1750, - "nonWhitespaceCharacterCount": 1436, - "newlineCount": 39 - } - }, - "Rules/Ability Trees/Skills/Exploration/Navigation.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 358, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.895, - "characterCount": 2351, - "nonWhitespaceCharacterCount": 1966, - "newlineCount": 24, - "readingTimeInMinutes": 1.350943396226415, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433764, - "modifiedDate": 1753701958937, - "sizeInBytes": 2417, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.895, - "wordCount": 358, - "characterCount": 2351, - "nonWhitespaceCharacterCount": 1966, - "newlineCount": 24 - } - }, - "Rules/Ability Trees/Skills/Exploration/Survival.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 378, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.945, - "characterCount": 2466, - "nonWhitespaceCharacterCount": 2061, - "newlineCount": 24, - "readingTimeInMinutes": 1.4264150943396225, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433725, - "modifiedDate": 1753701922213, - "sizeInBytes": 2532, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.945, - "wordCount": 378, - "characterCount": 2466, - "nonWhitespaceCharacterCount": 2061, - "newlineCount": 24 - } - }, - "Rules/Ability Trees/Skills/Exploration/Climbing (Might) - Heights Unbound.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 615, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5375, - "characterCount": 6900, - "nonWhitespaceCharacterCount": 4702, - "newlineCount": 63, - "readingTimeInMinutes": 2.3207547169811322, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433665, - "modifiedDate": 1753724617968, - "sizeInBytes": 6935, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5375, - "wordCount": 615, - "characterCount": 6900, - "nonWhitespaceCharacterCount": 4702, - "newlineCount": 63 - } - }, - "Rules/Ability Trees/Skills/Exploration/Athletics (Might) - Unbound Motion.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 571, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4275, - "characterCount": 6473, - "nonWhitespaceCharacterCount": 4431, - "newlineCount": 63, - "readingTimeInMinutes": 2.1547169811320757, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433842, - "modifiedDate": 1753724202036, - "sizeInBytes": 6502, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4275, - "wordCount": 571, - "characterCount": 6473, - "nonWhitespaceCharacterCount": 4431, - "newlineCount": 63 - } - }, - "Rules/Ability Trees/Skills/Crafting/Weaving (Wit) - Threads of Fate.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 639, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5975, - "characterCount": 7013, - "nonWhitespaceCharacterCount": 5046, - "newlineCount": 53, - "readingTimeInMinutes": 2.4113207547169813, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433896, - "modifiedDate": 1753723770736, - "sizeInBytes": 7037, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5975, - "wordCount": 639, - "characterCount": 7013, - "nonWhitespaceCharacterCount": 5046, - "newlineCount": 53 - } - }, - "Rules/Ability Trees/Skills/Crafting/Smithing (Might) - Forge & Fire.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 662, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.655, - "characterCount": 7598, - "nonWhitespaceCharacterCount": 5139, - "newlineCount": 56, - "readingTimeInMinutes": 2.4981132075471697, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433864, - "modifiedDate": 1753723359624, - "sizeInBytes": 7619, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.655, - "wordCount": 662, - "characterCount": 7598, - "nonWhitespaceCharacterCount": 5139, - "newlineCount": 56 - } - }, - "Rules/Ability Trees/Skills/Crafting/Medicine (Focus) - Hands of Mercy.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 624, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.56, - "characterCount": 7064, - "nonWhitespaceCharacterCount": 4872, - "newlineCount": 54, - "readingTimeInMinutes": 2.3547169811320754, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434006, - "modifiedDate": 1753709052307, - "sizeInBytes": 7073, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.56, - "wordCount": 624, - "characterCount": 7064, - "nonWhitespaceCharacterCount": 4872, - "newlineCount": 54 - } - }, - "Rules/Ability Trees/Skills/Crafting/Masonry (Might) - Pillars of Stone.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 595, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4875, - "characterCount": 7277, - "nonWhitespaceCharacterCount": 4907, - "newlineCount": 58, - "readingTimeInMinutes": 2.2452830188679247, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433990, - "modifiedDate": 1753708479888, - "sizeInBytes": 7292, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4875, - "wordCount": 595, - "characterCount": 7277, - "nonWhitespaceCharacterCount": 4907, - "newlineCount": 58 - } - }, - "Rules/Ability Trees/Skills/Crafting/Drawing (Wit) - Lines of Sight.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 621, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5525, - "characterCount": 7947, - "nonWhitespaceCharacterCount": 5081, - "newlineCount": 57, - "readingTimeInMinutes": 2.3433962264150945, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433943, - "modifiedDate": 1753708131271, - "sizeInBytes": 7970, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5525, - "wordCount": 621, - "characterCount": 7947, - "nonWhitespaceCharacterCount": 5081, - "newlineCount": 57 - } - }, - "Rules/Ability Trees/Skills/Crafting/Carpentry (Might) - Hands of the Builder.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 540, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.35, - "characterCount": 5729, - "nonWhitespaceCharacterCount": 4167, - "newlineCount": 55, - "readingTimeInMinutes": 2.0377358490566038, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433961, - "modifiedDate": 1753707628433, - "sizeInBytes": 5742, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.35, - "wordCount": 540, - "characterCount": 5729, - "nonWhitespaceCharacterCount": 4167, - "newlineCount": 55 - } - }, - "Rules/Ability Trees/Skills/Crafting/Cooking (Wit) - Fires of Hearth & Heart.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 541, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.3525, - "characterCount": 4783, - "nonWhitespaceCharacterCount": 3816, - "newlineCount": 52, - "readingTimeInMinutes": 2.0415094339622644, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433919, - "modifiedDate": 1753707884700, - "sizeInBytes": 4794, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.3525, - "wordCount": 541, - "characterCount": 4783, - "nonWhitespaceCharacterCount": 3816, - "newlineCount": 52 - } - }, - "Rules/Ability Trees/Species/Tlaxcal.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 560, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4, - "characterCount": 3430, - "nonWhitespaceCharacterCount": 2832, - "newlineCount": 31, - "readingTimeInMinutes": 2.1132075471698113, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435196, - "modifiedDate": 1753701922297, - "sizeInBytes": 3522, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4, - "wordCount": 560, - "characterCount": 3430, - "nonWhitespaceCharacterCount": 2832, - "newlineCount": 31 - } - }, - "Rules/Ability Trees/Species/Tul.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 885, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.2125, - "characterCount": 5784, - "nonWhitespaceCharacterCount": 4803, - "newlineCount": 81, - "readingTimeInMinutes": 3.339622641509434, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435164, - "modifiedDate": 1753702153425, - "sizeInBytes": 5982, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.2125, - "wordCount": 885, - "characterCount": 5784, - "nonWhitespaceCharacterCount": 4803, - "newlineCount": 81 - } - }, - "Rules/Ability Trees/Species/Akumei.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 535, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.3375, - "characterCount": 3275, - "nonWhitespaceCharacterCount": 2698, - "newlineCount": 34, - "readingTimeInMinutes": 2.018867924528302, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435151, - "modifiedDate": 1753701743773, - "sizeInBytes": 3367, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.3375, - "wordCount": 535, - "characterCount": 3275, - "nonWhitespaceCharacterCount": 2698, - "newlineCount": 34 - } - }, - "Rules/Ability Trees/First Tiers.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 493, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.2325, - "characterCount": 6389, - "nonWhitespaceCharacterCount": 3194, - "newlineCount": 30, - "readingTimeInMinutes": 1.860377358490566, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433398, - "modifiedDate": 1753984581508, - "sizeInBytes": 6393, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.2325, - "wordCount": 493, - "characterCount": 6389, - "nonWhitespaceCharacterCount": 3194, - "newlineCount": 30 - } - }, - "Rules/Ability Trees/Profession/Traditions/Spiritbinding.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 668, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.67, - "characterCount": 4604, - "nonWhitespaceCharacterCount": 3907, - "newlineCount": 33, - "readingTimeInMinutes": 2.520754716981132, - "linkCount": 20, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435259, - "modifiedDate": 1753998872718, - "sizeInBytes": 4668, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.67, - "wordCount": 668, - "characterCount": 4604, - "nonWhitespaceCharacterCount": 3907, - "newlineCount": 33 - } - }, - "Rules/Ability Trees/Profession/Traditions/Blood Sorcery – The Scarlet Path.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 908, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.27, - "characterCount": 13110, - "nonWhitespaceCharacterCount": 7346, - "newlineCount": 72, - "readingTimeInMinutes": 3.4264150943396228, - "linkCount": 9, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435274, - "modifiedDate": 1753998837570, - "sizeInBytes": 13209, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.27, - "wordCount": 908, - "characterCount": 13110, - "nonWhitespaceCharacterCount": 7346, - "newlineCount": 72 - } - }, - "Rules/Ability Trees/Profession/Traditions/Pact Magic – The Oathbound Path.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 969, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.4225, - "characterCount": 10980, - "nonWhitespaceCharacterCount": 7106, - "newlineCount": 81, - "readingTimeInMinutes": 3.6566037735849055, - "linkCount": 14, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435306, - "modifiedDate": 1753998851694, - "sizeInBytes": 11037, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.4225, - "wordCount": 969, - "characterCount": 10980, - "nonWhitespaceCharacterCount": 7106, - "newlineCount": 81 - } - }, - "Rules/Ability Trees/Profession/Spiritcaller - The Core of Magic.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 763, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.9075, - "characterCount": 8565, - "nonWhitespaceCharacterCount": 5655, - "newlineCount": 81, - "readingTimeInMinutes": 2.879245283018868, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435227, - "modifiedDate": 1753998061306, - "sizeInBytes": 8597, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.9075, - "wordCount": 763, - "characterCount": 8565, - "nonWhitespaceCharacterCount": 5655, - "newlineCount": 81 - } - }, - "Rules/Ability Trees/Profession/Shayakar/Shayakar.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 8142, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 20.355, - "characterCount": 51625, - "nonWhitespaceCharacterCount": 42892, - "newlineCount": 611, - "readingTimeInMinutes": 30.724528301886792, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435338, - "modifiedDate": 1753701922228, - "sizeInBytes": 52980, - "sessionStart": { - "noteCount": 1, - "pageCount": 20.355, - "wordCount": 8142, - "characterCount": 51625, - "nonWhitespaceCharacterCount": 42892, - "newlineCount": 611 - } - }, - "Rules/Ability Trees/Ability Trees.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 651, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.6275, - "characterCount": 4543, - "nonWhitespaceCharacterCount": 3814, - "newlineCount": 84, - "readingTimeInMinutes": 2.456603773584906, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031433381, - "modifiedDate": 1753880818881, - "sizeInBytes": 4575, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.6275, - "wordCount": 651, - "characterCount": 4543, - "nonWhitespaceCharacterCount": 3814, - "newlineCount": 84 - } - }, - "Rules/Ability Trees/Cultures/Lao shan.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 644, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.61, - "characterCount": 4214, - "nonWhitespaceCharacterCount": 3524, - "newlineCount": 42, - "readingTimeInMinutes": 2.430188679245283, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434975, - "modifiedDate": 1753701922203, - "sizeInBytes": 4340, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.61, - "wordCount": 644, - "characterCount": 4214, - "nonWhitespaceCharacterCount": 3524, - "newlineCount": 42 - } - }, - "Rules/Ability Trees/Cultures/Temerian Empire.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 563, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4075, - "characterCount": 3779, - "nonWhitespaceCharacterCount": 3172, - "newlineCount": 39, - "readingTimeInMinutes": 2.1245283018867926, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434959, - "modifiedDate": 1753702039339, - "sizeInBytes": 3895, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4075, - "wordCount": 563, - "characterCount": 3779, - "nonWhitespaceCharacterCount": 3172, - "newlineCount": 39 - } - }, - "Rules/Ability Trees/Cultures/Shogunatr culture.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 623, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5575, - "characterCount": 3925, - "nonWhitespaceCharacterCount": 3256, - "newlineCount": 42, - "readingTimeInMinutes": 2.3509433962264152, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435030, - "modifiedDate": 1753701922234, - "sizeInBytes": 4039, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5575, - "wordCount": 623, - "characterCount": 3925, - "nonWhitespaceCharacterCount": 3256, - "newlineCount": 42 - } - }, - "Rules/Ability Trees/Cultures/Pharos .md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 583, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4575, - "characterCount": 3860, - "nonWhitespaceCharacterCount": 3233, - "newlineCount": 40, - "readingTimeInMinutes": 2.2, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435101, - "modifiedDate": 1753701971772, - "sizeInBytes": 3968, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4575, - "wordCount": 583, - "characterCount": 3860, - "nonWhitespaceCharacterCount": 3233, - "newlineCount": 40 - } - }, - "Rules/Ability Trees/Cultures/Mountain folk.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 532, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.33, - "characterCount": 3322, - "nonWhitespaceCharacterCount": 2746, - "newlineCount": 36, - "readingTimeInMinutes": 2.0075471698113208, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435054, - "modifiedDate": 1753701922256, - "sizeInBytes": 3436, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.33, - "wordCount": 532, - "characterCount": 3322, - "nonWhitespaceCharacterCount": 2746, - "newlineCount": 36 - } - }, - "Rules/Ability Trees/Cultures/Myou tree.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 575, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4375, - "characterCount": 3459, - "nonWhitespaceCharacterCount": 2842, - "newlineCount": 30, - "readingTimeInMinutes": 2.169811320754717, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435007, - "modifiedDate": 1753701922220, - "sizeInBytes": 3553, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4375, - "wordCount": 575, - "characterCount": 3459, - "nonWhitespaceCharacterCount": 2842, - "newlineCount": 30 - } - }, - "Rules/Ability Trees/Cultures/Mentralian Kingdoms.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 623, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5575, - "characterCount": 4036, - "nonWhitespaceCharacterCount": 3364, - "newlineCount": 40, - "readingTimeInMinutes": 2.3509433962264152, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435120, - "modifiedDate": 1753701922321, - "sizeInBytes": 4158, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5575, - "wordCount": 623, - "characterCount": 4036, - "nonWhitespaceCharacterCount": 3364, - "newlineCount": 40 - } - }, - "Rules/Ability Trees/Cultures/Golden coast tree.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 654, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.635, - "characterCount": 4043, - "nonWhitespaceCharacterCount": 3344, - "newlineCount": 41, - "readingTimeInMinutes": 2.4679245283018867, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434943, - "modifiedDate": 1753701922186, - "sizeInBytes": 4155, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.635, - "wordCount": 654, - "characterCount": 4043, - "nonWhitespaceCharacterCount": 3344, - "newlineCount": 41 - } - }, - "Rules/Ability Trees/Cultures/Frontier.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 513, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.2825, - "characterCount": 3316, - "nonWhitespaceCharacterCount": 2759, - "newlineCount": 36, - "readingTimeInMinutes": 1.9358490566037736, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434920, - "modifiedDate": 1753701922178, - "sizeInBytes": 3410, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.2825, - "wordCount": 513, - "characterCount": 3316, - "nonWhitespaceCharacterCount": 2759, - "newlineCount": 36 - } - }, - "Rules/Ability Trees/Cultures/Free cities.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 551, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.3775, - "characterCount": 3459, - "nonWhitespaceCharacterCount": 2865, - "newlineCount": 38, - "readingTimeInMinutes": 2.079245283018868, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435070, - "modifiedDate": 1753701922304, - "sizeInBytes": 3557, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.3775, - "wordCount": 551, - "characterCount": 3459, - "nonWhitespaceCharacterCount": 2865, - "newlineCount": 38 - } - }, - "Rules/Ability Trees/Cultures/Ashenvale Woods.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 614, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.535, - "characterCount": 4144, - "nonWhitespaceCharacterCount": 3332, - "newlineCount": 96, - "readingTimeInMinutes": 2.3169811320754716, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434896, - "modifiedDate": 1753635822405, - "sizeInBytes": 4204, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.535, - "wordCount": 614, - "characterCount": 4144, - "nonWhitespaceCharacterCount": 3332, - "newlineCount": 96 - } - }, - "Rules/Ability Trees/Cultures/Annwyn.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 678, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.695, - "characterCount": 4391, - "nonWhitespaceCharacterCount": 3559, - "newlineCount": 79, - "readingTimeInMinutes": 2.5584905660377357, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031434872, - "modifiedDate": 1753635619908, - "sizeInBytes": 4463, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.695, - "wordCount": 678, - "characterCount": 4391, - "nonWhitespaceCharacterCount": 3559, - "newlineCount": 79 - } - }, - "_Templates/Region.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 297, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.7425, - "characterCount": 3521, - "nonWhitespaceCharacterCount": 3068, - "newlineCount": 98, - "readingTimeInMinutes": 1.120754716981132, - "linkCount": 0, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031432918, - "modifiedDate": 1746711739693, - "sizeInBytes": 3525, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.7425, - "wordCount": 297, - "characterCount": 3521, - "nonWhitespaceCharacterCount": 3068, - "newlineCount": 98 - } - }, "_Templates/Species.md": { "isCountable": true, "targetNodeType": "file", @@ -2946,8 +111,8 @@ "linkCount": 0, "embedCount": 1, "aliases": null, - "createdDate": 1754031432999, - "modifiedDate": 1746195370934, + "createdDate": 1756573898051, + "modifiedDate": 1756573898051, "sizeInBytes": 2119, "sessionStart": { "noteCount": 1, @@ -2973,8 +138,8 @@ "linkCount": 0, "embedCount": 0, "aliases": null, - "createdDate": 1754031432977, - "modifiedDate": 1746176917765, + "createdDate": 1756573898050, + "modifiedDate": 1756573898051, "sizeInBytes": 682, "sessionStart": { "noteCount": 1, @@ -2985,31 +150,67 @@ "newlineCount": 22 } }, - "_Templates/Major Settlement.md": { + "_Templates/Rules/Dominion.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 243, + "wordCount": 299, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 0.6075, - "characterCount": 2674, - "nonWhitespaceCharacterCount": 2329, - "newlineCount": 63, - "readingTimeInMinutes": 0.9169811320754717, + "pageCount": 0.7475, + "characterCount": 3400, + "nonWhitespaceCharacterCount": 2862, + "newlineCount": 134, + "readingTimeInMinutes": 1.1283018867924528, "linkCount": 0, "embedCount": 1, - "aliases": null, - "createdDate": 1754031432950, - "modifiedDate": 1746176894484, - "sizeInBytes": 2678, + "aliases": [], + "createdDate": 1756573898050, + "modifiedDate": 1756573898050, + "sizeInBytes": 3528, "sessionStart": { "noteCount": 1, - "pageCount": 0.6075, - "wordCount": 243, - "characterCount": 2674, - "nonWhitespaceCharacterCount": 2329, - "newlineCount": 63 + "pageCount": 0.7475, + "wordCount": 299, + "characterCount": 3400, + "nonWhitespaceCharacterCount": 2862, + "newlineCount": 134 + }, + "frontmatter": { + "tags": [ + "template", + "dominion", + "vaelora" + ], + "aliases": [], + "cssclass": "dominion-profile" + } + }, + "_Templates/Region.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 297, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.7425, + "characterCount": 3521, + "nonWhitespaceCharacterCount": 3068, + "newlineCount": 98, + "readingTimeInMinutes": 1.120754716981132, + "linkCount": 0, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573898050, + "modifiedDate": 1756573898050, + "sizeInBytes": 3525, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.7425, + "wordCount": 297, + "characterCount": 3521, + "nonWhitespaceCharacterCount": 3068, + "newlineCount": 98 } }, "_Templates/Philosophy.md": { @@ -3027,8 +228,8 @@ "linkCount": 0, "embedCount": 1, "aliases": null, - "createdDate": 1754031432898, - "modifiedDate": 1745838772339, + "createdDate": 1756573898050, + "modifiedDate": 1756573898050, "sizeInBytes": 4086, "sessionStart": { "noteCount": 1, @@ -3039,6 +240,33 @@ "newlineCount": 85 } }, + "_Templates/Major Settlement.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 243, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.6075, + "characterCount": 2674, + "nonWhitespaceCharacterCount": 2329, + "newlineCount": 63, + "readingTimeInMinutes": 0.9169811320754717, + "linkCount": 0, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573898050, + "modifiedDate": 1756573898050, + "sizeInBytes": 2678, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.6075, + "wordCount": 243, + "characterCount": 2674, + "nonWhitespaceCharacterCount": 2329, + "newlineCount": 63 + } + }, "_Templates/Magical Tradition.md": { "isCountable": true, "targetNodeType": "file", @@ -3054,8 +282,8 @@ "linkCount": 0, "embedCount": 0, "aliases": null, - "createdDate": 1754031433027, - "modifiedDate": 1746894486549, + "createdDate": 1756573898050, + "modifiedDate": 1756573898050, "sizeInBytes": 3167, "sessionStart": { "noteCount": 1, @@ -3066,6 +294,33 @@ "newlineCount": 61 } }, + "_Attachments/way_of_the_pack.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573898048, + "modifiedDate": 1756573898050, + "sizeInBytes": 1679619, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, "_Attachments/temerian_empire_details.png": { "isCountable": false, "targetNodeType": "file", @@ -3081,8 +336,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031421775, - "modifiedDate": 1745844301399, + "createdDate": 1756573898026, + "modifiedDate": 1756573898048, "sizeInBytes": 10480757, "sessionStart": { "noteCount": 0, @@ -3093,33 +348,6 @@ "newlineCount": 0 } }, - "_Attachments/Pasted image 20250805001948.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754345988600, - "modifiedDate": 1754345988602, - "sizeInBytes": 1946148, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, "_Attachments/temerian_coat.png": { "isCountable": false, "targetNodeType": "file", @@ -3135,8 +363,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031420563, - "modifiedDate": 1745838958995, + "createdDate": 1756573898025, + "modifiedDate": 1756573898025, "sizeInBytes": 97918, "sessionStart": { "noteCount": 0, @@ -3147,60 +375,6 @@ "newlineCount": 0 } }, - "_Attachments/way_of_the_pack.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031427982, - "modifiedDate": 1747042247055, - "sizeInBytes": 1679619, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/scaled_cotrine_sigil.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031424274, - "modifiedDate": 1746173212395, - "sizeInBytes": 2221584, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, "_Attachments/spirits.png": { "isCountable": false, "targetNodeType": "file", @@ -3216,8 +390,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427735, - "modifiedDate": 1746693237922, + "createdDate": 1756573898017, + "modifiedDate": 1756573898025, "sizeInBytes": 2846603, "sessionStart": { "noteCount": 0, @@ -3243,8 +417,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427646, - "modifiedDate": 1746521677526, + "createdDate": 1756573898012, + "modifiedDate": 1756573898017, "sizeInBytes": 1599304, "sessionStart": { "noteCount": 0, @@ -3255,6 +429,33 @@ "newlineCount": 0 } }, + "_Attachments/scaled_cotrine_sigil.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573898005, + "modifiedDate": 1756573898012, + "sizeInBytes": 2221584, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, "_Attachments/reaches_coat.png.png": { "isCountable": false, "targetNodeType": "file", @@ -3270,8 +471,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031422705, - "modifiedDate": 1746131149993, + "createdDate": 1756573897998, + "modifiedDate": 1756573898005, "sizeInBytes": 2051342, "sessionStart": { "noteCount": 0, @@ -3282,330 +483,6 @@ "newlineCount": 0 } }, - "_Attachments/Pasted image 20250805070512.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754370312782, - "modifiedDate": 1754370312782, - "sizeInBytes": 2424980, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805000928.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754345368925, - "modifiedDate": 1754345368929, - "sizeInBytes": 1946148, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805000549.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754345149470, - "modifiedDate": 1754345149470, - "sizeInBytes": 2748829, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805000306.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754344986516, - "modifiedDate": 1754344986528, - "sizeInBytes": 3701534, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805000247.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754344967509, - "modifiedDate": 1754344967509, - "sizeInBytes": 3701534, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250804235853.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754344733402, - "modifiedDate": 1754344733475, - "sizeInBytes": 1775567, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250804235848.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754344728849, - "modifiedDate": 1754344728855, - "sizeInBytes": 1775567, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250804235842.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754344722261, - "modifiedDate": 1754344722261, - "sizeInBytes": 1775567, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/mentralian_kings_coat.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031422683, - "modifiedDate": 1745916868981, - "sizeInBytes": 204958, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250804162500.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754317500402, - "modifiedDate": 1754317500406, - "sizeInBytes": 985474, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250731183401.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031432848, - "modifiedDate": 1753979641313, - "sizeInBytes": 3477250, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250804141443.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754309683880, - "modifiedDate": 1754309683882, - "sizeInBytes": 1786858, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, "_Attachments/old_song_sigil.png": { "isCountable": false, "targetNodeType": "file", @@ -3621,8 +498,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427699, - "modifiedDate": 1746593012208, + "createdDate": 1756573897992, + "modifiedDate": 1756573897998, "sizeInBytes": 2126426, "sessionStart": { "noteCount": 0, @@ -3633,7 +510,7 @@ "newlineCount": 0 } }, - "_Attachments/glyph_hollowed.png": { + "_Attachments/mentralian_kings_coat.png": { "isCountable": false, "targetNodeType": "file", "noteCount": 0, @@ -3648,9 +525,9 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427835, - "modifiedDate": 1746778084118, - "sizeInBytes": 1679968, + "createdDate": 1756573897990, + "modifiedDate": 1756573897991, + "sizeInBytes": 204958, "sessionStart": { "noteCount": 0, "pageCount": 0, @@ -3675,8 +552,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031426121, - "modifiedDate": 1746521602375, + "createdDate": 1756573897980, + "modifiedDate": 1756573897990, "sizeInBytes": 3044788, "sessionStart": { "noteCount": 0, @@ -3702,8 +579,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427762, - "modifiedDate": 1746721677025, + "createdDate": 1756573897973, + "modifiedDate": 1756573897980, "sizeInBytes": 1998837, "sessionStart": { "noteCount": 0, @@ -3714,33 +591,6 @@ "newlineCount": 0 } }, - "_Attachments/ed4bf030-9c57-44a4-9144-bd587543afc4.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031426086, - "modifiedDate": 1746422953005, - "sizeInBytes": 2445690, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, "_Attachments/glyph_melding.png": { "isCountable": false, "targetNodeType": "file", @@ -3756,8 +606,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427803, - "modifiedDate": 1746768650532, + "createdDate": 1756573897966, + "modifiedDate": 1756573897973, "sizeInBytes": 2560457, "sessionStart": { "noteCount": 0, @@ -3768,7 +618,7 @@ "newlineCount": 0 } }, - "_Attachments/efc4f8a8-ba75-459f-a63d-1e3f561e6233.png": { + "_Attachments/glyph_hollowed.png": { "isCountable": false, "targetNodeType": "file", "noteCount": 0, @@ -3783,9 +633,9 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031428167, - "modifiedDate": 1747514078194, - "sizeInBytes": 2196476, + "createdDate": 1756573897959, + "modifiedDate": 1756573897966, + "sizeInBytes": 1679968, "sessionStart": { "noteCount": 0, "pageCount": 0, @@ -3810,8 +660,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031428018, - "modifiedDate": 1747047017674, + "createdDate": 1756573897953, + "modifiedDate": 1756573897959, "sizeInBytes": 2378855, "sessionStart": { "noteCount": 0, @@ -3837,8 +687,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031432758, - "modifiedDate": 1748276025910, + "createdDate": 1756573897945, + "modifiedDate": 1756573897953, "sizeInBytes": 2990452, "sessionStart": { "noteCount": 0, @@ -3849,6 +699,60 @@ "newlineCount": 0 } }, + "_Attachments/efc4f8a8-ba75-459f-a63d-1e3f561e6233.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897931, + "modifiedDate": 1756573897945, + "sizeInBytes": 2196476, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/ed4bf030-9c57-44a4-9144-bd587543afc4.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897922, + "modifiedDate": 1756573897930, + "sizeInBytes": 2445690, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, "_Attachments/e3a2651a-3176-4ee8-a9e6-ae4ff2ac3697.png": { "isCountable": false, "targetNodeType": "file", @@ -3864,8 +768,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031424308, - "modifiedDate": 1746375408470, + "createdDate": 1756573897913, + "modifiedDate": 1756573897922, "sizeInBytes": 2337450, "sessionStart": { "noteCount": 0, @@ -3876,7 +780,7 @@ "newlineCount": 0 } }, - "_Attachments/e0e31f49-9cc2-45a2-9982-7e2550a84cfd 1.png": { + "_Attachments/e0e31f49-9cc2-45a2-9982-7e2550a84cfd.png": { "isCountable": false, "targetNodeType": "file", "noteCount": 0, @@ -3891,8 +795,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031431462, - "modifiedDate": 1747917430786, + "createdDate": 1756573897908, + "modifiedDate": 1756573897913, "sizeInBytes": 2719342, "sessionStart": { "noteCount": 0, @@ -3918,8 +822,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031432703, - "modifiedDate": 1747917435474, + "createdDate": 1756573897901, + "modifiedDate": 1756573897908, "sizeInBytes": 2719342, "sessionStart": { "noteCount": 0, @@ -3930,7 +834,7 @@ "newlineCount": 0 } }, - "_Attachments/e0e31f49-9cc2-45a2-9982-7e2550a84cfd.png": { + "_Attachments/e0e31f49-9cc2-45a2-9982-7e2550a84cfd 1.png": { "isCountable": false, "targetNodeType": "file", "noteCount": 0, @@ -3945,8 +849,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031430141, - "modifiedDate": 1747917430447, + "createdDate": 1756573897892, + "modifiedDate": 1756573897901, "sizeInBytes": 2719342, "sessionStart": { "noteCount": 0, @@ -3972,8 +876,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427896, - "modifiedDate": 1746792465168, + "createdDate": 1756573897881, + "modifiedDate": 1756573897892, "sizeInBytes": 2423806, "sessionStart": { "noteCount": 0, @@ -3999,8 +903,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031429778, - "modifiedDate": 1747749391831, + "createdDate": 1756573897873, + "modifiedDate": 1756573897881, "sizeInBytes": 2775544, "sessionStart": { "noteCount": 0, @@ -4026,8 +930,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031420534, - "modifiedDate": 1745838707013, + "createdDate": 1756573897869, + "modifiedDate": 1756573897873, "sizeInBytes": 1269650, "sessionStart": { "noteCount": 0, @@ -4038,33 +942,6 @@ "newlineCount": 0 } }, - "_Attachments/b9fad8a1-2251-4957-bd8f-cc17ab63a069.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031429874, - "modifiedDate": 1747755892344, - "sizeInBytes": 1628406, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, "_Attachments/bfaf1438-8317-4d80-96b6-9b1555b28684.png": { "isCountable": false, "targetNodeType": "file", @@ -4080,8 +957,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427959, - "modifiedDate": 1747025947242, + "createdDate": 1756573897865, + "modifiedDate": 1756573897869, "sizeInBytes": 1567287, "sessionStart": { "noteCount": 0, @@ -4092,7 +969,7 @@ "newlineCount": 0 } }, - "_Attachments/a1c37107-914e-4609-ad41-0028823f2890.png": { + "_Attachments/b9fad8a1-2251-4957-bd8f-cc17ab63a069.png": { "isCountable": false, "targetNodeType": "file", "noteCount": 0, @@ -4107,9 +984,9 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031424334, - "modifiedDate": 1746422664695, - "sizeInBytes": 2493574, + "createdDate": 1756573897859, + "modifiedDate": 1756573897865, + "sizeInBytes": 1628406, "sessionStart": { "noteCount": 0, "pageCount": 0, @@ -4134,8 +1011,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427864, - "modifiedDate": 1746792205541, + "createdDate": 1756573897848, + "modifiedDate": 1756573897858, "sizeInBytes": 2813941, "sessionStart": { "noteCount": 0, @@ -4146,7 +1023,7 @@ "newlineCount": 0 } }, - "_Attachments/911b2e7b-7cad-42fd-a848-aac1316bd614.png": { + "_Attachments/a1c37107-914e-4609-ad41-0028823f2890.png": { "isCountable": false, "targetNodeType": "file", "noteCount": 0, @@ -4161,9 +1038,9 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031430076, - "modifiedDate": 1747908744403, - "sizeInBytes": 2766850, + "createdDate": 1756573897837, + "modifiedDate": 1756573897848, + "sizeInBytes": 2493574, "sessionStart": { "noteCount": 0, "pageCount": 0, @@ -4173,7 +1050,7 @@ "newlineCount": 0 } }, - "_Attachments/7c738601-f47a-48f3-86c2-288e58ab1216.png": { + "_Attachments/Pasted image 20250805220259.png": { "isCountable": false, "targetNodeType": "file", "noteCount": 0, @@ -4188,9 +1065,630 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427920, - "modifiedDate": 1747025770403, - "sizeInBytes": 2655638, + "createdDate": 1756573897835, + "modifiedDate": 1756573897837, + "sizeInBytes": 3893021, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805220237.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897826, + "modifiedDate": 1756573897835, + "sizeInBytes": 3893021, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805220017.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897824, + "modifiedDate": 1756573897826, + "sizeInBytes": 1994885, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805220001.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897817, + "modifiedDate": 1756573897824, + "sizeInBytes": 1994885, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805215521.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897814, + "modifiedDate": 1756573897817, + "sizeInBytes": 4115009, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805215448.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897803, + "modifiedDate": 1756573897814, + "sizeInBytes": 4115009, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805215210.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897800, + "modifiedDate": 1756573897803, + "sizeInBytes": 4056789, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805215148.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897787, + "modifiedDate": 1756573897800, + "sizeInBytes": 4056789, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805214558.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897786, + "modifiedDate": 1756573897787, + "sizeInBytes": 2679718, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805214546.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897780, + "modifiedDate": 1756573897786, + "sizeInBytes": 2679718, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805214127.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897778, + "modifiedDate": 1756573897779, + "sizeInBytes": 2566148, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805214050.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897772, + "modifiedDate": 1756573897778, + "sizeInBytes": 2566148, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805070512.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897765, + "modifiedDate": 1756573897772, + "sizeInBytes": 2424980, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805001948.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897764, + "modifiedDate": 1756573897765, + "sizeInBytes": 1946148, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805000549.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897751, + "modifiedDate": 1756573897758, + "sizeInBytes": 2748829, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805000928.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897759, + "modifiedDate": 1756573897764, + "sizeInBytes": 1946148, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805000306.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897748, + "modifiedDate": 1756573897751, + "sizeInBytes": 3701534, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250804235853.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897737, + "modifiedDate": 1756573897738, + "sizeInBytes": 1775567, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250805000247.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897738, + "modifiedDate": 1756573897748, + "sizeInBytes": 3701534, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250731183401.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897711, + "modifiedDate": 1756573897719, + "sizeInBytes": 3477250, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250804235848.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897736, + "modifiedDate": 1756573897737, + "sizeInBytes": 1775567, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250804235842.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897730, + "modifiedDate": 1756573897736, + "sizeInBytes": 1775567, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250804162500.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897726, + "modifiedDate": 1756573897730, + "sizeInBytes": 985474, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/Pasted image 20250804141443.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897719, + "modifiedDate": 1756573897725, + "sizeInBytes": 1786858, "sessionStart": { "noteCount": 0, "pageCount": 0, @@ -4215,8 +1713,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031432800, - "modifiedDate": 1748277737097, + "createdDate": 1756573897704, + "modifiedDate": 1756573897711, "sizeInBytes": 1944313, "sessionStart": { "noteCount": 0, @@ -4227,7 +1725,7 @@ "newlineCount": 0 } }, - "_Attachments/7712a72c-a359-4532-a4b8-654b338e90a7.png": { + "_Attachments/911b2e7b-7cad-42fd-a848-aac1316bd614.png": { "isCountable": false, "targetNodeType": "file", "noteCount": 0, @@ -4242,36 +1740,9 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031432725, - "modifiedDate": 1747971580007, - "sizeInBytes": 2512475, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/7b18799c-88dd-4101-8fa3-632211c6cd28.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031422735, - "modifiedDate": 1746132161866, - "sizeInBytes": 2392209, + "createdDate": 1756573897694, + "modifiedDate": 1756573897704, + "sizeInBytes": 2766850, "sessionStart": { "noteCount": 0, "pageCount": 0, @@ -4296,8 +1767,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031428234, - "modifiedDate": 1747667038176, + "createdDate": 1756573897684, + "modifiedDate": 1756573897693, "sizeInBytes": 2680385, "sessionStart": { "noteCount": 0, @@ -4308,6 +1779,87 @@ "newlineCount": 0 } }, + "_Attachments/7c738601-f47a-48f3-86c2-288e58ab1216.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897671, + "modifiedDate": 1756573897684, + "sizeInBytes": 2655638, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/7b18799c-88dd-4101-8fa3-632211c6cd28.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897659, + "modifiedDate": 1756573897671, + "sizeInBytes": 2392209, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/7712a72c-a359-4532-a4b8-654b338e90a7.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897645, + "modifiedDate": 1756573897659, + "sizeInBytes": 2512475, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, "_Attachments/61aa6ee2-c112-46f7-b6c8-e4d17fbeb153.png": { "isCountable": false, "targetNodeType": "file", @@ -4323,8 +1875,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427782, - "modifiedDate": 1746722227168, + "createdDate": 1756573897636, + "modifiedDate": 1756573897645, "sizeInBytes": 2568167, "sessionStart": { "noteCount": 0, @@ -4350,8 +1902,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031430010, - "modifiedDate": 1747896870581, + "createdDate": 1756573897625, + "modifiedDate": 1756573897636, "sizeInBytes": 2762103, "sessionStart": { "noteCount": 0, @@ -4362,33 +1914,6 @@ "newlineCount": 0 } }, - "_Attachments/304c909d-c480-4b89-87ae-2ca676a08451.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031428148, - "modifiedDate": 1747514063151, - "sizeInBytes": 2748500, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, "_Attachments/4ee54bfc-0263-4d42-89a6-07c533274749.png": { "isCountable": false, "targetNodeType": "file", @@ -4404,8 +1929,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031428201, - "modifiedDate": 1747560051456, + "createdDate": 1756573897617, + "modifiedDate": 1756573897624, "sizeInBytes": 1905709, "sessionStart": { "noteCount": 0, @@ -4416,33 +1941,6 @@ "newlineCount": 0 } }, - "_Attachments/4373843f-b475-4e8e-bc69-559341462df7.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031428108, - "modifiedDate": 1747511201731, - "sizeInBytes": 3162547, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, "_Attachments/4c571b58-117c-4742-b50e-9fa335b3c5e2.png": { "isCountable": false, "targetNodeType": "file", @@ -4458,8 +1956,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031432832, - "modifiedDate": 1748282896421, + "createdDate": 1756573897609, + "modifiedDate": 1756573897617, "sizeInBytes": 2450228, "sessionStart": { "noteCount": 0, @@ -4470,6 +1968,87 @@ "newlineCount": 0 } }, + "_Attachments/4373843f-b475-4e8e-bc69-559341462df7.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897598, + "modifiedDate": 1756573897609, + "sizeInBytes": 3162547, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/304c909d-c480-4b89-87ae-2ca676a08451.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897591, + "modifiedDate": 1756573897598, + "sizeInBytes": 2748500, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "_Attachments/300a8090-94e8-4f12-88e8-5904917aa17e.png": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897581, + "modifiedDate": 1756573897590, + "sizeInBytes": 2521820, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, "_Attachments/1a5faa60-2600-422b-a6b6-f76463bb91ed.png": { "isCountable": false, "targetNodeType": "file", @@ -4485,8 +2064,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031428050, - "modifiedDate": 1747511187975, + "createdDate": 1756573897572, + "modifiedDate": 1756573897580, "sizeInBytes": 3571114, "sessionStart": { "noteCount": 0, @@ -4512,8 +2091,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031428221, - "modifiedDate": 1747598170546, + "createdDate": 1756573897566, + "modifiedDate": 1756573897571, "sizeInBytes": 1557857, "sessionStart": { "noteCount": 0, @@ -4524,60 +2103,6 @@ "newlineCount": 0 } }, - "_Attachments/300a8090-94e8-4f12-88e8-5904917aa17e.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031429970, - "modifiedDate": 1747821607615, - "sizeInBytes": 2521820, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/0e7fbe04-bb40-46e5-b813-a79c5ac9821b.jpg": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754031421822, - "modifiedDate": 1745851374095, - "sizeInBytes": 276524, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, "_Attachments/11bf0103-7c48-44a1-8eab-8298011427f9.png": { "isCountable": false, "targetNodeType": "file", @@ -4593,8 +2118,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031427666, - "modifiedDate": 1746530068824, + "createdDate": 1756573897558, + "modifiedDate": 1756573897566, "sizeInBytes": 3022103, "sessionStart": { "noteCount": 0, @@ -4605,6 +2130,33 @@ "newlineCount": 0 } }, + "_Attachments/0e7fbe04-bb40-46e5-b813-a79c5ac9821b.jpg": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897557, + "modifiedDate": 1756573897558, + "sizeInBytes": 276524, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, "_Attachments/0c800dcc-73ed-4044-b81f-059766d19b64.png": { "isCountable": false, "targetNodeType": "file", @@ -4620,8 +2172,8 @@ "linkCount": 0, "embedCount": 0, "aliases": [], - "createdDate": 1754031429920, - "modifiedDate": 1747819815298, + "createdDate": 1756573897551, + "modifiedDate": 1756573897557, "sizeInBytes": 1781954, "sessionStart": { "noteCount": 0, @@ -4632,31 +2184,3277 @@ "newlineCount": 0 } }, - "Setting/Philosophy/Old Wolf.md": { + "Stories/The Reed Remembers Her/_Overview.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 3335, + "wordCount": 1026, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 8.3375, - "characterCount": 20810, - "nonWhitespaceCharacterCount": 17253, - "newlineCount": 155, - "readingTimeInMinutes": 12.584905660377359, - "linkCount": 3, - "embedCount": 1, + "pageCount": 2.565, + "characterCount": 7442, + "nonWhitespaceCharacterCount": 6033, + "newlineCount": 160, + "readingTimeInMinutes": 3.871698113207547, + "linkCount": 0, + "embedCount": 0, "aliases": null, - "createdDate": 1754031436617, - "modifiedDate": 1747042273710, - "sizeInBytes": 20830, + "createdDate": 1756573897551, + "modifiedDate": 1756573897551, + "sizeInBytes": 7616, "sessionStart": { "noteCount": 1, - "pageCount": 8.3375, - "wordCount": 3335, - "characterCount": 20810, - "nonWhitespaceCharacterCount": 17253, - "newlineCount": 155 + "pageCount": 2.565, + "wordCount": 1026, + "characterCount": 7442, + "nonWhitespaceCharacterCount": 6033, + "newlineCount": 160 + } + }, + "Stories/The Reed Remembers Her/Index.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0, + "characterCount": 1, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 2, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897551, + "modifiedDate": 1756573897551, + "sizeInBytes": 181, + "sessionStart": { + "noteCount": 1, + "pageCount": 0, + "wordCount": 0, + "characterCount": 1, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 2 + }, + "frontmatter": { + "longform": { + "format": "scenes", + "title": "The Reed Remembers Her", + "workflow": "Default Workflow", + "sceneFolder": "/", + "scenes": [], + "ignoredFiles": [ + "_Overview" + ] + } + } + }, + "Stories/The Reed Remembers Her/1.1 Drifting Embers.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 10020, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 25.05, + "characterCount": 60877, + "nonWhitespaceCharacterCount": 49531, + "newlineCount": 2349, + "readingTimeInMinutes": 37.81132075471698, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897551, + "modifiedDate": 1756573897551, + "sizeInBytes": 62931, + "sessionStart": { + "noteCount": 1, + "pageCount": 25.05, + "wordCount": 10020, + "characterCount": 60877, + "nonWhitespaceCharacterCount": 49531, + "newlineCount": 2349 + } + }, + "Stories/Crown of Blood/manuscript.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897551, + "modifiedDate": 1756573897551, + "sizeInBytes": 270656, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "Stories/Crown of Blood/Notes.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 5638, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 14.095, + "characterCount": 36217, + "nonWhitespaceCharacterCount": 29930, + "newlineCount": 474, + "readingTimeInMinutes": 21.275471698113208, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 37067, + "sessionStart": { + "noteCount": 1, + "pageCount": 14.095, + "wordCount": 5638, + "characterCount": 36217, + "nonWhitespaceCharacterCount": 29930, + "newlineCount": 474 + } + }, + "Stories/Crown of Blood/Interlude - What the Dead Remember.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1122, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.805, + "characterCount": 6821, + "nonWhitespaceCharacterCount": 5647, + "newlineCount": 103, + "readingTimeInMinutes": 4.233962264150944, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 6957, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.805, + "wordCount": 1122, + "characterCount": 6821, + "nonWhitespaceCharacterCount": 5647, + "newlineCount": 103 + } + }, + "Stories/Crown of Blood/Interlude - The Limits of Discipline.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 885, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.2125, + "characterCount": 5239, + "nonWhitespaceCharacterCount": 4296, + "newlineCount": 119, + "readingTimeInMinutes": 3.339622641509434, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 5481, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.2125, + "wordCount": 885, + "characterCount": 5239, + "nonWhitespaceCharacterCount": 4296, + "newlineCount": 119 + } + }, + "Stories/Crown of Blood/Interlude - The Cold Trail.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 422, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.055, + "characterCount": 2559, + "nonWhitespaceCharacterCount": 2114, + "newlineCount": 49, + "readingTimeInMinutes": 1.5924528301886793, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 2663, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.055, + "wordCount": 422, + "characterCount": 2559, + "nonWhitespaceCharacterCount": 2114, + "newlineCount": 49 + } + }, + "Stories/Crown of Blood/Interlude - Raw Power.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 399, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9975, + "characterCount": 2399, + "nonWhitespaceCharacterCount": 1975, + "newlineCount": 47, + "readingTimeInMinutes": 1.5056603773584907, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 2461, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9975, + "wordCount": 399, + "characterCount": 2399, + "nonWhitespaceCharacterCount": 1975, + "newlineCount": 47 + } + }, + "Stories/Crown of Blood/Interlude - Cinder in the Halls.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 484, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.21, + "characterCount": 2885, + "nonWhitespaceCharacterCount": 2378, + "newlineCount": 49, + "readingTimeInMinutes": 1.8264150943396227, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 2963, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.21, + "wordCount": 484, + "characterCount": 2885, + "nonWhitespaceCharacterCount": 2378, + "newlineCount": 49 + } + }, + "Stories/Crown of Blood/Index.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0, + "characterCount": 1, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 2, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 2728, + "sessionStart": { + "noteCount": 1, + "pageCount": 0, + "wordCount": 0, + "characterCount": 1, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 2 + }, + "frontmatter": { + "longform": { + "format": "scenes", + "title": "Crown of Blood", + "workflow": "Default Workflow", + "sceneFolder": "/", + "scenes": [], + "ignoredFiles": [ + "Notes", + "Current State" + ] + } + } + }, + "Stories/Crown of Blood/Epilogue - The Sound Before the Storm.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 776, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.94, + "characterCount": 4525, + "nonWhitespaceCharacterCount": 3702, + "newlineCount": 80, + "readingTimeInMinutes": 2.9283018867924526, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 4607, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.94, + "wordCount": 776, + "characterCount": 4525, + "nonWhitespaceCharacterCount": 3702, + "newlineCount": 80 + } + }, + "Stories/Crown of Blood/Current State.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 703, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.7575, + "characterCount": 4844, + "nonWhitespaceCharacterCount": 3913, + "newlineCount": 116, + "readingTimeInMinutes": 2.6528301886792454, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 4912, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.7575, + "wordCount": 703, + "characterCount": 4844, + "nonWhitespaceCharacterCount": 3913, + "newlineCount": 116 + } + }, + "Stories/Crown of Blood/C9S3 - Blood and Broken Sigil.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 563, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4075, + "characterCount": 3363, + "nonWhitespaceCharacterCount": 2778, + "newlineCount": 47, + "readingTimeInMinutes": 2.1245283018867926, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 3435, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4075, + "wordCount": 563, + "characterCount": 3363, + "nonWhitespaceCharacterCount": 2778, + "newlineCount": 47 + } + }, + "Stories/Crown of Blood/C9S2 - Exploring the Keep.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 805, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.0125, + "characterCount": 4803, + "nonWhitespaceCharacterCount": 3969, + "newlineCount": 60, + "readingTimeInMinutes": 3.0377358490566038, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 4881, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.0125, + "wordCount": 805, + "characterCount": 4803, + "nonWhitespaceCharacterCount": 3969, + "newlineCount": 60 + } + }, + "Stories/Crown of Blood/C9S1 - Deeper into the Keep.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 629, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5725, + "characterCount": 3757, + "nonWhitespaceCharacterCount": 3102, + "newlineCount": 55, + "readingTimeInMinutes": 2.3735849056603775, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 3821, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5725, + "wordCount": 629, + "characterCount": 3757, + "nonWhitespaceCharacterCount": 3102, + "newlineCount": 55 + } + }, + "Stories/Crown of Blood/C8S3 - Into the Darkness.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 731, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.8275, + "characterCount": 4354, + "nonWhitespaceCharacterCount": 3596, + "newlineCount": 57, + "readingTimeInMinutes": 2.758490566037736, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897550, + "modifiedDate": 1756573897550, + "sizeInBytes": 4458, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.8275, + "wordCount": 731, + "characterCount": 4354, + "nonWhitespaceCharacterCount": 3596, + "newlineCount": 57 + } + }, + "Stories/Crown of Blood/C8S2 - Awaken the Gate.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 808, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.02, + "characterCount": 4719, + "nonWhitespaceCharacterCount": 3880, + "newlineCount": 61, + "readingTimeInMinutes": 3.049056603773585, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897550, + "sizeInBytes": 4805, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.02, + "wordCount": 808, + "characterCount": 4719, + "nonWhitespaceCharacterCount": 3880, + "newlineCount": 61 + } + }, + "Stories/Crown of Blood/C8S1 - Mouth of the Mountain.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 427, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.0675, + "characterCount": 2494, + "nonWhitespaceCharacterCount": 2052, + "newlineCount": 33, + "readingTimeInMinutes": 1.6113207547169812, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2528, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.0675, + "wordCount": 427, + "characterCount": 2494, + "nonWhitespaceCharacterCount": 2052, + "newlineCount": 33 + } + }, + "Stories/Crown of Blood/C7S5 - Aftermath.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 592, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.48, + "characterCount": 3407, + "nonWhitespaceCharacterCount": 2782, + "newlineCount": 69, + "readingTimeInMinutes": 2.2339622641509433, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 3495, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.48, + "wordCount": 592, + "characterCount": 3407, + "nonWhitespaceCharacterCount": 2782, + "newlineCount": 69 + } + }, + "Stories/Crown of Blood/C7S4 - Avalanche Rite.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 727, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.8175, + "characterCount": 4413, + "nonWhitespaceCharacterCount": 3648, + "newlineCount": 79, + "readingTimeInMinutes": 2.7433962264150944, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 4513, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.8175, + "wordCount": 727, + "characterCount": 4413, + "nonWhitespaceCharacterCount": 3648, + "newlineCount": 79 + } + }, + "Stories/Crown of Blood/C7S3 - Trap above the cloudline.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 475, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.1875, + "characterCount": 2760, + "nonWhitespaceCharacterCount": 2265, + "newlineCount": 43, + "readingTimeInMinutes": 1.7924528301886793, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2846, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.1875, + "wordCount": 475, + "characterCount": 2760, + "nonWhitespaceCharacterCount": 2265, + "newlineCount": 43 + } + }, + "Stories/Crown of Blood/C7S2 - Movement Reported.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 379, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9475, + "characterCount": 2380, + "nonWhitespaceCharacterCount": 1981, + "newlineCount": 43, + "readingTimeInMinutes": 1.430188679245283, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2486, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9475, + "wordCount": 379, + "characterCount": 2380, + "nonWhitespaceCharacterCount": 1981, + "newlineCount": 43 + } + }, + "Stories/Crown of Blood/C7S1 - Transition.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 229, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5725, + "characterCount": 1360, + "nonWhitespaceCharacterCount": 1123, + "newlineCount": 17, + "readingTimeInMinutes": 0.8641509433962264, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 1368, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5725, + "wordCount": 229, + "characterCount": 1360, + "nonWhitespaceCharacterCount": 1123, + "newlineCount": 17 + } + }, + "Stories/Crown of Blood/C6S5 - The Leaving.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 550, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.375, + "characterCount": 3284, + "nonWhitespaceCharacterCount": 2715, + "newlineCount": 40, + "readingTimeInMinutes": 2.0754716981132075, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 3360, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.375, + "wordCount": 550, + "characterCount": 3284, + "nonWhitespaceCharacterCount": 2715, + "newlineCount": 40 + } + }, + "Stories/Crown of Blood/C6S4 - Whispers in the nIght.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 353, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.8825, + "characterCount": 2076, + "nonWhitespaceCharacterCount": 1708, + "newlineCount": 33, + "readingTimeInMinutes": 1.3320754716981131, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2100, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.8825, + "wordCount": 353, + "characterCount": 2076, + "nonWhitespaceCharacterCount": 1708, + "newlineCount": 33 + } + }, + "Stories/Crown of Blood/C6S4 - Embers and Distance.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 445, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.1125, + "characterCount": 2592, + "nonWhitespaceCharacterCount": 2124, + "newlineCount": 49, + "readingTimeInMinutes": 1.679245283018868, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2688, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.1125, + "wordCount": 445, + "characterCount": 2592, + "nonWhitespaceCharacterCount": 2124, + "newlineCount": 49 + } + }, + "Stories/Crown of Blood/C6S3 - The Fregment's Path.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 439, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.0975, + "characterCount": 2685, + "nonWhitespaceCharacterCount": 2228, + "newlineCount": 39, + "readingTimeInMinutes": 1.6566037735849057, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2765, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.0975, + "wordCount": 439, + "characterCount": 2685, + "nonWhitespaceCharacterCount": 2228, + "newlineCount": 39 + } + }, + "Stories/Crown of Blood/C6S2 - The Last to Remember.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 681, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.7025, + "characterCount": 3919, + "nonWhitespaceCharacterCount": 3220, + "newlineCount": 39, + "readingTimeInMinutes": 2.569811320754717, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 4001, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.7025, + "wordCount": 681, + "characterCount": 3919, + "nonWhitespaceCharacterCount": 3220, + "newlineCount": 39 + } + }, + "Stories/Crown of Blood/C6S1 - Erased Histories.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 399, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9975, + "characterCount": 2318, + "nonWhitespaceCharacterCount": 1904, + "newlineCount": 33, + "readingTimeInMinutes": 1.5056603773584907, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2326, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9975, + "wordCount": 399, + "characterCount": 2318, + "nonWhitespaceCharacterCount": 1904, + "newlineCount": 33 + } + }, + "Stories/Crown of Blood/C5S3 - What stirs below.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 342, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.855, + "characterCount": 1982, + "nonWhitespaceCharacterCount": 1625, + "newlineCount": 30, + "readingTimeInMinutes": 1.290566037735849, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2018, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.855, + "wordCount": 342, + "characterCount": 1982, + "nonWhitespaceCharacterCount": 1625, + "newlineCount": 30 + } + }, + "Stories/Crown of Blood/C5S2 - The Blood and the Stone.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 443, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.1075, + "characterCount": 2558, + "nonWhitespaceCharacterCount": 2099, + "newlineCount": 35, + "readingTimeInMinutes": 1.6716981132075472, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 2610, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.1075, + "wordCount": 443, + "characterCount": 2558, + "nonWhitespaceCharacterCount": 2099, + "newlineCount": 35 + } + }, + "Stories/Crown of Blood/C5S1 - The Veyari.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 890, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.225, + "characterCount": 5236, + "nonWhitespaceCharacterCount": 4315, + "newlineCount": 62, + "readingTimeInMinutes": 3.358490566037736, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 5314, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.225, + "wordCount": 890, + "characterCount": 5236, + "nonWhitespaceCharacterCount": 4315, + "newlineCount": 62 + } + }, + "Stories/Crown of Blood/C4S5 - Winter's Edge.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 639, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5975, + "characterCount": 3883, + "nonWhitespaceCharacterCount": 3221, + "newlineCount": 49, + "readingTimeInMinutes": 2.4113207547169813, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897549, + "modifiedDate": 1756573897549, + "sizeInBytes": 3949, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5975, + "wordCount": 639, + "characterCount": 3883, + "nonWhitespaceCharacterCount": 3221, + "newlineCount": 49 + } + }, + "Stories/Crown of Blood/C4S4 - The Choice.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 775, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.9375, + "characterCount": 4750, + "nonWhitespaceCharacterCount": 3937, + "newlineCount": 79, + "readingTimeInMinutes": 2.9245283018867925, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897549, + "sizeInBytes": 4840, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.9375, + "wordCount": 775, + "characterCount": 4750, + "nonWhitespaceCharacterCount": 3937, + "newlineCount": 79 + } + }, + "Stories/Crown of Blood/C4S3 - The Last Watch.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 799, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.9975, + "characterCount": 4558, + "nonWhitespaceCharacterCount": 3720, + "newlineCount": 79, + "readingTimeInMinutes": 3.0150943396226415, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 4702, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.9975, + "wordCount": 799, + "characterCount": 4558, + "nonWhitespaceCharacterCount": 3720, + "newlineCount": 79 + } + }, + "Stories/Crown of Blood/C4S2 - Steel in Snow.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 562, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.405, + "characterCount": 3440, + "nonWhitespaceCharacterCount": 2842, + "newlineCount": 75, + "readingTimeInMinutes": 2.120754716981132, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 3548, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.405, + "wordCount": 562, + "characterCount": 3440, + "nonWhitespaceCharacterCount": 2842, + "newlineCount": 75 + } + }, + "Stories/Crown of Blood/C4S1 - Foothills.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 450, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.125, + "characterCount": 2610, + "nonWhitespaceCharacterCount": 2147, + "newlineCount": 29, + "readingTimeInMinutes": 1.6981132075471699, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2656, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.125, + "wordCount": 450, + "characterCount": 2610, + "nonWhitespaceCharacterCount": 2147, + "newlineCount": 29 + } + }, + "Stories/Crown of Blood/C4.5S4 - The Chosen Few.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 448, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.12, + "characterCount": 2648, + "nonWhitespaceCharacterCount": 2181, + "newlineCount": 41, + "readingTimeInMinutes": 1.6905660377358491, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2720, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.12, + "wordCount": 448, + "characterCount": 2648, + "nonWhitespaceCharacterCount": 2181, + "newlineCount": 41 + } + }, + "Stories/Crown of Blood/C4.5S3 - Gathering the Loyals.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 0, + "sessionStart": { + "noteCount": 1, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "Stories/Crown of Blood/C4.5S2 - Decision atop the Walls.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 558, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.395, + "characterCount": 3306, + "nonWhitespaceCharacterCount": 2709, + "newlineCount": 81, + "readingTimeInMinutes": 2.1056603773584905, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 3504, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.395, + "wordCount": 558, + "characterCount": 3306, + "nonWhitespaceCharacterCount": 2709, + "newlineCount": 81 + } + }, + "Stories/Crown of Blood/C4.5S1 - Scouts Return.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 334, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.835, + "characterCount": 1998, + "nonWhitespaceCharacterCount": 1649, + "newlineCount": 33, + "readingTimeInMinutes": 1.260377358490566, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2056, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.835, + "wordCount": 334, + "characterCount": 1998, + "nonWhitespaceCharacterCount": 1649, + "newlineCount": 33 + } + }, + "Stories/Crown of Blood/C4.4S4 - Banner in the Wind.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 387, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9675, + "characterCount": 2249, + "nonWhitespaceCharacterCount": 1847, + "newlineCount": 31, + "readingTimeInMinutes": 1.460377358490566, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2271, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9675, + "wordCount": 387, + "characterCount": 2249, + "nonWhitespaceCharacterCount": 1847, + "newlineCount": 31 + } + }, + "Stories/Crown of Blood/C4.4S3 - A Quiet Talk.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 465, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.1625, + "characterCount": 2649, + "nonWhitespaceCharacterCount": 2158, + "newlineCount": 55, + "readingTimeInMinutes": 1.7547169811320755, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2773, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.1625, + "wordCount": 465, + "characterCount": 2649, + "nonWhitespaceCharacterCount": 2158, + "newlineCount": 55 + } + }, + "Stories/Crown of Blood/C4.4S2 - Ghosts of the Journey.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 469, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.1725, + "characterCount": 2766, + "nonWhitespaceCharacterCount": 2270, + "newlineCount": 52, + "readingTimeInMinutes": 1.769811320754717, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2898, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.1725, + "wordCount": 469, + "characterCount": 2766, + "nonWhitespaceCharacterCount": 2270, + "newlineCount": 52 + } + }, + "Stories/Crown of Blood/C4.4S1 - Morning Drills.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 443, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.1075, + "characterCount": 2644, + "nonWhitespaceCharacterCount": 2184, + "newlineCount": 37, + "readingTimeInMinutes": 1.6716981132075472, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2700, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.1075, + "wordCount": 443, + "characterCount": 2644, + "nonWhitespaceCharacterCount": 2184, + "newlineCount": 37 + } + }, + "Stories/Crown of Blood/C4.3S3 - Candle before the forgotten.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 315, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.7875, + "characterCount": 1827, + "nonWhitespaceCharacterCount": 1501, + "newlineCount": 23, + "readingTimeInMinutes": 1.1886792452830188, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 1851, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.7875, + "wordCount": 315, + "characterCount": 1827, + "nonWhitespaceCharacterCount": 1501, + "newlineCount": 23 + } + }, + "Stories/Crown of Blood/C4.3S2 - Sword of Fireless Flame.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 527, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.3175, + "characterCount": 3211, + "nonWhitespaceCharacterCount": 2647, + "newlineCount": 41, + "readingTimeInMinutes": 1.9886792452830189, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 3271, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.3175, + "wordCount": 527, + "characterCount": 3211, + "nonWhitespaceCharacterCount": 2647, + "newlineCount": 41 + } + }, + "Stories/Crown of Blood/C4.3S1 - Dust-Laden Past.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 603, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5075, + "characterCount": 3590, + "nonWhitespaceCharacterCount": 2954, + "newlineCount": 45, + "readingTimeInMinutes": 2.2754716981132077, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 3634, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5075, + "wordCount": 603, + "characterCount": 3590, + "nonWhitespaceCharacterCount": 2954, + "newlineCount": 45 + } + }, + "Stories/Crown of Blood/C4.2S4 - Foreshadowed Change.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 399, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9975, + "characterCount": 2362, + "nonWhitespaceCharacterCount": 1939, + "newlineCount": 51, + "readingTimeInMinutes": 1.5056603773584907, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2386, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9975, + "wordCount": 399, + "characterCount": 2362, + "nonWhitespaceCharacterCount": 1939, + "newlineCount": 51 + } + }, + "Stories/Crown of Blood/C4.2S3 - Nightfall Confession.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 396, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.99, + "characterCount": 2278, + "nonWhitespaceCharacterCount": 1865, + "newlineCount": 37, + "readingTimeInMinutes": 1.4943396226415093, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 2332, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.99, + "wordCount": 396, + "characterCount": 2278, + "nonWhitespaceCharacterCount": 1865, + "newlineCount": 37 + } + }, + "Stories/Crown of Blood/C4.2S2 - Glimpse of the Past.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 513, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.2825, + "characterCount": 2919, + "nonWhitespaceCharacterCount": 2386, + "newlineCount": 43, + "readingTimeInMinutes": 1.9358490566037736, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 3009, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.2825, + "wordCount": 513, + "characterCount": 2919, + "nonWhitespaceCharacterCount": 2386, + "newlineCount": 43 + } + }, + "Stories/Crown of Blood/C4.2S1 - Wounds in Silence.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 617, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5425, + "characterCount": 3523, + "nonWhitespaceCharacterCount": 2882, + "newlineCount": 48, + "readingTimeInMinutes": 2.328301886792453, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 3607, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5425, + "wordCount": 617, + "characterCount": 3523, + "nonWhitespaceCharacterCount": 2882, + "newlineCount": 48 + } + }, + "Stories/Crown of Blood/C4.1S3 - Dreams beneath the ice.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 814, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.035, + "characterCount": 4749, + "nonWhitespaceCharacterCount": 3887, + "newlineCount": 99, + "readingTimeInMinutes": 3.0716981132075474, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897548, + "modifiedDate": 1756573897548, + "sizeInBytes": 4783, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.035, + "wordCount": 814, + "characterCount": 4749, + "nonWhitespaceCharacterCount": 3887, + "newlineCount": 99 + } + }, + "Stories/Crown of Blood/C4.1S2 - The Broken Garison.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 573, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4325, + "characterCount": 3528, + "nonWhitespaceCharacterCount": 2936, + "newlineCount": 38, + "readingTimeInMinutes": 2.1622641509433964, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 3634, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4325, + "wordCount": 573, + "characterCount": 3528, + "nonWhitespaceCharacterCount": 2936, + "newlineCount": 38 + } + }, + "Stories/Crown of Blood/C4.1S1 - The Weight of Survival.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 362, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.905, + "characterCount": 2097, + "nonWhitespaceCharacterCount": 1722, + "newlineCount": 29, + "readingTimeInMinutes": 1.3660377358490565, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2137, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.905, + "wordCount": 362, + "characterCount": 2097, + "nonWhitespaceCharacterCount": 1722, + "newlineCount": 29 + } + }, + "Stories/Crown of Blood/C3S5 - The Old Gate.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 399, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9975, + "characterCount": 2416, + "nonWhitespaceCharacterCount": 2000, + "newlineCount": 37, + "readingTimeInMinutes": 1.5056603773584907, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2458, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9975, + "wordCount": 399, + "characterCount": 2416, + "nonWhitespaceCharacterCount": 2000, + "newlineCount": 37 + } + }, + "Stories/Crown of Blood/C3S4 - Blood That Binds.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 478, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.195, + "characterCount": 2777, + "nonWhitespaceCharacterCount": 2265, + "newlineCount": 71, + "readingTimeInMinutes": 1.8037735849056604, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2899, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.195, + "wordCount": 478, + "characterCount": 2777, + "nonWhitespaceCharacterCount": 2265, + "newlineCount": 71 + } + }, + "Stories/Crown of Blood/C3S3 - Whispers in Stone.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 399, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9975, + "characterCount": 2326, + "nonWhitespaceCharacterCount": 1904, + "newlineCount": 49, + "readingTimeInMinutes": 1.5056603773584907, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2390, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9975, + "wordCount": 399, + "characterCount": 2326, + "nonWhitespaceCharacterCount": 1904, + "newlineCount": 49 + } + }, + "Stories/Crown of Blood/C3S2 - Alisha refuses to be left behind.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 364, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.91, + "characterCount": 2157, + "nonWhitespaceCharacterCount": 1773, + "newlineCount": 43, + "readingTimeInMinutes": 1.3735849056603773, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2251, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.91, + "wordCount": 364, + "characterCount": 2157, + "nonWhitespaceCharacterCount": 1773, + "newlineCount": 43 + } + }, + "Stories/Crown of Blood/C3S1 - To the Hall of Kings.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 613, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5325, + "characterCount": 3800, + "nonWhitespaceCharacterCount": 3158, + "newlineCount": 61, + "readingTimeInMinutes": 2.3132075471698115, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 3904, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5325, + "wordCount": 613, + "characterCount": 3800, + "nonWhitespaceCharacterCount": 3158, + "newlineCount": 61 + } + }, + "Stories/Crown of Blood/C2S3 - Arguing before the court.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1893, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 4.7325, + "characterCount": 11026, + "nonWhitespaceCharacterCount": 9009, + "newlineCount": 236, + "readingTimeInMinutes": 7.143396226415095, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 11442, + "sessionStart": { + "noteCount": 1, + "pageCount": 4.7325, + "wordCount": 1893, + "characterCount": 11026, + "nonWhitespaceCharacterCount": 9009, + "newlineCount": 236 + } + }, + "Stories/Crown of Blood/C2S2 - The gates are broken.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 529, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.3225, + "characterCount": 3074, + "nonWhitespaceCharacterCount": 2523, + "newlineCount": 47, + "readingTimeInMinutes": 1.9962264150943396, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 3140, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.3225, + "wordCount": 529, + "characterCount": 3074, + "nonWhitespaceCharacterCount": 2523, + "newlineCount": 47 + } + }, + "Stories/Crown of Blood/C2S1 - The king is slain.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 477, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.1925, + "characterCount": 2742, + "nonWhitespaceCharacterCount": 2248, + "newlineCount": 37, + "readingTimeInMinutes": 1.8, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2778, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.1925, + "wordCount": 477, + "characterCount": 2742, + "nonWhitespaceCharacterCount": 2248, + "newlineCount": 37 + } + }, + "Stories/Crown of Blood/C1S5 - The King rides.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 755, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.8875, + "characterCount": 4431, + "nonWhitespaceCharacterCount": 3640, + "newlineCount": 75, + "readingTimeInMinutes": 2.849056603773585, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 4503, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.8875, + "wordCount": 755, + "characterCount": 4431, + "nonWhitespaceCharacterCount": 3640, + "newlineCount": 75 + } + }, + "Stories/Crown of Blood/C1S4 - Telaryn and Alisha.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 398, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.995, + "characterCount": 2335, + "nonWhitespaceCharacterCount": 1911, + "newlineCount": 55, + "readingTimeInMinutes": 1.5018867924528303, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2463, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.995, + "wordCount": 398, + "characterCount": 2335, + "nonWhitespaceCharacterCount": 1911, + "newlineCount": 55 + } + }, + "Stories/Crown of Blood/C1S3 - Telaryn talking to her father.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 410, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.025, + "characterCount": 2291, + "nonWhitespaceCharacterCount": 1861, + "newlineCount": 43, + "readingTimeInMinutes": 1.5471698113207548, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2395, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.025, + "wordCount": 410, + "characterCount": 2291, + "nonWhitespaceCharacterCount": 1861, + "newlineCount": 43 + } + }, + "Stories/Crown of Blood/C1S2 Marcas preparing for the Siege.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 431, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.0775, + "characterCount": 2527, + "nonWhitespaceCharacterCount": 2076, + "newlineCount": 43, + "readingTimeInMinutes": 1.6264150943396227, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 2613, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.0775, + "wordCount": 431, + "characterCount": 2527, + "nonWhitespaceCharacterCount": 2076, + "newlineCount": 43 + } + }, + "Stories/Crown of Blood/C1S1 Snow on the towers and siege.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 557, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.3925, + "characterCount": 3307, + "nonWhitespaceCharacterCount": 2726, + "newlineCount": 51, + "readingTimeInMinutes": 2.1018867924528304, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 3355, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.3925, + "wordCount": 557, + "characterCount": 3307, + "nonWhitespaceCharacterCount": 2726, + "newlineCount": 51 + } + }, + "Stories/Crown of Blood/C13S7 - The Banner Rises.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 799, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.9975, + "characterCount": 4772, + "nonWhitespaceCharacterCount": 3943, + "newlineCount": 63, + "readingTimeInMinutes": 3.0150943396226415, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897547, + "modifiedDate": 1756573897547, + "sizeInBytes": 4812, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.9975, + "wordCount": 799, + "characterCount": 4772, + "nonWhitespaceCharacterCount": 3943, + "newlineCount": 63 + } + }, + "Stories/Crown of Blood/C13S6 - Reckogning.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 451, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.1275, + "characterCount": 2727, + "nonWhitespaceCharacterCount": 2243, + "newlineCount": 69, + "readingTimeInMinutes": 1.7018867924528303, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 2783, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.1275, + "wordCount": 451, + "characterCount": 2727, + "nonWhitespaceCharacterCount": 2243, + "newlineCount": 69 + } + }, + "Stories/Crown of Blood/C13S5 - Conquest of Spirits.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 481, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.2025, + "characterCount": 2895, + "nonWhitespaceCharacterCount": 2388, + "newlineCount": 55, + "readingTimeInMinutes": 1.8150943396226416, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 2951, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.2025, + "wordCount": 481, + "characterCount": 2895, + "nonWhitespaceCharacterCount": 2388, + "newlineCount": 55 + } + }, + "Stories/Crown of Blood/C13S4 - Bargain with the Storm.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 623, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5575, + "characterCount": 3628, + "nonWhitespaceCharacterCount": 2960, + "newlineCount": 87, + "readingTimeInMinutes": 2.3509433962264152, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 3714, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5575, + "wordCount": 623, + "characterCount": 3628, + "nonWhitespaceCharacterCount": 2960, + "newlineCount": 87 + } + }, + "Stories/Crown of Blood/C13S3 - The Debate.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 594, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.485, + "characterCount": 3452, + "nonWhitespaceCharacterCount": 2830, + "newlineCount": 59, + "readingTimeInMinutes": 2.241509433962264, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 3625, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.485, + "wordCount": 594, + "characterCount": 3452, + "nonWhitespaceCharacterCount": 2830, + "newlineCount": 59 + } + }, + "Stories/Crown of Blood/C13S2 - Atop the mountai.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 671, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.6775, + "characterCount": 3891, + "nonWhitespaceCharacterCount": 3185, + "newlineCount": 73, + "readingTimeInMinutes": 2.5320754716981133, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 3933, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.6775, + "wordCount": 671, + "characterCount": 3891, + "nonWhitespaceCharacterCount": 3185, + "newlineCount": 73 + } + }, + "Stories/Crown of Blood/C13S1 - Return to village.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 831, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.0775, + "characterCount": 4697, + "nonWhitespaceCharacterCount": 3836, + "newlineCount": 63, + "readingTimeInMinutes": 3.1358490566037736, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 4811, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.0775, + "wordCount": 831, + "characterCount": 4697, + "nonWhitespaceCharacterCount": 3836, + "newlineCount": 63 + } + }, + "Stories/Crown of Blood/C12S4 - Now what.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 369, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9225, + "characterCount": 2214, + "nonWhitespaceCharacterCount": 1824, + "newlineCount": 45, + "readingTimeInMinutes": 1.3924528301886792, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 2328, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9225, + "wordCount": 369, + "characterCount": 2214, + "nonWhitespaceCharacterCount": 1824, + "newlineCount": 45 + } + }, + "Stories/Crown of Blood/C12S3 - Alishas Gone.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 521, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.3025, + "characterCount": 3121, + "nonWhitespaceCharacterCount": 2571, + "newlineCount": 61, + "readingTimeInMinutes": 1.9660377358490566, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 3243, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.3025, + "wordCount": 521, + "characterCount": 3121, + "nonWhitespaceCharacterCount": 2571, + "newlineCount": 61 + } + }, + "Stories/Crown of Blood/C12S2 - Aftermath.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 498, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.245, + "characterCount": 2873, + "nonWhitespaceCharacterCount": 2358, + "newlineCount": 37, + "readingTimeInMinutes": 1.879245283018868, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 2953, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.245, + "wordCount": 498, + "characterCount": 2873, + "nonWhitespaceCharacterCount": 2358, + "newlineCount": 37 + } + }, + "Stories/Crown of Blood/C12S1 - She Returns.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1319, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 3.2975, + "characterCount": 7882, + "nonWhitespaceCharacterCount": 6504, + "newlineCount": 121, + "readingTimeInMinutes": 4.977358490566037, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 8014, + "sessionStart": { + "noteCount": 1, + "pageCount": 3.2975, + "wordCount": 1319, + "characterCount": 7882, + "nonWhitespaceCharacterCount": 6504, + "newlineCount": 121 + } + }, + "Stories/Crown of Blood/C11S3 - The Power.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 705, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.7625, + "characterCount": 4304, + "nonWhitespaceCharacterCount": 3536, + "newlineCount": 78, + "readingTimeInMinutes": 2.660377358490566, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 4362, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.7625, + "wordCount": 705, + "characterCount": 4304, + "nonWhitespaceCharacterCount": 3536, + "newlineCount": 78 + } + }, + "Stories/Crown of Blood/C11S2 - The Killing.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 582, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.455, + "characterCount": 3491, + "nonWhitespaceCharacterCount": 2861, + "newlineCount": 92, + "readingTimeInMinutes": 2.1962264150943396, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 3579, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.455, + "wordCount": 582, + "characterCount": 3491, + "nonWhitespaceCharacterCount": 2861, + "newlineCount": 92 + } + }, + "Stories/Crown of Blood/C11S1 - The Price.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 636, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.59, + "characterCount": 3793, + "nonWhitespaceCharacterCount": 3103, + "newlineCount": 85, + "readingTimeInMinutes": 2.4, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 3921, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.59, + "wordCount": 636, + "characterCount": 3793, + "nonWhitespaceCharacterCount": 3103, + "newlineCount": 85 + } + }, + "Stories/Crown of Blood/C10S4 - Drawing Ashmire.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 390, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.975, + "characterCount": 2400, + "nonWhitespaceCharacterCount": 1983, + "newlineCount": 42, + "readingTimeInMinutes": 1.471698113207547, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 2434, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.975, + "wordCount": 390, + "characterCount": 2400, + "nonWhitespaceCharacterCount": 1983, + "newlineCount": 42 + } + }, + "Stories/Crown of Blood/C10S3 - Moment of Choice.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 423, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.0575, + "characterCount": 2399, + "nonWhitespaceCharacterCount": 1954, + "newlineCount": 47, + "readingTimeInMinutes": 1.5962264150943397, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 2515, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.0575, + "wordCount": 423, + "characterCount": 2399, + "nonWhitespaceCharacterCount": 1954, + "newlineCount": 47 + } + }, + "Stories/Crown of Blood/C10S2 - The Whispering Blade.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 464, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.16, + "characterCount": 2748, + "nonWhitespaceCharacterCount": 2251, + "newlineCount": 58, + "readingTimeInMinutes": 1.7509433962264151, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 2814, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.16, + "wordCount": 464, + "characterCount": 2748, + "nonWhitespaceCharacterCount": 2251, + "newlineCount": 58 + } + }, + "Stories/Crown of Blood/C10S1 - Descent.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 474, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.185, + "characterCount": 2772, + "nonWhitespaceCharacterCount": 2280, + "newlineCount": 37, + "readingTimeInMinutes": 1.788679245283019, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897546, + "modifiedDate": 1756573897546, + "sizeInBytes": 2798, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.185, + "wordCount": 474, + "characterCount": 2772, + "nonWhitespaceCharacterCount": 2280, + "newlineCount": 37 + } + }, + "Setting/World/Vaelora.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 364, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.91, + "characterCount": 2276, + "nonWhitespaceCharacterCount": 1882, + "newlineCount": 24, + "readingTimeInMinutes": 1.3735849056603773, + "linkCount": 4, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 2290, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.91, + "wordCount": 364, + "characterCount": 2276, + "nonWhitespaceCharacterCount": 1882, + "newlineCount": 24 + } + }, + "Setting/World/Spirits/Spirits.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 4510, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 11.275, + "characterCount": 29203, + "nonWhitespaceCharacterCount": 24589, + "newlineCount": 169, + "readingTimeInMinutes": 17.0188679245283, + "linkCount": 0, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 29399, + "sessionStart": { + "noteCount": 1, + "pageCount": 11.275, + "wordCount": 4510, + "characterCount": 29203, + "nonWhitespaceCharacterCount": 24589, + "newlineCount": 169 + } + }, + "Setting/World/Spirits/Spirit Dominions.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 7999, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 19.9975, + "characterCount": 60809, + "nonWhitespaceCharacterCount": 50047, + "newlineCount": 766, + "readingTimeInMinutes": 30.184905660377357, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 60875, + "sessionStart": { + "noteCount": 1, + "pageCount": 19.9975, + "wordCount": 7999, + "characterCount": 60809, + "nonWhitespaceCharacterCount": 50047, + "newlineCount": 766 + } + }, + "Setting/World/People/Tul People.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 653, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.6325, + "characterCount": 4514, + "nonWhitespaceCharacterCount": 3791, + "newlineCount": 48, + "readingTimeInMinutes": 2.4641509433962265, + "linkCount": 8, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 4538, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.6325, + "wordCount": 653, + "characterCount": 4514, + "nonWhitespaceCharacterCount": 3791, + "newlineCount": 48 + } + }, + "Setting/World/People/Tlaxcal.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 972, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.43, + "characterCount": 6795, + "nonWhitespaceCharacterCount": 5767, + "newlineCount": 48, + "readingTimeInMinutes": 3.667924528301887, + "linkCount": 0, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 6805, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.43, + "wordCount": 972, + "characterCount": 6795, + "nonWhitespaceCharacterCount": 5767, + "newlineCount": 48 + } + }, + "Setting/World/People/Peoples.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 652, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.63, + "characterCount": 4118, + "nonWhitespaceCharacterCount": 3431, + "newlineCount": 25, + "readingTimeInMinutes": 2.460377358490566, + "linkCount": 4, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 4140, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.63, + "wordCount": 652, + "characterCount": 4118, + "nonWhitespaceCharacterCount": 3431, + "newlineCount": 25 + } + }, + "Setting/World/People/Myou.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 852, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.13, + "characterCount": 5844, + "nonWhitespaceCharacterCount": 4925, + "newlineCount": 58, + "readingTimeInMinutes": 3.2150943396226417, + "linkCount": 1, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 5858, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.13, + "wordCount": 852, + "characterCount": 5844, + "nonWhitespaceCharacterCount": 4925, + "newlineCount": 58 + } + }, + "Setting/World/People/Akumei.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 942, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.355, + "characterCount": 6399, + "nonWhitespaceCharacterCount": 5395, + "newlineCount": 48, + "readingTimeInMinutes": 3.5547169811320756, + "linkCount": 3, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 6413, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.355, + "wordCount": 942, + "characterCount": 6399, + "nonWhitespaceCharacterCount": 5395, + "newlineCount": 48 + } + }, + "Setting/Realms/Mentralin.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 661, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.6525, + "characterCount": 4331, + "nonWhitespaceCharacterCount": 3647, + "newlineCount": 29, + "readingTimeInMinutes": 2.4943396226415095, + "linkCount": 14, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897541, + "modifiedDate": 1756573897541, + "sizeInBytes": 4337, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.6525, + "wordCount": 661, + "characterCount": 4331, + "nonWhitespaceCharacterCount": 3647, + "newlineCount": 29 + } + }, + "Setting/Realms/Mentralin/Temerian Empire/Temerian Empire.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 8168, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 20.42, + "characterCount": 52403, + "nonWhitespaceCharacterCount": 43930, + "newlineCount": 278, + "readingTimeInMinutes": 30.82264150943396, + "linkCount": 57, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 52428, + "sessionStart": { + "noteCount": 1, + "pageCount": 20.42, + "wordCount": 8168, + "characterCount": 52403, + "nonWhitespaceCharacterCount": 43930, + "newlineCount": 278 + } + }, + "Setting/Realms/Mentralin/Temerian Empire/Settlements/Tor Praxis.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 597, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4925, + "characterCount": 4027, + "nonWhitespaceCharacterCount": 3399, + "newlineCount": 29, + "readingTimeInMinutes": 2.2528301886792454, + "linkCount": 4, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897545, + "modifiedDate": 1756573897545, + "sizeInBytes": 4027, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4925, + "wordCount": 597, + "characterCount": 4027, + "nonWhitespaceCharacterCount": 3399, + "newlineCount": 29 + } + }, + "Setting/Realms/Mentralin/Temerian Empire/Settlements/Tor Amras.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 530, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.325, + "characterCount": 3475, + "nonWhitespaceCharacterCount": 2907, + "newlineCount": 30, + "readingTimeInMinutes": 2, + "linkCount": 3, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897544, + "modifiedDate": 1756573897544, + "sizeInBytes": 3487, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.325, + "wordCount": 530, + "characterCount": 3475, + "nonWhitespaceCharacterCount": 2907, + "newlineCount": 30 + } + }, + "Setting/Realms/Mentralin/Temerian Empire/Settlements/Talpis.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 2735, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 6.8375, + "characterCount": 18485, + "nonWhitespaceCharacterCount": 15653, + "newlineCount": 102, + "readingTimeInMinutes": 10.320754716981131, + "linkCount": 12, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897544, + "modifiedDate": 1756573897544, + "sizeInBytes": 18485, + "sessionStart": { + "noteCount": 1, + "pageCount": 6.8375, + "wordCount": 2735, + "characterCount": 18485, + "nonWhitespaceCharacterCount": 15653, + "newlineCount": 102 + } + }, + "Setting/Realms/Mentralin/Temerian Empire/Settlements/Raveas.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1465, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 3.6625, + "characterCount": 9879, + "nonWhitespaceCharacterCount": 8359, + "newlineCount": 68, + "readingTimeInMinutes": 5.528301886792453, + "linkCount": 11, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897544, + "modifiedDate": 1756573897544, + "sizeInBytes": 9908, + "sessionStart": { + "noteCount": 1, + "pageCount": 3.6625, + "wordCount": 1465, + "characterCount": 9879, + "nonWhitespaceCharacterCount": 8359, + "newlineCount": 68 + } + }, + "Setting/Realms/Mentralin/Temerian Empire/Settlements/Erogent.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 3057, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 7.6425, + "characterCount": 20788, + "nonWhitespaceCharacterCount": 17590, + "newlineCount": 101, + "readingTimeInMinutes": 11.535849056603773, + "linkCount": 11, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897544, + "modifiedDate": 1756573897544, + "sizeInBytes": 20820, + "sessionStart": { + "noteCount": 1, + "pageCount": 7.6425, + "wordCount": 3057, + "characterCount": 20788, + "nonWhitespaceCharacterCount": 17590, + "newlineCount": 101 + } + }, + "Setting/Realms/Mentralin/Temerian Empire/Settlements/Algeas.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1915, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 4.7875, + "characterCount": 12934, + "nonWhitespaceCharacterCount": 10932, + "newlineCount": 68, + "readingTimeInMinutes": 7.226415094339623, + "linkCount": 1, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897544, + "modifiedDate": 1756573897544, + "sizeInBytes": 12970, + "sessionStart": { + "noteCount": 1, + "pageCount": 4.7875, + "wordCount": 1915, + "characterCount": 12934, + "nonWhitespaceCharacterCount": 10932, + "newlineCount": 68 + } + }, + "Setting/Realms/Mentralin/Reaches/The Reaches.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 9466, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 23.665, + "characterCount": 61218, + "nonWhitespaceCharacterCount": 51241, + "newlineCount": 417, + "readingTimeInMinutes": 35.72075471698113, + "linkCount": 76, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897544, + "modifiedDate": 1756573897544, + "sizeInBytes": 61484, + "sessionStart": { + "noteCount": 1, + "pageCount": 23.665, + "wordCount": 9466, + "characterCount": 61218, + "nonWhitespaceCharacterCount": 51241, + "newlineCount": 417 + } + }, + "Setting/Realms/Mentralin/Reaches/Settlements/Varneth.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 2261, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 5.6525, + "characterCount": 15346, + "nonWhitespaceCharacterCount": 12943, + "newlineCount": 90, + "readingTimeInMinutes": 8.532075471698112, + "linkCount": 1, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897544, + "modifiedDate": 1756573897544, + "sizeInBytes": 15384, + "sessionStart": { + "noteCount": 1, + "pageCount": 5.6525, + "wordCount": 2261, + "characterCount": 15346, + "nonWhitespaceCharacterCount": 12943, + "newlineCount": 90 + } + }, + "Setting/Realms/Mentralin/Reaches/Settlements/Settlement Overview.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 628, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.57, + "characterCount": 4064, + "nonWhitespaceCharacterCount": 3399, + "newlineCount": 38, + "readingTimeInMinutes": 2.369811320754717, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897544, + "modifiedDate": 1756573897544, + "sizeInBytes": 4086, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.57, + "wordCount": 628, + "characterCount": 4064, + "nonWhitespaceCharacterCount": 3399, + "newlineCount": 38 + } + }, + "Setting/Realms/Mentralin/Reaches/Settlements/Lysmar.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 2444, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 6.11, + "characterCount": 16346, + "nonWhitespaceCharacterCount": 13782, + "newlineCount": 82, + "readingTimeInMinutes": 9.222641509433963, + "linkCount": 0, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897543, + "modifiedDate": 1756573897543, + "sizeInBytes": 16390, + "sessionStart": { + "noteCount": 1, + "pageCount": 6.11, + "wordCount": 2444, + "characterCount": 16346, + "nonWhitespaceCharacterCount": 13782, + "newlineCount": 82 + } + }, + "Setting/Realms/Mentralin/Reaches/Settlements/Karnost.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1602, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 4.005, + "characterCount": 11004, + "nonWhitespaceCharacterCount": 9326, + "newlineCount": 63, + "readingTimeInMinutes": 6.0452830188679245, + "linkCount": 1, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897543, + "modifiedDate": 1756573897543, + "sizeInBytes": 11064, + "sessionStart": { + "noteCount": 1, + "pageCount": 4.005, + "wordCount": 1602, + "characterCount": 11004, + "nonWhitespaceCharacterCount": 9326, + "newlineCount": 63 + } + }, + "Setting/Realms/Mentralin/Reaches/Settlements/Drestal.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 2123, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 5.3075, + "characterCount": 14151, + "nonWhitespaceCharacterCount": 11919, + "newlineCount": 82, + "readingTimeInMinutes": 8.011320754716982, + "linkCount": 0, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897542, + "modifiedDate": 1756573897543, + "sizeInBytes": 14197, + "sessionStart": { + "noteCount": 1, + "pageCount": 5.3075, + "wordCount": 2123, + "characterCount": 14151, + "nonWhitespaceCharacterCount": 11919, + "newlineCount": 82 + } + }, + "Setting/Realms/Mentralin/Reaches/Daughters of the Wolf.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 2207, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 5.5175, + "characterCount": 14285, + "nonWhitespaceCharacterCount": 11961, + "newlineCount": 92, + "readingTimeInMinutes": 8.328301886792453, + "linkCount": 7, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897542, + "modifiedDate": 1756573897542, + "sizeInBytes": 14301, + "sessionStart": { + "noteCount": 1, + "pageCount": 5.5175, + "wordCount": 2207, + "characterCount": 14285, + "nonWhitespaceCharacterCount": 11961, + "newlineCount": 92 + } + }, + "Setting/Realms/Mentralin/Mentralian Kingdoms/Mentralian Kingdoms.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 6950, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 17.375, + "characterCount": 47027, + "nonWhitespaceCharacterCount": 39729, + "newlineCount": 317, + "readingTimeInMinutes": 26.22641509433962, + "linkCount": 82, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897542, + "modifiedDate": 1756573897542, + "sizeInBytes": 47040, + "sessionStart": { + "noteCount": 1, + "pageCount": 17.375, + "wordCount": 6950, + "characterCount": 47027, + "nonWhitespaceCharacterCount": 39729, + "newlineCount": 317 + } + }, + "Setting/Realms/Mentralin/Lao-Shan/Lao-Shan.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 6977, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 17.4425, + "characterCount": 47508, + "nonWhitespaceCharacterCount": 40240, + "newlineCount": 262, + "readingTimeInMinutes": 26.328301886792453, + "linkCount": 14, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897542, + "modifiedDate": 1756573897542, + "sizeInBytes": 47532, + "sessionStart": { + "noteCount": 1, + "pageCount": 17.4425, + "wordCount": 6977, + "characterCount": 47508, + "nonWhitespaceCharacterCount": 40240, + "newlineCount": 262 + } + }, + "Setting/Realms/Mentralin/Kyourin/Kyourin Shogunate.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 8611, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 21.5275, + "characterCount": 58247, + "nonWhitespaceCharacterCount": 49240, + "newlineCount": 302, + "readingTimeInMinutes": 32.49433962264151, + "linkCount": 53, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897542, + "modifiedDate": 1756573897542, + "sizeInBytes": 58324, + "sessionStart": { + "noteCount": 1, + "pageCount": 21.5275, + "wordCount": 8611, + "characterCount": 58247, + "nonWhitespaceCharacterCount": 49240, + "newlineCount": 302 + } + }, + "Setting/Realms/Mentralin/Golden Coast/Golden Coast.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 8361, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 20.9025, + "characterCount": 56742, + "nonWhitespaceCharacterCount": 47852, + "newlineCount": 422, + "readingTimeInMinutes": 31.550943396226415, + "linkCount": 2, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897541, + "modifiedDate": 1756573897541, + "sizeInBytes": 56940, + "sessionStart": { + "noteCount": 1, + "pageCount": 20.9025, + "wordCount": 8361, + "characterCount": 56742, + "nonWhitespaceCharacterCount": 47852, + "newlineCount": 422 + } + }, + "Setting/Realms/Mentralin/Ashenvale Woods/Ashenvale Woods.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 9038, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 22.595, + "characterCount": 60059, + "nonWhitespaceCharacterCount": 50574, + "newlineCount": 382, + "readingTimeInMinutes": 34.10566037735849, + "linkCount": 30, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897541, + "modifiedDate": 1756573897541, + "sizeInBytes": 60203, + "sessionStart": { + "noteCount": 1, + "pageCount": 22.595, + "wordCount": 9038, + "characterCount": 60059, + "nonWhitespaceCharacterCount": 50574, + "newlineCount": 382 + } + }, + "Setting/Realms/Mentralin/Annwyn/Annwyn.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 7847, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 19.6175, + "characterCount": 51959, + "nonWhitespaceCharacterCount": 43630, + "newlineCount": 339, + "readingTimeInMinutes": 29.61132075471698, + "linkCount": 128, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897541, + "modifiedDate": 1756573897541, + "sizeInBytes": 52202, + "sessionStart": { + "noteCount": 1, + "pageCount": 19.6175, + "wordCount": 7847, + "characterCount": 51959, + "nonWhitespaceCharacterCount": 43630, + "newlineCount": 339 + } + }, + "Setting/Realms/Mentralin/Annwyn/People/Queen Aeryn of House Caerwyn.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0, + "characterCount": 1, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 2, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [ + "Queen Aeryn" + ], + "createdDate": 1756573897541, + "modifiedDate": 1756573897541, + "sizeInBytes": 48, + "sessionStart": { + "noteCount": 1, + "pageCount": 0, + "wordCount": 0, + "characterCount": 1, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 2 + }, + "frontmatter": { + "cssclasses": [], + "aliases": [ + "Queen Aeryn" + ] + } + }, + "Setting/Realms/Anderon.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 510, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.275, + "characterCount": 3065, + "nonWhitespaceCharacterCount": 2525, + "newlineCount": 31, + "readingTimeInMinutes": 1.9245283018867925, + "linkCount": 1, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897541, + "modifiedDate": 1756573897541, + "sizeInBytes": 3079, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.275, + "wordCount": 510, + "characterCount": 3065, + "nonWhitespaceCharacterCount": 2525, + "newlineCount": 31 + } + }, + "Setting/Realms/Al'Mahoun.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 346, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.865, + "characterCount": 2209, + "nonWhitespaceCharacterCount": 1859, + "newlineCount": 11, + "readingTimeInMinutes": 1.3056603773584905, + "linkCount": 2, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897540, + "modifiedDate": 1756573897540, + "sizeInBytes": 2229, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.865, + "wordCount": 346, + "characterCount": 2209, + "nonWhitespaceCharacterCount": 1859, + "newlineCount": 11 + } + }, + "Setting/Realms/Al'Mahoun/Pharos/Pharos.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 6185, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 15.4625, + "characterCount": 42339, + "nonWhitespaceCharacterCount": 35899, + "newlineCount": 257, + "readingTimeInMinutes": 23.339622641509433, + "linkCount": 42, + "embedCount": 2, + "aliases": null, + "createdDate": 1756573897540, + "modifiedDate": 1756573897541, + "sizeInBytes": 42385, + "sessionStart": { + "noteCount": 1, + "pageCount": 15.4625, + "wordCount": 6185, + "characterCount": 42339, + "nonWhitespaceCharacterCount": 35899, + "newlineCount": 257 } }, "Setting/Philosophy/The Scaled Doctrine of Par-Thalax.md": { @@ -4674,8 +5472,8 @@ "linkCount": 5, "embedCount": 1, "aliases": null, - "createdDate": 1754031436538, - "modifiedDate": 1746173278962, + "createdDate": 1756573897540, + "modifiedDate": 1756573897540, "sizeInBytes": 8672, "sessionStart": { "noteCount": 1, @@ -4701,8 +5499,8 @@ "linkCount": 1, "embedCount": 1, "aliases": null, - "createdDate": 1754031436588, - "modifiedDate": 1746593044158, + "createdDate": 1756573897540, + "modifiedDate": 1756573897540, "sizeInBytes": 13091, "sessionStart": { "noteCount": 1, @@ -4730,8 +5528,8 @@ "aliases": [ "Balanced Scale" ], - "createdDate": 1754031436572, - "modifiedDate": 1747042391940, + "createdDate": 1756573897540, + "modifiedDate": 1756573897540, "sizeInBytes": 21730, "sessionStart": { "noteCount": 1, @@ -4747,6 +5545,33 @@ ] } }, + "Setting/Philosophy/Old Wolf.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 3335, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 8.3375, + "characterCount": 20810, + "nonWhitespaceCharacterCount": 17253, + "newlineCount": 155, + "readingTimeInMinutes": 12.584905660377359, + "linkCount": 3, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897540, + "modifiedDate": 1756573897540, + "sizeInBytes": 20830, + "sessionStart": { + "noteCount": 1, + "pageCount": 8.3375, + "wordCount": 3335, + "characterCount": 20810, + "nonWhitespaceCharacterCount": 17253, + "newlineCount": 155 + } + }, "Setting/Philosophy/Creed of the Veil.md": { "isCountable": true, "targetNodeType": "file", @@ -4762,8 +5587,8 @@ "linkCount": 12, "embedCount": 1, "aliases": null, - "createdDate": 1754031436522, - "modifiedDate": 1745850416387, + "createdDate": 1756573897540, + "modifiedDate": 1756573897540, "sizeInBytes": 17009, "sessionStart": { "noteCount": 1, @@ -4774,1148 +5599,6 @@ "newlineCount": 149 } }, - "Setting/Magical Traditions/The Hollowed.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1794, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 4.485, - "characterCount": 12041, - "nonWhitespaceCharacterCount": 10169, - "newlineCount": 101, - "readingTimeInMinutes": 6.769811320754717, - "linkCount": 1, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031437043, - "modifiedDate": 1746792470658, - "sizeInBytes": 12049, - "sessionStart": { - "noteCount": 1, - "pageCount": 4.485, - "wordCount": 1794, - "characterCount": 12041, - "nonWhitespaceCharacterCount": 10169, - "newlineCount": 101 - } - }, - "Setting/Magical Traditions/Spirit Binding.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 3442, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 8.605, - "characterCount": 24279, - "nonWhitespaceCharacterCount": 20552, - "newlineCount": 203, - "readingTimeInMinutes": 12.988679245283018, - "linkCount": 3, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436983, - "modifiedDate": 1746722242578, - "sizeInBytes": 24429, - "sessionStart": { - "noteCount": 1, - "pageCount": 8.605, - "wordCount": 3442, - "characterCount": 24279, - "nonWhitespaceCharacterCount": 20552, - "newlineCount": 203 - } - }, - "Setting/Magical Traditions/Magic.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 656, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.64, - "characterCount": 4352, - "nonWhitespaceCharacterCount": 3659, - "newlineCount": 34, - "readingTimeInMinutes": 2.4754716981132074, - "linkCount": 16, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031436996, - "modifiedDate": 1753878906521, - "sizeInBytes": 4360, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.64, - "wordCount": 656, - "characterCount": 4352, - "nonWhitespaceCharacterCount": 3659, - "newlineCount": 34 - } - }, - "Setting/Magical Traditions/Melded Souls.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 3070, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 7.675, - "characterCount": 20560, - "nonWhitespaceCharacterCount": 17360, - "newlineCount": 162, - "readingTimeInMinutes": 11.584905660377359, - "linkCount": 0, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031437027, - "modifiedDate": 1746792209929, - "sizeInBytes": 20564, - "sessionStart": { - "noteCount": 1, - "pageCount": 7.675, - "wordCount": 3070, - "characterCount": 20560, - "nonWhitespaceCharacterCount": 17360, - "newlineCount": 162 - } - }, - "Setting/Magical Traditions/Soulforging.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 3470, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 8.675, - "characterCount": 24522, - "nonWhitespaceCharacterCount": 20768, - "newlineCount": 218, - "readingTimeInMinutes": 13.09433962264151, - "linkCount": 1, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031437106, - "modifiedDate": 1747511275813, - "sizeInBytes": 24690, - "sessionStart": { - "noteCount": 1, - "pageCount": 8.675, - "wordCount": 3470, - "characterCount": 24522, - "nonWhitespaceCharacterCount": 20768, - "newlineCount": 218 - } - }, - "Setting/Magical Traditions/Pact Magic.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 3748, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 9.37, - "characterCount": 24231, - "nonWhitespaceCharacterCount": 20252, - "newlineCount": 214, - "readingTimeInMinutes": 14.143396226415094, - "linkCount": 0, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031437122, - "modifiedDate": 1747514078897, - "sizeInBytes": 24423, - "sessionStart": { - "noteCount": 1, - "pageCount": 9.37, - "wordCount": 3748, - "characterCount": 24231, - "nonWhitespaceCharacterCount": 20252, - "newlineCount": 214 - } - }, - "Setting/Magical Traditions/Chthonism.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 3095, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 7.7375, - "characterCount": 21581, - "nonWhitespaceCharacterCount": 18261, - "newlineCount": 177, - "readingTimeInMinutes": 11.679245283018869, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437090, - "modifiedDate": 1747054294866, - "sizeInBytes": 21728, - "sessionStart": { - "noteCount": 1, - "pageCount": 7.7375, - "wordCount": 3095, - "characterCount": 21581, - "nonWhitespaceCharacterCount": 18261, - "newlineCount": 177 - } - }, - "Setting/Magical Traditions/Blood Sorcery.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 5283, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 13.2075, - "characterCount": 34922, - "nonWhitespaceCharacterCount": 29282, - "newlineCount": 227, - "readingTimeInMinutes": 19.935849056603775, - "linkCount": 4, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031437153, - "modifiedDate": 1747598173983, - "sizeInBytes": 34958, - "sessionStart": { - "noteCount": 1, - "pageCount": 13.2075, - "wordCount": 5283, - "characterCount": 34922, - "nonWhitespaceCharacterCount": 29282, - "newlineCount": 227 - } - }, - "Setting/Magical Traditions/Alchemy.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 3316, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 8.29, - "characterCount": 23589, - "nonWhitespaceCharacterCount": 20053, - "newlineCount": 185, - "readingTimeInMinutes": 12.513207547169811, - "linkCount": 0, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031437063, - "modifiedDate": 1747047037220, - "sizeInBytes": 23605, - "sessionStart": { - "noteCount": 1, - "pageCount": 8.29, - "wordCount": 3316, - "characterCount": 23589, - "nonWhitespaceCharacterCount": 20053, - "newlineCount": 185 - } - }, - "Setting/World/Vaelora.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 364, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.91, - "characterCount": 2276, - "nonWhitespaceCharacterCount": 1882, - "newlineCount": 24, - "readingTimeInMinutes": 1.3735849056603773, - "linkCount": 4, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031436759, - "modifiedDate": 1745833515194, - "sizeInBytes": 2290, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.91, - "wordCount": 364, - "characterCount": 2276, - "nonWhitespaceCharacterCount": 1882, - "newlineCount": 24 - } - }, - "Setting/World/People/Tul People.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 653, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.6325, - "characterCount": 4514, - "nonWhitespaceCharacterCount": 3791, - "newlineCount": 48, - "readingTimeInMinutes": 2.4641509433962265, - "linkCount": 8, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436821, - "modifiedDate": 1747816430849, - "sizeInBytes": 4538, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.6325, - "wordCount": 653, - "characterCount": 4514, - "nonWhitespaceCharacterCount": 3791, - "newlineCount": 48 - } - }, - "Setting/World/People/Peoples.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 652, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.63, - "characterCount": 4118, - "nonWhitespaceCharacterCount": 3431, - "newlineCount": 25, - "readingTimeInMinutes": 2.460377358490566, - "linkCount": 4, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031436790, - "modifiedDate": 1746282846836, - "sizeInBytes": 4140, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.63, - "wordCount": 652, - "characterCount": 4118, - "nonWhitespaceCharacterCount": 3431, - "newlineCount": 25 - } - }, - "Setting/World/People/Tlaxcal.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 972, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.43, - "characterCount": 6795, - "nonWhitespaceCharacterCount": 5767, - "newlineCount": 48, - "readingTimeInMinutes": 3.667924528301887, - "linkCount": 0, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436837, - "modifiedDate": 1746530351957, - "sizeInBytes": 6805, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.43, - "wordCount": 972, - "characterCount": 6795, - "nonWhitespaceCharacterCount": 5767, - "newlineCount": 48 - } - }, - "Setting/World/People/Myou.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 852, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.13, - "characterCount": 5844, - "nonWhitespaceCharacterCount": 4925, - "newlineCount": 58, - "readingTimeInMinutes": 3.2150943396226417, - "linkCount": 1, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436869, - "modifiedDate": 1747816546888, - "sizeInBytes": 5858, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.13, - "wordCount": 852, - "characterCount": 5844, - "nonWhitespaceCharacterCount": 4925, - "newlineCount": 58 - } - }, - "Setting/World/People/Akumei.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 942, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.355, - "characterCount": 6399, - "nonWhitespaceCharacterCount": 5395, - "newlineCount": 48, - "readingTimeInMinutes": 3.5547169811320756, - "linkCount": 3, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436885, - "modifiedDate": 1746792442775, - "sizeInBytes": 6413, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.355, - "wordCount": 942, - "characterCount": 6399, - "nonWhitespaceCharacterCount": 5395, - "newlineCount": 48 - } - }, - "Setting/World/Spirits/Spirit Dominions.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 7999, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 19.9975, - "characterCount": 60809, - "nonWhitespaceCharacterCount": 50047, - "newlineCount": 766, - "readingTimeInMinutes": 30.184905660377357, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031436948, - "modifiedDate": 1746699710409, - "sizeInBytes": 60875, - "sessionStart": { - "noteCount": 1, - "pageCount": 19.9975, - "wordCount": 7999, - "characterCount": 60809, - "nonWhitespaceCharacterCount": 50047, - "newlineCount": 766 - } - }, - "Setting/World/Spirits/Spirits.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 4510, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 11.275, - "characterCount": 29203, - "nonWhitespaceCharacterCount": 24589, - "newlineCount": 169, - "readingTimeInMinutes": 17.0188679245283, - "linkCount": 0, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436921, - "modifiedDate": 1746693246318, - "sizeInBytes": 29399, - "sessionStart": { - "noteCount": 1, - "pageCount": 11.275, - "wordCount": 4510, - "characterCount": 29203, - "nonWhitespaceCharacterCount": 24589, - "newlineCount": 169 - } - }, - "Setting/Realms/Mentralin/Mentralian Kingdoms/Mentralian Kingdoms.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 6950, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 17.375, - "characterCount": 47027, - "nonWhitespaceCharacterCount": 39729, - "newlineCount": 317, - "readingTimeInMinutes": 26.22641509433962, - "linkCount": 82, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436056, - "modifiedDate": 1753878906870, - "sizeInBytes": 47040, - "sessionStart": { - "noteCount": 1, - "pageCount": 17.375, - "wordCount": 6950, - "characterCount": 47027, - "nonWhitespaceCharacterCount": 39729, - "newlineCount": 317 - } - }, - "Setting/Realms/Mentralin/Temerian Empire/Temerian Empire.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 8168, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 20.42, - "characterCount": 52403, - "nonWhitespaceCharacterCount": 43930, - "newlineCount": 278, - "readingTimeInMinutes": 30.82264150943396, - "linkCount": 57, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031435733, - "modifiedDate": 1753851138243, - "sizeInBytes": 52428, - "sessionStart": { - "noteCount": 1, - "pageCount": 20.42, - "wordCount": 8168, - "characterCount": 52403, - "nonWhitespaceCharacterCount": 43930, - "newlineCount": 278 - } - }, - "Setting/Realms/Mentralin/Temerian Empire/Settlements/Tor Praxis.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 597, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4925, - "characterCount": 4027, - "nonWhitespaceCharacterCount": 3399, - "newlineCount": 29, - "readingTimeInMinutes": 2.2528301886792454, - "linkCount": 4, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435821, - "modifiedDate": 1746193387829, - "sizeInBytes": 4027, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4925, - "wordCount": 597, - "characterCount": 4027, - "nonWhitespaceCharacterCount": 3399, - "newlineCount": 29 - } - }, - "Setting/Realms/Mentralin/Temerian Empire/Settlements/Raveas.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1465, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 3.6625, - "characterCount": 9879, - "nonWhitespaceCharacterCount": 8359, - "newlineCount": 68, - "readingTimeInMinutes": 5.528301886792453, - "linkCount": 11, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031435764, - "modifiedDate": 1753851138097, - "sizeInBytes": 9908, - "sessionStart": { - "noteCount": 1, - "pageCount": 3.6625, - "wordCount": 1465, - "characterCount": 9879, - "nonWhitespaceCharacterCount": 8359, - "newlineCount": 68 - } - }, - "Setting/Realms/Mentralin/Temerian Empire/Settlements/Tor Amras.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 530, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.325, - "characterCount": 3475, - "nonWhitespaceCharacterCount": 2907, - "newlineCount": 30, - "readingTimeInMinutes": 2, - "linkCount": 3, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435843, - "modifiedDate": 1746194384512, - "sizeInBytes": 3487, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.325, - "wordCount": 530, - "characterCount": 3475, - "nonWhitespaceCharacterCount": 2907, - "newlineCount": 30 - } - }, - "Setting/Realms/Mentralin/Temerian Empire/Settlements/Talpis.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2735, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 6.8375, - "characterCount": 18485, - "nonWhitespaceCharacterCount": 15653, - "newlineCount": 102, - "readingTimeInMinutes": 10.320754716981131, - "linkCount": 12, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031435890, - "modifiedDate": 1747996996742, - "sizeInBytes": 18485, - "sessionStart": { - "noteCount": 1, - "pageCount": 6.8375, - "wordCount": 2735, - "characterCount": 18485, - "nonWhitespaceCharacterCount": 15653, - "newlineCount": 102 - } - }, - "Setting/Realms/Mentralin/Temerian Empire/Settlements/Algeas.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1915, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 4.7875, - "characterCount": 12934, - "nonWhitespaceCharacterCount": 10932, - "newlineCount": 68, - "readingTimeInMinutes": 7.226415094339623, - "linkCount": 1, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435796, - "modifiedDate": 1746190537404, - "sizeInBytes": 12970, - "sessionStart": { - "noteCount": 1, - "pageCount": 4.7875, - "wordCount": 1915, - "characterCount": 12934, - "nonWhitespaceCharacterCount": 10932, - "newlineCount": 68 - } - }, - "Setting/Realms/Mentralin/Temerian Empire/Settlements/Erogent.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 3057, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 7.6425, - "characterCount": 20788, - "nonWhitespaceCharacterCount": 17590, - "newlineCount": 101, - "readingTimeInMinutes": 11.535849056603773, - "linkCount": 11, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031435861, - "modifiedDate": 1747975207514, - "sizeInBytes": 20820, - "sessionStart": { - "noteCount": 1, - "pageCount": 7.6425, - "wordCount": 3057, - "characterCount": 20788, - "nonWhitespaceCharacterCount": 17590, - "newlineCount": 101 - } - }, - "Setting/Realms/Mentralin/Lao-Shan/Lao-Shan.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 6977, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 17.4425, - "characterCount": 47508, - "nonWhitespaceCharacterCount": 40240, - "newlineCount": 262, - "readingTimeInMinutes": 26.328301886792453, - "linkCount": 14, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436381, - "modifiedDate": 1747908764381, - "sizeInBytes": 47532, - "sessionStart": { - "noteCount": 1, - "pageCount": 17.4425, - "wordCount": 6977, - "characterCount": 47508, - "nonWhitespaceCharacterCount": 40240, - "newlineCount": 262 - } - }, - "Setting/Realms/Mentralin/Reaches/The Reaches.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 9466, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 23.665, - "characterCount": 61218, - "nonWhitespaceCharacterCount": 51241, - "newlineCount": 417, - "readingTimeInMinutes": 35.72075471698113, - "linkCount": 76, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436100, - "modifiedDate": 1753705867275, - "sizeInBytes": 61484, - "sessionStart": { - "noteCount": 1, - "pageCount": 23.665, - "wordCount": 9466, - "characterCount": 61218, - "nonWhitespaceCharacterCount": 51241, - "newlineCount": 417 - } - }, - "Setting/Realms/Mentralin/Reaches/Settlements/Settlement Overview.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 628, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.57, - "characterCount": 4064, - "nonWhitespaceCharacterCount": 3399, - "newlineCount": 38, - "readingTimeInMinutes": 2.369811320754717, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031436165, - "modifiedDate": 1748000778526, - "sizeInBytes": 4086, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.57, - "wordCount": 628, - "characterCount": 4064, - "nonWhitespaceCharacterCount": 3399, - "newlineCount": 38 - } - }, - "Setting/Realms/Mentralin/Reaches/Settlements/Varneth.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2261, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 5.6525, - "characterCount": 15346, - "nonWhitespaceCharacterCount": 12943, - "newlineCount": 90, - "readingTimeInMinutes": 8.532075471698112, - "linkCount": 1, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436270, - "modifiedDate": 1748009467335, - "sizeInBytes": 15384, - "sessionStart": { - "noteCount": 1, - "pageCount": 5.6525, - "wordCount": 2261, - "characterCount": 15346, - "nonWhitespaceCharacterCount": 12943, - "newlineCount": 90 - } - }, - "Setting/Realms/Mentralin/Reaches/Settlements/Lysmar.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2444, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 6.11, - "characterCount": 16346, - "nonWhitespaceCharacterCount": 13782, - "newlineCount": 82, - "readingTimeInMinutes": 9.222641509433963, - "linkCount": 0, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436191, - "modifiedDate": 1748007897559, - "sizeInBytes": 16390, - "sessionStart": { - "noteCount": 1, - "pageCount": 6.11, - "wordCount": 2444, - "characterCount": 16346, - "nonWhitespaceCharacterCount": 13782, - "newlineCount": 82 - } - }, - "Setting/Realms/Mentralin/Reaches/Settlements/Drestal.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2123, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 5.3075, - "characterCount": 14151, - "nonWhitespaceCharacterCount": 11919, - "newlineCount": 82, - "readingTimeInMinutes": 8.011320754716982, - "linkCount": 0, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436239, - "modifiedDate": 1748004212127, - "sizeInBytes": 14197, - "sessionStart": { - "noteCount": 1, - "pageCount": 5.3075, - "wordCount": 2123, - "characterCount": 14151, - "nonWhitespaceCharacterCount": 11919, - "newlineCount": 82 - } - }, - "Setting/Realms/Mentralin/Reaches/Settlements/Karnost.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1602, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 4.005, - "characterCount": 11004, - "nonWhitespaceCharacterCount": 9326, - "newlineCount": 63, - "readingTimeInMinutes": 6.0452830188679245, - "linkCount": 1, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436286, - "modifiedDate": 1748011902761, - "sizeInBytes": 11064, - "sessionStart": { - "noteCount": 1, - "pageCount": 4.005, - "wordCount": 1602, - "characterCount": 11004, - "nonWhitespaceCharacterCount": 9326, - "newlineCount": 63 - } - }, - "Setting/Realms/Mentralin/Reaches/Daughters of the Wolf.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 2207, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 5.5175, - "characterCount": 14285, - "nonWhitespaceCharacterCount": 11961, - "newlineCount": 92, - "readingTimeInMinutes": 8.328301886792453, - "linkCount": 7, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436128, - "modifiedDate": 1747041794975, - "sizeInBytes": 14301, - "sessionStart": { - "noteCount": 1, - "pageCount": 5.5175, - "wordCount": 2207, - "characterCount": 14285, - "nonWhitespaceCharacterCount": 11961, - "newlineCount": 92 - } - }, - "Setting/Realms/Mentralin/Kyourin/Kyourin Shogunate.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 8611, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 21.5275, - "characterCount": 58247, - "nonWhitespaceCharacterCount": 49240, - "newlineCount": 302, - "readingTimeInMinutes": 32.49433962264151, - "linkCount": 53, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436336, - "modifiedDate": 1747970877357, - "sizeInBytes": 58324, - "sessionStart": { - "noteCount": 1, - "pageCount": 21.5275, - "wordCount": 8611, - "characterCount": 58247, - "nonWhitespaceCharacterCount": 49240, - "newlineCount": 302 - } - }, - "Setting/Realms/Mentralin/Golden Coast/Golden Coast.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 8361, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 20.9025, - "characterCount": 56742, - "nonWhitespaceCharacterCount": 47852, - "newlineCount": 422, - "readingTimeInMinutes": 31.550943396226415, - "linkCount": 2, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436444, - "modifiedDate": 1747773540864, - "sizeInBytes": 56940, - "sessionStart": { - "noteCount": 1, - "pageCount": 20.9025, - "wordCount": 8361, - "characterCount": 56742, - "nonWhitespaceCharacterCount": 47852, - "newlineCount": 422 - } - }, - "Setting/Realms/Mentralin/Ashenvale Woods/Ashenvale Woods.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 9038, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 22.595, - "characterCount": 60059, - "nonWhitespaceCharacterCount": 50574, - "newlineCount": 382, - "readingTimeInMinutes": 34.10566037735849, - "linkCount": 30, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031436412, - "modifiedDate": 1747825147445, - "sizeInBytes": 60203, - "sessionStart": { - "noteCount": 1, - "pageCount": 22.595, - "wordCount": 9038, - "characterCount": 60059, - "nonWhitespaceCharacterCount": 50574, - "newlineCount": 382 - } - }, - "Setting/Realms/Mentralin/Annwyn/People/Queen Aeryn of House Caerwyn.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0, - "characterCount": 1, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 2, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [ - "Queen Aeryn" - ], - "createdDate": 1754031435992, - "modifiedDate": 1746792851222, - "sizeInBytes": 48, - "sessionStart": { - "noteCount": 1, - "pageCount": 0, - "wordCount": 0, - "characterCount": 1, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 2 - }, - "frontmatter": { - "cssclasses": [], - "aliases": [ - "Queen Aeryn" - ] - } - }, - "Setting/Realms/Mentralin/Annwyn/Annwyn.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 7847, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 19.6175, - "characterCount": 51959, - "nonWhitespaceCharacterCount": 43630, - "newlineCount": 339, - "readingTimeInMinutes": 29.61132075471698, - "linkCount": 128, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031435938, - "modifiedDate": 1748342812961, - "sizeInBytes": 52202, - "sessionStart": { - "noteCount": 1, - "pageCount": 19.6175, - "wordCount": 7847, - "characterCount": 51959, - "nonWhitespaceCharacterCount": 43630, - "newlineCount": 339 - } - }, - "Setting/Realms/Mentralin.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 661, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.6525, - "characterCount": 4331, - "nonWhitespaceCharacterCount": 3647, - "newlineCount": 29, - "readingTimeInMinutes": 2.4943396226415095, - "linkCount": 14, - "embedCount": 1, - "aliases": null, - "createdDate": 1754031435686, - "modifiedDate": 1753635690508, - "sizeInBytes": 4337, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.6525, - "wordCount": 661, - "characterCount": 4331, - "nonWhitespaceCharacterCount": 3647, - "newlineCount": 29 - } - }, - "Setting/Realms/Anderon.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 510, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.275, - "characterCount": 3065, - "nonWhitespaceCharacterCount": 2525, - "newlineCount": 31, - "readingTimeInMinutes": 1.9245283018867925, - "linkCount": 1, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435701, - "modifiedDate": 1748294592049, - "sizeInBytes": 3079, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.275, - "wordCount": 510, - "characterCount": 3065, - "nonWhitespaceCharacterCount": 2525, - "newlineCount": 31 - } - }, - "Setting/Realms/Al'Mahoun.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 346, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.865, - "characterCount": 2209, - "nonWhitespaceCharacterCount": 1859, - "newlineCount": 11, - "readingTimeInMinutes": 1.3056603773584905, - "linkCount": 2, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031435654, - "modifiedDate": 1748292240070, - "sizeInBytes": 2229, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.865, - "wordCount": 346, - "characterCount": 2209, - "nonWhitespaceCharacterCount": 1859, - "newlineCount": 11 - } - }, - "Setting/Realms/Al'Mahoun/Pharos/Pharos.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 6185, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 15.4625, - "characterCount": 42339, - "nonWhitespaceCharacterCount": 35899, - "newlineCount": 257, - "readingTimeInMinutes": 23.339622641509433, - "linkCount": 42, - "embedCount": 2, - "aliases": null, - "createdDate": 1754031436475, - "modifiedDate": 1753878906631, - "sizeInBytes": 42385, - "sessionStart": { - "noteCount": 1, - "pageCount": 15.4625, - "wordCount": 6185, - "characterCount": 42339, - "nonWhitespaceCharacterCount": 35899, - "newlineCount": 257 - } - }, "Setting/Organizations/Shayakar/The Oathknights of Annwyn.md": { "isCountable": true, "targetNodeType": "file", @@ -5934,8 +5617,8 @@ "Oathknight", "Oathknights" ], - "createdDate": 1754031436728, - "modifiedDate": 1753635507732, + "createdDate": 1756573897539, + "modifiedDate": 1756573897540, "sizeInBytes": 16195, "sessionStart": { "noteCount": 1, @@ -5952,6 +5635,33 @@ ] } }, + "Setting/Organizations/Shayakar/Sworn Blades.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 880, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.2, + "characterCount": 5644, + "nonWhitespaceCharacterCount": 4703, + "newlineCount": 50, + "readingTimeInMinutes": 3.3207547169811322, + "linkCount": 8, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897539, + "modifiedDate": 1756573897539, + "sizeInBytes": 5672, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.2, + "wordCount": 880, + "characterCount": 5644, + "nonWhitespaceCharacterCount": 4703, + "newlineCount": 50 + } + }, "Setting/Organizations/Shayakar/Shayakar.md": { "isCountable": true, "targetNodeType": "file", @@ -5969,8 +5679,8 @@ "aliases": [ "Swordmaster" ], - "createdDate": 1754031436696, - "modifiedDate": 1748346320526, + "createdDate": 1756573897539, + "modifiedDate": 1756573897539, "sizeInBytes": 20954, "sessionStart": { "noteCount": 1, @@ -5986,33 +5696,6 @@ ] } }, - "Setting/Organizations/Shayakar/Sworn Blades.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 880, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.2, - "characterCount": 5644, - "nonWhitespaceCharacterCount": 4703, - "newlineCount": 50, - "readingTimeInMinutes": 3.3207547169811322, - "linkCount": 8, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031436712, - "modifiedDate": 1753702393784, - "sizeInBytes": 5672, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.2, - "wordCount": 880, - "characterCount": 5644, - "nonWhitespaceCharacterCount": 4703, - "newlineCount": 50 - } - }, "Setting/Organizations/Shayakar/Knightly Orders.md": { "isCountable": true, "targetNodeType": "file", @@ -6028,8 +5711,8 @@ "linkCount": 6, "embedCount": 0, "aliases": null, - "createdDate": 1754031436665, - "modifiedDate": 1748336579198, + "createdDate": 1756573897539, + "modifiedDate": 1756573897539, "sizeInBytes": 29173, "sessionStart": { "noteCount": 1, @@ -6055,8 +5738,8 @@ "linkCount": 0, "embedCount": 0, "aliases": null, - "createdDate": 1754031436651, - "modifiedDate": 1746531619938, + "createdDate": 1756573897539, + "modifiedDate": 1756573897539, "sizeInBytes": 0, "sessionStart": { "noteCount": 1, @@ -6067,2534 +5750,418 @@ "newlineCount": 0 } }, - "Stories/The Reed Remembers Her/_Overview.md": { + "Setting/Magical Traditions/The Hollowed.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 1026, + "wordCount": 1794, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 2.565, - "characterCount": 7442, - "nonWhitespaceCharacterCount": 6033, - "newlineCount": 160, - "readingTimeInMinutes": 3.871698113207547, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031439149, - "modifiedDate": 1752003304069, - "sizeInBytes": 7616, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.565, - "wordCount": 1026, - "characterCount": 7442, - "nonWhitespaceCharacterCount": 6033, - "newlineCount": 160 - } - }, - "Stories/The Reed Remembers Her/1.1 Drifting Embers.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 10020, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 25.05, - "characterCount": 60877, - "nonWhitespaceCharacterCount": 49531, - "newlineCount": 2349, - "readingTimeInMinutes": 37.81132075471698, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031439181, - "modifiedDate": 1752010121148, - "sizeInBytes": 62931, - "sessionStart": { - "noteCount": 1, - "pageCount": 25.05, - "wordCount": 10020, - "characterCount": 60877, - "nonWhitespaceCharacterCount": 49531, - "newlineCount": 2349 - } - }, - "Stories/The Reed Remembers Her/Index.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0, - "characterCount": 1, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 2, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031439123, - "modifiedDate": 1752003454826, - "sizeInBytes": 181, - "sessionStart": { - "noteCount": 1, - "pageCount": 0, - "wordCount": 0, - "characterCount": 1, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 2 - }, - "frontmatter": { - "longform": { - "format": "scenes", - "title": "The Reed Remembers Her", - "workflow": "Default Workflow", - "sceneFolder": "/", - "scenes": [], - "ignoredFiles": [ - "_Overview" - ] - } - } - }, - "Stories/Crown of Blood/Notes.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 5638, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 14.095, - "characterCount": 36217, - "nonWhitespaceCharacterCount": 29930, - "newlineCount": 474, - "readingTimeInMinutes": 21.275471698113208, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437216, - "modifiedDate": 1749897997060, - "sizeInBytes": 37067, - "sessionStart": { - "noteCount": 1, - "pageCount": 14.095, - "wordCount": 5638, - "characterCount": 36217, - "nonWhitespaceCharacterCount": 29930, - "newlineCount": 474 - } - }, - "Stories/Crown of Blood/manuscript.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 44519, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 111.2975, - "characterCount": 264047, - "nonWhitespaceCharacterCount": 216777, - "newlineCount": 4801, - "readingTimeInMinutes": 167.99622641509433, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031439074, - "modifiedDate": 1749932630594, - "sizeInBytes": 270656, - "sessionStart": { - "noteCount": 1, - "pageCount": 111.2975, - "wordCount": 44519, - "characterCount": 264047, - "nonWhitespaceCharacterCount": 216777, - "newlineCount": 4801 - } - }, - "Stories/Crown of Blood/Interlude - What the Dead Remember.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1122, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.805, - "characterCount": 6821, - "nonWhitespaceCharacterCount": 5647, - "newlineCount": 103, - "readingTimeInMinutes": 4.233962264150944, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437646, - "modifiedDate": 1749591022722, - "sizeInBytes": 6957, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.805, - "wordCount": 1122, - "characterCount": 6821, - "nonWhitespaceCharacterCount": 5647, - "newlineCount": 103 - } - }, - "Stories/Crown of Blood/Interlude - The Limits of Discipline.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 885, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.2125, - "characterCount": 5239, - "nonWhitespaceCharacterCount": 4296, - "newlineCount": 119, - "readingTimeInMinutes": 3.339622641509434, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438468, - "modifiedDate": 1749803065820, - "sizeInBytes": 5481, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.2125, - "wordCount": 885, - "characterCount": 5239, - "nonWhitespaceCharacterCount": 4296, - "newlineCount": 119 - } - }, - "Stories/Crown of Blood/Interlude - The Cold Trail.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 422, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.055, - "characterCount": 2559, - "nonWhitespaceCharacterCount": 2114, - "newlineCount": 49, - "readingTimeInMinutes": 1.5924528301886793, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438040, - "modifiedDate": 1749653350531, - "sizeInBytes": 2663, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.055, - "wordCount": 422, - "characterCount": 2559, - "nonWhitespaceCharacterCount": 2114, - "newlineCount": 49 - } - }, - "Stories/Crown of Blood/Interlude - Raw Power.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 399, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9975, - "characterCount": 2399, - "nonWhitespaceCharacterCount": 1975, - "newlineCount": 47, - "readingTimeInMinutes": 1.5056603773584907, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438663, - "modifiedDate": 1749808095130, - "sizeInBytes": 2461, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9975, - "wordCount": 399, - "characterCount": 2399, - "nonWhitespaceCharacterCount": 1975, - "newlineCount": 47 - } - }, - "Stories/Crown of Blood/Interlude - Cinder in the Halls.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 484, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.21, - "characterCount": 2885, - "nonWhitespaceCharacterCount": 2378, - "newlineCount": 49, - "readingTimeInMinutes": 1.8264150943396227, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437518, - "modifiedDate": 1749506659539, - "sizeInBytes": 2963, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.21, - "wordCount": 484, - "characterCount": 2885, - "nonWhitespaceCharacterCount": 2378, - "newlineCount": 49 - } - }, - "Stories/Crown of Blood/C7S2 - Movement Reported.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 379, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9475, - "characterCount": 2380, - "nonWhitespaceCharacterCount": 1981, - "newlineCount": 43, - "readingTimeInMinutes": 1.430188679245283, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438326, - "modifiedDate": 1749721362218, - "sizeInBytes": 2486, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9475, - "wordCount": 379, - "characterCount": 2380, - "nonWhitespaceCharacterCount": 1981, - "newlineCount": 43 - } - }, - "Stories/Crown of Blood/Index.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0, - "characterCount": 1, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 2, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437184, - "modifiedDate": 1750253843754, - "sizeInBytes": 2728, - "sessionStart": { - "noteCount": 1, - "pageCount": 0, - "wordCount": 0, - "characterCount": 1, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 2 - }, - "frontmatter": { - "longform": { - "format": "scenes", - "title": "Crown of Blood", - "workflow": "Default Workflow", - "sceneFolder": "/", - "scenes": [], - "ignoredFiles": [ - "Notes", - "Current State" - ] - } - } - }, - "Stories/Crown of Blood/Current State.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 703, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.7575, - "characterCount": 4844, - "nonWhitespaceCharacterCount": 3913, - "newlineCount": 116, - "readingTimeInMinutes": 2.6528301886792454, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438087, - "modifiedDate": 1749654192333, - "sizeInBytes": 4912, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.7575, - "wordCount": 703, - "characterCount": 4844, - "nonWhitespaceCharacterCount": 3913, - "newlineCount": 116 - } - }, - "Stories/Crown of Blood/Epilogue - The Sound Before the Storm.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 776, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.94, - "characterCount": 4525, - "nonWhitespaceCharacterCount": 3702, - "newlineCount": 80, - "readingTimeInMinutes": 2.9283018867924526, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031439098, - "modifiedDate": 1750254418309, - "sizeInBytes": 4607, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.94, - "wordCount": 776, - "characterCount": 4525, - "nonWhitespaceCharacterCount": 3702, - "newlineCount": 80 - } - }, - "Stories/Crown of Blood/C9S3 - Blood and Broken Sigil.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 563, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4075, - "characterCount": 3363, - "nonWhitespaceCharacterCount": 2778, - "newlineCount": 47, - "readingTimeInMinutes": 2.1245283018867926, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438540, - "modifiedDate": 1749805378795, - "sizeInBytes": 3435, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4075, - "wordCount": 563, - "characterCount": 3363, - "nonWhitespaceCharacterCount": 2778, - "newlineCount": 47 - } - }, - "Stories/Crown of Blood/C9S1 - Deeper into the Keep.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 629, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5725, - "characterCount": 3757, - "nonWhitespaceCharacterCount": 3102, - "newlineCount": 55, - "readingTimeInMinutes": 2.3735849056603775, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438484, - "modifiedDate": 1749804064122, - "sizeInBytes": 3821, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5725, - "wordCount": 629, - "characterCount": 3757, - "nonWhitespaceCharacterCount": 3102, - "newlineCount": 55 - } - }, - "Stories/Crown of Blood/C9S2 - Exploring the Keep.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 805, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.0125, - "characterCount": 4803, - "nonWhitespaceCharacterCount": 3969, - "newlineCount": 60, - "readingTimeInMinutes": 3.0377358490566038, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438516, - "modifiedDate": 1749804706232, - "sizeInBytes": 4881, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.0125, - "wordCount": 805, - "characterCount": 4803, - "nonWhitespaceCharacterCount": 3969, - "newlineCount": 60 - } - }, - "Stories/Crown of Blood/C8S3 - Into the Darkness.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 731, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.8275, - "characterCount": 4354, - "nonWhitespaceCharacterCount": 3596, - "newlineCount": 57, - "readingTimeInMinutes": 2.758490566037736, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438453, - "modifiedDate": 1749801558980, - "sizeInBytes": 4458, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.8275, - "wordCount": 731, - "characterCount": 4354, - "nonWhitespaceCharacterCount": 3596, - "newlineCount": 57 - } - }, - "Stories/Crown of Blood/C8S2 - Awaken the Gate.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 808, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.02, - "characterCount": 4719, - "nonWhitespaceCharacterCount": 3880, - "newlineCount": 61, - "readingTimeInMinutes": 3.049056603773585, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438427, - "modifiedDate": 1749800209591, - "sizeInBytes": 4805, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.02, - "wordCount": 808, - "characterCount": 4719, - "nonWhitespaceCharacterCount": 3880, - "newlineCount": 61 - } - }, - "Stories/Crown of Blood/C8S1 - Mouth of the Mountain.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 427, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.0675, - "characterCount": 2494, - "nonWhitespaceCharacterCount": 2052, - "newlineCount": 33, - "readingTimeInMinutes": 1.6113207547169812, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438405, - "modifiedDate": 1749757532003, - "sizeInBytes": 2528, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.0675, - "wordCount": 427, - "characterCount": 2494, - "nonWhitespaceCharacterCount": 2052, - "newlineCount": 33 - } - }, - "Stories/Crown of Blood/C7S3 - Trap above the cloudline.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 475, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.1875, - "characterCount": 2760, - "nonWhitespaceCharacterCount": 2265, - "newlineCount": 43, - "readingTimeInMinutes": 1.7924528301886793, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438341, - "modifiedDate": 1749732585816, - "sizeInBytes": 2846, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.1875, - "wordCount": 475, - "characterCount": 2760, - "nonWhitespaceCharacterCount": 2265, - "newlineCount": 43 - } - }, - "Stories/Crown of Blood/C7S4 - Avalanche Rite.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 727, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.8175, - "characterCount": 4413, - "nonWhitespaceCharacterCount": 3648, - "newlineCount": 79, - "readingTimeInMinutes": 2.7433962264150944, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438373, - "modifiedDate": 1749736803344, - "sizeInBytes": 4513, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.8175, - "wordCount": 727, - "characterCount": 4413, - "nonWhitespaceCharacterCount": 3648, - "newlineCount": 79 - } - }, - "Stories/Crown of Blood/C7S5 - Aftermath.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 592, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.48, - "characterCount": 3407, - "nonWhitespaceCharacterCount": 2782, - "newlineCount": 69, - "readingTimeInMinutes": 2.2339622641509433, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438389, - "modifiedDate": 1749742073918, - "sizeInBytes": 3495, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.48, - "wordCount": 592, - "characterCount": 3407, - "nonWhitespaceCharacterCount": 2782, - "newlineCount": 69 - } - }, - "Stories/Crown of Blood/C6S4 - Whispers in the nIght.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 353, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.8825, - "characterCount": 2076, - "nonWhitespaceCharacterCount": 1708, - "newlineCount": 33, - "readingTimeInMinutes": 1.3320754716981131, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438278, - "modifiedDate": 1749720435919, - "sizeInBytes": 2100, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.8825, - "wordCount": 353, - "characterCount": 2076, - "nonWhitespaceCharacterCount": 1708, - "newlineCount": 33 - } - }, - "Stories/Crown of Blood/C7S1 - Transition.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 229, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.5725, - "characterCount": 1360, - "nonWhitespaceCharacterCount": 1123, - "newlineCount": 17, - "readingTimeInMinutes": 0.8641509433962264, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438310, - "modifiedDate": 1749720781507, - "sizeInBytes": 1368, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.5725, - "wordCount": 229, - "characterCount": 1360, - "nonWhitespaceCharacterCount": 1123, - "newlineCount": 17 - } - }, - "Stories/Crown of Blood/C6S5 - The Leaving.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 550, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.375, - "characterCount": 3284, - "nonWhitespaceCharacterCount": 2715, - "newlineCount": 40, - "readingTimeInMinutes": 2.0754716981132075, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438262, - "modifiedDate": 1749720696270, - "sizeInBytes": 3360, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.375, - "wordCount": 550, - "characterCount": 3284, - "nonWhitespaceCharacterCount": 2715, - "newlineCount": 40 - } - }, - "Stories/Crown of Blood/C4.3S3 - Candle before the forgotten.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 315, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.7875, - "characterCount": 1827, - "nonWhitespaceCharacterCount": 1501, - "newlineCount": 23, - "readingTimeInMinutes": 1.1886792452830188, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437865, - "modifiedDate": 1749646860594, - "sizeInBytes": 1851, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.7875, - "wordCount": 315, - "characterCount": 1827, - "nonWhitespaceCharacterCount": 1501, - "newlineCount": 23 - } - }, - "Stories/Crown of Blood/C6S4 - Embers and Distance.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 445, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.1125, - "characterCount": 2592, - "nonWhitespaceCharacterCount": 2124, - "newlineCount": 49, - "readingTimeInMinutes": 1.679245283018868, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438230, - "modifiedDate": 1749717829511, - "sizeInBytes": 2688, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.1125, - "wordCount": 445, - "characterCount": 2592, - "nonWhitespaceCharacterCount": 2124, - "newlineCount": 49 - } - }, - "Stories/Crown of Blood/C6S2 - The Last to Remember.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 681, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.7025, - "characterCount": 3919, - "nonWhitespaceCharacterCount": 3220, - "newlineCount": 39, - "readingTimeInMinutes": 2.569811320754717, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438182, - "modifiedDate": 1749674242346, - "sizeInBytes": 4001, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.7025, - "wordCount": 681, - "characterCount": 3919, - "nonWhitespaceCharacterCount": 3220, - "newlineCount": 39 - } - }, - "Stories/Crown of Blood/C6S3 - The Fregment's Path.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 439, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.0975, - "characterCount": 2685, - "nonWhitespaceCharacterCount": 2228, - "newlineCount": 39, - "readingTimeInMinutes": 1.6566037735849057, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438214, - "modifiedDate": 1749674557800, - "sizeInBytes": 2765, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.0975, - "wordCount": 439, - "characterCount": 2685, - "nonWhitespaceCharacterCount": 2228, - "newlineCount": 39 - } - }, - "Stories/Crown of Blood/C5S3 - What stirs below.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 342, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.855, - "characterCount": 1982, - "nonWhitespaceCharacterCount": 1625, - "newlineCount": 30, - "readingTimeInMinutes": 1.290566037735849, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438151, - "modifiedDate": 1749672844414, - "sizeInBytes": 2018, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.855, - "wordCount": 342, - "characterCount": 1982, - "nonWhitespaceCharacterCount": 1625, - "newlineCount": 30 - } - }, - "Stories/Crown of Blood/C6S1 - Erased Histories.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 399, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9975, - "characterCount": 2318, - "nonWhitespaceCharacterCount": 1904, - "newlineCount": 33, - "readingTimeInMinutes": 1.5056603773584907, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438167, - "modifiedDate": 1749673658158, - "sizeInBytes": 2326, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9975, - "wordCount": 399, - "characterCount": 2318, - "nonWhitespaceCharacterCount": 1904, - "newlineCount": 33 - } - }, - "Stories/Crown of Blood/C5S2 - The Blood and the Stone.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 443, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.1075, - "characterCount": 2558, - "nonWhitespaceCharacterCount": 2099, - "newlineCount": 35, - "readingTimeInMinutes": 1.6716981132075472, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438123, - "modifiedDate": 1749672542548, - "sizeInBytes": 2610, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.1075, - "wordCount": 443, - "characterCount": 2558, - "nonWhitespaceCharacterCount": 2099, - "newlineCount": 35 - } - }, - "Stories/Crown of Blood/C5S1 - The Veyari.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 890, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.225, - "characterCount": 5236, - "nonWhitespaceCharacterCount": 4315, - "newlineCount": 62, - "readingTimeInMinutes": 3.358490566037736, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438103, - "modifiedDate": 1749672053039, - "sizeInBytes": 5314, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.225, - "wordCount": 890, - "characterCount": 5236, - "nonWhitespaceCharacterCount": 4315, - "newlineCount": 62 - } - }, - "Stories/Crown of Blood/C4S4 - The Choice.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 775, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.9375, - "characterCount": 4750, - "nonWhitespaceCharacterCount": 3937, - "newlineCount": 79, - "readingTimeInMinutes": 2.9245283018867925, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437598, - "modifiedDate": 1750266274511, - "sizeInBytes": 4840, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.9375, - "wordCount": 775, - "characterCount": 4750, - "nonWhitespaceCharacterCount": 3937, - "newlineCount": 79 - } - }, - "Stories/Crown of Blood/C4S5 - Winter's Edge.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 639, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5975, - "characterCount": 3883, - "nonWhitespaceCharacterCount": 3221, - "newlineCount": 49, - "readingTimeInMinutes": 2.4113207547169813, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437628, - "modifiedDate": 1749589550350, - "sizeInBytes": 3949, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5975, - "wordCount": 639, - "characterCount": 3883, - "nonWhitespaceCharacterCount": 3221, - "newlineCount": 49 - } - }, - "Stories/Crown of Blood/C4S3 - The Last Watch.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 799, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.9975, - "characterCount": 4558, - "nonWhitespaceCharacterCount": 3720, - "newlineCount": 79, - "readingTimeInMinutes": 3.0150943396226415, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437580, - "modifiedDate": 1749588330441, - "sizeInBytes": 4702, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.9975, - "wordCount": 799, - "characterCount": 4558, - "nonWhitespaceCharacterCount": 3720, - "newlineCount": 79 - } - }, - "Stories/Crown of Blood/C4S2 - Steel in Snow.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 562, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.405, - "characterCount": 3440, - "nonWhitespaceCharacterCount": 2842, - "newlineCount": 75, - "readingTimeInMinutes": 2.120754716981132, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437549, - "modifiedDate": 1749587309424, - "sizeInBytes": 3548, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.405, - "wordCount": 562, - "characterCount": 3440, - "nonWhitespaceCharacterCount": 2842, - "newlineCount": 75 - } - }, - "Stories/Crown of Blood/C4S1 - Foothills.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 450, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.125, - "characterCount": 2610, - "nonWhitespaceCharacterCount": 2147, - "newlineCount": 29, - "readingTimeInMinutes": 1.6981132075471699, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437538, - "modifiedDate": 1749556245363, - "sizeInBytes": 2656, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.125, - "wordCount": 450, - "characterCount": 2610, - "nonWhitespaceCharacterCount": 2147, - "newlineCount": 29 - } - }, - "Stories/Crown of Blood/C4.5S4 - The Chosen Few.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 448, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.12, - "characterCount": 2648, - "nonWhitespaceCharacterCount": 2181, - "newlineCount": 41, - "readingTimeInMinutes": 1.6905660377358491, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438024, - "modifiedDate": 1749652563633, - "sizeInBytes": 2720, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.12, - "wordCount": 448, - "characterCount": 2648, - "nonWhitespaceCharacterCount": 2181, - "newlineCount": 41 - } - }, - "Stories/Crown of Blood/C4.5S3 - Gathering the Loyals.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438008, - "modifiedDate": 1749652230120, - "sizeInBytes": 0, - "sessionStart": { - "noteCount": 1, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "Stories/Crown of Blood/C4.5S2 - Decision atop the Walls.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 558, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.395, - "characterCount": 3306, - "nonWhitespaceCharacterCount": 2709, - "newlineCount": 81, - "readingTimeInMinutes": 2.1056603773584905, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437992, - "modifiedDate": 1749652199620, - "sizeInBytes": 3504, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.395, - "wordCount": 558, - "characterCount": 3306, - "nonWhitespaceCharacterCount": 2709, - "newlineCount": 81 - } - }, - "Stories/Crown of Blood/C4.5S1 - Scouts Return.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 334, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.835, - "characterCount": 1998, - "nonWhitespaceCharacterCount": 1649, - "newlineCount": 33, - "readingTimeInMinutes": 1.260377358490566, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437976, - "modifiedDate": 1749651541680, - "sizeInBytes": 2056, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.835, - "wordCount": 334, - "characterCount": 1998, - "nonWhitespaceCharacterCount": 1649, - "newlineCount": 33 - } - }, - "Stories/Crown of Blood/C4.4S2 - Ghosts of the Journey.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 469, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.1725, - "characterCount": 2766, - "nonWhitespaceCharacterCount": 2270, - "newlineCount": 52, - "readingTimeInMinutes": 1.769811320754717, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437913, - "modifiedDate": 1749649733090, - "sizeInBytes": 2898, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.1725, - "wordCount": 469, - "characterCount": 2766, - "nonWhitespaceCharacterCount": 2270, - "newlineCount": 52 - } - }, - "Stories/Crown of Blood/C4.4S4 - Banner in the Wind.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 387, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9675, - "characterCount": 2249, - "nonWhitespaceCharacterCount": 1847, - "newlineCount": 31, - "readingTimeInMinutes": 1.460377358490566, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437944, - "modifiedDate": 1749650651312, - "sizeInBytes": 2271, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9675, - "wordCount": 387, - "characterCount": 2249, - "nonWhitespaceCharacterCount": 1847, - "newlineCount": 31 - } - }, - "Stories/Crown of Blood/C4.4S3 - A Quiet Talk.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 465, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.1625, - "characterCount": 2649, - "nonWhitespaceCharacterCount": 2158, - "newlineCount": 55, - "readingTimeInMinutes": 1.7547169811320755, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437928, - "modifiedDate": 1749649980510, - "sizeInBytes": 2773, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.1625, - "wordCount": 465, - "characterCount": 2649, - "nonWhitespaceCharacterCount": 2158, - "newlineCount": 55 - } - }, - "Stories/Crown of Blood/C4.4S1 - Morning Drills.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 443, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.1075, - "characterCount": 2644, - "nonWhitespaceCharacterCount": 2184, - "newlineCount": 37, - "readingTimeInMinutes": 1.6716981132075472, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437881, - "modifiedDate": 1749648576370, - "sizeInBytes": 2700, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.1075, - "wordCount": 443, - "characterCount": 2644, - "nonWhitespaceCharacterCount": 2184, - "newlineCount": 37 - } - }, - "Stories/Crown of Blood/C4.3S1 - Dust-Laden Past.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 603, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5075, - "characterCount": 3590, - "nonWhitespaceCharacterCount": 2954, - "newlineCount": 45, - "readingTimeInMinutes": 2.2754716981132077, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437823, - "modifiedDate": 1749641604192, - "sizeInBytes": 3634, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5075, - "wordCount": 603, - "characterCount": 3590, - "nonWhitespaceCharacterCount": 2954, - "newlineCount": 45 - } - }, - "Stories/Crown of Blood/C4.3S2 - Sword of Fireless Flame.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 527, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.3175, - "characterCount": 3211, - "nonWhitespaceCharacterCount": 2647, - "newlineCount": 41, - "readingTimeInMinutes": 1.9886792452830189, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437838, - "modifiedDate": 1749643002577, - "sizeInBytes": 3271, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.3175, - "wordCount": 527, - "characterCount": 3211, - "nonWhitespaceCharacterCount": 2647, - "newlineCount": 41 - } - }, - "Stories/Crown of Blood/C4.2S3 - Nightfall Confession.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 396, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.99, - "characterCount": 2278, - "nonWhitespaceCharacterCount": 1865, - "newlineCount": 37, - "readingTimeInMinutes": 1.4943396226415093, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437780, - "modifiedDate": 1749639266267, - "sizeInBytes": 2332, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.99, - "wordCount": 396, - "characterCount": 2278, - "nonWhitespaceCharacterCount": 1865, - "newlineCount": 37 - } - }, - "Stories/Crown of Blood/C4.2S4 - Foreshadowed Change.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 399, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9975, - "characterCount": 2362, - "nonWhitespaceCharacterCount": 1939, - "newlineCount": 51, - "readingTimeInMinutes": 1.5056603773584907, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437801, - "modifiedDate": 1749639421650, - "sizeInBytes": 2386, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9975, - "wordCount": 399, - "characterCount": 2362, - "nonWhitespaceCharacterCount": 1939, - "newlineCount": 51 - } - }, - "Stories/Crown of Blood/C4.2S1 - Wounds in Silence.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 617, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5425, - "characterCount": 3523, - "nonWhitespaceCharacterCount": 2882, - "newlineCount": 48, - "readingTimeInMinutes": 2.328301886792453, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437722, - "modifiedDate": 1749637431336, - "sizeInBytes": 3607, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5425, - "wordCount": 617, - "characterCount": 3523, - "nonWhitespaceCharacterCount": 2882, - "newlineCount": 48 - } - }, - "Stories/Crown of Blood/C4.2S2 - Glimpse of the Past.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 513, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.2825, - "characterCount": 2919, - "nonWhitespaceCharacterCount": 2386, - "newlineCount": 43, - "readingTimeInMinutes": 1.9358490566037736, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437754, - "modifiedDate": 1749637881148, - "sizeInBytes": 3009, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.2825, - "wordCount": 513, - "characterCount": 2919, - "nonWhitespaceCharacterCount": 2386, - "newlineCount": 43 - } - }, - "Stories/Crown of Blood/C4.1S3 - Dreams beneath the ice.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 814, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.035, - "characterCount": 4749, - "nonWhitespaceCharacterCount": 3887, - "newlineCount": 99, - "readingTimeInMinutes": 3.0716981132075474, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437707, - "modifiedDate": 1749636986047, - "sizeInBytes": 4783, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.035, - "wordCount": 814, - "characterCount": 4749, - "nonWhitespaceCharacterCount": 3887, - "newlineCount": 99 - } - }, - "Stories/Crown of Blood/C4.1S2 - The Broken Garison.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 573, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.4325, - "characterCount": 3528, - "nonWhitespaceCharacterCount": 2936, - "newlineCount": 38, - "readingTimeInMinutes": 2.1622641509433964, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437691, - "modifiedDate": 1749635776980, - "sizeInBytes": 3634, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.4325, - "wordCount": 573, - "characterCount": 3528, - "nonWhitespaceCharacterCount": 2936, - "newlineCount": 38 - } - }, - "Stories/Crown of Blood/C3S1 - To the Hall of Kings.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 613, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.5325, - "characterCount": 3800, - "nonWhitespaceCharacterCount": 3158, - "newlineCount": 61, - "readingTimeInMinutes": 2.3132075471698115, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437407, - "modifiedDate": 1749505895906, - "sizeInBytes": 3904, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5325, - "wordCount": 613, - "characterCount": 3800, - "nonWhitespaceCharacterCount": 3158, - "newlineCount": 61 - } - }, - "Stories/Crown of Blood/C3S5 - The Old Gate.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 399, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9975, - "characterCount": 2416, - "nonWhitespaceCharacterCount": 2000, - "newlineCount": 37, - "readingTimeInMinutes": 1.5056603773584907, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437486, - "modifiedDate": 1749506429054, - "sizeInBytes": 2458, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9975, - "wordCount": 399, - "characterCount": 2416, - "nonWhitespaceCharacterCount": 2000, - "newlineCount": 37 - } - }, - "Stories/Crown of Blood/C4.1S1 - The Weight of Survival.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 362, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.905, - "characterCount": 2097, - "nonWhitespaceCharacterCount": 1722, - "newlineCount": 29, - "readingTimeInMinutes": 1.3660377358490565, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437660, - "modifiedDate": 1749635100464, - "sizeInBytes": 2137, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.905, - "wordCount": 362, - "characterCount": 2097, - "nonWhitespaceCharacterCount": 1722, - "newlineCount": 29 - } - }, - "Stories/Crown of Blood/C3S4 - Blood That Binds.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 478, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.195, - "characterCount": 2777, - "nonWhitespaceCharacterCount": 2265, - "newlineCount": 71, - "readingTimeInMinutes": 1.8037735849056604, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437471, - "modifiedDate": 1749505754353, - "sizeInBytes": 2899, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.195, - "wordCount": 478, - "characterCount": 2777, - "nonWhitespaceCharacterCount": 2265, - "newlineCount": 71 - } - }, - "Stories/Crown of Blood/C3S2 - Alisha refuses to be left behind.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 364, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.91, - "characterCount": 2157, - "nonWhitespaceCharacterCount": 1773, - "newlineCount": 43, - "readingTimeInMinutes": 1.3735849056603773, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437423, - "modifiedDate": 1749505152652, - "sizeInBytes": 2251, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.91, - "wordCount": 364, - "characterCount": 2157, - "nonWhitespaceCharacterCount": 1773, - "newlineCount": 43 - } - }, - "Stories/Crown of Blood/C2S3 - Arguing before the court.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1893, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 4.7325, - "characterCount": 11026, - "nonWhitespaceCharacterCount": 9009, - "newlineCount": 236, - "readingTimeInMinutes": 7.143396226415095, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437375, - "modifiedDate": 1748726780185, - "sizeInBytes": 11442, - "sessionStart": { - "noteCount": 1, - "pageCount": 4.7325, - "wordCount": 1893, - "characterCount": 11026, - "nonWhitespaceCharacterCount": 9009, - "newlineCount": 236 - } - }, - "Stories/Crown of Blood/C3S3 - Whispers in Stone.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 399, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9975, - "characterCount": 2326, - "nonWhitespaceCharacterCount": 1904, - "newlineCount": 49, - "readingTimeInMinutes": 1.5056603773584907, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437455, - "modifiedDate": 1749505326905, - "sizeInBytes": 2390, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9975, - "wordCount": 399, - "characterCount": 2326, - "nonWhitespaceCharacterCount": 1904, - "newlineCount": 49 - } - }, - "Stories/Crown of Blood/C1S5 - The King rides.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 755, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.8875, - "characterCount": 4431, - "nonWhitespaceCharacterCount": 3640, - "newlineCount": 75, - "readingTimeInMinutes": 2.849056603773585, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437322, - "modifiedDate": 1748725652193, - "sizeInBytes": 4503, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.8875, - "wordCount": 755, - "characterCount": 4431, - "nonWhitespaceCharacterCount": 3640, - "newlineCount": 75 - } - }, - "Stories/Crown of Blood/C2S2 - The gates are broken.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 529, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.3225, - "characterCount": 3074, - "nonWhitespaceCharacterCount": 2523, - "newlineCount": 47, - "readingTimeInMinutes": 1.9962264150943396, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437359, - "modifiedDate": 1748726231669, - "sizeInBytes": 3140, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.3225, - "wordCount": 529, - "characterCount": 3074, - "nonWhitespaceCharacterCount": 2523, - "newlineCount": 47 - } - }, - "Stories/Crown of Blood/C2S1 - The king is slain.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 477, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.1925, - "characterCount": 2742, - "nonWhitespaceCharacterCount": 2248, - "newlineCount": 37, - "readingTimeInMinutes": 1.8, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437344, - "modifiedDate": 1748726130021, - "sizeInBytes": 2778, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.1925, - "wordCount": 477, - "characterCount": 2742, - "nonWhitespaceCharacterCount": 2248, - "newlineCount": 37 - } - }, - "Stories/Crown of Blood/C1S4 - Telaryn and Alisha.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 398, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.995, - "characterCount": 2335, - "nonWhitespaceCharacterCount": 1911, - "newlineCount": 55, - "readingTimeInMinutes": 1.5018867924528303, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437296, - "modifiedDate": 1748725318845, - "sizeInBytes": 2463, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.995, - "wordCount": 398, - "characterCount": 2335, - "nonWhitespaceCharacterCount": 1911, - "newlineCount": 55 - } - }, - "Stories/Crown of Blood/C1S3 - Telaryn talking to her father.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 410, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.025, - "characterCount": 2291, - "nonWhitespaceCharacterCount": 1861, - "newlineCount": 43, - "readingTimeInMinutes": 1.5471698113207548, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437282, - "modifiedDate": 1748725322830, - "sizeInBytes": 2395, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.025, - "wordCount": 410, - "characterCount": 2291, - "nonWhitespaceCharacterCount": 1861, - "newlineCount": 43 - } - }, - "Stories/Crown of Blood/C1S2 Marcas preparing for the Siege.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 431, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.0775, - "characterCount": 2527, - "nonWhitespaceCharacterCount": 2076, - "newlineCount": 43, - "readingTimeInMinutes": 1.6264150943396227, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437248, - "modifiedDate": 1748724886282, - "sizeInBytes": 2613, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.0775, - "wordCount": 431, - "characterCount": 2527, - "nonWhitespaceCharacterCount": 2076, - "newlineCount": 43 - } - }, - "Stories/Crown of Blood/C1S1 Snow on the towers and siege.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 557, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.3925, - "characterCount": 3307, - "nonWhitespaceCharacterCount": 2726, - "newlineCount": 51, - "readingTimeInMinutes": 2.1018867924528304, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031437232, - "modifiedDate": 1749935643282, - "sizeInBytes": 3355, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.3925, - "wordCount": 557, - "characterCount": 3307, - "nonWhitespaceCharacterCount": 2726, - "newlineCount": 51 - } - }, - "Stories/Crown of Blood/C13S5 - Conquest of Spirits.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 481, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.2025, - "characterCount": 2895, - "nonWhitespaceCharacterCount": 2388, - "newlineCount": 55, - "readingTimeInMinutes": 1.8150943396226416, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438959, - "modifiedDate": 1749902370413, - "sizeInBytes": 2951, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.2025, - "wordCount": 481, - "characterCount": 2895, - "nonWhitespaceCharacterCount": 2388, - "newlineCount": 55 - } - }, - "Stories/Crown of Blood/C13S7 - The Banner Rises.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 799, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.9975, - "characterCount": 4772, - "nonWhitespaceCharacterCount": 3943, - "newlineCount": 63, - "readingTimeInMinutes": 3.0150943396226415, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031439038, - "modifiedDate": 1749932570006, - "sizeInBytes": 4812, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.9975, - "wordCount": 799, - "characterCount": 4772, - "nonWhitespaceCharacterCount": 3943, - "newlineCount": 63 - } - }, - "Stories/Crown of Blood/C13S6 - Reckogning.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 451, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.1275, - "characterCount": 2727, - "nonWhitespaceCharacterCount": 2243, - "newlineCount": 69, - "readingTimeInMinutes": 1.7018867924528303, - "linkCount": 0, - "embedCount": 0, + "pageCount": 4.485, + "characterCount": 12041, + "nonWhitespaceCharacterCount": 10169, + "newlineCount": 101, + "readingTimeInMinutes": 6.769811320754717, + "linkCount": 1, + "embedCount": 2, "aliases": null, - "createdDate": 1754031439007, - "modifiedDate": 1749903039355, - "sizeInBytes": 2783, + "createdDate": 1756573897539, + "modifiedDate": 1756573897539, + "sizeInBytes": 12049, "sessionStart": { "noteCount": 1, - "pageCount": 1.1275, - "wordCount": 451, - "characterCount": 2727, - "nonWhitespaceCharacterCount": 2243, - "newlineCount": 69 + "pageCount": 4.485, + "wordCount": 1794, + "characterCount": 12041, + "nonWhitespaceCharacterCount": 10169, + "newlineCount": 101 } }, - "Stories/Crown of Blood/C13S4 - Bargain with the Storm.md": { + "Setting/Magical Traditions/Spirit Binding.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 623, + "wordCount": 3442, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 1.5575, - "characterCount": 3628, - "nonWhitespaceCharacterCount": 2960, - "newlineCount": 87, - "readingTimeInMinutes": 2.3509433962264152, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438948, - "modifiedDate": 1749900929214, - "sizeInBytes": 3714, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.5575, - "wordCount": 623, - "characterCount": 3628, - "nonWhitespaceCharacterCount": 2960, - "newlineCount": 87 - } - }, - "Stories/Crown of Blood/C13S3 - The Debate.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 594, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.485, - "characterCount": 3452, - "nonWhitespaceCharacterCount": 2830, - "newlineCount": 59, - "readingTimeInMinutes": 2.241509433962264, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438911, - "modifiedDate": 1749899941376, - "sizeInBytes": 3625, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.485, - "wordCount": 594, - "characterCount": 3452, - "nonWhitespaceCharacterCount": 2830, - "newlineCount": 59 - } - }, - "Stories/Crown of Blood/C13S1 - Return to village.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 831, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 2.0775, - "characterCount": 4697, - "nonWhitespaceCharacterCount": 3836, - "newlineCount": 63, - "readingTimeInMinutes": 3.1358490566037736, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438864, - "modifiedDate": 1749899119061, - "sizeInBytes": 4811, - "sessionStart": { - "noteCount": 1, - "pageCount": 2.0775, - "wordCount": 831, - "characterCount": 4697, - "nonWhitespaceCharacterCount": 3836, - "newlineCount": 63 - } - }, - "Stories/Crown of Blood/C13S2 - Atop the mountai.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 671, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.6775, - "characterCount": 3891, - "nonWhitespaceCharacterCount": 3185, - "newlineCount": 73, - "readingTimeInMinutes": 2.5320754716981133, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438901, - "modifiedDate": 1749899360199, - "sizeInBytes": 3933, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.6775, - "wordCount": 671, - "characterCount": 3891, - "nonWhitespaceCharacterCount": 3185, - "newlineCount": 73 - } - }, - "Stories/Crown of Blood/C12S4 - Now what.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 369, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.9225, - "characterCount": 2214, - "nonWhitespaceCharacterCount": 1824, - "newlineCount": 45, - "readingTimeInMinutes": 1.3924528301886792, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438832, - "modifiedDate": 1749852347657, - "sizeInBytes": 2328, - "sessionStart": { - "noteCount": 1, - "pageCount": 0.9225, - "wordCount": 369, - "characterCount": 2214, - "nonWhitespaceCharacterCount": 1824, - "newlineCount": 45 - } - }, - "Stories/Crown of Blood/C12S2 - Aftermath.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 498, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.245, - "characterCount": 2873, - "nonWhitespaceCharacterCount": 2358, - "newlineCount": 37, - "readingTimeInMinutes": 1.879245283018868, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438785, - "modifiedDate": 1749851144615, - "sizeInBytes": 2953, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.245, - "wordCount": 498, - "characterCount": 2873, - "nonWhitespaceCharacterCount": 2358, - "newlineCount": 37 - } - }, - "Stories/Crown of Blood/C12S1 - She Returns.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 1319, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 3.2975, - "characterCount": 7882, - "nonWhitespaceCharacterCount": 6504, - "newlineCount": 121, - "readingTimeInMinutes": 4.977358490566037, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438769, - "modifiedDate": 1749850472627, - "sizeInBytes": 8014, - "sessionStart": { - "noteCount": 1, - "pageCount": 3.2975, - "wordCount": 1319, - "characterCount": 7882, - "nonWhitespaceCharacterCount": 6504, - "newlineCount": 121 - } - }, - "Stories/Crown of Blood/C12S3 - Alishas Gone.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 521, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.3025, - "characterCount": 3121, - "nonWhitespaceCharacterCount": 2571, - "newlineCount": 61, - "readingTimeInMinutes": 1.9660377358490566, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438824, - "modifiedDate": 1749851883472, - "sizeInBytes": 3243, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.3025, - "wordCount": 521, - "characterCount": 3121, - "nonWhitespaceCharacterCount": 2571, - "newlineCount": 61 - } - }, - "Stories/Crown of Blood/C11S3 - The Power.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 705, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.7625, - "characterCount": 4304, - "nonWhitespaceCharacterCount": 3536, - "newlineCount": 78, - "readingTimeInMinutes": 2.660377358490566, - "linkCount": 0, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031438737, - "modifiedDate": 1749826713919, - "sizeInBytes": 4362, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.7625, - "wordCount": 705, - "characterCount": 4304, - "nonWhitespaceCharacterCount": 3536, - "newlineCount": 78 - } - }, - "Stories/Crown of Blood/C11S2 - The Killing.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 582, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 1.455, - "characterCount": 3491, - "nonWhitespaceCharacterCount": 2861, - "newlineCount": 92, - "readingTimeInMinutes": 2.1962264150943396, - "linkCount": 0, - "embedCount": 0, + "pageCount": 8.605, + "characterCount": 24279, + "nonWhitespaceCharacterCount": 20552, + "newlineCount": 203, + "readingTimeInMinutes": 12.988679245283018, + "linkCount": 3, + "embedCount": 2, "aliases": null, - "createdDate": 1754031438723, - "modifiedDate": 1749825742269, - "sizeInBytes": 3579, + "createdDate": 1756573897539, + "modifiedDate": 1756573897539, + "sizeInBytes": 24429, "sessionStart": { "noteCount": 1, - "pageCount": 1.455, - "wordCount": 582, - "characterCount": 3491, - "nonWhitespaceCharacterCount": 2861, - "newlineCount": 92 + "pageCount": 8.605, + "wordCount": 3442, + "characterCount": 24279, + "nonWhitespaceCharacterCount": 20552, + "newlineCount": 203 } }, - "Stories/Crown of Blood/C10S4 - Drawing Ashmire.md": { + "Setting/Magical Traditions/Soulforging.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 390, + "wordCount": 3470, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 0.975, - "characterCount": 2400, - "nonWhitespaceCharacterCount": 1983, - "newlineCount": 42, - "readingTimeInMinutes": 1.471698113207547, - "linkCount": 0, - "embedCount": 0, + "pageCount": 8.675, + "characterCount": 24522, + "nonWhitespaceCharacterCount": 20768, + "newlineCount": 218, + "readingTimeInMinutes": 13.09433962264151, + "linkCount": 1, + "embedCount": 2, "aliases": null, - "createdDate": 1754031438640, - "modifiedDate": 1749807619758, - "sizeInBytes": 2434, + "createdDate": 1756573897538, + "modifiedDate": 1756573897539, + "sizeInBytes": 24690, "sessionStart": { "noteCount": 1, - "pageCount": 0.975, - "wordCount": 390, - "characterCount": 2400, - "nonWhitespaceCharacterCount": 1983, - "newlineCount": 42 + "pageCount": 8.675, + "wordCount": 3470, + "characterCount": 24522, + "nonWhitespaceCharacterCount": 20768, + "newlineCount": 218 } }, - "Stories/Crown of Blood/C11S1 - The Price.md": { + "Setting/Magical Traditions/Pact Magic.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 636, + "wordCount": 3748, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 1.59, - "characterCount": 3793, - "nonWhitespaceCharacterCount": 3103, - "newlineCount": 85, - "readingTimeInMinutes": 2.4, + "pageCount": 9.37, + "characterCount": 24231, + "nonWhitespaceCharacterCount": 20252, + "newlineCount": 214, + "readingTimeInMinutes": 14.143396226415094, "linkCount": 0, - "embedCount": 0, + "embedCount": 2, "aliases": null, - "createdDate": 1754031438695, - "modifiedDate": 1749809532260, - "sizeInBytes": 3921, + "createdDate": 1756573897538, + "modifiedDate": 1756573897538, + "sizeInBytes": 24423, "sessionStart": { "noteCount": 1, - "pageCount": 1.59, - "wordCount": 636, - "characterCount": 3793, - "nonWhitespaceCharacterCount": 3103, - "newlineCount": 85 + "pageCount": 9.37, + "wordCount": 3748, + "characterCount": 24231, + "nonWhitespaceCharacterCount": 20252, + "newlineCount": 214 } }, - "Stories/Crown of Blood/C10S3 - Moment of Choice.md": { + "Setting/Magical Traditions/Melded Souls.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 423, + "wordCount": 3070, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 1.0575, - "characterCount": 2399, - "nonWhitespaceCharacterCount": 1954, - "newlineCount": 47, - "readingTimeInMinutes": 1.5962264150943397, + "pageCount": 7.675, + "characterCount": 20560, + "nonWhitespaceCharacterCount": 17360, + "newlineCount": 162, + "readingTimeInMinutes": 11.584905660377359, "linkCount": 0, - "embedCount": 0, + "embedCount": 2, "aliases": null, - "createdDate": 1754031438610, - "modifiedDate": 1749806980472, - "sizeInBytes": 2515, + "createdDate": 1756573897538, + "modifiedDate": 1756573897538, + "sizeInBytes": 20564, "sessionStart": { "noteCount": 1, - "pageCount": 1.0575, - "wordCount": 423, - "characterCount": 2399, - "nonWhitespaceCharacterCount": 1954, - "newlineCount": 47 + "pageCount": 7.675, + "wordCount": 3070, + "characterCount": 20560, + "nonWhitespaceCharacterCount": 17360, + "newlineCount": 162 } }, - "Stories/Crown of Blood/C10S2 - The Whispering Blade.md": { + "Setting/Magical Traditions/Magic.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 464, + "wordCount": 656, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 1.16, - "characterCount": 2748, - "nonWhitespaceCharacterCount": 2251, - "newlineCount": 58, - "readingTimeInMinutes": 1.7509433962264151, - "linkCount": 0, + "pageCount": 1.64, + "characterCount": 4352, + "nonWhitespaceCharacterCount": 3659, + "newlineCount": 34, + "readingTimeInMinutes": 2.4754716981132074, + "linkCount": 16, "embedCount": 0, "aliases": null, - "createdDate": 1754031438592, - "modifiedDate": 1749807058849, - "sizeInBytes": 2814, + "createdDate": 1756573897538, + "modifiedDate": 1756573897538, + "sizeInBytes": 4360, "sessionStart": { "noteCount": 1, - "pageCount": 1.16, - "wordCount": 464, - "characterCount": 2748, - "nonWhitespaceCharacterCount": 2251, - "newlineCount": 58 + "pageCount": 1.64, + "wordCount": 656, + "characterCount": 4352, + "nonWhitespaceCharacterCount": 3659, + "newlineCount": 34 } }, - "Stories/Crown of Blood/C10S1 - Descent.md": { + "Setting/Magical Traditions/Chthonism.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 474, + "wordCount": 3095, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 1.185, - "characterCount": 2772, - "nonWhitespaceCharacterCount": 2280, - "newlineCount": 37, - "readingTimeInMinutes": 1.788679245283019, + "pageCount": 7.7375, + "characterCount": 21581, + "nonWhitespaceCharacterCount": 18261, + "newlineCount": 177, + "readingTimeInMinutes": 11.679245283018869, "linkCount": 0, "embedCount": 0, "aliases": null, - "createdDate": 1754031438563, - "modifiedDate": 1749806120176, - "sizeInBytes": 2798, - "sessionStart": { - "noteCount": 1, - "pageCount": 1.185, - "wordCount": 474, - "characterCount": 2772, - "nonWhitespaceCharacterCount": 2280, - "newlineCount": 37 - } - }, - "Home.md": { - "isCountable": true, - "targetNodeType": "file", - "noteCount": 1, - "wordCount": 271, - "wordCountTowardGoal": 0, - "wordGoal": null, - "pageCount": 0.6775, - "characterCount": 2465, - "nonWhitespaceCharacterCount": 2041, - "newlineCount": 82, - "readingTimeInMinutes": 1.0226415094339623, - "linkCount": 55, - "embedCount": 0, - "aliases": null, - "createdDate": 1754031415782, - "modifiedDate": 1753878906430, - "sizeInBytes": 2600, + "createdDate": 1756573897538, + "modifiedDate": 1756573897538, + "sizeInBytes": 21728, "sessionStart": { "noteCount": 1, - "pageCount": 0.6775, - "wordCount": 271, - "characterCount": 2465, - "nonWhitespaceCharacterCount": 2041, - "newlineCount": 82 - }, - "frontmatter": { - "cssclass": "dashboard" + "pageCount": 7.7375, + "wordCount": 3095, + "characterCount": 21581, + "nonWhitespaceCharacterCount": 18261, + "newlineCount": 177 } }, - "emberwhim-icon.png.md": { + "Setting/Magical Traditions/Blood Sorcery.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 0, + "wordCount": 5283, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, + "pageCount": 13.2075, + "characterCount": 34922, + "nonWhitespaceCharacterCount": 29282, + "newlineCount": 227, + "readingTimeInMinutes": 19.935849056603775, + "linkCount": 4, + "embedCount": 2, "aliases": null, - "createdDate": 1754315855007, - "modifiedDate": 1754315855007, - "sizeInBytes": 0, + "createdDate": 1756573897538, + "modifiedDate": 1756573897538, + "sizeInBytes": 34958, "sessionStart": { "noteCount": 1, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 + "pageCount": 13.2075, + "wordCount": 5283, + "characterCount": 34922, + "nonWhitespaceCharacterCount": 29282, + "newlineCount": 227 } }, - "_Templates/Rules/Dominion.md": { + "Setting/Magical Traditions/Alchemy.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 299, + "wordCount": 3316, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 0.7475, - "characterCount": 3400, - "nonWhitespaceCharacterCount": 2862, - "newlineCount": 134, - "readingTimeInMinutes": 1.1283018867924528, + "pageCount": 8.29, + "characterCount": 23589, + "nonWhitespaceCharacterCount": 20053, + "newlineCount": 185, + "readingTimeInMinutes": 12.513207547169811, "linkCount": 0, "embedCount": 1, "aliases": null, - "createdDate": 1754379632004, - "modifiedDate": 1754381646565, - "sizeInBytes": 3528, + "createdDate": 1756573897537, + "modifiedDate": 1756573897537, + "sizeInBytes": 23605, "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - }, - "frontmatter": { - "tags": [ - "template", - "dominion", - "vaelora" - ], - "aliases": [], - "cssclass": "dominion-profile" + "noteCount": 1, + "pageCount": 8.29, + "wordCount": 3316, + "characterCount": 23589, + "nonWhitespaceCharacterCount": 20053, + "newlineCount": 185 } }, - "Rules/Spirits & Dominion/Almanach/Natural Forces/Fire.md": { + "Rules/🎭 Social Intrigue.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 3716, + "wordCount": 6735, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 9.29, - "characterCount": 31915, - "nonWhitespaceCharacterCount": 22702, - "newlineCount": 482, - "readingTimeInMinutes": 14.022641509433962, - "linkCount": 0, + "pageCount": 16.8375, + "characterCount": 56590, + "nonWhitespaceCharacterCount": 42185, + "newlineCount": 815, + "readingTimeInMinutes": 25.41509433962264, + "linkCount": 1, "embedCount": 0, "aliases": null, - "createdDate": 1754308942591, - "modifiedDate": 1754376299475, - "sizeInBytes": 32100, + "createdDate": 1756573897537, + "modifiedDate": 1756573897537, + "sizeInBytes": 57090, "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 + "noteCount": 1, + "pageCount": 16.8375, + "wordCount": 6735, + "characterCount": 56590, + "nonWhitespaceCharacterCount": 42185, + "newlineCount": 815 } }, - "Rules/Spirits & Dominion/Almanach/Natural Forces/Stone.md": { + "Rules/archive/Quick Start.md": { "isCountable": true, "targetNodeType": "file", "noteCount": 1, - "wordCount": 3516, + "wordCount": 486, "wordCountTowardGoal": 0, "wordGoal": null, - "pageCount": 8.79, - "characterCount": 27920, - "nonWhitespaceCharacterCount": 21746, - "newlineCount": 517, - "readingTimeInMinutes": 13.267924528301887, + "pageCount": 1.215, + "characterCount": 3722, + "nonWhitespaceCharacterCount": 3150, + "newlineCount": 72, + "readingTimeInMinutes": 1.8339622641509434, "linkCount": 0, - "embedCount": 7, + "embedCount": 0, "aliases": null, - "createdDate": 1754380165978, - "modifiedDate": 1754427216622, - "sizeInBytes": 28102, + "createdDate": 1756573897537, + "modifiedDate": 1756573897537, + "sizeInBytes": 3762, "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 + "noteCount": 1, + "pageCount": 1.215, + "wordCount": 486, + "characterCount": 3722, + "nonWhitespaceCharacterCount": 3150, + "newlineCount": 72 } }, - "_Attachments/Pasted image 20250805214050.png": { - "isCountable": false, + "Rules/archive/Marked Dice.md": { + "isCountable": true, "targetNodeType": "file", - "noteCount": 0, + "noteCount": 1, + "wordCount": 294, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.735, + "characterCount": 3236, + "nonWhitespaceCharacterCount": 1696, + "newlineCount": 21, + "readingTimeInMinutes": 1.109433962264151, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897537, + "modifiedDate": 1756573897537, + "sizeInBytes": 3238, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.735, + "wordCount": 294, + "characterCount": 3236, + "nonWhitespaceCharacterCount": 1696, + "newlineCount": 21 + } + }, + "Rules/archive/Combat.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 5330, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 13.325, + "characterCount": 38534, + "nonWhitespaceCharacterCount": 32731, + "newlineCount": 539, + "readingTimeInMinutes": 20.11320754716981, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, + "sizeInBytes": 38859, + "sessionStart": { + "noteCount": 1, + "pageCount": 13.325, + "wordCount": 5330, + "characterCount": 38534, + "nonWhitespaceCharacterCount": 32731, + "newlineCount": 539 + } + }, + "Rules/archive/Attributes.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 149, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.3725, + "characterCount": 1921, + "nonWhitespaceCharacterCount": 1187, + "newlineCount": 24, + "readingTimeInMinutes": 0.5622641509433962, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, + "sizeInBytes": 1923, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.3725, + "wordCount": 149, + "characterCount": 1921, + "nonWhitespaceCharacterCount": 1187, + "newlineCount": 24 + } + }, + "Rules/archive/Actions.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 58, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.145, + "characterCount": 381, + "nonWhitespaceCharacterCount": 307, + "newlineCount": 9, + "readingTimeInMinutes": 0.2188679245283019, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, + "sizeInBytes": 397, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.145, + "wordCount": 58, + "characterCount": 381, + "nonWhitespaceCharacterCount": 307, + "newlineCount": 9 + } + }, + "Rules/Untitled.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, "wordCount": 0, "wordCountTowardGoal": 0, - "wordGoal": 0, + "wordGoal": null, "pageCount": 0, "characterCount": 0, "nonWhitespaceCharacterCount": 0, @@ -8602,12 +6169,12 @@ "readingTimeInMinutes": 0, "linkCount": 0, "embedCount": 0, - "aliases": [], - "createdDate": 1754422850657, - "modifiedDate": 1754422850660, - "sizeInBytes": 2566148, + "aliases": null, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, + "sizeInBytes": 0, "sessionStart": { - "noteCount": 0, + "noteCount": 1, "pageCount": 0, "wordCount": 0, "characterCount": 0, @@ -8615,301 +6182,112 @@ "newlineCount": 0 } }, - "_Attachments/Pasted image 20250805214127.png": { - "isCountable": false, + "Rules/Spirits & Dominion/Spirits and Their Power.md": { + "isCountable": true, "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, + "noteCount": 1, + "wordCount": 2069, "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, + "wordGoal": null, + "pageCount": 5.1725, + "characterCount": 15882, + "nonWhitespaceCharacterCount": 12694, + "newlineCount": 273, + "readingTimeInMinutes": 7.807547169811321, + "linkCount": 1, "embedCount": 0, - "aliases": [], - "createdDate": 1754422887531, - "modifiedDate": 1754422887537, - "sizeInBytes": 2566148, + "aliases": null, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, + "sizeInBytes": 16021, "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 + "noteCount": 1, + "pageCount": 5.1725, + "wordCount": 2069, + "characterCount": 15882, + "nonWhitespaceCharacterCount": 12694, + "newlineCount": 273 } }, - "_Attachments/Pasted image 20250805214546.png": { - "isCountable": false, + "Rules/Spirits & Dominion/Dominion Almanach.md": { + "isCountable": true, "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, + "noteCount": 1, + "wordCount": 2301, "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, + "wordGoal": null, + "pageCount": 5.7525, + "characterCount": 15036, + "nonWhitespaceCharacterCount": 12485, + "newlineCount": 201, + "readingTimeInMinutes": 8.683018867924527, "linkCount": 0, "embedCount": 0, - "aliases": [], - "createdDate": 1754423146411, - "modifiedDate": 1754423146416, - "sizeInBytes": 2679718, + "aliases": null, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, + "sizeInBytes": 15185, "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 + "noteCount": 1, + "pageCount": 5.7525, + "wordCount": 2301, + "characterCount": 15036, + "nonWhitespaceCharacterCount": 12485, + "newlineCount": 201 } }, - "_Attachments/Pasted image 20250805214558.png": { - "isCountable": false, + "Rules/Spirits & Dominion/Almanach/_Structure.md": { + "isCountable": true, "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, + "noteCount": 1, + "wordCount": 444, "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, + "wordGoal": null, + "pageCount": 1.11, + "characterCount": 4156, + "nonWhitespaceCharacterCount": 3169, + "newlineCount": 140, + "readingTimeInMinutes": 1.6754716981132076, "linkCount": 0, "embedCount": 0, - "aliases": [], - "createdDate": 1754423158973, - "modifiedDate": 1754423158980, - "sizeInBytes": 2679718, + "aliases": null, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, + "sizeInBytes": 4240, "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 + "noteCount": 1, + "pageCount": 1.11, + "wordCount": 444, + "characterCount": 4156, + "nonWhitespaceCharacterCount": 3169, + "newlineCount": 140 } }, - "_Attachments/Pasted image 20250805215148.png": { - "isCountable": false, + "Rules/Spirits & Dominion/Almanach/Spirit Creation Framework.md": { + "isCountable": true, "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, + "noteCount": 1, + "wordCount": 653, "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, + "wordGoal": null, + "pageCount": 1.6325, + "characterCount": 4946, + "nonWhitespaceCharacterCount": 4053, + "newlineCount": 174, + "readingTimeInMinutes": 2.4641509433962265, "linkCount": 0, "embedCount": 0, - "aliases": [], - "createdDate": 1754423509001, - "modifiedDate": 1754423509008, - "sizeInBytes": 4056789, + "aliases": null, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, + "sizeInBytes": 5050, "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805215210.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754423530351, - "modifiedDate": 1754423530356, - "sizeInBytes": 4056789, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805215448.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754423688347, - "modifiedDate": 1754423688351, - "sizeInBytes": 4115009, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805215521.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754423721096, - "modifiedDate": 1754423721104, - "sizeInBytes": 4115009, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805220001.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754424001261, - "modifiedDate": 1754424001264, - "sizeInBytes": 1994885, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805220017.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754424017207, - "modifiedDate": 1754424017213, - "sizeInBytes": 1994885, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805220237.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754424157930, - "modifiedDate": 1754424157935, - "sizeInBytes": 3893021, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 - } - }, - "_Attachments/Pasted image 20250805220259.png": { - "isCountable": false, - "targetNodeType": "file", - "noteCount": 0, - "wordCount": 0, - "wordCountTowardGoal": 0, - "wordGoal": 0, - "pageCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0, - "readingTimeInMinutes": 0, - "linkCount": 0, - "embedCount": 0, - "aliases": [], - "createdDate": 1754424179390, - "modifiedDate": 1754424179393, - "sizeInBytes": 3893021, - "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 + "noteCount": 1, + "pageCount": 1.6325, + "wordCount": 653, + "characterCount": 4946, + "nonWhitespaceCharacterCount": 4053, + "newlineCount": 174 } }, "Rules/Spirits & Dominion/Almanach/Natural Forces/_The Breath of the World - Natural Forces.md": { @@ -8927,16 +6305,16 @@ "linkCount": 0, "embedCount": 0, "aliases": null, - "createdDate": 1754304238498, - "modifiedDate": 1754307826660, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, "sizeInBytes": 5092, "sessionStart": { - "noteCount": 0, - "pageCount": 0, - "wordCount": 0, - "characterCount": 0, - "nonWhitespaceCharacterCount": 0, - "newlineCount": 0 + "noteCount": 1, + "pageCount": 1.8975, + "wordCount": 759, + "characterCount": 5042, + "nonWhitespaceCharacterCount": 4197, + "newlineCount": 86 } }, "Rules/Spirits & Dominion/Almanach/Natural Forces/Water.md": { @@ -8954,9 +6332,441 @@ "linkCount": 0, "embedCount": 1, "aliases": null, - "createdDate": 1754427422442, - "modifiedDate": 1754429170135, + "createdDate": 1756573897536, + "modifiedDate": 1756573897536, "sizeInBytes": 14258, + "sessionStart": { + "noteCount": 1, + "pageCount": 3.9075, + "wordCount": 1563, + "characterCount": 14194, + "nonWhitespaceCharacterCount": 10395, + "newlineCount": 129 + } + }, + "Rules/Spirits & Dominion/Almanach/Natural Forces/Stone.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 3516, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 8.79, + "characterCount": 27920, + "nonWhitespaceCharacterCount": 21746, + "newlineCount": 517, + "readingTimeInMinutes": 13.267924528301887, + "linkCount": 0, + "embedCount": 7, + "aliases": null, + "createdDate": 1756573897534, + "modifiedDate": 1756573897534, + "sizeInBytes": 28102, + "sessionStart": { + "noteCount": 1, + "pageCount": 8.79, + "wordCount": 3516, + "characterCount": 27920, + "nonWhitespaceCharacterCount": 21746, + "newlineCount": 517 + } + }, + "Rules/Spirits & Dominion/Almanach/Natural Forces/Fire.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 3716, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 9.29, + "characterCount": 31915, + "nonWhitespaceCharacterCount": 22702, + "newlineCount": 482, + "readingTimeInMinutes": 14.022641509433962, + "linkCount": 0, + "embedCount": 4, + "aliases": null, + "createdDate": 1756573897533, + "modifiedDate": 1756573897534, + "sizeInBytes": 32100, + "sessionStart": { + "noteCount": 1, + "pageCount": 9.29, + "wordCount": 3716, + "characterCount": 31915, + "nonWhitespaceCharacterCount": 22702, + "newlineCount": 482 + } + }, + "Rules/Skills.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 4792, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 11.98, + "characterCount": 34669, + "nonWhitespaceCharacterCount": 28393, + "newlineCount": 319, + "readingTimeInMinutes": 18.08301886792453, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897533, + "modifiedDate": 1756573897533, + "sizeInBytes": 34845, + "sessionStart": { + "noteCount": 1, + "pageCount": 11.98, + "wordCount": 4792, + "characterCount": 34669, + "nonWhitespaceCharacterCount": 28393, + "newlineCount": 319 + } + }, + "Rules/Playtest/Playtest Feedback 2025-08-01.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 122, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.305, + "characterCount": 775, + "nonWhitespaceCharacterCount": 640, + "newlineCount": 14, + "readingTimeInMinutes": 0.46037735849056605, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897533, + "modifiedDate": 1756573897533, + "sizeInBytes": 783, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.305, + "wordCount": 122, + "characterCount": 775, + "nonWhitespaceCharacterCount": 640, + "newlineCount": 14 + } + }, + "Rules/Magic Traditions/_Magic Traditions.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 837, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.0925, + "characterCount": 5851, + "nonWhitespaceCharacterCount": 4891, + "newlineCount": 112, + "readingTimeInMinutes": 3.158490566037736, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897533, + "modifiedDate": 1756573897533, + "sizeInBytes": 5900, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.0925, + "wordCount": 837, + "characterCount": 5851, + "nonWhitespaceCharacterCount": 4891, + "newlineCount": 112 + } + }, + "Rules/Magic Traditions/Spirit Binding – Chaincraft, The Yoke.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1463, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 3.6575, + "characterCount": 10185, + "nonWhitespaceCharacterCount": 8566, + "newlineCount": 113, + "readingTimeInMinutes": 5.520754716981132, + "linkCount": 36, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897532, + "modifiedDate": 1756573897532, + "sizeInBytes": 10259, + "sessionStart": { + "noteCount": 1, + "pageCount": 3.6575, + "wordCount": 1463, + "characterCount": 10185, + "nonWhitespaceCharacterCount": 8566, + "newlineCount": 113 + } + }, + "Rules/Magic Traditions/Pact Magic – Power Through Promises.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1230, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 3.075, + "characterCount": 11005, + "nonWhitespaceCharacterCount": 7639, + "newlineCount": 138, + "readingTimeInMinutes": 4.6415094339622645, + "linkCount": 17, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897532, + "modifiedDate": 1756573897532, + "sizeInBytes": 11087, + "sessionStart": { + "noteCount": 1, + "pageCount": 3.075, + "wordCount": 1230, + "characterCount": 11005, + "nonWhitespaceCharacterCount": 7639, + "newlineCount": 138 + } + }, + "Rules/Magic Traditions/Blood Sorcery – The Scarlet Path.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 2115, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 5.2875, + "characterCount": 17388, + "nonWhitespaceCharacterCount": 14144, + "newlineCount": 203, + "readingTimeInMinutes": 7.981132075471698, + "linkCount": 31, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897532, + "modifiedDate": 1756573897532, + "sizeInBytes": 17532, + "sessionStart": { + "noteCount": 1, + "pageCount": 5.2875, + "wordCount": 2115, + "characterCount": 17388, + "nonWhitespaceCharacterCount": 14144, + "newlineCount": 203 + } + }, + "Rules/Dramatic Systems/Pursuit.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 688, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.72, + "characterCount": 4445, + "nonWhitespaceCharacterCount": 3696, + "newlineCount": 62, + "readingTimeInMinutes": 2.5962264150943395, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897532, + "modifiedDate": 1756573897532, + "sizeInBytes": 4593, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.72, + "wordCount": 688, + "characterCount": 4445, + "nonWhitespaceCharacterCount": 3696, + "newlineCount": 62 + } + }, + "Rules/Dramatic Systems/Corruption.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1655, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 4.1375, + "characterCount": 11690, + "nonWhitespaceCharacterCount": 9322, + "newlineCount": 133, + "readingTimeInMinutes": 6.245283018867925, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897532, + "modifiedDate": 1756573897532, + "sizeInBytes": 12018, + "sessionStart": { + "noteCount": 1, + "pageCount": 4.1375, + "wordCount": 1655, + "characterCount": 11690, + "nonWhitespaceCharacterCount": 9322, + "newlineCount": 133 + } + }, + "Rules/Dramatic Systems/Fatigue.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 431, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.0775, + "characterCount": 2884, + "nonWhitespaceCharacterCount": 2431, + "newlineCount": 34, + "readingTimeInMinutes": 1.6264150943396227, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897532, + "modifiedDate": 1756573897532, + "sizeInBytes": 2934, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.0775, + "wordCount": 431, + "characterCount": 2884, + "nonWhitespaceCharacterCount": 2431, + "newlineCount": 34 + } + }, + "Rules/Combat.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 4911, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 12.2775, + "characterCount": 34845, + "nonWhitespaceCharacterCount": 29057, + "newlineCount": 464, + "readingTimeInMinutes": 18.532075471698114, + "linkCount": 2, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897531, + "modifiedDate": 1756573897531, + "sizeInBytes": 34956, + "sessionStart": { + "noteCount": 1, + "pageCount": 12.2775, + "wordCount": 4911, + "characterCount": 34845, + "nonWhitespaceCharacterCount": 29057, + "newlineCount": 464 + } + }, + "Rules/Character Creation.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 1431, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 3.5775, + "characterCount": 12948, + "nonWhitespaceCharacterCount": 10126, + "newlineCount": 204, + "readingTimeInMinutes": 5.4, + "linkCount": 0, + "embedCount": 1, + "aliases": null, + "createdDate": 1756573897531, + "modifiedDate": 1756573897531, + "sizeInBytes": 13027, + "sessionStart": { + "noteCount": 1, + "pageCount": 3.5775, + "wordCount": 1431, + "characterCount": 12948, + "nonWhitespaceCharacterCount": 10126, + "newlineCount": 204 + } + }, + "Rules/Base Rules.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 2717, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 6.7925, + "characterCount": 21092, + "nonWhitespaceCharacterCount": 17293, + "newlineCount": 268, + "readingTimeInMinutes": 10.252830188679246, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897531, + "modifiedDate": 1756573897531, + "sizeInBytes": 21190, + "sessionStart": { + "noteCount": 1, + "pageCount": 6.7925, + "wordCount": 2717, + "characterCount": 21092, + "nonWhitespaceCharacterCount": 17293, + "newlineCount": 268 + } + }, + "Rules/Background Table.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 413, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.0325, + "characterCount": 5444, + "nonWhitespaceCharacterCount": 3978, + "newlineCount": 63, + "readingTimeInMinutes": 1.558490566037736, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897531, + "modifiedDate": 1756573897531, + "sizeInBytes": 5444, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.0325, + "wordCount": 413, + "characterCount": 5444, + "nonWhitespaceCharacterCount": 3978, + "newlineCount": 63 + } + }, + "Rules/Assets/Rules Overview.pptx": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897521, + "modifiedDate": 1756573897531, + "sizeInBytes": 3814133, "sessionStart": { "noteCount": 0, "pageCount": 0, @@ -8965,6 +6775,2196 @@ "nonWhitespaceCharacterCount": 0, "newlineCount": 0 } + }, + "Rules/Assets/Rules Overview.pdf": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897520, + "modifiedDate": 1756573897521, + "sizeInBytes": 237618, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "Rules/Assets/Character Sheet.pptx": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897515, + "modifiedDate": 1756573897520, + "sizeInBytes": 5398892, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "Rules/Assets/Character Sheet.pdf": { + "isCountable": false, + "targetNodeType": "file", + "noteCount": 0, + "wordCount": 0, + "wordCountTowardGoal": 0, + "wordGoal": 0, + "pageCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0, + "readingTimeInMinutes": 0, + "linkCount": 0, + "embedCount": 0, + "aliases": [], + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 180895, + "sessionStart": { + "noteCount": 0, + "pageCount": 0, + "wordCount": 0, + "characterCount": 0, + "nonWhitespaceCharacterCount": 0, + "newlineCount": 0 + } + }, + "Rules/Advancement & Growth.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 681, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.7025, + "characterCount": 4921, + "nonWhitespaceCharacterCount": 3793, + "newlineCount": 159, + "readingTimeInMinutes": 2.569811320754717, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 4965, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.7025, + "wordCount": 681, + "characterCount": 4921, + "nonWhitespaceCharacterCount": 3793, + "newlineCount": 159 + } + }, + "Rules/Ability Trees.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 914, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.285, + "characterCount": 6977, + "nonWhitespaceCharacterCount": 5522, + "newlineCount": 198, + "readingTimeInMinutes": 3.449056603773585, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 7013, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.285, + "wordCount": 914, + "characterCount": 6977, + "nonWhitespaceCharacterCount": 5522, + "newlineCount": 198 + } + }, + "Rules/Ability Trees/Species/Tul.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 885, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.2125, + "characterCount": 5784, + "nonWhitespaceCharacterCount": 4803, + "newlineCount": 81, + "readingTimeInMinutes": 3.339622641509434, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 5982, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.2125, + "wordCount": 885, + "characterCount": 5784, + "nonWhitespaceCharacterCount": 4803, + "newlineCount": 81 + } + }, + "Rules/Ability Trees/Species/Tlaxcal.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 560, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4, + "characterCount": 3430, + "nonWhitespaceCharacterCount": 2832, + "newlineCount": 31, + "readingTimeInMinutes": 2.1132075471698113, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 3522, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4, + "wordCount": 560, + "characterCount": 3430, + "nonWhitespaceCharacterCount": 2832, + "newlineCount": 31 + } + }, + "Rules/Ability Trees/Species/Akumei.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 535, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.3375, + "characterCount": 3275, + "nonWhitespaceCharacterCount": 2698, + "newlineCount": 34, + "readingTimeInMinutes": 2.018867924528302, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 3367, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.3375, + "wordCount": 535, + "characterCount": 3275, + "nonWhitespaceCharacterCount": 2698, + "newlineCount": 34 + } + }, + "Rules/Ability Trees/Skills/Social/Seduction (Presence).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 250, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.625, + "characterCount": 1573, + "nonWhitespaceCharacterCount": 1294, + "newlineCount": 17, + "readingTimeInMinutes": 0.9433962264150944, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 1601, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.625, + "wordCount": 250, + "characterCount": 1573, + "nonWhitespaceCharacterCount": 1294, + "newlineCount": 17 + } + }, + "Rules/Ability Trees/Skills/Social/Persuasion (Presence).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 279, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.6975, + "characterCount": 1786, + "nonWhitespaceCharacterCount": 1465, + "newlineCount": 17, + "readingTimeInMinutes": 1.0528301886792453, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 1834, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.6975, + "wordCount": 279, + "characterCount": 1786, + "nonWhitespaceCharacterCount": 1465, + "newlineCount": 17 + } + }, + "Rules/Ability Trees/Skills/Social/Performance (Presence).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 239, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5975, + "characterCount": 1472, + "nonWhitespaceCharacterCount": 1205, + "newlineCount": 17, + "readingTimeInMinutes": 0.9018867924528302, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 1510, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5975, + "wordCount": 239, + "characterCount": 1472, + "nonWhitespaceCharacterCount": 1205, + "newlineCount": 17 + } + }, + "Rules/Ability Trees/Skills/Social/Intimidation (Presence or Might).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 230, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.575, + "characterCount": 1502, + "nonWhitespaceCharacterCount": 1231, + "newlineCount": 16, + "readingTimeInMinutes": 0.8679245283018868, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 1528, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.575, + "wordCount": 230, + "characterCount": 1502, + "nonWhitespaceCharacterCount": 1231, + "newlineCount": 16 + } + }, + "Rules/Ability Trees/Skills/Social/Inquire (Wit) - Whispers & Wires.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 559, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.3975, + "characterCount": 5529, + "nonWhitespaceCharacterCount": 4103, + "newlineCount": 43, + "readingTimeInMinutes": 2.109433962264151, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 5558, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.3975, + "wordCount": 559, + "characterCount": 5529, + "nonWhitespaceCharacterCount": 4103, + "newlineCount": 43 + } + }, + "Rules/Ability Trees/Skills/Social/Etiquette (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 255, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.6375, + "characterCount": 1597, + "nonWhitespaceCharacterCount": 1314, + "newlineCount": 17, + "readingTimeInMinutes": 0.9622641509433962, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897515, + "modifiedDate": 1756573897515, + "sizeInBytes": 1633, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.6375, + "wordCount": 255, + "characterCount": 1597, + "nonWhitespaceCharacterCount": 1314, + "newlineCount": 17 + } + }, + "Rules/Ability Trees/Skills/Social/Empathy (Spirit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 256, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.64, + "characterCount": 1561, + "nonWhitespaceCharacterCount": 1265, + "newlineCount": 17, + "readingTimeInMinutes": 0.9660377358490566, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897515, + "sizeInBytes": 1597, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.64, + "wordCount": 256, + "characterCount": 1561, + "nonWhitespaceCharacterCount": 1265, + "newlineCount": 17 + } + }, + "Rules/Ability Trees/Skills/Social/Deception (Cunning).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 261, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.6525, + "characterCount": 1661, + "nonWhitespaceCharacterCount": 1361, + "newlineCount": 16, + "readingTimeInMinutes": 0.9849056603773585, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1701, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.6525, + "wordCount": 261, + "characterCount": 1661, + "nonWhitespaceCharacterCount": 1361, + "newlineCount": 16 + } + }, + "Rules/Ability Trees/Skills/Occult/Occultism (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 284, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.71, + "characterCount": 1766, + "nonWhitespaceCharacterCount": 1450, + "newlineCount": 18, + "readingTimeInMinutes": 1.0716981132075472, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1792, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.71, + "wordCount": 284, + "characterCount": 1766, + "nonWhitespaceCharacterCount": 1450, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Occult/Rituals (Focus).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 301, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.7525, + "characterCount": 1867, + "nonWhitespaceCharacterCount": 1522, + "newlineCount": 18, + "readingTimeInMinutes": 1.1358490566037736, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1897, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.7525, + "wordCount": 301, + "characterCount": 1867, + "nonWhitespaceCharacterCount": 1522, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Occult/Meditation (Focus).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 243, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.6075, + "characterCount": 1484, + "nonWhitespaceCharacterCount": 1199, + "newlineCount": 18, + "readingTimeInMinutes": 0.9169811320754717, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1508, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.6075, + "wordCount": 243, + "characterCount": 1484, + "nonWhitespaceCharacterCount": 1199, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Occult/Binding (Spirit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 268, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.67, + "characterCount": 1622, + "nonWhitespaceCharacterCount": 1310, + "newlineCount": 20, + "readingTimeInMinutes": 1.0113207547169811, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1658, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.67, + "wordCount": 268, + "characterCount": 1622, + "nonWhitespaceCharacterCount": 1310, + "newlineCount": 20 + } + }, + "Rules/Ability Trees/Skills/Occult/Attune (Spirit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 325, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.8125, + "characterCount": 2032, + "nonWhitespaceCharacterCount": 1676, + "newlineCount": 22, + "readingTimeInMinutes": 1.2264150943396226, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 2068, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.8125, + "wordCount": 325, + "characterCount": 2032, + "nonWhitespaceCharacterCount": 1676, + "newlineCount": 22 + } + }, + "Rules/Ability Trees/Skills/Occult/Alchemy (Focus).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 252, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.63, + "characterCount": 1558, + "nonWhitespaceCharacterCount": 1264, + "newlineCount": 18, + "readingTimeInMinutes": 0.9509433962264151, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1586, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.63, + "wordCount": 252, + "characterCount": 1558, + "nonWhitespaceCharacterCount": 1264, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Martial/Throwing (Agility).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 316, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.79, + "characterCount": 2180, + "nonWhitespaceCharacterCount": 1758, + "newlineCount": 51, + "readingTimeInMinutes": 1.1924528301886792, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 2208, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.79, + "wordCount": 316, + "characterCount": 2180, + "nonWhitespaceCharacterCount": 1758, + "newlineCount": 51 + } + }, + "Rules/Ability Trees/Skills/Martial/Tactics (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 350, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.875, + "characterCount": 2286, + "nonWhitespaceCharacterCount": 1834, + "newlineCount": 51, + "readingTimeInMinutes": 1.320754716981132, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 2312, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.875, + "wordCount": 350, + "characterCount": 2286, + "nonWhitespaceCharacterCount": 1834, + "newlineCount": 51 + } + }, + "Rules/Ability Trees/Skills/Martial/Siegecraft (Focus).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 356, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.89, + "characterCount": 2489, + "nonWhitespaceCharacterCount": 2026, + "newlineCount": 52, + "readingTimeInMinutes": 1.3433962264150943, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 2523, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.89, + "wordCount": 356, + "characterCount": 2489, + "nonWhitespaceCharacterCount": 2026, + "newlineCount": 52 + } + }, + "Rules/Ability Trees/Skills/Martial/Shields (Might).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 360, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9, + "characterCount": 2458, + "nonWhitespaceCharacterCount": 1982, + "newlineCount": 58, + "readingTimeInMinutes": 1.3584905660377358, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 2492, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9, + "wordCount": 360, + "characterCount": 2458, + "nonWhitespaceCharacterCount": 1982, + "newlineCount": 58 + } + }, + "Rules/Ability Trees/Skills/Martial/Melee (Might).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 240, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.6, + "characterCount": 1630, + "nonWhitespaceCharacterCount": 1306, + "newlineCount": 40, + "readingTimeInMinutes": 0.9056603773584906, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1658, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.6, + "wordCount": 240, + "characterCount": 1630, + "nonWhitespaceCharacterCount": 1306, + "newlineCount": 40 + } + }, + "Rules/Ability Trees/Skills/Martial/Dodge (Agility).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 390, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.975, + "characterCount": 2673, + "nonWhitespaceCharacterCount": 2167, + "newlineCount": 58, + "readingTimeInMinutes": 1.471698113207547, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 2709, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.975, + "wordCount": 390, + "characterCount": 2673, + "nonWhitespaceCharacterCount": 2167, + "newlineCount": 58 + } + }, + "Rules/Ability Trees/Skills/Martial/Brawl (Fortitude).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 362, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.905, + "characterCount": 2576, + "nonWhitespaceCharacterCount": 2091, + "newlineCount": 62, + "readingTimeInMinutes": 1.3660377358490565, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 2618, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.905, + "wordCount": 362, + "characterCount": 2576, + "nonWhitespaceCharacterCount": 2091, + "newlineCount": 62 + } + }, + "Rules/Ability Trees/Skills/Martial/Archery (Agility).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 388, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.97, + "characterCount": 2549, + "nonWhitespaceCharacterCount": 2045, + "newlineCount": 56, + "readingTimeInMinutes": 1.4641509433962263, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 2587, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.97, + "wordCount": 388, + "characterCount": 2549, + "nonWhitespaceCharacterCount": 2045, + "newlineCount": 56 + } + }, + "Rules/Ability Trees/Skills/Knowledge/Zoology (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 236, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.59, + "characterCount": 1477, + "nonWhitespaceCharacterCount": 1214, + "newlineCount": 17, + "readingTimeInMinutes": 0.8905660377358491, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1507, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.59, + "wordCount": 236, + "characterCount": 1477, + "nonWhitespaceCharacterCount": 1214, + "newlineCount": 17 + } + }, + "Rules/Ability Trees/Skills/Knowledge/Theology (Spirit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 235, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5875, + "characterCount": 1437, + "nonWhitespaceCharacterCount": 1173, + "newlineCount": 18, + "readingTimeInMinutes": 0.8867924528301887, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897514, + "modifiedDate": 1756573897514, + "sizeInBytes": 1467, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5875, + "wordCount": 235, + "characterCount": 1437, + "nonWhitespaceCharacterCount": 1173, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Knowledge/Philosophy (Spirit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 206, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.515, + "characterCount": 1374, + "nonWhitespaceCharacterCount": 1128, + "newlineCount": 18, + "readingTimeInMinutes": 0.7773584905660378, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897514, + "sizeInBytes": 1408, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.515, + "wordCount": 206, + "characterCount": 1374, + "nonWhitespaceCharacterCount": 1128, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Knowledge/Mechanics (Focus).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 224, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.56, + "characterCount": 1444, + "nonWhitespaceCharacterCount": 1179, + "newlineCount": 18, + "readingTimeInMinutes": 0.8452830188679246, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1472, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.56, + "wordCount": 224, + "characterCount": 1444, + "nonWhitespaceCharacterCount": 1179, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Knowledge/Mathematics (Focus).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 215, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5375, + "characterCount": 1385, + "nonWhitespaceCharacterCount": 1142, + "newlineCount": 18, + "readingTimeInMinutes": 0.8113207547169812, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1419, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5375, + "wordCount": 215, + "characterCount": 1385, + "nonWhitespaceCharacterCount": 1142, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Knowledge/Languages (Focus).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 227, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5675, + "characterCount": 1380, + "nonWhitespaceCharacterCount": 1125, + "newlineCount": 18, + "readingTimeInMinutes": 0.8566037735849057, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1408, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5675, + "wordCount": 227, + "characterCount": 1380, + "nonWhitespaceCharacterCount": 1125, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Knowledge/Herbalism (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 215, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5375, + "characterCount": 1415, + "nonWhitespaceCharacterCount": 1171, + "newlineCount": 18, + "readingTimeInMinutes": 0.8113207547169812, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1443, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5375, + "wordCount": 215, + "characterCount": 1415, + "nonWhitespaceCharacterCount": 1171, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Knowledge/History (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 238, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.595, + "characterCount": 1532, + "nonWhitespaceCharacterCount": 1234, + "newlineCount": 18, + "readingTimeInMinutes": 0.8981132075471698, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1564, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.595, + "wordCount": 238, + "characterCount": 1532, + "nonWhitespaceCharacterCount": 1234, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Investigation/Subterfuge (Cunning).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 218, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.545, + "characterCount": 1436, + "nonWhitespaceCharacterCount": 1178, + "newlineCount": 18, + "readingTimeInMinutes": 0.8226415094339623, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1466, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.545, + "wordCount": 218, + "characterCount": 1436, + "nonWhitespaceCharacterCount": 1178, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Investigation/Streetwise (Cunning).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 213, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5325, + "characterCount": 1359, + "nonWhitespaceCharacterCount": 1107, + "newlineCount": 17, + "readingTimeInMinutes": 0.8037735849056604, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1391, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5325, + "wordCount": 213, + "characterCount": 1359, + "nonWhitespaceCharacterCount": 1107, + "newlineCount": 17 + } + }, + "Rules/Ability Trees/Skills/Investigation/Smuggling (Cunning).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 204, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.51, + "characterCount": 1310, + "nonWhitespaceCharacterCount": 1078, + "newlineCount": 18, + "readingTimeInMinutes": 0.769811320754717, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1340, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.51, + "wordCount": 204, + "characterCount": 1310, + "nonWhitespaceCharacterCount": 1078, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Investigation/Observation (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 241, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.6025, + "characterCount": 1498, + "nonWhitespaceCharacterCount": 1229, + "newlineCount": 18, + "readingTimeInMinutes": 0.909433962264151, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1528, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.6025, + "wordCount": 241, + "characterCount": 1498, + "nonWhitespaceCharacterCount": 1229, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Investigation/Investigation (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 239, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5975, + "characterCount": 1520, + "nonWhitespaceCharacterCount": 1253, + "newlineCount": 17, + "readingTimeInMinutes": 0.9018867924528302, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1550, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5975, + "wordCount": 239, + "characterCount": 1520, + "nonWhitespaceCharacterCount": 1253, + "newlineCount": 17 + } + }, + "Rules/Ability Trees/Skills/Investigation/Interrogation (Presence).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 223, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5575, + "characterCount": 1440, + "nonWhitespaceCharacterCount": 1188, + "newlineCount": 18, + "readingTimeInMinutes": 0.8415094339622642, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1468, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5575, + "wordCount": 223, + "characterCount": 1440, + "nonWhitespaceCharacterCount": 1188, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Investigation/Forgery (Wit).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 205, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.5125, + "characterCount": 1357, + "nonWhitespaceCharacterCount": 1124, + "newlineCount": 18, + "readingTimeInMinutes": 0.7735849056603774, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1381, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.5125, + "wordCount": 205, + "characterCount": 1357, + "nonWhitespaceCharacterCount": 1124, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Investigation/Evasion (Agility).md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 183, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.4575, + "characterCount": 1163, + "nonWhitespaceCharacterCount": 952, + "newlineCount": 18, + "readingTimeInMinutes": 0.690566037735849, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1191, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.4575, + "wordCount": 183, + "characterCount": 1163, + "nonWhitespaceCharacterCount": 952, + "newlineCount": 18 + } + }, + "Rules/Ability Trees/Skills/Exploration/Swimming.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 281, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.7025, + "characterCount": 1750, + "nonWhitespaceCharacterCount": 1436, + "newlineCount": 39, + "readingTimeInMinutes": 1.060377358490566, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 1776, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.7025, + "wordCount": 281, + "characterCount": 1750, + "nonWhitespaceCharacterCount": 1436, + "newlineCount": 39 + } + }, + "Rules/Ability Trees/Skills/Exploration/Tracking.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 389, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9725, + "characterCount": 2471, + "nonWhitespaceCharacterCount": 2053, + "newlineCount": 24, + "readingTimeInMinutes": 1.4679245283018867, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 2559, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9725, + "wordCount": 389, + "characterCount": 2471, + "nonWhitespaceCharacterCount": 2053, + "newlineCount": 24 + } + }, + "Rules/Ability Trees/Skills/Exploration/Survival.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 378, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.945, + "characterCount": 2466, + "nonWhitespaceCharacterCount": 2061, + "newlineCount": 24, + "readingTimeInMinutes": 1.4264150943396225, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 2532, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.945, + "wordCount": 378, + "characterCount": 2466, + "nonWhitespaceCharacterCount": 2061, + "newlineCount": 24 + } + }, + "Rules/Ability Trees/Skills/Exploration/Stealth.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 321, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.8025, + "characterCount": 2134, + "nonWhitespaceCharacterCount": 1784, + "newlineCount": 24, + "readingTimeInMinutes": 1.211320754716981, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897513, + "modifiedDate": 1756573897513, + "sizeInBytes": 2198, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.8025, + "wordCount": 321, + "characterCount": 2134, + "nonWhitespaceCharacterCount": 1784, + "newlineCount": 24 + } + }, + "Rules/Ability Trees/Skills/Exploration/Ride.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 363, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.9075, + "characterCount": 2324, + "nonWhitespaceCharacterCount": 1933, + "newlineCount": 24, + "readingTimeInMinutes": 1.369811320754717, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897513, + "sizeInBytes": 2384, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.9075, + "wordCount": 363, + "characterCount": 2324, + "nonWhitespaceCharacterCount": 1933, + "newlineCount": 24 + } + }, + "Rules/Ability Trees/Skills/Exploration/Navigation.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 358, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.895, + "characterCount": 2351, + "nonWhitespaceCharacterCount": 1966, + "newlineCount": 24, + "readingTimeInMinutes": 1.350943396226415, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 2417, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.895, + "wordCount": 358, + "characterCount": 2351, + "nonWhitespaceCharacterCount": 1966, + "newlineCount": 24 + } + }, + "Rules/Ability Trees/Skills/Exploration/Climbing (Might) - Heights Unbound.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 615, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5375, + "characterCount": 6900, + "nonWhitespaceCharacterCount": 4702, + "newlineCount": 63, + "readingTimeInMinutes": 2.3207547169811322, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 6935, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5375, + "wordCount": 615, + "characterCount": 6900, + "nonWhitespaceCharacterCount": 4702, + "newlineCount": 63 + } + }, + "Rules/Ability Trees/Skills/Exploration/Athletics (Might) - Unbound Motion.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 571, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4275, + "characterCount": 6473, + "nonWhitespaceCharacterCount": 4431, + "newlineCount": 63, + "readingTimeInMinutes": 2.1547169811320757, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 6502, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4275, + "wordCount": 571, + "characterCount": 6473, + "nonWhitespaceCharacterCount": 4431, + "newlineCount": 63 + } + }, + "Rules/Ability Trees/Skills/Crafting/Smithing (Might) - Forge & Fire.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 662, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.655, + "characterCount": 7598, + "nonWhitespaceCharacterCount": 5139, + "newlineCount": 56, + "readingTimeInMinutes": 2.4981132075471697, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 7619, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.655, + "wordCount": 662, + "characterCount": 7598, + "nonWhitespaceCharacterCount": 5139, + "newlineCount": 56 + } + }, + "Rules/Ability Trees/Skills/Crafting/Weaving (Wit) - Threads of Fate.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 639, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5975, + "characterCount": 7013, + "nonWhitespaceCharacterCount": 5046, + "newlineCount": 53, + "readingTimeInMinutes": 2.4113207547169813, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 7037, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5975, + "wordCount": 639, + "characterCount": 7013, + "nonWhitespaceCharacterCount": 5046, + "newlineCount": 53 + } + }, + "Rules/Ability Trees/Skills/Crafting/Medicine (Focus) - Hands of Mercy.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 624, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.56, + "characterCount": 7064, + "nonWhitespaceCharacterCount": 4872, + "newlineCount": 54, + "readingTimeInMinutes": 2.3547169811320754, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 7073, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.56, + "wordCount": 624, + "characterCount": 7064, + "nonWhitespaceCharacterCount": 4872, + "newlineCount": 54 + } + }, + "Rules/Ability Trees/Skills/Crafting/Masonry (Might) - Pillars of Stone.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 595, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4875, + "characterCount": 7277, + "nonWhitespaceCharacterCount": 4907, + "newlineCount": 58, + "readingTimeInMinutes": 2.2452830188679247, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 7292, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4875, + "wordCount": 595, + "characterCount": 7277, + "nonWhitespaceCharacterCount": 4907, + "newlineCount": 58 + } + }, + "Rules/Ability Trees/Skills/Crafting/Cooking (Wit) - Fires of Hearth & Heart.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 541, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.3525, + "characterCount": 4783, + "nonWhitespaceCharacterCount": 3816, + "newlineCount": 52, + "readingTimeInMinutes": 2.0415094339622644, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 4794, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.3525, + "wordCount": 541, + "characterCount": 4783, + "nonWhitespaceCharacterCount": 3816, + "newlineCount": 52 + } + }, + "Rules/Ability Trees/Skills/Crafting/Drawing (Wit) - Lines of Sight.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 621, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5525, + "characterCount": 7947, + "nonWhitespaceCharacterCount": 5081, + "newlineCount": 57, + "readingTimeInMinutes": 2.3433962264150945, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 7970, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5525, + "wordCount": 621, + "characterCount": 7947, + "nonWhitespaceCharacterCount": 5081, + "newlineCount": 57 + } + }, + "Rules/Ability Trees/Skills/Crafting/Carpentry (Might) - Hands of the Builder.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 540, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.35, + "characterCount": 5729, + "nonWhitespaceCharacterCount": 4167, + "newlineCount": 55, + "readingTimeInMinutes": 2.0377358490566038, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 5742, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.35, + "wordCount": 540, + "characterCount": 5729, + "nonWhitespaceCharacterCount": 4167, + "newlineCount": 55 + } + }, + "Rules/Ability Trees/Profession/Traditions/Spiritbinding.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 668, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.67, + "characterCount": 4604, + "nonWhitespaceCharacterCount": 3907, + "newlineCount": 33, + "readingTimeInMinutes": 2.520754716981132, + "linkCount": 20, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 4668, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.67, + "wordCount": 668, + "characterCount": 4604, + "nonWhitespaceCharacterCount": 3907, + "newlineCount": 33 + } + }, + "Rules/Ability Trees/Profession/Traditions/Pact Magic – The Oathbound Path.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 969, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.4225, + "characterCount": 10980, + "nonWhitespaceCharacterCount": 7106, + "newlineCount": 81, + "readingTimeInMinutes": 3.6566037735849055, + "linkCount": 14, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897512, + "modifiedDate": 1756573897512, + "sizeInBytes": 11037, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.4225, + "wordCount": 969, + "characterCount": 10980, + "nonWhitespaceCharacterCount": 7106, + "newlineCount": 81 + } + }, + "Rules/Ability Trees/Profession/Traditions/Blood Sorcery – The Scarlet Path.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 908, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 2.27, + "characterCount": 13110, + "nonWhitespaceCharacterCount": 7346, + "newlineCount": 72, + "readingTimeInMinutes": 3.4264150943396228, + "linkCount": 9, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897511, + "modifiedDate": 1756573897511, + "sizeInBytes": 13209, + "sessionStart": { + "noteCount": 1, + "pageCount": 2.27, + "wordCount": 908, + "characterCount": 13110, + "nonWhitespaceCharacterCount": 7346, + "newlineCount": 72 + } + }, + "Rules/Ability Trees/Profession/Spiritcaller - The Core of Magic.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 763, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.9075, + "characterCount": 8565, + "nonWhitespaceCharacterCount": 5655, + "newlineCount": 81, + "readingTimeInMinutes": 2.879245283018868, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897511, + "modifiedDate": 1756573897511, + "sizeInBytes": 8597, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.9075, + "wordCount": 763, + "characterCount": 8565, + "nonWhitespaceCharacterCount": 5655, + "newlineCount": 81 + } + }, + "Rules/Ability Trees/Profession/Shayakar/Shayakar.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 8142, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 20.355, + "characterCount": 51625, + "nonWhitespaceCharacterCount": 42892, + "newlineCount": 611, + "readingTimeInMinutes": 30.724528301886792, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897511, + "modifiedDate": 1756573897511, + "sizeInBytes": 52980, + "sessionStart": { + "noteCount": 1, + "pageCount": 20.355, + "wordCount": 8142, + "characterCount": 51625, + "nonWhitespaceCharacterCount": 42892, + "newlineCount": 611 + } + }, + "Rules/Ability Trees/First Tiers.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 493, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.2325, + "characterCount": 6389, + "nonWhitespaceCharacterCount": 3194, + "newlineCount": 30, + "readingTimeInMinutes": 1.860377358490566, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897511, + "modifiedDate": 1756573897511, + "sizeInBytes": 6393, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.2325, + "wordCount": 493, + "characterCount": 6389, + "nonWhitespaceCharacterCount": 3194, + "newlineCount": 30 + } + }, + "Rules/Ability Trees/Cultures/Temerian Empire.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 563, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4075, + "characterCount": 3779, + "nonWhitespaceCharacterCount": 3172, + "newlineCount": 39, + "readingTimeInMinutes": 2.1245283018867926, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897511, + "modifiedDate": 1756573897511, + "sizeInBytes": 3895, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4075, + "wordCount": 563, + "characterCount": 3779, + "nonWhitespaceCharacterCount": 3172, + "newlineCount": 39 + } + }, + "Rules/Ability Trees/Cultures/Shogunatr culture.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 623, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5575, + "characterCount": 3925, + "nonWhitespaceCharacterCount": 3256, + "newlineCount": 42, + "readingTimeInMinutes": 2.3509433962264152, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897511, + "modifiedDate": 1756573897511, + "sizeInBytes": 4039, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5575, + "wordCount": 623, + "characterCount": 3925, + "nonWhitespaceCharacterCount": 3256, + "newlineCount": 42 + } + }, + "Rules/Ability Trees/Cultures/Pharos .md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 583, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4575, + "characterCount": 3860, + "nonWhitespaceCharacterCount": 3233, + "newlineCount": 40, + "readingTimeInMinutes": 2.2, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897511, + "modifiedDate": 1756573897511, + "sizeInBytes": 3968, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4575, + "wordCount": 583, + "characterCount": 3860, + "nonWhitespaceCharacterCount": 3233, + "newlineCount": 40 + } + }, + "Rules/Ability Trees/Cultures/Myou tree.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 575, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.4375, + "characterCount": 3459, + "nonWhitespaceCharacterCount": 2842, + "newlineCount": 30, + "readingTimeInMinutes": 2.169811320754717, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897511, + "modifiedDate": 1756573897511, + "sizeInBytes": 3553, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.4375, + "wordCount": 575, + "characterCount": 3459, + "nonWhitespaceCharacterCount": 2842, + "newlineCount": 30 + } + }, + "Rules/Ability Trees/Cultures/Mountain folk.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 532, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.33, + "characterCount": 3322, + "nonWhitespaceCharacterCount": 2746, + "newlineCount": 36, + "readingTimeInMinutes": 2.0075471698113208, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897511, + "sizeInBytes": 3436, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.33, + "wordCount": 532, + "characterCount": 3322, + "nonWhitespaceCharacterCount": 2746, + "newlineCount": 36 + } + }, + "Rules/Ability Trees/Cultures/Mentralian Kingdoms.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 623, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.5575, + "characterCount": 4036, + "nonWhitespaceCharacterCount": 3364, + "newlineCount": 40, + "readingTimeInMinutes": 2.3509433962264152, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 4158, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.5575, + "wordCount": 623, + "characterCount": 4036, + "nonWhitespaceCharacterCount": 3364, + "newlineCount": 40 + } + }, + "Rules/Ability Trees/Cultures/Lao shan.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 644, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.61, + "characterCount": 4214, + "nonWhitespaceCharacterCount": 3524, + "newlineCount": 42, + "readingTimeInMinutes": 2.430188679245283, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 4340, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.61, + "wordCount": 644, + "characterCount": 4214, + "nonWhitespaceCharacterCount": 3524, + "newlineCount": 42 + } + }, + "Rules/Ability Trees/Cultures/Golden coast tree.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 654, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.635, + "characterCount": 4043, + "nonWhitespaceCharacterCount": 3344, + "newlineCount": 41, + "readingTimeInMinutes": 2.4679245283018867, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 4155, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.635, + "wordCount": 654, + "characterCount": 4043, + "nonWhitespaceCharacterCount": 3344, + "newlineCount": 41 + } + }, + "Rules/Ability Trees/Cultures/Frontier.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 513, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.2825, + "characterCount": 3316, + "nonWhitespaceCharacterCount": 2759, + "newlineCount": 36, + "readingTimeInMinutes": 1.9358490566037736, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 3410, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.2825, + "wordCount": 513, + "characterCount": 3316, + "nonWhitespaceCharacterCount": 2759, + "newlineCount": 36 + } + }, + "Rules/Ability Trees/Cultures/Free cities.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 551, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.3775, + "characterCount": 3459, + "nonWhitespaceCharacterCount": 2865, + "newlineCount": 38, + "readingTimeInMinutes": 2.079245283018868, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 3557, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.3775, + "wordCount": 551, + "characterCount": 3459, + "nonWhitespaceCharacterCount": 2865, + "newlineCount": 38 + } + }, + "Rules/Ability Trees/Cultures/Ashenvale Woods.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 614, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.535, + "characterCount": 4144, + "nonWhitespaceCharacterCount": 3332, + "newlineCount": 96, + "readingTimeInMinutes": 2.3169811320754716, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 4204, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.535, + "wordCount": 614, + "characterCount": 4144, + "nonWhitespaceCharacterCount": 3332, + "newlineCount": 96 + } + }, + "Rules/Ability Trees/Cultures/Annwyn.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 678, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.695, + "characterCount": 4391, + "nonWhitespaceCharacterCount": 3559, + "newlineCount": 79, + "readingTimeInMinutes": 2.5584905660377357, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 4463, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.695, + "wordCount": 678, + "characterCount": 4391, + "nonWhitespaceCharacterCount": 3559, + "newlineCount": 79 + } + }, + "Rules/Ability Trees/Ability Trees.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 651, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 1.6275, + "characterCount": 4543, + "nonWhitespaceCharacterCount": 3814, + "newlineCount": 84, + "readingTimeInMinutes": 2.456603773584906, + "linkCount": 0, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 4575, + "sessionStart": { + "noteCount": 1, + "pageCount": 1.6275, + "wordCount": 651, + "characterCount": 4543, + "nonWhitespaceCharacterCount": 3814, + "newlineCount": 84 + } + }, + "Home.md": { + "isCountable": true, + "targetNodeType": "file", + "noteCount": 1, + "wordCount": 271, + "wordCountTowardGoal": 0, + "wordGoal": null, + "pageCount": 0.6775, + "characterCount": 2465, + "nonWhitespaceCharacterCount": 2041, + "newlineCount": 82, + "readingTimeInMinutes": 1.0226415094339623, + "linkCount": 55, + "embedCount": 0, + "aliases": null, + "createdDate": 1756573897510, + "modifiedDate": 1756573897510, + "sizeInBytes": 2600, + "sessionStart": { + "noteCount": 1, + "pageCount": 0.6775, + "wordCount": 271, + "characterCount": 2465, + "nonWhitespaceCharacterCount": 2041, + "newlineCount": 82 + }, + "frontmatter": { + "cssclass": "dashboard" + } } } } \ No newline at end of file diff --git a/.obsidian/plugins/novel-word-count/main.js b/.obsidian/plugins/novel-word-count/main.js index a4d4035..412f063 100644 --- a/.obsidian/plugins/novel-word-count/main.js +++ b/.obsidian/plugins/novel-word-count/main.js @@ -2061,4 +2061,5 @@ var NovelWordCountPlugin = class extends import_obsidian5.Plugin { } }; + /* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/novel-word-count/manifest.json b/.obsidian/plugins/novel-word-count/manifest.json index b07c5f1..999859c 100644 --- a/.obsidian/plugins/novel-word-count/manifest.json +++ b/.obsidian/plugins/novel-word-count/manifest.json @@ -1,7 +1,7 @@ { "id": "novel-word-count", "name": "Novel word count", - "version": "4.5.0", + "version": "4.6.0", "minAppVersion": "0.13.31", "description": "Displays a word count (and more!) for each file, folder and vault in the File Explorer pane.", "author": "Isaac Lyman", diff --git a/.obsidian/plugins/novel-word-count/styles.css b/.obsidian/plugins/novel-word-count/styles.css index d6d24e1..e70a345 100644 --- a/.obsidian/plugins/novel-word-count/styles.css +++ b/.obsidian/plugins/novel-word-count/styles.css @@ -19,6 +19,7 @@ .novel-word-count--active .nav-files-container .nav-file-title { align-items: baseline; + unicode-bidi: isolate; } .novel-word-count--active .nav-files-container .nav-file-title::after { content: attr(data-novel-word-count-plugin); @@ -33,9 +34,12 @@ position: relative; text-overflow: ellipsis; white-space: nowrap; + unicode-bidi: isolate; + direction: ltr; } .novel-word-count--active .nav-files-container .nav-file-title-content { min-width: 20px; + unicode-bidi: isolate; } .novel-word-count--note-right .nav-files-container .nav-file-title-content { flex: 1 1 0; @@ -62,6 +66,7 @@ } .novel-word-count--active .nav-files-container .nav-folder-title { align-items: baseline; + unicode-bidi: isolate; } .novel-word-count--active .nav-files-container .nav-folder-title::after { content: attr(data-novel-word-count-plugin); @@ -76,9 +81,12 @@ position: relative; text-overflow: ellipsis; white-space: nowrap; + unicode-bidi: isolate; + direction: ltr; } .novel-word-count--active .nav-files-container .nav-folder-title-content { min-width: 20px; + unicode-bidi: isolate; } .novel-word-count--folder-right .nav-files-container .nav-folder-title-content { flex: 1 1 0; diff --git a/.obsidian/plugins/obsidian-5e-statblocks/data.json b/.obsidian/plugins/obsidian-5e-statblocks/data.json index d0ca456..be35b08 100644 --- a/.obsidian/plugins/obsidian-5e-statblocks/data.json +++ b/.obsidian/plugins/obsidian-5e-statblocks/data.json @@ -126,7 +126,7 @@ "version": { "major": 4, "minor": 10, - "patch": 0 + "patch": 1 }, "paths": [ "/" diff --git a/.obsidian/plugins/obsidian-5e-statblocks/main.js b/.obsidian/plugins/obsidian-5e-statblocks/main.js index 4f368d8..a7ec740 100644 --- a/.obsidian/plugins/obsidian-5e-statblocks/main.js +++ b/.obsidian/plugins/obsidian-5e-statblocks/main.js @@ -761,7 +761,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,i,a,s,r,o,l=[X0,J0],c=[];function d(u,h){return nn.Platform.isMobile?1:0}return a=d(n,-1),s=c[a]=l[a](n),{c(){e=new gn(!1),i=R(),s.c(),r=_e(),e.a=i},m(u,h){e.m(t,u,h),D(u,i,h),c[a].m(u,h),D(u,r,h),o=!0},p(u,[h]){(!o||h&4)&&t!==(t=``)&&e.p(t),s.p(u,h)},i(u){o||(E(s),o=!0)},o(u){I(s),o=!1},d(u){u&&(e.d(),x(i),x(r)),c[a].d(u)}}}function Z0(n,e,t){let i,a,{layout:s}=e,{plugin:r}=e,o=Le(s);Se(n,o,C=>t(14,i=C)),li("plugin",r),li("layout",o);let l="",c=["General","Appearance","Advanced","Previewer"],d=c[0],u=!1,h=C=>{if(C.empty(),u){let M=i.name;new nn.TextComponent(C).setValue(M).onChange(k=>{M=k});let w=C.createDiv("buttons");new nn.ExtraButtonComponent(w).setIcon("checkmark").setTooltip("Save").onClick(()=>{u=!1,Ae(o,i.name=M,i),h(C)}),new nn.ExtraButtonComponent(w).setIcon("cross-in-box").setTooltip("Cancel").onClick(()=>{u=!1,h(C)})}else C.createEl("h5",{text:i.name}),new nn.ExtraButtonComponent(C.createDiv("buttons")).setIcon("pencil").setTooltip("Edit Name").onClick(()=>{u=!0,h(C)})},f=Me(),m=C=>{new nn.ButtonComponent(C).setIcon("checkmark").setCta().setTooltip("Save").onClick(()=>{f("saved")})},p=C=>{new nn.ExtraButtonComponent(C).setIcon("cross").setTooltip("Cancel").onClick(()=>{f("cancel")})},b=kt(o,C=>r.manager.getSheetRules(C));Se(n,b,C=>t(2,a=C));let _=C=>t(1,d=C),S=C=>t(0,l=C.detail);return n.$$set=C=>{"layout"in C&&t(9,s=C.layout),"plugin"in C&&t(10,r=C.plugin)},[l,d,a,o,c,h,m,p,b,s,r,_,S]}var vl=class extends U{constructor(e){super(),G(this,e,Z0,Q0,j,{layout:9,plugin:10},Y0)}},Eh=vl;var Fi=(n=>(n.None="None",n.Average="Average",n.Roll="Roll",n))(Fi||{});var Cf=Ba(Ts());function kl(){return na('var Vc=Object.create;var Il=Object.defineProperty;var qc=Object.getOwnPropertyDescriptor;var Uc=Object.getOwnPropertyNames;var Wc=Object.getPrototypeOf,zc=Object.prototype.hasOwnProperty;var St=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var jc=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Uc(e))!zc.call(i,n)&&n!==t&&Il(i,n,{get:()=>e[n],enumerable:!(r=qc(e,n))||r.enumerable});return i};var Gc=(i,e,t)=>(t=i!=null?Vc(Wc(i)):{},jc(e||!i||!i.__esModule?Il(t,"default",{value:i,enumerable:!0}):t,i));var ii=St(Ae=>{"use strict";function J0(i,e,t){if(t===void 0&&(t=Array.prototype),i&&typeof t.find=="function")return t.find.call(i,e);for(var r=0;r-1}var o2=Ti({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Ae.assign=Q0;Ae.find=J0;Ae.freeze=Ti;Ae.HTML_BOOLEAN_ATTRIBUTES=mh;Ae.HTML_RAW_TEXT_ELEMENTS=Cr;Ae.HTML_VOID_ELEMENTS=yh;Ae.hasDefaultHTMLNamespace=r2;Ae.hasOwn=ti;Ae.isHTMLBooleanAttribute=Z0;Ae.isHTMLRawTextElement=t2;Ae.isHTMLEscapableRawTextElement=i2;Ae.isHTMLMimeType=bh;Ae.isHTMLVoidElement=e2;Ae.isValidMimeType=s2;Ae.MIME_TYPE=Sr;Ae.NAMESPACE=o2});var kr=St(Tr=>{"use strict";var l2=ii();function wh(i,e){i.prototype=Object.create(Error.prototype,{constructor:{value:i},name:{value:i.name,enumerable:!0,writable:e}})}var Er=l2.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),Ah=Object.keys(Er);function Ch(i){return typeof i=="number"&&i>=1&&i<=25}function a2(i){return typeof i=="string"&&i.substring(i.length-Er.Error.length)===Er.Error}function xr(i,e){Ch(i)?(this.name=Ah[i],this.message=e||""):(this.message=i,this.name=a2(e)?e:Er.Error),Error.captureStackTrace&&Error.captureStackTrace(this,xr)}wh(xr,!0);Object.defineProperties(xr.prototype,{code:{enumerable:!0,get:function(){var i=Ah.indexOf(this.name);return Ch(i)?i:0}}});var Sh={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},tl=Object.entries(Sh);for(Dr=0;Dr{"use strict";function Rh(i){try{typeof i!="function"&&(i=RegExp);var e=new i("\\u{1D306}","u").exec("\\u{1D306}");return!!e&&e[0].length===2}catch(t){}return!1}var Br=Rh();function ri(i){if(i.source[0]!=="[")throw new Error(i+" can not be used with chars");return i.source.slice(1,i.source.lastIndexOf("]"))}function ki(i,e){if(i.source[0]!=="[")throw new Error("/"+i.source+"/ can not be used with chars_without");if(!e||typeof e!="string")throw new Error(JSON.stringify(e)+" is not a valid search");if(i.source.indexOf(e)===-1)throw new Error(\'"\'+e+\'" is not is /\'+i.source+"/");if(e==="-"&&i.source.indexOf(e)!==1)throw new Error(\'"\'+e+\'" is not at the first postion of /\'+i.source+"/");return new RegExp(i.source.replace(e,""),Br?"u":"")}function U(i){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(t){var r=typeof t=="string";if(r&&e===void 0&&t==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return r?t:t.source}).join(""),Br?"mu":"m")}function _(i){if(arguments.length===0)throw new Error("no parameters provided");return U.apply(_,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var u2="\\uFFFD",ni=/[-\\x09\\x0A\\x0D\\x20-\\x2C\\x2E-\\uD7FF\\uE000-\\uFFFD]/;Br&&(ni=U("[",ri(ni),"\\\\u{10000}-\\\\u{10FFFF}","]"));var rl=/[\\x20\\x09\\x0D\\x0A]/,h2=ri(rl),Q=U(rl,"+"),ne=U(rl,"*"),Mr=/[:_a-zA-Z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/;Br&&(Mr=U("[",ri(Mr),"\\\\u{10000}-\\\\u{10FFFF}","]"));var c2=ri(Mr),nl=U("[",c2,ri(/[-.0-9\\xB7]/),ri(/[\\u0300-\\u036F\\u203F-\\u2040]/),"]"),Ue=U(Mr,nl,"*"),Dh=U(nl,"+"),f2=U("&",Ue,";"),d2=_(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Rr=_(f2,"|",d2),Nr=U("%",Ue,";"),sl=_(U(\'"\',_(/[^%&"]/,"|",Nr,"|",Rr),"*",\'"\'),"|",U("\'",_(/[^%&\']/,"|",Nr,"|",Rr),"*","\'")),p2=_(\'"\',_(/[^<&"]/,"|",Rr),"*",\'"\',"|","\'",_(/[^<&\']/,"|",Rr),"*","\'"),g2=ki(Mr,":"),m2=ki(nl,":"),Eh=U(g2,m2,"*"),Pr=U(Eh,_(":",Eh),"?"),y2=U("^",Pr,"$"),b2=U("(",Pr,")"),Or=_(/"[^"]*"|\'[^\']*\'/),v2=U(/^<\\?/,"(",Ue,")",_(Q,"(",ni,"*?)"),"?",/\\?>/),xh=/[\\x20\\x0D\\x0Aa-zA-Z0-9-\'()+,./:=?;!*#@$_%]/,Wn=_(\'"\',xh,\'*"\',"|","\'",ki(xh,"\'"),"*\'"),Nh="",w2=U(Nh,_(ki(ni,"-"),"|",U("-",ki(ni,"-"))),"*",Oh),Th="#PCDATA",A2=_(U(/\\(/,ne,Th,_(ne,/\\|/,ne,Pr),"*",ne,/\\)\\*/),"|",U(/\\(/,ne,Th,ne,/\\)/)),C2=/[?*+]?/,S2=U(/\\([^>]+\\)/,C2),D2=_("EMPTY","|","ANY","|",A2,"|",S2),E2=""),T2=U("NOTATION",Q,/\\(/,ne,Ue,_(ne,/\\|/,ne,Ue),"*",ne,/\\)/),k2=U(/\\(/,ne,Dh,_(ne,/\\|/,ne,Dh),"*",ne,/\\)/),M2=_(T2,"|",k2),R2=_(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",M2),N2=_(/#REQUIRED|#IMPLIED/,"|",_(_("#FIXED",Q),"?",p2)),O2=_(Q,Ue,Q,R2,Q,N2),B2=""),ol="SYSTEM",zn="PUBLIC",jn=_(_(ol,Q,Or),"|",_(zn,Q,Wn,Q,Or)),L2=U("^",_(_(ol,Q,"(?",Or,")"),"|",_(zn,Q,"(?",Wn,")",Q,"(?",Or,")"))),_2=_(Q,"NDATA",Q,Ue),I2=_(sl,"|",_(jn,_2,"?")),Bh=""),H2=_(sl,"|",jn),$2=U(Bh,Q,"%",Q,Ue,Q,H2,ne,">"),V2=_(F2,"|",$2),q2=U(zn,Q,Wn),U2=U(""),ll=U(ne,"=",ne),kh=/1[.]\\d+/,W2=U(Q,"version",ll,_("\'",kh,"\'","|",\'"\',kh,\'"\')),Mh=/[A-Za-z][-A-Za-z0-9._]*/,z2=_(Q,"encoding",ll,_(\'"\',Mh,\'"\',"|","\'",Mh,"\'")),j2=_(Q,"standalone",ll,_("\'",_("yes","|","no"),"\'","|",\'"\',_("yes","|","no"),\'"\')),G2=U(/^<\\?xml/,W2,z2,"?",j2,"?",ne,/\\?>/),K2="",J2=//,Z2=U(ni,"*?",Q2),ey=U(J2,Z2);V.chars=ri;V.chars_without=ki;V.detectUnicodeSupport=Rh;V.reg=U;V.regg=_;V.AttlistDecl=P2;V.CDATA_START=Y2;V.CDATA_END=X2;V.CDSect=ey;V.Char=ni;V.Comment=w2;V.COMMENT_START=Nh;V.COMMENT_END=Oh;V.DOCTYPE_DECL_START=K2;V.elementdecl=x2;V.EntityDecl=V2;V.EntityValue=sl;V.ExternalID=jn;V.ExternalID_match=L2;V.Name=Ue;V.NotationDecl=U2;V.Reference=Rr;V.PEReference=Nr;V.PI=v2;V.PUBLIC=zn;V.PubidLiteral=Wn;V.QName=Pr;V.QName_exact=y2;V.QName_group=b2;V.S=Q;V.SChar_s=h2;V.S_OPT=ne;V.SYSTEM=ol;V.SystemLiteral=Or;V.UNICODE_REPLACEMENT_CHARACTER=u2;V.UNICODE_SUPPORT=Br;V.XMLDecl=G2});var pl=St(ae=>{"use strict";var We=ii(),ct=We.find,ty=We.hasDefaultHTMLNamespace,Ri=We.hasOwn,iy=We.isHTMLMimeType,ry=We.isHTMLRawTextElement,ny=We.isHTMLVoidElement,Lr=We.MIME_TYPE,dt=We.NAMESPACE,Te=Symbol(),sy=kr(),L=sy.DOMException,wt=al();function Oe(i){if(i!==Te)throw new TypeError("Illegal constructor")}function oy(i){return i!==""}function ly(i){return i?i.split(/[\\t\\n\\f\\r ]+/).filter(oy):[]}function ay(i,e){return Ri(i,e)||(i[e]=!0),i}function Ph(i){if(!i)return[];var e=ly(i);return Object.keys(e.reduce(ay,{}))}function uy(i){return function(e){return i&&i.indexOf(e)!==-1}}function Vh(i){if(!wt.QName_exact.test(i))throw new L(L.INVALID_CHARACTER_ERR,\'invalid character in qualified name "\'+i+\'"\')}function hl(i,e){Vh(e),i=i||null;var t=null,r=e;if(e.indexOf(":")>=0){var n=e.split(":");t=n[0],r=n[1]}if(t!==null&&i===null)throw new L(L.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(t==="xml"&&i!==We.NAMESPACE.XML)throw new L(L.NAMESPACE_ERR,\'prefix is "xml" and namespace is not the XML namespace\');if((t==="xmlns"||e==="xmlns")&&i!==We.NAMESPACE.XMLNS)throw new L(L.NAMESPACE_ERR,\'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace\');if(i===We.NAMESPACE.XMLNS&&t!=="xmlns"&&e!=="xmlns")throw new L(L.NAMESPACE_ERR,\'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"\');return[i,t,r]}function Bi(i,e){for(var t in i)Ri(i,t)&&(e[t]=i[t])}function Be(i,e){var t=i.prototype;if(!(t instanceof e)){let r=function(){};r.prototype=e.prototype,r=new r,Bi(t,r),i.prototype=t=r}t.constructor!=i&&(typeof i!="function"&&console.error("unknown Class:"+i),t.constructor=i)}var Pe={},Ye=Pe.ELEMENT_NODE=1,Ni=Pe.ATTRIBUTE_NODE=2,Gn=Pe.TEXT_NODE=3,qh=Pe.CDATA_SECTION_NODE=4,Uh=Pe.ENTITY_REFERENCE_NODE=5,hy=Pe.ENTITY_NODE=6,Wh=Pe.PROCESSING_INSTRUCTION_NODE=7,zh=Pe.COMMENT_NODE=8,Ir=Pe.DOCUMENT_NODE=9,jh=Pe.DOCUMENT_TYPE_NODE=10,Lt=Pe.DOCUMENT_FRAGMENT_NODE=11,cy=Pe.NOTATION_NODE=12,be=We.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function Lh(i){for(var e=[];i.parentNode||i.ownerElement;)i=i.parentNode||i.ownerElement,e.unshift(i);return e}function Gh(i,e){if(e.length=0&&i=0){for(var n=e.length-1;r<=n;)e[r]=e[++r];if(e.length=n,i){var s=i.ownerDocument;s&&Jh(s,i,t),t.ownerElement=null}}}Oi.prototype={length:0,item:Xe.prototype.item,getNamedItem:function(i){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(i=i.toLowerCase());for(var e=0;e_h(e.ownerDocument)?be.DOCUMENT_POSITION_FOLLOWING:be.DOCUMENT_POSITION_PRECEDING);var l=Lh(e),a=Lh(t);if(!r&&a.indexOf(e)>=0||n&&e===t)return be.DOCUMENT_POSITION_CONTAINS+be.DOCUMENT_POSITION_PRECEDING;if(!n&&l.indexOf(t)>=0||r&&e===t)return be.DOCUMENT_POSITION_CONTAINED_BY+be.DOCUMENT_POSITION_FOLLOWING;var u=Gh(a,l);for(var h in u.childNodes){var c=u.childNodes[h];if(c===t)return be.DOCUMENT_POSITION_FOLLOWING;if(c===e)return be.DOCUMENT_POSITION_PRECEDING;if(a.indexOf(c)>=0)return be.DOCUMENT_POSITION_FOLLOWING;if(l.indexOf(c)>=0)return be.DOCUMENT_POSITION_PRECEDING}return 0}};function Xh(i){return i=="<"&&"<"||i==">"&&">"||i=="&"&&"&"||i==\'"\'&&"""||"&#"+i.charCodeAt()+";"}Bi(Pe,X);Bi(Pe,X.prototype);Bi(be,X);Bi(be,X.prototype);function _r(i,e){if(e(i))return!0;if(i=i.firstChild)do if(_r(i,e))return!0;while(i=i.nextSibling)}function _t(i,e){Oe(i);var t=e||{};this.ownerDocument=this,this.contentType=t.contentType||Lr.XML_APPLICATION,this.type=iy(this.contentType)?"html":"xml"}function dy(i,e,t){i&&i._inc++;var r=t.namespaceURI;r===dt.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Jh(i,e,t,r){i&&i._inc++;var n=t.namespaceURI;n===dt.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function Qh(i,e,t){if(i&&i._inc){i._inc++;var r=e.childNodes;if(t)r[r.length++]=t;else{for(var n=e.firstChild,s=0;n;)r[s++]=n,n=n.nextSibling;r.length=s,delete r[r.length]}}}function Zh(i,e){if(i!==e.parentNode)throw new L(L.NOT_FOUND_ERR,"child\'s parent is not parent");var t=e.previousSibling,r=e.nextSibling;return t?t.nextSibling=r:i.firstChild=r,r?r.previousSibling=t:i.lastChild=t,Qh(i.ownerDocument,i),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function py(i){return i&&(i.nodeType===X.DOCUMENT_NODE||i.nodeType===X.DOCUMENT_FRAGMENT_NODE||i.nodeType===X.ELEMENT_NODE)}function gy(i){return i&&(ft(i)||i instanceof Pi||At(i)||i.nodeType===X.DOCUMENT_FRAGMENT_NODE||i.nodeType===X.COMMENT_NODE||i.nodeType===X.PROCESSING_INSTRUCTION_NODE)}function At(i){return i&&i.nodeType===X.DOCUMENT_TYPE_NODE}function ft(i){return i&&i.nodeType===X.ELEMENT_NODE}function ec(i){return i&&i.nodeType===X.TEXT_NODE}function Fh(i,e){var t=i.childNodes||[];if(ct(t,ft)||At(e))return!1;var r=ct(t,At);return!(e&&r&&t.indexOf(r)>t.indexOf(e))}function Hh(i,e){var t=i.childNodes||[];function r(s){return ft(s)&&s!==e}if(ct(t,r))return!1;var n=ct(t,At);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}function my(i,e,t){if(!py(i))throw new L(L.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+i.nodeType);if(t&&t.parentNode!==i)throw new L(L.NOT_FOUND_ERR,"child not in parent");if(!gy(e)||At(e)&&i.nodeType!==X.DOCUMENT_NODE)throw new L(L.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+i.nodeType)}function yy(i,e,t){var r=i.childNodes||[],n=e.childNodes||[];if(e.nodeType===X.DOCUMENT_FRAGMENT_NODE){var s=n.filter(ft);if(s.length>1||ct(n,ec))throw new L(L.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!Fh(i,t))throw new L(L.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(ft(e)&&!Fh(i,t))throw new L(L.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(At(e)){if(ct(r,At))throw new L(L.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var o=ct(r,ft);if(t&&r.indexOf(o)1||ct(n,ec))throw new L(L.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!Hh(i,t))throw new L(L.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(ft(e)&&!Hh(i,t))throw new L(L.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(At(e)){if(ct(r,function(a){return At(a)&&a!==t}))throw new L(L.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var o=ct(r,ft);if(t&&r.indexOf(o)0&&_r(t,function(n){if(n!==t&&n.nodeType===Ye){var s=n.getAttribute("class");if(s){var o=i===s;if(!o){var l=Ph(s);o=e.every(uy(l))}o&&r.push(n)}}}),r})},getElementsByTagName:function(i){var e=(this.nodeType===Ir?this:this.ownerDocument).type==="html",t=i.toLowerCase();return new si(this,function(r){var n=[];return _r(r,function(s){if(!(s===r||s.nodeType!==Ye))if(i==="*")n.push(s);else{var o=s.getQualifiedName(),l=e&&s.namespaceURI===dt.HTML?t:i;o===l&&n.push(s)}}),n})},getElementsByTagNameNS:function(i,e){return new si(this,function(t){var r=[];return _r(t,function(n){n!==t&&n.nodeType===Ye&&(i==="*"||n.namespaceURI===i)&&(e==="*"||n.localName==e)&&r.push(n)}),r})}};_t.prototype.getElementsByClassName=It.prototype.getElementsByClassName;_t.prototype.getElementsByTagName=It.prototype.getElementsByTagName;_t.prototype.getElementsByTagNameNS=It.prototype.getElementsByTagNameNS;Be(It,X);function oi(i){Oe(i),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}oi.prototype.nodeType=Ni;Be(oi,X);function Pi(i){Oe(i)}Pi.prototype={data:"",substringData:function(i,e){return this.data.substring(i,i+e)},appendData:function(i){i=this.data+i,this.nodeValue=this.data=i,this.length=i.length},insertData:function(i,e){this.replaceData(i,0,e)},deleteData:function(i,e){this.replaceData(i,e,"")},replaceData:function(i,e,t){var r=this.data.substring(0,i),n=this.data.substring(i+e);t=r+t+n,this.nodeValue=this.data=t,this.length=t.length}};Be(Pi,X);function Fr(i){Oe(i)}Fr.prototype={nodeName:"#text",nodeType:Gn,splitText:function(i){var e=this.data,t=e.substring(i);e=e.substring(0,i),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};Be(Fr,Pi);function Xn(i){Oe(i)}Xn.prototype={nodeName:"#comment",nodeType:zh};Be(Xn,Pi);function Jn(i){Oe(i)}Jn.prototype={nodeName:"#cdata-section",nodeType:qh};Be(Jn,Fr);function Qn(i){Oe(i)}Qn.prototype.nodeType=jh;Be(Qn,X);function fl(i){Oe(i)}fl.prototype.nodeType=cy;Be(fl,X);function dl(i){Oe(i)}dl.prototype.nodeType=hy;Be(dl,X);function Zn(i){Oe(i)}Zn.prototype.nodeType=Uh;Be(Zn,X);function Hr(i){Oe(i)}Hr.prototype.nodeName="#document-fragment";Hr.prototype.nodeType=Lt;Be(Hr,X);function es(i){Oe(i)}es.prototype.nodeType=Wh;Be(es,X);function ic(){}ic.prototype.serializeToString=function(i,e){return rc.call(i,e)};X.prototype.toString=rc;function rc(i){var e=[],t=this.nodeType===Ir&&this.documentElement||this,r=t.prefix,n=t.namespaceURI;if(n&&r==null){var r=t.lookupPrefix(n);if(r==null)var s=[{namespace:n,prefix:null}]}return Mi(this,e,i,s),e.join("")}function $h(i,e,t){var r=i.prefix||"",n=i.namespaceURI;if(!n||r==="xml"&&n===dt.XML||n===dt.XMLNS)return!1;for(var s=t.length;s--;){var o=t[s];if(o.prefix===r)return o.namespace!==n}return!0}function ul(i,e,t){i.push(" ",e,\'="\',t.replace(/[<>&"\\t\\n\\r]/g,Xh),\'"\')}function Mi(i,e,t,r){r||(r=[]);var n=i.nodeType===Ir?i:i.ownerDocument,s=n.type==="html";if(t)if(i=t(i),i){if(typeof i=="string"){e.push(i);return}}else return;switch(i.nodeType){case Ye:var o=i.attributes,l=o.length,w=i.firstChild,a=i.tagName,u=a;if(!s&&!i.prefix&&i.namespaceURI){for(var h,c=0;c=0;f--){var d=r[f];if(d.prefix===""&&d.namespace===i.namespaceURI){h=d.namespace;break}}if(h!==i.namespaceURI)for(var f=r.length-1;f>=0;f--){var d=r[f];if(d.namespace===i.namespaceURI){d.prefix&&(u=d.prefix+":"+a);break}}}e.push("<",u);for(var p=0;p");else{if(e.push(">"),s&&ry(a))for(;w;)w.data?e.push(w.data):Mi(w,e,t,r.slice()),w=w.nextSibling;else for(;w;)Mi(w,e,t,r.slice()),w=w.nextSibling;e.push("")}return;case Ir:case Lt:for(var w=i.firstChild;w;)Mi(w,e,t,r.slice()),w=w.nextSibling;return;case Ni:return ul(e,i.name,i.value);case Gn:return e.push(i.data.replace(/[<&>]/g,Xh));case qh:return e.push(wt.CDATA_START,i.data,wt.CDATA_END);case zh:return e.push(wt.COMMENT_START,i.data,wt.COMMENT_END);case jh:var E=i.publicId,S=i.systemId;e.push(wt.DOCTYPE_DECL_START," ",i.name),E?(e.push(" ",wt.PUBLIC," ",E),S&&S!=="."&&e.push(" ",S)):S&&S!=="."&&e.push(" ",wt.SYSTEM," ",S),i.internalSubset&&e.push(" [",i.internalSubset,"]"),e.push(">");return;case Wh:return e.push("");case Uh:return e.push("&",i.nodeName,";");default:e.push("??",i.nodeName)}}function nc(i,e,t){var r;switch(e.nodeType){case Ye:r=e.cloneNode(!1),r.ownerDocument=i;case Lt:break;case Ni:t=!0;break}if(r||(r=e.cloneNode(!1)),r.ownerDocument=i,r.parentNode=null,t)for(var n=e.firstChild;n;)r.appendChild(nc(i,n,t)),n=n.nextSibling;return r}function cl(i,e,t){var r=new e.constructor(Te);for(var n in e)if(Ri(e,n)){var s=e[n];typeof s!="object"&&s!=r[n]&&(r[n]=s)}switch(e.childNodes&&(r.childNodes=new Xe),r.ownerDocument=i,r.nodeType){case Ye:var o=e.attributes,l=r.attributes=new Oi,a=o.length;l._ownerElement=r;for(var u=0;u{"use strict";var oc=ii().freeze;$r.XML_ENTITIES=oc({amp:"&",apos:"\'",gt:">",lt:"<",quot:\'"\'});$r.HTML_ENTITIES=oc({Aacute:"\\xC1",aacute:"\\xE1",Abreve:"\\u0102",abreve:"\\u0103",ac:"\\u223E",acd:"\\u223F",acE:"\\u223E\\u0333",Acirc:"\\xC2",acirc:"\\xE2",acute:"\\xB4",Acy:"\\u0410",acy:"\\u0430",AElig:"\\xC6",aelig:"\\xE6",af:"\\u2061",Afr:"\\u{1D504}",afr:"\\u{1D51E}",Agrave:"\\xC0",agrave:"\\xE0",alefsym:"\\u2135",aleph:"\\u2135",Alpha:"\\u0391",alpha:"\\u03B1",Amacr:"\\u0100",amacr:"\\u0101",amalg:"\\u2A3F",AMP:"&",amp:"&",And:"\\u2A53",and:"\\u2227",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:"\\u0104",aogon:"\\u0105",Aopf:"\\u{1D538}",aopf:"\\u{1D552}",ap:"\\u2248",apacir:"\\u2A6F",apE:"\\u2A70",ape:"\\u224A",apid:"\\u224B",apos:"\'",ApplyFunction:"\\u2061",approx:"\\u2248",approxeq:"\\u224A",Aring:"\\xC5",aring:"\\xE5",Ascr:"\\u{1D49C}",ascr:"\\u{1D4B6}",Assign:"\\u2254",ast:"*",asymp:"\\u2248",asympeq:"\\u224D",Atilde:"\\xC3",atilde:"\\xE3",Auml:"\\xC4",auml:"\\xE4",awconint:"\\u2233",awint:"\\u2A11",backcong:"\\u224C",backepsilon:"\\u03F6",backprime:"\\u2035",backsim:"\\u223D",backsimeq:"\\u22CD",Backslash:"\\u2216",Barv:"\\u2AE7",barvee:"\\u22BD",Barwed:"\\u2306",barwed:"\\u2305",barwedge:"\\u2305",bbrk:"\\u23B5",bbrktbrk:"\\u23B6",bcong:"\\u224C",Bcy:"\\u0411",bcy:"\\u0431",bdquo:"\\u201E",becaus:"\\u2235",Because:"\\u2235",because:"\\u2235",bemptyv:"\\u29B0",bepsi:"\\u03F6",bernou:"\\u212C",Bernoullis:"\\u212C",Beta:"\\u0392",beta:"\\u03B2",beth:"\\u2136",between:"\\u226C",Bfr:"\\u{1D505}",bfr:"\\u{1D51F}",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:"\\u2AED",bnot:"\\u2310",Bopf:"\\u{1D539}",bopf:"\\u{1D553}",bot:"\\u22A5",bottom:"\\u22A5",bowtie:"\\u22C8",boxbox:"\\u29C9",boxDL:"\\u2557",boxDl:"\\u2556",boxdL:"\\u2555",boxdl:"\\u2510",boxDR:"\\u2554",boxDr:"\\u2553",boxdR:"\\u2552",boxdr:"\\u250C",boxH:"\\u2550",boxh:"\\u2500",boxHD:"\\u2566",boxHd:"\\u2564",boxhD:"\\u2565",boxhd:"\\u252C",boxHU:"\\u2569",boxHu:"\\u2567",boxhU:"\\u2568",boxhu:"\\u2534",boxminus:"\\u229F",boxplus:"\\u229E",boxtimes:"\\u22A0",boxUL:"\\u255D",boxUl:"\\u255C",boxuL:"\\u255B",boxul:"\\u2518",boxUR:"\\u255A",boxUr:"\\u2559",boxuR:"\\u2558",boxur:"\\u2514",boxV:"\\u2551",boxv:"\\u2502",boxVH:"\\u256C",boxVh:"\\u256B",boxvH:"\\u256A",boxvh:"\\u253C",boxVL:"\\u2563",boxVl:"\\u2562",boxvL:"\\u2561",boxvl:"\\u2524",boxVR:"\\u2560",boxVr:"\\u255F",boxvR:"\\u255E",boxvr:"\\u251C",bprime:"\\u2035",Breve:"\\u02D8",breve:"\\u02D8",brvbar:"\\xA6",Bscr:"\\u212C",bscr:"\\u{1D4B7}",bsemi:"\\u204F",bsim:"\\u223D",bsime:"\\u22CD",bsol:"\\\\",bsolb:"\\u29C5",bsolhsub:"\\u27C8",bull:"\\u2022",bullet:"\\u2022",bump:"\\u224E",bumpE:"\\u2AAE",bumpe:"\\u224F",Bumpeq:"\\u224E",bumpeq:"\\u224F",Cacute:"\\u0106",cacute:"\\u0107",Cap:"\\u22D2",cap:"\\u2229",capand:"\\u2A44",capbrcup:"\\u2A49",capcap:"\\u2A4B",capcup:"\\u2A47",capdot:"\\u2A40",CapitalDifferentialD:"\\u2145",caps:"\\u2229\\uFE00",caret:"\\u2041",caron:"\\u02C7",Cayleys:"\\u212D",ccaps:"\\u2A4D",Ccaron:"\\u010C",ccaron:"\\u010D",Ccedil:"\\xC7",ccedil:"\\xE7",Ccirc:"\\u0108",ccirc:"\\u0109",Cconint:"\\u2230",ccups:"\\u2A4C",ccupssm:"\\u2A50",Cdot:"\\u010A",cdot:"\\u010B",cedil:"\\xB8",Cedilla:"\\xB8",cemptyv:"\\u29B2",cent:"\\xA2",CenterDot:"\\xB7",centerdot:"\\xB7",Cfr:"\\u212D",cfr:"\\u{1D520}",CHcy:"\\u0427",chcy:"\\u0447",check:"\\u2713",checkmark:"\\u2713",Chi:"\\u03A7",chi:"\\u03C7",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:"\\u29C3",cire:"\\u2257",cirfnint:"\\u2A10",cirmid:"\\u2AEF",cirscir:"\\u29C2",ClockwiseContourIntegral:"\\u2232",CloseCurlyDoubleQuote:"\\u201D",CloseCurlyQuote:"\\u2019",clubs:"\\u2663",clubsuit:"\\u2663",Colon:"\\u2237",colon:":",Colone:"\\u2A74",colone:"\\u2254",coloneq:"\\u2254",comma:",",commat:"@",comp:"\\u2201",compfn:"\\u2218",complement:"\\u2201",complexes:"\\u2102",cong:"\\u2245",congdot:"\\u2A6D",Congruent:"\\u2261",Conint:"\\u222F",conint:"\\u222E",ContourIntegral:"\\u222E",Copf:"\\u2102",copf:"\\u{1D554}",coprod:"\\u2210",Coproduct:"\\u2210",COPY:"\\xA9",copy:"\\xA9",copysr:"\\u2117",CounterClockwiseContourIntegral:"\\u2233",crarr:"\\u21B5",Cross:"\\u2A2F",cross:"\\u2717",Cscr:"\\u{1D49E}",cscr:"\\u{1D4B8}",csub:"\\u2ACF",csube:"\\u2AD1",csup:"\\u2AD0",csupe:"\\u2AD2",ctdot:"\\u22EF",cudarrl:"\\u2938",cudarrr:"\\u2935",cuepr:"\\u22DE",cuesc:"\\u22DF",cularr:"\\u21B6",cularrp:"\\u293D",Cup:"\\u22D3",cup:"\\u222A",cupbrcap:"\\u2A48",CupCap:"\\u224D",cupcap:"\\u2A46",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:"\\u2021",dagger:"\\u2020",daleth:"\\u2138",Darr:"\\u21A1",dArr:"\\u21D3",darr:"\\u2193",dash:"\\u2010",Dashv:"\\u2AE4",dashv:"\\u22A3",dbkarow:"\\u290F",dblac:"\\u02DD",Dcaron:"\\u010E",dcaron:"\\u010F",Dcy:"\\u0414",dcy:"\\u0434",DD:"\\u2145",dd:"\\u2146",ddagger:"\\u2021",ddarr:"\\u21CA",DDotrahd:"\\u2911",ddotseq:"\\u2A77",deg:"\\xB0",Del:"\\u2207",Delta:"\\u0394",delta:"\\u03B4",demptyv:"\\u29B1",dfisht:"\\u297F",Dfr:"\\u{1D507}",dfr:"\\u{1D521}",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:"\\u0402",djcy:"\\u0452",dlcorn:"\\u231E",dlcrop:"\\u230D",dollar:"$",Dopf:"\\u{1D53B}",dopf:"\\u{1D555}",Dot:"\\xA8",dot:"\\u02D9",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{1D49F}",dscr:"\\u{1D4B9}",DScy:"\\u0405",dscy:"\\u0455",dsol:"\\u29F6",Dstrok:"\\u0110",dstrok:"\\u0111",dtdot:"\\u22F1",dtri:"\\u25BF",dtrif:"\\u25BE",duarr:"\\u21F5",duhar:"\\u296F",dwangle:"\\u29A6",DZcy:"\\u040F",dzcy:"\\u045F",dzigrarr:"\\u27FF",Eacute:"\\xC9",eacute:"\\xE9",easter:"\\u2A6E",Ecaron:"\\u011A",ecaron:"\\u011B",ecir:"\\u2256",Ecirc:"\\xCA",ecirc:"\\xEA",ecolon:"\\u2255",Ecy:"\\u042D",ecy:"\\u044D",eDDot:"\\u2A77",Edot:"\\u0116",eDot:"\\u2251",edot:"\\u0117",ee:"\\u2147",efDot:"\\u2252",Efr:"\\u{1D508}",efr:"\\u{1D522}",eg:"\\u2A9A",Egrave:"\\xC8",egrave:"\\xE8",egs:"\\u2A96",egsdot:"\\u2A98",el:"\\u2A99",Element:"\\u2208",elinters:"\\u23E7",ell:"\\u2113",els:"\\u2A95",elsdot:"\\u2A97",Emacr:"\\u0112",emacr:"\\u0113",empty:"\\u2205",emptyset:"\\u2205",EmptySmallSquare:"\\u25FB",emptyv:"\\u2205",EmptyVerySmallSquare:"\\u25AB",emsp:"\\u2003",emsp13:"\\u2004",emsp14:"\\u2005",ENG:"\\u014A",eng:"\\u014B",ensp:"\\u2002",Eogon:"\\u0118",eogon:"\\u0119",Eopf:"\\u{1D53C}",eopf:"\\u{1D556}",epar:"\\u22D5",eparsl:"\\u29E3",eplus:"\\u2A71",epsi:"\\u03B5",Epsilon:"\\u0395",epsilon:"\\u03B5",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:"\\u2130",escr:"\\u212F",esdot:"\\u2250",Esim:"\\u2A73",esim:"\\u2242",Eta:"\\u0397",eta:"\\u03B7",ETH:"\\xD0",eth:"\\xF0",Euml:"\\xCB",euml:"\\xEB",euro:"\\u20AC",excl:"!",exist:"\\u2203",Exists:"\\u2203",expectation:"\\u2130",ExponentialE:"\\u2147",exponentiale:"\\u2147",fallingdotseq:"\\u2252",Fcy:"\\u0424",fcy:"\\u0444",female:"\\u2640",ffilig:"\\uFB03",fflig:"\\uFB00",ffllig:"\\uFB04",Ffr:"\\u{1D509}",ffr:"\\u{1D523}",filig:"\\uFB01",FilledSmallSquare:"\\u25FC",FilledVerySmallSquare:"\\u25AA",fjlig:"fj",flat:"\\u266D",fllig:"\\uFB02",fltns:"\\u25B1",fnof:"\\u0192",Fopf:"\\u{1D53D}",fopf:"\\u{1D557}",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:"\\u2131",fscr:"\\u{1D4BB}",gacute:"\\u01F5",Gamma:"\\u0393",gamma:"\\u03B3",Gammad:"\\u03DC",gammad:"\\u03DD",gap:"\\u2A86",Gbreve:"\\u011E",gbreve:"\\u011F",Gcedil:"\\u0122",Gcirc:"\\u011C",gcirc:"\\u011D",Gcy:"\\u0413",gcy:"\\u0433",Gdot:"\\u0120",gdot:"\\u0121",gE:"\\u2267",ge:"\\u2265",gEl:"\\u2A8C",gel:"\\u22DB",geq:"\\u2265",geqq:"\\u2267",geqslant:"\\u2A7E",ges:"\\u2A7E",gescc:"\\u2AA9",gesdot:"\\u2A80",gesdoto:"\\u2A82",gesdotol:"\\u2A84",gesl:"\\u22DB\\uFE00",gesles:"\\u2A94",Gfr:"\\u{1D50A}",gfr:"\\u{1D524}",Gg:"\\u22D9",gg:"\\u226B",ggg:"\\u22D9",gimel:"\\u2137",GJcy:"\\u0403",gjcy:"\\u0453",gl:"\\u2277",gla:"\\u2AA5",glE:"\\u2A92",glj:"\\u2AA4",gnap:"\\u2A8A",gnapprox:"\\u2A8A",gnE:"\\u2269",gne:"\\u2A88",gneq:"\\u2A88",gneqq:"\\u2269",gnsim:"\\u22E7",Gopf:"\\u{1D53E}",gopf:"\\u{1D558}",grave:"`",GreaterEqual:"\\u2265",GreaterEqualLess:"\\u22DB",GreaterFullEqual:"\\u2267",GreaterGreater:"\\u2AA2",GreaterLess:"\\u2277",GreaterSlantEqual:"\\u2A7E",GreaterTilde:"\\u2273",Gscr:"\\u{1D4A2}",gscr:"\\u210A",gsim:"\\u2273",gsime:"\\u2A8E",gsiml:"\\u2A90",Gt:"\\u226B",GT:">",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:"\\u042A",hardcy:"\\u044A",hArr:"\\u21D4",harr:"\\u2194",harrcir:"\\u2948",harrw:"\\u21AD",Hat:"^",hbar:"\\u210F",Hcirc:"\\u0124",hcirc:"\\u0125",hearts:"\\u2665",heartsuit:"\\u2665",hellip:"\\u2026",hercon:"\\u22B9",Hfr:"\\u210C",hfr:"\\u{1D525}",HilbertSpace:"\\u210B",hksearow:"\\u2925",hkswarow:"\\u2926",hoarr:"\\u21FF",homtht:"\\u223B",hookleftarrow:"\\u21A9",hookrightarrow:"\\u21AA",Hopf:"\\u210D",hopf:"\\u{1D559}",horbar:"\\u2015",HorizontalLine:"\\u2500",Hscr:"\\u210B",hscr:"\\u{1D4BD}",hslash:"\\u210F",Hstrok:"\\u0126",hstrok:"\\u0127",HumpDownHump:"\\u224E",HumpEqual:"\\u224F",hybull:"\\u2043",hyphen:"\\u2010",Iacute:"\\xCD",iacute:"\\xED",ic:"\\u2063",Icirc:"\\xCE",icirc:"\\xEE",Icy:"\\u0418",icy:"\\u0438",Idot:"\\u0130",IEcy:"\\u0415",iecy:"\\u0435",iexcl:"\\xA1",iff:"\\u21D4",Ifr:"\\u2111",ifr:"\\u{1D526}",Igrave:"\\xCC",igrave:"\\xEC",ii:"\\u2148",iiiint:"\\u2A0C",iiint:"\\u222D",iinfin:"\\u29DC",iiota:"\\u2129",IJlig:"\\u0132",ijlig:"\\u0133",Im:"\\u2111",Imacr:"\\u012A",imacr:"\\u012B",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:"\\u222C",int:"\\u222B",intcal:"\\u22BA",integers:"\\u2124",Integral:"\\u222B",intercal:"\\u22BA",Intersection:"\\u22C2",intlarhk:"\\u2A17",intprod:"\\u2A3C",InvisibleComma:"\\u2063",InvisibleTimes:"\\u2062",IOcy:"\\u0401",iocy:"\\u0451",Iogon:"\\u012E",iogon:"\\u012F",Iopf:"\\u{1D540}",iopf:"\\u{1D55A}",Iota:"\\u0399",iota:"\\u03B9",iprod:"\\u2A3C",iquest:"\\xBF",Iscr:"\\u2110",iscr:"\\u{1D4BE}",isin:"\\u2208",isindot:"\\u22F5",isinE:"\\u22F9",isins:"\\u22F4",isinsv:"\\u22F3",isinv:"\\u2208",it:"\\u2062",Itilde:"\\u0128",itilde:"\\u0129",Iukcy:"\\u0406",iukcy:"\\u0456",Iuml:"\\xCF",iuml:"\\xEF",Jcirc:"\\u0134",jcirc:"\\u0135",Jcy:"\\u0419",jcy:"\\u0439",Jfr:"\\u{1D50D}",jfr:"\\u{1D527}",jmath:"\\u0237",Jopf:"\\u{1D541}",jopf:"\\u{1D55B}",Jscr:"\\u{1D4A5}",jscr:"\\u{1D4BF}",Jsercy:"\\u0408",jsercy:"\\u0458",Jukcy:"\\u0404",jukcy:"\\u0454",Kappa:"\\u039A",kappa:"\\u03BA",kappav:"\\u03F0",Kcedil:"\\u0136",kcedil:"\\u0137",Kcy:"\\u041A",kcy:"\\u043A",Kfr:"\\u{1D50E}",kfr:"\\u{1D528}",kgreen:"\\u0138",KHcy:"\\u0425",khcy:"\\u0445",KJcy:"\\u040C",kjcy:"\\u045C",Kopf:"\\u{1D542}",kopf:"\\u{1D55C}",Kscr:"\\u{1D4A6}",kscr:"\\u{1D4C0}",lAarr:"\\u21DA",Lacute:"\\u0139",lacute:"\\u013A",laemptyv:"\\u29B4",lagran:"\\u2112",Lambda:"\\u039B",lambda:"\\u03BB",Lang:"\\u27EA",lang:"\\u27E8",langd:"\\u2991",langle:"\\u27E8",lap:"\\u2A85",Laplacetrf:"\\u2112",laquo:"\\xAB",Larr:"\\u219E",lArr:"\\u21D0",larr:"\\u2190",larrb:"\\u21E4",larrbfs:"\\u291F",larrfs:"\\u291D",larrhk:"\\u21A9",larrlp:"\\u21AB",larrpl:"\\u2939",larrsim:"\\u2973",larrtl:"\\u21A2",lat:"\\u2AAB",lAtail:"\\u291B",latail:"\\u2919",late:"\\u2AAD",lates:"\\u2AAD\\uFE00",lBarr:"\\u290E",lbarr:"\\u290C",lbbrk:"\\u2772",lbrace:"{",lbrack:"[",lbrke:"\\u298B",lbrksld:"\\u298F",lbrkslu:"\\u298D",Lcaron:"\\u013D",lcaron:"\\u013E",Lcedil:"\\u013B",lcedil:"\\u013C",lceil:"\\u2308",lcub:"{",Lcy:"\\u041B",lcy:"\\u043B",ldca:"\\u2936",ldquo:"\\u201C",ldquor:"\\u201E",ldrdhar:"\\u2967",ldrushar:"\\u294B",ldsh:"\\u21B2",lE:"\\u2266",le:"\\u2264",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:"\\u2A8B",leg:"\\u22DA",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{1D50F}",lfr:"\\u{1D529}",lg:"\\u2276",lgE:"\\u2A91",lHar:"\\u2962",lhard:"\\u21BD",lharu:"\\u21BC",lharul:"\\u296A",lhblk:"\\u2584",LJcy:"\\u0409",ljcy:"\\u0459",Ll:"\\u22D8",ll:"\\u226A",llarr:"\\u21C7",llcorner:"\\u231E",Lleftarrow:"\\u21DA",llhard:"\\u296B",lltri:"\\u25FA",Lmidot:"\\u013F",lmidot:"\\u0140",lmoust:"\\u23B0",lmoustache:"\\u23B0",lnap:"\\u2A89",lnapprox:"\\u2A89",lnE:"\\u2268",lne:"\\u2A87",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{1D543}",lopf:"\\u{1D55D}",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:"\\u2112",lscr:"\\u{1D4C1}",Lsh:"\\u21B0",lsh:"\\u21B0",lsim:"\\u2272",lsime:"\\u2A8D",lsimg:"\\u2A8F",lsqb:"[",lsquo:"\\u2018",lsquor:"\\u201A",Lstrok:"\\u0141",lstrok:"\\u0142",Lt:"\\u226A",LT:"<",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:"\\u2905",map:"\\u21A6",mapsto:"\\u21A6",mapstodown:"\\u21A7",mapstoleft:"\\u21A4",mapstoup:"\\u21A5",marker:"\\u25AE",mcomma:"\\u2A29",Mcy:"\\u041C",mcy:"\\u043C",mdash:"\\u2014",mDDot:"\\u223A",measuredangle:"\\u2221",MediumSpace:"\\u205F",Mellintrf:"\\u2133",Mfr:"\\u{1D510}",mfr:"\\u{1D52A}",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{1D544}",mopf:"\\u{1D55E}",mp:"\\u2213",Mscr:"\\u2133",mscr:"\\u{1D4C2}",mstpos:"\\u223E",Mu:"\\u039C",mu:"\\u03BC",multimap:"\\u22B8",mumap:"\\u22B8",nabla:"\\u2207",Nacute:"\\u0143",nacute:"\\u0144",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:"\\u0147",ncaron:"\\u0148",Ncedil:"\\u0145",ncedil:"\\u0146",ncong:"\\u2247",ncongdot:"\\u2A6D\\u0338",ncup:"\\u2A42",Ncy:"\\u041D",ncy:"\\u043D",ndash:"\\u2013",ne:"\\u2260",nearhk:"\\u2924",neArr:"\\u21D7",nearr:"\\u2197",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:`\n`,nexist:"\\u2204",nexists:"\\u2204",Nfr:"\\u{1D511}",nfr:"\\u{1D52B}",ngE:"\\u2267\\u0338",nge:"\\u2271",ngeq:"\\u2271",ngeqq:"\\u2267\\u0338",ngeqslant:"\\u2A7E\\u0338",nges:"\\u2A7E\\u0338",nGg:"\\u22D9\\u0338",ngsim:"\\u2275",nGt:"\\u226B\\u20D2",ngt:"\\u226F",ngtr:"\\u226F",nGtv:"\\u226B\\u0338",nhArr:"\\u21CE",nharr:"\\u21AE",nhpar:"\\u2AF2",ni:"\\u220B",nis:"\\u22FC",nisd:"\\u22FA",niv:"\\u220B",NJcy:"\\u040A",njcy:"\\u045A",nlArr:"\\u21CD",nlarr:"\\u219A",nldr:"\\u2025",nlE:"\\u2266\\u0338",nle:"\\u2270",nLeftarrow:"\\u21CD",nleftarrow:"\\u219A",nLeftrightarrow:"\\u21CE",nleftrightarrow:"\\u21AE",nleq:"\\u2270",nleqq:"\\u2266\\u0338",nleqslant:"\\u2A7D\\u0338",nles:"\\u2A7D\\u0338",nless:"\\u226E",nLl:"\\u22D8\\u0338",nlsim:"\\u2274",nLt:"\\u226A\\u20D2",nlt:"\\u226E",nltri:"\\u22EA",nltrie:"\\u22EC",nLtv:"\\u226A\\u0338",nmid:"\\u2224",NoBreak:"\\u2060",NonBreakingSpace:"\\xA0",Nopf:"\\u2115",nopf:"\\u{1D55F}",Not:"\\u2AEC",not:"\\xAC",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:"\\u21CF",nrarr:"\\u219B",nrarrc:"\\u2933\\u0338",nrarrw:"\\u219D\\u0338",nRightarrow:"\\u21CF",nrightarrow:"\\u219B",nrtri:"\\u22EB",nrtrie:"\\u22ED",nsc:"\\u2281",nsccue:"\\u22E1",nsce:"\\u2AB0\\u0338",Nscr:"\\u{1D4A9}",nscr:"\\u{1D4C3}",nshortmid:"\\u2224",nshortparallel:"\\u2226",nsim:"\\u2241",nsime:"\\u2244",nsimeq:"\\u2244",nsmid:"\\u2224",nspar:"\\u2226",nsqsube:"\\u22E2",nsqsupe:"\\u22E3",nsub:"\\u2284",nsubE:"\\u2AC5\\u0338",nsube:"\\u2288",nsubset:"\\u2282\\u20D2",nsubseteq:"\\u2288",nsubseteqq:"\\u2AC5\\u0338",nsucc:"\\u2281",nsucceq:"\\u2AB0\\u0338",nsup:"\\u2285",nsupE:"\\u2AC6\\u0338",nsupe:"\\u2289",nsupset:"\\u2283\\u20D2",nsupseteq:"\\u2289",nsupseteqq:"\\u2AC6\\u0338",ntgl:"\\u2279",Ntilde:"\\xD1",ntilde:"\\xF1",ntlg:"\\u2278",ntriangleleft:"\\u22EA",ntrianglelefteq:"\\u22EC",ntriangleright:"\\u22EB",ntrianglerighteq:"\\u22ED",Nu:"\\u039D",nu:"\\u03BD",num:"#",numero:"\\u2116",numsp:"\\u2007",nvap:"\\u224D\\u20D2",nVDash:"\\u22AF",nVdash:"\\u22AE",nvDash:"\\u22AD",nvdash:"\\u22AC",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:"\\u21D6",nwarr:"\\u2196",nwarrow:"\\u2196",nwnear:"\\u2927",Oacute:"\\xD3",oacute:"\\xF3",oast:"\\u229B",ocir:"\\u229A",Ocirc:"\\xD4",ocirc:"\\xF4",Ocy:"\\u041E",ocy:"\\u043E",odash:"\\u229D",Odblac:"\\u0150",odblac:"\\u0151",odiv:"\\u2A38",odot:"\\u2299",odsold:"\\u29BC",OElig:"\\u0152",oelig:"\\u0153",ofcir:"\\u29BF",Ofr:"\\u{1D512}",ofr:"\\u{1D52C}",ogon:"\\u02DB",Ograve:"\\xD2",ograve:"\\xF2",ogt:"\\u29C1",ohbar:"\\u29B5",ohm:"\\u03A9",oint:"\\u222E",olarr:"\\u21BA",olcir:"\\u29BE",olcross:"\\u29BB",oline:"\\u203E",olt:"\\u29C0",Omacr:"\\u014C",omacr:"\\u014D",Omega:"\\u03A9",omega:"\\u03C9",Omicron:"\\u039F",omicron:"\\u03BF",omid:"\\u29B6",ominus:"\\u2296",Oopf:"\\u{1D546}",oopf:"\\u{1D560}",opar:"\\u29B7",OpenCurlyDoubleQuote:"\\u201C",OpenCurlyQuote:"\\u2018",operp:"\\u29B9",oplus:"\\u2295",Or:"\\u2A54",or:"\\u2228",orarr:"\\u21BB",ord:"\\u2A5D",order:"\\u2134",orderof:"\\u2134",ordf:"\\xAA",ordm:"\\xBA",origof:"\\u22B6",oror:"\\u2A56",orslope:"\\u2A57",orv:"\\u2A5B",oS:"\\u24C8",Oscr:"\\u{1D4AA}",oscr:"\\u2134",Oslash:"\\xD8",oslash:"\\xF8",osol:"\\u2298",Otilde:"\\xD5",otilde:"\\xF5",Otimes:"\\u2A37",otimes:"\\u2297",otimesas:"\\u2A36",Ouml:"\\xD6",ouml:"\\xF6",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:"\\u041F",pcy:"\\u043F",percnt:"%",period:".",permil:"\\u2030",perp:"\\u22A5",pertenk:"\\u2031",Pfr:"\\u{1D513}",pfr:"\\u{1D52D}",Phi:"\\u03A6",phi:"\\u03C6",phiv:"\\u03D5",phmmat:"\\u2133",phone:"\\u260E",Pi:"\\u03A0",pi:"\\u03C0",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:"\\u2119",popf:"\\u{1D561}",pound:"\\xA3",Pr:"\\u2ABB",pr:"\\u227A",prap:"\\u2AB7",prcue:"\\u227C",prE:"\\u2AB3",pre:"\\u2AAF",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:"\\u2033",prime:"\\u2032",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{1D4AB}",pscr:"\\u{1D4C5}",Psi:"\\u03A8",psi:"\\u03C8",puncsp:"\\u2008",Qfr:"\\u{1D514}",qfr:"\\u{1D52E}",qint:"\\u2A0C",Qopf:"\\u211A",qopf:"\\u{1D562}",qprime:"\\u2057",Qscr:"\\u{1D4AC}",qscr:"\\u{1D4C6}",quaternions:"\\u210D",quatint:"\\u2A16",quest:"?",questeq:"\\u225F",QUOT:\'"\',quot:\'"\',rAarr:"\\u21DB",race:"\\u223D\\u0331",Racute:"\\u0154",racute:"\\u0155",radic:"\\u221A",raemptyv:"\\u29B3",Rang:"\\u27EB",rang:"\\u27E9",rangd:"\\u2992",range:"\\u29A5",rangle:"\\u27E9",raquo:"\\xBB",Rarr:"\\u21A0",rArr:"\\u21D2",rarr:"\\u2192",rarrap:"\\u2975",rarrb:"\\u21E5",rarrbfs:"\\u2920",rarrc:"\\u2933",rarrfs:"\\u291E",rarrhk:"\\u21AA",rarrlp:"\\u21AC",rarrpl:"\\u2945",rarrsim:"\\u2974",Rarrtl:"\\u2916",rarrtl:"\\u21A3",rarrw:"\\u219D",rAtail:"\\u291C",ratail:"\\u291A",ratio:"\\u2236",rationals:"\\u211A",RBarr:"\\u2910",rBarr:"\\u290F",rbarr:"\\u290D",rbbrk:"\\u2773",rbrace:"}",rbrack:"]",rbrke:"\\u298C",rbrksld:"\\u298E",rbrkslu:"\\u2990",Rcaron:"\\u0158",rcaron:"\\u0159",Rcedil:"\\u0156",rcedil:"\\u0157",rceil:"\\u2309",rcub:"}",Rcy:"\\u0420",rcy:"\\u0440",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:"\\u211C",rfr:"\\u{1D52F}",rHar:"\\u2964",rhard:"\\u21C1",rharu:"\\u21C0",rharul:"\\u296C",Rho:"\\u03A1",rho:"\\u03C1",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:"\\u211D",ropf:"\\u{1D563}",roplus:"\\u2A2E",rotimes:"\\u2A35",RoundImplies:"\\u2970",rpar:")",rpargt:"\\u2994",rppolint:"\\u2A12",rrarr:"\\u21C9",Rrightarrow:"\\u21DB",rsaquo:"\\u203A",Rscr:"\\u211B",rscr:"\\u{1D4C7}",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:"\\u015A",sacute:"\\u015B",sbquo:"\\u201A",Sc:"\\u2ABC",sc:"\\u227B",scap:"\\u2AB8",Scaron:"\\u0160",scaron:"\\u0161",sccue:"\\u227D",scE:"\\u2AB4",sce:"\\u2AB0",Scedil:"\\u015E",scedil:"\\u015F",Scirc:"\\u015C",scirc:"\\u015D",scnap:"\\u2ABA",scnE:"\\u2AB6",scnsim:"\\u22E9",scpolint:"\\u2A13",scsim:"\\u227F",Scy:"\\u0421",scy:"\\u0441",sdot:"\\u22C5",sdotb:"\\u22A1",sdote:"\\u2A66",searhk:"\\u2925",seArr:"\\u21D8",searr:"\\u2198",searrow:"\\u2198",sect:"\\xA7",semi:";",seswar:"\\u2929",setminus:"\\u2216",setmn:"\\u2216",sext:"\\u2736",Sfr:"\\u{1D516}",sfr:"\\u{1D530}",sfrown:"\\u2322",sharp:"\\u266F",SHCHcy:"\\u0429",shchcy:"\\u0449",SHcy:"\\u0428",shcy:"\\u0448",ShortDownArrow:"\\u2193",ShortLeftArrow:"\\u2190",shortmid:"\\u2223",shortparallel:"\\u2225",ShortRightArrow:"\\u2192",ShortUpArrow:"\\u2191",shy:"\\xAD",Sigma:"\\u03A3",sigma:"\\u03C3",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:"\\u042C",softcy:"\\u044C",sol:"/",solb:"\\u29C4",solbar:"\\u233F",Sopf:"\\u{1D54A}",sopf:"\\u{1D564}",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{1D4AE}",sscr:"\\u{1D4C8}",ssetmn:"\\u2216",ssmile:"\\u2323",sstarf:"\\u22C6",Star:"\\u22C6",star:"\\u2606",starf:"\\u2605",straightepsilon:"\\u03F5",straightphi:"\\u03D5",strns:"\\xAF",Sub:"\\u22D0",sub:"\\u2282",subdot:"\\u2ABD",subE:"\\u2AC5",sube:"\\u2286",subedot:"\\u2AC3",submult:"\\u2AC1",subnE:"\\u2ACB",subne:"\\u228A",subplus:"\\u2ABF",subrarr:"\\u2979",Subset:"\\u22D0",subset:"\\u2282",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:"\\u22D1",sup:"\\u2283",sup1:"\\xB9",sup2:"\\xB2",sup3:"\\xB3",supdot:"\\u2ABE",supdsub:"\\u2AD8",supE:"\\u2AC6",supe:"\\u2287",supedot:"\\u2AC4",Superset:"\\u2283",SupersetEqual:"\\u2287",suphsol:"\\u27C9",suphsub:"\\u2AD7",suplarr:"\\u297B",supmult:"\\u2AC2",supnE:"\\u2ACC",supne:"\\u228B",supplus:"\\u2AC0",Supset:"\\u22D1",supset:"\\u2283",supseteq:"\\u2287",supseteqq:"\\u2AC6",supsetneq:"\\u228B",supsetneqq:"\\u2ACC",supsim:"\\u2AC8",supsub:"\\u2AD4",supsup:"\\u2AD6",swarhk:"\\u2926",swArr:"\\u21D9",swarr:"\\u2199",swarrow:"\\u2199",swnwar:"\\u292A",szlig:"\\xDF",Tab:" ",target:"\\u2316",Tau:"\\u03A4",tau:"\\u03C4",tbrk:"\\u23B4",Tcaron:"\\u0164",tcaron:"\\u0165",Tcedil:"\\u0162",tcedil:"\\u0163",Tcy:"\\u0422",tcy:"\\u0442",tdot:"\\u20DB",telrec:"\\u2315",Tfr:"\\u{1D517}",tfr:"\\u{1D531}",there4:"\\u2234",Therefore:"\\u2234",therefore:"\\u2234",Theta:"\\u0398",theta:"\\u03B8",thetasym:"\\u03D1",thetav:"\\u03D1",thickapprox:"\\u2248",thicksim:"\\u223C",ThickSpace:"\\u205F\\u200A",thinsp:"\\u2009",ThinSpace:"\\u2009",thkap:"\\u2248",thksim:"\\u223C",THORN:"\\xDE",thorn:"\\xFE",Tilde:"\\u223C",tilde:"\\u02DC",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{1D54B}",topf:"\\u{1D565}",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{1D4AF}",tscr:"\\u{1D4C9}",TScy:"\\u0426",tscy:"\\u0446",TSHcy:"\\u040B",tshcy:"\\u045B",Tstrok:"\\u0166",tstrok:"\\u0167",twixt:"\\u226C",twoheadleftarrow:"\\u219E",twoheadrightarrow:"\\u21A0",Uacute:"\\xDA",uacute:"\\xFA",Uarr:"\\u219F",uArr:"\\u21D1",uarr:"\\u2191",Uarrocir:"\\u2949",Ubrcy:"\\u040E",ubrcy:"\\u045E",Ubreve:"\\u016C",ubreve:"\\u016D",Ucirc:"\\xDB",ucirc:"\\xFB",Ucy:"\\u0423",ucy:"\\u0443",udarr:"\\u21C5",Udblac:"\\u0170",udblac:"\\u0171",udhar:"\\u296E",ufisht:"\\u297E",Ufr:"\\u{1D518}",ufr:"\\u{1D532}",Ugrave:"\\xD9",ugrave:"\\xF9",uHar:"\\u2963",uharl:"\\u21BF",uharr:"\\u21BE",uhblk:"\\u2580",ulcorn:"\\u231C",ulcorner:"\\u231C",ulcrop:"\\u230F",ultri:"\\u25F8",Umacr:"\\u016A",umacr:"\\u016B",uml:"\\xA8",UnderBar:"_",UnderBrace:"\\u23DF",UnderBracket:"\\u23B5",UnderParenthesis:"\\u23DD",Union:"\\u22C3",UnionPlus:"\\u228E",Uogon:"\\u0172",uogon:"\\u0173",Uopf:"\\u{1D54C}",uopf:"\\u{1D566}",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:"\\u03D2",upsi:"\\u03C5",upsih:"\\u03D2",Upsilon:"\\u03A5",upsilon:"\\u03C5",UpTee:"\\u22A5",UpTeeArrow:"\\u21A5",upuparrows:"\\u21C8",urcorn:"\\u231D",urcorner:"\\u231D",urcrop:"\\u230E",Uring:"\\u016E",uring:"\\u016F",urtri:"\\u25F9",Uscr:"\\u{1D4B0}",uscr:"\\u{1D4CA}",utdot:"\\u22F0",Utilde:"\\u0168",utilde:"\\u0169",utri:"\\u25B5",utrif:"\\u25B4",uuarr:"\\u21C8",Uuml:"\\xDC",uuml:"\\xFC",uwangle:"\\u29A7",vangrt:"\\u299C",varepsilon:"\\u03F5",varkappa:"\\u03F0",varnothing:"\\u2205",varphi:"\\u03D5",varpi:"\\u03D6",varpropto:"\\u221D",vArr:"\\u21D5",varr:"\\u2195",varrho:"\\u03F1",varsigma:"\\u03C2",varsubsetneq:"\\u228A\\uFE00",varsubsetneqq:"\\u2ACB\\uFE00",varsupsetneq:"\\u228B\\uFE00",varsupsetneqq:"\\u2ACC\\uFE00",vartheta:"\\u03D1",vartriangleleft:"\\u22B2",vartriangleright:"\\u22B3",Vbar:"\\u2AEB",vBar:"\\u2AE8",vBarv:"\\u2AE9",Vcy:"\\u0412",vcy:"\\u0432",VDash:"\\u22AB",Vdash:"\\u22A9",vDash:"\\u22A8",vdash:"\\u22A2",Vdashl:"\\u2AE6",Vee:"\\u22C1",vee:"\\u2228",veebar:"\\u22BB",veeeq:"\\u225A",vellip:"\\u22EE",Verbar:"\\u2016",verbar:"|",Vert:"\\u2016",vert:"|",VerticalBar:"\\u2223",VerticalLine:"|",VerticalSeparator:"\\u2758",VerticalTilde:"\\u2240",VeryThinSpace:"\\u200A",Vfr:"\\u{1D519}",vfr:"\\u{1D533}",vltri:"\\u22B2",vnsub:"\\u2282\\u20D2",vnsup:"\\u2283\\u20D2",Vopf:"\\u{1D54D}",vopf:"\\u{1D567}",vprop:"\\u221D",vrtri:"\\u22B3",Vscr:"\\u{1D4B1}",vscr:"\\u{1D4CB}",vsubnE:"\\u2ACB\\uFE00",vsubne:"\\u228A\\uFE00",vsupnE:"\\u2ACC\\uFE00",vsupne:"\\u228B\\uFE00",Vvdash:"\\u22AA",vzigzag:"\\u299A",Wcirc:"\\u0174",wcirc:"\\u0175",wedbar:"\\u2A5F",Wedge:"\\u22C0",wedge:"\\u2227",wedgeq:"\\u2259",weierp:"\\u2118",Wfr:"\\u{1D51A}",wfr:"\\u{1D534}",Wopf:"\\u{1D54E}",wopf:"\\u{1D568}",wp:"\\u2118",wr:"\\u2240",wreath:"\\u2240",Wscr:"\\u{1D4B2}",wscr:"\\u{1D4CC}",xcap:"\\u22C2",xcirc:"\\u25EF",xcup:"\\u22C3",xdtri:"\\u25BD",Xfr:"\\u{1D51B}",xfr:"\\u{1D535}",xhArr:"\\u27FA",xharr:"\\u27F7",Xi:"\\u039E",xi:"\\u03BE",xlArr:"\\u27F8",xlarr:"\\u27F5",xmap:"\\u27FC",xnis:"\\u22FB",xodot:"\\u2A00",Xopf:"\\u{1D54F}",xopf:"\\u{1D569}",xoplus:"\\u2A01",xotime:"\\u2A02",xrArr:"\\u27F9",xrarr:"\\u27F6",Xscr:"\\u{1D4B3}",xscr:"\\u{1D4CD}",xsqcup:"\\u2A06",xuplus:"\\u2A04",xutri:"\\u25B3",xvee:"\\u22C1",xwedge:"\\u22C0",Yacute:"\\xDD",yacute:"\\xFD",YAcy:"\\u042F",yacy:"\\u044F",Ycirc:"\\u0176",ycirc:"\\u0177",Ycy:"\\u042B",ycy:"\\u044B",yen:"\\xA5",Yfr:"\\u{1D51C}",yfr:"\\u{1D536}",YIcy:"\\u0407",yicy:"\\u0457",Yopf:"\\u{1D550}",yopf:"\\u{1D56A}",Yscr:"\\u{1D4B4}",yscr:"\\u{1D4CE}",YUcy:"\\u042E",yucy:"\\u044E",Yuml:"\\u0178",yuml:"\\xFF",Zacute:"\\u0179",zacute:"\\u017A",Zcaron:"\\u017D",zcaron:"\\u017E",Zcy:"\\u0417",zcy:"\\u0437",Zdot:"\\u017B",zdot:"\\u017C",zeetrf:"\\u2128",ZeroWidthSpace:"\\u200B",Zeta:"\\u0396",zeta:"\\u03B6",Zfr:"\\u2128",zfr:"\\u{1D537}",ZHcy:"\\u0416",zhcy:"\\u0436",zigrarr:"\\u21DD",Zopf:"\\u2124",zopf:"\\u{1D56B}",Zscr:"\\u{1D4B5}",zscr:"\\u{1D4CF}",zwj:"\\u200D",zwnj:"\\u200C"});$r.entityMap=$r.HTML_ENTITIES});var bc=St(is=>{"use strict";var Fi=ii(),z=al(),fc=kr(),by=Fi.isHTMLEscapableRawTextElement,vy=Fi.isHTMLMimeType,wy=Fi.isHTMLRawTextElement,Wr=Fi.hasOwn,ac=Fi.NAMESPACE,uc=fc.ParseError,Ay=fc.DOMException,Vr=0,Ft=1,Li=2,qr=3,_i=4,Ii=5,Ur=6,ts=7;function dc(){}dc.prototype={parse:function(i,e,t){var r=this.domBuilder;r.startDocument(),pc(e,e=Object.create(null)),Cy(i,e,t,r,this.errorHandler),r.endDocument()}};var gl=/&#?\\w+;?/g;function Cy(i,e,t,r,n){var s=vy(r.mimeType);if(i.indexOf(z.UNICODE_REPLACEMENT_CHARACTER)>=0)return n.fatalError("Unicode replacement character detected, source encoding issues?");function o(k){if(k>65535){k-=65536;var K=55296+(k>>10),ue=56320+(k&1023);return String.fromCharCode(K,ue)}else return String.fromCharCode(k)}function l(k){var K=k[k.length-1]===";"?k:k+";";if(!s&&K!==k)return n.error("EntityRef: expecting ;"),k;var ue=z.Reference.exec(K);if(!ue||ue[0].length!==K.length)return n.error("entity not matching Reference production: "+k),k;var pe=K.slice(1,-1);return Wr(t,pe)?t[pe]:pe.charAt(0)==="#"?o(parseInt(pe.substr(1).replace("x","0x"))):(n.error("entity not found:"+k),k)}function a(k){if(k>y){var K=i.substring(y,k).replace(gl,l);d&&u(y),r.characters(K,0,k-y),y=k}}function u(k,K){for(;k>=c&&(K=f.exec(i));)h=K.index,c=h+K[0].length,d.lineNumber++;d.columnNumber=k-h+1}for(var h=0,c=0,f=/.*(?:\\r\\n?|\\n)|.*$/g,d=r.locator,p=[{currentNSMap:e}],g=[],y=0;;){try{var b=i.indexOf("<",y);if(b<0){if(!s&&g.length>0)return n.fatalError("unclosed xml tag(s): "+g.join(", "));if(!i.substring(y).match(/^\\s*$/)){var A=r.doc,w=A.createTextNode(i.substr(y));if(A.documentElement)return n.error("Extra content at the end of the document");A.appendChild(w),r.currentElement=w}return}if(b>y){var E=i.substring(y,b);!s&&g.length===0&&(E=E.replace(new RegExp(z.S_OPT.source,"g"),""),E&&n.error("Unexpected content outside root element: \'"+E+"\'")),a(b)}switch(i.charAt(b+1)){case"/":var I=i.indexOf(">",b+2),S=i.substring(b+2,I>0?I:void 0);if(!S)return n.fatalError("end tag name missing");var N=I>0&&z.reg("^",z.QName_group,z.S_OPT,"$").exec(S);if(!N)return n.fatalError(\'end tag name contains invalid characters: "\'+S+\'"\');if(!r.currentElement&&!r.doc.documentElement)return;var M=g[g.length-1]||r.currentElement.tagName||r.doc.documentElement.tagName||"";if(M!==N[1]){var j=N[1].toLowerCase();if(!s||M.toLowerCase()!==j)return n.fatalError(\'Opening and ending tag mismatch: "\'+M+\'" != "\'+S+\'"\')}var D=p.pop();g.pop();var H=D.localNSMap;if(r.endElement(D.uri,D.localName,M),H)for(var B in H)Wr(H,B)&&r.endPrefixMapping(B);I++;break;case"?":d&&u(b),I=xy(i,b,r,n);break;case"!":d&&u(b),I=mc(i,b,r,n,s);break;default:d&&u(b);var O=new yc,W=p[p.length-1].currentNSMap,I=Sy(i,b,O,W,l,n,s),te=O.length;if(O.closed||(s&&Fi.isHTMLVoidElement(O.tagName)?O.closed=!0:g.push(O.tagName)),d&&te){for(var Ce=hc(d,{}),F=0;Fy?y=I:a(Math.max(b,y)+1)}}function hc(i,e){return e.lineNumber=i.lineNumber,e.columnNumber=i.columnNumber,e}function Sy(i,e,t,r,n,s,o){function l(d,p,g){if(Wr(t.attributeNames,d))return s.fatalError("Attribute "+d+" redefined");if(!o&&p.indexOf("<")>=0)return s.fatalError("Unescaped \'<\' not allowed in attributes values");t.addValue(d,p.replace(/[\\t\\n\\r]/g," ").replace(gl,n),g)}for(var a,u,h=++e,c=Vr;;){var f=i.charAt(h);switch(f){case"=":if(c===Ft)a=i.slice(e,h),c=qr;else if(c===Li)c=qr;else throw new Error("attribute equal must after attrName");break;case"\'":case\'"\':if(c===qr||c===Ft)if(c===Ft&&(s.warning(\'attribute value must after "="\'),a=i.slice(e,h)),e=h+1,h=i.indexOf(f,e),h>0)u=i.slice(e,h),l(a,u,e-1),c=Ii;else throw new Error("attribute value no end \'"+f+"\' match");else if(c==_i)u=i.slice(e,h),l(a,u,e),s.warning(\'attribute "\'+a+\'" missed start quot(\'+f+")!!"),e=h+1,c=Ii;else throw new Error(\'attribute value must after "="\');break;case"/":switch(c){case Vr:t.setTagName(i.slice(e,h));case Ii:case Ur:case ts:c=ts,t.closed=!0;case _i:case Ft:break;case Li:t.closed=!0;break;default:throw new Error("attribute invalid close char(\'/\')")}break;case"":return s.error("unexpected end of input"),c==Vr&&t.setTagName(i.slice(e,h)),h;case">":switch(c){case Vr:t.setTagName(i.slice(e,h));case Ii:case Ur:case ts:break;case _i:case Ft:u=i.slice(e,h),u.slice(-1)==="/"&&(t.closed=!0,u=u.slice(0,-1));case Li:c===Li&&(u=a),c==_i?(s.warning(\'attribute "\'+u+\'" missed quot(")!\'),l(a,u,e)):(o||s.warning(\'attribute "\'+u+\'" missed value!! "\'+u+\'" instead!!\'),l(u,u,e));break;case qr:if(!o)return s.fatalError(`AttValue: \' or " expected`)}return h;case"\\x80":f=" ";default:if(f<=" ")switch(c){case Vr:t.setTagName(i.slice(e,h)),c=Ur;break;case Ft:a=i.slice(e,h),c=Li;break;case _i:var u=i.slice(e,h);s.warning(\'attribute "\'+u+\'" missed quot(")!!\'),l(a,u,e);case Ii:c=Ur;break}else switch(c){case Li:o||s.warning(\'attribute "\'+a+\'" missed value!! "\'+a+\'" instead2!!\'),l(a,a,e),e=h,c=Ft;break;case Ii:s.warning(\'attribute space is required"\'+a+\'"!!\');case Ur:c=Ft,e=h;break;case qr:c=_i,e=h;break;case ts:throw new Error("elements closed character \'/\' and \'>\' must be connected to")}}h++}}function cc(i,e,t){for(var r=i.tagName,n=null,c=i.length;c--;){var s=i[c],o=s.qName,l=s.value,f=o.indexOf(":");if(f>0)var a=s.prefix=o.slice(0,f),u=o.slice(f+1),h=a==="xmlns"&&u;else u=o,a=null,h=o==="xmlns"&&"";s.localName=u,h!==!1&&(n==null&&(n=Object.create(null),pc(t,t=Object.create(null))),t[h]=n[h]=l,s.uri=ac.XMLNS,e.startPrefixMapping(h,l))}for(var c=i.length;c--;)s=i[c],s.prefix&&(s.prefix==="xml"&&(s.uri=ac.XML),s.prefix!=="xmlns"&&(s.uri=t[s.prefix]));var f=r.indexOf(":");f>0?(a=i.prefix=r.slice(0,f),u=i.localName=r.slice(f+1)):(a=null,u=i.localName=r);var d=i.uri=t[a||""];if(e.startElement(d,u,r,i),i.closed){if(e.endElement(d,u,r),n)for(a in n)Wr(n,a)&&e.endPrefixMapping(a)}else return i.currentNSMap=t,i.localNSMap=n,!0}function Dy(i,e,t,r,n){var s=by(t);if(s||wy(t)){var o=i.indexOf("",e),l=i.substring(e+1,o);return s&&(l=l.replace(gl,r)),n.characters(l,0,l.length),o}return e+1}function pc(i,e){for(var t in i)Wr(i,t)&&(e[t]=i[t])}function gc(i,e){var t=e;function r(u){return u=u||0,i.charAt(t+u)}function n(u){u=u||1,t+=u}function s(){for(var u=0;t"?r.fatalError("doctype not terminated with > at position "+s.getIndex()):(s.skip(1),t.startDTD(a.name,a.publicId,a.systemId,a.internalSubset),t.endDTD(),s.getIndex())}default:return r.fatalError(\'Not well-formed XML starting with "0)return r.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!z.XMLDecl.test(i.substring(e)))return r.fatalError("xml declaration is not well-formed")}return t.processingInstruction(n[1],n[2]),e+n[0].length}function yc(){this.attributeNames=Object.create(null)}yc.prototype={setTagName:function(i){if(!z.QName_exact.test(i))throw new Error("invalid tagName:"+i);this.tagName=i},addValue:function(i,e,t){if(!z.QName_exact.test(i))throw new Error("invalid attribute:"+i);this.attributeNames[i]=this.length,this[this.length++]={qName:i,value:e,offset:t}},length:0,getLocalName:function(i){return this[i].localName},getLocator:function(i){return this[i].locator},getQName:function(i){return this[i].qName},getURI:function(i){return this[i].uri},getValue:function(i){return this[i].value}};is.XMLReader=dc;is.parseUtils=gc;is.parseDoctypeCommentOrCData=mc});var Ec=St($i=>{"use strict";var li=ii(),Ty=pl(),ky=kr(),vc=lc(),My=bc(),Ry=Ty.DOMImplementation,Ny=li.hasDefaultHTMLNamespace,Oy=li.isHTMLMimeType,By=li.isValidMimeType,Cc=li.MIME_TYPE,ml=li.NAMESPACE,wc=ky.ParseError,Py=My.XMLReader;function Sc(i){return i.replace(/\\r[\\n\\u0085]/g,`\n`).replace(/[\\r\\u0085\\u2028]/g,`\n`)}function Dc(i){if(i=i||{locator:!0},this.assign=i.assign||li.assign,this.domHandler=i.domHandler||ns,this.onError=i.onError||i.errorHandler,i.errorHandler&&typeof i.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");i.errorHandler&&i.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=i.normalizeLineEndings||Sc,this.locator=!!i.locator,this.xmlns=this.assign(Object.create(null),i.xmlns)}Dc.prototype.parseFromString=function(i,e){if(!By(e))throw new TypeError(\'DOMParser.parseFromString: the provided mimeType "\'+e+\'" is not valid.\');var t=this.assign(Object.create(null),this.xmlns),r=vc.XML_ENTITIES,n=t[""]||null;Ny(e)?(r=vc.HTML_ENTITIES,n=ml.HTML):e===Cc.XML_SVG_IMAGE&&(n=ml.SVG),t[""]=n,t.xml=t.xml||ml.XML;var s=new this.domHandler({mimeType:e,defaultNamespace:n,onError:this.onError}),o=this.locator?{}:void 0;this.locator&&s.setDocumentLocator(o);var l=new Py;l.errorHandler=s,l.domBuilder=s;var a=!li.isHTMLMimeType(e);return a&&typeof i!="string"&&l.errorHandler.fatalError("source is not a string"),l.parse(this.normalizeLineEndings(String(i)),t,r),s.doc.documentElement||l.errorHandler.fatalError("missing root element"),s.doc};function ns(i){var e=i||{};this.mimeType=e.mimeType||Cc.XML_APPLICATION,this.defaultNamespace=e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=e.onError}function Hi(i,e){e.lineNumber=i.lineNumber,e.columnNumber=i.columnNumber}ns.prototype={startDocument:function(){var i=new Ry;this.doc=Oy(this.mimeType)?i.createHTMLDocument(!1):i.createDocument(this.defaultNamespace,"")},startElement:function(i,e,t,r){var n=this.doc,s=n.createElementNS(i,t||e),o=r.length;rs(this,s),this.currentElement=s,this.locator&&Hi(this.locator,s);for(var l=0;l=e+t||e?new java.lang.String(i,e,t)+"":i}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\\w+/g,function(i){ns.prototype[i]=function(){return null}});function rs(i,e){i.currentElement?i.currentElement.appendChild(e):i.doc.appendChild(e)}function _y(i){if(i==="error")throw"onErrorStopParsing"}function Iy(){throw"onWarningStopParsing"}$i.__DOMHandler=ns;$i.DOMParser=Dc;$i.normalizeLineEndings=Sc;$i.onErrorStopParsing=_y;$i.onWarningStopParsing=Iy});var xc=St(G=>{"use strict";var Vi=ii();G.assign=Vi.assign;G.hasDefaultHTMLNamespace=Vi.hasDefaultHTMLNamespace;G.isHTMLMimeType=Vi.isHTMLMimeType;G.isValidMimeType=Vi.isValidMimeType;G.MIME_TYPE=Vi.MIME_TYPE;G.NAMESPACE=Vi.NAMESPACE;var ss=kr();G.DOMException=ss.DOMException;G.DOMExceptionName=ss.DOMExceptionName;G.ExceptionCode=ss.ExceptionCode;G.ParseError=ss.ParseError;var de=pl();G.Attr=de.Attr;G.CDATASection=de.CDATASection;G.CharacterData=de.CharacterData;G.Comment=de.Comment;G.Document=de.Document;G.DocumentFragment=de.DocumentFragment;G.DocumentType=de.DocumentType;G.DOMImplementation=de.DOMImplementation;G.Element=de.Element;G.Entity=de.Entity;G.EntityReference=de.EntityReference;G.LiveNodeList=de.LiveNodeList;G.NamedNodeMap=de.NamedNodeMap;G.Node=de.Node;G.NodeList=de.NodeList;G.Notation=de.Notation;G.ProcessingInstruction=de.ProcessingInstruction;G.Text=de.Text;G.XMLSerializer=de.XMLSerializer;var yl=Ec();G.DOMParser=yl.DOMParser;G.onErrorStopParsing=yl.onErrorStopParsing;G.onWarningStopParsing=yl.onWarningStopParsing});var Y=class i{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=pi(this,e,t);let n=[];return this.decompose(0,e,n,2),r.length&&r.decompose(0,r.length,n,3),this.decompose(t,this.length,n,1),hi.from(n,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=pi(this,e,t);let r=[];return this.decompose(e,t,r,0),hi.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),n=new qt(this),s=new qt(e);for(let o=t,l=t;;){if(n.next(o),s.next(o),o=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(l+=n.value.length,n.done||l>=r)return!0}}iter(e=1){return new qt(this,e)}iterRange(e,t=this.length){return new Xr(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let n=this.line(e).from;r=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Jr(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?i.empty:e.length<=32?new Le(e):hi.from(Le.split(e,[]))}},Le=class i extends Y{constructor(e,t=Kc(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,n){for(let s=0;;s++){let o=this.text[s],l=n+o.length;if((t?r:l)>=e)return new fs(n,l,r,o);n=l+1,r++}}decompose(e,t,r,n){let s=e<=0&&t>=this.length?this:new i(Fl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(n&1){let o=r.pop(),l=Kr(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new i(l,o.length+s.length));else{let a=l.length>>1;r.push(new i(l.slice(0,a)),new i(l.slice(a)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof i))return super.replace(e,t,r);[e,t]=pi(this,e,t);let n=Kr(this.text,Kr(r.text,Fl(this.text,0,e)),t),s=this.length+r.length-(t-e);return n.length<=32?new i(n,s):hi.from(i.split(n,[]),s)}sliceString(e,t=this.length,r=`\n`){[e,t]=pi(this,e,t);let n="";for(let s=0,o=0;s<=t&&oe&&o&&(n+=r),es&&(n+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],n=-1;for(let s of e)r.push(s),n+=s.length+1,r.length==32&&(t.push(new i(r,n)),r=[],n=-1);return n>-1&&t.push(new i(r,n)),t}},hi=class i extends Y{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,n){for(let s=0;;s++){let o=this.children[s],l=n+o.length,a=r+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,r,n);n=l+1,r=a+1}}decompose(e,t,r,n){for(let s=0,o=0;o<=t&&s=o){let u=n&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!u?r.push(l):l.decompose(e-o,t-o,r,u)}o=a+1}}replace(e,t,r){if([e,t]=pi(this,e,t),r.lines=s&&t<=l){let a=o.replace(e-s,t-s,r),u=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>u>>6){let h=this.children.slice();return h[n]=a,new i(h,this.length-(t-e)+r.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`\n`){[e,t]=pi(this,e,t);let n="";for(let s=0,o=0;se&&s&&(n+=r),eo&&(n+=l.sliceString(e-o,t-o,r)),o=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof i))return 0;let r=0,[n,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,s+=t){if(n==o||s==l)return r;let a=this.children[n],u=e.children[s];if(a!=u)return r+a.scanIdentical(u,t);r+=a.length+1}}static from(e,t=e.reduce((r,n)=>r+n.length+1,-1)){let r=0;for(let d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new Le(d,t)}let n=Math.max(32,r>>5),s=n<<1,o=n>>1,l=[],a=0,u=-1,h=[];function c(d){let p;if(d.lines>s&&d instanceof i)for(let g of d.children)c(g);else d.lines>o&&(a>o||!a)?(f(),l.push(d)):d instanceof Le&&a&&(p=h[h.length-1])instanceof Le&&d.lines+p.lines<=32?(a+=d.lines,u+=d.length+1,h[h.length-1]=new Le(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>n&&f(),a+=d.lines,u+=d.length+1,h.push(d))}function f(){a!=0&&(l.push(h.length==1?h[0]:i.from(h,u)),u=-1,a=h.length=0)}for(let d of e)c(d);return f(),l.length==1?l[0]:new i(l,t)}};Y.empty=new Le([""],0);function Kc(i){let e=-1;for(let t of i)e+=t.length+1;return e}function Kr(i,e,t=0,r=1e9){for(let n=0,s=0,o=!0;s=t&&(a>r&&(l=l.slice(0,r-n)),n0?1:(e instanceof Le?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,n=this.nodes[r],s=this.offsets[r],o=s>>1,l=n instanceof Le?n.text.length:n.children.length;if(o==(t>0?l:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`\n`,this;e--}else if(n instanceof Le){let a=n.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=n.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof Le?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Xr=class{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new qt(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=r?n:t<0?n.slice(n.length-r):n.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},Jr=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol!="undefined"&&(Y.prototype[Symbol.iterator]=function(){return this.iter()},qt.prototype[Symbol.iterator]=Xr.prototype[Symbol.iterator]=Jr.prototype[Symbol.iterator]=function(){return this});var fs=class{constructor(e,t,r,n){this.from=e,this.to=t,this.number=r,this.text=n}get length(){return this.to-this.from}};function pi(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}var ci="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(i=>i?parseInt(i,36):1);for(let i=1;ii)return ci[e-1]<=i;return!1}function Hl(i){return i>=127462&&i<=127487}var $l=8205;function Ze(i,e,t=!0,r=!0){return(t?jl:Xc)(i,e,r)}function jl(i,e,t){if(e==i.length)return e;e&&Gl(i.charCodeAt(e))&&Kl(i.charCodeAt(e-1))&&e--;let r=Yr(i,e);for(e+=ds(r);e=0&&Hl(Yr(i,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function Xc(i,e,t){for(;e>0;){let r=jl(i,e-2,t);if(r=56320&&i<57344}function Kl(i){return i>=55296&&i<56320}function Yr(i,e){let t=i.charCodeAt(e);if(!Kl(t)||e+1==i.length)return t;let r=i.charCodeAt(e+1);return Gl(r)?(t-55296<<10)+(r-56320)+65536:t}function ds(i){return i<65536?1:2}var ps=/\\r\\n?|\\n/,Me=function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i}(Me||(Me={})),Ut=class i{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return s+(e-n);s+=l}else{if(r!=Me.Simple&&u>=e&&(r==Me.TrackDel&&ne||r==Me.TrackBefore&&ne))return null;if(u>e||u==e&&t<0&&!l)return e==n||t<0?s:s+a;s+=a}n=u}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return s}touchesRange(e,t=e){for(let r=0,n=0;r=0&&n<=t&&l>=e)return nt?"cover":!0;n=l}return!1}toString(){let e="";for(let t=0;t=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new i(e)}static create(e){return new i(e)}},_e=class i extends Ut{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return gs(this,(t,r,n,s,o)=>e=e.replace(n,n+(r-t),o),!1),e}mapDesc(e,t=!1){return ms(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let n=0,s=0;n=0){t[n]=l,t[n+1]=o;let a=n>>1;for(;r.length0&&Dt(r,t,s.text),s.forward(h),l+=h}let u=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,r){let n=[],s=[],o=0,l=null;function a(h=!1){if(!h&&!n.length)return;of||c<0||f>t)throw new RangeError(`Invalid change range ${c} to ${f} (in doc of length ${t})`);let p=d?typeof d=="string"?Y.of(d.split(r||ps)):d:Y.empty,g=p.length;if(c==f&&g==0)return;co&&De(n,c-o,-1),De(n,f-c,g),Dt(s,n,p),o=f}}return u(e),a(!l),l}static empty(e){return new i(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let n=0;nl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length=0&&t<=0&&t==i[n+1]?i[n]+=e:e==0&&i[n]==0?i[n+1]+=t:r?(i[n]+=e,i[n+1]+=t):i.push(e,t)}function Dt(i,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||o==i.sections.length||i.sections[o+1]<0);)l=i.sections[o++],a=i.sections[o++];e(n,u,s,h,c),n=u,s=h}}}function ms(i,e,t,r=!1){let n=[],s=r?[]:null,o=new Wt(i),l=new Wt(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let u=Math.min(o.len,l.len);De(n,u,-1),o.forward(u),l.forward(u)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let u=0,h=o.len;for(;h;)if(l.ins==-1){let c=Math.min(h,l.len);u+=c,h-=c,l.forward(c)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||r.length>u),s.forward2(a),o.forward(a)}}}}var Wt=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Y.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Y.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},ui=class i{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,n;return this.empty?r=n=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),r==this.from&&n==this.to?this:new i(r,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return P.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return P.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return P.range(e.anchor,e.head)}static create(e,t,r){return new i(e,t,r)}},P=class i{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:i.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new i(e.ranges.map(t=>ui.fromJSON(t)),e.main)}static single(e,t=e){return new i([i.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,n=0;ne?8:0)|s)}static normalized(e,t=0){let r=e[t];e.sort((n,s)=>n.from-s.from),t=e.indexOf(r);for(let n=1;ns.head?i.range(a,l):i.range(l,a))}}return new i(e,t)}};function Xl(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}var xs=0,$=class i{constructor(e,t,r,n,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=n,this.id=xs++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new i(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:Ts),!!e.static,e.enables)}of(e){return new fi([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can\'t compute a static facet");return new fi(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can\'t compute a static facet");return new fi(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}};function Ts(i,e){return i==e||i.length==e.length&&i.every((t,r)=>t===e[r])}var fi=class{constructor(e,t,r,n){this.dependencies=e,this.facet=t,this.type=r,this.value=n,this.id=xs++}dynamicSlot(e){var t;let r=this.value,n=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,u=!1,h=[];for(let c of this.dependencies)c=="doc"?a=!0:c=="selection"?u=!0:((t=e[c.id])!==null&&t!==void 0?t:1)&1||h.push(e[c.id]);return{create(c){return c.values[o]=r(c),1},update(c,f){if(a&&f.docChanged||u&&(f.docChanged||f.selection)||ys(c,h)){let d=r(c);if(l?!Vl(d,c.values[o],n):!n(d,c.values[o]))return c.values[o]=d,1}return 0},reconfigure:(c,f)=>{let d,p=f.config.address[s];if(p!=null){let g=tn(f,p);if(this.dependencies.every(y=>y instanceof $?f.facet(y)===c.facet(y):y instanceof gt?f.field(y,!1)==c.field(y,!1):!0)||(l?Vl(d=r(c),g,n):n(d=r(c),g)))return c.values[o]=g,0}else d=r(c);return c.values[o]=d,1}}}};function Vl(i,e,t){if(i.length!=e.length)return!1;for(let r=0;ri[a.id]),n=t.map(a=>a.type),s=r.filter(a=>!(a&1)),o=i[e.id]>>1;function l(a){let u=[];for(let h=0;hr===n),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(ql).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,n)=>{let s=r.values[t],o=this.updateF(s,n);return this.compareF(s,o)?0:(r.values[t]=o,1)},reconfigure:(r,n)=>n.config.address[this.id]!=null?(r.values[t]=n.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,ql.of({field:this,create:e})]}get extension(){return this}},$t={lowest:4,low:3,default:2,high:1,highest:0};function zi(i){return e=>new Qr(e,i)}var nn={highest:zi($t.highest),high:zi($t.high),default:zi($t.default),low:zi($t.low),lowest:zi($t.lowest)},Qr=class{constructor(e,t){this.inner=e,this.prec=t}},Zr=class i{of(e){return new Gi(this,e)}reconfigure(e){return i.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}},Gi=class{constructor(e,t){this.compartment=e,this.inner=t}},en=class i{constructor(e,t,r,n,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=n,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let n=[],s=Object.create(null),o=new Map;for(let f of Qc(e,t,o))f instanceof gt?n.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let l=Object.create(null),a=[],u=[];for(let f of n)l[f.id]=u.length<<1,u.push(d=>f.slot(d));let h=r==null?void 0:r.config.facets;for(let f in s){let d=s[f],p=d[0].facet,g=h&&h[f]||[];if(d.every(y=>y.type==0))if(l[p.id]=a.length<<1|1,Ts(g,d))a.push(r.facet(p));else{let y=p.combine(d.map(b=>b.value));a.push(r&&p.compare(y,r.facet(p))?r.facet(p):y)}else{for(let y of d)y.type==0?(l[y.id]=a.length<<1|1,a.push(y.value)):(l[y.id]=u.length<<1,u.push(b=>y.dynamicSlot(b)));l[p.id]=u.length<<1,u.push(y=>Jc(y,p,d))}}let c=u.map(f=>f(l));return new i(e,o,c,l,a,s)}};function Qc(i,e,t){let r=[[],[],[],[],[]],n=new Map;function s(o,l){let a=n.get(o);if(a!=null){if(a<=l)return;let u=r[a].indexOf(o);u>-1&&r[a].splice(u,1),o instanceof Gi&&t.delete(o.compartment)}if(n.set(o,l),Array.isArray(o))for(let u of o)s(u,l);else if(o instanceof Gi){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;t.set(o.compartment,u),s(u,l)}else if(o instanceof Qr)s(o.inner,o.prec);else if(o instanceof gt)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof fi)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,$t.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,l)}}return s(i,$t.default),r.reduce((o,l)=>o.concat(l))}function ji(i,e){if(e&1)return 2;let t=e>>1,r=i.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;i.status[t]=4;let n=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|n}function tn(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}var Jl=$.define(),bs=$.define({combine:i=>i.some(e=>e),static:!0}),Ql=$.define({combine:i=>i.length?i[0]:void 0,static:!0}),Zl=$.define(),ea=$.define(),ta=$.define(),ia=$.define({combine:i=>i.length?i[0]:!1}),mt=class{constructor(e,t){this.type=e,this.value=t}static define(){return new vs}},vs=class{of(e){return new mt(this,e)}},ws=class{constructor(e){this.map=e}of(e){return new se(this,e)}},se=class i{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new i(this.type,t)}is(e){return this.type==e}static define(e={}){return new ws(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let n of e){let s=n.map(t);s&&r.push(s)}return r}};se.reconfigure=se.define();se.appendConfig=se.define();var Re=class i{constructor(e,t,r,n,s,o){this.startState=e,this.changes=t,this.selection=r,this.effects=n,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&Xl(r,t.newLength),s.some(l=>l.type==i.time)||(this.annotations=s.concat(i.time.of(Date.now())))}static create(e,t,r,n,s,o){return new i(e,t,r,n,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(i.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}};Re.time=mt.define();Re.userEvent=mt.define();Re.addToHistory=mt.define();Re.remote=mt.define();function Zc(i,e){let t=[];for(let r=0,n=0;;){let s,o;if(r=i[r]))s=i[r++],o=i[r++];else if(n=0;n--){let s=r[n](i);s instanceof Re?i=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Re?i=s[0]:i=na(e,di(s),!1)}return i}function tf(i){let e=i.startState,t=e.facet(ta),r=i;for(let n=t.length-1;n>=0;n--){let s=t[n](i);s&&Object.keys(s).length&&(r=ra(r,As(e,s,i.changes.newLength),!0))}return r==i?i:Re.create(e,i.changes,i.selection,r.effects,r.annotations,r.scrollIntoView)}var rf=[];function di(i){return i==null?rf:Array.isArray(i)?i:[i]}var Qe=function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i}(Qe||(Qe={})),nf=/[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/,Cs;try{Cs=new RegExp("[\\\\p{Alphabetic}\\\\p{Number}_]","u")}catch(i){}function sf(i){if(Cs)return Cs.test(i);for(let e=0;e"\\x80"&&(t.toUpperCase()!=t.toLowerCase()||nf.test(t)))return!0}return!1}function of(i){return e=>{if(!/\\S/.test(e))return Qe.Space;if(sf(e))return Qe.Word;for(let t=0;t-1)return Qe.Word;return Qe.Other}}var oe=class i{constructor(e,t,r,n,s,o){this.config=e,this.doc=t,this.selection=r,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;ln.set(u,a)),t=null),n.set(l.value.compartment,l.value.extension)):l.is(se.reconfigure)?(t=null,r=l.value):l.is(se.appendConfig)&&(t=null,r=di(r).concat(l.value));let s;t?s=e.startState.values.slice():(t=en.resolve(r,n,this),s=new i(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,u)=>u.reconfigure(a,this),null).values);let o=e.startState.facet(bs)?e.newSelection:e.newSelection.asSingle();new i(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:P.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),n=this.changes(r.changes),s=[r.range],o=di(r.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return i.create({doc:e.doc,selection:P.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=en.resolve(e.extensions||[],new Map),r=e.doc instanceof Y?e.doc:Y.of((e.doc||"").split(t.staticFacet(i.lineSeparator)||ps)),n=e.selection?e.selection instanceof P?e.selection:P.single(e.selection.anchor,e.selection.head):P.single(0);return Xl(n,r.length),t.staticFacet(bs)||(n=n.asSingle()),new i(t,r,n,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(i.tabSize)}get lineBreak(){return this.facet(i.lineSeparator)||`\n`}get readOnly(){return this.facet(ia)}phrase(e,...t){for(let r of this.facet(i.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\\$(\\$|\\d*)/g,(r,n)=>{if(n=="$")return"$";let s=+(n||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let n=[];for(let s of this.facet(Jl))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&n.push(o[e]);return n}charCategorizer(e){return of(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:n}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let a=Ze(t,o,!1);if(s(t.slice(a,o))!=Qe.Word)break;o=a}for(;li.length?i[0]:4});oe.lineSeparator=Ql;oe.readOnly=ia;oe.phrases=$.define({compare(i,e){let t=Object.keys(i),r=Object.keys(e);return t.length==r.length&&t.every(n=>i[n]==e[n])}});oe.languageData=Jl;oe.changeFilter=Zl;oe.transactionFilter=ea;oe.transactionExtender=ta;Zr.reconfigure=se.define();var yt=class{eq(e){return this==e}range(e,t=e){return Ki.create(e,t,this)}};yt.prototype.startSide=yt.prototype.endSide=0;yt.prototype.point=!1;yt.prototype.mapMode=Me.TrackDel;var Ki=class i{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new i(e,t,r)}};function Ss(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}var Ds=class i{constructor(e,t,r,n){this.from=e,this.to=t,this.value=r,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,n=0){let s=r?this.to:this.from;for(let o=n,l=s.length;;){if(o==l)return o;let a=o+l>>1,u=s[a]-e||(r?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return u>=0?o:l;u>=0?l=a:o=a+1}}between(e,t,r,n){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);sd||f==d&&u.startSide>0&&u.endSide<=0)continue;(d-f||u.endSide-u.startSide)<0||(o<0&&(o=f),u.point&&(l=Math.max(l,d-f)),r.push(u),n.push(f-o),s.push(d-o))}return{mapped:r.length?new i(n,s,r,l):null,pos:o}}},he=class i{constructor(e,t,r,n){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=n}static create(e,t,r,n){return new i(e,t,r,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:n=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(Ss)),this.isEmpty)return t.length?i.of(t):this;let l=new rn(this,null,-1).goto(0),a=0,u=[],h=new zt;for(;l.value||a=0){let c=t[a++];h.addInner(c.from,c.to,c.value)||u.push(c)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||sl.to||s=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Yi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Yi.from(e).goto(t)}static compare(e,t,r,n,s=-1){let o=e.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=s),l=t.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=s),a=Ul(o,l,r),u=new Vt(o,a,s),h=new Vt(l,a,s);r.iterGaps((c,f,d)=>Wl(u,c,h,f,d,n)),r.empty&&r.length==0&&Wl(u,0,h,0,0,n)}static eq(e,t,r=0,n){n==null&&(n=999999999);let s=e.filter(h=>!h.isEmpty&&t.indexOf(h)<0),o=t.filter(h=>!h.isEmpty&&e.indexOf(h)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=Ul(s,o),a=new Vt(s,l,0).goto(r),u=new Vt(o,l,0).goto(r);for(;;){if(a.to!=u.to||!Es(a.active,u.active)||a.point&&(!u.point||!a.point.eq(u.point)))return!1;if(a.to>n)return!0;a.next(),u.next()}}static spans(e,t,r,n,s=-1){let o=new Vt(e,null,s).goto(t),l=t,a=o.openStart;for(;;){let u=Math.min(o.to,r);if(o.point){let h=o.activeForPoint(o.to),c=o.pointFroml&&(n.span(l,u,o.active,a),a=o.openEnd(u));if(o.to>r)return a+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,t=!1){let r=new zt;for(let n of e instanceof Ki?[e]:t?lf(e):e)r.add(n.from,n.to,n.value);return r.finish()}static join(e){if(!e.length)return i.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let n=e[r];n!=i.empty;n=n.nextLayer)t=new i(n.chunkPos,n.chunk,t,Math.max(n.maxPoint,t.maxPoint));return t}};he.empty=new he([],[],null,-1);function lf(i){if(i.length>1)for(let e=i[0],t=1;t0)return i.slice().sort(Ss);e=r}return i}he.empty.nextLayer=he.empty;var zt=class i{finishChunk(e){this.chunks.push(new Ds(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new i)).add(e,t,r)}addInner(e,t,r){let n=e-this.lastTo||r.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return n<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(he.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=he.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function Ul(i,e,t){let r=new Map;for(let s of i)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&n.push(new rn(o,t,r,s));return n.length==1?n[0]:new i(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)cs(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)cs(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),cs(this.heap,0)}}};function cs(i,e){for(let t=i[e];;){let r=(e<<1)+1;if(r>=i.length)break;let n=i[r];if(r+1=0&&(n=i[r+1],r++),t.compare(n)<0)break;i[r]=t,i[e]=n,e=r}}var Vt=class{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yi.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){jr(this.active,e),jr(this.activeTo,e),jr(this.activeRank,e),this.minActive=zl(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:n,rank:s}=this.cursor;for(;t0;)t++;Gr(this.active,t,r),Gr(this.activeTo,t,n),Gr(this.activeRank,t,s),e&&Gr(e,t,this.cursor.from),this.minActive=zl(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),r&&jr(r,n)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[n]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}};function Wl(i,e,t,r,n,s){i.goto(e),t.goto(r);let o=r+n,l=r,a=r-e;for(;;){let u=i.to+a-t.to||i.endSide-t.endSide,h=u<0?i.to+a:t.to,c=Math.min(h,o);if(i.point||t.point?i.point&&t.point&&(i.point==t.point||i.point.eq(t.point))&&Es(i.activeForPoint(i.to),t.activeForPoint(t.to))||s.comparePoint(l,c,i.point,t.point):c>l&&!Es(i.active,t.active)&&s.compareRange(l,c,i.active,t.active),h>o)break;l=h,u<=0&&i.next(),u>=0&&t.next()}}function Es(i,e){if(i.length!=e.length)return!1;for(let t=0;t=e;r--)i[r+1]=i[r];i[e]=t}function zl(i,e){let t=-1,r=1e9;for(let n=0;n=e)return n;if(n==i.length)break;s+=i.charCodeAt(n)==9?t-s%t:1,n=Ze(i,n)}return r===!0?-1:i.length}var ks="\\u037C",oa=typeof Symbol=="undefined"?"__"+ks:Symbol.for(ks),Ms=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),la=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{},He=class{constructor(e,t){this.rules=[];let{finish:r}=t||{};function n(o){return/^@/.test(o)?[o]:o.split(/,\\s*/)}function s(o,l,a,u){let h=[],c=/^@(\\w+)\\b/.exec(o[0]),f=c&&c[1]=="keyframes";if(c&&l==null)return a.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))s(d.split(/,\\s*/).map(g=>o.map(y=>g.replace(/&/,y))).reduce((g,y)=>g.concat(y)),p,a);else if(p&&typeof p=="object"){if(!c)throw new RangeError("The value of a property ("+d+") should be a primitive value.");s(n(d),p,h,f)}else p!=null&&h.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(h.length||f)&&a.push((r&&!c&&!u?o.map(r):o).join(", ")+" {"+h.join(" ")+"}")}for(let o in e)s(n(o),e[o],this.rules)}getRules(){return this.rules.join(`\n`)}static newName(){let e=la[oa]||1;return la[oa]=e+1,ks+e.toString(36)}static mount(e,t,r){let n=e[Ms],s=r&&r.nonce;n?s&&n.setNonce(s):n=new Rs(e,s),n.mount(Array.isArray(t)?t:[t],e)}},aa=new Map,Rs=class{constructor(e,t){let r=e.ownerDocument||e,n=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let s=aa.get(r);if(s)return e[Ms]=s;this.sheet=new n.CSSStyleSheet,aa.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Ms]=this}mount(e,t){let r=this.sheet,n=0,s=0;for(let o=0;o-1&&(this.modules.splice(a,1),s--,a=-1),a==-1){if(this.modules.splice(s++,0,l),r)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:\'"\'},Db=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),Eb=typeof navigator!="undefined"&&/MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);for(ce=0;ce<10;ce++)jt[48+ce]=jt[96+ce]=String(ce);var ce;for(ce=1;ce<=24;ce++)jt[ce+111]="F"+ce;var ce;for(ce=65;ce<=90;ce++)jt[ce]=String.fromCharCode(ce+32),on[ce]=String.fromCharCode(ce);var ce;for(sn in jt)on.hasOwnProperty(sn)||(on[sn]=jt[sn]);var sn;function sr(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function Ls(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function hf(i){let e=i.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function pn(i,e){if(!e.anchorNode)return!1;try{return Ls(i,e.anchorNode)}catch(t){return!1}}function or(i){return i.nodeType==3?Yt(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function er(i,e,t,r){return t?ua(i,e,t,r,-1)||ua(i,e,t,r,1):!1}function Kt(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function yn(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\\d|SECTION|PRE)$/.test(i.nodeName)}function ua(i,e,t,r,n){for(;;){if(i==t&&e==r)return!0;if(e==(n<0?0:bt(i))){if(i.nodeName=="DIV")return!1;let s=i.parentNode;if(!s||s.nodeType!=1)return!1;e=Kt(i)+(n<0?0:1),i=s}else if(i.nodeType==1){if(i=i.childNodes[e+(n<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=n<0?bt(i):0}else return!1}}function bt(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function kn(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function cf(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function $a(i,e){let t=e.width/i.offsetWidth,r=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-i.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function ff(i,e,t,r,n,s,o,l){let a=i.ownerDocument,u=a.defaultView||window;for(let h=i,c=!1;h&&!c;)if(h.nodeType==1){let f,d=h==a.body,p=1,g=1;if(d)f=cf(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(c=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let A=h.getBoundingClientRect();({scaleX:p,scaleY:g}=$a(h,A)),f={left:A.left,right:A.left+h.clientWidth*p,top:A.top,bottom:A.top+h.clientHeight*g}}let y=0,b=0;if(n=="nearest")e.top0&&e.bottom>f.bottom+b&&(b=e.bottom-f.bottom+b+o)):e.bottom>f.bottom&&(b=e.bottom-f.bottom+o,t<0&&e.top-b0&&e.right>f.right+y&&(y=e.right-f.right+y+s)):e.right>f.right&&(y=e.right-f.right+s,t<0&&e.leftn.clientHeight&&(r=n),!t&&n.scrollWidth>n.clientWidth&&(t=n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;return{x:t,y:r}}var _s=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?bt(t):0),r,Math.min(e.focusOffset,r?bt(r):0))}set(e,t,r,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=n}},gi=null;function Va(i){if(i.setActive)return i.setActive();if(gi)return i.focus(gi);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus(gi==null?{get preventScroll(){return gi={preventScroll:!0},!0}}:void 0),!gi){gi=!1;for(let t=0;tMath.max(1,i.scrollHeight-i.clientHeight-4)}function Wa(i,e){for(let t=i,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=bt(t)}else if(t.parentNode&&!yn(t))r=Kt(t),t=t.parentNode;else return null}}function za(i,e){for(let t=i,r=e;;){if(t.nodeType==3&&rt)return c.domBoundsAround(e,t,u);if(f>=e&&n==-1&&(n=a,s=u),u>t&&c.dom.parentNode==this.dom){o=a,l=h;break}h=f,u=f+c.breakAfter}return{from:s,to:l<0?r+this.length:l,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=co){this.markDirty();for(let n=e;nthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}};function ja(i,e,t,r,n,s,o,l,a){let{children:u}=i,h=u.length?u[e]:null,c=s.length?s[s.length-1]:null,f=c?c.breakAfter:o;if(!(e==r&&h&&!o&&!f&&s.length<2&&h.merge(t,n,s.length?c:null,t==0,l,a))){if(r0&&(!o&&s.length&&h.merge(t,h.length,s[0],!1,l,0)?h.breakAfter=s.shift().breakAfter:(t2),R={mac:pa||/Mac/.test(Ne.platform),windows:/Win/.test(Ne.platform),linux:/Linux|X11/.test(Ne.platform),ie:Mn,ie_version:Ka?Is.documentMode||6:Hs?+Hs[1]:Fs?+Fs[1]:0,gecko:fa,gecko_version:fa?+(/Firefox\\/(\\d+)/.exec(Ne.userAgent)||[0,0])[1]:0,chrome:!!Ns,chrome_version:Ns?+Ns[1]:0,ios:pa,android:/Android\\b/.test(Ne.userAgent),webkit:da,safari:Ya,webkit_version:da?+(/\\bAppleWebKit\\/(\\d+)/.exec(Ne.userAgent)||[0,0])[1]:0,tabSize:Is.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"},mf=256,st=class i extends ee{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof i)||this.length-(t-e)+r.length>mf||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new i(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new xe(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return yf(this.dom,e,t)}},Tt=class i extends ee{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let n of t)n.setParent(this)}setAttrs(e){if(qa(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,n,s,o){return r&&(!(r instanceof i&&r.mark.eq(this.mark))||e&&s<=0||te&&t.push(r=e&&(n=s),r=a,s++}let o=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new i(this.mark,t,o)}domAtPos(e){return Xa(this,e)}coordsAt(e,t){return Qa(this,e,t)}};function yf(i,e,t){let r=i.nodeValue.length;e>r&&(e=r);let n=e,s=e,o=0;e==0&&t<0||e==r&&t>=0?R.chrome||R.gecko||(e?(n--,o=1):s=0)?0:l.length-1];return R.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,u=>u.width)||a),o?kn(a,o<0):a||null}var vn=class i extends ee{static create(e,t,r){return new i(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=i.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,n,s,o){return r&&(!(r instanceof i)||!this.widget.compare(r.widget)||e>0&&s<=0||t0)?xe.before(this.dom):xe.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?n.length-1:0;s=n[l],!(e>0?l==0:l==n.length-1||s.top0?xe.before(this.dom):xe.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Y.empty}get isHidden(){return!0}};st.prototype.children=vn.prototype.children=lr.prototype.children=co;function Xa(i,e){let t=i.dom,{children:r}=i,n=0;for(let s=0;ns&&e0;s--){let o=r[s-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let s=n;s0&&e instanceof Tt&&n.length&&(r=n[n.length-1])instanceof Tt&&r.mark.eq(e.mark)?Ja(r,e.children[0],t-1):(n.push(e),e.setParent(i)),i.length+=e.length}function Qa(i,e,t){let r=null,n=-1,s=null,o=-1;function l(u,h){for(let c=0,f=0;c=h&&(d.children.length?l(d,h-f):(!s||s.isHidden&&t>0)&&(p>h||f==p&&d.getSide()>0)?(s=d,o=h-f):(f-1?1:0)!=n.length-(t&&n.indexOf(t)>-1?1:0))return!1;for(let s of r)if(s!=t&&(n.indexOf(s)==-1||i[s]!==e[s]))return!1;return!0}function Vs(i,e,t){let r=!1;if(e)for(let n in e)t&&n in t||(r=!0,n=="style"?i.style.cssText="":i.removeAttribute(n));if(t)for(let n in t)e&&e[n]==t[n]||(r=!0,n=="style"?i.style.cssText=t[n]:i.setAttribute(n,t[n]));return r}function vf(i){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new kt(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,n;if(e.isBlockGap)r=-5e8,n=4e8;else{let{start:s,end:o}=Za(e,t);r=(s?t?-3e8:-1:5e8)-1,n=(o?t?2e8:1:-6e8)+1}return new kt(e,r,n,t,e.widget||null,!0)}static line(e){return new ur(e)}static set(e,t=!1){return he.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};le.none=he.empty;var ar=class i extends le{constructor(e){let{start:t,end:r}=Za(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof i&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&wn(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}};ar.prototype.point=!1;var ur=class i extends le{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof i&&this.spec.class==e.spec.class&&wn(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}};ur.prototype.mapMode=Me.TrackBefore;ur.prototype.point=!0;var kt=class i extends le{constructor(e,t,r,n,s,o){super(t,r,s,e),this.block=n,this.isReplace=o,this.mapMode=n?t<=0?Me.TrackBefore:Me.TrackAfter:Me.TrackDel}get type(){return this.startSide!=this.endSide?rt.WidgetRange:this.startSide<=0?rt.WidgetBefore:rt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof i&&wf(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}};kt.prototype.point=!0;function Za(i,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=i;return t==null&&(t=i.inclusive),r==null&&(r=i.inclusive),{start:t!=null?t:e,end:r!=null?r:e}}function wf(i,e){return i==e||!!(i&&e&&i.compare(e))}function qs(i,e,t,r=0){let n=t.length-1;n>=0&&t[n]+r>=i?t[n]=Math.max(t[n],e):t.push(i,e)}var we=class i extends ee{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,n,s,o){if(r){if(!(r instanceof i))return!1;this.dom||r.transferDOM(this)}return n&&this.setDeco(r?r.attrs:null),Ga(this,e,t,r?r.children.slice():[],s,o),!0}split(e){let t=new i;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:n}=this.childPos(e);n&&(t.append(this.children[r].split(n),0),this.children[r].merge(n,this.children[r].length,null,!1,0,0),r++);for(let s=r;s0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){wn(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Ja(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$s(t,this.attrs||{})),r&&(this.attrs=$s({class:r},this.attrs||{}))}domAtPos(e){return Xa(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(qa(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Vs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&&ee.get(n)instanceof Tt;)n=n.lastChild;if(!n||!this.length||n.nodeName!="BR"&&((r=ee.get(n))===null||r===void 0?void 0:r.isEditable)==!1&&(!R.ios||!this.children.some(s=>s instanceof st))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof st)||/[^ -~]/.test(r.text))return null;let n=or(r.dom);if(n.length!=1)return null;e+=n[0].width,t=n[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=Qa(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:n}=this.parent.view.viewState,s=r.bottom-r.top;if(Math.abs(s-n.lineHeight)<2&&n.textHeight=t){if(s instanceof i)return s;if(o>t)break}n=o+s.breakAfter}return null}},Gt=class i extends ee{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,n,s,o){return r&&(!(r instanceof i)||!this.widget.compare(r.widget)||e>0&&s<=0||t0}},hr=class extends bi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},tr=class i{constructor(e,t,r,n){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Gt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new we),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ln(new lr(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Gt)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(ln(new st(this.text.slice(this.textOff,this.textOff+n)),t),r),this.atCursorPos=!0,this.textOff+=n,e-=n,r=0}}span(e,t,r,n){this.buildText(t-e,r,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,r,n,s,o){if(this.disallowBlockEffectsFor[o]&&r instanceof kt){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(r instanceof kt)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Gt(r.widget||Mt.block,l,r));else{let a=vn.create(r.widget||Mt.inline,l,l?0:r.startSide),u=this.atCursorPos&&!a.isEditable&&s<=n.length&&(e0),h=!a.isEditable&&(en.length||r.startSide<=0),c=this.getLine();this.pendingBuffer==2&&!u&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(n),u&&(c.append(ln(new lr(1),n),s),s=n.length+Math.max(0,s-n.length)),c.append(ln(a,n),s),this.atCursorPos=h,this.pendingBuffer=h?en.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,r,n,s){let o=new i(e,t,r,s);return o.openEnd=he.spans(n,t,r,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}};function ln(i,e){for(let t of e)i=new Tt(t,[i],i.length);return i}var Mt=class extends bi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};Mt.inline=new Mt("span");Mt.block=new Mt("div");var me=function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i}(me||(me={})),Xt=me.LTR,fo=me.RTL;function eu(i){let e=[];for(let t=0;t=t){if(l.level==r)return o;(s<0||(n!=0?n<0?l.fromt:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}};function iu(i,e){if(i.length!=e.length)return!1;for(let t=0;t=0;g-=3)if(et[g+1]==-d){let y=et[g+2],b=y&2?n:y&4?y&1?s:n:0;b&&(Z[c]=Z[et[g]]=b),l=g;break}}else{if(et.length==189)break;et[l++]=c,et[l++]=f,et[l++]=a}else if((p=Z[c])==2||p==1){let g=p==n;a=g?0:1;for(let y=l-3;y>=0;y-=3){let b=et[y+2];if(b&2)break;if(g)et[y+2]|=2;else{if(b&4)break;et[y+2]|=4}}}}}function xf(i,e,t,r){for(let n=0,s=r;n<=t.length;n++){let o=n?t[n-1].to:i,l=na;)p==y&&(p=t[--g].from,y=g?t[g-1].to:i),Z[--p]=d;a=h}else s=u,a++}}}function Ws(i,e,t,r,n,s,o){let l=r%2?2:1;if(r%2==n%2)for(let a=e,u=0;aa&&o.push(new it(a,g.from,d));let y=g.direction==Xt!=!(d%2);zs(i,y?r+1:r,n,g.inner,g.from,g.to,o),a=g.to}p=g.to}else{if(p==t||(h?Z[p]!=l:Z[p]==l))break;p++}f?Ws(i,a,p,r+1,n,f,o):ae;){let h=!0,c=!1;if(!u||a>s[u-1].to){let g=Z[a-1];g!=l&&(h=!1,c=g==16)}let f=!h&&l==1?[]:null,d=h?r:r+1,p=a;e:for(;;)if(u&&p==s[u-1].to){if(c)break e;let g=s[--u];if(!h)for(let y=g.from,b=u;;){if(y==e)break e;if(b&&s[b-1].to==y)y=s[--b].from;else{if(Z[y-1]==l)break e;break}}if(f)f.push(g);else{g.toZ.length;)Z[Z.length]=256;let r=[],n=e==Xt?0:1;return zs(i,n,n,t,0,i.length,r),r}function ru(i){return[new it(0,i,0)]}var nu="";function kf(i,e,t,r,n){var s;let o=r.head-i.from,l=it.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),a=e[l],u=a.side(n,t);if(o==u){let f=l+=n?1:-1;if(f<0||f>=e.length)return null;a=e[l=f],o=a.side(!n,t),u=a.side(n,t)}let h=Ze(i.text,o,a.forward(n,t));(ha.to)&&(h=u),nu=i.text.slice(Math.min(o,h),Math.max(o,h));let c=l==(n?e.length-1:0)?null:e[l+(n?1:-1)];return c&&h==u&&c.level+(n?0:1)i.some(e=>e)}),Rf=$.define({combine:i=>i.some(e=>e)}),fu=$.define(),ir=class i{constructor(e,t="nearest",r="nearest",n=5,s=5,o=!1){this.range=e,this.y=t,this.x=r,this.yMargin=n,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new i(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new i(P.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},an=se.define({map:(i,e)=>i.map(e)}),du=se.define();function ze(i,e,t){let r=i.facet(au);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}var Et=$.define({combine:i=>i.length?i[0]:!0}),Nf=0,Xi=$.define(),Jt=class i{constructor(e,t,r,n,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=n,this.extension=s(this)}static define(e,t){let{eventHandlers:r,eventObservers:n,provide:s,decorations:o}=t||{};return new i(Nf++,e,r,n,l=>{let a=[Xi.of(l)];return o&&a.push(cr.of(u=>{let h=u.plugin(l);return h?o(h):le.none})),s&&a.push(s(l)),a})}static fromClass(e,t){return i.define(r=>new e(r),t)}},rr=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(ze(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(n){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){ze(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){ze(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},pu=$.define(),mo=$.define(),cr=$.define(),gu=$.define(),yo=$.define(),mu=$.define();function ma(i,e){let t=i.state.facet(mu);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(i):s),n=[];return he.spans(r,e.from,e.to,{point(){},span(s,o,l,a){let u=s-e.from,h=o-e.from,c=n;for(let f=l.length-1;f>=0;f--,a--){let d=l[f].spec.bidiIsolate,p;if(d==null&&(d=Mf(e.text,u,h)),a>0&&c.length&&(p=c[c.length-1]).to==u&&p.direction==d)p.to=h,c=p.inner;else{let g={from:u,to:h,direction:d,inner:[]};c.push(g),c=g.inner}}}}),n}var yu=$.define();function bu(i){let e=0,t=0,r=0,n=0;for(let s of i.state.facet(yu)){let o=s(i);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(n=Math.max(n,o.bottom)))}return{left:e,right:t,top:r,bottom:n}}var Ji=$.define(),nt=class i{constructor(e,t,r,n){this.fromA=e,this.toA=t,this.fromB=r,this.toB=n}join(e){return new i(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>r.toA)){if(n.toAh)break;s+=2}if(!a)return r;new i(a.fromA,a.toA,a.fromB,a.toB).addToSet(r),o=a.toA,l=a.toB}}},An=class i{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=_e.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let n=[];this.changes.iterChangedRanges((s,o,l,a)=>n.push(new nt(s,o,l,a))),this.changedRanges=n}static create(e,t,r){return new i(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Cn=class extends ee{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=le.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new we],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new nt(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:h})=>hthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?n=this.domChanged.newSel.head:!Ff(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let s=n>-1?Bf(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:h}=this.hasComposition;r=new nt(u,h,e.changes.mapPos(u,-1),e.changes.mapPos(h,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(R.ie||R.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=_f(o,l,e.changes);return r=nt.extendWithRanges(r,a),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:n}=this.view;n.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=R.chrome||R.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||n.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?n[o]:null;if(!l)break;let{fromA:a,toA:u,fromB:h,toB:c}=l,f,d,p,g;if(r&&r.range.fromBh){let E=tr.build(this.view.state.doc,h,r.range.fromB,this.decorations,this.dynamicDecorationMap),S=tr.build(this.view.state.doc,r.range.toB,c,this.decorations,this.dynamicDecorationMap);d=E.breakAtStart,p=E.openStart,g=S.openEnd;let N=this.compositionView(r);S.breakAtStart?N.breakAfter=1:S.content.length&&N.merge(N.length,N.length,S.content[0],!1,S.openStart,0)&&(N.breakAfter=S.content[0].breakAfter,S.content.shift()),E.content.length&&N.merge(0,0,E.content[E.content.length-1],!0,0,E.openEnd)&&E.content.pop(),f=E.content.concat(N).concat(S.content)}else({content:f,breakAtStart:d,openStart:p,openEnd:g}=tr.build(this.view.state.doc,h,c,this.decorations,this.dynamicDecorationMap));let{i:y,off:b}=s.findPos(u,1),{i:A,off:w}=s.findPos(a,-1);ja(this,A,w,y,b,f,d,p,g)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(du)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new st(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new Tt(n,[t],t.length);let r=new we;return r.append(t,0),r}fixCompositionDOM(e){let t=(s,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=ee.get(s);l&&l!=o&&(l.dom=null),o.setDOM(s)},r=this.childPos(e.range.fromB,1),n=this.children[r.i];t(e.line,n);for(let s=e.marks.length-1;s>=-1;s--)r=n.childPos(r.off,1),n=n.children[r.i],t(s>=0?e.marks[s].node:e.text,n)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,n=r==this.dom,s=!n&&pn(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(n||t||s))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),u=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(R.gecko&&l.empty&&!this.hasComposition&&Of(a)){let c=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(c,a.node.childNodes[a.offset]||null)),a=u=new xe(c,0),o=!0}let h=this.view.observer.selectionRange;(o||!h.focusNode||(!er(a.node,a.offset,h.anchorNode,h.anchorOffset)||!er(u.node,u.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,l))&&(this.view.observer.ignore(()=>{R.android&&R.chrome&&this.dom.contains(h.focusNode)&&If(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let c=sr(this.view.root);if(c)if(l.empty){if(R.gecko){let f=Pf(a.node,a.offset);if(f&&f!=3){let d=(f==1?Wa:za)(a.node,a.offset);d&&(a=new xe(d.node,d.offset))}}c.collapse(a.node,a.offset),l.bidiLevel!=null&&c.caretBidiLevel!==void 0&&(c.caretBidiLevel=l.bidiLevel)}else if(c.extend){c.collapse(a.node,a.offset);try{c.extend(u.node,u.offset)}catch(f){}}else{let f=document.createRange();l.anchor>l.head&&([a,u]=[u,a]),f.setEnd(u.node,u.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(a,u)),this.impreciseAnchor=a.precise?null:new xe(h.anchorNode,h.anchorOffset),this.impreciseHead=u.precise?null:new xe(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&er(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=sr(e.root),{anchorNode:n,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let o=we.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),u=this.coordsAt(t.head,1);if(!a||!u||a.bottom>u.top)return;let h=this.domAtPos(t.head+t.assoc);r.collapse(h.node,h.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&r.collapse(n,s)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let n=e.offset;!r&&n=0;n--){let s=ee.get(t.childNodes[n]);s instanceof we&&(r=s.domAtPos(s.length))}return r?new xe(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=ee.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;o--){let l=this.children[o],a=s-l.breakAfter,u=a-l.length;if(ae||l.covers(1))&&(!r||l instanceof we&&!(r instanceof we&&t>=0)))r=l,n=u;else if(r&&u==e&&a==e&&l instanceof Gt&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(r=null)}s=u}return r?r.coordsAt(e-n,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),n=this.children[t];if(!(n instanceof we))return null;for(;n.children.length;){let{i:l,off:a}=n.childPos(r,1);for(;;l++){if(l==n.children.length)return null;if((n=n.children[l]).length)break}r=a}if(!(n instanceof st))return null;let s=Ze(n.text,r);if(s==r)return null;let o=Yt(n.dom,r,s).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==me.LTR;for(let u=0,h=0;hn)break;if(u>=r){let d=c.dom.getBoundingClientRect();if(t.push(d.height),o){let p=c.dom.lastChild,g=p?or(p):[];if(g.length){let y=g[g.length-1],b=a?y.right-d.left:d.right-y.left;b>l&&(l=b,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?me.RTL:me.LTR}measureTextSize(){for(let s of this.children)if(s instanceof we){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),t,r,n;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=or(e.firstChild)[0];t=e.getBoundingClientRect().height,r=s?s.width/27:7,n=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new bn(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,n=0;;n++){let s=n==t.viewports.length?null:t.viewports[n],o=s?s.from-1:this.length;if(o>r){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(le.replace({widget:new hr(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return le.set(e)}updateDeco(){let e=1,t=this.view.state.facet(cr).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,n=this.view.state.facet(gu).map((s,o)=>{let l=typeof s=="function";return l&&(r=!0),l?s(this.view):s});for(n.length&&(this.dynamicDecorationMap[e++]=r,t.push(he.join(n))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),n;if(!r)return;!t.empty&&(n=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,n.left),top:Math.min(r.top,n.top),right:Math.max(r.right,n.right),bottom:Math.max(r.bottom,n.bottom)});let s=bu(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;ff(this.view.scrollDOM,o,t.head{re.from&&(t=!0)}),t}function Hf(i,e,t=1){let r=i.charCategorizer(e),n=i.doc.lineAt(e),s=e-n.from;if(n.length==0)return P.cursor(e);s==0?t=1:s==n.length&&(t=-1);let o=s,l=s;t<0?o=Ze(n.text,s,!1):l=Ze(n.text,s);let a=r(n.text.slice(o,l));for(;o>0;){let u=Ze(n.text,o,!1);if(r(n.text.slice(u,o))!=a)break;o=u}for(;li?e.left-i:Math.max(0,i-e.right)}function Vf(i,e){return e.top>i?e.top-i:Math.max(0,i-e.bottom)}function Os(i,e){return i.tope.top+1}function ya(i,e){return ei.bottom?{top:i.top,left:i.left,right:i.right,bottom:e}:i}function Gs(i,e,t){let r,n,s,o,l=!1,a,u,h,c;for(let p=i.firstChild;p;p=p.nextSibling){let g=or(p);for(let y=0;yw||o==w&&s>A){r=p,n=b,s=A,o=w;let E=w?t0?y0)}A==0?t>b.bottom&&(!h||h.bottomb.top)&&(u=p,c=b):h&&Os(h,b)?h=ba(h,b.bottom):c&&Os(c,b)&&(c=ya(c,b.top))}}if(h&&h.bottom>=t?(r=a,n=h):c&&c.top<=t&&(r=u,n=c),!r)return{node:i,offset:0};let f=Math.max(n.left,Math.min(n.right,e));if(r.nodeType==3)return va(r,f,t);if(l&&r.contentEditable!="false")return Gs(r,f,t);let d=Array.prototype.indexOf.call(i.childNodes,r)+(e>=(n.left+n.right)/2?1:0);return{node:i,offset:d}}function va(i,e,t){let r=i.nodeValue.length,n=-1,s=1e9,o=0;for(let l=0;lt?h.top-t:t-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,d=f;if((R.chrome||R.gecko)&&Yt(i,l).getBoundingClientRect().left==h.right&&(d=!f),c<=0)return{node:i,offset:l+(d?1:0)};n=l+(d?1:0),s=c}}}return{node:i,offset:n>-1?n:o>0?i.nodeValue.length:0}}function wu(i,e,t,r=-1){var n,s;let o=i.contentDOM.getBoundingClientRect(),l=o.top+i.viewState.paddingTop,a,{docHeight:u}=i.viewState,{x:h,y:c}=e,f=c-l;if(f<0)return 0;if(f>u)return i.state.doc.length;for(let E=i.viewState.heightOracle.textHeight/2,S=!1;a=i.elementAtHeight(f),a.type!=rt.Text;)for(;f=r>0?a.bottom+E:a.top-E,!(f>=0&&f<=u);){if(S)return t?null:0;S=!0,r=-r}c=l+f;let d=a.from;if(di.viewport.to)return i.viewport.to==i.state.doc.length?i.state.doc.length:t?null:wa(i,o,a,h,c);let p=i.dom.ownerDocument,g=i.root.elementFromPoint?i.root:p,y=g.elementFromPoint(h,c);y&&!i.contentDOM.contains(y)&&(y=null),y||(h=Math.max(o.left+1,Math.min(o.right-1,h)),y=g.elementFromPoint(h,c),y&&!i.contentDOM.contains(y)&&(y=null));let b,A=-1;if(y&&((n=i.docView.nearest(y))===null||n===void 0?void 0:n.isEditable)!=!1){if(p.caretPositionFromPoint){let E=p.caretPositionFromPoint(h,c);E&&({offsetNode:b,offset:A}=E)}else if(p.caretRangeFromPoint){let E=p.caretRangeFromPoint(h,c);E&&({startContainer:b,startOffset:A}=E,(!i.contentDOM.contains(b)||R.safari&&qf(b,A,h)||R.chrome&&Uf(b,A,h))&&(b=void 0))}}if(!b||!i.docView.dom.contains(b)){let E=we.find(i.docView,d);if(!E)return f>a.top+a.height/2?a.to:a.from;({node:b,offset:A}=Gs(E.dom,h,c))}let w=i.docView.nearest(b);if(!w)return null;if(w.isWidget&&((s=w.dom)===null||s===void 0?void 0:s.nodeType)==1){let E=w.dom.getBoundingClientRect();return e.yi.defaultLineHeight*1.5){let l=i.viewState.heightOracle.textHeight,a=Math.floor((n-t.top-(i.defaultLineHeight-l)*.5)/l);s+=a*i.viewState.heightOracle.lineLength}let o=i.state.sliceDoc(t.from,t.to);return t.from+sa(o,s,i.state.tabSize)}function qf(i,e,t){let r;if(i.nodeType!=3||e!=(r=i.nodeValue.length))return!1;for(let n=i.nextSibling;n;n=n.nextSibling)if(n.nodeType!=1||n.nodeName!="BR")return!1;return Yt(i,r-1,r).getBoundingClientRect().left>t}function Uf(i,e,t){if(e!=0)return!1;for(let n=i;;){let s=n.parentNode;if(!s||s.nodeType!=1||s.firstChild!=n)return!1;if(s.classList.contains("cm-line"))break;n=s}let r=i.nodeType==1?i.getBoundingClientRect():Yt(i,0,Math.max(i.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Wf(i,e){let t=i.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==rt.Text))return r}return t}function zf(i,e,t,r){let n=Wf(i,e.head),s=!r||n.type!=rt.Text||!(i.lineWrapping||n.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>n.from?e.head-1:e.head);if(s){let o=i.dom.getBoundingClientRect(),l=i.textDirectionAt(n.from),a=i.posAtCoords({x:t==(l==me.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(a!=null)return P.cursor(a,t?-1:1)}return P.cursor(t?n.to:n.from,t?-1:1)}function Aa(i,e,t,r){let n=i.state.doc.lineAt(e.head),s=i.bidiSpans(n),o=i.textDirectionAt(n.from);for(let l=e,a=null;;){let u=kf(n,s,o,l,t),h=nu;if(!u){if(n.number==(t?i.state.doc.lines:1))return l;h=`\n`,n=i.state.doc.line(n.number+(t?1:-1)),s=i.bidiSpans(n),u=i.visualLineSide(n,!t)}if(a){if(!a(h))return l}else{if(!r)return u;a=r(h)}l=u}}function jf(i,e,t){let r=i.state.charCategorizer(e),n=r(t);return s=>{let o=r(s);return n==Qe.Space&&(n=o),n==o}}function Gf(i,e,t,r){let n=e.head,s=t?1:-1;if(n==(t?i.state.doc.length:0))return P.cursor(n,e.assoc);let o=e.goalColumn,l,a=i.contentDOM.getBoundingClientRect(),u=i.coordsAtPos(n,e.assoc||-1),h=i.documentTop;if(u)o==null&&(o=u.left-a.left),l=s<0?u.top:u.bottom;else{let d=i.viewState.lineBlockAt(n);o==null&&(o=Math.min(a.right-a.left,i.defaultCharacterWidth*(n-d.from))),l=(s<0?d.top:d.bottom)+h}let c=a.left+o,f=r!=null?r:i.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=l+(f+d)*s,g=wu(i,{x:c,y:p},!1,s);if(pa.bottom||(s<0?gn)){let y=i.docView.coordsForChar(g),b=!y||p{if(e>s&&en(i)),t.from,e.head>t.from?-1:1);return r==t.from?t:P.cursor(r,rs)&&this.lineBreak(),n=o}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,n=this.lineSeparator?null:/\\r\\n?|\\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=n.exec(t))&&(s=l.index,o=l[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);r=s+o}}readNode(e){if(e.cmIgnore)return;let t=ee.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let n=r.iter();!n.next().done;)n.lineBreak?this.lineBreak():this.append(n.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(Kf(e,r.node,r.offset)?t:0))}};function Kf(i,e,t){for(;;){if(!e||t-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let l=s||o?[]:Jf(e),a=new Ks(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=Qf(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!Ls(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),u=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!Ls(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),h=e.viewport;if((R.ios||R.chrome)&&e.state.selection.main.empty&&a!=u&&(h.from>0||h.toDate.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=n.from,u=null;(s===8||R.android&&e.text.length=n.from&&t.to<=n.to&&(t.from!=n.from||t.to!=n.to)&&n.to-n.from-(t.to-t.from)<=4?t={from:n.from,to:n.to,insert:i.state.doc.slice(n.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,n.to))}:(R.mac||R.android)&&t&&t.from==t.to&&t.from==n.head-1&&/^\\. ?$/.test(t.insert.toString())&&i.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=P.single(r.main.anchor-1,r.main.head-1)),t={from:n.from,to:n.to,insert:Y.of([" "])}):R.chrome&&t&&t.from==t.to&&t.from==n.head&&t.insert.toString()==`\n `&&i.lineWrapping&&(r&&(r=P.single(r.main.anchor-1,r.main.head-1)),t={from:n.from,to:n.to,insert:Y.of([" "])}),t)return bo(i,t,r,s);if(r&&!r.main.eq(n)){let o=!1,l="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(o=!0),l=i.inputState.lastSelectionOrigin),i.dispatch({selection:r,scrollIntoView:o,userEvent:l}),!0}else return!1}function bo(i,e,t,r=-1){if(R.ios&&i.inputState.flushIOSKey(e))return!0;let n=i.state.selection.main;if(R.android&&(e.to==n.to&&(e.from==n.from||e.from==n.from-1&&i.state.sliceDoc(e.from,n.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&yi(i.contentDOM,"Enter",13)||(e.from==n.from-1&&e.to==n.to&&e.insert.length==0||r==8&&e.insert.lengthn.head)&&yi(i.contentDOM,"Backspace",8)||e.from==n.from&&e.to==n.to+1&&e.insert.length==0&&yi(i.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let o,l=()=>o||(o=Yf(i,e,t));return i.state.facet(uu).some(a=>a(i,e.from,e.to,s,l))||i.dispatch(l()),!0}function Yf(i,e,t){let r,n=i.state,s=n.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let l=s.frome.to?n.sliceDoc(e.to,s.to):"";r=n.replaceSelection(i.state.toText(l+e.insert.sliceString(0,void 0,i.state.lineBreak)+a))}else{let l=n.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(n.selection.ranges.length>1&&i.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let u=i.state.sliceDoc(e.from,e.to),h,c=t&&vu(i,t.main.head);if(c){let p=e.insert.length-(e.to-e.from);h={from:c.from,to:c.to-p}}else h=i.state.doc.lineAt(s.head);let f=s.to-e.to,d=s.to-s.from;r=n.changeByRange(p=>{if(p.from==s.from&&p.to==s.to)return{changes:l,range:a||p.map(l)};let g=p.to-f,y=g-u.length;if(p.to-p.from!=d||i.state.sliceDoc(y,g)!=u||p.to>=h.from&&p.from<=h.to)return{range:p};let b=n.changes({from:y,to:g,insert:e.insert}),A=p.to-s.to;return{changes:b,range:a?P.range(Math.max(0,a.anchor+A),Math.max(0,a.head+A)):p.map(b)}})}else r={changes:l,selection:a&&n.selection.replaceRange(a)}}let o="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,o+=".compose",i.inputState.compositionFirstChange&&(o+=".start",i.inputState.compositionFirstChange=!1)),n.update(r,{userEvent:o,scrollIntoView:!0})}function Xf(i,e,t,r){let n=Math.min(i.length,e.length),s=0;for(;s0&&l>0&&i.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let a=Math.max(0,s-Math.min(o,l));t-=o+a-s}if(o=o?s-t:0;s-=a,l=s+(l-o),o=s}else if(l=l?s-t:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function Jf(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:n,focusOffset:s}=i.observer.selectionRange;return t&&(e.push(new Sn(t,r)),(n!=t||s!=r)&&e.push(new Sn(n,s))),e}function Qf(i,e){if(i.length==0)return null;let t=i[0].pos,r=i.length==2?i[1].pos:t;return t>-1&&r>-1?P.single(t+e,r+e):null}var Xs=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,R.safari&&e.contentDOM.addEventListener("input",()=>null),R.gecko&&pd(e.contentDOM.ownerDocument)}handleEvent(e){!od(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let n of r.observers)n(this.view,t);for(let n of r.handlers){if(t.defaultPrevented)break;if(n(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Zf(e),r=this.handlers,n=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,l=r[s];l&&o!=!l.handlers.length&&(n.removeEventListener(s,this.handleEvent),l=null),l||n.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!t[s]&&n.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&td.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),R.android&&R.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return R.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Cu.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||ed.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:R.safari&&!R.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function Ca(i,e){return(t,r)=>{try{return e.call(i,r,t)}catch(n){ze(t.state,n)}}}function Zf(i){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of i){let n=r.spec;if(n&&n.domEventHandlers)for(let s in n.domEventHandlers){let o=n.domEventHandlers[s];o&&t(s).handlers.push(Ca(r.value,o))}if(n&&n.domEventObservers)for(let s in n.domEventObservers){let o=n.domEventObservers[s];o&&t(s).observers.push(Ca(r.value,o))}}for(let r in je)t(r).handlers.push(je[r]);for(let r in Ve)t(r).observers.push(Ve[r]);return e}var Cu=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ed="dthko",td=[16,17,18,20,91,92,224,225],un=6;function hn(i){return Math.max(0,i)*.7+8}function id(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}var Js=class{constructor(e,t,r,n){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=df(e.contentDOM),this.atoms=e.state.facet(yo).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(oe.allowMultipleSelections)&&rd(e,t),this.dragging=sd(e,t)&&Eu(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&id(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,n=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:n,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=bu(this.view);e.clientX-a.left<=n+un?t=-hn(n-e.clientX):e.clientX+a.right>=o-un&&(t=hn(e.clientX-o)),e.clientY-a.top<=s+un?r=-hn(s-e.clientY):e.clientY+a.bottom>=l-un&&(r=hn(e.clientY-l)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function rd(i,e){let t=i.state.facet(su);return t.length?t[0](e):R.mac?e.metaKey:e.ctrlKey}function nd(i,e){let t=i.state.facet(ou);return t.length?t[0](e):R.mac?!e.altKey:!e.ctrlKey}function sd(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let r=sr(i.root);if(!r||r.rangeCount==0)return!0;let n=r.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function od(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=ee.get(t))&&r.ignoreEvent(e))return!1;return!0}var je=Object.create(null),Ve=Object.create(null),Su=R.ie&&R.ie_version<15||R.ios&&R.webkit_version<604;function ld(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),Du(i,t.value)},50)}function Rn(i,e,t){for(let r of i.facet(e))t=r(t,i);return t}function Du(i,e){e=Rn(i.state,po,e);let{state:t}=i,r,n=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(Qs!=null&&t.selection.ranges.every(a=>a.empty)&&Qs==s.toString()){let a=-1;r=t.changeByRange(u=>{let h=t.doc.lineAt(u.from);if(h.from==a)return{range:u};a=h.from;let c=t.toText((o?s.line(n++).text:e)+t.lineBreak);return{changes:{from:h.from,insert:c},range:P.cursor(u.from+c.length)}})}else o?r=t.changeByRange(a=>{let u=s.line(n++);return{changes:{from:a.from,to:a.to,insert:u.text},range:P.cursor(a.from+u.length)}}):r=t.replaceSelection(s);i.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Ve.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft};je.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1);Ve.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")};Ve.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")};je.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of i.state.facet(lu))if(t=r(i,e),t)break;if(!t&&e.button==0&&(t=hd(i,e)),t){let r=!i.hasFocus;i.inputState.startMouseSelection(new Js(i,e,t,r)),r&&i.observer.ignore(()=>{Va(i.contentDOM);let s=i.root.activeElement;s&&!s.contains(i.contentDOM)&&s.blur()});let n=i.inputState.mouseSelection;if(n)return n.start(e),n.dragging===!1}return!1};function Sa(i,e,t,r){if(r==1)return P.cursor(e,t);if(r==2)return Hf(i.state,e,t);{let n=we.find(i.docView,e),s=i.state.doc.lineAt(n?n.posAtEnd:e),o=n?n.posAtStart:s.from,l=n?n.posAtEnd:s.to;return le>=t.top&&e<=t.bottom&&i>=t.left&&i<=t.right;function ad(i,e,t,r){let n=we.find(i.docView,e);if(!n)return 1;let s=e-n.posAtStart;if(s==0)return 1;if(s==n.length)return-1;let o=n.coordsAt(s,-1);if(o&&Da(t,r,o))return-1;let l=n.coordsAt(s,1);return l&&Da(t,r,l)?1:o&&o.bottom>=r?-1:1}function Ea(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:ad(i,t,e.clientX,e.clientY)}}var ud=R.ie&&R.ie_version<=11,xa=null,Ta=0,ka=0;function Eu(i){if(!ud)return i.detail;let e=xa,t=ka;return xa=i,ka=Date.now(),Ta=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(Ta+1)%3:1}function hd(i,e){let t=Ea(i,e),r=Eu(e),n=i.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),n=n.map(s.changes))},get(s,o,l){let a=Ea(i,s),u,h=Sa(i,a.pos,a.bias,r);if(t.pos!=a.pos&&!o){let c=Sa(i,t.pos,t.bias,r),f=Math.min(c.from,h.from),d=Math.max(c.to,h.to);h=f1&&(u=cd(n,a.pos))?u:l?n.addRange(h):P.create([h])}}}function cd(i,e){for(let t=0;t=e)return P.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}je.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let n=i.docView.nearest(e.target);if(n&&n.isWidget){let s=n.posAtStart,o=s+n.length;(s>=t.to||o<=t.from)&&(t=P.range(s,o))}}let{inputState:r}=i;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Rn(i.state,go,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};je.dragend=i=>(i.inputState.draggedContent=null,!1);function Ma(i,e,t,r){if(t=Rn(i.state,po,t),!t)return;let n=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=i.inputState,o=r&&s&&nd(i,e)?{from:s.from,to:s.to}:null,l={from:n,insert:t},a=i.state.changes(o?[o,l]:l);i.focus(),i.dispatch({changes:a,selection:{anchor:a.mapPos(n,-1),head:a.mapPos(n,1)},userEvent:o?"move.drop":"input.drop"}),i.inputState.draggedContent=null}je.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),n=0,s=()=>{++n==t.length&&Ma(i,e,r.filter(o=>o!=null).join(i.state.lineBreak),!1)};for(let o=0;o{/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(t[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Ma(i,e,r,!0),!0}return!1};je.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=Su?null:e.clipboardData;return t?(Du(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(ld(i),!1)};function fd(i,e){let t=i.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),i.focus()},50)}function dd(i){let e=[],t=[],r=!1;for(let n of i.selection.ranges)n.empty||(e.push(i.sliceDoc(n.from,n.to)),t.push(n));if(!e.length){let n=-1;for(let{from:s}of i.selection.ranges){let o=i.doc.lineAt(s);o.number>n&&(e.push(o.text),t.push({from:o.from,to:Math.min(i.doc.length,o.to+1)})),n=o.number}r=!0}return{text:Rn(i,go,e.join(i.lineBreak)),ranges:t,linewise:r}}var Qs=null;je.copy=je.cut=(i,e)=>{let{text:t,ranges:r,linewise:n}=dd(i.state);if(!t&&!n)return!1;Qs=n?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Su?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(fd(i,t),!1)};var xu=mt.define();function Tu(i,e){let t=[];for(let r of i.facet(hu)){let n=r(i,e);n&&t.push(n)}return t?i.update({effects:t,annotations:xu.of(!0)}):null}function ku(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=Tu(i.state,e);t?i.dispatch(t):i.update([])}},10)}Ve.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),ku(i)};Ve.blur=i=>{i.observer.clearSelectionRange(),ku(i)};Ve.compositionstart=Ve.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))};Ve.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,R.chrome&&R.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))};Ve.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()};je.beforeinput=(i,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&i.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],a=i.posAtDOM(l.startContainer,l.startOffset),u=i.posAtDOM(l.endContainer,l.endOffset);return bo(i,{from:a,to:u,insert:i.state.toText(s)},null),!0}}let n;if(R.chrome&&R.android&&(n=Cu.find(s=>s.inputType==e.inputType))&&(i.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return R.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),R.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>Ve.compositionend(i,e),20),!1};var Ra=new Set;function pd(i){Ra.has(i)||(Ra.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}var Na=["pre-wrap","normal","pre-line","break-spaces"],vi=!1;function Oa(){vi=!1}var Zs=class{constructor(e){this.lineWrapping=e,this.doc=Y.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Na.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=r,this.textHeight=n,this.lineLength=s,a){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>mn&&(vi=!0),this.height=e)}replace(e,t,r){return i.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,n){let s=this,o=r.doc;for(let l=n.length-1;l>=0;l--){let{fromA:a,toA:u,fromB:h,toB:c}=n[l],f=s.lineAt(a,re.ByPosNoHeight,r.setDoc(t),0,0),d=f.to>=u?f:s.lineAt(u,re.ByPosNoHeight,r,0,0);for(c+=d.to-u,u=d.to;l>0&&f.from<=n[l-1].toA;)a=n[l-1].fromA,h=n[l-1].fromB,l--,as*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),r+=1+l.break,n-=l.size}else if(s>n*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(n=s&&o(this.blockAt(0,r,n,s))}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}},$e=class i extends En{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,n){return new tt(n,this.length,r,this.height,this.breaks)}replace(e,t,r){let n=r[0];return r.length==1&&(n instanceof i||n instanceof xt&&n.flags&4)&&Math.abs(this.length-n.length)<10?(n instanceof xt?n=new i(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):Ie.of(r)}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more?this.setHeight(n.heights[n.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},xt=class i extends Ie{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,n=e.doc.lineAt(t+this.length).number,s=n-r+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*s);o=a/s,this.length>s+1&&(l=(this.height-a)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:n,perLine:o,perChar:l}}blockAt(e,t,r,n){let{firstLine:s,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let u=n+(e0){let s=r[r.length-1];s instanceof i?r[r.length-1]=new i(s.length+n):r.push(null,new i(n-1))}if(e>0){let s=r[0];s instanceof i?r[0]=new i(e+s.length):r.unshift(new i(e-1),null)}return Ie.of(r)}decomposeLeft(e,t){t.push(new i(e-1),null)}decomposeRight(e,t){t.push(null,new i(this.length-e-1))}updateHeight(e,t=0,r=!1,n){let s=t+this.length;if(n&&n.from<=t+this.length&&n.more){let o=[],l=Math.max(t,n.from),a=-1;for(n.from>t&&o.push(new i(n.from-t-1).updateHeight(e,t));l<=s&&n.more;){let h=e.doc.lineAt(l).length;o.length&&o.push(null);let c=n.heights[n.index++];a==-1?a=c:Math.abs(c-a)>=mn&&(a=-2);let f=new $e(h,c);f.outdated=!1,o.push(f),l+=h+1}l<=s&&o.push(null,new i(s-l).updateHeight(e,l));let u=Ie.of(o);return(a<0||Math.abs(u.height-this.height)>=mn||Math.abs(a-this.heightMetrics(e,t).perLine)>=mn)&&(vi=!0),Dn(this,u)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},to=class extends Ie{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,n){let s=r+this.left.height;return el))return u;let h=t==re.ByPosNoHeight?re.ByPosNoHeight:re.ByPos;return a?u.join(this.right.lineAt(l,h,r,o,l)):this.left.lineAt(l,h,r,n,s).join(u)}forEachLine(e,t,r,n,s,o){let l=n+this.left.height,a=s+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,r,l,a,o);else{let u=this.lineAt(a,re.ByPos,r,n,s);e=e&&u.from<=t&&o(u),t>u.to&&this.right.forEachLine(u.to+1,t,r,l,a,o)}}replace(e,t,r){let n=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&Ba(s,o-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,n=r+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e2*t.size||t.size>2*e.size?Ie.of(this.break?[e,null,t]:[e,t]):(this.left=Dn(this.left,e),this.right=Dn(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,n){let{left:s,right:o}=this,l=t+s.length+this.break,a=null;return n&&n.from<=t+s.length&&n.more?a=s=s.updateHeight(e,t,r,n):s.updateHeight(e,t,r),n&&n.from<=l+o.length&&n.more?a=o=o.updateHeight(e,l,r,n):o.updateHeight(e,l,r),a?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function Ba(i,e){let t,r;i[e]==null&&(t=i[e-1])instanceof xt&&(r=i[e+1])instanceof xt&&i.splice(e-1,3,new xt(t.length+1+r.length))}var gd=5,io=class i{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof $e?n.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new $e(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=gd)&&this.addLineDeco(n,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new $e(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new xt(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof $e)return e;let t=new $e(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let n=this.ensureLine();n.length+=r,n.collapsed+=r,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof $e)&&!this.isCovered?this.nodes.push(new $e(0,-1)):(this.writtenToh.clientHeight||h.scrollWidth>h.clientWidth)&&c.overflow!="visible"){let f=h.getBoundingClientRect();s=Math.max(s,f.left),o=Math.min(o,f.right),l=Math.max(l,f.top),a=Math.min(u==i.parentNode?n.innerHeight:a,f.bottom)}u=c.position=="absolute"||c.position=="fixed"?h.offsetParent:h.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function bd(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}var nr=class{constructor(e,t,r){this.from=e,this.to=t,this.size=r}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new Zs(t),this.stateDeco=e.facet(cr).filter(r=>typeof r!="function"),this.heightMap=Ie.empty().applyChanges(this.stateDeco,Y.empty,this.heightOracle.setDoc(e.doc),[new nt(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=le.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let n=r?t.head:t.anchor;if(!e.some(({from:s,to:o})=>n>=s&&n<=o)){let{from:s,to:o}=this.lineBlockAt(n);e.push(new mi(s,o))}}return this.viewports=e.sort((r,n)=>r.from-n.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Pa:new so(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Zi(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(cr).filter(h=>typeof h!="function");let n=e.changedRanges,s=nt.extendWithRanges(n,md(r,this.stateDeco,e?e.changes:_e.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Oa(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||vi)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let u=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Rf)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),n=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?me.RTL:me.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let u=0,h=0;if(l.width&&l.height){let{scaleX:E,scaleY:S}=$a(t,l);(E>.005&&Math.abs(this.scaleX-E)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=E,this.scaleY=S,u|=8,o=a=!0)}let c=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=c||this.paddingBottom!=f)&&(this.paddingTop=c,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=Ua(e.scrollDOM);let p=(this.printing?bd:yd)(t,this.paddingTop),g=p.top-this.pixelViewport.top,y=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let A=l.width;if((this.contentDOMWidth!=A||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),a){let E=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(E)&&(o=!0),o||n.lineWrapping&&Math.abs(A-this.contentDOMWidth)>n.charWidth){let{lineHeight:S,charWidth:N,textHeight:M}=e.docView.measureTextSize();o=S>0&&n.refresh(s,S,N,M,A/N,E),o&&(e.docView.minWidth=0,u|=8)}g>0&&y>0?h=Math.max(g,y):g<0&&y<0&&(h=Math.min(g,y)),Oa();for(let S of this.viewports){let N=S.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(S);this.heightMap=(o?Ie.empty().applyChanges(this.stateDeco,Y.empty,this.heightOracle,[new nt(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,o,new eo(S.from,N))}vi&&(u|=2)}let w=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return w&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),u|=this.updateForViewport()),(u&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new mi(n.lineAt(o-r*1e3,re.ByHeight,s,0,0).from,n.lineAt(l+(1-r)*1e3,re.ByHeight,s,0,0).to);if(t){let{head:u}=t.range;if(ua.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),c=n.lineAt(u,re.ByPos,s,0,0),f;t.y=="center"?f=(c.top+c.bottom)/2-h/2:t.y=="start"||t.y=="nearest"&&u=l+Math.max(10,Math.min(r,250)))&&n>o-2*1e3&&s>1,o=n<<1;if(this.defaultTextDirection!=me.LTR&&!r)return[];let l=[],a=(h,c,f,d)=>{if(c-hh&&bb.from>=f.from&&b.to<=f.to&&Math.abs(b.from-h)b.fromA));if(!y){if(cb.from<=c&&b.to>=c)){let b=t.moveToLineBoundary(P.cursor(c),!1,!0).head;b>h&&(c=b)}y=new nr(h,c,this.gapSize(f,h,c,d))}l.push(y)},u=h=>{if(h.lengthh.from&&a(h.from,d,h,c),pt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];he.spans(e,this.viewport.from,this.viewport.to,{span(n,s){t.push({from:n,to:s})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((n,s)=>n.from!=t[s].from||n.to!=t[s].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Zi(this.heightMap.lineAt(e,re.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Zi(this.heightMap.lineAt(this.scaler.fromDOM(e),re.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Zi(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},mi=class{constructor(e,t){this.from=e,this.to=t}};function vd(i,e,t){let r=[],n=i,s=0;return he.spans(t,i,e,{span(){},point(o,l){o>n&&(r.push({from:n,to:o}),s+=o-n),n=l}},20),n=1)return e[e.length-1].to;let r=Math.floor(i*t);for(let n=0;;n++){let{from:s,to:o}=e[n],l=o-s;if(r<=l)return s+r;r-=l}}function fn(i,e){let t=0;for(let{from:r,to:n}of i.ranges){if(e<=n){t+=e-r;break}t+=n-r}return t/i.total}function wd(i,e){for(let t of i)if(e(t))return t}var Pa={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}},so=class i{constructor(e,t,r){let n=0,s=0,o=0;this.viewports=r.map(({from:l,to:a})=>{let u=t.lineAt(l,re.ByPos,e,0,0).top,h=t.lineAt(a,re.ByPos,e,0,0).bottom;return n+=h-u,{from:l,to:a,top:u,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-n)/(t.height-n);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,r=0,n=0;;t++){let s=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}};function Zi(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),r=e.toDOM(i.bottom);return new tt(i.from,i.length,t,r-t,Array.isArray(i._content)?i._content.map(n=>Zi(n,e)):i._content)}var dn=$.define({combine:i=>i.join(" ")}),oo=$.define({combine:i=>i.indexOf(!0)>-1}),lo=He.newName(),Mu=He.newName(),Ru=He.newName(),Nu={"&light":"."+Mu,"&dark":"."+Ru};function ao(i,e,t){return new He(e,{finish(r){return/&/.test(r)?r.replace(/&\\w*/,n=>{if(n=="&")return i;if(!t||!t[n])throw new RangeError(`Unsupported selector: ${n}`);return t[n]}):i+" "+r}})}var Ad=ao("."+lo,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url(\'data:image/svg+xml,\')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Nu),Cd={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ps=R.ie&&R.ie_version<=11,uo=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new _s,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(R.ie&&R.ie_version<=11||R.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(R.chrome&&R.chrome_version<126)&&(this.editContext=new ho(e),e.state.facet(Et)&&(e.contentDOM.editContext=this.editContext.editContext)),Ps&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,n=this.selectionRange;if(r.state.facet(Et)?r.root.activeElement!=this.dom:!pn(r.dom,n))return;let s=n.anchorNode&&r.docView.nearest(n.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(R.ie&&R.ie_version<=11||R.android&&R.chrome)&&!r.state.selection.main.empty&&n.focusNode&&er(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=sr(e.root);if(!t)return!1;let r=R.safari&&e.root.nodeType==11&&hf(this.dom.ownerDocument)==this.dom&&Sd(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let n=pn(this.dom,r);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&yi(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(n)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,n=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(n=!0),t==-1?{from:t,to:r}=o:(t=Math.min(o.from,t),r=Math.max(o.to,r)))}return{from:t,to:r,typeOver:n}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),n=this.selectionChanged&&pn(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Ys(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,n=Au(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=La(t,e.previousSibling||e.target.previousSibling,-1),n=La(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Et)!=e.state.facet(Et)&&(e.view.contentDOM.editContext=e.state.facet(Et)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function La(i,e,t){for(;e;){let r=ee.get(e);if(r&&r.parent==i)return r;let n=e.parentNode;e=n!=i.dom?n:t>0?e.nextSibling:e.previousSibling}return null}function _a(i,e){let t=e.startContainer,r=e.startOffset,n=e.endContainer,s=e.endOffset,o=i.docView.domAtPos(i.state.selection.main.anchor);return er(o.node,o.offset,n,s)&&([t,r,n,s]=[n,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:n,focusOffset:s}}function Sd(i,e){if(e.getComposedRanges){let n=e.getComposedRanges(i.root)[0];if(n)return _a(i,n)}let t=null;function r(n){n.preventDefault(),n.stopImmediatePropagation(),t=n.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",r,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",r,!0),t?_a(i,t):null}var ho=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:n}=e.state.selection.main,s={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Y.of(r.text.split(`\n`))};s.from==this.from&&nthis.to&&(s.to=n),!(s.from==s.to&&!s.insert.length)&&(this.pendingContextChange=s,e.state.readOnly||bo(e,s,P.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let n=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o{let n=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(o!="None"&&l!="None"){let a=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;n.push(le.mark({attributes:{style:a}}).range(this.toEditorPos(s.rangeStart),this.toEditorPos(s.rangeEnd)))}}e.dispatch({effects:du.of(le.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let n=sr(r.root);n&&n.rangeCount&&this.editContext.updateSelectionBounds(n.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,n=this.pendingContextChange;return e.changes.iterChanges((s,o,l,a,u)=>{if(r)return;let h=u.length-(o-s);if(n&&o>=n.to)if(n.from==s&&n.to==o&&n.insert.eq(u)){n=this.pendingContextChange=null,t+=h,this.to+=h;return}else n=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=h,this.to+=h;else if(sthis.to||this.to-this.from+u.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),u.toString()),this.to+=h}t+=h}),n&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),n=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=n)&&this.editContext.updateSelection(r,n)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},q=class i{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(n=>n.forEach(s=>r(s,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||pf(e.parent)||document,this.viewState=new xn(e.state||oe.create(e)),e.scrollTo&&e.scrollTo.is(an)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Xi).map(n=>new rr(n));for(let n of this.plugins)n.update(this);this.observer=new uo(this),this.inputState=new Xs(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Cn(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Re?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,n,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn\'t start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,a=null;e.some(f=>f.annotation(xu))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=Tu(s,o),a||(l=1));let u=this.observer.delayedAndroidKey,h=null;if(u?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(h=null)):this.observer.clear(),s.facet(oe.phrases)!=this.state.facet(oe.phrases))return this.setState(s);n=An.create(this,s,e),n.flags|=l;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(c&&(c=c.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;c=new ir(d.empty?d:P.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(an)&&(c=d.value.clip(this.state))}this.viewState.update(n,c),this.bidiCache=Tn.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),t=this.docView.update(n),this.state.facet(Ji)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(n.startState.facet(dn)!=n.state.facet(dn)&&(this.viewState.mustMeasureContent=!0),(t||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!n.empty)for(let f of this.state.facet(js))try{f(n)}catch(d){ze(this.state,d,"update listener")}(a||h)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!Au(this,h)&&u.force&&yi(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new xn(e),this.plugins=e.facet(Xi).map(r=>new rr(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Cn(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Xi),r=e.state.facet(Xi);if(t!=r){let n=[];for(let s of r){let o=t.indexOf(s);if(o<0)n.push(new rr(s));else{let l=this.plugins[o];l.mustUpdate=e,n.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let n of this.plugins)n.mustUpdate=e;for(let n=0;n-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,n=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(Ua(r))s=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(n);s=d.from,o=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];a&4||([this.measureRequests,u]=[u,this.measureRequests]);let h=u.map(d=>{try{return d.read(this)}catch(p){return ze(this.state,p),Ia}}),c=An.create(this,this.state,[]),f=!1;c.flags|=a,t?t.flags|=a:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),f=this.docView.update(c),f&&this.docViewUpdate());for(let d=0;d1||p<-1){n=n+p,r.scrollTop=n/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(js))l(t)}get themeClasses(){return lo+" "+(this.state.facet(oo)?Ru:Mu)+" "+this.state.facet(dn)}updateAttrs(){let e=Fa(this,pu,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Et)?"true":"false",class:"cm-content",style:`${R.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Fa(this,mo,t);let r=this.observer.ignore(()=>{let n=Vs(this.contentDOM,this.contentAttrs,t),s=Vs(this.dom,this.editorAttrs,e);return n||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let n of r.effects)if(n.is(i.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=n.value}}mountStyles(){this.styleModules=this.state.facet(Ji);let e=this.state.facet(i.cspNonce);He.mount(this.root,this.styleModules.concat(Ad).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn\'t allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Bs(this,e,Aa(this,e,t,r))}moveByGroup(e,t){return Bs(this,e,Aa(this,e,t,r=>jf(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),n=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return P.cursor(s.side(t,n)+e.from,s.forward(!t,n)?1:-1)}moveToLineBoundary(e,t,r=!0){return zf(this,e,t,r)}moveVertically(e,t,r){return Bs(this,e,Gf(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),wu(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let n=this.state.doc.lineAt(e),s=this.bidiSpans(n),o=s[it.find(s,e-n.from,-1,t)];return kn(r,o.dir==me.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(cu)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Dd)return ru(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||iu(s.isolates,r=ma(this,e))))return s.order;r||(r=ma(this,e));let n=Tf(e.text,t,r);return this.bidiCache.push(new Tn(e.from,e.to,t,r,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||R.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Va(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return an.of(new ir(typeof e=="number"?P.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return an.of(new ir(P.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Jt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Jt.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=He.newName(),n=[dn.of(r),Ji.of(ao(`.${r}`,e))];return t&&t.dark&&n.push(oo.of(!0)),n}static baseTheme(e){return nn.lowest(Ji.of(ao("."+lo,e,Nu)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),n=r&&ee.get(r)||ee.get(e);return((t=n==null?void 0:n.rootView)===null||t===void 0?void 0:t.view)||null}};q.styleModule=Ji;q.inputHandler=uu;q.clipboardInputFilter=po;q.clipboardOutputFilter=go;q.scrollHandler=fu;q.focusChangeEffect=hu;q.perLineTextDirection=cu;q.exceptionSink=au;q.updateListener=js;q.editable=Et;q.mouseSelectionStyle=lu;q.dragMovesSelection=ou;q.clickAddsSelectionRange=su;q.decorations=cr;q.outerDecorations=gu;q.atomicRanges=yo;q.bidiIsolatedRanges=mu;q.scrollMargins=yu;q.darkTheme=oo;q.cspNonce=$.define({combine:i=>i.length?i[0]:""});q.contentAttributes=mo;q.editorAttributes=pu;q.lineWrapping=q.contentAttributes.of({class:"cm-lineWrapping"});q.announce=se.define();var Dd=4096,Ia={},Tn=class i{constructor(e,t,r,n,s,o){this.from=e,this.to=t,this.dir=r,this.isolates=n,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],n=e.length?e[e.length-1].dir:me.LTR;for(let s=Math.max(0,e.length-10);s=0;n--){let s=r[n],o=typeof s=="function"?s(i):s;o&&$s(o,t)}return t}var Ob=R.mac?"mac":R.windows?"win":R.linux?"linux":"key";var Ed=!R.ios;var Ha={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Ed&&(Ha[".cm-line"].caretColor=Ha[".cm-content"].caretColor="transparent !important");var Bb=/x/.unicode!=null?"gu":"g";var Pb=q.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"\'\'",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}});var vt=class extends yt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};vt.prototype.elementClass="";vt.prototype.toDOM=void 0;vt.prototype.mapMode=Me.TrackBefore;vt.prototype.startSide=vt.prototype.endSide=-1;vt.prototype.point=!0;var xd=Function.prototype.toString,vo=Object.create,Td=Object.prototype.toString,kd=function(){function i(){this._keys=[],this._values=[]}return i.prototype.has=function(e){return!!~this._keys.indexOf(e)},i.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},i.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},i}();function Md(){return new kd}function Rd(){return new WeakMap}var Nd=typeof WeakMap!="undefined"?Rd:Md;function Ao(i){if(!i)return vo(null);var e=i.constructor;if(e===Object)return i===Object.prototype?{}:vo(i);if(e&&~xd.call(e).indexOf("[native code]"))try{return new e}catch(t){}return vo(i)}function Od(i){var e="";return i.global&&(e+="g"),i.ignoreCase&&(e+="i"),i.multiline&&(e+="m"),i.unicode&&(e+="u"),i.sticky&&(e+="y"),e}function Bd(i){return i.flags}var Pd=/test/g.flags==="g"?Bd:Od;function Ou(i){var e=Td.call(i);return e.substring(8,e.length-1)}function Ld(i){return i[Symbol.toStringTag]||Ou(i)}var _d=typeof Symbol!="undefined"?Ld:Ou,Id=Object.defineProperty,Fd=Object.getOwnPropertyDescriptor,Bu=Object.getOwnPropertyNames,Co=Object.getOwnPropertySymbols,Pu=Object.prototype,Lu=Pu.hasOwnProperty,Hd=Pu.propertyIsEnumerable,_u=typeof Co=="function";function $d(i){return Bu(i).concat(Co(i))}var Vd=_u?$d:Bu;function On(i,e,t){for(var r=Vd(i),n=0,s=r.length,o=void 0,l=void 0;n{throw new Error("This node type doesn\'t define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can\'t add per-node props to node types");return typeof e!="function"&&(e=Fe.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}};J.closedBy=new J({deserialize:i=>i.split(" ")});J.openedBy=new J({deserialize:i=>i.split(" ")});J.group=new J({deserialize:i=>i.split(" ")});J.isolate=new J({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}});J.contextHash=new J({perNode:!0});J.lookAhead=new J({perNode:!0});J.mounted=new J({perNode:!0});var wi=class{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[J.mounted.id]}},lp=Object.create(null),Fe=class i{constructor(e,t,r,n=0){this.name=e,this.props=t,this.id=r,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):lp,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),n=new i(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can\'t store a per-node prop on a node type");t[s[0].id]=s[1]}}return n}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(J.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let n of r.split(" "))t[n]=e[r];return r=>{for(let n=r.prop(J.group),s=-1;s<(n?n.length:0);s++){let o=t[s<0?r.name:n[s]];if(o)return o}}}};Fe.none=new Fe("",Object.create(null),0,8);var Bn=new WeakMap,qu=new WeakMap,ye;(function(i){i[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays"})(ye||(ye={}));var Ee=class i{constructor(e,t,r,n,s){if(this.type=e,this.children=t,this.positions=r,this.length=n,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=wi.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let n=r.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new gr(this.topNode,e)}cursorAt(e,t=0,r=0){let n=Bn.get(this)||this.topNode,s=new gr(n);return s.moveTo(e,t),Bn.set(this,s._tree),s}get topNode(){return new ot(this,0,0,null)}resolve(e,t=0){let r=dr(Bn.get(this)||this.topNode,e,t,!1);return Bn.set(this,r),r}resolveInner(e,t=0){let r=dr(qu.get(this)||this.topNode,e,t,!0);return qu.set(this,r),r}resolveStack(e,t=0){return ap(this,e,t)}iterate(e){let{enter:t,leave:r,from:n=0,to:s=this.length}=e,o=e.mode||0,l=(o&ye.IncludeAnonymous)>0;for(let a=this.cursor(o|ye.IncludeAnonymous);;){let u=!1;if(a.from<=s&&a.to>=n&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;u=!0}for(;u&&r&&(l||!a.type.isAnonymous)&&r(a),!a.nextSibling();){if(!a.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Ro(Fe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,n)=>new i(this.type,t,r,n,this.propValues),e.makeTree||((t,r,n)=>new i(Fe.none,t,r,n)))}static build(e){return up(e)}};Ee.empty=new Ee(Fe.none,[],[],0);var Do=class i{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new i(this.buffer,this.index)}},Rt=class i{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Fe.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,r){let n=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function dr(i,e,t,r){for(var n;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to0?l.length:-1;e!=u;e+=t){let h=l[e],c=a[e]+o.from;if(zu(n,r,c,c+h.length)){if(h instanceof Rt){if(s&ye.ExcludeBuffers)continue;let f=h.findChild(0,h.buffer.length,t,r-c,n);if(f>-1)return new pr(new xo(o,h,e,c),null,f)}else if(s&ye.IncludeAnonymous||!h.type.isAnonymous||Mo(h)){let f;if(!(s&ye.IgnoreMounts)&&(f=wi.get(h))&&!f.overlay)return new i(f.tree,c,e,o);let d=new i(h,c,e,o);return s&ye.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?h.children.length-1:0,t,r,n)}}}if(s&ye.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let n;if(!(r&ye.IgnoreOverlays)&&(n=wi.get(this._tree))&&n.overlay){let s=e-this.from;for(let{from:o,to:l}of n.overlay)if((t>0?o<=s:o=s:l>s))return new i(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Uu(i,e,t,r){let n=i.cursor(),s=[];if(!n.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=n.type.is(t),!n.nextSibling())return s}for(;;){if(r!=null&&n.type.is(r))return s;if(n.type.is(e)&&s.push(n.node),!n.nextSibling())return r==null?s:[]}}function Eo(i,e,t=e.length-1){for(let r=i.parent;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}var xo=class{constructor(e,t,r,n){this.parent=e,this.buffer=t,this.index=r,this.start=n}},pr=class i extends Ln{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new i(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&ye.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new i(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new i(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new i(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,n=this.index+4,s=r.buffer[this.index+3];if(s>n){let o=r.buffer[this.index+1];e.push(r.slice(n,s,o)),t.push(0)}return new Ee(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function ju(i){if(!i.length)return null;let e=0,t=i[0];for(let s=1;st.from||o.to=e){let l=new ot(o.tree,o.overlay[0].from+s.from,-1,s);(n||(n=[r])).push(dr(l,e,t,!1))}}return n?ju(n):r}var gr=class{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof ot)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=r+n.buffer[e+1],this.to=r+n.buffer[e+2],!0}yield(e){return e?e instanceof ot?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&ye.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ye.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ye.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let n=r<0?0:this.stack[r]+4;if(this.index!=n)return this.yieldBuf(t.findChild(n,this.index,-1,0,4))}else{let n=t.buffer[this.index+3];if(n<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(n)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:n}=this;if(n){if(e>0){if(this.index-1)for(let s=t+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&ye.IncludeAnonymous||l instanceof Rt||!l.type.isAnonymous||Mo(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==n){if(n==this.index)return o;t=o,r=s+1;break e}n=this.stack[--s]}for(let n=r;n=0;s--){if(s<0)return Eo(this.node,e,n);let o=r[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[n]&&e[n]!=o.name)return!1;n--}}return!0}};function Mo(i){return i.children.some(e=>e instanceof Rt||!e.type.isAnonymous||Mo(e))}function up(i){var e;let{buffer:t,nodeSet:r,maxBufferLength:n=1024,reused:s=[],minRepeatType:o=r.types.length}=i,l=Array.isArray(t)?new Do(t,t.length):t,a=r.types,u=0,h=0;function c(S,N,M,j,D,H){let{id:B,start:O,end:W,size:I}=l,te=h;for(;I<0;)if(l.next(),I==-1){let K=s[B];M.push(K),j.push(O-S);return}else if(I==-3){u=B;return}else if(I==-4){h=B;return}else throw new RangeError(`Unrecognized record size: ${I}`);let Ce=a[B],F,Se,k=O-S;if(W-O<=n&&(Se=y(l.pos-N,D))){let K=new Uint16Array(Se.size-Se.skip),ue=l.pos-Se.size,pe=K.length;for(;l.pos>ue;)pe=b(Se.start,K,pe);F=new Rt(K,W-Se.start,r),k=Se.start-S}else{let K=l.pos-I;l.next();let ue=[],pe=[],Je=B>=o?B:-1,pt=0,Ht=W;for(;l.pos>K;)Je>=0&&l.id==Je&&l.size>=0?(l.end<=Ht-n&&(p(ue,pe,O,pt,l.end,Ht,Je,te),pt=ue.length,Ht=l.end),l.next()):H>2500?f(O,K,ue,pe):c(O,K,ue,pe,Je,H+1);if(Je>=0&&pt>0&&pt-1&&pt>0){let Wi=d(Ce);F=Ro(Ce,ue,pe,0,ue.length,0,W-O,Wi,Wi)}else F=g(Ce,ue,pe,W-O,te-W)}M.push(F),j.push(k)}function f(S,N,M,j){let D=[],H=0,B=-1;for(;l.pos>N;){let{id:O,start:W,end:I,size:te}=l;if(te>4)l.next();else{if(B>-1&&W=0;I-=3)O[te++]=D[I],O[te++]=D[I+1]-W,O[te++]=D[I+2]-W,O[te++]=te;M.push(new Rt(O,D[2]-W,r)),j.push(W-S)}}function d(S){return(N,M,j)=>{let D=0,H=N.length-1,B,O;if(H>=0&&(B=N[H])instanceof Ee){if(!H&&B.type==S&&B.length==j)return B;(O=B.prop(J.lookAhead))&&(D=M[H]+B.length+O)}return g(S,N,M,j,D)}}function p(S,N,M,j,D,H,B,O){let W=[],I=[];for(;S.length>j;)W.push(S.pop()),I.push(N.pop()+M-D);S.push(g(r.types[B],W,I,H-D,O-H)),N.push(D-M)}function g(S,N,M,j,D=0,H){if(u){let B=[J.contextHash,u];H=H?[B].concat(H):[B]}if(D>25){let B=[J.lookAhead,D];H=H?[B].concat(H):[B]}return new Ee(S,N,M,j,H)}function y(S,N){let M=l.fork(),j=0,D=0,H=0,B=M.end-n,O={size:0,start:0,skip:0};e:for(let W=M.pos-S;M.pos>W;){let I=M.size;if(M.id==N&&I>=0){O.size=j,O.start=D,O.skip=H,H+=4,j+=4,M.next();continue}let te=M.pos-I;if(I<0||te=o?4:0,F=M.start;for(M.next();M.pos>te;){if(M.size<0)if(M.size==-3)Ce+=4;else break e;else M.id>=o&&(Ce+=4);M.next()}D=F,j+=I,H+=Ce}return(N<0||j==S)&&(O.size=j,O.start=D,O.skip=H),O.size>4?O:void 0}function b(S,N,M){let{id:j,start:D,end:H,size:B}=l;if(l.next(),B>=0&&j4){let W=l.pos-(B-4);for(;l.pos>W;)M=b(S,N,M)}N[--M]=O,N[--M]=H-S,N[--M]=D-S,N[--M]=j}else B==-3?u=j:B==-4&&(h=j);return M}let A=[],w=[];for(;l.pos>0;)c(i.start||0,i.bufferStart||0,A,w,-1,0);let E=(e=i.length)!==null&&e!==void 0?e:A.length?w[0]+A[0].length:0;return new Ee(a[i.topID],A.reverse(),w.reverse(),E)}var Wu=new WeakMap;function Pn(i,e){if(!i.isAnonymous||e instanceof Rt||e.type!=i)return 1;let t=Wu.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=i||!(r instanceof Ee)){t=1;break}t+=Pn(i,r)}Wu.set(e,t)}return t}function Ro(i,e,t,r,n,s,o,l,a){let u=0;for(let p=r;p=h)break;N+=M}if(w==E+1){if(N>h){let M=p[E];d(M.children,M.positions,0,M.children.length,g[E]+A);continue}c.push(p[E])}else{let M=g[w-1]+p[w-1].length-S;c.push(Ro(i,p,g,E,w,S,M,null,a))}f.push(S+A-s)}}return d(e,t,r,n,0),(l||a)(c,f,o)}var Qt=class i{constructor(e,t,r,n,s=!1,o=!1){this.from=e,this.to=t,this.tree=r,this.offset=n,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let n=[new i(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&n.push(s);return n}static applyChanges(e,t,r=128){if(!t.length)return e;let n=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,u=0;;l++){let h=l=r)for(;o&&o.from=f.from||c<=f.to||u){let d=Math.max(f.from,a)-u,p=Math.min(f.to,c)-u;f=d>=p?null:new i(d,p,f.tree,f.offset+u,l>0,!!h)}if(f&&n.push(f),o.to>c)break;o=snew fr(n.from,n.to)):[new fr(0,0)]:[new fr(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let n=this.startParse(e,t,r);for(;;){let s=n.advance();if(s)return s}}},ko=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};var Fb=new J({perNode:!0});var hp=0,Ge=class i{constructor(e,t,r,n){this.name=e,this.set=t,this.base=r,this.modified=n,this.id=hp++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof i&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let n=new i(r,[],null,[]);if(n.set.push(n),t)for(let s of t.set)n.set.push(s);return n}static defineModifier(e){let t=new $n(e);return r=>r.modified.indexOf(t)>-1?r:$n.get(r.base||r,r.modified.concat(t).sort((n,s)=>n.id-s.id))}},cp=0,$n=class i{constructor(e){this.name=e,this.instances=[],this.id=cp++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(l=>l.base==e&&fp(t,l.modified));if(r)return r;let n=[],s=new Ge(e.name,n,e,t);for(let l of t)l.instances.push(s);let o=dp(t);for(let l of e.set)if(!l.modified.length)for(let a of o)n.push(i.get(l,a));return s}};function fp(i,e){return i.length==e.length&&i.every((t,r)=>t==e[r])}function dp(i){let e=[[]];for(let t=0;tr.length-t.length)}function Yu(i){let e=Object.create(null);for(let t in i){let r=i[t];Array.isArray(r)||(r=[r]);for(let n of t.split(" "))if(n){let s=[],o=2,l=n;for(let c=0;;){if(l=="..."&&c>0&&c+3==n.length){o=1;break}let f=/^"(?:[^"\\\\]|\\\\.)*?"|[^\\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+n);if(s.push(f[0]=="*"?"":f[0][0]==\'"\'?JSON.parse(f[0]):f[0]),c+=f[0].length,c==n.length)break;let d=n[c++];if(c==n.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+n);l=n.slice(c)}let a=s.length-1,u=s[a];if(!u)throw new RangeError("Invalid path: "+n);let h=new Ai(r,o,a>0?s.slice(0,a):null);e[u]=h.sort(e[u])}}return Xu.add(e)}var Xu=new J,Ai=class{constructor(e,t,r,n){this.tags=e,this.mode=t,this.context=r,this.next=n}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=n;for(let l of s)for(let a of l.set){let u=t[a.id];if(u){o=o?o+" "+u:u;break}}return o},scope:r}}function pp(i,e){let t=null;for(let r of i){let n=r.style(e);n&&(t=t?t+" "+n:n)}return t}function Ju(i,e,t,r=0,n=i.length){let s=new Oo(r,Array.isArray(e)?e:[e],t);s.highlightRange(i.cursor(),r,n,"",s.highlighters),s.flush(n)}var Oo=class{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,n,s){let{type:o,from:l,to:a}=e;if(l>=r||a<=t)return;o.isTop&&(s=this.highlighters.filter(d=>!d.scope||d.scope(o)));let u=n,h=gp(e)||Ai.empty,c=pp(s,h.tags);if(c&&(u&&(u+=" "),u+=c,h.mode==1&&(n+=(n?" ":"")+c)),this.startSpan(Math.max(t,l),u),h.opaque)return;let f=e.tree&&e.tree.prop(J.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+l,1),p=this.highlighters.filter(y=>!y.scope||y.scope(f.tree.type)),g=e.firstChild();for(let y=0,b=l;;y++){let A=y=w||!e.nextSibling())););if(!A||w>r)break;b=A.to+l,b>t&&(this.highlightRange(d.cursor(),Math.max(t,A.from+l),Math.min(r,b),"",p),this.startSpan(Math.min(r,b),u))}g&&e.parent()}else if(e.firstChild()){f&&(n="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,n,s),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}};function gp(i){let e=i.type.prop(Xu);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}var C=Ge.define,In=C(),Nt=C(),Gu=C(Nt),Ku=C(Nt),Ot=C(),Fn=C(Ot),No=C(Ot),ut=C(),Zt=C(ut),lt=C(),at=C(),Bo=C(),mr=C(Bo),Hn=C(),m={comment:In,lineComment:C(In),blockComment:C(In),docComment:C(In),name:Nt,variableName:C(Nt),typeName:Gu,tagName:C(Gu),propertyName:Ku,attributeName:C(Ku),className:C(Nt),labelName:C(Nt),namespace:C(Nt),macroName:C(Nt),literal:Ot,string:Fn,docString:C(Fn),character:C(Fn),attributeValue:C(Fn),number:No,integer:C(No),float:C(No),bool:C(Ot),regexp:C(Ot),escape:C(Ot),color:C(Ot),url:C(Ot),keyword:lt,self:C(lt),null:C(lt),atom:C(lt),unit:C(lt),modifier:C(lt),operatorKeyword:C(lt),controlKeyword:C(lt),definitionKeyword:C(lt),moduleKeyword:C(lt),operator:at,derefOperator:C(at),arithmeticOperator:C(at),logicOperator:C(at),bitwiseOperator:C(at),compareOperator:C(at),updateOperator:C(at),definitionOperator:C(at),typeOperator:C(at),controlOperator:C(at),punctuation:Bo,separator:C(Bo),bracket:mr,angleBracket:C(mr),squareBracket:C(mr),paren:C(mr),brace:C(mr),content:ut,heading:Zt,heading1:C(Zt),heading2:C(Zt),heading3:C(Zt),heading4:C(Zt),heading5:C(Zt),heading6:C(Zt),contentSeparator:C(ut),list:C(ut),quote:C(ut),emphasis:C(ut),strong:C(ut),link:C(ut),monospace:C(ut),strikethrough:C(ut),inserted:C(),deleted:C(),changed:C(),invalid:C(),meta:Hn,documentMeta:C(Hn),annotation:C(Hn),processingInstruction:C(Hn),definition:Ge.defineModifier("definition"),constant:Ge.defineModifier("constant"),function:Ge.defineModifier("function"),standard:Ge.defineModifier("standard"),local:Ge.defineModifier("local"),special:Ge.defineModifier("special")};for(let i in m){let e=m[i];e instanceof Ge&&(e.name=i)}var Vb=Po([{tag:m.link,class:"tok-link"},{tag:m.heading,class:"tok-heading"},{tag:m.emphasis,class:"tok-emphasis"},{tag:m.strong,class:"tok-strong"},{tag:m.keyword,class:"tok-keyword"},{tag:m.atom,class:"tok-atom"},{tag:m.bool,class:"tok-bool"},{tag:m.url,class:"tok-url"},{tag:m.labelName,class:"tok-labelName"},{tag:m.inserted,class:"tok-inserted"},{tag:m.deleted,class:"tok-deleted"},{tag:m.literal,class:"tok-literal"},{tag:m.string,class:"tok-string"},{tag:m.number,class:"tok-number"},{tag:[m.regexp,m.escape,m.special(m.string)],class:"tok-string2"},{tag:m.variableName,class:"tok-variableName"},{tag:m.local(m.variableName),class:"tok-variableName tok-local"},{tag:m.definition(m.variableName),class:"tok-variableName tok-definition"},{tag:m.special(m.variableName),class:"tok-variableName2"},{tag:m.definition(m.propertyName),class:"tok-propertyName tok-definition"},{tag:m.typeName,class:"tok-typeName"},{tag:m.namespace,class:"tok-namespace"},{tag:m.className,class:"tok-className"},{tag:m.macroName,class:"tok-macroName"},{tag:m.propertyName,class:"tok-propertyName"},{tag:m.operator,class:"tok-operator"},{tag:m.comment,class:"tok-comment"},{tag:m.meta,class:"tok-meta"},{tag:m.invalid,class:"tok-invalid"},{tag:m.punctuation,class:"tok-punctuation"}]);var Lo,br=new J;var mp=new J,qe=class{constructor(e,t,r=[],n=""){this.data=e,this.name=n,oe.prototype.hasOwnProperty("tree")||Object.defineProperty(oe.prototype,"tree",{get(){return vr(this)}}),this.parser=t,this.extension=[Ci.of(this),oe.languageData.of((s,o,l)=>{let a=Qu(s,o,l),u=a.type.prop(br);if(!u)return[];let h=s.facet(u),c=a.type.prop(mp);if(c){let f=a.resolve(o-a.from,l);for(let d of c)if(d.test(f,s)){let p=s.facet(d.facet);return d.type=="replace"?p:p.concat(h)}}return h})].concat(r)}isActiveAt(e,t,r=-1){return Qu(e,t,r).type.prop(br)==this.data}findRegions(e){let t=e.facet(Ci);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],n=(s,o)=>{if(s.prop(br)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(J.mounted);if(l){if(l.tree.prop(br)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+o,to:a.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let a=r.length;if(n(l.tree,l.overlay[0].from+o),r.length>a)return}}for(let a=0;a=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}},yr=null,$o=class i{constructor(e,t,r=[],n,s,o,l,a){this.parser=e,this.state=t,this.fragments=r,this.tree=n,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new i(e,t,[],Ee.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Ho(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Ee.empty&&this.isDone(t!=null?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let n=Date.now()+e;e=()=>Date.now()>n}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Qt.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=yr;yr=this;try{return e()}finally{yr=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Zu(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:n,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((u,h,c,f)=>a.push({fromA:u,toA:h,fromB:c,toB:f})),r=Qt.applyChanges(r,a),n=Ee.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let u of this.skipped){let h=e.mapPos(u.from,1),c=e.mapPos(u.to,-1);he.from&&(this.fragments=Zu(this.fragments,n,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends _n{createParse(t,r,n){let s=n[0].from,o=n[n.length-1].to;return{parsedPos:s,advance(){let a=yr;if(a){for(let u of n)a.tempSkipped.push(u);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new Ee(Fe.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return yr}};function Zu(i,e,t){return Qt.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}var wr=class i{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new i(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=$o.create(e.facet(Ci).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new i(r)}};qe.state=gt.define({create:wr.init,update(i,e){for(let t of e.effects)if(t.is(qe.setState))return t.value;return e.startState.facet(Ci)!=e.state.facet(Ci)?wr.init(e.state):i.apply(e)}});var rh=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback!="undefined"&&(rh=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});var _o=typeof navigator!="undefined"&&(!((Lo=navigator.scheduling)===null||Lo===void 0)&&Lo.isInputPending)?()=>navigator.scheduling.isInputPending():null,yp=Jt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(qe.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(qe.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=rh(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndn+1e3,a=s.context.work(()=>_o&&_o()||Date.now()>o,n+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:qe.setState.of(new wr(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>ze(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ci=$.define({combine(i){return i.length?i[0]:null},enables:i=>[qe.state,yp,q.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});var Bt=class i{constructor(e,t){this.specs=e;let r;function n(l){let a=He.newName();return(r||(r=Object.create(null)))["."+a]=l,a}let s=typeof t.all=="string"?t.all:t.all?n(t.all):void 0,o=t.scope;this.scope=o instanceof qe?l=>l.prop(br)==o.data:o?l=>l==o:void 0,this.style=Po(e.map(l=>({tag:l.tag,class:l.class||n(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new He(r):null,this.themeType=t.themeType}static define(e,t){return new i(e,t||{})}},Vo=$.define(),nh=$.define({combine(i){return i.length?[i[0]]:null}});function Io(i){let e=i.facet(Vo);return e.length?e:i.facet(nh)}function Vn(i,e){let t=[bp],r;return i instanceof Bt&&(i.module&&t.push(q.styleModule.of(i.module)),r=i.themeType),e!=null&&e.fallback?t.push(nh.of(i)):r?t.push(Vo.computeN([q.darkTheme],n=>n.facet(q.darkTheme)==(r=="dark")?[i]:[])):t.push(Vo.of(i)),t}var qo=class{constructor(e){this.markCache=Object.create(null),this.tree=vr(e.state),this.decorations=this.buildDeco(e,Io(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=vr(e.state),r=Io(e.state),n=r!=Io(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return le.none;let r=new zt;for(let{from:n,to:s}of e.visibleRanges)Ju(this.tree,t,(o,l,a)=>{r.add(o,l,this.markCache[a]||(this.markCache[a]=le.mark({class:a})))},n,s);return r.finish()}},bp=nn.high(Jt.fromClass(qo,{decorations:i=>i.decorations})),Jb=Bt.define([{tag:m.meta,color:"#404740"},{tag:m.link,textDecoration:"underline"},{tag:m.heading,textDecoration:"underline",fontWeight:"bold"},{tag:m.emphasis,fontStyle:"italic"},{tag:m.strong,fontWeight:"bold"},{tag:m.strikethrough,textDecoration:"line-through"},{tag:m.keyword,color:"#708"},{tag:[m.atom,m.bool,m.url,m.contentSeparator,m.labelName],color:"#219"},{tag:[m.literal,m.inserted],color:"#164"},{tag:[m.string,m.deleted],color:"#a11"},{tag:[m.regexp,m.escape,m.special(m.string)],color:"#e40"},{tag:m.definition(m.variableName),color:"#00f"},{tag:m.local(m.variableName),color:"#30a"},{tag:[m.typeName,m.namespace],color:"#085"},{tag:m.className,color:"#167"},{tag:[m.special(m.variableName),m.macroName],color:"#256"},{tag:m.definition(m.propertyName),color:"#00c"},{tag:m.comment,color:"#940"},{tag:m.invalid,color:"#f00"}]);var vp=Object.create(null),eh=[Fe.none];var th=[],ih=Object.create(null),wp=Object.create(null);for(let[i,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])wp[i]=Ap(vp,e);function Fo(i,e){th.indexOf(i)>-1||(th.push(i),console.warn(e))}function Ap(i,e){let t=[];for(let l of e.split(" ")){let a=[];for(let u of l.split(".")){let h=i[u]||m[u];h?typeof h=="function"?a.length?a=a.map(h):Fo(u,`Modifier ${u} used at start of tag`):a.length?Fo(u,`Tag ${u} used as modifier`):a=Array.isArray(h)?h:[h]:Fo(u,`Unknown highlighting tag ${u}`)}for(let u of a)t.push(u)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),n=r+" "+t.map(l=>l.id),s=ih[n];if(s)return s.id;let o=ih[n]=Fe.define({id:eh.length,name:r,props:[Yu({[r]:t})]});return eh.push(o),o.id}var Qb={rtl:le.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:me.RTL}),ltr:le.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:me.LTR}),auto:le.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var Cp="#abb2bf",Sp="#7d8799",Dp="#ffffff",Ep="#21252b",Uo="rgba(0, 0, 0, 0.5)",xp="#292d3e",Wo="#353a42",Tp="rgba(128, 203, 196, 0.2)",sh="#ffcc00",kp=q.theme({"&":{color:"#ffffff",backgroundColor:xp},".cm-content":{caretColor:sh},"&.cm-focused .cm-cursor":{borderLeftColor:sh},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Tp},".cm-panels":{backgroundColor:Ep,color:"#ffffff"},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:Uo},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847",outline:"1px solid #515a6b"},".cm-gutters":{background:"#292d3e",color:"#676e95",border:"none"},".cm-activeLineGutter":{backgroundColor:Uo},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Wo},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Wo,borderBottomColor:Wo},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Uo,color:Cp}}},{dark:!0}),Mp=Bt.define([{tag:m.keyword,color:"#c792ea"},{tag:m.operator,color:"#89ddff"},{tag:m.special(m.variableName),color:"#eeffff"},{tag:m.typeName,color:"#f07178"},{tag:m.atom,color:"#f78c6c"},{tag:m.number,color:"#ff5370"},{tag:m.definition(m.variableName),color:"#82aaff"},{tag:m.string,color:"#c3e88d"},{tag:m.special(m.string),color:"#f07178"},{tag:m.comment,color:Sp},{tag:m.variableName,color:"#f07178"},{tag:m.tagName,color:"#ff5370"},{tag:m.bracket,color:"#a2a1a4"},{tag:m.meta,color:"#ffcb6b"},{tag:m.attributeName,color:"#c792ea"},{tag:m.propertyName,color:"#c792ea"},{tag:m.className,color:"#decb6b"},{tag:m.invalid,color:Dp}]),Rp=[kp,Vn(Mp)];var oh="#2e3440",Xo="#3b4252",lh="#434c5e",qn="#4c566a";var ah="#e5e9f0",Yo="#eceff4",zo="#8fbcbb",uh="#88c0d0",Np="#81a1c1",Ke="#5e81ac",Op="#bf616a",Si="#d08770",jo="#ebcb8b",hh="#a3be8c",Bp="#b48ead",ch="#d30102",Jo=Yo,Go=Jo,Pp="#ffffff",Ko=Xo,Lp=Jo,fh=Xo,dh=q.theme({"&":{color:oh,backgroundColor:Pp},".cm-content":{caretColor:fh},".cm-cursor, .cm-dropCursor":{borderLeftColor:fh},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Lp},".cm-panels":{backgroundColor:Jo,color:qn},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:`1px solid ${qn}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ah},".cm-activeLine":{backgroundColor:Go},".cm-selectionMatch":{backgroundColor:ah},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${qn}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:Yo},".cm-gutters":{backgroundColor:Yo,color:oh,border:"none"},".cm-activeLineGutter":{backgroundColor:Go},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Ko},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Ko,borderBottomColor:Ko},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Go,color:qn}}},{dark:!1}),_p=Bt.define([{tag:m.keyword,color:Ke},{tag:[m.name,m.deleted,m.character,m.propertyName,m.macroName],color:Si},{tag:[m.variableName],color:Si},{tag:[m.function(m.variableName)],color:Ke},{tag:[m.labelName],color:Np},{tag:[m.color,m.constant(m.name),m.standard(m.name)],color:Ke},{tag:[m.definition(m.name),m.separator],color:hh},{tag:[m.brace],color:zo},{tag:[m.annotation],color:ch},{tag:[m.number,m.changed,m.annotation,m.modifier,m.self,m.namespace],color:uh},{tag:[m.typeName,m.className],color:jo},{tag:[m.operator,m.operatorKeyword],color:hh},{tag:[m.tagName],color:Bp},{tag:[m.squareBracket],color:Op},{tag:[m.angleBracket],color:Si},{tag:[m.attributeName],color:jo},{tag:[m.regexp],color:Ke},{tag:[m.quote],color:Xo},{tag:[m.string],color:Si},{tag:m.link,color:zo,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[m.url,m.escape,m.special(m.string)],color:Si},{tag:[m.meta],color:uh},{tag:[m.comment],color:lh,fontStyle:"italic"},{tag:m.strong,fontWeight:"bold",color:Ke},{tag:m.emphasis,fontStyle:"italic",color:Ke},{tag:m.strikethrough,textDecoration:"line-through"},{tag:m.heading,fontWeight:"bold",color:Ke},{tag:m.special(m.heading1),fontWeight:"bold",color:Ke},{tag:m.heading1,fontWeight:"bold",color:Ke},{tag:[m.heading2,m.heading3,m.heading4],fontWeight:"bold",color:Ke},{tag:[m.heading5,m.heading6],color:Ke},{tag:[m.atom,m.bool,m.special(m.variableName)],color:Si},{tag:[m.processingInstruction,m.inserted],color:zo},{tag:[m.contentSeparator],color:jo},{tag:m.invalid,color:lh,borderBottom:`1px dotted ${ch}`}]),u1=[dh,Vn(_p)];function Ar(i,e=0,t=" ",r=!0){let n=[];if(e==5||i==null)return"";if(typeof i=="string")return i;if(typeof i=="number")return`${i}`;if(Array.isArray(i))n.push(`${r?"(":""}${i.map(s=>Ar(s,e+1)).join(t)}${r?")":""}`);else if(typeof i=="object")for(let s of Object.values(i))n.push(Ar(s,e+1));return n.join(" ")}var Ip={str:"strength",dex:"dexterity",con:"constitution",wis:"wisdom",int:"intelligence",cha:"charisma"};function ht(i){return i?i.replace(/{@condition (.+?)(?:\\|.+)?}/g,"$1").replace(/{@item (.+?)(?:\\|.+)?}/g,"$1").replace(/{@spell ([\\s\\S]+?)(?:\\|.+)?}/g,"$1").replace(/{@recharge (.+?)(?:\\|.+)?}/g,"(Recharge $1-6)").replace(/{@recharge}/g,"(Recharge 6)").replace(/{@h}/g,"").replace(/{@damage (.+?)}/g,"$1").replace(/{@atk ms}/g,"Melee Spell Attack").replace(/{@atk rs}/g,"Ranged Spell Attack").replace(/{@atk mw}/g,"Melee Weapon Attack").replace(/{@atk rw}/g,"Ranged Weapon Attack").replace(/{@atk mw,rw}/g,"Melee / Ranged Weapon Attack").replace(/{@creature (.+?)(?:\\|.+)?}/g,"$1").replace(/{@skill (.+?)(?:\\|.+)?}/g,"$1").replace(/{@dice (.+?)(?:\\|.+)?}/g,"$1").replace(/{@hit (\\d+?)(?:\\|.+)?}/g,"+$1").replace(/{@dc (\\d+?)(?:\\|.+)?}/g,"$1").replace(/{@quickref (.+?)\\|\\|.+?}/,"$1"):""}async function ph(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=async n=>{var s,o,l,a,u,h,c,f,d,p,g,y,b,A,w,E,S;try{let N=JSON.parse(n.target.result),M;"monster"in N?M=N.monster:Array.isArray(N)?M=N:typeof N=="object"?M=[N]:t("Invalid monster JSON provided.");let j=[];for(let D of M)try{let H={image:null,bestiary:!0,name:D.name,source:Xp(D),type:Fp(D.type),subtype:Hp(D.type),size:lg[(s=D.size)==null?void 0:s[0]],alignment:Gp(D),hp:D.hp&&"average"in D.hp?(o=D.hp)==null?void 0:o.average:null,hit_dice:D.hp&&"formula"in D.hp?(l=D.hp)==null?void 0:l.formula:"",ac:qp(D.ac),speed:Kp(D),stats:[D.str,D.dex,D.con,D.int,D.wis,D.cha],damage_immunities:ht(Di(D.immune)),damage_resistances:ht(Di(D.resist)),damage_vulnerabilities:ht(Di(D.vulnerable)),condition_immunities:ht(Di(D.conditionImmune)),saves:Object.entries((a=D.save)!=null?a:{}).map(B=>{var W,I;if(!B||!B[1])return;let[,O]=(I=(W=B[1])==null?void 0:W.match(/.*?(\\d+)/))!=null?I:[];if(O)return{[Ip[B[0]]]:O}}).filter(B=>B),skillsaves:X0(D),senses:Yp(D),languages:Ar(D.languages,0,", ",!1),cr:$p(D.cr),traits:(h=(u=D.trait)==null?void 0:u.flatMap(ei))!=null?h:[],actions:(f=(c=D.action)==null?void 0:c.flatMap(ei))!=null?f:[],bonus_actions:(p=(d=D.bonus)==null?void 0:d.flatMap(ei))!=null?p:[],reactions:(y=(g=D.reaction)==null?void 0:g.flatMap(ei))!=null?y:[],legendary_actions:(A=(b=D.legendary)==null?void 0:b.flatMap(ei))!=null?A:[],mythic_actions:[...(w=(D.mythicHeader?[{name:"",entries:D.mythicHeader}]:[]).flatMap(ei))!=null?w:[],...(S=(E=D.mythic)==null?void 0:E.flatMap(ei))!=null?S:[]],spells:jp(D),spellsNotes:Vp(D).join(" ")};j.push(H)}catch(H){console.error(H);continue}e(j)}catch(N){console.error("reject!!!",N),t(N)}},r.readAsText(i)})}function Fp(i){if(i)return typeof i=="string"?i:i.type}function Hp(i){if(!i||typeof i=="string"||!i.tags)return;let e=[];for(var t of i.tags)typeof t=="string"?e.push(t):e.push(t.tag);return e.join(", ")}function $p(i){if(i)return typeof i=="string"?i:i.cr}function Vp(i){let e=[];for(let t in i.spellcasting)e.push(Ar(i.spellcasting[t].footerEntries,0,", ",!1));return e}function Di(i){if(!i)return"";let e=[];for(let t of i){if(typeof t=="string"){e.push(t);continue}if("special"in t){e.push(t.special);continue}if("immune"in t){e.push(`${Di(t.immune)}${t.note?" ":""}${t.note?t.note:""}`);continue}if("resist"in t){e.push(`${Di(t.resist)}${t.note?" ":""}${t.note?t.note:""}`);continue}}return e.join(", ")}function qp(i=[]){var t;let[e]=i;if(e){if(typeof e=="number")return e;if(typeof e=="string"){let[r,n]=(t=e.match(/(\\d+)/))!=null?t:[];return n?Number(n):null}if(typeof e=="object")return"special"in e?e.special:"ac"in e?"from"in e?`${e.ac} (${ht(e.from.join(", "))})`:`${e.ac}`:null}}var Up={0:"Cantrips (at will)",1:"1st level",2:"2nd level",3:"3rd level",4:"4th level",5:"5th level",6:"6th level",7:"7th level",8:"8th level",9:"9th level"};function Qo(i){let e=[];for(let t of i){if(typeof t=="string"){e.push(t);continue}!t.hidden&&t.entry&&t.entry.length&&e.push(t.entry)}return ht(e.join(", "))}function Wp(i){let e=[];for(let t of Object.keys(i)){let r=i[t],n=Number(t.replace(/[^0-9]/,""));e.push([n,Qo(r)])}return e}function zp(i){var n,s;let e=[ht(((n=i.headerEntries)!=null?n:[]).join(`\n`))];if("spells"in i)try{for(let o in(s=i.spells)!=null?s:{}){let l=i.spells[o],{spells:a}=l,u=`${Up[o]}`;u+="slots"in l?` (${l.slots} slots)`:"";let h=ht(a.join(", "));e.push({[u]:h})}}catch(o){throw new Error("There was an error parsing the spells.")}if("will"in i&&i.will.length>0)try{e.push({"At will":Qo(i.will)})}catch(o){throw new Error("There was an error parsing the at-will spells.")}if("ritual"in i&&i.ritual.length>0)try{e.push({Rituals:Qo(i.ritual)})}catch(o){throw new Error("There was an error parsing the ritual spells.")}let t=["rest","daily","weekly","yearly","charges"],r={rest:"/rest each",daily:"/day each",weekly:"/week each",yearly:"/year each",charges:" charges"};for(let o of t)if(o in i){let l=Wp(i[o]);for(let a of l.sort((u,h)=>h[0]-u[0]))e.push({[`${a[0]}${r[o]}`]:a[1]})}return e}function jp(i){return!i.spellcasting||!i.spellcasting.length?[]:i.spellcasting.flatMap(zp)}function Gp(i){return i.alignment?Un(i.alignment):null}function Un(i){var t;if(!i)return null;let e=[];if(Array.isArray(i)){let r=[];for(let n of i)typeof n=="string"?r.push(Un(n)):e.push(Un(n));r.length>0&&e.push(r.join(" "))}else if(typeof i=="object"){if("special"in i&&i.special!=null)return i.special;if("alignment"in i)return`${((t=i.alignment)!=null?t:[]).map(r=>Un(r)).join(" ")}${i.chance?` (${i.chance}%)`:""}${i.note?` (${i.note})`:""}`}else{switch(i.toUpperCase()){case"L":return"lawful";case"N":return"neutral";case"NX":return"neutral (law/chaos axis)";case"NY":return"neutral (good/evil axis)";case"C":return"chaotic";case"G":return"good";case"E":return"evil";case"U":return"unaligned";case"A":return"any alignment"}return i}return e.join(" or ")}function Kp(i){var l,a;let e=i.speed;if(!e)return"\\u2014";if(typeof e=="number")return`${e}`;function t(u){return typeof u=="number"?u:u.number!=null?u.number:u}function r(u){var h;return typeof u=="number"?"":(h=u==null?void 0:u.condition)!=null?h:""}let n=[],s=["walk","burrow","climb","fly","swim"];for(let u of s){if(u!="walk"&&!(u in e)&&!(u in((l=e.alternate)!=null?l:{})))continue;let h=[];n.push(`${u==="walk"?"":`${u} `}${t((a=e[u])!=null?a:0)} ft. ${r(e[u])}`.trim()),e.alternate&&e.alternate[u]&&e.alternate[u].forEach(c=>{n.push(`${u==="walk"?"":`${u} `}${t(c!=null?c:0)} ft. ${r(c)}`.trim())})}let o=", ";if(e.choose){o="; ";let u=e.choose.from.sort();u.length>1?(`${u.slice(0,u.length-1).join(", ")}${u[u.length-1]}${e.choose.amount}`,e.choose.note&&`${e.choose.note}`):n.push(`${u} ${e.choose.amount} ft.${e.choose.note?` ${e.choose.note}`:""}`)}return n.join(o)}function Yp(i){if(typeof i.senses=="string")return i.senses;let e=[];return Array.isArray(i.senses)&&i.senses.length>0&&(e=[i.senses.join(", ").trim()]),i.passive&&e.push(`passive Perception ${i.passive}`),e.join(", ")}function Xp(i){var t,r,n;let e=[];return(t=i.source)!=null&&t.length&&e.push((r=v[i.source])!=null?r:i.source),(n=i.otherSources)!=null&&n.length&&e.push(...i.otherSources.map(s=>{var o;return(o=v[s.source])!=null?o:s.source})),e}function ei(i){return i.entries.reduce((t,r)=>{var s;if(typeof r!="string"){let o=(s=r.items)==null?void 0:s.map(l=>typeof l=="string"?{name:l,entries:[]}:"entry"in l?{name:l.name,entries:[l.entry]}:{name:l.name,entries:l.entries});return t.concat(o!=null?o:[])}return t.length>1||t[0].entries.push(r),t},[{name:i.name,entries:[]}]).map(({name:t,entries:r})=>({name:ht(t),desc:ht(r.join(`\n`))}))}var Jp="F",Qp="D",Zp="T",eg="S",tg="M",ig="L",rg="H",ng="G",sg="C",og="V",lg={[Jp]:"Fine",[Qp]:"Diminutive",[Zp]:"Tiny",[eg]:"Small",[tg]:"Medium",[ig]:"Large",[rg]:"Huge",[ng]:"Gargantuan",[sg]:"Colossal",[og]:"Varies"},ag="CoS",ug="DMG",hg="EEPC",cg="EET",fg="HotDQ",dg="LMoP",pg="Mag",gg="MM",mg="OotA",yg="PHB",bg="PotA",vg="RoT",wg="RoTOS",Ag="SCAG",Cg="SKT",Sg="ToA",Dg="ToD",Eg="TTP",xg="TftYP",Tg="TftYP-AtG",kg="TftYP-DiT",Mg="TftYP-TFoF",Rg="TftYP-THSoT",Ng="TftYP-TSC",Og="TftYP-ToH",Bg="TftYP-WPM",Pg="VGM",Lg="XGE",_g="OGA",Ig="MTF",Fg="WDH",Hg="WDMM",$g="GGR",Vg="KKW",qg="LLK",Ug="GoS",Wg="AI",zg="OoW",jg="ESK",Gg="DIP",Kg="HftT",Yg="DC",Xg="SLW",Jg="SDW",Qg="BGDIA",Zg="LR",em="AL",tm="SAC",im="ERLW",rm="EFR",nm="RMBRE",sm="RMR",om="MFF",lm="AWM",am="IMR",um="SADS",hm="EGW",cm="ToR",fm="DD",dm="FS",pm="US",gm="MOT",mm="IDRotF",ym="TCE",bm="VRGR",vm="HoL",wm="Screen",Am="ScreenWildernessKit",Cm="HF",Sm="CM",Dm="WBtW",Em="CRCotN",Zo="AL",xm=`${Zo}CurseOfStrahd`,Tm=`${Zo}ElementalEvil`,km=`${Zo}RageOfDemons`,Ei="PS",Mm=`${Ei}A`,Rm=`${Ei}I`,Nm=`${Ei}K`,Om=`${Ei}Z`,Bm=`${Ei}X`,Pm=`${Ei}D`,x="UA",Lm=`${x}Artificer`,_m=`${x}EladrinAndGith`,Im=`${x}Eberron`,Fm=`${x}FeatsForRaces`,Hm=`${x}FeatsForSkills`,$m=`${x}FiendishOptions`,Vm=`${x}Feats`,qm=`${x}GothicHeroes`,Um=`${x}ModernMagic`,Wm=`${x}StarterSpells`,zm=`${x}TheMysticClass`,jm=`${x}ThatOldBlackMagic`,Gm=`${x}TheRangerRevised`,Km=`${x}WaterborneAdventures`,Ym=`${x}VariantRules`,Xm=`${x}LightDarkUnderdark`,Jm=`${x}RangerAndRogue`,Qm=`${x}ATrioOfSubclasses`,Zm=`${x}BarbarianPrimalPaths`,e0=`${x}RevisedSubclasses`,t0=`${x}KitsOfOld`,i0=`${x}BardBardColleges`,r0=`${x}ClericDivineDomains`,n0=`${x}Druid`,s0=`${x}RevisedClassOptions`,o0=`${x}Fighter`,l0=`${x}Monk`,a0=`${x}Paladin`,u0=`${x}ModifyingClasses`,h0=`${x}Sorcerer`,c0=`${x}WarlockAndWizard`,f0=`${x}TheFaithful`,d0=`${x}WizardRevisited`,p0=`${x}ElfSubraces`,g0=`${x}MassCombat`,m0=`${x}ThreePillarExperience`,y0=`${x}GreyhawkInitiative`,b0=`${x}ThreeSubclasses`,v0=`${x}OrderDomain`,w0=`${x}CentaursMinotaurs`,A0=`${x}GiantSoulSorcerer`,C0=`${x}RacesOfEberron`,S0=`${x}RacesOfRavnica`,D0=`${x}WGE`,E0=`${x}OfShipsAndSea`,x0=`${x}Sidekicks`,T0=`${x}ArtificerRevisited`,k0=`${x}BarbarianAndMonk`,M0=`${x}SorcererAndWarlock`,R0=`${x}BardAndPaladin`,N0=`${x}ClericDruidWizard`,O0=`${x}FighterRangerRogue`,B0=`${x}ClassFeatureVariants`,P0=`${x}FighterRogueWizard`,L0=`${x}PrestigeClassesRunMagic`,_0=`${x}Ranger`,I0=`${x}2020SubclassesPt1`,F0=`${x}2020SubclassesPt2`,H0=`${x}2020SubclassesPt3`,$0=`${x}2020SubclassesPt4`,V0=`${x}2020SubclassesPt5`,q0=`${x}2020SpellsAndMagicTattoos`,U0=`${x}2020PsionicOptionsRevisited`,W0=`${x}2020SubclassesRevisited`,z0=`${x}2020Feats`,j0=`${x}2021GothicLineages`,G0=`${x}2021FolkOfTheFeywild`,K0=`${x}2021DraconicOptions`,Y0=`${x}2021MagesOfStrixhaven`,el="Adventurers League: ",xi="Plane Shift: ",T="Unearthed Arcana: ",Pt="Tales from the Yawning Portal",v={};v[ag]="Curse of Strahd";v[ug]="Dungeon Master\'s Guide";v[hg]="Elemental Evil Player\'s Companion";v[cg]="Elemental Evil: Trinkets";v[fg]="Hoard of the Dragon Queen";v[dg]="Lost Mine of Phandelver";v[pg]="Dragon Magazine";v[gg]="Monster Manual";v[mg]="Out of the Abyss";v[yg]="Player\'s Handbook";v[bg]="Princes of the Apocalypse";v[vg]="The Rise of Tiamat";v[wg]="The Rise of Tiamat Online Supplement";v[Ag]="Sword Coast Adventurer\'s Guide";v[Cg]="Storm King\'s Thunder";v[Sg]="Tomb of Annihilation";v[Dg]="Tyranny of Dragons";v[Eg]="The Tortle Package";v[xg]=Pt;v[Tg]=`${Pt}: Against the Giants`;v[kg]=`${Pt}: Dead in Thay`;v[Mg]=`${Pt}: The Forge of Fury`;v[Rg]=`${Pt}: The Hidden Shrine of Tamoachan`;v[Ng]=`${Pt}: The Sunless Citadel`;v[Og]=`${Pt}: Tomb of Horrors`;v[Bg]=`${Pt}: White Plume Mountain`;v[Pg]="Volo\'s Guide to Monsters";v[Lg]="Xanathar\'s Guide to Everything";v[_g]="One Grung Above";v[Ig]="Mordenkainen\'s Tome of Foes";v[Fg]="Waterdeep: Dragon Heist";v[Hg]="Waterdeep: Dungeon of the Mad Mage";v[$g]="Guildmasters\' Guide to Ravnica";v[Vg]="Krenko\'s Way";v[qg]="Lost Laboratory of Kwalish";v[Ug]="Ghosts of Saltmarsh";v[Wg]="Acquisitions Incorporated";v[zg]="The Orrery of the Wanderer";v[jg]="Essentials Kit";v[Gg]="Dragon of Icespire Peak";v[Kg]="Hunt for the Thessalhydra";v[Yg]="Divine Contention";v[Xg]="Storm Lord\'s Wrath";v[Jg]="Sleeping Dragon\'s Wake";v[Qg]="Baldur\'s Gate: Descent Into Avernus";v[Zg]="Locathah Rising";v[em]="Adventurers\' League";v[tm]="Sage Advice Compendium";v[im]="Eberron: Rising from the Last War";v[rm]="Eberron: Forgotten Relics";v[nm]="The Lost Dungeon of Rickedness: Big Rick Energy";v[sm]="Dungeons & Dragons vs. Rick and Morty: Basic Rules";v[om]="Mordenkainen\'s Fiendish Folio";v[lm]="Adventure with Muk";v[am]="Infernal Machine Rebuild";v[um]="Sapphire Anniversary Dice Set";v[hm]="Explorer\'s Guide to Wildemount";v[cm]="Tide of Retribution";v[fm]="Dangerous Designs";v[dm]="Frozen Sick";v[pm]="Unwelcome Spirits";v[gm]="Mythic Odysseys of Theros";v[mm]="Icewind Dale: Rime of the Frostmaiden";v[ym]="Tasha\'s Cauldron of Everything";v[bm]="Van Richten\'s Guide to Ravenloft";v[vm]="The House of Lament";v[wm]="Dungeon Master\'s Screen";v[Am]="Dungeon Master\'s Screen: Wilderness Kit";v[Cm]="Heroes\' Feast";v[Sm]="Candlekeep Mysteries";v[xm]=`${el}Curse of Strahd`;v[Tm]=`${el}Elemental Evil`;v[km]=`${el}Rage of Demons`;v[Mm]=`${xi}Amonkhet`;v[Rm]=`${xi}Innistrad`;v[Nm]=`${xi}Kaladesh`;v[Om]=`${xi}Zendikar`;v[Bm]=`${xi}Ixalan`;v[Pm]=`${xi}Dominaria`;v[Lm]=`${T}Artificer`;v[_m]=`${T}Eladrin and Gith`;v[Im]=`${T}Eberron`;v[Fm]=`${T}Feats for Races`;v[Hm]=`${T}Feats for Skills`;v[$m]=`${T}Fiendish Options`;v[Vm]=`${T}Feats`;v[qm]=`${T}Gothic Heroes`;v[Um]=`${T}Modern Magic`;v[Wm]=`${T}Starter Spells`;v[zm]=`${T}The Mystic Class`;v[jm]=`${T}That Old Black Magic`;v[Gm]=`${T}The Ranger, Revised`;v[Km]=`${T}Waterborne Adventures`;v[Ym]=`${T}Variant Rules`;v[Xm]=`${T}Light, Dark, Underdark!`;v[Jm]=`${T}Ranger and Rogue`;v[Qm]=`${T}A Trio of Subclasses`;v[Zm]=`${T}Barbarian Primal Paths`;v[e0]=`${T}Revised Subclasses`;v[t0]=`${T}Kits of Old`;v[i0]=`${T}Bard: Bard Colleges`;v[r0]=`${T}Cleric: Divine Domains`;v[n0]=`${T}Druid`;v[s0]=`${T}Revised Class Options`;v[o0]=`${T}Fighter`;v[l0]=`${T}Monk`;v[a0]=`${T}Paladin`;v[u0]=`${T}Modifying Classes`;v[h0]=`${T}Sorcerer`;v[c0]=`${T}Warlock and Wizard`;v[f0]=`${T}The Faithful`;v[d0]=`${T}Wizard Revisited`;v[p0]=`${T}Elf Subraces`;v[g0]=`${T}Mass Combat`;v[m0]=`${T}Three-Pillar Experience`;v[y0]=`${T}Greyhawk Initiative`;v[b0]=`${T}Three Subclasses`;v[v0]=`${T}Order Domain`;v[w0]=`${T}Centaurs and Minotaurs`;v[A0]=`${T}Giant Soul Sorcerer`;v[C0]=`${T}Races of Eberron`;v[S0]=`${T}Races of Ravnica`;v[D0]="Wayfinder\'s Guide to Eberron";v[E0]=`${T}Of Ships and the Sea`;v[x0]=`${T}Sidekicks`;v[T0]=`${T}Artificer Revisited`;v[k0]=`${T}Barbarian and Monk`;v[M0]=`${T}Sorcerer and Warlock`;v[R0]=`${T}Bard and Paladin`;v[N0]=`${T}Cleric, Druid, and Wizard`;v[O0]=`${T}Fighter, Ranger, and Rogue`;v[B0]=`${T}Class Feature Variants`;v[P0]=`${T}Fighter, Rogue, and Wizard`;v[L0]=`${T}Prestige Classes and Rune Magic`;v[_0]=`${T}Ranger`;v[I0]=`${T}2020 Subclasses, Part 1`;v[F0]=`${T}2020 Subclasses, Part 2`;v[H0]=`${T}2020 Subclasses, Part 3`;v[$0]=`${T}2020 Subclasses, Part 4`;v[V0]=`${T}2020 Subclasses, Part 5`;v[q0]=`${T}2020 Spells and Magic Tattoos`;v[U0]=`${T}2020 Psionic Options Revisited`;v[W0]=`${T}2020 Subclasses Revisited`;v[z0]=`${T}2020 Feats`;v[j0]=`${T}2021 Gothic Lineages`;v[G0]=`${T}2021 Folk of the Feywild`;v[K0]=`${T}2021 Draconic Options`;v[Y0]=`${T}2021 Mages of Strixhaven`;v[Dm]="The Wild Beyond the Witchlight";v[Em]="Critical Role: Call of the Netherdeep";function X0(i){var n,s,o;let e=i.skill;if(!e)return[];let t=[],r=[];for(let l of Object.keys(e)){if(l=="other"){let h=e[l];for(let c of h){let f=c.oneOf;if(!f)continue;let d=Object.keys(f).sort(),p=d.shift(),g=f[p],[,y]=(n=g==null?void 0:g.match(/.*?(\\d+)/))!=null?n:[];r.push({[`plus one of the following: ${p.charAt(0).toUpperCase()+p.slice(1)}`]:y});for(let b of d.slice(1)){let A=f[b],[,w]=(s=A==null?void 0:A.match(/.*?(\\d+)/))!=null?s:[];w&&r.push({[b]:w})}}continue}let a=e[l],[,u]=(o=a==null?void 0:a.match(/.*?(\\d+)/))!=null?o:[];u&&t.push({[l]:u})}return[...t.filter(l=>l),...r.filter(l=>l)]}async function gh(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=async n=>{var o,l,a,u,h,c,f,d,p,g,y,b,A,w,E,S,N,M,j,D,H,B,O,W,I;let s=[];try{let te=JSON.parse(n.target.result),Ce=[];te.creatures?Ce=te.creatures:Ce=[te];for(let F of Ce)try{let Se={image:null,name:F.name,source:"CritterDB",type:F.stats.race,subtype:"",size:F.stats.size,alignment:F.stats.alignment,hp:F.stats.hitPoints,hit_dice:`${Math.floor(F.stats.extraHealthFromConstitution/F.stats.abilityScoreModifiers.constitution)}d${F.stats.hitDieSize} + ${F.stats.extraHealthFromConstitution}`,ac:F.stats.armorClass,speed:F.stats.speed,stats:[F.stats.abilityScores.strength,F.stats.abilityScores.dexterity,F.stats.abilityScores.constitution,F.stats.abilityScores.intelligence,F.stats.abilityScores.wisdom,F.stats.abilityScores.charisma],damage_immunities:(l=(o=F.stats.damageImmunities)==null?void 0:o.join("; ").toLowerCase().trim())!=null?l:"",damage_resistances:(u=(a=F.stats.damageResistances)==null?void 0:a.join(", ").toLowerCase().trim())!=null?u:"",damage_vulnerabilities:(c=(h=F.stats.damageVulnerabilities)==null?void 0:h.join(", ").toLowerCase().trim())!=null?c:"",condition_immunities:(d=(f=F.stats.conditionImmunities)==null?void 0:f.join(", ").toLowerCase().trim())!=null?d:"",saves:(g=(p=F.stats.savingThrows)==null?void 0:p.map(k=>{var K;if(!(!("value"in k)&&!("modifier"in k)))return{[k.ability]:(K=k.value)!=null?K:k.modifier}}).filter(k=>k))!=null?g:[],skillsaves:(b=(y=F.stats.skills)==null?void 0:y.map(k=>{var K;if(!(!("value"in k)&&!("modifier"in k)))return{[k.name]:(K=k.value)!=null?K:k.modifier}}).filter(k=>k))!=null?b:[],senses:(w=(A=F.stats.senses)==null?void 0:A.join(", ").trim())!=null?w:"",languages:(S=(E=F.stats.languages)==null?void 0:E.join(", ").trim())!=null?S:"",cr:(N=F.stats.challengeRating)!=null?N:"",traits:(j=(M=F.stats.additionalAbilities)==null?void 0:M.map(k=>({name:k.name,desc:k.description.replace(/<[^>]*>/g,"")})))!=null?j:[],actions:(H=(D=F.stats.actions)==null?void 0:D.map(k=>({name:k.name,desc:k.description.replace(/<[^>]*>/g,"")})))!=null?H:[],reactions:(O=(B=F.stats.reactions)==null?void 0:B.map(k=>({name:k.name,desc:k.description.replace(/<[^>]*>/g,"")})))!=null?O:[],legendary_actions:(I=(W=F.stats.legendaryActions)==null?void 0:W.map(k=>({name:k.name,desc:k.description.replace(/<[^>]*>/g,"")})))!=null?I:[]};s.push(Se)}catch(Se){continue}e(s)}catch(te){t()}},r.readAsText(i)})}var kc=Gc(xc());async function Mc(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=async n=>{let s=n.target.result,l=new kc.DOMParser().parseFromString(s,"application/xml").getElementsByTagName("monster"),a=[];if(l.length){for(let u of Array.from(l))try{let h={image:null,name:ve(u,"name"),size:Uy(u),type:ve(u,"type"),subtype:ve(u,"subtype"),alignment:ve(u,"alignment"),ac:Wy(u),hp:Number(Tc(u,"hp")),hit_dice:Tc(u,"hit_dice"),speed:ve(u,"speed"),stats:[Number(ve(u,"str")),Number(ve(u,"dex")),Number(ve(u,"con")),Number(ve(u,"int")),Number(ve(u,"wis")),Number(ve(u,"cha"))],saves:Vy(u),skillsaves:Hy(u),damage_vulnerabilities:ve(u,"vulnerable"),damage_resistances:ve(u,"resist"),damage_immunities:ve(u,"immune"),condition_immunities:ve(u,"conditionImmune"),senses:ve(u,"senses"),languages:ve(u,"languages"),cr:ve(u,"cr"),traits:os(u,"trait"),spells:Fy(u),actions:os(u,"action"),legendary_actions:os(u,"legendary"),reactions:os(u,"reaction"),source:zy(u)};a.push(h)}catch(h){console.error(h);continue}e(a)}},r.readAsText(i)})}function ve(i,e){let t=i.getElementsByTagName(e);if(t&&t.length)return t[0].textContent}function os(i,e){var n;if(!((n=i.getElementsByTagName(e))!=null&&n.length))return[];let t=i.getElementsByTagName(e),r=[];for(let s of Array.from(t)){let o=s.getElementsByTagName("name");if(!o||!o.length||!o[0].textContent||o[0].textContent.includes("Spellcasting"))continue;let l=[],a=s.getElementsByTagName("text");for(let u of Array.from(a))l.push(u.textContent);r.push({name:o[0].textContent,desc:l.join(" ")})}return r}function Fy(i){var r;if(!((r=i.getElementsByTagName("trait"))!=null&&r.length))return[];let t=Array.from(i.getElementsByTagName("trait")).find(n=>{var s;return(s=n.getElementsByTagName("name")[0])==null?void 0:s.textContent.includes("Spellcasting")});return t?Array.from(t.getElementsByTagName("text")).map(n=>n.textContent.replace(/(•|\u2022)/u,"").trim()).filter(n=>n.length):[]}function Hy(i){var r;if(!((r=i.getElementsByTagName("skill"))!=null&&r.length))return[];let e=i.getElementsByTagName("skill")[0].textContent.split(", "),t=[];return e.forEach(n=>{let s=n.split(/\\s[\\+\\-]/);t.push({[s[0]]:Number(s[1])})}),t}var $y={Str:"strength",Dex:"dexterity",Con:"constitution",Int:"intelligence",Wis:"wisdom",Cha:"charisma"};function Vy(i){var r;if(!((r=i.getElementsByTagName("save"))!=null&&r.length))return[];let e=i.getElementsByTagName("save")[0].textContent.split(", "),t=[];return e.forEach(n=>{let s=n.split(/\\s[\\+\\-]/);t.push({[$y[s[0]]]:Number(s[1])})}),t}function Tc(i,e){var s,o;if(!((s=i.getElementsByTagName("hp"))!=null&&s.length))return"";let t=i.getElementsByTagName("hp")[0].textContent,[,r,n]=(o=t.match(/(\\d+) \\(([\\s\\S]+)\\)/))!=null?o:[,"",""];return{hp:r,hit_dice:n}[e]}var qy={T:"tiny",S:"small",M:"medium",L:"large",H:"huge",G:"gargantuan"};function Uy(i){var e;return i.getElementsByTagName("size")&&(e=qy[i.getElementsByTagName("size")[0].textContent])!=null?e:""}function Wy(i){var e;if(i.getElementsByTagName("ac")){let[,t]=(e=i.getElementsByTagName("ac")[0])==null?void 0:e.textContent.match(/(\\d+)/);return Number(t)}return 0}function zy(i){var t,r,n,s,o,l;let e="Unknown";if((t=i.getElementsByTagName("source"))!=null&&t.length)e=i.getElementsByTagName("source")[0].textContent;else if((r=i.getElementsByTagName("trait"))!=null&&r.length&&Array.from(i.getElementsByTagName("trait")).find(a=>{var u;return((u=a.getElementsByTagName("name"))==null?void 0:u[0].textContent)=="Source"})){let a=Array.from(i.getElementsByTagName("trait")).find(u=>{var h,c;return((c=(h=u.getElementsByTagName("name"))==null?void 0:h[0])==null?void 0:c.textContent)=="Source"});e=(o=(s=(n=a==null?void 0:a.getElementsByTagName("text"))==null?void 0:n[0])==null?void 0:s.textContent)==null?void 0:o.replace(/p. \\d+/,"").trim()}else if((l=i.getElementsByTagName("description"))!=null&&l.length){let a=i.getElementsByTagName("description"),u="Source: ";if(a[0].textContent.includes(u)){let h=a[0].textContent.lastIndexOf(u);e=a[0].textContent.slice(h+u.length).split(/, ?/)[0]}}return e}var jy={STR:"strength",DEX:"dexterity",CON:"constitution",INT:"intelligence",WIS:"wisdom",CHA:"charisma"};async function Rc(i){return new Promise((e,t)=>{let r=new FileReader,n=[];r.onload=async s=>{var o,l,a,u,h,c,f,d,p,g,y,b,A,w,E,S,N,M,j,D,H,B,O,W,I,te,Ce,F,Se,k,K,ue,pe,Je,pt,Ht,Wi,Al,Cl,Sl,Dl,El,xl,Tl,kl,Ml,Rl,Nl,Ol,Bl,Pl,Ll,_l;try{let as=JSON.parse(s.target.result),Hc=Object.keys(as).filter(us=>/^Creatures\\./.test(us));for(let us of Hc)try{let ie=as[us],$c={name:ie.Name,source:(o=ie.Source)!=null&&o.trim().length?(l=ie.Source)==null?void 0:l.trim():"Unknown",type:(h=(u=(a=ie.Type)==null?void 0:a.split(/,\\s?/))==null?void 0:u[0])==null?void 0:h.trim(),subtype:"",size:"",alignment:(d=(f=(c=ie.Type)==null?void 0:c.split(/,\\s?/))==null?void 0:f[1])==null?void 0:d.trim(),hp:(p=ie.HP)==null?void 0:p.Value,hit_dice:(b=(y=(g=ie.HP)==null?void 0:g.Notes)==null?void 0:y.replace(/([()])/g,""))==null?void 0:b.trim(),ac:ie.AC.Value,speed:(w=(A=ie.Speed)==null?void 0:A.join(", "))==null?void 0:w.trim(),stats:Object.values((E=ie.Abilities)!=null?E:{}),damage_immunities:(j=(M=(N=(S=ie.DamageImmunities)==null?void 0:S.join("; "))==null?void 0:N.toLowerCase())==null?void 0:M.trim())!=null?j:"",damage_resistances:(O=(B=(H=(D=ie.DamageResistances)==null?void 0:D.join(", "))==null?void 0:H.toLowerCase())==null?void 0:B.trim())!=null?O:"",damage_vulnerabilities:(Ce=(te=(I=(W=ie.DamageVulnerabilities)==null?void 0:W.join(", "))==null?void 0:I.toLowerCase())==null?void 0:te.trim())!=null?Ce:"",condition_immunities:(K=(k=(Se=(F=ie.ConditionImmunities)==null?void 0:F.join(", "))==null?void 0:Se.toLowerCase())==null?void 0:k.trim())!=null?K:"",saves:(pe=(ue=ie.Saves)==null?void 0:ue.map(({Name:ge,Modifier:hs})=>({[jy[ge]]:hs})))!=null?pe:[],skillsaves:(pt=(Je=ie.Skills)==null?void 0:Je.map(({Name:ge,Modifier:hs})=>({[ge]:hs})))!=null?pt:[],senses:(Al=(Wi=(Ht=ie.Senses)==null?void 0:Ht.join(", "))==null?void 0:Wi.trim())!=null?Al:"",languages:(Dl=(Sl=(Cl=ie.Languages)==null?void 0:Cl.join(", "))==null?void 0:Sl.trim())!=null?Dl:"",cr:(xl=(El=ie.Challenge)==null?void 0:El.trim())!=null?xl:"",traits:(kl=(Tl=ie.Traits)==null?void 0:Tl.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?kl:[],actions:(Rl=(Ml=ie.Actions)==null?void 0:Ml.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?Rl:[],bonus_actions:(Ol=(Nl=ie.BonusActions)==null?void 0:Nl.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?Ol:[],reactions:(Pl=(Bl=ie.Reactions)==null?void 0:Bl.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?Pl:[],legendary_actions:(_l=(Ll=ie.LegendaryActions)==null?void 0:Ll.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?_l:[],image:null};n.push($c)}catch(ie){continue}e(n)}catch(as){t()}},r.readAsText(i)})}async function Oc(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=async n=>{try{let s=JSON.parse(n.target.result),o=[fe(s.strength),fe(s.dexterity),fe(s.constitution),fe(s.intelligence),fe(s.wisdom),fe(s.charisma)],l=fe(s.ac),a=tb(s.specials),u=ob(s.spelltype,s.focuspoints,s.cantriplevel,s.spelldc,s.spellattack,s.spells,s.constant),h=s.creature||"Creature",c={layout:"Basic Pathfinder 2e Layout",name:s.name,level:h+" "+s.level.toString(),size:s.size,trait_03:s.type,modifier:fe(s.perception),perception:ib(s.perception),abilities_top:a.filter(d=>d.type===Qy).map(d=>({name:d.name,desc:d.desc})),abilities_mid:a.filter(d=>d.type===Zy).map(d=>({name:d.name,desc:d.desc})),abilities_bot:a.filter(d=>d.type===eb).map(d=>({name:d.name,desc:d.desc})),type:s.type,subtype:"",alignment:s.alignment,ac:l,armorclass:bl(l,fe(s.fortitude),fe(s.reflex),fe(s.will)),hp:fe(s.hp)||1,health:nb(s.hp,s.immunity,s.resistance,s.weakness),attacks:sb(s.strikes),spellcasting:u,speed:s.speed||"5 feet",stats:o,abilityMods:o,damage_vulnerabilities:s.weakness,damage_resistances:s.resistance,damage_immunities:"",condition_immunities:s.immunity,senses:s.perception.note,languages:s.languages,cr:s.level,bestiary:!1,skills:lb(s)},f=ab(s.traits);for(let d=0;d{let t=rb(e.actions),r=Bc(ub(e.description));return{name:e.name,desc:t+r,type:e.type}})}function ib(i){let e=ke(fe(i)),t=i.note?` ${i.note};`:"";return[{name:"Perception",desc:`Perception ${e};${t}`}]}function qi(i){return i<0?`${i} (1d20${i})`:`+${i} (1d20+${i})`}function ke(i){return i>=0?`+${i}`:i.toString()}function bl(i,e,t,r){let n=qi(e),s=qi(t),o=qi(r);return[{name:"AC",desc:`${i}; __Fort__: ${n}; __Ref__: ${s}; __Will__: ${o};`}]}function rb(i){let t={reaction:Gy,one:ls,two:Ky,three:Yy,free:Xy,none:Jy}[i];return t||i}function nb(i,e,t,r){let n=fe(i)||1,s=fe(e),o=fe(t),l=fe(r),a=i.note?` (${i.note});`:"",u=s?` __Immunities__ ${s};`:"",h=o?` __Resistances__ ${o};`:"",c=l?` __Weaknesses__ ${l};`:"";return[{name:"HP",desc:`${n};${a}${u}${h}${c}`}]}function sb(i){return i.map(e=>{let t=e.traits?` (${e.traits});`:"",r=e.damage?` __Damage__ ${Bc(e.damage)}`:"",n=ke(parseInt(e.attack));return{name:e.type,desc:ls+` ${e.name} ${n}${t}${r}`}})}function ob(i,e,t,r,n,s,o){if(s.join(",").split(",").map(c=>c.trim()).filter(c=>c!=="").length===0)return[];let a=e?`${e} Focus Points, `:"",u=10;var h="";for(let c=0;c({skill:n,value:fe(i[n]),note:i[n].note})).filter(n=>n.value!==0).map(n=>`__${zr(n.skill)}__: ${qi(n.value)}`+(n.note?` (${n.note})`:""),"").join(" ");return r.length===0?[]:[{name:"Skills",desc:r}]}function ab(i){let e=i.split(",");return e.forEach(t=>t.trim()),e}function Bc(i){return i.replace(/ ?(\\d+d\\d+( ?[+-] ?\\d+)?)/g," $1 ($1)")}function ub(i){return i.replace(/((Trigger)|(Requirements)|(Effect))/g,"__$1__")}function Nc(i){let e=["th","st","nd","rd"],t=i%100;return i+(e[(t-20)%10]||e[t]||e[0])}function zr(i){return i.replace(/\\w\\S*/g,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase())}var hb={acrobatics:"dex",arcana:"int",athletics:"str",crafting:"int",deception:"cha",diplomacy:"cha",intimidation:"cha",medicine:"wis",nature:"wis",occultism:"int",performance:"cha",religion:"wis",society:"int",stealth:"dex",survival:"wis",thievery:"dex",lore:"int"},cb=["Tiny","Small","Medium","Large","Huge"];async function Lc(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=()=>{try{let s=JSON.parse(r.result).build,o=s.attributes,l=s.abilities,a=s.proficiencies,u=s.acTotal.acTotal,h=ai(l.str),c=ai(l.dex),f=ai(l.con),d=ai(l.int),p=ai(l.wis),g=ai(l.cha),y=p+a.perception+s.level,b=o.ancestryhp+(o.classhp+o.bonushp+f+o.bonushpPerLevel)*s.level,A=Ui(l.con,a.fortitude,s.level),w=Ui(l.dex,a.reflex,s.level),E=Ui(l.wis,a.will,s.level),S={layout:"Basic Pathfinder 2e Layout",source:"Pathbuilder",sourcebook:i.name,columns:2,name:s.name,player:!0,level:s.level,rare_01:"unique",trait_01:s.ancestry,trait_02:s.heritage,trait_03:s.background,alignment:s.alignment,size:cb[s.size],modifier:y,perception:mb(y),type:s.class,subtype:"",ac:u,armorclass:bl(u,A,w,E),hp:b,health:pb(b,s.resistances),attacks:gb(s.weapons),abilities_top:[{name:"Class DC",desc:String(10+Ui(l[s.keyability],a.classDC,s.level))},bb(s.equipment),vb(s.armor)],abilities_bot:[Pc("Feats",s.feats.map(N=>N[0])),Pc("Specials",s.specials)],abilityMods:[ke(h),ke(c),ke(f),ke(d),ke(p),ke(g)],skills:[yb(l,a,s.level),{name:"Lore",desc:s.lores.map(N=>`[[${N[0]}]] ${qi(Ui(l.int,Number(N[1]),s.level))}`).join(", ")}],speed:`${o.speed+o.speedBonus} feet`,spellcasting:fb(s),damage_vulnerabilities:"",damage_resistances:s.resistances.join(", "),damage_immunities:"",condition_immunities:"",senses:"",languages:s.languages.join(", "),cr:s.level,bestiary:!1,stats:null};e([S])}catch(n){console.error("Error importing Pathbuilder file",n),t(n)}},r.readAsText(i)})}function fb(i){let e=i.spellCasters.map(r=>r.spells.map(n=>n.list.length===0?{}:{name:`${r.name} ${n.spellLevel===0?"Cantrips":`Rank ${n.spellLevel} (${r.perDay[n.spellLevel]})`}`,desc:`[[${n.list.join("]], [[")}]]`})).flat();console.log("getSpells - spells",e);let t=db(i.focus,i.level);return console.log("getSpells - focusSpells",t),[e,t].flat()}function db(i,e){let t=[];return Object.keys(i).forEach(r=>{let n=i[r];Object.keys(n).forEach(s=>{let o=n[s],l=o.focusCantrips;(l==null?void 0:l.length)>0&&t.push({name:`${zr(r)} Focus Cantrips ${ke(o.abilityBonus+o.proficiency+e)}`,desc:`[[${l.join("]], [[")}]]`});let a=o.focusSpells;(a==null?void 0:a.length)>0&&t.push({name:`${zr(r)} Focus Spells ${ke(o.abilityBonus+o.proficiency+e)}`,desc:`[[${a.join("]], [[")}]]`})})}),t}function pb(i,e){let t=e.join(", ");return[{name:"HP",desc:`${i} ${t?`__Resistances__ (${t})`:""}`}]}function gb(i){return i.map(e=>{let t=e.damageBonus?ke(e.damageBonus):"",r="1";return e.str=="striking"?r="2":e.str=="greater striking"&&(r="3"),{name:"Melee",desc:ls+`[[${e.name}|${e.display}]] ${ke(e.attack)} __Damage__ ${r}${e.die}${t} _(${e.damageType})_`}})}function mb(i){let e=ke(i);return[{name:"Perception",desc:`${e} (1d20${e});`}]}function yb(i,e,t){return{name:"Skills",desc:["acrobatics","arcana","athletics","crafting","deception","diplomacy","intimidation","medicine","nature","occultism","performance","religion","society","stealth","survival","thievery"].filter(o=>e[o]>0).map(o=>{let l=o,u=i[hb[o]],h=e[l],c=Ui(u,h,t);return`${zr(l)} ${ke(c)}`}).join(", ")}}function bb(i){let e=[{prefix:"Scroll of ",length:10},{prefix:"Potion of ",length:9},{prefix:"Wand of ",length:7}];function t(o){for(let{prefix:a,length:u}of e)if(o.startsWith(a))return`${a}[[${o.slice(u)}]]`;let l=o.match(/ \\+(\\d)$/);return l&&(o=o.slice(0,-3)+` (+${l[1]})`),`[[${o}]]`}function r(o){return o.map(([l,a])=>[t(l),a])}function n(o){return o.map(([l,a])=>`${a>1?`${a}x `:""}${l}`).join(", ")}let s=r(i);return{name:"Items",desc:n(s)}}function vb(i){return{name:"Armor",desc:i.map(e=>`${e.qty>1?String(e.qty)+"x ":""}[[${e.name}${e.display?"|"+e.display:""}]]`).join(", ")}}function Pc(i,e){return{name:i,desc:"[["+e.join("]], [[")+"]]"}}function ai(i){return Math.floor((i-10)/2)}function Ui(i,e,t){return ai(i)+e+t}var _c={0:{cr:"0",value:0,xp:0},"1/8":{cr:"1/8",value:.125,xp:25},"1/4":{cr:"1/4",value:.25,xp:50},"1/2":{cr:"1/2",value:.5,xp:100},"0.125":{cr:"1/8",value:.125,xp:25},"0.25":{cr:"1/4",value:.25,xp:50},"0.5":{cr:"1/2",value:.5,xp:100},1:{cr:"1",value:1,xp:200},2:{cr:"2",value:2,xp:450},3:{cr:"3",value:3,xp:700},4:{cr:"4",value:4,xp:1100},5:{cr:"5",value:5,xp:1800},6:{cr:"6",value:6,xp:2300},7:{cr:"7",value:7,xp:2900},8:{cr:"8",value:8,xp:3900},9:{cr:"9",value:9,xp:5e3},10:{cr:"10",value:10,xp:5900},11:{cr:"11",value:11,xp:7200},12:{cr:"12",value:12,xp:8400},13:{cr:"13",value:13,xp:1e4},14:{cr:"14",value:14,xp:11500},15:{cr:"15",value:15,xp:13e3},16:{cr:"16",value:16,xp:15e3},17:{cr:"17",value:17,xp:18e3},18:{cr:"18",value:18,xp:2e4},19:{cr:"19",value:19,xp:22e3},20:{cr:"20",value:20,xp:25e3},21:{cr:"21",value:21,xp:33e3},22:{cr:"22",value:22,xp:41e3},23:{cr:"23",value:23,xp:5e4},24:{cr:"24",value:24,xp:62e3},25:{cr:"25",value:25,xp:75e3},26:{cr:"26",value:26,xp:9e4},27:{cr:"27",value:27,xp:105e3},28:{cr:"28",value:28,xp:12e4},29:{cr:"29",value:29,xp:135e3},30:{cr:"30",value:30,xp:155e3}};function Ct(i){return Math.floor(((i!=null?i:10)-10)/2)}var Ic={tiny:4,small:6,medium:8,large:10,huge:12,gargantuan:20},wb={str:"strength",dex:"dexterity",con:"constitution",int:"intelligence",wis:"wisdom",cha:"charisma"},vl=class i{constructor(e){this.monster=e;this.proficiency=this.getProf(this.monster);this.stats={str:this.monster.strPoints,dex:this.monster.dexPoints,con:this.monster.conPoints,int:this.monster.intPoints,wis:this.monster.wisPoints,cha:this.monster.chaPoints};this.modifiers={str:Ct(this.stats.str),dex:Ct(this.stats.dex),con:Ct(this.stats.con),int:Ct(this.stats.int),wis:Ct(this.stats.wis),cha:Ct(this.stats.cha)}}static parse(e){var n,s,o,l,a,u,h,c,f,d,p,g,y,b,A,w;let t=new i(e);return{image:null,name:e.name,source:"TetraCube",type:e.type,subtype:e.tag,size:e.size,alignment:e.alignment,hp:(n=t.getHP(e))==null?void 0:n.hp,hit_dice:(s=t.getHP(e))==null?void 0:s.dice,ac:(a=(l=((o=e.ac)!=null?o:[])[0])==null?void 0:l.ac)!=null?a:"",speed:t.getSpeedString(e),stats:[e.strPoints,e.dexPoints,e.conPoints,e.intPoints,e.wisPoints,e.chaPoints],damage_immunities:t.parseImmune(e,"i"),damage_resistances:t.parseImmune(e,"r"),damage_vulnerabilities:t.parseImmune(e,"v"),condition_immunities:t.parseConditions(e),saves:t.getSaves(e),skillsaves:t.getSkills(e),senses:t.getSenses(e),languages:t.getLanguages(e),cr:(u=e.cr)!=null?u:"",traits:t.getTraits(e.abilities),actions:t.getTraits(e.actions),bonus_actions:t.getTraits(e.bonusActions),reactions:t.getTraits(e.reactions),legendary_description:(h=e.isLegendary)!=null&&h?e.legendariesDescription:null,legendary_actions:(c=e.isLegendary)!=null&&c?t.getTraits(e.legendaries):null,mythic_description:(f=e.isMythic)!=null&&f?e.mythicDescription:null,mythic_actions:(d=e.isMythic)!=null&&d?t.getTraits(e.mythics):null,lair_description:(p=e.isLair)!=null&&p?e.lairDescription:null,lair_actions:(g=e.isLair)!=null&&g?t.getTraits(e.lairs):null,lair_description_end:(y=e.isLair)!=null&&y?e.lairDescriptionEnd:null,regional_description:(b=e.isRegional)!=null&&b?e.regionalDescription:null,regional_actions:(A=e.isRegional)!=null&&A?t.getTraits(e.regionals):null,regional_description_end:(w=e.isRegional)!=null&&w?e.regionalDescriptionEnd:null,spells:t.getSpells(e.abilities)}}getHP(e){var t,r;if(e.customHP||e.hitDice&&/(\\d+) \\((.+)\\)/.test(e.hpText)){let[n,s,o]=(t=e.hpText.match(/(\\d+) \\((.+)\\)/))!=null?t:[];return{hp:s,dice:o}}if(e.hitDice){let n=Number(e.hitDice),s=(r=Ic[e.size])!=null?r:Ic.medium,o=this.modifiers.con,l=n*s/(2+.5)+o*n,a=o>0?"+":"-",u=o==0?"":` ${a} ${o*n}`;return{hp:l,dice:`${n}d${s}${u}`}}}getSpeedString(e){if(e.customSpeed)return e.speedDesc;let t=[e.speed+" ft."];return e.burrowSpeed>0&&t.push("burrow "+e.burrowSpeed+" ft."),e.climbSpeed>0&&t.push("climb "+e.climbSpeed+" ft."),e.flySpeed>0&&t.push("fly "+e.flySpeed+" ft."+(e.hover?" (hover)":"")),e.swimSpeed>0&&t.push("swim "+e.swimSpeed+" ft."),t.join(", ")}parseImmune(e,t){let r=[];"damagetypes"in e&&Array.isArray(e.damagetypes)&&r.push(...e.damagetypes.filter(s=>s.type==t).map(s=>s.name));let n=[];return"specialdamage"in e&&Array.isArray(e.specialdamage)&&n.push(...e.specialdamage.filter(s=>s.type==t).map(s=>s.name)),[r.join(", "),n.join(", ")].filter(s=>s&&s.length).join("; ")}getLanguages(e){let t=[],r=[],n=[];for(let s=0;s0&&t.push([r.slice(0,r.length-2).map(s=>s.name).join(", "),r.slice(-1).map(s=>s.name)].filter(s=>s).join(" and ")),n.length>0&&t.push([n.slice(0,n.length-2).map(s=>s.name).join(", "),n.slice(-1).map(s=>s.name)].filter(s=>s).join(" and ")),e.telepathy>0&&t.push("telepathy "+e.telepathy+" ft."),t.length==0&&t.push("—"),t.join("; ")}getSenses(e){let t=[];e.blindsight>0&&t.push("blindsight "+e.blindsight+" ft."+(e.blind?" (blind beyond this radius)":"")),e.darkvision>0&&t.push("darkvision "+e.darkvision+" ft."),e.tremorsense>0&&t.push("tremorsense "+e.tremorsense+" ft."),e.truesight>0&&t.push("truesight "+e.truesight+" ft.");let r=e.skills.find(s=>s.name=="perception"),n=10+Ct(e.wisPoints);return r!=null&&(n+=this.proficiency*("note"in r?2:1)),t.push("passive Perception "+n),t.join(", ")}transformString(e){return e.replace(/(_|\\*|\\s*>\\s*)/g,"").replace(/\\[MON(S)?\\]/g,`${this.monster.shortName&&this.monster.shortName.length?this.monster.shortName:this.monster.name}$1`).replace(/\\[(\\w+)\\]/g,(t,r)=>{if(r=r.toLowerCase(),!(r in this.modifiers))return t;let n=this.modifiers[r];return`${n>=0?"+":""}${n}`}).replace(/\\[(\\w+) (ATK|SAVE)\\s?(?:([+-])\\s?(\\d+))?\\]/g,(t,r,n="ATK",s="+",o=0)=>{if(r=r.toLowerCase(),!(r in this.modifiers))return t;o=s=="+"?Number(o):-Number(o);let l=(n=="ATK"?0:8)+this.modifiers[r]+this.proficiency+o;return`${l>=0?"+":""}${l}`}).replace(/\\[(\\w+)?\\s?(\\d*[dD]\\d+)\\s?(?:([+-])\\s?(\\d+))?\\]/g,(t,r,n,s="+",o=0)=>{var c;r=r.toLowerCase();let[,l=1,a]=(c=n.match(/(\\d*)[dD](\\d+)/))!=null?c:[];if(l||(l=1),!a)return t;o=s=="+"?Number(o):-Number(o),r in this.modifiers&&(o+=this.modifiers[r]);let u=Math.floor((a/2+.5)*l)+o,h=[`${l}d${a}`];return o&&o!=0&&(h.push(o>=0?"+":"-"),h.push(o)),`${u} (${h.join(" ")})`})}getTraits(e){return!e||!e.length?void 0:e.filter(r=>r.name!="Spellcasting").map(r=>({name:r.name,desc:this.transformString(r.desc)}))}getSpells(e){var n;if(!e.abilities||!e.abilities.length)return;let{desc:t}=(n=e.abilities.find(s=>s.name=="Spellcasting"))!=null?n:{};return t?this.transformString(t).trim().split(`\n`).filter(s=>s.length):void 0}getSaves(e){if(!("sthrows"in e)||!Array.isArray(e.sthrows)||!e.sthrows.length)return[];let t=this.proficiency,r=[];for(let n of e.sthrows){let s=n.name,o=Ct(Number(e[`${s}Points`]));isNaN(o)||r.push({[wb[s]]:o+t})}return r}getSkills(e){if(!("skills"in e)||!Array.isArray(e.skills)||!e.skills.length)return[];let t=[],r=this.proficiency;for(let n of e.skills){let s=n.stat,o=Ct(Number(e[`${s}Points`]));if(isNaN(o))continue;let l="note"in n;t.push({[n.name]:r+o+o*Number(l)})}return t}getProf(e){var r,n;let t=0;return e.cr=="*"&&(t=e.customProf),"cr"in e&&e.cr in _c&&(t=Math.max(Math.floor(2+(((n=(r=_c[e.cr])==null?void 0:r.value)!=null?n:0)-1)/4),2)),isNaN(Number(t))?0:Number(t)}parseConditions(e){if("conditions"in e&&Array.isArray(e.conditions))return e.conditions.map(t=>t.name).join(", ")}};async function Fc(i){return new Promise((e,t)=>{let r=new FileReader,n=[];r.onload=async s=>{try{let o=JSON.parse(s.target.result),l;"monster"in o?l=o.monster:Array.isArray(o)?l=o:typeof o=="object"?l=[o]:t("Invalid monster JSON provided.");let a=[];for(let u of l)try{let h=vl.parse(u);a.push(h)}catch(h){console.error(h);continue}e(a)}catch(o){console.error("reject!!!",o),t(o)}},r.readAsText(i)})}var wl=self;wl.onmessage=async i=>{if(!i.data)return;let{files:e,source:t}=i.data,r=[];for(let n of e)switch(t){case"5e":{let s=await ph(n);r.push(...s!=null?s:[]);break}case"critter":{let s=await gh(n);r.push(...s!=null?s:[]);break}case"improved":{let s=await Rc(n);r.push(...s!=null?s:[]);break}case"appfile":{let s=await Mc(n);r.push(...s!=null?s:[]);break}case"tetra":{let s=await Fc(n);r.push(...s!=null?s:[]);break}case"PF2eMonsterTool":{let s=await Oc(n);r.push(...s!=null?s:[]);break}case"pathbuilder":{let s=await Lc(n);r.push(...s!=null?s:[]);break}case"generic":{let s=await new Promise((o,l)=>{let a=new FileReader;a.onload=async u=>{try{let h=JSON.parse(u.target.result),c=[];if(Array.isArray(h))c=h;else if(typeof h=="object")if("name"in h)c=[h];else for(let d in h)Array.isArray(h[d])&&c.push(...h[d]);else l("Invalid monster JSON provided. Must be array or object.");let f=[];for(let d of c)"name"in d&&f.push(d);o(f)}catch(h){console.error("reject!!!",h),l(h)}},a.readAsText(n)});r.push(...s!=null?s:[])}default:console.error(`Unknown source: ${t}`)}wl.postMessage({monsters:r})};wl.addEventListener("unhandledrejection",function(i){throw i.reason});\n')}var Wi=require("obsidian");var wl=class extends _t{constructor(){super(...arguments);this.saved=!1}display(){this.titleEl.createSpan({text:"Set Sources"}),new Wi.Setting(this.contentEl).setName("A source could not be found for some imported monsters. Do you wish to manually add one?").addText(t=>{t.setPlaceholder("Unknown").onChange(i=>{this.source=i})}),this.buildButtons(this.contentEl)}buildButtons(t){new Wi.Setting(t).addButton(i=>i.setCta().setIcon("checkmark").setTooltip("Save").onClick(()=>{this.saved=!0,this.close()})).addExtraButton(i=>i.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.close()}))}onOpen(){this.display()}},ey=async n=>new Promise(e=>{let t=new wl(n);t.onClose=()=>{t.saved||e(null),e(t.source)},t.open()}),Sa=class{constructor(e){this.plugin=e;this.workers=new Map}async import(e,t){return new Promise(i=>{let a=new kl,s=Q();this.workers.set(s,a),a.onmessage=async r=>{let{monsters:o}=r.data??{monsters:[]};if(o){new Wi.Notice(`Successfully imported ${o.length} Monsters`);let l=o.filter(d=>d.source=="Unknown"||!d.source),c;l.length&&(c=await ey(this.plugin))&&l.forEach(d=>d.source=c)}a.terminate(),this.workers.delete(s),i(o)},a.onerror=r=>{new Wi.Notice(`There was an error importing the file. + `)&&e.p(t),s.p(u,h)},i(u){o||(E(s),o=!0)},o(u){I(s),o=!1},d(u){u&&(e.d(),x(i),x(r)),c[a].d(u)}}}function Z0(n,e,t){let i,a,{layout:s}=e,{plugin:r}=e,o=Le(s);Se(n,o,C=>t(14,i=C)),li("plugin",r),li("layout",o);let l="",c=["General","Appearance","Advanced","Previewer"],d=c[0],u=!1,h=C=>{if(C.empty(),u){let M=i.name;new nn.TextComponent(C).setValue(M).onChange(k=>{M=k});let w=C.createDiv("buttons");new nn.ExtraButtonComponent(w).setIcon("checkmark").setTooltip("Save").onClick(()=>{u=!1,Ae(o,i.name=M,i),h(C)}),new nn.ExtraButtonComponent(w).setIcon("cross-in-box").setTooltip("Cancel").onClick(()=>{u=!1,h(C)})}else C.createEl("h5",{text:i.name}),new nn.ExtraButtonComponent(C.createDiv("buttons")).setIcon("pencil").setTooltip("Edit Name").onClick(()=>{u=!0,h(C)})},f=Me(),m=C=>{new nn.ButtonComponent(C).setIcon("checkmark").setCta().setTooltip("Save").onClick(()=>{f("saved")})},p=C=>{new nn.ExtraButtonComponent(C).setIcon("cross").setTooltip("Cancel").onClick(()=>{f("cancel")})},b=kt(o,C=>r.manager.getSheetRules(C));Se(n,b,C=>t(2,a=C));let _=C=>t(1,d=C),S=C=>t(0,l=C.detail);return n.$$set=C=>{"layout"in C&&t(9,s=C.layout),"plugin"in C&&t(10,r=C.plugin)},[l,d,a,o,c,h,m,p,b,s,r,_,S]}var vl=class extends U{constructor(e){super(),G(this,e,Z0,Q0,j,{layout:9,plugin:10},Y0)}},Eh=vl;var Fi=(n=>(n.None="None",n.Average="Average",n.Roll="Roll",n))(Fi||{});var Cf=Ba(Ts());function kl(){return na('var Vc=Object.create;var Il=Object.defineProperty;var qc=Object.getOwnPropertyDescriptor;var Uc=Object.getOwnPropertyNames;var Wc=Object.getPrototypeOf,zc=Object.prototype.hasOwnProperty;var St=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var jc=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Uc(e))!zc.call(i,n)&&n!==t&&Il(i,n,{get:()=>e[n],enumerable:!(r=qc(e,n))||r.enumerable});return i};var Gc=(i,e,t)=>(t=i!=null?Vc(Wc(i)):{},jc(e||!i||!i.__esModule?Il(t,"default",{value:i,enumerable:!0}):t,i));var ii=St(Ae=>{"use strict";function J0(i,e,t){if(t===void 0&&(t=Array.prototype),i&&typeof t.find=="function")return t.find.call(i,e);for(var r=0;r-1}var o2=Ti({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Ae.assign=Q0;Ae.find=J0;Ae.freeze=Ti;Ae.HTML_BOOLEAN_ATTRIBUTES=mh;Ae.HTML_RAW_TEXT_ELEMENTS=Cr;Ae.HTML_VOID_ELEMENTS=yh;Ae.hasDefaultHTMLNamespace=r2;Ae.hasOwn=ti;Ae.isHTMLBooleanAttribute=Z0;Ae.isHTMLRawTextElement=t2;Ae.isHTMLEscapableRawTextElement=i2;Ae.isHTMLMimeType=bh;Ae.isHTMLVoidElement=e2;Ae.isValidMimeType=s2;Ae.MIME_TYPE=Sr;Ae.NAMESPACE=o2});var kr=St(Tr=>{"use strict";var l2=ii();function wh(i,e){i.prototype=Object.create(Error.prototype,{constructor:{value:i},name:{value:i.name,enumerable:!0,writable:e}})}var Er=l2.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),Ah=Object.keys(Er);function Ch(i){return typeof i=="number"&&i>=1&&i<=25}function a2(i){return typeof i=="string"&&i.substring(i.length-Er.Error.length)===Er.Error}function xr(i,e){Ch(i)?(this.name=Ah[i],this.message=e||""):(this.message=i,this.name=a2(e)?e:Er.Error),Error.captureStackTrace&&Error.captureStackTrace(this,xr)}wh(xr,!0);Object.defineProperties(xr.prototype,{code:{enumerable:!0,get:function(){var i=Ah.indexOf(this.name);return Ch(i)?i:0}}});var Sh={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},tl=Object.entries(Sh);for(Dr=0;Dr{"use strict";function Rh(i){try{typeof i!="function"&&(i=RegExp);var e=new i("\\u{1D306}","u").exec("\\u{1D306}");return!!e&&e[0].length===2}catch(t){}return!1}var Br=Rh();function ri(i){if(i.source[0]!=="[")throw new Error(i+" can not be used with chars");return i.source.slice(1,i.source.lastIndexOf("]"))}function ki(i,e){if(i.source[0]!=="[")throw new Error("/"+i.source+"/ can not be used with chars_without");if(!e||typeof e!="string")throw new Error(JSON.stringify(e)+" is not a valid search");if(i.source.indexOf(e)===-1)throw new Error(\'"\'+e+\'" is not is /\'+i.source+"/");if(e==="-"&&i.source.indexOf(e)!==1)throw new Error(\'"\'+e+\'" is not at the first postion of /\'+i.source+"/");return new RegExp(i.source.replace(e,""),Br?"u":"")}function U(i){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(t){var r=typeof t=="string";if(r&&e===void 0&&t==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return r?t:t.source}).join(""),Br?"mu":"m")}function _(i){if(arguments.length===0)throw new Error("no parameters provided");return U.apply(_,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var u2="\\uFFFD",ni=/[-\\x09\\x0A\\x0D\\x20-\\x2C\\x2E-\\uD7FF\\uE000-\\uFFFD]/;Br&&(ni=U("[",ri(ni),"\\\\u{10000}-\\\\u{10FFFF}","]"));var rl=/[\\x20\\x09\\x0D\\x0A]/,h2=ri(rl),Q=U(rl,"+"),ne=U(rl,"*"),Mr=/[:_a-zA-Z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/;Br&&(Mr=U("[",ri(Mr),"\\\\u{10000}-\\\\u{10FFFF}","]"));var c2=ri(Mr),nl=U("[",c2,ri(/[-.0-9\\xB7]/),ri(/[\\u0300-\\u036F\\u203F-\\u2040]/),"]"),Ue=U(Mr,nl,"*"),Dh=U(nl,"+"),f2=U("&",Ue,";"),d2=_(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Rr=_(f2,"|",d2),Nr=U("%",Ue,";"),sl=_(U(\'"\',_(/[^%&"]/,"|",Nr,"|",Rr),"*",\'"\'),"|",U("\'",_(/[^%&\']/,"|",Nr,"|",Rr),"*","\'")),p2=_(\'"\',_(/[^<&"]/,"|",Rr),"*",\'"\',"|","\'",_(/[^<&\']/,"|",Rr),"*","\'"),g2=ki(Mr,":"),m2=ki(nl,":"),Eh=U(g2,m2,"*"),Pr=U(Eh,_(":",Eh),"?"),y2=U("^",Pr,"$"),b2=U("(",Pr,")"),Or=_(/"[^"]*"|\'[^\']*\'/),v2=U(/^<\\?/,"(",Ue,")",_(Q,"(",ni,"*?)"),"?",/\\?>/),xh=/[\\x20\\x0D\\x0Aa-zA-Z0-9-\'()+,./:=?;!*#@$_%]/,Wn=_(\'"\',xh,\'*"\',"|","\'",ki(xh,"\'"),"*\'"),Nh="",w2=U(Nh,_(ki(ni,"-"),"|",U("-",ki(ni,"-"))),"*",Oh),Th="#PCDATA",A2=_(U(/\\(/,ne,Th,_(ne,/\\|/,ne,Pr),"*",ne,/\\)\\*/),"|",U(/\\(/,ne,Th,ne,/\\)/)),C2=/[?*+]?/,S2=U(/\\([^>]+\\)/,C2),D2=_("EMPTY","|","ANY","|",A2,"|",S2),E2=""),T2=U("NOTATION",Q,/\\(/,ne,Ue,_(ne,/\\|/,ne,Ue),"*",ne,/\\)/),k2=U(/\\(/,ne,Dh,_(ne,/\\|/,ne,Dh),"*",ne,/\\)/),M2=_(T2,"|",k2),R2=_(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",M2),N2=_(/#REQUIRED|#IMPLIED/,"|",_(_("#FIXED",Q),"?",p2)),O2=_(Q,Ue,Q,R2,Q,N2),B2=""),ol="SYSTEM",zn="PUBLIC",jn=_(_(ol,Q,Or),"|",_(zn,Q,Wn,Q,Or)),L2=U("^",_(_(ol,Q,"(?",Or,")"),"|",_(zn,Q,"(?",Wn,")",Q,"(?",Or,")"))),_2=_(Q,"NDATA",Q,Ue),I2=_(sl,"|",_(jn,_2,"?")),Bh=""),H2=_(sl,"|",jn),$2=U(Bh,Q,"%",Q,Ue,Q,H2,ne,">"),V2=_(F2,"|",$2),q2=U(zn,Q,Wn),U2=U(""),ll=U(ne,"=",ne),kh=/1[.]\\d+/,W2=U(Q,"version",ll,_("\'",kh,"\'","|",\'"\',kh,\'"\')),Mh=/[A-Za-z][-A-Za-z0-9._]*/,z2=_(Q,"encoding",ll,_(\'"\',Mh,\'"\',"|","\'",Mh,"\'")),j2=_(Q,"standalone",ll,_("\'",_("yes","|","no"),"\'","|",\'"\',_("yes","|","no"),\'"\')),G2=U(/^<\\?xml/,W2,z2,"?",j2,"?",ne,/\\?>/),K2="",J2=//,Z2=U(ni,"*?",Q2),ey=U(J2,Z2);V.chars=ri;V.chars_without=ki;V.detectUnicodeSupport=Rh;V.reg=U;V.regg=_;V.AttlistDecl=P2;V.CDATA_START=Y2;V.CDATA_END=X2;V.CDSect=ey;V.Char=ni;V.Comment=w2;V.COMMENT_START=Nh;V.COMMENT_END=Oh;V.DOCTYPE_DECL_START=K2;V.elementdecl=x2;V.EntityDecl=V2;V.EntityValue=sl;V.ExternalID=jn;V.ExternalID_match=L2;V.Name=Ue;V.NotationDecl=U2;V.Reference=Rr;V.PEReference=Nr;V.PI=v2;V.PUBLIC=zn;V.PubidLiteral=Wn;V.QName=Pr;V.QName_exact=y2;V.QName_group=b2;V.S=Q;V.SChar_s=h2;V.S_OPT=ne;V.SYSTEM=ol;V.SystemLiteral=Or;V.UNICODE_REPLACEMENT_CHARACTER=u2;V.UNICODE_SUPPORT=Br;V.XMLDecl=G2});var pl=St(ae=>{"use strict";var We=ii(),ct=We.find,ty=We.hasDefaultHTMLNamespace,Ri=We.hasOwn,iy=We.isHTMLMimeType,ry=We.isHTMLRawTextElement,ny=We.isHTMLVoidElement,Lr=We.MIME_TYPE,dt=We.NAMESPACE,Te=Symbol(),sy=kr(),L=sy.DOMException,wt=al();function Oe(i){if(i!==Te)throw new TypeError("Illegal constructor")}function oy(i){return i!==""}function ly(i){return i?i.split(/[\\t\\n\\f\\r ]+/).filter(oy):[]}function ay(i,e){return Ri(i,e)||(i[e]=!0),i}function Ph(i){if(!i)return[];var e=ly(i);return Object.keys(e.reduce(ay,{}))}function uy(i){return function(e){return i&&i.indexOf(e)!==-1}}function Vh(i){if(!wt.QName_exact.test(i))throw new L(L.INVALID_CHARACTER_ERR,\'invalid character in qualified name "\'+i+\'"\')}function hl(i,e){Vh(e),i=i||null;var t=null,r=e;if(e.indexOf(":")>=0){var n=e.split(":");t=n[0],r=n[1]}if(t!==null&&i===null)throw new L(L.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(t==="xml"&&i!==We.NAMESPACE.XML)throw new L(L.NAMESPACE_ERR,\'prefix is "xml" and namespace is not the XML namespace\');if((t==="xmlns"||e==="xmlns")&&i!==We.NAMESPACE.XMLNS)throw new L(L.NAMESPACE_ERR,\'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace\');if(i===We.NAMESPACE.XMLNS&&t!=="xmlns"&&e!=="xmlns")throw new L(L.NAMESPACE_ERR,\'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"\');return[i,t,r]}function Bi(i,e){for(var t in i)Ri(i,t)&&(e[t]=i[t])}function Be(i,e){var t=i.prototype;if(!(t instanceof e)){let r=function(){};r.prototype=e.prototype,r=new r,Bi(t,r),i.prototype=t=r}t.constructor!=i&&(typeof i!="function"&&console.error("unknown Class:"+i),t.constructor=i)}var Pe={},Ye=Pe.ELEMENT_NODE=1,Ni=Pe.ATTRIBUTE_NODE=2,Gn=Pe.TEXT_NODE=3,qh=Pe.CDATA_SECTION_NODE=4,Uh=Pe.ENTITY_REFERENCE_NODE=5,hy=Pe.ENTITY_NODE=6,Wh=Pe.PROCESSING_INSTRUCTION_NODE=7,zh=Pe.COMMENT_NODE=8,Ir=Pe.DOCUMENT_NODE=9,jh=Pe.DOCUMENT_TYPE_NODE=10,Lt=Pe.DOCUMENT_FRAGMENT_NODE=11,cy=Pe.NOTATION_NODE=12,be=We.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function Lh(i){for(var e=[];i.parentNode||i.ownerElement;)i=i.parentNode||i.ownerElement,e.unshift(i);return e}function Gh(i,e){if(e.length=0&&i=0){for(var n=e.length-1;r<=n;)e[r]=e[++r];if(e.length=n,i){var s=i.ownerDocument;s&&Jh(s,i,t),t.ownerElement=null}}}Oi.prototype={length:0,item:Xe.prototype.item,getNamedItem:function(i){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(i=i.toLowerCase());for(var e=0;e_h(e.ownerDocument)?be.DOCUMENT_POSITION_FOLLOWING:be.DOCUMENT_POSITION_PRECEDING);var l=Lh(e),a=Lh(t);if(!r&&a.indexOf(e)>=0||n&&e===t)return be.DOCUMENT_POSITION_CONTAINS+be.DOCUMENT_POSITION_PRECEDING;if(!n&&l.indexOf(t)>=0||r&&e===t)return be.DOCUMENT_POSITION_CONTAINED_BY+be.DOCUMENT_POSITION_FOLLOWING;var u=Gh(a,l);for(var h in u.childNodes){var c=u.childNodes[h];if(c===t)return be.DOCUMENT_POSITION_FOLLOWING;if(c===e)return be.DOCUMENT_POSITION_PRECEDING;if(a.indexOf(c)>=0)return be.DOCUMENT_POSITION_FOLLOWING;if(l.indexOf(c)>=0)return be.DOCUMENT_POSITION_PRECEDING}return 0}};function Xh(i){return i=="<"&&"<"||i==">"&&">"||i=="&"&&"&"||i==\'"\'&&"""||"&#"+i.charCodeAt()+";"}Bi(Pe,X);Bi(Pe,X.prototype);Bi(be,X);Bi(be,X.prototype);function _r(i,e){if(e(i))return!0;if(i=i.firstChild)do if(_r(i,e))return!0;while(i=i.nextSibling)}function _t(i,e){Oe(i);var t=e||{};this.ownerDocument=this,this.contentType=t.contentType||Lr.XML_APPLICATION,this.type=iy(this.contentType)?"html":"xml"}function dy(i,e,t){i&&i._inc++;var r=t.namespaceURI;r===dt.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Jh(i,e,t,r){i&&i._inc++;var n=t.namespaceURI;n===dt.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function Qh(i,e,t){if(i&&i._inc){i._inc++;var r=e.childNodes;if(t)r[r.length++]=t;else{for(var n=e.firstChild,s=0;n;)r[s++]=n,n=n.nextSibling;r.length=s,delete r[r.length]}}}function Zh(i,e){if(i!==e.parentNode)throw new L(L.NOT_FOUND_ERR,"child\'s parent is not parent");var t=e.previousSibling,r=e.nextSibling;return t?t.nextSibling=r:i.firstChild=r,r?r.previousSibling=t:i.lastChild=t,Qh(i.ownerDocument,i),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function py(i){return i&&(i.nodeType===X.DOCUMENT_NODE||i.nodeType===X.DOCUMENT_FRAGMENT_NODE||i.nodeType===X.ELEMENT_NODE)}function gy(i){return i&&(ft(i)||i instanceof Pi||At(i)||i.nodeType===X.DOCUMENT_FRAGMENT_NODE||i.nodeType===X.COMMENT_NODE||i.nodeType===X.PROCESSING_INSTRUCTION_NODE)}function At(i){return i&&i.nodeType===X.DOCUMENT_TYPE_NODE}function ft(i){return i&&i.nodeType===X.ELEMENT_NODE}function ec(i){return i&&i.nodeType===X.TEXT_NODE}function Fh(i,e){var t=i.childNodes||[];if(ct(t,ft)||At(e))return!1;var r=ct(t,At);return!(e&&r&&t.indexOf(r)>t.indexOf(e))}function Hh(i,e){var t=i.childNodes||[];function r(s){return ft(s)&&s!==e}if(ct(t,r))return!1;var n=ct(t,At);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}function my(i,e,t){if(!py(i))throw new L(L.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+i.nodeType);if(t&&t.parentNode!==i)throw new L(L.NOT_FOUND_ERR,"child not in parent");if(!gy(e)||At(e)&&i.nodeType!==X.DOCUMENT_NODE)throw new L(L.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+i.nodeType)}function yy(i,e,t){var r=i.childNodes||[],n=e.childNodes||[];if(e.nodeType===X.DOCUMENT_FRAGMENT_NODE){var s=n.filter(ft);if(s.length>1||ct(n,ec))throw new L(L.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!Fh(i,t))throw new L(L.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(ft(e)&&!Fh(i,t))throw new L(L.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(At(e)){if(ct(r,At))throw new L(L.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var o=ct(r,ft);if(t&&r.indexOf(o)1||ct(n,ec))throw new L(L.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!Hh(i,t))throw new L(L.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(ft(e)&&!Hh(i,t))throw new L(L.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(At(e)){if(ct(r,function(a){return At(a)&&a!==t}))throw new L(L.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var o=ct(r,ft);if(t&&r.indexOf(o)0&&_r(t,function(n){if(n!==t&&n.nodeType===Ye){var s=n.getAttribute("class");if(s){var o=i===s;if(!o){var l=Ph(s);o=e.every(uy(l))}o&&r.push(n)}}}),r})},getElementsByTagName:function(i){var e=(this.nodeType===Ir?this:this.ownerDocument).type==="html",t=i.toLowerCase();return new si(this,function(r){var n=[];return _r(r,function(s){if(!(s===r||s.nodeType!==Ye))if(i==="*")n.push(s);else{var o=s.getQualifiedName(),l=e&&s.namespaceURI===dt.HTML?t:i;o===l&&n.push(s)}}),n})},getElementsByTagNameNS:function(i,e){return new si(this,function(t){var r=[];return _r(t,function(n){n!==t&&n.nodeType===Ye&&(i==="*"||n.namespaceURI===i)&&(e==="*"||n.localName==e)&&r.push(n)}),r})}};_t.prototype.getElementsByClassName=It.prototype.getElementsByClassName;_t.prototype.getElementsByTagName=It.prototype.getElementsByTagName;_t.prototype.getElementsByTagNameNS=It.prototype.getElementsByTagNameNS;Be(It,X);function oi(i){Oe(i),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}oi.prototype.nodeType=Ni;Be(oi,X);function Pi(i){Oe(i)}Pi.prototype={data:"",substringData:function(i,e){return this.data.substring(i,i+e)},appendData:function(i){i=this.data+i,this.nodeValue=this.data=i,this.length=i.length},insertData:function(i,e){this.replaceData(i,0,e)},deleteData:function(i,e){this.replaceData(i,e,"")},replaceData:function(i,e,t){var r=this.data.substring(0,i),n=this.data.substring(i+e);t=r+t+n,this.nodeValue=this.data=t,this.length=t.length}};Be(Pi,X);function Fr(i){Oe(i)}Fr.prototype={nodeName:"#text",nodeType:Gn,splitText:function(i){var e=this.data,t=e.substring(i);e=e.substring(0,i),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};Be(Fr,Pi);function Xn(i){Oe(i)}Xn.prototype={nodeName:"#comment",nodeType:zh};Be(Xn,Pi);function Jn(i){Oe(i)}Jn.prototype={nodeName:"#cdata-section",nodeType:qh};Be(Jn,Fr);function Qn(i){Oe(i)}Qn.prototype.nodeType=jh;Be(Qn,X);function fl(i){Oe(i)}fl.prototype.nodeType=cy;Be(fl,X);function dl(i){Oe(i)}dl.prototype.nodeType=hy;Be(dl,X);function Zn(i){Oe(i)}Zn.prototype.nodeType=Uh;Be(Zn,X);function Hr(i){Oe(i)}Hr.prototype.nodeName="#document-fragment";Hr.prototype.nodeType=Lt;Be(Hr,X);function es(i){Oe(i)}es.prototype.nodeType=Wh;Be(es,X);function ic(){}ic.prototype.serializeToString=function(i,e){return rc.call(i,e)};X.prototype.toString=rc;function rc(i){var e=[],t=this.nodeType===Ir&&this.documentElement||this,r=t.prefix,n=t.namespaceURI;if(n&&r==null){var r=t.lookupPrefix(n);if(r==null)var s=[{namespace:n,prefix:null}]}return Mi(this,e,i,s),e.join("")}function $h(i,e,t){var r=i.prefix||"",n=i.namespaceURI;if(!n||r==="xml"&&n===dt.XML||n===dt.XMLNS)return!1;for(var s=t.length;s--;){var o=t[s];if(o.prefix===r)return o.namespace!==n}return!0}function ul(i,e,t){i.push(" ",e,\'="\',t.replace(/[<>&"\\t\\n\\r]/g,Xh),\'"\')}function Mi(i,e,t,r){r||(r=[]);var n=i.nodeType===Ir?i:i.ownerDocument,s=n.type==="html";if(t)if(i=t(i),i){if(typeof i=="string"){e.push(i);return}}else return;switch(i.nodeType){case Ye:var o=i.attributes,l=o.length,w=i.firstChild,a=i.tagName,u=a;if(!s&&!i.prefix&&i.namespaceURI){for(var h,c=0;c=0;f--){var d=r[f];if(d.prefix===""&&d.namespace===i.namespaceURI){h=d.namespace;break}}if(h!==i.namespaceURI)for(var f=r.length-1;f>=0;f--){var d=r[f];if(d.namespace===i.namespaceURI){d.prefix&&(u=d.prefix+":"+a);break}}}e.push("<",u);for(var p=0;p");else{if(e.push(">"),s&&ry(a))for(;w;)w.data?e.push(w.data):Mi(w,e,t,r.slice()),w=w.nextSibling;else for(;w;)Mi(w,e,t,r.slice()),w=w.nextSibling;e.push("")}return;case Ir:case Lt:for(var w=i.firstChild;w;)Mi(w,e,t,r.slice()),w=w.nextSibling;return;case Ni:return ul(e,i.name,i.value);case Gn:return e.push(i.data.replace(/[<&>]/g,Xh));case qh:return e.push(wt.CDATA_START,i.data,wt.CDATA_END);case zh:return e.push(wt.COMMENT_START,i.data,wt.COMMENT_END);case jh:var E=i.publicId,S=i.systemId;e.push(wt.DOCTYPE_DECL_START," ",i.name),E?(e.push(" ",wt.PUBLIC," ",E),S&&S!=="."&&e.push(" ",S)):S&&S!=="."&&e.push(" ",wt.SYSTEM," ",S),i.internalSubset&&e.push(" [",i.internalSubset,"]"),e.push(">");return;case Wh:return e.push("");case Uh:return e.push("&",i.nodeName,";");default:e.push("??",i.nodeName)}}function nc(i,e,t){var r;switch(e.nodeType){case Ye:r=e.cloneNode(!1),r.ownerDocument=i;case Lt:break;case Ni:t=!0;break}if(r||(r=e.cloneNode(!1)),r.ownerDocument=i,r.parentNode=null,t)for(var n=e.firstChild;n;)r.appendChild(nc(i,n,t)),n=n.nextSibling;return r}function cl(i,e,t){var r=new e.constructor(Te);for(var n in e)if(Ri(e,n)){var s=e[n];typeof s!="object"&&s!=r[n]&&(r[n]=s)}switch(e.childNodes&&(r.childNodes=new Xe),r.ownerDocument=i,r.nodeType){case Ye:var o=e.attributes,l=r.attributes=new Oi,a=o.length;l._ownerElement=r;for(var u=0;u{"use strict";var oc=ii().freeze;$r.XML_ENTITIES=oc({amp:"&",apos:"\'",gt:">",lt:"<",quot:\'"\'});$r.HTML_ENTITIES=oc({Aacute:"\\xC1",aacute:"\\xE1",Abreve:"\\u0102",abreve:"\\u0103",ac:"\\u223E",acd:"\\u223F",acE:"\\u223E\\u0333",Acirc:"\\xC2",acirc:"\\xE2",acute:"\\xB4",Acy:"\\u0410",acy:"\\u0430",AElig:"\\xC6",aelig:"\\xE6",af:"\\u2061",Afr:"\\u{1D504}",afr:"\\u{1D51E}",Agrave:"\\xC0",agrave:"\\xE0",alefsym:"\\u2135",aleph:"\\u2135",Alpha:"\\u0391",alpha:"\\u03B1",Amacr:"\\u0100",amacr:"\\u0101",amalg:"\\u2A3F",AMP:"&",amp:"&",And:"\\u2A53",and:"\\u2227",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:"\\u0104",aogon:"\\u0105",Aopf:"\\u{1D538}",aopf:"\\u{1D552}",ap:"\\u2248",apacir:"\\u2A6F",apE:"\\u2A70",ape:"\\u224A",apid:"\\u224B",apos:"\'",ApplyFunction:"\\u2061",approx:"\\u2248",approxeq:"\\u224A",Aring:"\\xC5",aring:"\\xE5",Ascr:"\\u{1D49C}",ascr:"\\u{1D4B6}",Assign:"\\u2254",ast:"*",asymp:"\\u2248",asympeq:"\\u224D",Atilde:"\\xC3",atilde:"\\xE3",Auml:"\\xC4",auml:"\\xE4",awconint:"\\u2233",awint:"\\u2A11",backcong:"\\u224C",backepsilon:"\\u03F6",backprime:"\\u2035",backsim:"\\u223D",backsimeq:"\\u22CD",Backslash:"\\u2216",Barv:"\\u2AE7",barvee:"\\u22BD",Barwed:"\\u2306",barwed:"\\u2305",barwedge:"\\u2305",bbrk:"\\u23B5",bbrktbrk:"\\u23B6",bcong:"\\u224C",Bcy:"\\u0411",bcy:"\\u0431",bdquo:"\\u201E",becaus:"\\u2235",Because:"\\u2235",because:"\\u2235",bemptyv:"\\u29B0",bepsi:"\\u03F6",bernou:"\\u212C",Bernoullis:"\\u212C",Beta:"\\u0392",beta:"\\u03B2",beth:"\\u2136",between:"\\u226C",Bfr:"\\u{1D505}",bfr:"\\u{1D51F}",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:"\\u2AED",bnot:"\\u2310",Bopf:"\\u{1D539}",bopf:"\\u{1D553}",bot:"\\u22A5",bottom:"\\u22A5",bowtie:"\\u22C8",boxbox:"\\u29C9",boxDL:"\\u2557",boxDl:"\\u2556",boxdL:"\\u2555",boxdl:"\\u2510",boxDR:"\\u2554",boxDr:"\\u2553",boxdR:"\\u2552",boxdr:"\\u250C",boxH:"\\u2550",boxh:"\\u2500",boxHD:"\\u2566",boxHd:"\\u2564",boxhD:"\\u2565",boxhd:"\\u252C",boxHU:"\\u2569",boxHu:"\\u2567",boxhU:"\\u2568",boxhu:"\\u2534",boxminus:"\\u229F",boxplus:"\\u229E",boxtimes:"\\u22A0",boxUL:"\\u255D",boxUl:"\\u255C",boxuL:"\\u255B",boxul:"\\u2518",boxUR:"\\u255A",boxUr:"\\u2559",boxuR:"\\u2558",boxur:"\\u2514",boxV:"\\u2551",boxv:"\\u2502",boxVH:"\\u256C",boxVh:"\\u256B",boxvH:"\\u256A",boxvh:"\\u253C",boxVL:"\\u2563",boxVl:"\\u2562",boxvL:"\\u2561",boxvl:"\\u2524",boxVR:"\\u2560",boxVr:"\\u255F",boxvR:"\\u255E",boxvr:"\\u251C",bprime:"\\u2035",Breve:"\\u02D8",breve:"\\u02D8",brvbar:"\\xA6",Bscr:"\\u212C",bscr:"\\u{1D4B7}",bsemi:"\\u204F",bsim:"\\u223D",bsime:"\\u22CD",bsol:"\\\\",bsolb:"\\u29C5",bsolhsub:"\\u27C8",bull:"\\u2022",bullet:"\\u2022",bump:"\\u224E",bumpE:"\\u2AAE",bumpe:"\\u224F",Bumpeq:"\\u224E",bumpeq:"\\u224F",Cacute:"\\u0106",cacute:"\\u0107",Cap:"\\u22D2",cap:"\\u2229",capand:"\\u2A44",capbrcup:"\\u2A49",capcap:"\\u2A4B",capcup:"\\u2A47",capdot:"\\u2A40",CapitalDifferentialD:"\\u2145",caps:"\\u2229\\uFE00",caret:"\\u2041",caron:"\\u02C7",Cayleys:"\\u212D",ccaps:"\\u2A4D",Ccaron:"\\u010C",ccaron:"\\u010D",Ccedil:"\\xC7",ccedil:"\\xE7",Ccirc:"\\u0108",ccirc:"\\u0109",Cconint:"\\u2230",ccups:"\\u2A4C",ccupssm:"\\u2A50",Cdot:"\\u010A",cdot:"\\u010B",cedil:"\\xB8",Cedilla:"\\xB8",cemptyv:"\\u29B2",cent:"\\xA2",CenterDot:"\\xB7",centerdot:"\\xB7",Cfr:"\\u212D",cfr:"\\u{1D520}",CHcy:"\\u0427",chcy:"\\u0447",check:"\\u2713",checkmark:"\\u2713",Chi:"\\u03A7",chi:"\\u03C7",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:"\\u29C3",cire:"\\u2257",cirfnint:"\\u2A10",cirmid:"\\u2AEF",cirscir:"\\u29C2",ClockwiseContourIntegral:"\\u2232",CloseCurlyDoubleQuote:"\\u201D",CloseCurlyQuote:"\\u2019",clubs:"\\u2663",clubsuit:"\\u2663",Colon:"\\u2237",colon:":",Colone:"\\u2A74",colone:"\\u2254",coloneq:"\\u2254",comma:",",commat:"@",comp:"\\u2201",compfn:"\\u2218",complement:"\\u2201",complexes:"\\u2102",cong:"\\u2245",congdot:"\\u2A6D",Congruent:"\\u2261",Conint:"\\u222F",conint:"\\u222E",ContourIntegral:"\\u222E",Copf:"\\u2102",copf:"\\u{1D554}",coprod:"\\u2210",Coproduct:"\\u2210",COPY:"\\xA9",copy:"\\xA9",copysr:"\\u2117",CounterClockwiseContourIntegral:"\\u2233",crarr:"\\u21B5",Cross:"\\u2A2F",cross:"\\u2717",Cscr:"\\u{1D49E}",cscr:"\\u{1D4B8}",csub:"\\u2ACF",csube:"\\u2AD1",csup:"\\u2AD0",csupe:"\\u2AD2",ctdot:"\\u22EF",cudarrl:"\\u2938",cudarrr:"\\u2935",cuepr:"\\u22DE",cuesc:"\\u22DF",cularr:"\\u21B6",cularrp:"\\u293D",Cup:"\\u22D3",cup:"\\u222A",cupbrcap:"\\u2A48",CupCap:"\\u224D",cupcap:"\\u2A46",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:"\\u2021",dagger:"\\u2020",daleth:"\\u2138",Darr:"\\u21A1",dArr:"\\u21D3",darr:"\\u2193",dash:"\\u2010",Dashv:"\\u2AE4",dashv:"\\u22A3",dbkarow:"\\u290F",dblac:"\\u02DD",Dcaron:"\\u010E",dcaron:"\\u010F",Dcy:"\\u0414",dcy:"\\u0434",DD:"\\u2145",dd:"\\u2146",ddagger:"\\u2021",ddarr:"\\u21CA",DDotrahd:"\\u2911",ddotseq:"\\u2A77",deg:"\\xB0",Del:"\\u2207",Delta:"\\u0394",delta:"\\u03B4",demptyv:"\\u29B1",dfisht:"\\u297F",Dfr:"\\u{1D507}",dfr:"\\u{1D521}",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:"\\u0402",djcy:"\\u0452",dlcorn:"\\u231E",dlcrop:"\\u230D",dollar:"$",Dopf:"\\u{1D53B}",dopf:"\\u{1D555}",Dot:"\\xA8",dot:"\\u02D9",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{1D49F}",dscr:"\\u{1D4B9}",DScy:"\\u0405",dscy:"\\u0455",dsol:"\\u29F6",Dstrok:"\\u0110",dstrok:"\\u0111",dtdot:"\\u22F1",dtri:"\\u25BF",dtrif:"\\u25BE",duarr:"\\u21F5",duhar:"\\u296F",dwangle:"\\u29A6",DZcy:"\\u040F",dzcy:"\\u045F",dzigrarr:"\\u27FF",Eacute:"\\xC9",eacute:"\\xE9",easter:"\\u2A6E",Ecaron:"\\u011A",ecaron:"\\u011B",ecir:"\\u2256",Ecirc:"\\xCA",ecirc:"\\xEA",ecolon:"\\u2255",Ecy:"\\u042D",ecy:"\\u044D",eDDot:"\\u2A77",Edot:"\\u0116",eDot:"\\u2251",edot:"\\u0117",ee:"\\u2147",efDot:"\\u2252",Efr:"\\u{1D508}",efr:"\\u{1D522}",eg:"\\u2A9A",Egrave:"\\xC8",egrave:"\\xE8",egs:"\\u2A96",egsdot:"\\u2A98",el:"\\u2A99",Element:"\\u2208",elinters:"\\u23E7",ell:"\\u2113",els:"\\u2A95",elsdot:"\\u2A97",Emacr:"\\u0112",emacr:"\\u0113",empty:"\\u2205",emptyset:"\\u2205",EmptySmallSquare:"\\u25FB",emptyv:"\\u2205",EmptyVerySmallSquare:"\\u25AB",emsp:"\\u2003",emsp13:"\\u2004",emsp14:"\\u2005",ENG:"\\u014A",eng:"\\u014B",ensp:"\\u2002",Eogon:"\\u0118",eogon:"\\u0119",Eopf:"\\u{1D53C}",eopf:"\\u{1D556}",epar:"\\u22D5",eparsl:"\\u29E3",eplus:"\\u2A71",epsi:"\\u03B5",Epsilon:"\\u0395",epsilon:"\\u03B5",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:"\\u2130",escr:"\\u212F",esdot:"\\u2250",Esim:"\\u2A73",esim:"\\u2242",Eta:"\\u0397",eta:"\\u03B7",ETH:"\\xD0",eth:"\\xF0",Euml:"\\xCB",euml:"\\xEB",euro:"\\u20AC",excl:"!",exist:"\\u2203",Exists:"\\u2203",expectation:"\\u2130",ExponentialE:"\\u2147",exponentiale:"\\u2147",fallingdotseq:"\\u2252",Fcy:"\\u0424",fcy:"\\u0444",female:"\\u2640",ffilig:"\\uFB03",fflig:"\\uFB00",ffllig:"\\uFB04",Ffr:"\\u{1D509}",ffr:"\\u{1D523}",filig:"\\uFB01",FilledSmallSquare:"\\u25FC",FilledVerySmallSquare:"\\u25AA",fjlig:"fj",flat:"\\u266D",fllig:"\\uFB02",fltns:"\\u25B1",fnof:"\\u0192",Fopf:"\\u{1D53D}",fopf:"\\u{1D557}",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:"\\u2131",fscr:"\\u{1D4BB}",gacute:"\\u01F5",Gamma:"\\u0393",gamma:"\\u03B3",Gammad:"\\u03DC",gammad:"\\u03DD",gap:"\\u2A86",Gbreve:"\\u011E",gbreve:"\\u011F",Gcedil:"\\u0122",Gcirc:"\\u011C",gcirc:"\\u011D",Gcy:"\\u0413",gcy:"\\u0433",Gdot:"\\u0120",gdot:"\\u0121",gE:"\\u2267",ge:"\\u2265",gEl:"\\u2A8C",gel:"\\u22DB",geq:"\\u2265",geqq:"\\u2267",geqslant:"\\u2A7E",ges:"\\u2A7E",gescc:"\\u2AA9",gesdot:"\\u2A80",gesdoto:"\\u2A82",gesdotol:"\\u2A84",gesl:"\\u22DB\\uFE00",gesles:"\\u2A94",Gfr:"\\u{1D50A}",gfr:"\\u{1D524}",Gg:"\\u22D9",gg:"\\u226B",ggg:"\\u22D9",gimel:"\\u2137",GJcy:"\\u0403",gjcy:"\\u0453",gl:"\\u2277",gla:"\\u2AA5",glE:"\\u2A92",glj:"\\u2AA4",gnap:"\\u2A8A",gnapprox:"\\u2A8A",gnE:"\\u2269",gne:"\\u2A88",gneq:"\\u2A88",gneqq:"\\u2269",gnsim:"\\u22E7",Gopf:"\\u{1D53E}",gopf:"\\u{1D558}",grave:"`",GreaterEqual:"\\u2265",GreaterEqualLess:"\\u22DB",GreaterFullEqual:"\\u2267",GreaterGreater:"\\u2AA2",GreaterLess:"\\u2277",GreaterSlantEqual:"\\u2A7E",GreaterTilde:"\\u2273",Gscr:"\\u{1D4A2}",gscr:"\\u210A",gsim:"\\u2273",gsime:"\\u2A8E",gsiml:"\\u2A90",Gt:"\\u226B",GT:">",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:"\\u042A",hardcy:"\\u044A",hArr:"\\u21D4",harr:"\\u2194",harrcir:"\\u2948",harrw:"\\u21AD",Hat:"^",hbar:"\\u210F",Hcirc:"\\u0124",hcirc:"\\u0125",hearts:"\\u2665",heartsuit:"\\u2665",hellip:"\\u2026",hercon:"\\u22B9",Hfr:"\\u210C",hfr:"\\u{1D525}",HilbertSpace:"\\u210B",hksearow:"\\u2925",hkswarow:"\\u2926",hoarr:"\\u21FF",homtht:"\\u223B",hookleftarrow:"\\u21A9",hookrightarrow:"\\u21AA",Hopf:"\\u210D",hopf:"\\u{1D559}",horbar:"\\u2015",HorizontalLine:"\\u2500",Hscr:"\\u210B",hscr:"\\u{1D4BD}",hslash:"\\u210F",Hstrok:"\\u0126",hstrok:"\\u0127",HumpDownHump:"\\u224E",HumpEqual:"\\u224F",hybull:"\\u2043",hyphen:"\\u2010",Iacute:"\\xCD",iacute:"\\xED",ic:"\\u2063",Icirc:"\\xCE",icirc:"\\xEE",Icy:"\\u0418",icy:"\\u0438",Idot:"\\u0130",IEcy:"\\u0415",iecy:"\\u0435",iexcl:"\\xA1",iff:"\\u21D4",Ifr:"\\u2111",ifr:"\\u{1D526}",Igrave:"\\xCC",igrave:"\\xEC",ii:"\\u2148",iiiint:"\\u2A0C",iiint:"\\u222D",iinfin:"\\u29DC",iiota:"\\u2129",IJlig:"\\u0132",ijlig:"\\u0133",Im:"\\u2111",Imacr:"\\u012A",imacr:"\\u012B",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:"\\u222C",int:"\\u222B",intcal:"\\u22BA",integers:"\\u2124",Integral:"\\u222B",intercal:"\\u22BA",Intersection:"\\u22C2",intlarhk:"\\u2A17",intprod:"\\u2A3C",InvisibleComma:"\\u2063",InvisibleTimes:"\\u2062",IOcy:"\\u0401",iocy:"\\u0451",Iogon:"\\u012E",iogon:"\\u012F",Iopf:"\\u{1D540}",iopf:"\\u{1D55A}",Iota:"\\u0399",iota:"\\u03B9",iprod:"\\u2A3C",iquest:"\\xBF",Iscr:"\\u2110",iscr:"\\u{1D4BE}",isin:"\\u2208",isindot:"\\u22F5",isinE:"\\u22F9",isins:"\\u22F4",isinsv:"\\u22F3",isinv:"\\u2208",it:"\\u2062",Itilde:"\\u0128",itilde:"\\u0129",Iukcy:"\\u0406",iukcy:"\\u0456",Iuml:"\\xCF",iuml:"\\xEF",Jcirc:"\\u0134",jcirc:"\\u0135",Jcy:"\\u0419",jcy:"\\u0439",Jfr:"\\u{1D50D}",jfr:"\\u{1D527}",jmath:"\\u0237",Jopf:"\\u{1D541}",jopf:"\\u{1D55B}",Jscr:"\\u{1D4A5}",jscr:"\\u{1D4BF}",Jsercy:"\\u0408",jsercy:"\\u0458",Jukcy:"\\u0404",jukcy:"\\u0454",Kappa:"\\u039A",kappa:"\\u03BA",kappav:"\\u03F0",Kcedil:"\\u0136",kcedil:"\\u0137",Kcy:"\\u041A",kcy:"\\u043A",Kfr:"\\u{1D50E}",kfr:"\\u{1D528}",kgreen:"\\u0138",KHcy:"\\u0425",khcy:"\\u0445",KJcy:"\\u040C",kjcy:"\\u045C",Kopf:"\\u{1D542}",kopf:"\\u{1D55C}",Kscr:"\\u{1D4A6}",kscr:"\\u{1D4C0}",lAarr:"\\u21DA",Lacute:"\\u0139",lacute:"\\u013A",laemptyv:"\\u29B4",lagran:"\\u2112",Lambda:"\\u039B",lambda:"\\u03BB",Lang:"\\u27EA",lang:"\\u27E8",langd:"\\u2991",langle:"\\u27E8",lap:"\\u2A85",Laplacetrf:"\\u2112",laquo:"\\xAB",Larr:"\\u219E",lArr:"\\u21D0",larr:"\\u2190",larrb:"\\u21E4",larrbfs:"\\u291F",larrfs:"\\u291D",larrhk:"\\u21A9",larrlp:"\\u21AB",larrpl:"\\u2939",larrsim:"\\u2973",larrtl:"\\u21A2",lat:"\\u2AAB",lAtail:"\\u291B",latail:"\\u2919",late:"\\u2AAD",lates:"\\u2AAD\\uFE00",lBarr:"\\u290E",lbarr:"\\u290C",lbbrk:"\\u2772",lbrace:"{",lbrack:"[",lbrke:"\\u298B",lbrksld:"\\u298F",lbrkslu:"\\u298D",Lcaron:"\\u013D",lcaron:"\\u013E",Lcedil:"\\u013B",lcedil:"\\u013C",lceil:"\\u2308",lcub:"{",Lcy:"\\u041B",lcy:"\\u043B",ldca:"\\u2936",ldquo:"\\u201C",ldquor:"\\u201E",ldrdhar:"\\u2967",ldrushar:"\\u294B",ldsh:"\\u21B2",lE:"\\u2266",le:"\\u2264",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:"\\u2A8B",leg:"\\u22DA",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{1D50F}",lfr:"\\u{1D529}",lg:"\\u2276",lgE:"\\u2A91",lHar:"\\u2962",lhard:"\\u21BD",lharu:"\\u21BC",lharul:"\\u296A",lhblk:"\\u2584",LJcy:"\\u0409",ljcy:"\\u0459",Ll:"\\u22D8",ll:"\\u226A",llarr:"\\u21C7",llcorner:"\\u231E",Lleftarrow:"\\u21DA",llhard:"\\u296B",lltri:"\\u25FA",Lmidot:"\\u013F",lmidot:"\\u0140",lmoust:"\\u23B0",lmoustache:"\\u23B0",lnap:"\\u2A89",lnapprox:"\\u2A89",lnE:"\\u2268",lne:"\\u2A87",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{1D543}",lopf:"\\u{1D55D}",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:"\\u2112",lscr:"\\u{1D4C1}",Lsh:"\\u21B0",lsh:"\\u21B0",lsim:"\\u2272",lsime:"\\u2A8D",lsimg:"\\u2A8F",lsqb:"[",lsquo:"\\u2018",lsquor:"\\u201A",Lstrok:"\\u0141",lstrok:"\\u0142",Lt:"\\u226A",LT:"<",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:"\\u2905",map:"\\u21A6",mapsto:"\\u21A6",mapstodown:"\\u21A7",mapstoleft:"\\u21A4",mapstoup:"\\u21A5",marker:"\\u25AE",mcomma:"\\u2A29",Mcy:"\\u041C",mcy:"\\u043C",mdash:"\\u2014",mDDot:"\\u223A",measuredangle:"\\u2221",MediumSpace:"\\u205F",Mellintrf:"\\u2133",Mfr:"\\u{1D510}",mfr:"\\u{1D52A}",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{1D544}",mopf:"\\u{1D55E}",mp:"\\u2213",Mscr:"\\u2133",mscr:"\\u{1D4C2}",mstpos:"\\u223E",Mu:"\\u039C",mu:"\\u03BC",multimap:"\\u22B8",mumap:"\\u22B8",nabla:"\\u2207",Nacute:"\\u0143",nacute:"\\u0144",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:"\\u0147",ncaron:"\\u0148",Ncedil:"\\u0145",ncedil:"\\u0146",ncong:"\\u2247",ncongdot:"\\u2A6D\\u0338",ncup:"\\u2A42",Ncy:"\\u041D",ncy:"\\u043D",ndash:"\\u2013",ne:"\\u2260",nearhk:"\\u2924",neArr:"\\u21D7",nearr:"\\u2197",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:`\n`,nexist:"\\u2204",nexists:"\\u2204",Nfr:"\\u{1D511}",nfr:"\\u{1D52B}",ngE:"\\u2267\\u0338",nge:"\\u2271",ngeq:"\\u2271",ngeqq:"\\u2267\\u0338",ngeqslant:"\\u2A7E\\u0338",nges:"\\u2A7E\\u0338",nGg:"\\u22D9\\u0338",ngsim:"\\u2275",nGt:"\\u226B\\u20D2",ngt:"\\u226F",ngtr:"\\u226F",nGtv:"\\u226B\\u0338",nhArr:"\\u21CE",nharr:"\\u21AE",nhpar:"\\u2AF2",ni:"\\u220B",nis:"\\u22FC",nisd:"\\u22FA",niv:"\\u220B",NJcy:"\\u040A",njcy:"\\u045A",nlArr:"\\u21CD",nlarr:"\\u219A",nldr:"\\u2025",nlE:"\\u2266\\u0338",nle:"\\u2270",nLeftarrow:"\\u21CD",nleftarrow:"\\u219A",nLeftrightarrow:"\\u21CE",nleftrightarrow:"\\u21AE",nleq:"\\u2270",nleqq:"\\u2266\\u0338",nleqslant:"\\u2A7D\\u0338",nles:"\\u2A7D\\u0338",nless:"\\u226E",nLl:"\\u22D8\\u0338",nlsim:"\\u2274",nLt:"\\u226A\\u20D2",nlt:"\\u226E",nltri:"\\u22EA",nltrie:"\\u22EC",nLtv:"\\u226A\\u0338",nmid:"\\u2224",NoBreak:"\\u2060",NonBreakingSpace:"\\xA0",Nopf:"\\u2115",nopf:"\\u{1D55F}",Not:"\\u2AEC",not:"\\xAC",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:"\\u21CF",nrarr:"\\u219B",nrarrc:"\\u2933\\u0338",nrarrw:"\\u219D\\u0338",nRightarrow:"\\u21CF",nrightarrow:"\\u219B",nrtri:"\\u22EB",nrtrie:"\\u22ED",nsc:"\\u2281",nsccue:"\\u22E1",nsce:"\\u2AB0\\u0338",Nscr:"\\u{1D4A9}",nscr:"\\u{1D4C3}",nshortmid:"\\u2224",nshortparallel:"\\u2226",nsim:"\\u2241",nsime:"\\u2244",nsimeq:"\\u2244",nsmid:"\\u2224",nspar:"\\u2226",nsqsube:"\\u22E2",nsqsupe:"\\u22E3",nsub:"\\u2284",nsubE:"\\u2AC5\\u0338",nsube:"\\u2288",nsubset:"\\u2282\\u20D2",nsubseteq:"\\u2288",nsubseteqq:"\\u2AC5\\u0338",nsucc:"\\u2281",nsucceq:"\\u2AB0\\u0338",nsup:"\\u2285",nsupE:"\\u2AC6\\u0338",nsupe:"\\u2289",nsupset:"\\u2283\\u20D2",nsupseteq:"\\u2289",nsupseteqq:"\\u2AC6\\u0338",ntgl:"\\u2279",Ntilde:"\\xD1",ntilde:"\\xF1",ntlg:"\\u2278",ntriangleleft:"\\u22EA",ntrianglelefteq:"\\u22EC",ntriangleright:"\\u22EB",ntrianglerighteq:"\\u22ED",Nu:"\\u039D",nu:"\\u03BD",num:"#",numero:"\\u2116",numsp:"\\u2007",nvap:"\\u224D\\u20D2",nVDash:"\\u22AF",nVdash:"\\u22AE",nvDash:"\\u22AD",nvdash:"\\u22AC",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:"\\u21D6",nwarr:"\\u2196",nwarrow:"\\u2196",nwnear:"\\u2927",Oacute:"\\xD3",oacute:"\\xF3",oast:"\\u229B",ocir:"\\u229A",Ocirc:"\\xD4",ocirc:"\\xF4",Ocy:"\\u041E",ocy:"\\u043E",odash:"\\u229D",Odblac:"\\u0150",odblac:"\\u0151",odiv:"\\u2A38",odot:"\\u2299",odsold:"\\u29BC",OElig:"\\u0152",oelig:"\\u0153",ofcir:"\\u29BF",Ofr:"\\u{1D512}",ofr:"\\u{1D52C}",ogon:"\\u02DB",Ograve:"\\xD2",ograve:"\\xF2",ogt:"\\u29C1",ohbar:"\\u29B5",ohm:"\\u03A9",oint:"\\u222E",olarr:"\\u21BA",olcir:"\\u29BE",olcross:"\\u29BB",oline:"\\u203E",olt:"\\u29C0",Omacr:"\\u014C",omacr:"\\u014D",Omega:"\\u03A9",omega:"\\u03C9",Omicron:"\\u039F",omicron:"\\u03BF",omid:"\\u29B6",ominus:"\\u2296",Oopf:"\\u{1D546}",oopf:"\\u{1D560}",opar:"\\u29B7",OpenCurlyDoubleQuote:"\\u201C",OpenCurlyQuote:"\\u2018",operp:"\\u29B9",oplus:"\\u2295",Or:"\\u2A54",or:"\\u2228",orarr:"\\u21BB",ord:"\\u2A5D",order:"\\u2134",orderof:"\\u2134",ordf:"\\xAA",ordm:"\\xBA",origof:"\\u22B6",oror:"\\u2A56",orslope:"\\u2A57",orv:"\\u2A5B",oS:"\\u24C8",Oscr:"\\u{1D4AA}",oscr:"\\u2134",Oslash:"\\xD8",oslash:"\\xF8",osol:"\\u2298",Otilde:"\\xD5",otilde:"\\xF5",Otimes:"\\u2A37",otimes:"\\u2297",otimesas:"\\u2A36",Ouml:"\\xD6",ouml:"\\xF6",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:"\\u041F",pcy:"\\u043F",percnt:"%",period:".",permil:"\\u2030",perp:"\\u22A5",pertenk:"\\u2031",Pfr:"\\u{1D513}",pfr:"\\u{1D52D}",Phi:"\\u03A6",phi:"\\u03C6",phiv:"\\u03D5",phmmat:"\\u2133",phone:"\\u260E",Pi:"\\u03A0",pi:"\\u03C0",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:"\\u2119",popf:"\\u{1D561}",pound:"\\xA3",Pr:"\\u2ABB",pr:"\\u227A",prap:"\\u2AB7",prcue:"\\u227C",prE:"\\u2AB3",pre:"\\u2AAF",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:"\\u2033",prime:"\\u2032",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{1D4AB}",pscr:"\\u{1D4C5}",Psi:"\\u03A8",psi:"\\u03C8",puncsp:"\\u2008",Qfr:"\\u{1D514}",qfr:"\\u{1D52E}",qint:"\\u2A0C",Qopf:"\\u211A",qopf:"\\u{1D562}",qprime:"\\u2057",Qscr:"\\u{1D4AC}",qscr:"\\u{1D4C6}",quaternions:"\\u210D",quatint:"\\u2A16",quest:"?",questeq:"\\u225F",QUOT:\'"\',quot:\'"\',rAarr:"\\u21DB",race:"\\u223D\\u0331",Racute:"\\u0154",racute:"\\u0155",radic:"\\u221A",raemptyv:"\\u29B3",Rang:"\\u27EB",rang:"\\u27E9",rangd:"\\u2992",range:"\\u29A5",rangle:"\\u27E9",raquo:"\\xBB",Rarr:"\\u21A0",rArr:"\\u21D2",rarr:"\\u2192",rarrap:"\\u2975",rarrb:"\\u21E5",rarrbfs:"\\u2920",rarrc:"\\u2933",rarrfs:"\\u291E",rarrhk:"\\u21AA",rarrlp:"\\u21AC",rarrpl:"\\u2945",rarrsim:"\\u2974",Rarrtl:"\\u2916",rarrtl:"\\u21A3",rarrw:"\\u219D",rAtail:"\\u291C",ratail:"\\u291A",ratio:"\\u2236",rationals:"\\u211A",RBarr:"\\u2910",rBarr:"\\u290F",rbarr:"\\u290D",rbbrk:"\\u2773",rbrace:"}",rbrack:"]",rbrke:"\\u298C",rbrksld:"\\u298E",rbrkslu:"\\u2990",Rcaron:"\\u0158",rcaron:"\\u0159",Rcedil:"\\u0156",rcedil:"\\u0157",rceil:"\\u2309",rcub:"}",Rcy:"\\u0420",rcy:"\\u0440",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:"\\u211C",rfr:"\\u{1D52F}",rHar:"\\u2964",rhard:"\\u21C1",rharu:"\\u21C0",rharul:"\\u296C",Rho:"\\u03A1",rho:"\\u03C1",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:"\\u211D",ropf:"\\u{1D563}",roplus:"\\u2A2E",rotimes:"\\u2A35",RoundImplies:"\\u2970",rpar:")",rpargt:"\\u2994",rppolint:"\\u2A12",rrarr:"\\u21C9",Rrightarrow:"\\u21DB",rsaquo:"\\u203A",Rscr:"\\u211B",rscr:"\\u{1D4C7}",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:"\\u015A",sacute:"\\u015B",sbquo:"\\u201A",Sc:"\\u2ABC",sc:"\\u227B",scap:"\\u2AB8",Scaron:"\\u0160",scaron:"\\u0161",sccue:"\\u227D",scE:"\\u2AB4",sce:"\\u2AB0",Scedil:"\\u015E",scedil:"\\u015F",Scirc:"\\u015C",scirc:"\\u015D",scnap:"\\u2ABA",scnE:"\\u2AB6",scnsim:"\\u22E9",scpolint:"\\u2A13",scsim:"\\u227F",Scy:"\\u0421",scy:"\\u0441",sdot:"\\u22C5",sdotb:"\\u22A1",sdote:"\\u2A66",searhk:"\\u2925",seArr:"\\u21D8",searr:"\\u2198",searrow:"\\u2198",sect:"\\xA7",semi:";",seswar:"\\u2929",setminus:"\\u2216",setmn:"\\u2216",sext:"\\u2736",Sfr:"\\u{1D516}",sfr:"\\u{1D530}",sfrown:"\\u2322",sharp:"\\u266F",SHCHcy:"\\u0429",shchcy:"\\u0449",SHcy:"\\u0428",shcy:"\\u0448",ShortDownArrow:"\\u2193",ShortLeftArrow:"\\u2190",shortmid:"\\u2223",shortparallel:"\\u2225",ShortRightArrow:"\\u2192",ShortUpArrow:"\\u2191",shy:"\\xAD",Sigma:"\\u03A3",sigma:"\\u03C3",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:"\\u042C",softcy:"\\u044C",sol:"/",solb:"\\u29C4",solbar:"\\u233F",Sopf:"\\u{1D54A}",sopf:"\\u{1D564}",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{1D4AE}",sscr:"\\u{1D4C8}",ssetmn:"\\u2216",ssmile:"\\u2323",sstarf:"\\u22C6",Star:"\\u22C6",star:"\\u2606",starf:"\\u2605",straightepsilon:"\\u03F5",straightphi:"\\u03D5",strns:"\\xAF",Sub:"\\u22D0",sub:"\\u2282",subdot:"\\u2ABD",subE:"\\u2AC5",sube:"\\u2286",subedot:"\\u2AC3",submult:"\\u2AC1",subnE:"\\u2ACB",subne:"\\u228A",subplus:"\\u2ABF",subrarr:"\\u2979",Subset:"\\u22D0",subset:"\\u2282",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:"\\u22D1",sup:"\\u2283",sup1:"\\xB9",sup2:"\\xB2",sup3:"\\xB3",supdot:"\\u2ABE",supdsub:"\\u2AD8",supE:"\\u2AC6",supe:"\\u2287",supedot:"\\u2AC4",Superset:"\\u2283",SupersetEqual:"\\u2287",suphsol:"\\u27C9",suphsub:"\\u2AD7",suplarr:"\\u297B",supmult:"\\u2AC2",supnE:"\\u2ACC",supne:"\\u228B",supplus:"\\u2AC0",Supset:"\\u22D1",supset:"\\u2283",supseteq:"\\u2287",supseteqq:"\\u2AC6",supsetneq:"\\u228B",supsetneqq:"\\u2ACC",supsim:"\\u2AC8",supsub:"\\u2AD4",supsup:"\\u2AD6",swarhk:"\\u2926",swArr:"\\u21D9",swarr:"\\u2199",swarrow:"\\u2199",swnwar:"\\u292A",szlig:"\\xDF",Tab:" ",target:"\\u2316",Tau:"\\u03A4",tau:"\\u03C4",tbrk:"\\u23B4",Tcaron:"\\u0164",tcaron:"\\u0165",Tcedil:"\\u0162",tcedil:"\\u0163",Tcy:"\\u0422",tcy:"\\u0442",tdot:"\\u20DB",telrec:"\\u2315",Tfr:"\\u{1D517}",tfr:"\\u{1D531}",there4:"\\u2234",Therefore:"\\u2234",therefore:"\\u2234",Theta:"\\u0398",theta:"\\u03B8",thetasym:"\\u03D1",thetav:"\\u03D1",thickapprox:"\\u2248",thicksim:"\\u223C",ThickSpace:"\\u205F\\u200A",thinsp:"\\u2009",ThinSpace:"\\u2009",thkap:"\\u2248",thksim:"\\u223C",THORN:"\\xDE",thorn:"\\xFE",Tilde:"\\u223C",tilde:"\\u02DC",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{1D54B}",topf:"\\u{1D565}",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{1D4AF}",tscr:"\\u{1D4C9}",TScy:"\\u0426",tscy:"\\u0446",TSHcy:"\\u040B",tshcy:"\\u045B",Tstrok:"\\u0166",tstrok:"\\u0167",twixt:"\\u226C",twoheadleftarrow:"\\u219E",twoheadrightarrow:"\\u21A0",Uacute:"\\xDA",uacute:"\\xFA",Uarr:"\\u219F",uArr:"\\u21D1",uarr:"\\u2191",Uarrocir:"\\u2949",Ubrcy:"\\u040E",ubrcy:"\\u045E",Ubreve:"\\u016C",ubreve:"\\u016D",Ucirc:"\\xDB",ucirc:"\\xFB",Ucy:"\\u0423",ucy:"\\u0443",udarr:"\\u21C5",Udblac:"\\u0170",udblac:"\\u0171",udhar:"\\u296E",ufisht:"\\u297E",Ufr:"\\u{1D518}",ufr:"\\u{1D532}",Ugrave:"\\xD9",ugrave:"\\xF9",uHar:"\\u2963",uharl:"\\u21BF",uharr:"\\u21BE",uhblk:"\\u2580",ulcorn:"\\u231C",ulcorner:"\\u231C",ulcrop:"\\u230F",ultri:"\\u25F8",Umacr:"\\u016A",umacr:"\\u016B",uml:"\\xA8",UnderBar:"_",UnderBrace:"\\u23DF",UnderBracket:"\\u23B5",UnderParenthesis:"\\u23DD",Union:"\\u22C3",UnionPlus:"\\u228E",Uogon:"\\u0172",uogon:"\\u0173",Uopf:"\\u{1D54C}",uopf:"\\u{1D566}",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:"\\u03D2",upsi:"\\u03C5",upsih:"\\u03D2",Upsilon:"\\u03A5",upsilon:"\\u03C5",UpTee:"\\u22A5",UpTeeArrow:"\\u21A5",upuparrows:"\\u21C8",urcorn:"\\u231D",urcorner:"\\u231D",urcrop:"\\u230E",Uring:"\\u016E",uring:"\\u016F",urtri:"\\u25F9",Uscr:"\\u{1D4B0}",uscr:"\\u{1D4CA}",utdot:"\\u22F0",Utilde:"\\u0168",utilde:"\\u0169",utri:"\\u25B5",utrif:"\\u25B4",uuarr:"\\u21C8",Uuml:"\\xDC",uuml:"\\xFC",uwangle:"\\u29A7",vangrt:"\\u299C",varepsilon:"\\u03F5",varkappa:"\\u03F0",varnothing:"\\u2205",varphi:"\\u03D5",varpi:"\\u03D6",varpropto:"\\u221D",vArr:"\\u21D5",varr:"\\u2195",varrho:"\\u03F1",varsigma:"\\u03C2",varsubsetneq:"\\u228A\\uFE00",varsubsetneqq:"\\u2ACB\\uFE00",varsupsetneq:"\\u228B\\uFE00",varsupsetneqq:"\\u2ACC\\uFE00",vartheta:"\\u03D1",vartriangleleft:"\\u22B2",vartriangleright:"\\u22B3",Vbar:"\\u2AEB",vBar:"\\u2AE8",vBarv:"\\u2AE9",Vcy:"\\u0412",vcy:"\\u0432",VDash:"\\u22AB",Vdash:"\\u22A9",vDash:"\\u22A8",vdash:"\\u22A2",Vdashl:"\\u2AE6",Vee:"\\u22C1",vee:"\\u2228",veebar:"\\u22BB",veeeq:"\\u225A",vellip:"\\u22EE",Verbar:"\\u2016",verbar:"|",Vert:"\\u2016",vert:"|",VerticalBar:"\\u2223",VerticalLine:"|",VerticalSeparator:"\\u2758",VerticalTilde:"\\u2240",VeryThinSpace:"\\u200A",Vfr:"\\u{1D519}",vfr:"\\u{1D533}",vltri:"\\u22B2",vnsub:"\\u2282\\u20D2",vnsup:"\\u2283\\u20D2",Vopf:"\\u{1D54D}",vopf:"\\u{1D567}",vprop:"\\u221D",vrtri:"\\u22B3",Vscr:"\\u{1D4B1}",vscr:"\\u{1D4CB}",vsubnE:"\\u2ACB\\uFE00",vsubne:"\\u228A\\uFE00",vsupnE:"\\u2ACC\\uFE00",vsupne:"\\u228B\\uFE00",Vvdash:"\\u22AA",vzigzag:"\\u299A",Wcirc:"\\u0174",wcirc:"\\u0175",wedbar:"\\u2A5F",Wedge:"\\u22C0",wedge:"\\u2227",wedgeq:"\\u2259",weierp:"\\u2118",Wfr:"\\u{1D51A}",wfr:"\\u{1D534}",Wopf:"\\u{1D54E}",wopf:"\\u{1D568}",wp:"\\u2118",wr:"\\u2240",wreath:"\\u2240",Wscr:"\\u{1D4B2}",wscr:"\\u{1D4CC}",xcap:"\\u22C2",xcirc:"\\u25EF",xcup:"\\u22C3",xdtri:"\\u25BD",Xfr:"\\u{1D51B}",xfr:"\\u{1D535}",xhArr:"\\u27FA",xharr:"\\u27F7",Xi:"\\u039E",xi:"\\u03BE",xlArr:"\\u27F8",xlarr:"\\u27F5",xmap:"\\u27FC",xnis:"\\u22FB",xodot:"\\u2A00",Xopf:"\\u{1D54F}",xopf:"\\u{1D569}",xoplus:"\\u2A01",xotime:"\\u2A02",xrArr:"\\u27F9",xrarr:"\\u27F6",Xscr:"\\u{1D4B3}",xscr:"\\u{1D4CD}",xsqcup:"\\u2A06",xuplus:"\\u2A04",xutri:"\\u25B3",xvee:"\\u22C1",xwedge:"\\u22C0",Yacute:"\\xDD",yacute:"\\xFD",YAcy:"\\u042F",yacy:"\\u044F",Ycirc:"\\u0176",ycirc:"\\u0177",Ycy:"\\u042B",ycy:"\\u044B",yen:"\\xA5",Yfr:"\\u{1D51C}",yfr:"\\u{1D536}",YIcy:"\\u0407",yicy:"\\u0457",Yopf:"\\u{1D550}",yopf:"\\u{1D56A}",Yscr:"\\u{1D4B4}",yscr:"\\u{1D4CE}",YUcy:"\\u042E",yucy:"\\u044E",Yuml:"\\u0178",yuml:"\\xFF",Zacute:"\\u0179",zacute:"\\u017A",Zcaron:"\\u017D",zcaron:"\\u017E",Zcy:"\\u0417",zcy:"\\u0437",Zdot:"\\u017B",zdot:"\\u017C",zeetrf:"\\u2128",ZeroWidthSpace:"\\u200B",Zeta:"\\u0396",zeta:"\\u03B6",Zfr:"\\u2128",zfr:"\\u{1D537}",ZHcy:"\\u0416",zhcy:"\\u0436",zigrarr:"\\u21DD",Zopf:"\\u2124",zopf:"\\u{1D56B}",Zscr:"\\u{1D4B5}",zscr:"\\u{1D4CF}",zwj:"\\u200D",zwnj:"\\u200C"});$r.entityMap=$r.HTML_ENTITIES});var bc=St(is=>{"use strict";var Fi=ii(),z=al(),fc=kr(),by=Fi.isHTMLEscapableRawTextElement,vy=Fi.isHTMLMimeType,wy=Fi.isHTMLRawTextElement,Wr=Fi.hasOwn,ac=Fi.NAMESPACE,uc=fc.ParseError,Ay=fc.DOMException,Vr=0,Ft=1,Li=2,qr=3,_i=4,Ii=5,Ur=6,ts=7;function dc(){}dc.prototype={parse:function(i,e,t){var r=this.domBuilder;r.startDocument(),pc(e,e=Object.create(null)),Cy(i,e,t,r,this.errorHandler),r.endDocument()}};var gl=/&#?\\w+;?/g;function Cy(i,e,t,r,n){var s=vy(r.mimeType);if(i.indexOf(z.UNICODE_REPLACEMENT_CHARACTER)>=0)return n.fatalError("Unicode replacement character detected, source encoding issues?");function o(k){if(k>65535){k-=65536;var K=55296+(k>>10),ue=56320+(k&1023);return String.fromCharCode(K,ue)}else return String.fromCharCode(k)}function l(k){var K=k[k.length-1]===";"?k:k+";";if(!s&&K!==k)return n.error("EntityRef: expecting ;"),k;var ue=z.Reference.exec(K);if(!ue||ue[0].length!==K.length)return n.error("entity not matching Reference production: "+k),k;var pe=K.slice(1,-1);return Wr(t,pe)?t[pe]:pe.charAt(0)==="#"?o(parseInt(pe.substr(1).replace("x","0x"))):(n.error("entity not found:"+k),k)}function a(k){if(k>y){var K=i.substring(y,k).replace(gl,l);d&&u(y),r.characters(K,0,k-y),y=k}}function u(k,K){for(;k>=c&&(K=f.exec(i));)h=K.index,c=h+K[0].length,d.lineNumber++;d.columnNumber=k-h+1}for(var h=0,c=0,f=/.*(?:\\r\\n?|\\n)|.*$/g,d=r.locator,p=[{currentNSMap:e}],g=[],y=0;;){try{var b=i.indexOf("<",y);if(b<0){if(!s&&g.length>0)return n.fatalError("unclosed xml tag(s): "+g.join(", "));if(!i.substring(y).match(/^\\s*$/)){var A=r.doc,w=A.createTextNode(i.substr(y));if(A.documentElement)return n.error("Extra content at the end of the document");A.appendChild(w),r.currentElement=w}return}if(b>y){var E=i.substring(y,b);!s&&g.length===0&&(E=E.replace(new RegExp(z.S_OPT.source,"g"),""),E&&n.error("Unexpected content outside root element: \'"+E+"\'")),a(b)}switch(i.charAt(b+1)){case"/":var I=i.indexOf(">",b+2),S=i.substring(b+2,I>0?I:void 0);if(!S)return n.fatalError("end tag name missing");var N=I>0&&z.reg("^",z.QName_group,z.S_OPT,"$").exec(S);if(!N)return n.fatalError(\'end tag name contains invalid characters: "\'+S+\'"\');if(!r.currentElement&&!r.doc.documentElement)return;var M=g[g.length-1]||r.currentElement.tagName||r.doc.documentElement.tagName||"";if(M!==N[1]){var j=N[1].toLowerCase();if(!s||M.toLowerCase()!==j)return n.fatalError(\'Opening and ending tag mismatch: "\'+M+\'" != "\'+S+\'"\')}var D=p.pop();g.pop();var H=D.localNSMap;if(r.endElement(D.uri,D.localName,M),H)for(var B in H)Wr(H,B)&&r.endPrefixMapping(B);I++;break;case"?":d&&u(b),I=xy(i,b,r,n);break;case"!":d&&u(b),I=mc(i,b,r,n,s);break;default:d&&u(b);var O=new yc,W=p[p.length-1].currentNSMap,I=Sy(i,b,O,W,l,n,s),te=O.length;if(O.closed||(s&&Fi.isHTMLVoidElement(O.tagName)?O.closed=!0:g.push(O.tagName)),d&&te){for(var Ce=hc(d,{}),F=0;Fy?y=I:a(Math.max(b,y)+1)}}function hc(i,e){return e.lineNumber=i.lineNumber,e.columnNumber=i.columnNumber,e}function Sy(i,e,t,r,n,s,o){function l(d,p,g){if(Wr(t.attributeNames,d))return s.fatalError("Attribute "+d+" redefined");if(!o&&p.indexOf("<")>=0)return s.fatalError("Unescaped \'<\' not allowed in attributes values");t.addValue(d,p.replace(/[\\t\\n\\r]/g," ").replace(gl,n),g)}for(var a,u,h=++e,c=Vr;;){var f=i.charAt(h);switch(f){case"=":if(c===Ft)a=i.slice(e,h),c=qr;else if(c===Li)c=qr;else throw new Error("attribute equal must after attrName");break;case"\'":case\'"\':if(c===qr||c===Ft)if(c===Ft&&(s.warning(\'attribute value must after "="\'),a=i.slice(e,h)),e=h+1,h=i.indexOf(f,e),h>0)u=i.slice(e,h),l(a,u,e-1),c=Ii;else throw new Error("attribute value no end \'"+f+"\' match");else if(c==_i)u=i.slice(e,h),l(a,u,e),s.warning(\'attribute "\'+a+\'" missed start quot(\'+f+")!!"),e=h+1,c=Ii;else throw new Error(\'attribute value must after "="\');break;case"/":switch(c){case Vr:t.setTagName(i.slice(e,h));case Ii:case Ur:case ts:c=ts,t.closed=!0;case _i:case Ft:break;case Li:t.closed=!0;break;default:throw new Error("attribute invalid close char(\'/\')")}break;case"":return s.error("unexpected end of input"),c==Vr&&t.setTagName(i.slice(e,h)),h;case">":switch(c){case Vr:t.setTagName(i.slice(e,h));case Ii:case Ur:case ts:break;case _i:case Ft:u=i.slice(e,h),u.slice(-1)==="/"&&(t.closed=!0,u=u.slice(0,-1));case Li:c===Li&&(u=a),c==_i?(s.warning(\'attribute "\'+u+\'" missed quot(")!\'),l(a,u,e)):(o||s.warning(\'attribute "\'+u+\'" missed value!! "\'+u+\'" instead!!\'),l(u,u,e));break;case qr:if(!o)return s.fatalError(`AttValue: \' or " expected`)}return h;case"\\x80":f=" ";default:if(f<=" ")switch(c){case Vr:t.setTagName(i.slice(e,h)),c=Ur;break;case Ft:a=i.slice(e,h),c=Li;break;case _i:var u=i.slice(e,h);s.warning(\'attribute "\'+u+\'" missed quot(")!!\'),l(a,u,e);case Ii:c=Ur;break}else switch(c){case Li:o||s.warning(\'attribute "\'+a+\'" missed value!! "\'+a+\'" instead2!!\'),l(a,a,e),e=h,c=Ft;break;case Ii:s.warning(\'attribute space is required"\'+a+\'"!!\');case Ur:c=Ft,e=h;break;case qr:c=_i,e=h;break;case ts:throw new Error("elements closed character \'/\' and \'>\' must be connected to")}}h++}}function cc(i,e,t){for(var r=i.tagName,n=null,c=i.length;c--;){var s=i[c],o=s.qName,l=s.value,f=o.indexOf(":");if(f>0)var a=s.prefix=o.slice(0,f),u=o.slice(f+1),h=a==="xmlns"&&u;else u=o,a=null,h=o==="xmlns"&&"";s.localName=u,h!==!1&&(n==null&&(n=Object.create(null),pc(t,t=Object.create(null))),t[h]=n[h]=l,s.uri=ac.XMLNS,e.startPrefixMapping(h,l))}for(var c=i.length;c--;)s=i[c],s.prefix&&(s.prefix==="xml"&&(s.uri=ac.XML),s.prefix!=="xmlns"&&(s.uri=t[s.prefix]));var f=r.indexOf(":");f>0?(a=i.prefix=r.slice(0,f),u=i.localName=r.slice(f+1)):(a=null,u=i.localName=r);var d=i.uri=t[a||""];if(e.startElement(d,u,r,i),i.closed){if(e.endElement(d,u,r),n)for(a in n)Wr(n,a)&&e.endPrefixMapping(a)}else return i.currentNSMap=t,i.localNSMap=n,!0}function Dy(i,e,t,r,n){var s=by(t);if(s||wy(t)){var o=i.indexOf("",e),l=i.substring(e+1,o);return s&&(l=l.replace(gl,r)),n.characters(l,0,l.length),o}return e+1}function pc(i,e){for(var t in i)Wr(i,t)&&(e[t]=i[t])}function gc(i,e){var t=e;function r(u){return u=u||0,i.charAt(t+u)}function n(u){u=u||1,t+=u}function s(){for(var u=0;t"?r.fatalError("doctype not terminated with > at position "+s.getIndex()):(s.skip(1),t.startDTD(a.name,a.publicId,a.systemId,a.internalSubset),t.endDTD(),s.getIndex())}default:return r.fatalError(\'Not well-formed XML starting with "0)return r.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!z.XMLDecl.test(i.substring(e)))return r.fatalError("xml declaration is not well-formed")}return t.processingInstruction(n[1],n[2]),e+n[0].length}function yc(){this.attributeNames=Object.create(null)}yc.prototype={setTagName:function(i){if(!z.QName_exact.test(i))throw new Error("invalid tagName:"+i);this.tagName=i},addValue:function(i,e,t){if(!z.QName_exact.test(i))throw new Error("invalid attribute:"+i);this.attributeNames[i]=this.length,this[this.length++]={qName:i,value:e,offset:t}},length:0,getLocalName:function(i){return this[i].localName},getLocator:function(i){return this[i].locator},getQName:function(i){return this[i].qName},getURI:function(i){return this[i].uri},getValue:function(i){return this[i].value}};is.XMLReader=dc;is.parseUtils=gc;is.parseDoctypeCommentOrCData=mc});var Ec=St($i=>{"use strict";var li=ii(),Ty=pl(),ky=kr(),vc=lc(),My=bc(),Ry=Ty.DOMImplementation,Ny=li.hasDefaultHTMLNamespace,Oy=li.isHTMLMimeType,By=li.isValidMimeType,Cc=li.MIME_TYPE,ml=li.NAMESPACE,wc=ky.ParseError,Py=My.XMLReader;function Sc(i){return i.replace(/\\r[\\n\\u0085]/g,`\n`).replace(/[\\r\\u0085\\u2028]/g,`\n`)}function Dc(i){if(i=i||{locator:!0},this.assign=i.assign||li.assign,this.domHandler=i.domHandler||ns,this.onError=i.onError||i.errorHandler,i.errorHandler&&typeof i.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");i.errorHandler&&i.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=i.normalizeLineEndings||Sc,this.locator=!!i.locator,this.xmlns=this.assign(Object.create(null),i.xmlns)}Dc.prototype.parseFromString=function(i,e){if(!By(e))throw new TypeError(\'DOMParser.parseFromString: the provided mimeType "\'+e+\'" is not valid.\');var t=this.assign(Object.create(null),this.xmlns),r=vc.XML_ENTITIES,n=t[""]||null;Ny(e)?(r=vc.HTML_ENTITIES,n=ml.HTML):e===Cc.XML_SVG_IMAGE&&(n=ml.SVG),t[""]=n,t.xml=t.xml||ml.XML;var s=new this.domHandler({mimeType:e,defaultNamespace:n,onError:this.onError}),o=this.locator?{}:void 0;this.locator&&s.setDocumentLocator(o);var l=new Py;l.errorHandler=s,l.domBuilder=s;var a=!li.isHTMLMimeType(e);return a&&typeof i!="string"&&l.errorHandler.fatalError("source is not a string"),l.parse(this.normalizeLineEndings(String(i)),t,r),s.doc.documentElement||l.errorHandler.fatalError("missing root element"),s.doc};function ns(i){var e=i||{};this.mimeType=e.mimeType||Cc.XML_APPLICATION,this.defaultNamespace=e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=e.onError}function Hi(i,e){e.lineNumber=i.lineNumber,e.columnNumber=i.columnNumber}ns.prototype={startDocument:function(){var i=new Ry;this.doc=Oy(this.mimeType)?i.createHTMLDocument(!1):i.createDocument(this.defaultNamespace,"")},startElement:function(i,e,t,r){var n=this.doc,s=n.createElementNS(i,t||e),o=r.length;rs(this,s),this.currentElement=s,this.locator&&Hi(this.locator,s);for(var l=0;l=e+t||e?new java.lang.String(i,e,t)+"":i}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\\w+/g,function(i){ns.prototype[i]=function(){return null}});function rs(i,e){i.currentElement?i.currentElement.appendChild(e):i.doc.appendChild(e)}function _y(i){if(i==="error")throw"onErrorStopParsing"}function Iy(){throw"onWarningStopParsing"}$i.__DOMHandler=ns;$i.DOMParser=Dc;$i.normalizeLineEndings=Sc;$i.onErrorStopParsing=_y;$i.onWarningStopParsing=Iy});var xc=St(G=>{"use strict";var Vi=ii();G.assign=Vi.assign;G.hasDefaultHTMLNamespace=Vi.hasDefaultHTMLNamespace;G.isHTMLMimeType=Vi.isHTMLMimeType;G.isValidMimeType=Vi.isValidMimeType;G.MIME_TYPE=Vi.MIME_TYPE;G.NAMESPACE=Vi.NAMESPACE;var ss=kr();G.DOMException=ss.DOMException;G.DOMExceptionName=ss.DOMExceptionName;G.ExceptionCode=ss.ExceptionCode;G.ParseError=ss.ParseError;var de=pl();G.Attr=de.Attr;G.CDATASection=de.CDATASection;G.CharacterData=de.CharacterData;G.Comment=de.Comment;G.Document=de.Document;G.DocumentFragment=de.DocumentFragment;G.DocumentType=de.DocumentType;G.DOMImplementation=de.DOMImplementation;G.Element=de.Element;G.Entity=de.Entity;G.EntityReference=de.EntityReference;G.LiveNodeList=de.LiveNodeList;G.NamedNodeMap=de.NamedNodeMap;G.Node=de.Node;G.NodeList=de.NodeList;G.Notation=de.Notation;G.ProcessingInstruction=de.ProcessingInstruction;G.Text=de.Text;G.XMLSerializer=de.XMLSerializer;var yl=Ec();G.DOMParser=yl.DOMParser;G.onErrorStopParsing=yl.onErrorStopParsing;G.onWarningStopParsing=yl.onWarningStopParsing});var Y=class i{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=pi(this,e,t);let n=[];return this.decompose(0,e,n,2),r.length&&r.decompose(0,r.length,n,3),this.decompose(t,this.length,n,1),hi.from(n,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=pi(this,e,t);let r=[];return this.decompose(e,t,r,0),hi.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),n=new qt(this),s=new qt(e);for(let o=t,l=t;;){if(n.next(o),s.next(o),o=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(l+=n.value.length,n.done||l>=r)return!0}}iter(e=1){return new qt(this,e)}iterRange(e,t=this.length){return new Xr(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let n=this.line(e).from;r=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Jr(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?i.empty:e.length<=32?new Le(e):hi.from(Le.split(e,[]))}},Le=class i extends Y{constructor(e,t=Kc(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,n){for(let s=0;;s++){let o=this.text[s],l=n+o.length;if((t?r:l)>=e)return new fs(n,l,r,o);n=l+1,r++}}decompose(e,t,r,n){let s=e<=0&&t>=this.length?this:new i(Fl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(n&1){let o=r.pop(),l=Kr(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new i(l,o.length+s.length));else{let a=l.length>>1;r.push(new i(l.slice(0,a)),new i(l.slice(a)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof i))return super.replace(e,t,r);[e,t]=pi(this,e,t);let n=Kr(this.text,Kr(r.text,Fl(this.text,0,e)),t),s=this.length+r.length-(t-e);return n.length<=32?new i(n,s):hi.from(i.split(n,[]),s)}sliceString(e,t=this.length,r=`\n`){[e,t]=pi(this,e,t);let n="";for(let s=0,o=0;s<=t&&oe&&o&&(n+=r),es&&(n+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],n=-1;for(let s of e)r.push(s),n+=s.length+1,r.length==32&&(t.push(new i(r,n)),r=[],n=-1);return n>-1&&t.push(new i(r,n)),t}},hi=class i extends Y{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,n){for(let s=0;;s++){let o=this.children[s],l=n+o.length,a=r+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,r,n);n=l+1,r=a+1}}decompose(e,t,r,n){for(let s=0,o=0;o<=t&&s=o){let u=n&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!u?r.push(l):l.decompose(e-o,t-o,r,u)}o=a+1}}replace(e,t,r){if([e,t]=pi(this,e,t),r.lines=s&&t<=l){let a=o.replace(e-s,t-s,r),u=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>u>>6){let h=this.children.slice();return h[n]=a,new i(h,this.length-(t-e)+r.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`\n`){[e,t]=pi(this,e,t);let n="";for(let s=0,o=0;se&&s&&(n+=r),eo&&(n+=l.sliceString(e-o,t-o,r)),o=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof i))return 0;let r=0,[n,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,s+=t){if(n==o||s==l)return r;let a=this.children[n],u=e.children[s];if(a!=u)return r+a.scanIdentical(u,t);r+=a.length+1}}static from(e,t=e.reduce((r,n)=>r+n.length+1,-1)){let r=0;for(let d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new Le(d,t)}let n=Math.max(32,r>>5),s=n<<1,o=n>>1,l=[],a=0,u=-1,h=[];function c(d){let p;if(d.lines>s&&d instanceof i)for(let g of d.children)c(g);else d.lines>o&&(a>o||!a)?(f(),l.push(d)):d instanceof Le&&a&&(p=h[h.length-1])instanceof Le&&d.lines+p.lines<=32?(a+=d.lines,u+=d.length+1,h[h.length-1]=new Le(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>n&&f(),a+=d.lines,u+=d.length+1,h.push(d))}function f(){a!=0&&(l.push(h.length==1?h[0]:i.from(h,u)),u=-1,a=h.length=0)}for(let d of e)c(d);return f(),l.length==1?l[0]:new i(l,t)}};Y.empty=new Le([""],0);function Kc(i){let e=-1;for(let t of i)e+=t.length+1;return e}function Kr(i,e,t=0,r=1e9){for(let n=0,s=0,o=!0;s=t&&(a>r&&(l=l.slice(0,r-n)),n0?1:(e instanceof Le?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,n=this.nodes[r],s=this.offsets[r],o=s>>1,l=n instanceof Le?n.text.length:n.children.length;if(o==(t>0?l:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`\n`,this;e--}else if(n instanceof Le){let a=n.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=n.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof Le?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Xr=class{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new qt(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=r?n:t<0?n.slice(n.length-r):n.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},Jr=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol!="undefined"&&(Y.prototype[Symbol.iterator]=function(){return this.iter()},qt.prototype[Symbol.iterator]=Xr.prototype[Symbol.iterator]=Jr.prototype[Symbol.iterator]=function(){return this});var fs=class{constructor(e,t,r,n){this.from=e,this.to=t,this.number=r,this.text=n}get length(){return this.to-this.from}};function pi(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}var ci="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(i=>i?parseInt(i,36):1);for(let i=1;ii)return ci[e-1]<=i;return!1}function Hl(i){return i>=127462&&i<=127487}var $l=8205;function Ze(i,e,t=!0,r=!0){return(t?jl:Xc)(i,e,r)}function jl(i,e,t){if(e==i.length)return e;e&&Gl(i.charCodeAt(e))&&Kl(i.charCodeAt(e-1))&&e--;let r=Yr(i,e);for(e+=ds(r);e=0&&Hl(Yr(i,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function Xc(i,e,t){for(;e>0;){let r=jl(i,e-2,t);if(r=56320&&i<57344}function Kl(i){return i>=55296&&i<56320}function Yr(i,e){let t=i.charCodeAt(e);if(!Kl(t)||e+1==i.length)return t;let r=i.charCodeAt(e+1);return Gl(r)?(t-55296<<10)+(r-56320)+65536:t}function ds(i){return i<65536?1:2}var ps=/\\r\\n?|\\n/,Me=function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i}(Me||(Me={})),Ut=class i{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return s+(e-n);s+=l}else{if(r!=Me.Simple&&u>=e&&(r==Me.TrackDel&&ne||r==Me.TrackBefore&&ne))return null;if(u>e||u==e&&t<0&&!l)return e==n||t<0?s:s+a;s+=a}n=u}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return s}touchesRange(e,t=e){for(let r=0,n=0;r=0&&n<=t&&l>=e)return nt?"cover":!0;n=l}return!1}toString(){let e="";for(let t=0;t=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new i(e)}static create(e){return new i(e)}},_e=class i extends Ut{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return gs(this,(t,r,n,s,o)=>e=e.replace(n,n+(r-t),o),!1),e}mapDesc(e,t=!1){return ms(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let n=0,s=0;n=0){t[n]=l,t[n+1]=o;let a=n>>1;for(;r.length0&&Dt(r,t,s.text),s.forward(h),l+=h}let u=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,r){let n=[],s=[],o=0,l=null;function a(h=!1){if(!h&&!n.length)return;of||c<0||f>t)throw new RangeError(`Invalid change range ${c} to ${f} (in doc of length ${t})`);let p=d?typeof d=="string"?Y.of(d.split(r||ps)):d:Y.empty,g=p.length;if(c==f&&g==0)return;co&&De(n,c-o,-1),De(n,f-c,g),Dt(s,n,p),o=f}}return u(e),a(!l),l}static empty(e){return new i(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let n=0;nl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length=0&&t<=0&&t==i[n+1]?i[n]+=e:e==0&&i[n]==0?i[n+1]+=t:r?(i[n]+=e,i[n+1]+=t):i.push(e,t)}function Dt(i,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||o==i.sections.length||i.sections[o+1]<0);)l=i.sections[o++],a=i.sections[o++];e(n,u,s,h,c),n=u,s=h}}}function ms(i,e,t,r=!1){let n=[],s=r?[]:null,o=new Wt(i),l=new Wt(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let u=Math.min(o.len,l.len);De(n,u,-1),o.forward(u),l.forward(u)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let u=0,h=o.len;for(;h;)if(l.ins==-1){let c=Math.min(h,l.len);u+=c,h-=c,l.forward(c)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||r.length>u),s.forward2(a),o.forward(a)}}}}var Wt=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Y.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Y.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},ui=class i{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,n;return this.empty?r=n=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),r==this.from&&n==this.to?this:new i(r,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return P.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return P.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return P.range(e.anchor,e.head)}static create(e,t,r){return new i(e,t,r)}},P=class i{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:i.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new i(e.ranges.map(t=>ui.fromJSON(t)),e.main)}static single(e,t=e){return new i([i.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,n=0;ne?8:0)|s)}static normalized(e,t=0){let r=e[t];e.sort((n,s)=>n.from-s.from),t=e.indexOf(r);for(let n=1;ns.head?i.range(a,l):i.range(l,a))}}return new i(e,t)}};function Xl(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}var xs=0,$=class i{constructor(e,t,r,n,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=n,this.id=xs++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new i(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:Ts),!!e.static,e.enables)}of(e){return new fi([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can\'t compute a static facet");return new fi(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can\'t compute a static facet");return new fi(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}};function Ts(i,e){return i==e||i.length==e.length&&i.every((t,r)=>t===e[r])}var fi=class{constructor(e,t,r,n){this.dependencies=e,this.facet=t,this.type=r,this.value=n,this.id=xs++}dynamicSlot(e){var t;let r=this.value,n=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,u=!1,h=[];for(let c of this.dependencies)c=="doc"?a=!0:c=="selection"?u=!0:((t=e[c.id])!==null&&t!==void 0?t:1)&1||h.push(e[c.id]);return{create(c){return c.values[o]=r(c),1},update(c,f){if(a&&f.docChanged||u&&(f.docChanged||f.selection)||ys(c,h)){let d=r(c);if(l?!Vl(d,c.values[o],n):!n(d,c.values[o]))return c.values[o]=d,1}return 0},reconfigure:(c,f)=>{let d,p=f.config.address[s];if(p!=null){let g=tn(f,p);if(this.dependencies.every(y=>y instanceof $?f.facet(y)===c.facet(y):y instanceof gt?f.field(y,!1)==c.field(y,!1):!0)||(l?Vl(d=r(c),g,n):n(d=r(c),g)))return c.values[o]=g,0}else d=r(c);return c.values[o]=d,1}}}};function Vl(i,e,t){if(i.length!=e.length)return!1;for(let r=0;ri[a.id]),n=t.map(a=>a.type),s=r.filter(a=>!(a&1)),o=i[e.id]>>1;function l(a){let u=[];for(let h=0;hr===n),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(ql).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,n)=>{let s=r.values[t],o=this.updateF(s,n);return this.compareF(s,o)?0:(r.values[t]=o,1)},reconfigure:(r,n)=>n.config.address[this.id]!=null?(r.values[t]=n.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,ql.of({field:this,create:e})]}get extension(){return this}},$t={lowest:4,low:3,default:2,high:1,highest:0};function zi(i){return e=>new Qr(e,i)}var nn={highest:zi($t.highest),high:zi($t.high),default:zi($t.default),low:zi($t.low),lowest:zi($t.lowest)},Qr=class{constructor(e,t){this.inner=e,this.prec=t}},Zr=class i{of(e){return new Gi(this,e)}reconfigure(e){return i.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}},Gi=class{constructor(e,t){this.compartment=e,this.inner=t}},en=class i{constructor(e,t,r,n,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=n,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let n=[],s=Object.create(null),o=new Map;for(let f of Qc(e,t,o))f instanceof gt?n.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let l=Object.create(null),a=[],u=[];for(let f of n)l[f.id]=u.length<<1,u.push(d=>f.slot(d));let h=r==null?void 0:r.config.facets;for(let f in s){let d=s[f],p=d[0].facet,g=h&&h[f]||[];if(d.every(y=>y.type==0))if(l[p.id]=a.length<<1|1,Ts(g,d))a.push(r.facet(p));else{let y=p.combine(d.map(b=>b.value));a.push(r&&p.compare(y,r.facet(p))?r.facet(p):y)}else{for(let y of d)y.type==0?(l[y.id]=a.length<<1|1,a.push(y.value)):(l[y.id]=u.length<<1,u.push(b=>y.dynamicSlot(b)));l[p.id]=u.length<<1,u.push(y=>Jc(y,p,d))}}let c=u.map(f=>f(l));return new i(e,o,c,l,a,s)}};function Qc(i,e,t){let r=[[],[],[],[],[]],n=new Map;function s(o,l){let a=n.get(o);if(a!=null){if(a<=l)return;let u=r[a].indexOf(o);u>-1&&r[a].splice(u,1),o instanceof Gi&&t.delete(o.compartment)}if(n.set(o,l),Array.isArray(o))for(let u of o)s(u,l);else if(o instanceof Gi){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;t.set(o.compartment,u),s(u,l)}else if(o instanceof Qr)s(o.inner,o.prec);else if(o instanceof gt)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof fi)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,$t.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,l)}}return s(i,$t.default),r.reduce((o,l)=>o.concat(l))}function ji(i,e){if(e&1)return 2;let t=e>>1,r=i.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;i.status[t]=4;let n=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|n}function tn(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}var Jl=$.define(),bs=$.define({combine:i=>i.some(e=>e),static:!0}),Ql=$.define({combine:i=>i.length?i[0]:void 0,static:!0}),Zl=$.define(),ea=$.define(),ta=$.define(),ia=$.define({combine:i=>i.length?i[0]:!1}),mt=class{constructor(e,t){this.type=e,this.value=t}static define(){return new vs}},vs=class{of(e){return new mt(this,e)}},ws=class{constructor(e){this.map=e}of(e){return new se(this,e)}},se=class i{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new i(this.type,t)}is(e){return this.type==e}static define(e={}){return new ws(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let n of e){let s=n.map(t);s&&r.push(s)}return r}};se.reconfigure=se.define();se.appendConfig=se.define();var Re=class i{constructor(e,t,r,n,s,o){this.startState=e,this.changes=t,this.selection=r,this.effects=n,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&Xl(r,t.newLength),s.some(l=>l.type==i.time)||(this.annotations=s.concat(i.time.of(Date.now())))}static create(e,t,r,n,s,o){return new i(e,t,r,n,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(i.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}};Re.time=mt.define();Re.userEvent=mt.define();Re.addToHistory=mt.define();Re.remote=mt.define();function Zc(i,e){let t=[];for(let r=0,n=0;;){let s,o;if(r=i[r]))s=i[r++],o=i[r++];else if(n=0;n--){let s=r[n](i);s instanceof Re?i=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Re?i=s[0]:i=na(e,di(s),!1)}return i}function tf(i){let e=i.startState,t=e.facet(ta),r=i;for(let n=t.length-1;n>=0;n--){let s=t[n](i);s&&Object.keys(s).length&&(r=ra(r,As(e,s,i.changes.newLength),!0))}return r==i?i:Re.create(e,i.changes,i.selection,r.effects,r.annotations,r.scrollIntoView)}var rf=[];function di(i){return i==null?rf:Array.isArray(i)?i:[i]}var Qe=function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i}(Qe||(Qe={})),nf=/[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/,Cs;try{Cs=new RegExp("[\\\\p{Alphabetic}\\\\p{Number}_]","u")}catch(i){}function sf(i){if(Cs)return Cs.test(i);for(let e=0;e"\\x80"&&(t.toUpperCase()!=t.toLowerCase()||nf.test(t)))return!0}return!1}function of(i){return e=>{if(!/\\S/.test(e))return Qe.Space;if(sf(e))return Qe.Word;for(let t=0;t-1)return Qe.Word;return Qe.Other}}var oe=class i{constructor(e,t,r,n,s,o){this.config=e,this.doc=t,this.selection=r,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;ln.set(u,a)),t=null),n.set(l.value.compartment,l.value.extension)):l.is(se.reconfigure)?(t=null,r=l.value):l.is(se.appendConfig)&&(t=null,r=di(r).concat(l.value));let s;t?s=e.startState.values.slice():(t=en.resolve(r,n,this),s=new i(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,u)=>u.reconfigure(a,this),null).values);let o=e.startState.facet(bs)?e.newSelection:e.newSelection.asSingle();new i(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:P.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),n=this.changes(r.changes),s=[r.range],o=di(r.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return i.create({doc:e.doc,selection:P.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=en.resolve(e.extensions||[],new Map),r=e.doc instanceof Y?e.doc:Y.of((e.doc||"").split(t.staticFacet(i.lineSeparator)||ps)),n=e.selection?e.selection instanceof P?e.selection:P.single(e.selection.anchor,e.selection.head):P.single(0);return Xl(n,r.length),t.staticFacet(bs)||(n=n.asSingle()),new i(t,r,n,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(i.tabSize)}get lineBreak(){return this.facet(i.lineSeparator)||`\n`}get readOnly(){return this.facet(ia)}phrase(e,...t){for(let r of this.facet(i.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\\$(\\$|\\d*)/g,(r,n)=>{if(n=="$")return"$";let s=+(n||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let n=[];for(let s of this.facet(Jl))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&n.push(o[e]);return n}charCategorizer(e){return of(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:n}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let a=Ze(t,o,!1);if(s(t.slice(a,o))!=Qe.Word)break;o=a}for(;li.length?i[0]:4});oe.lineSeparator=Ql;oe.readOnly=ia;oe.phrases=$.define({compare(i,e){let t=Object.keys(i),r=Object.keys(e);return t.length==r.length&&t.every(n=>i[n]==e[n])}});oe.languageData=Jl;oe.changeFilter=Zl;oe.transactionFilter=ea;oe.transactionExtender=ta;Zr.reconfigure=se.define();var yt=class{eq(e){return this==e}range(e,t=e){return Ki.create(e,t,this)}};yt.prototype.startSide=yt.prototype.endSide=0;yt.prototype.point=!1;yt.prototype.mapMode=Me.TrackDel;var Ki=class i{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new i(e,t,r)}};function Ss(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}var Ds=class i{constructor(e,t,r,n){this.from=e,this.to=t,this.value=r,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,n=0){let s=r?this.to:this.from;for(let o=n,l=s.length;;){if(o==l)return o;let a=o+l>>1,u=s[a]-e||(r?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return u>=0?o:l;u>=0?l=a:o=a+1}}between(e,t,r,n){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);sd||f==d&&u.startSide>0&&u.endSide<=0)continue;(d-f||u.endSide-u.startSide)<0||(o<0&&(o=f),u.point&&(l=Math.max(l,d-f)),r.push(u),n.push(f-o),s.push(d-o))}return{mapped:r.length?new i(n,s,r,l):null,pos:o}}},he=class i{constructor(e,t,r,n){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=n}static create(e,t,r,n){return new i(e,t,r,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:n=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(Ss)),this.isEmpty)return t.length?i.of(t):this;let l=new rn(this,null,-1).goto(0),a=0,u=[],h=new zt;for(;l.value||a=0){let c=t[a++];h.addInner(c.from,c.to,c.value)||u.push(c)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||sl.to||s=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Yi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Yi.from(e).goto(t)}static compare(e,t,r,n,s=-1){let o=e.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=s),l=t.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=s),a=Ul(o,l,r),u=new Vt(o,a,s),h=new Vt(l,a,s);r.iterGaps((c,f,d)=>Wl(u,c,h,f,d,n)),r.empty&&r.length==0&&Wl(u,0,h,0,0,n)}static eq(e,t,r=0,n){n==null&&(n=999999999);let s=e.filter(h=>!h.isEmpty&&t.indexOf(h)<0),o=t.filter(h=>!h.isEmpty&&e.indexOf(h)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=Ul(s,o),a=new Vt(s,l,0).goto(r),u=new Vt(o,l,0).goto(r);for(;;){if(a.to!=u.to||!Es(a.active,u.active)||a.point&&(!u.point||!a.point.eq(u.point)))return!1;if(a.to>n)return!0;a.next(),u.next()}}static spans(e,t,r,n,s=-1){let o=new Vt(e,null,s).goto(t),l=t,a=o.openStart;for(;;){let u=Math.min(o.to,r);if(o.point){let h=o.activeForPoint(o.to),c=o.pointFroml&&(n.span(l,u,o.active,a),a=o.openEnd(u));if(o.to>r)return a+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,t=!1){let r=new zt;for(let n of e instanceof Ki?[e]:t?lf(e):e)r.add(n.from,n.to,n.value);return r.finish()}static join(e){if(!e.length)return i.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let n=e[r];n!=i.empty;n=n.nextLayer)t=new i(n.chunkPos,n.chunk,t,Math.max(n.maxPoint,t.maxPoint));return t}};he.empty=new he([],[],null,-1);function lf(i){if(i.length>1)for(let e=i[0],t=1;t0)return i.slice().sort(Ss);e=r}return i}he.empty.nextLayer=he.empty;var zt=class i{finishChunk(e){this.chunks.push(new Ds(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new i)).add(e,t,r)}addInner(e,t,r){let n=e-this.lastTo||r.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return n<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(he.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=he.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function Ul(i,e,t){let r=new Map;for(let s of i)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&n.push(new rn(o,t,r,s));return n.length==1?n[0]:new i(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)cs(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)cs(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),cs(this.heap,0)}}};function cs(i,e){for(let t=i[e];;){let r=(e<<1)+1;if(r>=i.length)break;let n=i[r];if(r+1=0&&(n=i[r+1],r++),t.compare(n)<0)break;i[r]=t,i[e]=n,e=r}}var Vt=class{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yi.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){jr(this.active,e),jr(this.activeTo,e),jr(this.activeRank,e),this.minActive=zl(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:n,rank:s}=this.cursor;for(;t0;)t++;Gr(this.active,t,r),Gr(this.activeTo,t,n),Gr(this.activeRank,t,s),e&&Gr(e,t,this.cursor.from),this.minActive=zl(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),r&&jr(r,n)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[n]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}};function Wl(i,e,t,r,n,s){i.goto(e),t.goto(r);let o=r+n,l=r,a=r-e;for(;;){let u=i.to+a-t.to||i.endSide-t.endSide,h=u<0?i.to+a:t.to,c=Math.min(h,o);if(i.point||t.point?i.point&&t.point&&(i.point==t.point||i.point.eq(t.point))&&Es(i.activeForPoint(i.to),t.activeForPoint(t.to))||s.comparePoint(l,c,i.point,t.point):c>l&&!Es(i.active,t.active)&&s.compareRange(l,c,i.active,t.active),h>o)break;l=h,u<=0&&i.next(),u>=0&&t.next()}}function Es(i,e){if(i.length!=e.length)return!1;for(let t=0;t=e;r--)i[r+1]=i[r];i[e]=t}function zl(i,e){let t=-1,r=1e9;for(let n=0;n=e)return n;if(n==i.length)break;s+=i.charCodeAt(n)==9?t-s%t:1,n=Ze(i,n)}return r===!0?-1:i.length}var ks="\\u037C",oa=typeof Symbol=="undefined"?"__"+ks:Symbol.for(ks),Ms=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),la=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{},He=class{constructor(e,t){this.rules=[];let{finish:r}=t||{};function n(o){return/^@/.test(o)?[o]:o.split(/,\\s*/)}function s(o,l,a,u){let h=[],c=/^@(\\w+)\\b/.exec(o[0]),f=c&&c[1]=="keyframes";if(c&&l==null)return a.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))s(d.split(/,\\s*/).map(g=>o.map(y=>g.replace(/&/,y))).reduce((g,y)=>g.concat(y)),p,a);else if(p&&typeof p=="object"){if(!c)throw new RangeError("The value of a property ("+d+") should be a primitive value.");s(n(d),p,h,f)}else p!=null&&h.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(h.length||f)&&a.push((r&&!c&&!u?o.map(r):o).join(", ")+" {"+h.join(" ")+"}")}for(let o in e)s(n(o),e[o],this.rules)}getRules(){return this.rules.join(`\n`)}static newName(){let e=la[oa]||1;return la[oa]=e+1,ks+e.toString(36)}static mount(e,t,r){let n=e[Ms],s=r&&r.nonce;n?s&&n.setNonce(s):n=new Rs(e,s),n.mount(Array.isArray(t)?t:[t],e)}},aa=new Map,Rs=class{constructor(e,t){let r=e.ownerDocument||e,n=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let s=aa.get(r);if(s)return e[Ms]=s;this.sheet=new n.CSSStyleSheet,aa.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Ms]=this}mount(e,t){let r=this.sheet,n=0,s=0;for(let o=0;o-1&&(this.modules.splice(a,1),s--,a=-1),a==-1){if(this.modules.splice(s++,0,l),r)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:\'"\'},Db=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),Eb=typeof navigator!="undefined"&&/MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);for(ce=0;ce<10;ce++)jt[48+ce]=jt[96+ce]=String(ce);var ce;for(ce=1;ce<=24;ce++)jt[ce+111]="F"+ce;var ce;for(ce=65;ce<=90;ce++)jt[ce]=String.fromCharCode(ce+32),on[ce]=String.fromCharCode(ce);var ce;for(sn in jt)on.hasOwnProperty(sn)||(on[sn]=jt[sn]);var sn;function sr(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function Ls(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function hf(i){let e=i.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function pn(i,e){if(!e.anchorNode)return!1;try{return Ls(i,e.anchorNode)}catch(t){return!1}}function or(i){return i.nodeType==3?Yt(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function er(i,e,t,r){return t?ua(i,e,t,r,-1)||ua(i,e,t,r,1):!1}function Kt(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function yn(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\\d|SECTION|PRE)$/.test(i.nodeName)}function ua(i,e,t,r,n){for(;;){if(i==t&&e==r)return!0;if(e==(n<0?0:bt(i))){if(i.nodeName=="DIV")return!1;let s=i.parentNode;if(!s||s.nodeType!=1)return!1;e=Kt(i)+(n<0?0:1),i=s}else if(i.nodeType==1){if(i=i.childNodes[e+(n<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=n<0?bt(i):0}else return!1}}function bt(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function kn(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function cf(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function $a(i,e){let t=e.width/i.offsetWidth,r=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-i.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function ff(i,e,t,r,n,s,o,l){let a=i.ownerDocument,u=a.defaultView||window;for(let h=i,c=!1;h&&!c;)if(h.nodeType==1){let f,d=h==a.body,p=1,g=1;if(d)f=cf(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(c=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let A=h.getBoundingClientRect();({scaleX:p,scaleY:g}=$a(h,A)),f={left:A.left,right:A.left+h.clientWidth*p,top:A.top,bottom:A.top+h.clientHeight*g}}let y=0,b=0;if(n=="nearest")e.top0&&e.bottom>f.bottom+b&&(b=e.bottom-f.bottom+b+o)):e.bottom>f.bottom&&(b=e.bottom-f.bottom+o,t<0&&e.top-b0&&e.right>f.right+y&&(y=e.right-f.right+y+s)):e.right>f.right&&(y=e.right-f.right+s,t<0&&e.leftn.clientHeight&&(r=n),!t&&n.scrollWidth>n.clientWidth&&(t=n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;return{x:t,y:r}}var _s=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?bt(t):0),r,Math.min(e.focusOffset,r?bt(r):0))}set(e,t,r,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=n}},gi=null;function Va(i){if(i.setActive)return i.setActive();if(gi)return i.focus(gi);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus(gi==null?{get preventScroll(){return gi={preventScroll:!0},!0}}:void 0),!gi){gi=!1;for(let t=0;tMath.max(1,i.scrollHeight-i.clientHeight-4)}function Wa(i,e){for(let t=i,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=bt(t)}else if(t.parentNode&&!yn(t))r=Kt(t),t=t.parentNode;else return null}}function za(i,e){for(let t=i,r=e;;){if(t.nodeType==3&&rt)return c.domBoundsAround(e,t,u);if(f>=e&&n==-1&&(n=a,s=u),u>t&&c.dom.parentNode==this.dom){o=a,l=h;break}h=f,u=f+c.breakAfter}return{from:s,to:l<0?r+this.length:l,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=co){this.markDirty();for(let n=e;nthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}};function ja(i,e,t,r,n,s,o,l,a){let{children:u}=i,h=u.length?u[e]:null,c=s.length?s[s.length-1]:null,f=c?c.breakAfter:o;if(!(e==r&&h&&!o&&!f&&s.length<2&&h.merge(t,n,s.length?c:null,t==0,l,a))){if(r0&&(!o&&s.length&&h.merge(t,h.length,s[0],!1,l,0)?h.breakAfter=s.shift().breakAfter:(t2),R={mac:pa||/Mac/.test(Ne.platform),windows:/Win/.test(Ne.platform),linux:/Linux|X11/.test(Ne.platform),ie:Mn,ie_version:Ka?Is.documentMode||6:Hs?+Hs[1]:Fs?+Fs[1]:0,gecko:fa,gecko_version:fa?+(/Firefox\\/(\\d+)/.exec(Ne.userAgent)||[0,0])[1]:0,chrome:!!Ns,chrome_version:Ns?+Ns[1]:0,ios:pa,android:/Android\\b/.test(Ne.userAgent),webkit:da,safari:Ya,webkit_version:da?+(/\\bAppleWebKit\\/(\\d+)/.exec(Ne.userAgent)||[0,0])[1]:0,tabSize:Is.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"},mf=256,st=class i extends ee{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof i)||this.length-(t-e)+r.length>mf||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new i(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new xe(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return yf(this.dom,e,t)}},Tt=class i extends ee{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let n of t)n.setParent(this)}setAttrs(e){if(qa(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,n,s,o){return r&&(!(r instanceof i&&r.mark.eq(this.mark))||e&&s<=0||te&&t.push(r=e&&(n=s),r=a,s++}let o=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new i(this.mark,t,o)}domAtPos(e){return Xa(this,e)}coordsAt(e,t){return Qa(this,e,t)}};function yf(i,e,t){let r=i.nodeValue.length;e>r&&(e=r);let n=e,s=e,o=0;e==0&&t<0||e==r&&t>=0?R.chrome||R.gecko||(e?(n--,o=1):s=0)?0:l.length-1];return R.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,u=>u.width)||a),o?kn(a,o<0):a||null}var vn=class i extends ee{static create(e,t,r){return new i(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=i.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,n,s,o){return r&&(!(r instanceof i)||!this.widget.compare(r.widget)||e>0&&s<=0||t0)?xe.before(this.dom):xe.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?n.length-1:0;s=n[l],!(e>0?l==0:l==n.length-1||s.top0?xe.before(this.dom):xe.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Y.empty}get isHidden(){return!0}};st.prototype.children=vn.prototype.children=lr.prototype.children=co;function Xa(i,e){let t=i.dom,{children:r}=i,n=0;for(let s=0;ns&&e0;s--){let o=r[s-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let s=n;s0&&e instanceof Tt&&n.length&&(r=n[n.length-1])instanceof Tt&&r.mark.eq(e.mark)?Ja(r,e.children[0],t-1):(n.push(e),e.setParent(i)),i.length+=e.length}function Qa(i,e,t){let r=null,n=-1,s=null,o=-1;function l(u,h){for(let c=0,f=0;c=h&&(d.children.length?l(d,h-f):(!s||s.isHidden&&t>0)&&(p>h||f==p&&d.getSide()>0)?(s=d,o=h-f):(f-1?1:0)!=n.length-(t&&n.indexOf(t)>-1?1:0))return!1;for(let s of r)if(s!=t&&(n.indexOf(s)==-1||i[s]!==e[s]))return!1;return!0}function Vs(i,e,t){let r=!1;if(e)for(let n in e)t&&n in t||(r=!0,n=="style"?i.style.cssText="":i.removeAttribute(n));if(t)for(let n in t)e&&e[n]==t[n]||(r=!0,n=="style"?i.style.cssText=t[n]:i.setAttribute(n,t[n]));return r}function vf(i){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new kt(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,n;if(e.isBlockGap)r=-5e8,n=4e8;else{let{start:s,end:o}=Za(e,t);r=(s?t?-3e8:-1:5e8)-1,n=(o?t?2e8:1:-6e8)+1}return new kt(e,r,n,t,e.widget||null,!0)}static line(e){return new ur(e)}static set(e,t=!1){return he.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};le.none=he.empty;var ar=class i extends le{constructor(e){let{start:t,end:r}=Za(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof i&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&wn(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}};ar.prototype.point=!1;var ur=class i extends le{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof i&&this.spec.class==e.spec.class&&wn(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}};ur.prototype.mapMode=Me.TrackBefore;ur.prototype.point=!0;var kt=class i extends le{constructor(e,t,r,n,s,o){super(t,r,s,e),this.block=n,this.isReplace=o,this.mapMode=n?t<=0?Me.TrackBefore:Me.TrackAfter:Me.TrackDel}get type(){return this.startSide!=this.endSide?rt.WidgetRange:this.startSide<=0?rt.WidgetBefore:rt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof i&&wf(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}};kt.prototype.point=!0;function Za(i,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=i;return t==null&&(t=i.inclusive),r==null&&(r=i.inclusive),{start:t!=null?t:e,end:r!=null?r:e}}function wf(i,e){return i==e||!!(i&&e&&i.compare(e))}function qs(i,e,t,r=0){let n=t.length-1;n>=0&&t[n]+r>=i?t[n]=Math.max(t[n],e):t.push(i,e)}var we=class i extends ee{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,n,s,o){if(r){if(!(r instanceof i))return!1;this.dom||r.transferDOM(this)}return n&&this.setDeco(r?r.attrs:null),Ga(this,e,t,r?r.children.slice():[],s,o),!0}split(e){let t=new i;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:n}=this.childPos(e);n&&(t.append(this.children[r].split(n),0),this.children[r].merge(n,this.children[r].length,null,!1,0,0),r++);for(let s=r;s0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){wn(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Ja(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$s(t,this.attrs||{})),r&&(this.attrs=$s({class:r},this.attrs||{}))}domAtPos(e){return Xa(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(qa(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Vs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&&ee.get(n)instanceof Tt;)n=n.lastChild;if(!n||!this.length||n.nodeName!="BR"&&((r=ee.get(n))===null||r===void 0?void 0:r.isEditable)==!1&&(!R.ios||!this.children.some(s=>s instanceof st))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof st)||/[^ -~]/.test(r.text))return null;let n=or(r.dom);if(n.length!=1)return null;e+=n[0].width,t=n[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=Qa(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:n}=this.parent.view.viewState,s=r.bottom-r.top;if(Math.abs(s-n.lineHeight)<2&&n.textHeight=t){if(s instanceof i)return s;if(o>t)break}n=o+s.breakAfter}return null}},Gt=class i extends ee{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,n,s,o){return r&&(!(r instanceof i)||!this.widget.compare(r.widget)||e>0&&s<=0||t0}},hr=class extends bi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},tr=class i{constructor(e,t,r,n){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Gt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new we),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ln(new lr(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Gt)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(ln(new st(this.text.slice(this.textOff,this.textOff+n)),t),r),this.atCursorPos=!0,this.textOff+=n,e-=n,r=0}}span(e,t,r,n){this.buildText(t-e,r,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,r,n,s,o){if(this.disallowBlockEffectsFor[o]&&r instanceof kt){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(r instanceof kt)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Gt(r.widget||Mt.block,l,r));else{let a=vn.create(r.widget||Mt.inline,l,l?0:r.startSide),u=this.atCursorPos&&!a.isEditable&&s<=n.length&&(e0),h=!a.isEditable&&(en.length||r.startSide<=0),c=this.getLine();this.pendingBuffer==2&&!u&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(n),u&&(c.append(ln(new lr(1),n),s),s=n.length+Math.max(0,s-n.length)),c.append(ln(a,n),s),this.atCursorPos=h,this.pendingBuffer=h?en.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,r,n,s){let o=new i(e,t,r,s);return o.openEnd=he.spans(n,t,r,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}};function ln(i,e){for(let t of e)i=new Tt(t,[i],i.length);return i}var Mt=class extends bi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};Mt.inline=new Mt("span");Mt.block=new Mt("div");var me=function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i}(me||(me={})),Xt=me.LTR,fo=me.RTL;function eu(i){let e=[];for(let t=0;t=t){if(l.level==r)return o;(s<0||(n!=0?n<0?l.fromt:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}};function iu(i,e){if(i.length!=e.length)return!1;for(let t=0;t=0;g-=3)if(et[g+1]==-d){let y=et[g+2],b=y&2?n:y&4?y&1?s:n:0;b&&(Z[c]=Z[et[g]]=b),l=g;break}}else{if(et.length==189)break;et[l++]=c,et[l++]=f,et[l++]=a}else if((p=Z[c])==2||p==1){let g=p==n;a=g?0:1;for(let y=l-3;y>=0;y-=3){let b=et[y+2];if(b&2)break;if(g)et[y+2]|=2;else{if(b&4)break;et[y+2]|=4}}}}}function xf(i,e,t,r){for(let n=0,s=r;n<=t.length;n++){let o=n?t[n-1].to:i,l=na;)p==y&&(p=t[--g].from,y=g?t[g-1].to:i),Z[--p]=d;a=h}else s=u,a++}}}function Ws(i,e,t,r,n,s,o){let l=r%2?2:1;if(r%2==n%2)for(let a=e,u=0;aa&&o.push(new it(a,g.from,d));let y=g.direction==Xt!=!(d%2);zs(i,y?r+1:r,n,g.inner,g.from,g.to,o),a=g.to}p=g.to}else{if(p==t||(h?Z[p]!=l:Z[p]==l))break;p++}f?Ws(i,a,p,r+1,n,f,o):ae;){let h=!0,c=!1;if(!u||a>s[u-1].to){let g=Z[a-1];g!=l&&(h=!1,c=g==16)}let f=!h&&l==1?[]:null,d=h?r:r+1,p=a;e:for(;;)if(u&&p==s[u-1].to){if(c)break e;let g=s[--u];if(!h)for(let y=g.from,b=u;;){if(y==e)break e;if(b&&s[b-1].to==y)y=s[--b].from;else{if(Z[y-1]==l)break e;break}}if(f)f.push(g);else{g.toZ.length;)Z[Z.length]=256;let r=[],n=e==Xt?0:1;return zs(i,n,n,t,0,i.length,r),r}function ru(i){return[new it(0,i,0)]}var nu="";function kf(i,e,t,r,n){var s;let o=r.head-i.from,l=it.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),a=e[l],u=a.side(n,t);if(o==u){let f=l+=n?1:-1;if(f<0||f>=e.length)return null;a=e[l=f],o=a.side(!n,t),u=a.side(n,t)}let h=Ze(i.text,o,a.forward(n,t));(ha.to)&&(h=u),nu=i.text.slice(Math.min(o,h),Math.max(o,h));let c=l==(n?e.length-1:0)?null:e[l+(n?1:-1)];return c&&h==u&&c.level+(n?0:1)i.some(e=>e)}),Rf=$.define({combine:i=>i.some(e=>e)}),fu=$.define(),ir=class i{constructor(e,t="nearest",r="nearest",n=5,s=5,o=!1){this.range=e,this.y=t,this.x=r,this.yMargin=n,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new i(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new i(P.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},an=se.define({map:(i,e)=>i.map(e)}),du=se.define();function ze(i,e,t){let r=i.facet(au);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}var Et=$.define({combine:i=>i.length?i[0]:!0}),Nf=0,Xi=$.define(),Jt=class i{constructor(e,t,r,n,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=n,this.extension=s(this)}static define(e,t){let{eventHandlers:r,eventObservers:n,provide:s,decorations:o}=t||{};return new i(Nf++,e,r,n,l=>{let a=[Xi.of(l)];return o&&a.push(cr.of(u=>{let h=u.plugin(l);return h?o(h):le.none})),s&&a.push(s(l)),a})}static fromClass(e,t){return i.define(r=>new e(r),t)}},rr=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(ze(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(n){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){ze(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){ze(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},pu=$.define(),mo=$.define(),cr=$.define(),gu=$.define(),yo=$.define(),mu=$.define();function ma(i,e){let t=i.state.facet(mu);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(i):s),n=[];return he.spans(r,e.from,e.to,{point(){},span(s,o,l,a){let u=s-e.from,h=o-e.from,c=n;for(let f=l.length-1;f>=0;f--,a--){let d=l[f].spec.bidiIsolate,p;if(d==null&&(d=Mf(e.text,u,h)),a>0&&c.length&&(p=c[c.length-1]).to==u&&p.direction==d)p.to=h,c=p.inner;else{let g={from:u,to:h,direction:d,inner:[]};c.push(g),c=g.inner}}}}),n}var yu=$.define();function bu(i){let e=0,t=0,r=0,n=0;for(let s of i.state.facet(yu)){let o=s(i);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(n=Math.max(n,o.bottom)))}return{left:e,right:t,top:r,bottom:n}}var Ji=$.define(),nt=class i{constructor(e,t,r,n){this.fromA=e,this.toA=t,this.fromB=r,this.toB=n}join(e){return new i(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>r.toA)){if(n.toAh)break;s+=2}if(!a)return r;new i(a.fromA,a.toA,a.fromB,a.toB).addToSet(r),o=a.toA,l=a.toB}}},An=class i{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=_e.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let n=[];this.changes.iterChangedRanges((s,o,l,a)=>n.push(new nt(s,o,l,a))),this.changedRanges=n}static create(e,t,r){return new i(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Cn=class extends ee{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=le.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new we],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new nt(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:h})=>hthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?n=this.domChanged.newSel.head:!Ff(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let s=n>-1?Bf(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:h}=this.hasComposition;r=new nt(u,h,e.changes.mapPos(u,-1),e.changes.mapPos(h,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(R.ie||R.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=_f(o,l,e.changes);return r=nt.extendWithRanges(r,a),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:n}=this.view;n.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=R.chrome||R.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||n.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?n[o]:null;if(!l)break;let{fromA:a,toA:u,fromB:h,toB:c}=l,f,d,p,g;if(r&&r.range.fromBh){let E=tr.build(this.view.state.doc,h,r.range.fromB,this.decorations,this.dynamicDecorationMap),S=tr.build(this.view.state.doc,r.range.toB,c,this.decorations,this.dynamicDecorationMap);d=E.breakAtStart,p=E.openStart,g=S.openEnd;let N=this.compositionView(r);S.breakAtStart?N.breakAfter=1:S.content.length&&N.merge(N.length,N.length,S.content[0],!1,S.openStart,0)&&(N.breakAfter=S.content[0].breakAfter,S.content.shift()),E.content.length&&N.merge(0,0,E.content[E.content.length-1],!0,0,E.openEnd)&&E.content.pop(),f=E.content.concat(N).concat(S.content)}else({content:f,breakAtStart:d,openStart:p,openEnd:g}=tr.build(this.view.state.doc,h,c,this.decorations,this.dynamicDecorationMap));let{i:y,off:b}=s.findPos(u,1),{i:A,off:w}=s.findPos(a,-1);ja(this,A,w,y,b,f,d,p,g)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(du)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new st(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new Tt(n,[t],t.length);let r=new we;return r.append(t,0),r}fixCompositionDOM(e){let t=(s,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=ee.get(s);l&&l!=o&&(l.dom=null),o.setDOM(s)},r=this.childPos(e.range.fromB,1),n=this.children[r.i];t(e.line,n);for(let s=e.marks.length-1;s>=-1;s--)r=n.childPos(r.off,1),n=n.children[r.i],t(s>=0?e.marks[s].node:e.text,n)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,n=r==this.dom,s=!n&&pn(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(n||t||s))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),u=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(R.gecko&&l.empty&&!this.hasComposition&&Of(a)){let c=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(c,a.node.childNodes[a.offset]||null)),a=u=new xe(c,0),o=!0}let h=this.view.observer.selectionRange;(o||!h.focusNode||(!er(a.node,a.offset,h.anchorNode,h.anchorOffset)||!er(u.node,u.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,l))&&(this.view.observer.ignore(()=>{R.android&&R.chrome&&this.dom.contains(h.focusNode)&&If(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let c=sr(this.view.root);if(c)if(l.empty){if(R.gecko){let f=Pf(a.node,a.offset);if(f&&f!=3){let d=(f==1?Wa:za)(a.node,a.offset);d&&(a=new xe(d.node,d.offset))}}c.collapse(a.node,a.offset),l.bidiLevel!=null&&c.caretBidiLevel!==void 0&&(c.caretBidiLevel=l.bidiLevel)}else if(c.extend){c.collapse(a.node,a.offset);try{c.extend(u.node,u.offset)}catch(f){}}else{let f=document.createRange();l.anchor>l.head&&([a,u]=[u,a]),f.setEnd(u.node,u.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(a,u)),this.impreciseAnchor=a.precise?null:new xe(h.anchorNode,h.anchorOffset),this.impreciseHead=u.precise?null:new xe(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&er(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=sr(e.root),{anchorNode:n,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let o=we.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),u=this.coordsAt(t.head,1);if(!a||!u||a.bottom>u.top)return;let h=this.domAtPos(t.head+t.assoc);r.collapse(h.node,h.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&r.collapse(n,s)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let n=e.offset;!r&&n=0;n--){let s=ee.get(t.childNodes[n]);s instanceof we&&(r=s.domAtPos(s.length))}return r?new xe(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=ee.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;o--){let l=this.children[o],a=s-l.breakAfter,u=a-l.length;if(ae||l.covers(1))&&(!r||l instanceof we&&!(r instanceof we&&t>=0)))r=l,n=u;else if(r&&u==e&&a==e&&l instanceof Gt&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(r=null)}s=u}return r?r.coordsAt(e-n,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),n=this.children[t];if(!(n instanceof we))return null;for(;n.children.length;){let{i:l,off:a}=n.childPos(r,1);for(;;l++){if(l==n.children.length)return null;if((n=n.children[l]).length)break}r=a}if(!(n instanceof st))return null;let s=Ze(n.text,r);if(s==r)return null;let o=Yt(n.dom,r,s).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==me.LTR;for(let u=0,h=0;hn)break;if(u>=r){let d=c.dom.getBoundingClientRect();if(t.push(d.height),o){let p=c.dom.lastChild,g=p?or(p):[];if(g.length){let y=g[g.length-1],b=a?y.right-d.left:d.right-y.left;b>l&&(l=b,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?me.RTL:me.LTR}measureTextSize(){for(let s of this.children)if(s instanceof we){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),t,r,n;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=or(e.firstChild)[0];t=e.getBoundingClientRect().height,r=s?s.width/27:7,n=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new bn(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,n=0;;n++){let s=n==t.viewports.length?null:t.viewports[n],o=s?s.from-1:this.length;if(o>r){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(le.replace({widget:new hr(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return le.set(e)}updateDeco(){let e=1,t=this.view.state.facet(cr).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,n=this.view.state.facet(gu).map((s,o)=>{let l=typeof s=="function";return l&&(r=!0),l?s(this.view):s});for(n.length&&(this.dynamicDecorationMap[e++]=r,t.push(he.join(n))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),n;if(!r)return;!t.empty&&(n=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,n.left),top:Math.min(r.top,n.top),right:Math.max(r.right,n.right),bottom:Math.max(r.bottom,n.bottom)});let s=bu(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;ff(this.view.scrollDOM,o,t.head{re.from&&(t=!0)}),t}function Hf(i,e,t=1){let r=i.charCategorizer(e),n=i.doc.lineAt(e),s=e-n.from;if(n.length==0)return P.cursor(e);s==0?t=1:s==n.length&&(t=-1);let o=s,l=s;t<0?o=Ze(n.text,s,!1):l=Ze(n.text,s);let a=r(n.text.slice(o,l));for(;o>0;){let u=Ze(n.text,o,!1);if(r(n.text.slice(u,o))!=a)break;o=u}for(;li?e.left-i:Math.max(0,i-e.right)}function Vf(i,e){return e.top>i?e.top-i:Math.max(0,i-e.bottom)}function Os(i,e){return i.tope.top+1}function ya(i,e){return ei.bottom?{top:i.top,left:i.left,right:i.right,bottom:e}:i}function Gs(i,e,t){let r,n,s,o,l=!1,a,u,h,c;for(let p=i.firstChild;p;p=p.nextSibling){let g=or(p);for(let y=0;yw||o==w&&s>A){r=p,n=b,s=A,o=w;let E=w?t0?y0)}A==0?t>b.bottom&&(!h||h.bottomb.top)&&(u=p,c=b):h&&Os(h,b)?h=ba(h,b.bottom):c&&Os(c,b)&&(c=ya(c,b.top))}}if(h&&h.bottom>=t?(r=a,n=h):c&&c.top<=t&&(r=u,n=c),!r)return{node:i,offset:0};let f=Math.max(n.left,Math.min(n.right,e));if(r.nodeType==3)return va(r,f,t);if(l&&r.contentEditable!="false")return Gs(r,f,t);let d=Array.prototype.indexOf.call(i.childNodes,r)+(e>=(n.left+n.right)/2?1:0);return{node:i,offset:d}}function va(i,e,t){let r=i.nodeValue.length,n=-1,s=1e9,o=0;for(let l=0;lt?h.top-t:t-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,d=f;if((R.chrome||R.gecko)&&Yt(i,l).getBoundingClientRect().left==h.right&&(d=!f),c<=0)return{node:i,offset:l+(d?1:0)};n=l+(d?1:0),s=c}}}return{node:i,offset:n>-1?n:o>0?i.nodeValue.length:0}}function wu(i,e,t,r=-1){var n,s;let o=i.contentDOM.getBoundingClientRect(),l=o.top+i.viewState.paddingTop,a,{docHeight:u}=i.viewState,{x:h,y:c}=e,f=c-l;if(f<0)return 0;if(f>u)return i.state.doc.length;for(let E=i.viewState.heightOracle.textHeight/2,S=!1;a=i.elementAtHeight(f),a.type!=rt.Text;)for(;f=r>0?a.bottom+E:a.top-E,!(f>=0&&f<=u);){if(S)return t?null:0;S=!0,r=-r}c=l+f;let d=a.from;if(di.viewport.to)return i.viewport.to==i.state.doc.length?i.state.doc.length:t?null:wa(i,o,a,h,c);let p=i.dom.ownerDocument,g=i.root.elementFromPoint?i.root:p,y=g.elementFromPoint(h,c);y&&!i.contentDOM.contains(y)&&(y=null),y||(h=Math.max(o.left+1,Math.min(o.right-1,h)),y=g.elementFromPoint(h,c),y&&!i.contentDOM.contains(y)&&(y=null));let b,A=-1;if(y&&((n=i.docView.nearest(y))===null||n===void 0?void 0:n.isEditable)!=!1){if(p.caretPositionFromPoint){let E=p.caretPositionFromPoint(h,c);E&&({offsetNode:b,offset:A}=E)}else if(p.caretRangeFromPoint){let E=p.caretRangeFromPoint(h,c);E&&({startContainer:b,startOffset:A}=E,(!i.contentDOM.contains(b)||R.safari&&qf(b,A,h)||R.chrome&&Uf(b,A,h))&&(b=void 0))}}if(!b||!i.docView.dom.contains(b)){let E=we.find(i.docView,d);if(!E)return f>a.top+a.height/2?a.to:a.from;({node:b,offset:A}=Gs(E.dom,h,c))}let w=i.docView.nearest(b);if(!w)return null;if(w.isWidget&&((s=w.dom)===null||s===void 0?void 0:s.nodeType)==1){let E=w.dom.getBoundingClientRect();return e.yi.defaultLineHeight*1.5){let l=i.viewState.heightOracle.textHeight,a=Math.floor((n-t.top-(i.defaultLineHeight-l)*.5)/l);s+=a*i.viewState.heightOracle.lineLength}let o=i.state.sliceDoc(t.from,t.to);return t.from+sa(o,s,i.state.tabSize)}function qf(i,e,t){let r;if(i.nodeType!=3||e!=(r=i.nodeValue.length))return!1;for(let n=i.nextSibling;n;n=n.nextSibling)if(n.nodeType!=1||n.nodeName!="BR")return!1;return Yt(i,r-1,r).getBoundingClientRect().left>t}function Uf(i,e,t){if(e!=0)return!1;for(let n=i;;){let s=n.parentNode;if(!s||s.nodeType!=1||s.firstChild!=n)return!1;if(s.classList.contains("cm-line"))break;n=s}let r=i.nodeType==1?i.getBoundingClientRect():Yt(i,0,Math.max(i.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Wf(i,e){let t=i.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==rt.Text))return r}return t}function zf(i,e,t,r){let n=Wf(i,e.head),s=!r||n.type!=rt.Text||!(i.lineWrapping||n.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>n.from?e.head-1:e.head);if(s){let o=i.dom.getBoundingClientRect(),l=i.textDirectionAt(n.from),a=i.posAtCoords({x:t==(l==me.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(a!=null)return P.cursor(a,t?-1:1)}return P.cursor(t?n.to:n.from,t?-1:1)}function Aa(i,e,t,r){let n=i.state.doc.lineAt(e.head),s=i.bidiSpans(n),o=i.textDirectionAt(n.from);for(let l=e,a=null;;){let u=kf(n,s,o,l,t),h=nu;if(!u){if(n.number==(t?i.state.doc.lines:1))return l;h=`\n`,n=i.state.doc.line(n.number+(t?1:-1)),s=i.bidiSpans(n),u=i.visualLineSide(n,!t)}if(a){if(!a(h))return l}else{if(!r)return u;a=r(h)}l=u}}function jf(i,e,t){let r=i.state.charCategorizer(e),n=r(t);return s=>{let o=r(s);return n==Qe.Space&&(n=o),n==o}}function Gf(i,e,t,r){let n=e.head,s=t?1:-1;if(n==(t?i.state.doc.length:0))return P.cursor(n,e.assoc);let o=e.goalColumn,l,a=i.contentDOM.getBoundingClientRect(),u=i.coordsAtPos(n,e.assoc||-1),h=i.documentTop;if(u)o==null&&(o=u.left-a.left),l=s<0?u.top:u.bottom;else{let d=i.viewState.lineBlockAt(n);o==null&&(o=Math.min(a.right-a.left,i.defaultCharacterWidth*(n-d.from))),l=(s<0?d.top:d.bottom)+h}let c=a.left+o,f=r!=null?r:i.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=l+(f+d)*s,g=wu(i,{x:c,y:p},!1,s);if(pa.bottom||(s<0?gn)){let y=i.docView.coordsForChar(g),b=!y||p{if(e>s&&en(i)),t.from,e.head>t.from?-1:1);return r==t.from?t:P.cursor(r,rs)&&this.lineBreak(),n=o}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,n=this.lineSeparator?null:/\\r\\n?|\\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=n.exec(t))&&(s=l.index,o=l[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);r=s+o}}readNode(e){if(e.cmIgnore)return;let t=ee.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let n=r.iter();!n.next().done;)n.lineBreak?this.lineBreak():this.append(n.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(Kf(e,r.node,r.offset)?t:0))}};function Kf(i,e,t){for(;;){if(!e||t-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let l=s||o?[]:Jf(e),a=new Ks(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=Qf(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!Ls(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),u=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!Ls(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),h=e.viewport;if((R.ios||R.chrome)&&e.state.selection.main.empty&&a!=u&&(h.from>0||h.toDate.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=n.from,u=null;(s===8||R.android&&e.text.length=n.from&&t.to<=n.to&&(t.from!=n.from||t.to!=n.to)&&n.to-n.from-(t.to-t.from)<=4?t={from:n.from,to:n.to,insert:i.state.doc.slice(n.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,n.to))}:(R.mac||R.android)&&t&&t.from==t.to&&t.from==n.head-1&&/^\\. ?$/.test(t.insert.toString())&&i.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=P.single(r.main.anchor-1,r.main.head-1)),t={from:n.from,to:n.to,insert:Y.of([" "])}):R.chrome&&t&&t.from==t.to&&t.from==n.head&&t.insert.toString()==`\n `&&i.lineWrapping&&(r&&(r=P.single(r.main.anchor-1,r.main.head-1)),t={from:n.from,to:n.to,insert:Y.of([" "])}),t)return bo(i,t,r,s);if(r&&!r.main.eq(n)){let o=!1,l="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(o=!0),l=i.inputState.lastSelectionOrigin),i.dispatch({selection:r,scrollIntoView:o,userEvent:l}),!0}else return!1}function bo(i,e,t,r=-1){if(R.ios&&i.inputState.flushIOSKey(e))return!0;let n=i.state.selection.main;if(R.android&&(e.to==n.to&&(e.from==n.from||e.from==n.from-1&&i.state.sliceDoc(e.from,n.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&yi(i.contentDOM,"Enter",13)||(e.from==n.from-1&&e.to==n.to&&e.insert.length==0||r==8&&e.insert.lengthn.head)&&yi(i.contentDOM,"Backspace",8)||e.from==n.from&&e.to==n.to+1&&e.insert.length==0&&yi(i.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let o,l=()=>o||(o=Yf(i,e,t));return i.state.facet(uu).some(a=>a(i,e.from,e.to,s,l))||i.dispatch(l()),!0}function Yf(i,e,t){let r,n=i.state,s=n.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let l=s.frome.to?n.sliceDoc(e.to,s.to):"";r=n.replaceSelection(i.state.toText(l+e.insert.sliceString(0,void 0,i.state.lineBreak)+a))}else{let l=n.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(n.selection.ranges.length>1&&i.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let u=i.state.sliceDoc(e.from,e.to),h,c=t&&vu(i,t.main.head);if(c){let p=e.insert.length-(e.to-e.from);h={from:c.from,to:c.to-p}}else h=i.state.doc.lineAt(s.head);let f=s.to-e.to,d=s.to-s.from;r=n.changeByRange(p=>{if(p.from==s.from&&p.to==s.to)return{changes:l,range:a||p.map(l)};let g=p.to-f,y=g-u.length;if(p.to-p.from!=d||i.state.sliceDoc(y,g)!=u||p.to>=h.from&&p.from<=h.to)return{range:p};let b=n.changes({from:y,to:g,insert:e.insert}),A=p.to-s.to;return{changes:b,range:a?P.range(Math.max(0,a.anchor+A),Math.max(0,a.head+A)):p.map(b)}})}else r={changes:l,selection:a&&n.selection.replaceRange(a)}}let o="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,o+=".compose",i.inputState.compositionFirstChange&&(o+=".start",i.inputState.compositionFirstChange=!1)),n.update(r,{userEvent:o,scrollIntoView:!0})}function Xf(i,e,t,r){let n=Math.min(i.length,e.length),s=0;for(;s0&&l>0&&i.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let a=Math.max(0,s-Math.min(o,l));t-=o+a-s}if(o=o?s-t:0;s-=a,l=s+(l-o),o=s}else if(l=l?s-t:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function Jf(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:n,focusOffset:s}=i.observer.selectionRange;return t&&(e.push(new Sn(t,r)),(n!=t||s!=r)&&e.push(new Sn(n,s))),e}function Qf(i,e){if(i.length==0)return null;let t=i[0].pos,r=i.length==2?i[1].pos:t;return t>-1&&r>-1?P.single(t+e,r+e):null}var Xs=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,R.safari&&e.contentDOM.addEventListener("input",()=>null),R.gecko&&pd(e.contentDOM.ownerDocument)}handleEvent(e){!od(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let n of r.observers)n(this.view,t);for(let n of r.handlers){if(t.defaultPrevented)break;if(n(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Zf(e),r=this.handlers,n=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,l=r[s];l&&o!=!l.handlers.length&&(n.removeEventListener(s,this.handleEvent),l=null),l||n.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!t[s]&&n.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&td.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),R.android&&R.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return R.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Cu.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||ed.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:R.safari&&!R.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function Ca(i,e){return(t,r)=>{try{return e.call(i,r,t)}catch(n){ze(t.state,n)}}}function Zf(i){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of i){let n=r.spec;if(n&&n.domEventHandlers)for(let s in n.domEventHandlers){let o=n.domEventHandlers[s];o&&t(s).handlers.push(Ca(r.value,o))}if(n&&n.domEventObservers)for(let s in n.domEventObservers){let o=n.domEventObservers[s];o&&t(s).observers.push(Ca(r.value,o))}}for(let r in je)t(r).handlers.push(je[r]);for(let r in Ve)t(r).observers.push(Ve[r]);return e}var Cu=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ed="dthko",td=[16,17,18,20,91,92,224,225],un=6;function hn(i){return Math.max(0,i)*.7+8}function id(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}var Js=class{constructor(e,t,r,n){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=df(e.contentDOM),this.atoms=e.state.facet(yo).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(oe.allowMultipleSelections)&&rd(e,t),this.dragging=sd(e,t)&&Eu(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&id(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,n=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:n,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=bu(this.view);e.clientX-a.left<=n+un?t=-hn(n-e.clientX):e.clientX+a.right>=o-un&&(t=hn(e.clientX-o)),e.clientY-a.top<=s+un?r=-hn(s-e.clientY):e.clientY+a.bottom>=l-un&&(r=hn(e.clientY-l)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function rd(i,e){let t=i.state.facet(su);return t.length?t[0](e):R.mac?e.metaKey:e.ctrlKey}function nd(i,e){let t=i.state.facet(ou);return t.length?t[0](e):R.mac?!e.altKey:!e.ctrlKey}function sd(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let r=sr(i.root);if(!r||r.rangeCount==0)return!0;let n=r.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function od(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=ee.get(t))&&r.ignoreEvent(e))return!1;return!0}var je=Object.create(null),Ve=Object.create(null),Su=R.ie&&R.ie_version<15||R.ios&&R.webkit_version<604;function ld(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),Du(i,t.value)},50)}function Rn(i,e,t){for(let r of i.facet(e))t=r(t,i);return t}function Du(i,e){e=Rn(i.state,po,e);let{state:t}=i,r,n=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(Qs!=null&&t.selection.ranges.every(a=>a.empty)&&Qs==s.toString()){let a=-1;r=t.changeByRange(u=>{let h=t.doc.lineAt(u.from);if(h.from==a)return{range:u};a=h.from;let c=t.toText((o?s.line(n++).text:e)+t.lineBreak);return{changes:{from:h.from,insert:c},range:P.cursor(u.from+c.length)}})}else o?r=t.changeByRange(a=>{let u=s.line(n++);return{changes:{from:a.from,to:a.to,insert:u.text},range:P.cursor(a.from+u.length)}}):r=t.replaceSelection(s);i.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Ve.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft};je.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1);Ve.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")};Ve.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")};je.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of i.state.facet(lu))if(t=r(i,e),t)break;if(!t&&e.button==0&&(t=hd(i,e)),t){let r=!i.hasFocus;i.inputState.startMouseSelection(new Js(i,e,t,r)),r&&i.observer.ignore(()=>{Va(i.contentDOM);let s=i.root.activeElement;s&&!s.contains(i.contentDOM)&&s.blur()});let n=i.inputState.mouseSelection;if(n)return n.start(e),n.dragging===!1}return!1};function Sa(i,e,t,r){if(r==1)return P.cursor(e,t);if(r==2)return Hf(i.state,e,t);{let n=we.find(i.docView,e),s=i.state.doc.lineAt(n?n.posAtEnd:e),o=n?n.posAtStart:s.from,l=n?n.posAtEnd:s.to;return le>=t.top&&e<=t.bottom&&i>=t.left&&i<=t.right;function ad(i,e,t,r){let n=we.find(i.docView,e);if(!n)return 1;let s=e-n.posAtStart;if(s==0)return 1;if(s==n.length)return-1;let o=n.coordsAt(s,-1);if(o&&Da(t,r,o))return-1;let l=n.coordsAt(s,1);return l&&Da(t,r,l)?1:o&&o.bottom>=r?-1:1}function Ea(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:ad(i,t,e.clientX,e.clientY)}}var ud=R.ie&&R.ie_version<=11,xa=null,Ta=0,ka=0;function Eu(i){if(!ud)return i.detail;let e=xa,t=ka;return xa=i,ka=Date.now(),Ta=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(Ta+1)%3:1}function hd(i,e){let t=Ea(i,e),r=Eu(e),n=i.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),n=n.map(s.changes))},get(s,o,l){let a=Ea(i,s),u,h=Sa(i,a.pos,a.bias,r);if(t.pos!=a.pos&&!o){let c=Sa(i,t.pos,t.bias,r),f=Math.min(c.from,h.from),d=Math.max(c.to,h.to);h=f1&&(u=cd(n,a.pos))?u:l?n.addRange(h):P.create([h])}}}function cd(i,e){for(let t=0;t=e)return P.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}je.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let n=i.docView.nearest(e.target);if(n&&n.isWidget){let s=n.posAtStart,o=s+n.length;(s>=t.to||o<=t.from)&&(t=P.range(s,o))}}let{inputState:r}=i;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Rn(i.state,go,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};je.dragend=i=>(i.inputState.draggedContent=null,!1);function Ma(i,e,t,r){if(t=Rn(i.state,po,t),!t)return;let n=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=i.inputState,o=r&&s&&nd(i,e)?{from:s.from,to:s.to}:null,l={from:n,insert:t},a=i.state.changes(o?[o,l]:l);i.focus(),i.dispatch({changes:a,selection:{anchor:a.mapPos(n,-1),head:a.mapPos(n,1)},userEvent:o?"move.drop":"input.drop"}),i.inputState.draggedContent=null}je.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),n=0,s=()=>{++n==t.length&&Ma(i,e,r.filter(o=>o!=null).join(i.state.lineBreak),!1)};for(let o=0;o{/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(t[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Ma(i,e,r,!0),!0}return!1};je.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=Su?null:e.clipboardData;return t?(Du(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(ld(i),!1)};function fd(i,e){let t=i.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),i.focus()},50)}function dd(i){let e=[],t=[],r=!1;for(let n of i.selection.ranges)n.empty||(e.push(i.sliceDoc(n.from,n.to)),t.push(n));if(!e.length){let n=-1;for(let{from:s}of i.selection.ranges){let o=i.doc.lineAt(s);o.number>n&&(e.push(o.text),t.push({from:o.from,to:Math.min(i.doc.length,o.to+1)})),n=o.number}r=!0}return{text:Rn(i,go,e.join(i.lineBreak)),ranges:t,linewise:r}}var Qs=null;je.copy=je.cut=(i,e)=>{let{text:t,ranges:r,linewise:n}=dd(i.state);if(!t&&!n)return!1;Qs=n?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Su?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(fd(i,t),!1)};var xu=mt.define();function Tu(i,e){let t=[];for(let r of i.facet(hu)){let n=r(i,e);n&&t.push(n)}return t?i.update({effects:t,annotations:xu.of(!0)}):null}function ku(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=Tu(i.state,e);t?i.dispatch(t):i.update([])}},10)}Ve.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),ku(i)};Ve.blur=i=>{i.observer.clearSelectionRange(),ku(i)};Ve.compositionstart=Ve.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))};Ve.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,R.chrome&&R.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))};Ve.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()};je.beforeinput=(i,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&i.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],a=i.posAtDOM(l.startContainer,l.startOffset),u=i.posAtDOM(l.endContainer,l.endOffset);return bo(i,{from:a,to:u,insert:i.state.toText(s)},null),!0}}let n;if(R.chrome&&R.android&&(n=Cu.find(s=>s.inputType==e.inputType))&&(i.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return R.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),R.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>Ve.compositionend(i,e),20),!1};var Ra=new Set;function pd(i){Ra.has(i)||(Ra.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}var Na=["pre-wrap","normal","pre-line","break-spaces"],vi=!1;function Oa(){vi=!1}var Zs=class{constructor(e){this.lineWrapping=e,this.doc=Y.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Na.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=r,this.textHeight=n,this.lineLength=s,a){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>mn&&(vi=!0),this.height=e)}replace(e,t,r){return i.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,n){let s=this,o=r.doc;for(let l=n.length-1;l>=0;l--){let{fromA:a,toA:u,fromB:h,toB:c}=n[l],f=s.lineAt(a,re.ByPosNoHeight,r.setDoc(t),0,0),d=f.to>=u?f:s.lineAt(u,re.ByPosNoHeight,r,0,0);for(c+=d.to-u,u=d.to;l>0&&f.from<=n[l-1].toA;)a=n[l-1].fromA,h=n[l-1].fromB,l--,as*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),r+=1+l.break,n-=l.size}else if(s>n*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(n=s&&o(this.blockAt(0,r,n,s))}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}},$e=class i extends En{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,n){return new tt(n,this.length,r,this.height,this.breaks)}replace(e,t,r){let n=r[0];return r.length==1&&(n instanceof i||n instanceof xt&&n.flags&4)&&Math.abs(this.length-n.length)<10?(n instanceof xt?n=new i(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):Ie.of(r)}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more?this.setHeight(n.heights[n.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},xt=class i extends Ie{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,n=e.doc.lineAt(t+this.length).number,s=n-r+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*s);o=a/s,this.length>s+1&&(l=(this.height-a)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:n,perLine:o,perChar:l}}blockAt(e,t,r,n){let{firstLine:s,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let u=n+(e0){let s=r[r.length-1];s instanceof i?r[r.length-1]=new i(s.length+n):r.push(null,new i(n-1))}if(e>0){let s=r[0];s instanceof i?r[0]=new i(e+s.length):r.unshift(new i(e-1),null)}return Ie.of(r)}decomposeLeft(e,t){t.push(new i(e-1),null)}decomposeRight(e,t){t.push(null,new i(this.length-e-1))}updateHeight(e,t=0,r=!1,n){let s=t+this.length;if(n&&n.from<=t+this.length&&n.more){let o=[],l=Math.max(t,n.from),a=-1;for(n.from>t&&o.push(new i(n.from-t-1).updateHeight(e,t));l<=s&&n.more;){let h=e.doc.lineAt(l).length;o.length&&o.push(null);let c=n.heights[n.index++];a==-1?a=c:Math.abs(c-a)>=mn&&(a=-2);let f=new $e(h,c);f.outdated=!1,o.push(f),l+=h+1}l<=s&&o.push(null,new i(s-l).updateHeight(e,l));let u=Ie.of(o);return(a<0||Math.abs(u.height-this.height)>=mn||Math.abs(a-this.heightMetrics(e,t).perLine)>=mn)&&(vi=!0),Dn(this,u)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},to=class extends Ie{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,n){let s=r+this.left.height;return el))return u;let h=t==re.ByPosNoHeight?re.ByPosNoHeight:re.ByPos;return a?u.join(this.right.lineAt(l,h,r,o,l)):this.left.lineAt(l,h,r,n,s).join(u)}forEachLine(e,t,r,n,s,o){let l=n+this.left.height,a=s+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,r,l,a,o);else{let u=this.lineAt(a,re.ByPos,r,n,s);e=e&&u.from<=t&&o(u),t>u.to&&this.right.forEachLine(u.to+1,t,r,l,a,o)}}replace(e,t,r){let n=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&Ba(s,o-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,n=r+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e2*t.size||t.size>2*e.size?Ie.of(this.break?[e,null,t]:[e,t]):(this.left=Dn(this.left,e),this.right=Dn(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,n){let{left:s,right:o}=this,l=t+s.length+this.break,a=null;return n&&n.from<=t+s.length&&n.more?a=s=s.updateHeight(e,t,r,n):s.updateHeight(e,t,r),n&&n.from<=l+o.length&&n.more?a=o=o.updateHeight(e,l,r,n):o.updateHeight(e,l,r),a?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function Ba(i,e){let t,r;i[e]==null&&(t=i[e-1])instanceof xt&&(r=i[e+1])instanceof xt&&i.splice(e-1,3,new xt(t.length+1+r.length))}var gd=5,io=class i{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof $e?n.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new $e(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=gd)&&this.addLineDeco(n,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new $e(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new xt(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof $e)return e;let t=new $e(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let n=this.ensureLine();n.length+=r,n.collapsed+=r,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof $e)&&!this.isCovered?this.nodes.push(new $e(0,-1)):(this.writtenToh.clientHeight||h.scrollWidth>h.clientWidth)&&c.overflow!="visible"){let f=h.getBoundingClientRect();s=Math.max(s,f.left),o=Math.min(o,f.right),l=Math.max(l,f.top),a=Math.min(u==i.parentNode?n.innerHeight:a,f.bottom)}u=c.position=="absolute"||c.position=="fixed"?h.offsetParent:h.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function bd(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}var nr=class{constructor(e,t,r){this.from=e,this.to=t,this.size=r}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new Zs(t),this.stateDeco=e.facet(cr).filter(r=>typeof r!="function"),this.heightMap=Ie.empty().applyChanges(this.stateDeco,Y.empty,this.heightOracle.setDoc(e.doc),[new nt(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=le.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let n=r?t.head:t.anchor;if(!e.some(({from:s,to:o})=>n>=s&&n<=o)){let{from:s,to:o}=this.lineBlockAt(n);e.push(new mi(s,o))}}return this.viewports=e.sort((r,n)=>r.from-n.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Pa:new so(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Zi(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(cr).filter(h=>typeof h!="function");let n=e.changedRanges,s=nt.extendWithRanges(n,md(r,this.stateDeco,e?e.changes:_e.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Oa(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||vi)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let u=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Rf)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),n=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?me.RTL:me.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let u=0,h=0;if(l.width&&l.height){let{scaleX:E,scaleY:S}=$a(t,l);(E>.005&&Math.abs(this.scaleX-E)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=E,this.scaleY=S,u|=8,o=a=!0)}let c=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=c||this.paddingBottom!=f)&&(this.paddingTop=c,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=Ua(e.scrollDOM);let p=(this.printing?bd:yd)(t,this.paddingTop),g=p.top-this.pixelViewport.top,y=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let A=l.width;if((this.contentDOMWidth!=A||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),a){let E=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(E)&&(o=!0),o||n.lineWrapping&&Math.abs(A-this.contentDOMWidth)>n.charWidth){let{lineHeight:S,charWidth:N,textHeight:M}=e.docView.measureTextSize();o=S>0&&n.refresh(s,S,N,M,A/N,E),o&&(e.docView.minWidth=0,u|=8)}g>0&&y>0?h=Math.max(g,y):g<0&&y<0&&(h=Math.min(g,y)),Oa();for(let S of this.viewports){let N=S.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(S);this.heightMap=(o?Ie.empty().applyChanges(this.stateDeco,Y.empty,this.heightOracle,[new nt(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,o,new eo(S.from,N))}vi&&(u|=2)}let w=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return w&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),u|=this.updateForViewport()),(u&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new mi(n.lineAt(o-r*1e3,re.ByHeight,s,0,0).from,n.lineAt(l+(1-r)*1e3,re.ByHeight,s,0,0).to);if(t){let{head:u}=t.range;if(ua.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),c=n.lineAt(u,re.ByPos,s,0,0),f;t.y=="center"?f=(c.top+c.bottom)/2-h/2:t.y=="start"||t.y=="nearest"&&u=l+Math.max(10,Math.min(r,250)))&&n>o-2*1e3&&s>1,o=n<<1;if(this.defaultTextDirection!=me.LTR&&!r)return[];let l=[],a=(h,c,f,d)=>{if(c-hh&&bb.from>=f.from&&b.to<=f.to&&Math.abs(b.from-h)b.fromA));if(!y){if(cb.from<=c&&b.to>=c)){let b=t.moveToLineBoundary(P.cursor(c),!1,!0).head;b>h&&(c=b)}y=new nr(h,c,this.gapSize(f,h,c,d))}l.push(y)},u=h=>{if(h.lengthh.from&&a(h.from,d,h,c),pt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];he.spans(e,this.viewport.from,this.viewport.to,{span(n,s){t.push({from:n,to:s})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((n,s)=>n.from!=t[s].from||n.to!=t[s].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Zi(this.heightMap.lineAt(e,re.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Zi(this.heightMap.lineAt(this.scaler.fromDOM(e),re.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Zi(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},mi=class{constructor(e,t){this.from=e,this.to=t}};function vd(i,e,t){let r=[],n=i,s=0;return he.spans(t,i,e,{span(){},point(o,l){o>n&&(r.push({from:n,to:o}),s+=o-n),n=l}},20),n=1)return e[e.length-1].to;let r=Math.floor(i*t);for(let n=0;;n++){let{from:s,to:o}=e[n],l=o-s;if(r<=l)return s+r;r-=l}}function fn(i,e){let t=0;for(let{from:r,to:n}of i.ranges){if(e<=n){t+=e-r;break}t+=n-r}return t/i.total}function wd(i,e){for(let t of i)if(e(t))return t}var Pa={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}},so=class i{constructor(e,t,r){let n=0,s=0,o=0;this.viewports=r.map(({from:l,to:a})=>{let u=t.lineAt(l,re.ByPos,e,0,0).top,h=t.lineAt(a,re.ByPos,e,0,0).bottom;return n+=h-u,{from:l,to:a,top:u,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-n)/(t.height-n);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,r=0,n=0;;t++){let s=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}};function Zi(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),r=e.toDOM(i.bottom);return new tt(i.from,i.length,t,r-t,Array.isArray(i._content)?i._content.map(n=>Zi(n,e)):i._content)}var dn=$.define({combine:i=>i.join(" ")}),oo=$.define({combine:i=>i.indexOf(!0)>-1}),lo=He.newName(),Mu=He.newName(),Ru=He.newName(),Nu={"&light":"."+Mu,"&dark":"."+Ru};function ao(i,e,t){return new He(e,{finish(r){return/&/.test(r)?r.replace(/&\\w*/,n=>{if(n=="&")return i;if(!t||!t[n])throw new RangeError(`Unsupported selector: ${n}`);return t[n]}):i+" "+r}})}var Ad=ao("."+lo,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url(\'data:image/svg+xml,\')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Nu),Cd={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ps=R.ie&&R.ie_version<=11,uo=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new _s,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(R.ie&&R.ie_version<=11||R.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(R.chrome&&R.chrome_version<126)&&(this.editContext=new ho(e),e.state.facet(Et)&&(e.contentDOM.editContext=this.editContext.editContext)),Ps&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,n=this.selectionRange;if(r.state.facet(Et)?r.root.activeElement!=this.dom:!pn(r.dom,n))return;let s=n.anchorNode&&r.docView.nearest(n.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(R.ie&&R.ie_version<=11||R.android&&R.chrome)&&!r.state.selection.main.empty&&n.focusNode&&er(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=sr(e.root);if(!t)return!1;let r=R.safari&&e.root.nodeType==11&&hf(this.dom.ownerDocument)==this.dom&&Sd(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let n=pn(this.dom,r);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&yi(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(n)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,n=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(n=!0),t==-1?{from:t,to:r}=o:(t=Math.min(o.from,t),r=Math.max(o.to,r)))}return{from:t,to:r,typeOver:n}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),n=this.selectionChanged&&pn(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Ys(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,n=Au(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=La(t,e.previousSibling||e.target.previousSibling,-1),n=La(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Et)!=e.state.facet(Et)&&(e.view.contentDOM.editContext=e.state.facet(Et)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function La(i,e,t){for(;e;){let r=ee.get(e);if(r&&r.parent==i)return r;let n=e.parentNode;e=n!=i.dom?n:t>0?e.nextSibling:e.previousSibling}return null}function _a(i,e){let t=e.startContainer,r=e.startOffset,n=e.endContainer,s=e.endOffset,o=i.docView.domAtPos(i.state.selection.main.anchor);return er(o.node,o.offset,n,s)&&([t,r,n,s]=[n,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:n,focusOffset:s}}function Sd(i,e){if(e.getComposedRanges){let n=e.getComposedRanges(i.root)[0];if(n)return _a(i,n)}let t=null;function r(n){n.preventDefault(),n.stopImmediatePropagation(),t=n.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",r,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",r,!0),t?_a(i,t):null}var ho=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:n}=e.state.selection.main,s={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Y.of(r.text.split(`\n`))};s.from==this.from&&nthis.to&&(s.to=n),!(s.from==s.to&&!s.insert.length)&&(this.pendingContextChange=s,e.state.readOnly||bo(e,s,P.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let n=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o{let n=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(o!="None"&&l!="None"){let a=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;n.push(le.mark({attributes:{style:a}}).range(this.toEditorPos(s.rangeStart),this.toEditorPos(s.rangeEnd)))}}e.dispatch({effects:du.of(le.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let n=sr(r.root);n&&n.rangeCount&&this.editContext.updateSelectionBounds(n.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,n=this.pendingContextChange;return e.changes.iterChanges((s,o,l,a,u)=>{if(r)return;let h=u.length-(o-s);if(n&&o>=n.to)if(n.from==s&&n.to==o&&n.insert.eq(u)){n=this.pendingContextChange=null,t+=h,this.to+=h;return}else n=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=h,this.to+=h;else if(sthis.to||this.to-this.from+u.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),u.toString()),this.to+=h}t+=h}),n&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),n=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=n)&&this.editContext.updateSelection(r,n)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},q=class i{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(n=>n.forEach(s=>r(s,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||pf(e.parent)||document,this.viewState=new xn(e.state||oe.create(e)),e.scrollTo&&e.scrollTo.is(an)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Xi).map(n=>new rr(n));for(let n of this.plugins)n.update(this);this.observer=new uo(this),this.inputState=new Xs(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Cn(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Re?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,n,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn\'t start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,a=null;e.some(f=>f.annotation(xu))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=Tu(s,o),a||(l=1));let u=this.observer.delayedAndroidKey,h=null;if(u?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(h=null)):this.observer.clear(),s.facet(oe.phrases)!=this.state.facet(oe.phrases))return this.setState(s);n=An.create(this,s,e),n.flags|=l;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(c&&(c=c.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;c=new ir(d.empty?d:P.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(an)&&(c=d.value.clip(this.state))}this.viewState.update(n,c),this.bidiCache=Tn.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),t=this.docView.update(n),this.state.facet(Ji)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(n.startState.facet(dn)!=n.state.facet(dn)&&(this.viewState.mustMeasureContent=!0),(t||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!n.empty)for(let f of this.state.facet(js))try{f(n)}catch(d){ze(this.state,d,"update listener")}(a||h)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!Au(this,h)&&u.force&&yi(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new xn(e),this.plugins=e.facet(Xi).map(r=>new rr(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Cn(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Xi),r=e.state.facet(Xi);if(t!=r){let n=[];for(let s of r){let o=t.indexOf(s);if(o<0)n.push(new rr(s));else{let l=this.plugins[o];l.mustUpdate=e,n.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let n of this.plugins)n.mustUpdate=e;for(let n=0;n-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,n=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(Ua(r))s=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(n);s=d.from,o=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];a&4||([this.measureRequests,u]=[u,this.measureRequests]);let h=u.map(d=>{try{return d.read(this)}catch(p){return ze(this.state,p),Ia}}),c=An.create(this,this.state,[]),f=!1;c.flags|=a,t?t.flags|=a:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),f=this.docView.update(c),f&&this.docViewUpdate());for(let d=0;d1||p<-1){n=n+p,r.scrollTop=n/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(js))l(t)}get themeClasses(){return lo+" "+(this.state.facet(oo)?Ru:Mu)+" "+this.state.facet(dn)}updateAttrs(){let e=Fa(this,pu,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Et)?"true":"false",class:"cm-content",style:`${R.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Fa(this,mo,t);let r=this.observer.ignore(()=>{let n=Vs(this.contentDOM,this.contentAttrs,t),s=Vs(this.dom,this.editorAttrs,e);return n||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let n of r.effects)if(n.is(i.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=n.value}}mountStyles(){this.styleModules=this.state.facet(Ji);let e=this.state.facet(i.cspNonce);He.mount(this.root,this.styleModules.concat(Ad).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn\'t allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Bs(this,e,Aa(this,e,t,r))}moveByGroup(e,t){return Bs(this,e,Aa(this,e,t,r=>jf(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),n=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return P.cursor(s.side(t,n)+e.from,s.forward(!t,n)?1:-1)}moveToLineBoundary(e,t,r=!0){return zf(this,e,t,r)}moveVertically(e,t,r){return Bs(this,e,Gf(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),wu(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let n=this.state.doc.lineAt(e),s=this.bidiSpans(n),o=s[it.find(s,e-n.from,-1,t)];return kn(r,o.dir==me.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(cu)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Dd)return ru(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||iu(s.isolates,r=ma(this,e))))return s.order;r||(r=ma(this,e));let n=Tf(e.text,t,r);return this.bidiCache.push(new Tn(e.from,e.to,t,r,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||R.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Va(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return an.of(new ir(typeof e=="number"?P.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return an.of(new ir(P.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Jt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Jt.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=He.newName(),n=[dn.of(r),Ji.of(ao(`.${r}`,e))];return t&&t.dark&&n.push(oo.of(!0)),n}static baseTheme(e){return nn.lowest(Ji.of(ao("."+lo,e,Nu)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),n=r&&ee.get(r)||ee.get(e);return((t=n==null?void 0:n.rootView)===null||t===void 0?void 0:t.view)||null}};q.styleModule=Ji;q.inputHandler=uu;q.clipboardInputFilter=po;q.clipboardOutputFilter=go;q.scrollHandler=fu;q.focusChangeEffect=hu;q.perLineTextDirection=cu;q.exceptionSink=au;q.updateListener=js;q.editable=Et;q.mouseSelectionStyle=lu;q.dragMovesSelection=ou;q.clickAddsSelectionRange=su;q.decorations=cr;q.outerDecorations=gu;q.atomicRanges=yo;q.bidiIsolatedRanges=mu;q.scrollMargins=yu;q.darkTheme=oo;q.cspNonce=$.define({combine:i=>i.length?i[0]:""});q.contentAttributes=mo;q.editorAttributes=pu;q.lineWrapping=q.contentAttributes.of({class:"cm-lineWrapping"});q.announce=se.define();var Dd=4096,Ia={},Tn=class i{constructor(e,t,r,n,s,o){this.from=e,this.to=t,this.dir=r,this.isolates=n,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],n=e.length?e[e.length-1].dir:me.LTR;for(let s=Math.max(0,e.length-10);s=0;n--){let s=r[n],o=typeof s=="function"?s(i):s;o&&$s(o,t)}return t}var Ob=R.mac?"mac":R.windows?"win":R.linux?"linux":"key";var Ed=!R.ios;var Ha={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Ed&&(Ha[".cm-line"].caretColor=Ha[".cm-content"].caretColor="transparent !important");var Bb=/x/.unicode!=null?"gu":"g";var Pb=q.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"\'\'",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}});var vt=class extends yt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};vt.prototype.elementClass="";vt.prototype.toDOM=void 0;vt.prototype.mapMode=Me.TrackBefore;vt.prototype.startSide=vt.prototype.endSide=-1;vt.prototype.point=!0;var xd=Function.prototype.toString,vo=Object.create,Td=Object.prototype.toString,kd=function(){function i(){this._keys=[],this._values=[]}return i.prototype.has=function(e){return!!~this._keys.indexOf(e)},i.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},i.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},i}();function Md(){return new kd}function Rd(){return new WeakMap}var Nd=typeof WeakMap!="undefined"?Rd:Md;function Ao(i){if(!i)return vo(null);var e=i.constructor;if(e===Object)return i===Object.prototype?{}:vo(i);if(e&&~xd.call(e).indexOf("[native code]"))try{return new e}catch(t){}return vo(i)}function Od(i){var e="";return i.global&&(e+="g"),i.ignoreCase&&(e+="i"),i.multiline&&(e+="m"),i.unicode&&(e+="u"),i.sticky&&(e+="y"),e}function Bd(i){return i.flags}var Pd=/test/g.flags==="g"?Bd:Od;function Ou(i){var e=Td.call(i);return e.substring(8,e.length-1)}function Ld(i){return i[Symbol.toStringTag]||Ou(i)}var _d=typeof Symbol!="undefined"?Ld:Ou,Id=Object.defineProperty,Fd=Object.getOwnPropertyDescriptor,Bu=Object.getOwnPropertyNames,Co=Object.getOwnPropertySymbols,Pu=Object.prototype,Lu=Pu.hasOwnProperty,Hd=Pu.propertyIsEnumerable,_u=typeof Co=="function";function $d(i){return Bu(i).concat(Co(i))}var Vd=_u?$d:Bu;function On(i,e,t){for(var r=Vd(i),n=0,s=r.length,o=void 0,l=void 0;n{throw new Error("This node type doesn\'t define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can\'t add per-node props to node types");return typeof e!="function"&&(e=Fe.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}};J.closedBy=new J({deserialize:i=>i.split(" ")});J.openedBy=new J({deserialize:i=>i.split(" ")});J.group=new J({deserialize:i=>i.split(" ")});J.isolate=new J({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}});J.contextHash=new J({perNode:!0});J.lookAhead=new J({perNode:!0});J.mounted=new J({perNode:!0});var wi=class{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[J.mounted.id]}},lp=Object.create(null),Fe=class i{constructor(e,t,r,n=0){this.name=e,this.props=t,this.id=r,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):lp,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),n=new i(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can\'t store a per-node prop on a node type");t[s[0].id]=s[1]}}return n}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(J.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let n of r.split(" "))t[n]=e[r];return r=>{for(let n=r.prop(J.group),s=-1;s<(n?n.length:0);s++){let o=t[s<0?r.name:n[s]];if(o)return o}}}};Fe.none=new Fe("",Object.create(null),0,8);var Bn=new WeakMap,qu=new WeakMap,ye;(function(i){i[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays"})(ye||(ye={}));var Ee=class i{constructor(e,t,r,n,s){if(this.type=e,this.children=t,this.positions=r,this.length=n,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=wi.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let n=r.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new gr(this.topNode,e)}cursorAt(e,t=0,r=0){let n=Bn.get(this)||this.topNode,s=new gr(n);return s.moveTo(e,t),Bn.set(this,s._tree),s}get topNode(){return new ot(this,0,0,null)}resolve(e,t=0){let r=dr(Bn.get(this)||this.topNode,e,t,!1);return Bn.set(this,r),r}resolveInner(e,t=0){let r=dr(qu.get(this)||this.topNode,e,t,!0);return qu.set(this,r),r}resolveStack(e,t=0){return ap(this,e,t)}iterate(e){let{enter:t,leave:r,from:n=0,to:s=this.length}=e,o=e.mode||0,l=(o&ye.IncludeAnonymous)>0;for(let a=this.cursor(o|ye.IncludeAnonymous);;){let u=!1;if(a.from<=s&&a.to>=n&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;u=!0}for(;u&&r&&(l||!a.type.isAnonymous)&&r(a),!a.nextSibling();){if(!a.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Ro(Fe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,n)=>new i(this.type,t,r,n,this.propValues),e.makeTree||((t,r,n)=>new i(Fe.none,t,r,n)))}static build(e){return up(e)}};Ee.empty=new Ee(Fe.none,[],[],0);var Do=class i{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new i(this.buffer,this.index)}},Rt=class i{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Fe.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,r){let n=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function dr(i,e,t,r){for(var n;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to0?l.length:-1;e!=u;e+=t){let h=l[e],c=a[e]+o.from;if(zu(n,r,c,c+h.length)){if(h instanceof Rt){if(s&ye.ExcludeBuffers)continue;let f=h.findChild(0,h.buffer.length,t,r-c,n);if(f>-1)return new pr(new xo(o,h,e,c),null,f)}else if(s&ye.IncludeAnonymous||!h.type.isAnonymous||Mo(h)){let f;if(!(s&ye.IgnoreMounts)&&(f=wi.get(h))&&!f.overlay)return new i(f.tree,c,e,o);let d=new i(h,c,e,o);return s&ye.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?h.children.length-1:0,t,r,n)}}}if(s&ye.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let n;if(!(r&ye.IgnoreOverlays)&&(n=wi.get(this._tree))&&n.overlay){let s=e-this.from;for(let{from:o,to:l}of n.overlay)if((t>0?o<=s:o=s:l>s))return new i(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Uu(i,e,t,r){let n=i.cursor(),s=[];if(!n.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=n.type.is(t),!n.nextSibling())return s}for(;;){if(r!=null&&n.type.is(r))return s;if(n.type.is(e)&&s.push(n.node),!n.nextSibling())return r==null?s:[]}}function Eo(i,e,t=e.length-1){for(let r=i.parent;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}var xo=class{constructor(e,t,r,n){this.parent=e,this.buffer=t,this.index=r,this.start=n}},pr=class i extends Ln{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new i(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&ye.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new i(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new i(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new i(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,n=this.index+4,s=r.buffer[this.index+3];if(s>n){let o=r.buffer[this.index+1];e.push(r.slice(n,s,o)),t.push(0)}return new Ee(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function ju(i){if(!i.length)return null;let e=0,t=i[0];for(let s=1;st.from||o.to=e){let l=new ot(o.tree,o.overlay[0].from+s.from,-1,s);(n||(n=[r])).push(dr(l,e,t,!1))}}return n?ju(n):r}var gr=class{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof ot)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=r+n.buffer[e+1],this.to=r+n.buffer[e+2],!0}yield(e){return e?e instanceof ot?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&ye.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ye.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ye.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let n=r<0?0:this.stack[r]+4;if(this.index!=n)return this.yieldBuf(t.findChild(n,this.index,-1,0,4))}else{let n=t.buffer[this.index+3];if(n<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(n)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:n}=this;if(n){if(e>0){if(this.index-1)for(let s=t+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&ye.IncludeAnonymous||l instanceof Rt||!l.type.isAnonymous||Mo(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==n){if(n==this.index)return o;t=o,r=s+1;break e}n=this.stack[--s]}for(let n=r;n=0;s--){if(s<0)return Eo(this.node,e,n);let o=r[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[n]&&e[n]!=o.name)return!1;n--}}return!0}};function Mo(i){return i.children.some(e=>e instanceof Rt||!e.type.isAnonymous||Mo(e))}function up(i){var e;let{buffer:t,nodeSet:r,maxBufferLength:n=1024,reused:s=[],minRepeatType:o=r.types.length}=i,l=Array.isArray(t)?new Do(t,t.length):t,a=r.types,u=0,h=0;function c(S,N,M,j,D,H){let{id:B,start:O,end:W,size:I}=l,te=h;for(;I<0;)if(l.next(),I==-1){let K=s[B];M.push(K),j.push(O-S);return}else if(I==-3){u=B;return}else if(I==-4){h=B;return}else throw new RangeError(`Unrecognized record size: ${I}`);let Ce=a[B],F,Se,k=O-S;if(W-O<=n&&(Se=y(l.pos-N,D))){let K=new Uint16Array(Se.size-Se.skip),ue=l.pos-Se.size,pe=K.length;for(;l.pos>ue;)pe=b(Se.start,K,pe);F=new Rt(K,W-Se.start,r),k=Se.start-S}else{let K=l.pos-I;l.next();let ue=[],pe=[],Je=B>=o?B:-1,pt=0,Ht=W;for(;l.pos>K;)Je>=0&&l.id==Je&&l.size>=0?(l.end<=Ht-n&&(p(ue,pe,O,pt,l.end,Ht,Je,te),pt=ue.length,Ht=l.end),l.next()):H>2500?f(O,K,ue,pe):c(O,K,ue,pe,Je,H+1);if(Je>=0&&pt>0&&pt-1&&pt>0){let Wi=d(Ce);F=Ro(Ce,ue,pe,0,ue.length,0,W-O,Wi,Wi)}else F=g(Ce,ue,pe,W-O,te-W)}M.push(F),j.push(k)}function f(S,N,M,j){let D=[],H=0,B=-1;for(;l.pos>N;){let{id:O,start:W,end:I,size:te}=l;if(te>4)l.next();else{if(B>-1&&W=0;I-=3)O[te++]=D[I],O[te++]=D[I+1]-W,O[te++]=D[I+2]-W,O[te++]=te;M.push(new Rt(O,D[2]-W,r)),j.push(W-S)}}function d(S){return(N,M,j)=>{let D=0,H=N.length-1,B,O;if(H>=0&&(B=N[H])instanceof Ee){if(!H&&B.type==S&&B.length==j)return B;(O=B.prop(J.lookAhead))&&(D=M[H]+B.length+O)}return g(S,N,M,j,D)}}function p(S,N,M,j,D,H,B,O){let W=[],I=[];for(;S.length>j;)W.push(S.pop()),I.push(N.pop()+M-D);S.push(g(r.types[B],W,I,H-D,O-H)),N.push(D-M)}function g(S,N,M,j,D=0,H){if(u){let B=[J.contextHash,u];H=H?[B].concat(H):[B]}if(D>25){let B=[J.lookAhead,D];H=H?[B].concat(H):[B]}return new Ee(S,N,M,j,H)}function y(S,N){let M=l.fork(),j=0,D=0,H=0,B=M.end-n,O={size:0,start:0,skip:0};e:for(let W=M.pos-S;M.pos>W;){let I=M.size;if(M.id==N&&I>=0){O.size=j,O.start=D,O.skip=H,H+=4,j+=4,M.next();continue}let te=M.pos-I;if(I<0||te=o?4:0,F=M.start;for(M.next();M.pos>te;){if(M.size<0)if(M.size==-3)Ce+=4;else break e;else M.id>=o&&(Ce+=4);M.next()}D=F,j+=I,H+=Ce}return(N<0||j==S)&&(O.size=j,O.start=D,O.skip=H),O.size>4?O:void 0}function b(S,N,M){let{id:j,start:D,end:H,size:B}=l;if(l.next(),B>=0&&j4){let W=l.pos-(B-4);for(;l.pos>W;)M=b(S,N,M)}N[--M]=O,N[--M]=H-S,N[--M]=D-S,N[--M]=j}else B==-3?u=j:B==-4&&(h=j);return M}let A=[],w=[];for(;l.pos>0;)c(i.start||0,i.bufferStart||0,A,w,-1,0);let E=(e=i.length)!==null&&e!==void 0?e:A.length?w[0]+A[0].length:0;return new Ee(a[i.topID],A.reverse(),w.reverse(),E)}var Wu=new WeakMap;function Pn(i,e){if(!i.isAnonymous||e instanceof Rt||e.type!=i)return 1;let t=Wu.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=i||!(r instanceof Ee)){t=1;break}t+=Pn(i,r)}Wu.set(e,t)}return t}function Ro(i,e,t,r,n,s,o,l,a){let u=0;for(let p=r;p=h)break;N+=M}if(w==E+1){if(N>h){let M=p[E];d(M.children,M.positions,0,M.children.length,g[E]+A);continue}c.push(p[E])}else{let M=g[w-1]+p[w-1].length-S;c.push(Ro(i,p,g,E,w,S,M,null,a))}f.push(S+A-s)}}return d(e,t,r,n,0),(l||a)(c,f,o)}var Qt=class i{constructor(e,t,r,n,s=!1,o=!1){this.from=e,this.to=t,this.tree=r,this.offset=n,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let n=[new i(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&n.push(s);return n}static applyChanges(e,t,r=128){if(!t.length)return e;let n=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,u=0;;l++){let h=l=r)for(;o&&o.from=f.from||c<=f.to||u){let d=Math.max(f.from,a)-u,p=Math.min(f.to,c)-u;f=d>=p?null:new i(d,p,f.tree,f.offset+u,l>0,!!h)}if(f&&n.push(f),o.to>c)break;o=snew fr(n.from,n.to)):[new fr(0,0)]:[new fr(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let n=this.startParse(e,t,r);for(;;){let s=n.advance();if(s)return s}}},ko=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};var Fb=new J({perNode:!0});var hp=0,Ge=class i{constructor(e,t,r,n){this.name=e,this.set=t,this.base=r,this.modified=n,this.id=hp++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof i&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let n=new i(r,[],null,[]);if(n.set.push(n),t)for(let s of t.set)n.set.push(s);return n}static defineModifier(e){let t=new $n(e);return r=>r.modified.indexOf(t)>-1?r:$n.get(r.base||r,r.modified.concat(t).sort((n,s)=>n.id-s.id))}},cp=0,$n=class i{constructor(e){this.name=e,this.instances=[],this.id=cp++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(l=>l.base==e&&fp(t,l.modified));if(r)return r;let n=[],s=new Ge(e.name,n,e,t);for(let l of t)l.instances.push(s);let o=dp(t);for(let l of e.set)if(!l.modified.length)for(let a of o)n.push(i.get(l,a));return s}};function fp(i,e){return i.length==e.length&&i.every((t,r)=>t==e[r])}function dp(i){let e=[[]];for(let t=0;tr.length-t.length)}function Yu(i){let e=Object.create(null);for(let t in i){let r=i[t];Array.isArray(r)||(r=[r]);for(let n of t.split(" "))if(n){let s=[],o=2,l=n;for(let c=0;;){if(l=="..."&&c>0&&c+3==n.length){o=1;break}let f=/^"(?:[^"\\\\]|\\\\.)*?"|[^\\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+n);if(s.push(f[0]=="*"?"":f[0][0]==\'"\'?JSON.parse(f[0]):f[0]),c+=f[0].length,c==n.length)break;let d=n[c++];if(c==n.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+n);l=n.slice(c)}let a=s.length-1,u=s[a];if(!u)throw new RangeError("Invalid path: "+n);let h=new Ai(r,o,a>0?s.slice(0,a):null);e[u]=h.sort(e[u])}}return Xu.add(e)}var Xu=new J,Ai=class{constructor(e,t,r,n){this.tags=e,this.mode=t,this.context=r,this.next=n}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=n;for(let l of s)for(let a of l.set){let u=t[a.id];if(u){o=o?o+" "+u:u;break}}return o},scope:r}}function pp(i,e){let t=null;for(let r of i){let n=r.style(e);n&&(t=t?t+" "+n:n)}return t}function Ju(i,e,t,r=0,n=i.length){let s=new Oo(r,Array.isArray(e)?e:[e],t);s.highlightRange(i.cursor(),r,n,"",s.highlighters),s.flush(n)}var Oo=class{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,n,s){let{type:o,from:l,to:a}=e;if(l>=r||a<=t)return;o.isTop&&(s=this.highlighters.filter(d=>!d.scope||d.scope(o)));let u=n,h=gp(e)||Ai.empty,c=pp(s,h.tags);if(c&&(u&&(u+=" "),u+=c,h.mode==1&&(n+=(n?" ":"")+c)),this.startSpan(Math.max(t,l),u),h.opaque)return;let f=e.tree&&e.tree.prop(J.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+l,1),p=this.highlighters.filter(y=>!y.scope||y.scope(f.tree.type)),g=e.firstChild();for(let y=0,b=l;;y++){let A=y=w||!e.nextSibling())););if(!A||w>r)break;b=A.to+l,b>t&&(this.highlightRange(d.cursor(),Math.max(t,A.from+l),Math.min(r,b),"",p),this.startSpan(Math.min(r,b),u))}g&&e.parent()}else if(e.firstChild()){f&&(n="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,n,s),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}};function gp(i){let e=i.type.prop(Xu);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}var C=Ge.define,In=C(),Nt=C(),Gu=C(Nt),Ku=C(Nt),Ot=C(),Fn=C(Ot),No=C(Ot),ut=C(),Zt=C(ut),lt=C(),at=C(),Bo=C(),mr=C(Bo),Hn=C(),m={comment:In,lineComment:C(In),blockComment:C(In),docComment:C(In),name:Nt,variableName:C(Nt),typeName:Gu,tagName:C(Gu),propertyName:Ku,attributeName:C(Ku),className:C(Nt),labelName:C(Nt),namespace:C(Nt),macroName:C(Nt),literal:Ot,string:Fn,docString:C(Fn),character:C(Fn),attributeValue:C(Fn),number:No,integer:C(No),float:C(No),bool:C(Ot),regexp:C(Ot),escape:C(Ot),color:C(Ot),url:C(Ot),keyword:lt,self:C(lt),null:C(lt),atom:C(lt),unit:C(lt),modifier:C(lt),operatorKeyword:C(lt),controlKeyword:C(lt),definitionKeyword:C(lt),moduleKeyword:C(lt),operator:at,derefOperator:C(at),arithmeticOperator:C(at),logicOperator:C(at),bitwiseOperator:C(at),compareOperator:C(at),updateOperator:C(at),definitionOperator:C(at),typeOperator:C(at),controlOperator:C(at),punctuation:Bo,separator:C(Bo),bracket:mr,angleBracket:C(mr),squareBracket:C(mr),paren:C(mr),brace:C(mr),content:ut,heading:Zt,heading1:C(Zt),heading2:C(Zt),heading3:C(Zt),heading4:C(Zt),heading5:C(Zt),heading6:C(Zt),contentSeparator:C(ut),list:C(ut),quote:C(ut),emphasis:C(ut),strong:C(ut),link:C(ut),monospace:C(ut),strikethrough:C(ut),inserted:C(),deleted:C(),changed:C(),invalid:C(),meta:Hn,documentMeta:C(Hn),annotation:C(Hn),processingInstruction:C(Hn),definition:Ge.defineModifier("definition"),constant:Ge.defineModifier("constant"),function:Ge.defineModifier("function"),standard:Ge.defineModifier("standard"),local:Ge.defineModifier("local"),special:Ge.defineModifier("special")};for(let i in m){let e=m[i];e instanceof Ge&&(e.name=i)}var Vb=Po([{tag:m.link,class:"tok-link"},{tag:m.heading,class:"tok-heading"},{tag:m.emphasis,class:"tok-emphasis"},{tag:m.strong,class:"tok-strong"},{tag:m.keyword,class:"tok-keyword"},{tag:m.atom,class:"tok-atom"},{tag:m.bool,class:"tok-bool"},{tag:m.url,class:"tok-url"},{tag:m.labelName,class:"tok-labelName"},{tag:m.inserted,class:"tok-inserted"},{tag:m.deleted,class:"tok-deleted"},{tag:m.literal,class:"tok-literal"},{tag:m.string,class:"tok-string"},{tag:m.number,class:"tok-number"},{tag:[m.regexp,m.escape,m.special(m.string)],class:"tok-string2"},{tag:m.variableName,class:"tok-variableName"},{tag:m.local(m.variableName),class:"tok-variableName tok-local"},{tag:m.definition(m.variableName),class:"tok-variableName tok-definition"},{tag:m.special(m.variableName),class:"tok-variableName2"},{tag:m.definition(m.propertyName),class:"tok-propertyName tok-definition"},{tag:m.typeName,class:"tok-typeName"},{tag:m.namespace,class:"tok-namespace"},{tag:m.className,class:"tok-className"},{tag:m.macroName,class:"tok-macroName"},{tag:m.propertyName,class:"tok-propertyName"},{tag:m.operator,class:"tok-operator"},{tag:m.comment,class:"tok-comment"},{tag:m.meta,class:"tok-meta"},{tag:m.invalid,class:"tok-invalid"},{tag:m.punctuation,class:"tok-punctuation"}]);var Lo,br=new J;var mp=new J,qe=class{constructor(e,t,r=[],n=""){this.data=e,this.name=n,oe.prototype.hasOwnProperty("tree")||Object.defineProperty(oe.prototype,"tree",{get(){return vr(this)}}),this.parser=t,this.extension=[Ci.of(this),oe.languageData.of((s,o,l)=>{let a=Qu(s,o,l),u=a.type.prop(br);if(!u)return[];let h=s.facet(u),c=a.type.prop(mp);if(c){let f=a.resolve(o-a.from,l);for(let d of c)if(d.test(f,s)){let p=s.facet(d.facet);return d.type=="replace"?p:p.concat(h)}}return h})].concat(r)}isActiveAt(e,t,r=-1){return Qu(e,t,r).type.prop(br)==this.data}findRegions(e){let t=e.facet(Ci);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],n=(s,o)=>{if(s.prop(br)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(J.mounted);if(l){if(l.tree.prop(br)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+o,to:a.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let a=r.length;if(n(l.tree,l.overlay[0].from+o),r.length>a)return}}for(let a=0;a=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}},yr=null,$o=class i{constructor(e,t,r=[],n,s,o,l,a){this.parser=e,this.state=t,this.fragments=r,this.tree=n,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new i(e,t,[],Ee.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Ho(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Ee.empty&&this.isDone(t!=null?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let n=Date.now()+e;e=()=>Date.now()>n}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Qt.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=yr;yr=this;try{return e()}finally{yr=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Zu(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:n,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((u,h,c,f)=>a.push({fromA:u,toA:h,fromB:c,toB:f})),r=Qt.applyChanges(r,a),n=Ee.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let u of this.skipped){let h=e.mapPos(u.from,1),c=e.mapPos(u.to,-1);he.from&&(this.fragments=Zu(this.fragments,n,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends _n{createParse(t,r,n){let s=n[0].from,o=n[n.length-1].to;return{parsedPos:s,advance(){let a=yr;if(a){for(let u of n)a.tempSkipped.push(u);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new Ee(Fe.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return yr}};function Zu(i,e,t){return Qt.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}var wr=class i{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new i(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=$o.create(e.facet(Ci).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new i(r)}};qe.state=gt.define({create:wr.init,update(i,e){for(let t of e.effects)if(t.is(qe.setState))return t.value;return e.startState.facet(Ci)!=e.state.facet(Ci)?wr.init(e.state):i.apply(e)}});var rh=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback!="undefined"&&(rh=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});var _o=typeof navigator!="undefined"&&(!((Lo=navigator.scheduling)===null||Lo===void 0)&&Lo.isInputPending)?()=>navigator.scheduling.isInputPending():null,yp=Jt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(qe.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(qe.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=rh(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndn+1e3,a=s.context.work(()=>_o&&_o()||Date.now()>o,n+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:qe.setState.of(new wr(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>ze(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ci=$.define({combine(i){return i.length?i[0]:null},enables:i=>[qe.state,yp,q.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});var Bt=class i{constructor(e,t){this.specs=e;let r;function n(l){let a=He.newName();return(r||(r=Object.create(null)))["."+a]=l,a}let s=typeof t.all=="string"?t.all:t.all?n(t.all):void 0,o=t.scope;this.scope=o instanceof qe?l=>l.prop(br)==o.data:o?l=>l==o:void 0,this.style=Po(e.map(l=>({tag:l.tag,class:l.class||n(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new He(r):null,this.themeType=t.themeType}static define(e,t){return new i(e,t||{})}},Vo=$.define(),nh=$.define({combine(i){return i.length?[i[0]]:null}});function Io(i){let e=i.facet(Vo);return e.length?e:i.facet(nh)}function Vn(i,e){let t=[bp],r;return i instanceof Bt&&(i.module&&t.push(q.styleModule.of(i.module)),r=i.themeType),e!=null&&e.fallback?t.push(nh.of(i)):r?t.push(Vo.computeN([q.darkTheme],n=>n.facet(q.darkTheme)==(r=="dark")?[i]:[])):t.push(Vo.of(i)),t}var qo=class{constructor(e){this.markCache=Object.create(null),this.tree=vr(e.state),this.decorations=this.buildDeco(e,Io(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=vr(e.state),r=Io(e.state),n=r!=Io(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return le.none;let r=new zt;for(let{from:n,to:s}of e.visibleRanges)Ju(this.tree,t,(o,l,a)=>{r.add(o,l,this.markCache[a]||(this.markCache[a]=le.mark({class:a})))},n,s);return r.finish()}},bp=nn.high(Jt.fromClass(qo,{decorations:i=>i.decorations})),Jb=Bt.define([{tag:m.meta,color:"#404740"},{tag:m.link,textDecoration:"underline"},{tag:m.heading,textDecoration:"underline",fontWeight:"bold"},{tag:m.emphasis,fontStyle:"italic"},{tag:m.strong,fontWeight:"bold"},{tag:m.strikethrough,textDecoration:"line-through"},{tag:m.keyword,color:"#708"},{tag:[m.atom,m.bool,m.url,m.contentSeparator,m.labelName],color:"#219"},{tag:[m.literal,m.inserted],color:"#164"},{tag:[m.string,m.deleted],color:"#a11"},{tag:[m.regexp,m.escape,m.special(m.string)],color:"#e40"},{tag:m.definition(m.variableName),color:"#00f"},{tag:m.local(m.variableName),color:"#30a"},{tag:[m.typeName,m.namespace],color:"#085"},{tag:m.className,color:"#167"},{tag:[m.special(m.variableName),m.macroName],color:"#256"},{tag:m.definition(m.propertyName),color:"#00c"},{tag:m.comment,color:"#940"},{tag:m.invalid,color:"#f00"}]);var vp=Object.create(null),eh=[Fe.none];var th=[],ih=Object.create(null),wp=Object.create(null);for(let[i,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])wp[i]=Ap(vp,e);function Fo(i,e){th.indexOf(i)>-1||(th.push(i),console.warn(e))}function Ap(i,e){let t=[];for(let l of e.split(" ")){let a=[];for(let u of l.split(".")){let h=i[u]||m[u];h?typeof h=="function"?a.length?a=a.map(h):Fo(u,`Modifier ${u} used at start of tag`):a.length?Fo(u,`Tag ${u} used as modifier`):a=Array.isArray(h)?h:[h]:Fo(u,`Unknown highlighting tag ${u}`)}for(let u of a)t.push(u)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),n=r+" "+t.map(l=>l.id),s=ih[n];if(s)return s.id;let o=ih[n]=Fe.define({id:eh.length,name:r,props:[Yu({[r]:t})]});return eh.push(o),o.id}var Qb={rtl:le.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:me.RTL}),ltr:le.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:me.LTR}),auto:le.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var Cp="#abb2bf",Sp="#7d8799",Dp="#ffffff",Ep="#21252b",Uo="rgba(0, 0, 0, 0.5)",xp="#292d3e",Wo="#353a42",Tp="rgba(128, 203, 196, 0.2)",sh="#ffcc00",kp=q.theme({"&":{color:"#ffffff",backgroundColor:xp},".cm-content":{caretColor:sh},"&.cm-focused .cm-cursor":{borderLeftColor:sh},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Tp},".cm-panels":{backgroundColor:Ep,color:"#ffffff"},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:Uo},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847",outline:"1px solid #515a6b"},".cm-gutters":{background:"#292d3e",color:"#676e95",border:"none"},".cm-activeLineGutter":{backgroundColor:Uo},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Wo},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Wo,borderBottomColor:Wo},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Uo,color:Cp}}},{dark:!0}),Mp=Bt.define([{tag:m.keyword,color:"#c792ea"},{tag:m.operator,color:"#89ddff"},{tag:m.special(m.variableName),color:"#eeffff"},{tag:m.typeName,color:"#f07178"},{tag:m.atom,color:"#f78c6c"},{tag:m.number,color:"#ff5370"},{tag:m.definition(m.variableName),color:"#82aaff"},{tag:m.string,color:"#c3e88d"},{tag:m.special(m.string),color:"#f07178"},{tag:m.comment,color:Sp},{tag:m.variableName,color:"#f07178"},{tag:m.tagName,color:"#ff5370"},{tag:m.bracket,color:"#a2a1a4"},{tag:m.meta,color:"#ffcb6b"},{tag:m.attributeName,color:"#c792ea"},{tag:m.propertyName,color:"#c792ea"},{tag:m.className,color:"#decb6b"},{tag:m.invalid,color:Dp}]),Rp=[kp,Vn(Mp)];var oh="#2e3440",Xo="#3b4252",lh="#434c5e",qn="#4c566a";var ah="#e5e9f0",Yo="#eceff4",zo="#8fbcbb",uh="#88c0d0",Np="#81a1c1",Ke="#5e81ac",Op="#bf616a",Si="#d08770",jo="#ebcb8b",hh="#a3be8c",Bp="#b48ead",ch="#d30102",Jo=Yo,Go=Jo,Pp="#ffffff",Ko=Xo,Lp=Jo,fh=Xo,dh=q.theme({"&":{color:oh,backgroundColor:Pp},".cm-content":{caretColor:fh},".cm-cursor, .cm-dropCursor":{borderLeftColor:fh},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Lp},".cm-panels":{backgroundColor:Jo,color:qn},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:`1px solid ${qn}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ah},".cm-activeLine":{backgroundColor:Go},".cm-selectionMatch":{backgroundColor:ah},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${qn}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:Yo},".cm-gutters":{backgroundColor:Yo,color:oh,border:"none"},".cm-activeLineGutter":{backgroundColor:Go},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Ko},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Ko,borderBottomColor:Ko},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Go,color:qn}}},{dark:!1}),_p=Bt.define([{tag:m.keyword,color:Ke},{tag:[m.name,m.deleted,m.character,m.propertyName,m.macroName],color:Si},{tag:[m.variableName],color:Si},{tag:[m.function(m.variableName)],color:Ke},{tag:[m.labelName],color:Np},{tag:[m.color,m.constant(m.name),m.standard(m.name)],color:Ke},{tag:[m.definition(m.name),m.separator],color:hh},{tag:[m.brace],color:zo},{tag:[m.annotation],color:ch},{tag:[m.number,m.changed,m.annotation,m.modifier,m.self,m.namespace],color:uh},{tag:[m.typeName,m.className],color:jo},{tag:[m.operator,m.operatorKeyword],color:hh},{tag:[m.tagName],color:Bp},{tag:[m.squareBracket],color:Op},{tag:[m.angleBracket],color:Si},{tag:[m.attributeName],color:jo},{tag:[m.regexp],color:Ke},{tag:[m.quote],color:Xo},{tag:[m.string],color:Si},{tag:m.link,color:zo,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[m.url,m.escape,m.special(m.string)],color:Si},{tag:[m.meta],color:uh},{tag:[m.comment],color:lh,fontStyle:"italic"},{tag:m.strong,fontWeight:"bold",color:Ke},{tag:m.emphasis,fontStyle:"italic",color:Ke},{tag:m.strikethrough,textDecoration:"line-through"},{tag:m.heading,fontWeight:"bold",color:Ke},{tag:m.special(m.heading1),fontWeight:"bold",color:Ke},{tag:m.heading1,fontWeight:"bold",color:Ke},{tag:[m.heading2,m.heading3,m.heading4],fontWeight:"bold",color:Ke},{tag:[m.heading5,m.heading6],color:Ke},{tag:[m.atom,m.bool,m.special(m.variableName)],color:Si},{tag:[m.processingInstruction,m.inserted],color:zo},{tag:[m.contentSeparator],color:jo},{tag:m.invalid,color:lh,borderBottom:`1px dotted ${ch}`}]),u1=[dh,Vn(_p)];function Ar(i,e=0,t=" ",r=!0){let n=[];if(e==5||i==null)return"";if(typeof i=="string")return i;if(typeof i=="number")return`${i}`;if(Array.isArray(i))n.push(`${r?"(":""}${i.map(s=>Ar(s,e+1)).join(t)}${r?")":""}`);else if(typeof i=="object")for(let s of Object.values(i))n.push(Ar(s,e+1));return n.join(" ")}var Ip={str:"strength",dex:"dexterity",con:"constitution",wis:"wisdom",int:"intelligence",cha:"charisma"};function ht(i){return i?i.replace(/{@condition (.+?)(?:\\|.+)?}/g,"$1").replace(/{@item (.+?)(?:\\|.+)?}/g,"$1").replace(/{@spell ([\\s\\S]+?)(?:\\|.+)?}/g,"$1").replace(/{@recharge (.+?)(?:\\|.+)?}/g,"(Recharge $1-6)").replace(/{@recharge}/g,"(Recharge 6)").replace(/{@h}/g,"").replace(/{@damage (.+?)}/g,"$1").replace(/{@atk ms}/g,"Melee Spell Attack").replace(/{@atk rs}/g,"Ranged Spell Attack").replace(/{@atk mw}/g,"Melee Weapon Attack").replace(/{@atk rw}/g,"Ranged Weapon Attack").replace(/{@atk mw,rw}/g,"Melee / Ranged Weapon Attack").replace(/{@creature (.+?)(?:\\|.+)?}/g,"$1").replace(/{@skill (.+?)(?:\\|.+)?}/g,"$1").replace(/{@dice (.+?)(?:\\|.+)?}/g,"$1").replace(/{@hit (\\d+?)(?:\\|.+)?}/g,"+$1").replace(/{@dc (\\d+?)(?:\\|.+)?}/g,"$1").replace(/{@quickref (.+?)\\|\\|.+?}/,"$1"):""}async function ph(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=async n=>{var s,o,l,a,u,h,c,f,d,p,g,y,b,A,w,E,S;try{let N=JSON.parse(n.target.result),M;"monster"in N?M=N.monster:Array.isArray(N)?M=N:typeof N=="object"?M=[N]:t("Invalid monster JSON provided.");let j=[];for(let D of M)try{let H={image:null,bestiary:!0,name:D.name,source:Xp(D),type:Fp(D.type),subtype:Hp(D.type),size:lg[(s=D.size)==null?void 0:s[0]],alignment:Gp(D),hp:D.hp&&"average"in D.hp?(o=D.hp)==null?void 0:o.average:null,hit_dice:D.hp&&"formula"in D.hp?(l=D.hp)==null?void 0:l.formula:"",ac:qp(D.ac),speed:Kp(D),stats:[D.str,D.dex,D.con,D.int,D.wis,D.cha],damage_immunities:ht(Di(D.immune)),damage_resistances:ht(Di(D.resist)),damage_vulnerabilities:ht(Di(D.vulnerable)),condition_immunities:ht(Di(D.conditionImmune)),saves:Object.entries((a=D.save)!=null?a:{}).map(B=>{var W,I;if(!B||!B[1])return;let[,O]=(I=(W=B[1])==null?void 0:W.match(/.*?(\\d+)/))!=null?I:[];if(O)return{[Ip[B[0]]]:O}}).filter(B=>B),skillsaves:X0(D),senses:Yp(D),languages:Ar(D.languages,0,", ",!1),cr:$p(D.cr),traits:(h=(u=D.trait)==null?void 0:u.flatMap(ei))!=null?h:[],actions:(f=(c=D.action)==null?void 0:c.flatMap(ei))!=null?f:[],bonus_actions:(p=(d=D.bonus)==null?void 0:d.flatMap(ei))!=null?p:[],reactions:(y=(g=D.reaction)==null?void 0:g.flatMap(ei))!=null?y:[],legendary_actions:(A=(b=D.legendary)==null?void 0:b.flatMap(ei))!=null?A:[],mythic_actions:[...(w=(D.mythicHeader?[{name:"",entries:D.mythicHeader}]:[]).flatMap(ei))!=null?w:[],...(S=(E=D.mythic)==null?void 0:E.flatMap(ei))!=null?S:[]],spells:jp(D),spellsNotes:Vp(D).join(" ")};j.push(H)}catch(H){console.error(H);continue}e(j)}catch(N){console.error("reject!!!",N),t(N)}},r.readAsText(i)})}function Fp(i){if(i)return typeof i=="string"?i:i.type}function Hp(i){if(!i||typeof i=="string"||!i.tags)return;let e=[];for(var t of i.tags)typeof t=="string"?e.push(t):e.push(t.tag);return e.join(", ")}function $p(i){if(i)return typeof i=="string"?i:i.cr}function Vp(i){let e=[];for(let t in i.spellcasting)e.push(Ar(i.spellcasting[t].footerEntries,0,", ",!1));return e}function Di(i){if(!i)return"";let e=[];for(let t of i){if(typeof t=="string"){e.push(t);continue}if("special"in t){e.push(t.special);continue}if("immune"in t){e.push(`${Di(t.immune)}${t.note?" ":""}${t.note?t.note:""}`);continue}if("resist"in t){e.push(`${Di(t.resist)}${t.note?" ":""}${t.note?t.note:""}`);continue}}return e.join(", ")}function qp(i=[]){var t;let[e]=i;if(e){if(typeof e=="number")return e;if(typeof e=="string"){let[r,n]=(t=e.match(/(\\d+)/))!=null?t:[];return n?Number(n):null}if(typeof e=="object")return"special"in e?e.special:"ac"in e?"from"in e?`${e.ac} (${ht(e.from.join(", "))})`:`${e.ac}`:null}}var Up={0:"Cantrips (at will)",1:"1st level",2:"2nd level",3:"3rd level",4:"4th level",5:"5th level",6:"6th level",7:"7th level",8:"8th level",9:"9th level"};function Qo(i){let e=[];for(let t of i){if(typeof t=="string"){e.push(t);continue}!t.hidden&&t.entry&&t.entry.length&&e.push(t.entry)}return ht(e.join(", "))}function Wp(i){let e=[];for(let t of Object.keys(i)){let r=i[t],n=Number(t.replace(/[^0-9]/,""));e.push([n,Qo(r)])}return e}function zp(i){var n,s;let e=[ht(((n=i.headerEntries)!=null?n:[]).join(`\n`))];if("spells"in i)try{for(let o in(s=i.spells)!=null?s:{}){let l=i.spells[o],{spells:a}=l,u=`${Up[o]}`;u+="slots"in l?` (${l.slots} slots)`:"";let h=ht(a.join(", "));e.push({[u]:h})}}catch(o){throw new Error("There was an error parsing the spells.")}if("will"in i&&i.will.length>0)try{e.push({"At will":Qo(i.will)})}catch(o){throw new Error("There was an error parsing the at-will spells.")}if("ritual"in i&&i.ritual.length>0)try{e.push({Rituals:Qo(i.ritual)})}catch(o){throw new Error("There was an error parsing the ritual spells.")}let t=["rest","daily","weekly","yearly","charges"],r={rest:"/rest each",daily:"/day each",weekly:"/week each",yearly:"/year each",charges:" charges"};for(let o of t)if(o in i){let l=Wp(i[o]);for(let a of l.sort((u,h)=>h[0]-u[0]))e.push({[`${a[0]}${r[o]}`]:a[1]})}return e}function jp(i){return!i.spellcasting||!i.spellcasting.length?[]:i.spellcasting.flatMap(zp)}function Gp(i){return i.alignment?Un(i.alignment):null}function Un(i){var t;if(!i)return null;let e=[];if(Array.isArray(i)){let r=[];for(let n of i)typeof n=="string"?r.push(Un(n)):e.push(Un(n));r.length>0&&e.push(r.join(" "))}else if(typeof i=="object"){if("special"in i&&i.special!=null)return i.special;if("alignment"in i)return`${((t=i.alignment)!=null?t:[]).map(r=>Un(r)).join(" ")}${i.chance?` (${i.chance}%)`:""}${i.note?` (${i.note})`:""}`}else{switch(i.toUpperCase()){case"L":return"lawful";case"N":return"neutral";case"NX":return"neutral (law/chaos axis)";case"NY":return"neutral (good/evil axis)";case"C":return"chaotic";case"G":return"good";case"E":return"evil";case"U":return"unaligned";case"A":return"any alignment"}return i}return e.join(" or ")}function Kp(i){var l,a;let e=i.speed;if(!e)return"\\u2014";if(typeof e=="number")return`${e}`;function t(u){return typeof u=="number"?u:u.number!=null?u.number:u}function r(u){var h;return typeof u=="number"?"":(h=u==null?void 0:u.condition)!=null?h:""}let n=[],s=["walk","burrow","climb","fly","swim"];for(let u of s){if(u!="walk"&&!(u in e)&&!(u in((l=e.alternate)!=null?l:{})))continue;let h=[];n.push(`${u==="walk"?"":`${u} `}${t((a=e[u])!=null?a:0)} ft. ${r(e[u])}`.trim()),e.alternate&&e.alternate[u]&&e.alternate[u].forEach(c=>{n.push(`${u==="walk"?"":`${u} `}${t(c!=null?c:0)} ft. ${r(c)}`.trim())})}let o=", ";if(e.choose){o="; ";let u=e.choose.from.sort();u.length>1?(`${u.slice(0,u.length-1).join(", ")}${u[u.length-1]}${e.choose.amount}`,e.choose.note&&`${e.choose.note}`):n.push(`${u} ${e.choose.amount} ft.${e.choose.note?` ${e.choose.note}`:""}`)}return n.join(o)}function Yp(i){if(typeof i.senses=="string")return i.senses;let e=[];return Array.isArray(i.senses)&&i.senses.length>0&&(e=[i.senses.join(", ").trim()]),i.passive&&e.push(`passive Perception ${i.passive}`),e.join(", ")}function Xp(i){var t,r,n;let e=[];return(t=i.source)!=null&&t.length&&e.push((r=v[i.source])!=null?r:i.source),(n=i.otherSources)!=null&&n.length&&e.push(...i.otherSources.map(s=>{var o;return(o=v[s.source])!=null?o:s.source})),e}function ei(i){return i.entries.reduce((t,r)=>{var s;if(typeof r!="string"){let o=(s=r.items)==null?void 0:s.map(l=>typeof l=="string"?{name:l,entries:[]}:"entry"in l?{name:l.name,entries:[l.entry]}:{name:l.name,entries:l.entries});return t.concat(o!=null?o:[])}return t.length>1||t[0].entries.push(r),t},[{name:i.name,entries:[]}]).map(({name:t,entries:r})=>({name:ht(t),desc:ht(r.join(`\n`))}))}var Jp="F",Qp="D",Zp="T",eg="S",tg="M",ig="L",rg="H",ng="G",sg="C",og="V",lg={[Jp]:"Fine",[Qp]:"Diminutive",[Zp]:"Tiny",[eg]:"Small",[tg]:"Medium",[ig]:"Large",[rg]:"Huge",[ng]:"Gargantuan",[sg]:"Colossal",[og]:"Varies"},ag="CoS",ug="DMG",hg="EEPC",cg="EET",fg="HotDQ",dg="LMoP",pg="Mag",gg="MM",mg="OotA",yg="PHB",bg="PotA",vg="RoT",wg="RoTOS",Ag="SCAG",Cg="SKT",Sg="ToA",Dg="ToD",Eg="TTP",xg="TftYP",Tg="TftYP-AtG",kg="TftYP-DiT",Mg="TftYP-TFoF",Rg="TftYP-THSoT",Ng="TftYP-TSC",Og="TftYP-ToH",Bg="TftYP-WPM",Pg="VGM",Lg="XGE",_g="OGA",Ig="MTF",Fg="WDH",Hg="WDMM",$g="GGR",Vg="KKW",qg="LLK",Ug="GoS",Wg="AI",zg="OoW",jg="ESK",Gg="DIP",Kg="HftT",Yg="DC",Xg="SLW",Jg="SDW",Qg="BGDIA",Zg="LR",em="AL",tm="SAC",im="ERLW",rm="EFR",nm="RMBRE",sm="RMR",om="MFF",lm="AWM",am="IMR",um="SADS",hm="EGW",cm="ToR",fm="DD",dm="FS",pm="US",gm="MOT",mm="IDRotF",ym="TCE",bm="VRGR",vm="HoL",wm="Screen",Am="ScreenWildernessKit",Cm="HF",Sm="CM",Dm="WBtW",Em="CRCotN",Zo="AL",xm=`${Zo}CurseOfStrahd`,Tm=`${Zo}ElementalEvil`,km=`${Zo}RageOfDemons`,Ei="PS",Mm=`${Ei}A`,Rm=`${Ei}I`,Nm=`${Ei}K`,Om=`${Ei}Z`,Bm=`${Ei}X`,Pm=`${Ei}D`,x="UA",Lm=`${x}Artificer`,_m=`${x}EladrinAndGith`,Im=`${x}Eberron`,Fm=`${x}FeatsForRaces`,Hm=`${x}FeatsForSkills`,$m=`${x}FiendishOptions`,Vm=`${x}Feats`,qm=`${x}GothicHeroes`,Um=`${x}ModernMagic`,Wm=`${x}StarterSpells`,zm=`${x}TheMysticClass`,jm=`${x}ThatOldBlackMagic`,Gm=`${x}TheRangerRevised`,Km=`${x}WaterborneAdventures`,Ym=`${x}VariantRules`,Xm=`${x}LightDarkUnderdark`,Jm=`${x}RangerAndRogue`,Qm=`${x}ATrioOfSubclasses`,Zm=`${x}BarbarianPrimalPaths`,e0=`${x}RevisedSubclasses`,t0=`${x}KitsOfOld`,i0=`${x}BardBardColleges`,r0=`${x}ClericDivineDomains`,n0=`${x}Druid`,s0=`${x}RevisedClassOptions`,o0=`${x}Fighter`,l0=`${x}Monk`,a0=`${x}Paladin`,u0=`${x}ModifyingClasses`,h0=`${x}Sorcerer`,c0=`${x}WarlockAndWizard`,f0=`${x}TheFaithful`,d0=`${x}WizardRevisited`,p0=`${x}ElfSubraces`,g0=`${x}MassCombat`,m0=`${x}ThreePillarExperience`,y0=`${x}GreyhawkInitiative`,b0=`${x}ThreeSubclasses`,v0=`${x}OrderDomain`,w0=`${x}CentaursMinotaurs`,A0=`${x}GiantSoulSorcerer`,C0=`${x}RacesOfEberron`,S0=`${x}RacesOfRavnica`,D0=`${x}WGE`,E0=`${x}OfShipsAndSea`,x0=`${x}Sidekicks`,T0=`${x}ArtificerRevisited`,k0=`${x}BarbarianAndMonk`,M0=`${x}SorcererAndWarlock`,R0=`${x}BardAndPaladin`,N0=`${x}ClericDruidWizard`,O0=`${x}FighterRangerRogue`,B0=`${x}ClassFeatureVariants`,P0=`${x}FighterRogueWizard`,L0=`${x}PrestigeClassesRunMagic`,_0=`${x}Ranger`,I0=`${x}2020SubclassesPt1`,F0=`${x}2020SubclassesPt2`,H0=`${x}2020SubclassesPt3`,$0=`${x}2020SubclassesPt4`,V0=`${x}2020SubclassesPt5`,q0=`${x}2020SpellsAndMagicTattoos`,U0=`${x}2020PsionicOptionsRevisited`,W0=`${x}2020SubclassesRevisited`,z0=`${x}2020Feats`,j0=`${x}2021GothicLineages`,G0=`${x}2021FolkOfTheFeywild`,K0=`${x}2021DraconicOptions`,Y0=`${x}2021MagesOfStrixhaven`,el="Adventurers League: ",xi="Plane Shift: ",T="Unearthed Arcana: ",Pt="Tales from the Yawning Portal",v={};v[ag]="Curse of Strahd";v[ug]="Dungeon Master\'s Guide";v[hg]="Elemental Evil Player\'s Companion";v[cg]="Elemental Evil: Trinkets";v[fg]="Hoard of the Dragon Queen";v[dg]="Lost Mine of Phandelver";v[pg]="Dragon Magazine";v[gg]="Monster Manual";v[mg]="Out of the Abyss";v[yg]="Player\'s Handbook";v[bg]="Princes of the Apocalypse";v[vg]="The Rise of Tiamat";v[wg]="The Rise of Tiamat Online Supplement";v[Ag]="Sword Coast Adventurer\'s Guide";v[Cg]="Storm King\'s Thunder";v[Sg]="Tomb of Annihilation";v[Dg]="Tyranny of Dragons";v[Eg]="The Tortle Package";v[xg]=Pt;v[Tg]=`${Pt}: Against the Giants`;v[kg]=`${Pt}: Dead in Thay`;v[Mg]=`${Pt}: The Forge of Fury`;v[Rg]=`${Pt}: The Hidden Shrine of Tamoachan`;v[Ng]=`${Pt}: The Sunless Citadel`;v[Og]=`${Pt}: Tomb of Horrors`;v[Bg]=`${Pt}: White Plume Mountain`;v[Pg]="Volo\'s Guide to Monsters";v[Lg]="Xanathar\'s Guide to Everything";v[_g]="One Grung Above";v[Ig]="Mordenkainen\'s Tome of Foes";v[Fg]="Waterdeep: Dragon Heist";v[Hg]="Waterdeep: Dungeon of the Mad Mage";v[$g]="Guildmasters\' Guide to Ravnica";v[Vg]="Krenko\'s Way";v[qg]="Lost Laboratory of Kwalish";v[Ug]="Ghosts of Saltmarsh";v[Wg]="Acquisitions Incorporated";v[zg]="The Orrery of the Wanderer";v[jg]="Essentials Kit";v[Gg]="Dragon of Icespire Peak";v[Kg]="Hunt for the Thessalhydra";v[Yg]="Divine Contention";v[Xg]="Storm Lord\'s Wrath";v[Jg]="Sleeping Dragon\'s Wake";v[Qg]="Baldur\'s Gate: Descent Into Avernus";v[Zg]="Locathah Rising";v[em]="Adventurers\' League";v[tm]="Sage Advice Compendium";v[im]="Eberron: Rising from the Last War";v[rm]="Eberron: Forgotten Relics";v[nm]="The Lost Dungeon of Rickedness: Big Rick Energy";v[sm]="Dungeons & Dragons vs. Rick and Morty: Basic Rules";v[om]="Mordenkainen\'s Fiendish Folio";v[lm]="Adventure with Muk";v[am]="Infernal Machine Rebuild";v[um]="Sapphire Anniversary Dice Set";v[hm]="Explorer\'s Guide to Wildemount";v[cm]="Tide of Retribution";v[fm]="Dangerous Designs";v[dm]="Frozen Sick";v[pm]="Unwelcome Spirits";v[gm]="Mythic Odysseys of Theros";v[mm]="Icewind Dale: Rime of the Frostmaiden";v[ym]="Tasha\'s Cauldron of Everything";v[bm]="Van Richten\'s Guide to Ravenloft";v[vm]="The House of Lament";v[wm]="Dungeon Master\'s Screen";v[Am]="Dungeon Master\'s Screen: Wilderness Kit";v[Cm]="Heroes\' Feast";v[Sm]="Candlekeep Mysteries";v[xm]=`${el}Curse of Strahd`;v[Tm]=`${el}Elemental Evil`;v[km]=`${el}Rage of Demons`;v[Mm]=`${xi}Amonkhet`;v[Rm]=`${xi}Innistrad`;v[Nm]=`${xi}Kaladesh`;v[Om]=`${xi}Zendikar`;v[Bm]=`${xi}Ixalan`;v[Pm]=`${xi}Dominaria`;v[Lm]=`${T}Artificer`;v[_m]=`${T}Eladrin and Gith`;v[Im]=`${T}Eberron`;v[Fm]=`${T}Feats for Races`;v[Hm]=`${T}Feats for Skills`;v[$m]=`${T}Fiendish Options`;v[Vm]=`${T}Feats`;v[qm]=`${T}Gothic Heroes`;v[Um]=`${T}Modern Magic`;v[Wm]=`${T}Starter Spells`;v[zm]=`${T}The Mystic Class`;v[jm]=`${T}That Old Black Magic`;v[Gm]=`${T}The Ranger, Revised`;v[Km]=`${T}Waterborne Adventures`;v[Ym]=`${T}Variant Rules`;v[Xm]=`${T}Light, Dark, Underdark!`;v[Jm]=`${T}Ranger and Rogue`;v[Qm]=`${T}A Trio of Subclasses`;v[Zm]=`${T}Barbarian Primal Paths`;v[e0]=`${T}Revised Subclasses`;v[t0]=`${T}Kits of Old`;v[i0]=`${T}Bard: Bard Colleges`;v[r0]=`${T}Cleric: Divine Domains`;v[n0]=`${T}Druid`;v[s0]=`${T}Revised Class Options`;v[o0]=`${T}Fighter`;v[l0]=`${T}Monk`;v[a0]=`${T}Paladin`;v[u0]=`${T}Modifying Classes`;v[h0]=`${T}Sorcerer`;v[c0]=`${T}Warlock and Wizard`;v[f0]=`${T}The Faithful`;v[d0]=`${T}Wizard Revisited`;v[p0]=`${T}Elf Subraces`;v[g0]=`${T}Mass Combat`;v[m0]=`${T}Three-Pillar Experience`;v[y0]=`${T}Greyhawk Initiative`;v[b0]=`${T}Three Subclasses`;v[v0]=`${T}Order Domain`;v[w0]=`${T}Centaurs and Minotaurs`;v[A0]=`${T}Giant Soul Sorcerer`;v[C0]=`${T}Races of Eberron`;v[S0]=`${T}Races of Ravnica`;v[D0]="Wayfinder\'s Guide to Eberron";v[E0]=`${T}Of Ships and the Sea`;v[x0]=`${T}Sidekicks`;v[T0]=`${T}Artificer Revisited`;v[k0]=`${T}Barbarian and Monk`;v[M0]=`${T}Sorcerer and Warlock`;v[R0]=`${T}Bard and Paladin`;v[N0]=`${T}Cleric, Druid, and Wizard`;v[O0]=`${T}Fighter, Ranger, and Rogue`;v[B0]=`${T}Class Feature Variants`;v[P0]=`${T}Fighter, Rogue, and Wizard`;v[L0]=`${T}Prestige Classes and Rune Magic`;v[_0]=`${T}Ranger`;v[I0]=`${T}2020 Subclasses, Part 1`;v[F0]=`${T}2020 Subclasses, Part 2`;v[H0]=`${T}2020 Subclasses, Part 3`;v[$0]=`${T}2020 Subclasses, Part 4`;v[V0]=`${T}2020 Subclasses, Part 5`;v[q0]=`${T}2020 Spells and Magic Tattoos`;v[U0]=`${T}2020 Psionic Options Revisited`;v[W0]=`${T}2020 Subclasses Revisited`;v[z0]=`${T}2020 Feats`;v[j0]=`${T}2021 Gothic Lineages`;v[G0]=`${T}2021 Folk of the Feywild`;v[K0]=`${T}2021 Draconic Options`;v[Y0]=`${T}2021 Mages of Strixhaven`;v[Dm]="The Wild Beyond the Witchlight";v[Em]="Critical Role: Call of the Netherdeep";function X0(i){var n,s,o;let e=i.skill;if(!e)return[];let t=[],r=[];for(let l of Object.keys(e)){if(l=="other"){let h=e[l];for(let c of h){let f=c.oneOf;if(!f)continue;let d=Object.keys(f).sort(),p=d.shift(),g=f[p],[,y]=(n=g==null?void 0:g.match(/.*?(\\d+)/))!=null?n:[];r.push({[`plus one of the following: ${p.charAt(0).toUpperCase()+p.slice(1)}`]:y});for(let b of d.slice(1)){let A=f[b],[,w]=(s=A==null?void 0:A.match(/.*?(\\d+)/))!=null?s:[];w&&r.push({[b]:w})}}continue}let a=e[l],[,u]=(o=a==null?void 0:a.match(/.*?(\\d+)/))!=null?o:[];u&&t.push({[l]:u})}return[...t.filter(l=>l),...r.filter(l=>l)]}async function gh(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=async n=>{var o,l,a,u,h,c,f,d,p,g,y,b,A,w,E,S,N,M,j,D,H,B,O,W,I;let s=[];try{let te=JSON.parse(n.target.result),Ce=[];te.creatures?Ce=te.creatures:Ce=[te];for(let F of Ce)try{let Se={image:null,name:F.name,source:"CritterDB",type:F.stats.race,subtype:"",size:F.stats.size,alignment:F.stats.alignment,hp:F.stats.hitPoints,hit_dice:`${Math.floor(F.stats.extraHealthFromConstitution/F.stats.abilityScoreModifiers.constitution)}d${F.stats.hitDieSize} + ${F.stats.extraHealthFromConstitution}`,ac:F.stats.armorClass,speed:F.stats.speed,stats:[F.stats.abilityScores.strength,F.stats.abilityScores.dexterity,F.stats.abilityScores.constitution,F.stats.abilityScores.intelligence,F.stats.abilityScores.wisdom,F.stats.abilityScores.charisma],damage_immunities:(l=(o=F.stats.damageImmunities)==null?void 0:o.join("; ").toLowerCase().trim())!=null?l:"",damage_resistances:(u=(a=F.stats.damageResistances)==null?void 0:a.join(", ").toLowerCase().trim())!=null?u:"",damage_vulnerabilities:(c=(h=F.stats.damageVulnerabilities)==null?void 0:h.join(", ").toLowerCase().trim())!=null?c:"",condition_immunities:(d=(f=F.stats.conditionImmunities)==null?void 0:f.join(", ").toLowerCase().trim())!=null?d:"",saves:(g=(p=F.stats.savingThrows)==null?void 0:p.map(k=>{var K;if(!(!("value"in k)&&!("modifier"in k)))return{[k.ability]:(K=k.value)!=null?K:k.modifier}}).filter(k=>k))!=null?g:[],skillsaves:(b=(y=F.stats.skills)==null?void 0:y.map(k=>{var K;if(!(!("value"in k)&&!("modifier"in k)))return{[k.name]:(K=k.value)!=null?K:k.modifier}}).filter(k=>k))!=null?b:[],senses:(w=(A=F.stats.senses)==null?void 0:A.join(", ").trim())!=null?w:"",languages:(S=(E=F.stats.languages)==null?void 0:E.join(", ").trim())!=null?S:"",cr:(N=F.stats.challengeRating)!=null?N:"",traits:(j=(M=F.stats.additionalAbilities)==null?void 0:M.map(k=>({name:k.name,desc:k.description.replace(/<[^>]*>/g,"")})))!=null?j:[],actions:(H=(D=F.stats.actions)==null?void 0:D.map(k=>({name:k.name,desc:k.description.replace(/<[^>]*>/g,"")})))!=null?H:[],reactions:(O=(B=F.stats.reactions)==null?void 0:B.map(k=>({name:k.name,desc:k.description.replace(/<[^>]*>/g,"")})))!=null?O:[],legendary_actions:(I=(W=F.stats.legendaryActions)==null?void 0:W.map(k=>({name:k.name,desc:k.description.replace(/<[^>]*>/g,"")})))!=null?I:[]};s.push(Se)}catch(Se){continue}e(s)}catch(te){t()}},r.readAsText(i)})}var kc=Gc(xc());async function Mc(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=async n=>{let s=n.target.result,l=new kc.DOMParser().parseFromString(s,"application/xml").getElementsByTagName("monster"),a=[];if(l.length){for(let u of Array.from(l))try{let h={image:null,name:ve(u,"name"),size:Uy(u),type:ve(u,"type"),subtype:ve(u,"subtype"),alignment:ve(u,"alignment"),ac:Wy(u),hp:Number(Tc(u,"hp")),hit_dice:Tc(u,"hit_dice"),speed:ve(u,"speed"),stats:[Number(ve(u,"str")),Number(ve(u,"dex")),Number(ve(u,"con")),Number(ve(u,"int")),Number(ve(u,"wis")),Number(ve(u,"cha"))],saves:Vy(u),skillsaves:Hy(u),damage_vulnerabilities:ve(u,"vulnerable"),damage_resistances:ve(u,"resist"),damage_immunities:ve(u,"immune"),condition_immunities:ve(u,"conditionImmune"),senses:ve(u,"senses"),languages:ve(u,"languages"),cr:ve(u,"cr"),traits:os(u,"trait"),spells:Fy(u),actions:os(u,"action"),legendary_actions:os(u,"legendary"),reactions:os(u,"reaction"),source:zy(u)};a.push(h)}catch(h){console.error(h);continue}e(a)}},r.readAsText(i)})}function ve(i,e){let t=i.getElementsByTagName(e);if(t&&t.length)return t[0].textContent}function os(i,e){var n;if(!((n=i.getElementsByTagName(e))!=null&&n.length))return[];let t=i.getElementsByTagName(e),r=[];for(let s of Array.from(t)){let o=s.getElementsByTagName("name");if(!o||!o.length||!o[0].textContent||o[0].textContent.includes("Spellcasting"))continue;let l=[],a=s.getElementsByTagName("text");for(let u of Array.from(a))l.push(u.textContent);r.push({name:o[0].textContent,desc:l.join(" ")})}return r}function Fy(i){var r;if(!((r=i.getElementsByTagName("trait"))!=null&&r.length))return[];let t=Array.from(i.getElementsByTagName("trait")).find(n=>{var s;return(s=n.getElementsByTagName("name")[0])==null?void 0:s.textContent.includes("Spellcasting")});return t?Array.from(t.getElementsByTagName("text")).map(n=>n.textContent.replace(/(•|\u2022)/u,"").trim()).filter(n=>n.length):[]}function Hy(i){var r;if(!((r=i.getElementsByTagName("skill"))!=null&&r.length))return[];let e=i.getElementsByTagName("skill")[0].textContent.split(", "),t=[];return e.forEach(n=>{let s=n.split(/\\s[\\+\\-]/);t.push({[s[0]]:Number(s[1])})}),t}var $y={Str:"strength",Dex:"dexterity",Con:"constitution",Int:"intelligence",Wis:"wisdom",Cha:"charisma"};function Vy(i){var r;if(!((r=i.getElementsByTagName("save"))!=null&&r.length))return[];let e=i.getElementsByTagName("save")[0].textContent.split(", "),t=[];return e.forEach(n=>{let s=n.split(/\\s[\\+\\-]/);t.push({[$y[s[0]]]:Number(s[1])})}),t}function Tc(i,e){var s,o;if(!((s=i.getElementsByTagName("hp"))!=null&&s.length))return"";let t=i.getElementsByTagName("hp")[0].textContent,[,r,n]=(o=t.match(/(\\d+) \\(([\\s\\S]+)\\)/))!=null?o:[,"",""];return{hp:r,hit_dice:n}[e]}var qy={T:"tiny",S:"small",M:"medium",L:"large",H:"huge",G:"gargantuan"};function Uy(i){var e;return i.getElementsByTagName("size")&&(e=qy[i.getElementsByTagName("size")[0].textContent])!=null?e:""}function Wy(i){var e;if(i.getElementsByTagName("ac")){let[,t]=(e=i.getElementsByTagName("ac")[0])==null?void 0:e.textContent.match(/(\\d+)/);return Number(t)}return 0}function zy(i){var t,r,n,s,o,l;let e="Unknown";if((t=i.getElementsByTagName("source"))!=null&&t.length)e=i.getElementsByTagName("source")[0].textContent;else if((r=i.getElementsByTagName("trait"))!=null&&r.length&&Array.from(i.getElementsByTagName("trait")).find(a=>{var u;return((u=a.getElementsByTagName("name"))==null?void 0:u[0].textContent)=="Source"})){let a=Array.from(i.getElementsByTagName("trait")).find(u=>{var h,c;return((c=(h=u.getElementsByTagName("name"))==null?void 0:h[0])==null?void 0:c.textContent)=="Source"});e=(o=(s=(n=a==null?void 0:a.getElementsByTagName("text"))==null?void 0:n[0])==null?void 0:s.textContent)==null?void 0:o.replace(/p. \\d+/,"").trim()}else if((l=i.getElementsByTagName("description"))!=null&&l.length){let a=i.getElementsByTagName("description"),u="Source: ";if(a[0].textContent.includes(u)){let h=a[0].textContent.lastIndexOf(u);e=a[0].textContent.slice(h+u.length).split(/, ?/)[0]}}return e}var jy={STR:"strength",DEX:"dexterity",CON:"constitution",INT:"intelligence",WIS:"wisdom",CHA:"charisma"};async function Rc(i){return new Promise((e,t)=>{let r=new FileReader,n=[];r.onload=async s=>{var o,l,a,u,h,c,f,d,p,g,y,b,A,w,E,S,N,M,j,D,H,B,O,W,I,te,Ce,F,Se,k,K,ue,pe,Je,pt,Ht,Wi,Al,Cl,Sl,Dl,El,xl,Tl,kl,Ml,Rl,Nl,Ol,Bl,Pl,Ll,_l;try{let as=JSON.parse(s.target.result),Hc=Object.keys(as).filter(us=>/^Creatures\\./.test(us));for(let us of Hc)try{let ie=as[us],$c={name:ie.Name,source:(o=ie.Source)!=null&&o.trim().length?(l=ie.Source)==null?void 0:l.trim():"Unknown",type:(h=(u=(a=ie.Type)==null?void 0:a.split(/,\\s?/))==null?void 0:u[0])==null?void 0:h.trim(),subtype:"",size:"",alignment:(d=(f=(c=ie.Type)==null?void 0:c.split(/,\\s?/))==null?void 0:f[1])==null?void 0:d.trim(),hp:(p=ie.HP)==null?void 0:p.Value,hit_dice:(b=(y=(g=ie.HP)==null?void 0:g.Notes)==null?void 0:y.replace(/([()])/g,""))==null?void 0:b.trim(),ac:ie.AC.Value,speed:(w=(A=ie.Speed)==null?void 0:A.join(", "))==null?void 0:w.trim(),stats:Object.values((E=ie.Abilities)!=null?E:{}),damage_immunities:(j=(M=(N=(S=ie.DamageImmunities)==null?void 0:S.join("; "))==null?void 0:N.toLowerCase())==null?void 0:M.trim())!=null?j:"",damage_resistances:(O=(B=(H=(D=ie.DamageResistances)==null?void 0:D.join(", "))==null?void 0:H.toLowerCase())==null?void 0:B.trim())!=null?O:"",damage_vulnerabilities:(Ce=(te=(I=(W=ie.DamageVulnerabilities)==null?void 0:W.join(", "))==null?void 0:I.toLowerCase())==null?void 0:te.trim())!=null?Ce:"",condition_immunities:(K=(k=(Se=(F=ie.ConditionImmunities)==null?void 0:F.join(", "))==null?void 0:Se.toLowerCase())==null?void 0:k.trim())!=null?K:"",saves:(pe=(ue=ie.Saves)==null?void 0:ue.map(({Name:ge,Modifier:hs})=>({[jy[ge]]:hs})))!=null?pe:[],skillsaves:(pt=(Je=ie.Skills)==null?void 0:Je.map(({Name:ge,Modifier:hs})=>({[ge]:hs})))!=null?pt:[],senses:(Al=(Wi=(Ht=ie.Senses)==null?void 0:Ht.join(", "))==null?void 0:Wi.trim())!=null?Al:"",languages:(Dl=(Sl=(Cl=ie.Languages)==null?void 0:Cl.join(", "))==null?void 0:Sl.trim())!=null?Dl:"",cr:(xl=(El=ie.Challenge)==null?void 0:El.trim())!=null?xl:"",traits:(kl=(Tl=ie.Traits)==null?void 0:Tl.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?kl:[],actions:(Rl=(Ml=ie.Actions)==null?void 0:Ml.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?Rl:[],bonus_actions:(Ol=(Nl=ie.BonusActions)==null?void 0:Nl.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?Ol:[],reactions:(Pl=(Bl=ie.Reactions)==null?void 0:Bl.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?Pl:[],legendary_actions:(_l=(Ll=ie.LegendaryActions)==null?void 0:Ll.map(ge=>({name:ge.Name,desc:ge.Content})))!=null?_l:[],image:null};n.push($c)}catch(ie){continue}e(n)}catch(as){t()}},r.readAsText(i)})}async function Oc(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=async n=>{try{let s=JSON.parse(n.target.result),o=[fe(s.strength),fe(s.dexterity),fe(s.constitution),fe(s.intelligence),fe(s.wisdom),fe(s.charisma)],l=fe(s.ac),a=tb(s.specials),u=ob(s.spelltype,s.focuspoints,s.cantriplevel,s.spelldc,s.spellattack,s.spells,s.constant),h=s.creature||"Creature",c={layout:"Basic Pathfinder 2e Layout",name:s.name,level:h+" "+s.level.toString(),size:s.size,trait_03:s.type,modifier:fe(s.perception),perception:ib(s.perception),abilities_top:a.filter(d=>d.type===Qy).map(d=>({name:d.name,desc:d.desc})),abilities_mid:a.filter(d=>d.type===Zy).map(d=>({name:d.name,desc:d.desc})),abilities_bot:a.filter(d=>d.type===eb).map(d=>({name:d.name,desc:d.desc})),type:s.type,subtype:"",alignment:s.alignment,ac:l,armorclass:bl(l,fe(s.fortitude),fe(s.reflex),fe(s.will)),hp:fe(s.hp)||1,health:nb(s.hp,s.immunity,s.resistance,s.weakness),attacks:sb(s.strikes),spellcasting:u,speed:s.speed||"5 feet",stats:o,abilityMods:o,damage_vulnerabilities:s.weakness,damage_resistances:s.resistance,damage_immunities:"",condition_immunities:s.immunity,senses:s.perception.note,languages:s.languages,cr:s.level,bestiary:!1,skills:lb(s)},f=ab(s.traits);for(let d=0;d{let t=rb(e.actions),r=Bc(ub(e.description));return{name:e.name,desc:t+r,type:e.type}})}function ib(i){let e=ke(fe(i)),t=i.note?` ${i.note};`:"";return[{name:"Perception",desc:`Perception ${e};${t}`}]}function qi(i){return i<0?`${i} (1d20${i})`:`+${i} (1d20+${i})`}function ke(i){return i>=0?`+${i}`:i.toString()}function bl(i,e,t,r){let n=qi(e),s=qi(t),o=qi(r);return[{name:"AC",desc:`${i}; __Fort__: ${n}; __Ref__: ${s}; __Will__: ${o};`}]}function rb(i){let t={reaction:Gy,one:ls,two:Ky,three:Yy,free:Xy,none:Jy}[i];return t||i}function nb(i,e,t,r){let n=fe(i)||1,s=fe(e),o=fe(t),l=fe(r),a=i.note?` (${i.note});`:"",u=s?` __Immunities__ ${s};`:"",h=o?` __Resistances__ ${o};`:"",c=l?` __Weaknesses__ ${l};`:"";return[{name:"HP",desc:`${n};${a}${u}${h}${c}`}]}function sb(i){return i.map(e=>{let t=e.traits?` (${e.traits});`:"",r=e.damage?` __Damage__ ${Bc(e.damage)}`:"",n=ke(parseInt(e.attack));return{name:e.type,desc:ls+` ${e.name} ${n}${t}${r}`}})}function ob(i,e,t,r,n,s,o){if(s.join(",").split(",").map(c=>c.trim()).filter(c=>c!=="").length===0)return[];let a=e?`${e} Focus Points, `:"",u=10;var h="";for(let c=0;c({skill:n,value:fe(i[n]),note:i[n].note})).filter(n=>n.value!==0).map(n=>`__${zr(n.skill)}__: ${qi(n.value)}`+(n.note?` (${n.note})`:""),"").join(" ");return r.length===0?[]:[{name:"Skills",desc:r}]}function ab(i){let e=i.split(",");return e.forEach(t=>t.trim()),e}function Bc(i){return i.replace(/ ?(\\d+d\\d+( ?[+-] ?\\d+)?)/g," $1 ($1)")}function ub(i){return i.replace(/((Trigger)|(Requirements)|(Effect))/g,"__$1__")}function Nc(i){let e=["th","st","nd","rd"],t=i%100;return i+(e[(t-20)%10]||e[t]||e[0])}function zr(i){return i.replace(/\\w\\S*/g,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase())}var hb={acrobatics:"dex",arcana:"int",athletics:"str",crafting:"int",deception:"cha",diplomacy:"cha",intimidation:"cha",medicine:"wis",nature:"wis",occultism:"int",performance:"cha",religion:"wis",society:"int",stealth:"dex",survival:"wis",thievery:"dex",lore:"int"},cb=["Tiny","Small","Medium","Large","Huge"];async function Lc(i){return new Promise((e,t)=>{let r=new FileReader;r.onload=()=>{try{let s=JSON.parse(r.result).build,o=s.attributes,l=s.abilities,a=s.proficiencies,u=s.acTotal.acTotal,h=ai(l.str),c=ai(l.dex),f=ai(l.con),d=ai(l.int),p=ai(l.wis),g=ai(l.cha),y=p+a.perception+s.level,b=o.ancestryhp+(o.classhp+o.bonushp+f+o.bonushpPerLevel)*s.level,A=Ui(l.con,a.fortitude,s.level),w=Ui(l.dex,a.reflex,s.level),E=Ui(l.wis,a.will,s.level),S={layout:"Basic Pathfinder 2e Layout",source:"Pathbuilder",sourcebook:i.name,columns:2,name:s.name,player:!0,level:s.level,rare_01:"unique",trait_01:s.ancestry,trait_02:s.heritage,trait_03:s.background,alignment:s.alignment,size:cb[s.size],modifier:y,perception:mb(y),type:s.class,subtype:"",ac:u,armorclass:bl(u,A,w,E),hp:b,health:pb(b,s.resistances),attacks:gb(s.weapons),abilities_top:[{name:"Class DC",desc:String(10+Ui(l[s.keyability],a.classDC,s.level))},bb(s.equipment),vb(s.armor)],abilities_bot:[Pc("Feats",s.feats.map(N=>N[0])),Pc("Specials",s.specials)],abilityMods:[ke(h),ke(c),ke(f),ke(d),ke(p),ke(g)],skills:[yb(l,a,s.level),{name:"Lore",desc:s.lores.map(N=>`[[${N[0]}]] ${qi(Ui(l.int,Number(N[1]),s.level))}`).join(", ")}],speed:`${o.speed+o.speedBonus} feet`,spellcasting:fb(s),damage_vulnerabilities:"",damage_resistances:s.resistances.join(", "),damage_immunities:"",condition_immunities:"",senses:"",languages:s.languages.join(", "),cr:s.level,bestiary:!1,stats:null};e([S])}catch(n){console.error("Error importing Pathbuilder file",n),t(n)}},r.readAsText(i)})}function fb(i){let e=i.spellCasters.map(r=>r.spells.map(n=>n.list.length===0?{}:{name:`${r.name} ${n.spellLevel===0?"Cantrips":`Rank ${n.spellLevel} (${r.perDay[n.spellLevel]})`}`,desc:`[[${n.list.join("]], [[")}]]`})).flat();console.log("getSpells - spells",e);let t=db(i.focus,i.level);return console.log("getSpells - focusSpells",t),[e,t].flat()}function db(i,e){let t=[];return Object.keys(i).forEach(r=>{let n=i[r];Object.keys(n).forEach(s=>{let o=n[s],l=o.focusCantrips;(l==null?void 0:l.length)>0&&t.push({name:`${zr(r)} Focus Cantrips ${ke(o.abilityBonus+o.proficiency+e)}`,desc:`[[${l.join("]], [[")}]]`});let a=o.focusSpells;(a==null?void 0:a.length)>0&&t.push({name:`${zr(r)} Focus Spells ${ke(o.abilityBonus+o.proficiency+e)}`,desc:`[[${a.join("]], [[")}]]`})})}),t}function pb(i,e){let t=e.join(", ");return[{name:"HP",desc:`${i} ${t?`__Resistances__ (${t})`:""}`}]}function gb(i){return i.map(e=>{let t=e.damageBonus?ke(e.damageBonus):"",r="1";return e.str=="striking"?r="2":e.str=="greater striking"&&(r="3"),{name:e.name,desc:ls+`[[${e.name}|${e.display}]] ${ke(e.attack)} __Damage__ ${r}${e.die}${t} _(${e.damageType})_`}})}function mb(i){let e=ke(i);return[{name:"Perception",desc:`${e} (1d20${e});`}]}function yb(i,e,t){return{name:"Skills",desc:["acrobatics","arcana","athletics","crafting","deception","diplomacy","intimidation","medicine","nature","occultism","performance","religion","society","stealth","survival","thievery"].filter(o=>e[o]>0).map(o=>{let l=o,u=i[hb[o]],h=e[l],c=Ui(u,h,t);return`${zr(l)} ${ke(c)}`}).join(", ")}}function bb(i){let e=[{prefix:"Scroll of ",length:10},{prefix:"Potion of ",length:9},{prefix:"Wand of ",length:7}];function t(o){for(let{prefix:a,length:u}of e)if(o.startsWith(a))return`${a}[[${o.slice(u)}]]`;let l=o.match(/ \\+(\\d)$/);return l&&(o=o.slice(0,-3)+` (+${l[1]})`),`[[${o}]]`}function r(o){return o.map(([l,a])=>[t(l),a])}function n(o){return o.map(([l,a])=>`${a>1?`${a}x `:""}${l}`).join(", ")}let s=r(i);return{name:"Items",desc:n(s)}}function vb(i){return{name:"Armor",desc:i.map(e=>`${e.qty>1?String(e.qty)+"x ":""}[[${e.name}${e.display?"|"+e.display:""}]]`).join(", ")}}function Pc(i,e){return{name:i,desc:"[["+e.join("]], [[")+"]]"}}function ai(i){return Math.floor((i-10)/2)}function Ui(i,e,t){return ai(i)+e+t}var _c={0:{cr:"0",value:0,xp:0},"1/8":{cr:"1/8",value:.125,xp:25},"1/4":{cr:"1/4",value:.25,xp:50},"1/2":{cr:"1/2",value:.5,xp:100},"0.125":{cr:"1/8",value:.125,xp:25},"0.25":{cr:"1/4",value:.25,xp:50},"0.5":{cr:"1/2",value:.5,xp:100},1:{cr:"1",value:1,xp:200},2:{cr:"2",value:2,xp:450},3:{cr:"3",value:3,xp:700},4:{cr:"4",value:4,xp:1100},5:{cr:"5",value:5,xp:1800},6:{cr:"6",value:6,xp:2300},7:{cr:"7",value:7,xp:2900},8:{cr:"8",value:8,xp:3900},9:{cr:"9",value:9,xp:5e3},10:{cr:"10",value:10,xp:5900},11:{cr:"11",value:11,xp:7200},12:{cr:"12",value:12,xp:8400},13:{cr:"13",value:13,xp:1e4},14:{cr:"14",value:14,xp:11500},15:{cr:"15",value:15,xp:13e3},16:{cr:"16",value:16,xp:15e3},17:{cr:"17",value:17,xp:18e3},18:{cr:"18",value:18,xp:2e4},19:{cr:"19",value:19,xp:22e3},20:{cr:"20",value:20,xp:25e3},21:{cr:"21",value:21,xp:33e3},22:{cr:"22",value:22,xp:41e3},23:{cr:"23",value:23,xp:5e4},24:{cr:"24",value:24,xp:62e3},25:{cr:"25",value:25,xp:75e3},26:{cr:"26",value:26,xp:9e4},27:{cr:"27",value:27,xp:105e3},28:{cr:"28",value:28,xp:12e4},29:{cr:"29",value:29,xp:135e3},30:{cr:"30",value:30,xp:155e3}};function Ct(i){return Math.floor(((i!=null?i:10)-10)/2)}var Ic={tiny:4,small:6,medium:8,large:10,huge:12,gargantuan:20},wb={str:"strength",dex:"dexterity",con:"constitution",int:"intelligence",wis:"wisdom",cha:"charisma"},vl=class i{constructor(e){this.monster=e;this.proficiency=this.getProf(this.monster);this.stats={str:this.monster.strPoints,dex:this.monster.dexPoints,con:this.monster.conPoints,int:this.monster.intPoints,wis:this.monster.wisPoints,cha:this.monster.chaPoints};this.modifiers={str:Ct(this.stats.str),dex:Ct(this.stats.dex),con:Ct(this.stats.con),int:Ct(this.stats.int),wis:Ct(this.stats.wis),cha:Ct(this.stats.cha)}}static parse(e){var n,s,o,l,a,u,h,c,f,d,p,g,y,b,A,w;let t=new i(e);return{image:null,name:e.name,source:"TetraCube",type:e.type,subtype:e.tag,size:e.size,alignment:e.alignment,hp:(n=t.getHP(e))==null?void 0:n.hp,hit_dice:(s=t.getHP(e))==null?void 0:s.dice,ac:(a=(l=((o=e.ac)!=null?o:[])[0])==null?void 0:l.ac)!=null?a:"",speed:t.getSpeedString(e),stats:[e.strPoints,e.dexPoints,e.conPoints,e.intPoints,e.wisPoints,e.chaPoints],damage_immunities:t.parseImmune(e,"i"),damage_resistances:t.parseImmune(e,"r"),damage_vulnerabilities:t.parseImmune(e,"v"),condition_immunities:t.parseConditions(e),saves:t.getSaves(e),skillsaves:t.getSkills(e),senses:t.getSenses(e),languages:t.getLanguages(e),cr:(u=e.cr)!=null?u:"",traits:t.getTraits(e.abilities),actions:t.getTraits(e.actions),bonus_actions:t.getTraits(e.bonusActions),reactions:t.getTraits(e.reactions),legendary_description:(h=e.isLegendary)!=null&&h?e.legendariesDescription:null,legendary_actions:(c=e.isLegendary)!=null&&c?t.getTraits(e.legendaries):null,mythic_description:(f=e.isMythic)!=null&&f?e.mythicDescription:null,mythic_actions:(d=e.isMythic)!=null&&d?t.getTraits(e.mythics):null,lair_description:(p=e.isLair)!=null&&p?e.lairDescription:null,lair_actions:(g=e.isLair)!=null&&g?t.getTraits(e.lairs):null,lair_description_end:(y=e.isLair)!=null&&y?e.lairDescriptionEnd:null,regional_description:(b=e.isRegional)!=null&&b?e.regionalDescription:null,regional_actions:(A=e.isRegional)!=null&&A?t.getTraits(e.regionals):null,regional_description_end:(w=e.isRegional)!=null&&w?e.regionalDescriptionEnd:null,spells:t.getSpells(e.abilities)}}getHP(e){var t,r;if(e.customHP||e.hitDice&&/(\\d+) \\((.+)\\)/.test(e.hpText)){let[n,s,o]=(t=e.hpText.match(/(\\d+) \\((.+)\\)/))!=null?t:[];return{hp:s,dice:o}}if(e.hitDice){let n=Number(e.hitDice),s=(r=Ic[e.size])!=null?r:Ic.medium,o=this.modifiers.con,l=n*s/(2+.5)+o*n,a=o>0?"+":"-",u=o==0?"":` ${a} ${o*n}`;return{hp:l,dice:`${n}d${s}${u}`}}}getSpeedString(e){if(e.customSpeed)return e.speedDesc;let t=[e.speed+" ft."];return e.burrowSpeed>0&&t.push("burrow "+e.burrowSpeed+" ft."),e.climbSpeed>0&&t.push("climb "+e.climbSpeed+" ft."),e.flySpeed>0&&t.push("fly "+e.flySpeed+" ft."+(e.hover?" (hover)":"")),e.swimSpeed>0&&t.push("swim "+e.swimSpeed+" ft."),t.join(", ")}parseImmune(e,t){let r=[];"damagetypes"in e&&Array.isArray(e.damagetypes)&&r.push(...e.damagetypes.filter(s=>s.type==t).map(s=>s.name));let n=[];return"specialdamage"in e&&Array.isArray(e.specialdamage)&&n.push(...e.specialdamage.filter(s=>s.type==t).map(s=>s.name)),[r.join(", "),n.join(", ")].filter(s=>s&&s.length).join("; ")}getLanguages(e){let t=[],r=[],n=[];for(let s=0;s0&&t.push([r.slice(0,r.length-2).map(s=>s.name).join(", "),r.slice(-1).map(s=>s.name)].filter(s=>s).join(" and ")),n.length>0&&t.push([n.slice(0,n.length-2).map(s=>s.name).join(", "),n.slice(-1).map(s=>s.name)].filter(s=>s).join(" and ")),e.telepathy>0&&t.push("telepathy "+e.telepathy+" ft."),t.length==0&&t.push("—"),t.join("; ")}getSenses(e){let t=[];e.blindsight>0&&t.push("blindsight "+e.blindsight+" ft."+(e.blind?" (blind beyond this radius)":"")),e.darkvision>0&&t.push("darkvision "+e.darkvision+" ft."),e.tremorsense>0&&t.push("tremorsense "+e.tremorsense+" ft."),e.truesight>0&&t.push("truesight "+e.truesight+" ft.");let r=e.skills.find(s=>s.name=="perception"),n=10+Ct(e.wisPoints);return r!=null&&(n+=this.proficiency*("note"in r?2:1)),t.push("passive Perception "+n),t.join(", ")}transformString(e){return e.replace(/(_|\\*|\\s*>\\s*)/g,"").replace(/\\[MON(S)?\\]/g,`${this.monster.shortName&&this.monster.shortName.length?this.monster.shortName:this.monster.name}$1`).replace(/\\[(\\w+)\\]/g,(t,r)=>{if(r=r.toLowerCase(),!(r in this.modifiers))return t;let n=this.modifiers[r];return`${n>=0?"+":""}${n}`}).replace(/\\[(\\w+) (ATK|SAVE)\\s?(?:([+-])\\s?(\\d+))?\\]/g,(t,r,n="ATK",s="+",o=0)=>{if(r=r.toLowerCase(),!(r in this.modifiers))return t;o=s=="+"?Number(o):-Number(o);let l=(n=="ATK"?0:8)+this.modifiers[r]+this.proficiency+o;return`${l>=0?"+":""}${l}`}).replace(/\\[(\\w+)?\\s?(\\d*[dD]\\d+)\\s?(?:([+-])\\s?(\\d+))?\\]/g,(t,r,n,s="+",o=0)=>{var c;r=r.toLowerCase();let[,l=1,a]=(c=n.match(/(\\d*)[dD](\\d+)/))!=null?c:[];if(l||(l=1),!a)return t;o=s=="+"?Number(o):-Number(o),r in this.modifiers&&(o+=this.modifiers[r]);let u=Math.floor((a/2+.5)*l)+o,h=[`${l}d${a}`];return o&&o!=0&&(h.push(o>=0?"+":"-"),h.push(o)),`${u} (${h.join(" ")})`})}getTraits(e){return!e||!e.length?void 0:e.filter(r=>r.name!="Spellcasting").map(r=>({name:r.name,desc:this.transformString(r.desc)}))}getSpells(e){var n;if(!e.abilities||!e.abilities.length)return;let{desc:t}=(n=e.abilities.find(s=>s.name=="Spellcasting"))!=null?n:{};return t?this.transformString(t).trim().split(`\n`).filter(s=>s.length):void 0}getSaves(e){if(!("sthrows"in e)||!Array.isArray(e.sthrows)||!e.sthrows.length)return[];let t=this.proficiency,r=[];for(let n of e.sthrows){let s=n.name,o=Ct(Number(e[`${s}Points`]));isNaN(o)||r.push({[wb[s]]:o+t})}return r}getSkills(e){if(!("skills"in e)||!Array.isArray(e.skills)||!e.skills.length)return[];let t=[],r=this.proficiency;for(let n of e.skills){let s=n.stat,o=Ct(Number(e[`${s}Points`]));if(isNaN(o))continue;let l="note"in n;t.push({[n.name]:r+o+o*Number(l)})}return t}getProf(e){var r,n;let t=0;return e.cr=="*"&&(t=e.customProf),"cr"in e&&e.cr in _c&&(t=Math.max(Math.floor(2+(((n=(r=_c[e.cr])==null?void 0:r.value)!=null?n:0)-1)/4),2)),isNaN(Number(t))?0:Number(t)}parseConditions(e){if("conditions"in e&&Array.isArray(e.conditions))return e.conditions.map(t=>t.name).join(", ")}};async function Fc(i){return new Promise((e,t)=>{let r=new FileReader,n=[];r.onload=async s=>{try{let o=JSON.parse(s.target.result),l;"monster"in o?l=o.monster:Array.isArray(o)?l=o:typeof o=="object"?l=[o]:t("Invalid monster JSON provided.");let a=[];for(let u of l)try{let h=vl.parse(u);a.push(h)}catch(h){console.error(h);continue}e(a)}catch(o){console.error("reject!!!",o),t(o)}},r.readAsText(i)})}var wl=self;wl.onmessage=async i=>{if(!i.data)return;let{files:e,source:t}=i.data,r=[];for(let n of e)switch(t){case"5e":{let s=await ph(n);r.push(...s!=null?s:[]);break}case"critter":{let s=await gh(n);r.push(...s!=null?s:[]);break}case"improved":{let s=await Rc(n);r.push(...s!=null?s:[]);break}case"appfile":{let s=await Mc(n);r.push(...s!=null?s:[]);break}case"tetra":{let s=await Fc(n);r.push(...s!=null?s:[]);break}case"PF2eMonsterTool":{let s=await Oc(n);r.push(...s!=null?s:[]);break}case"pathbuilder":{let s=await Lc(n);r.push(...s!=null?s:[]);break}case"generic":{let s=await new Promise((o,l)=>{let a=new FileReader;a.onload=async u=>{try{let h=JSON.parse(u.target.result),c=[];if(Array.isArray(h))c=h;else if(typeof h=="object")if("name"in h)c=[h];else for(let d in h)Array.isArray(h[d])&&c.push(...h[d]);else l("Invalid monster JSON provided. Must be array or object.");let f=[];for(let d of c)"name"in d&&f.push(d);o(f)}catch(h){console.error("reject!!!",h),l(h)}},a.readAsText(n)});r.push(...s!=null?s:[])}default:console.error(`Unknown source: ${t}`)}wl.postMessage({monsters:r})};wl.addEventListener("unhandledrejection",function(i){throw i.reason});\n')}var Wi=require("obsidian");var wl=class extends _t{constructor(){super(...arguments);this.saved=!1}display(){this.titleEl.createSpan({text:"Set Sources"}),new Wi.Setting(this.contentEl).setName("A source could not be found for some imported monsters. Do you wish to manually add one?").addText(t=>{t.setPlaceholder("Unknown").onChange(i=>{this.source=i})}),this.buildButtons(this.contentEl)}buildButtons(t){new Wi.Setting(t).addButton(i=>i.setCta().setIcon("checkmark").setTooltip("Save").onClick(()=>{this.saved=!0,this.close()})).addExtraButton(i=>i.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.close()}))}onOpen(){this.display()}},ey=async n=>new Promise(e=>{let t=new wl(n);t.onClose=()=>{t.saved||e(null),e(t.source)},t.open()}),Sa=class{constructor(e){this.plugin=e;this.workers=new Map}async import(e,t){return new Promise(i=>{let a=new kl,s=Q();this.workers.set(s,a),a.onmessage=async r=>{let{monsters:o}=r.data??{monsters:[]};if(o){new Wi.Notice(`Successfully imported ${o.length} Monsters`);let l=o.filter(d=>d.source=="Unknown"||!d.source),c;l.length&&(c=await ey(this.plugin))&&l.forEach(d=>d.source=c)}a.terminate(),this.workers.delete(s),i(o)},a.onerror=r=>{new Wi.Notice(`There was an error importing the file. ${r.message}`),a.terminate(),this.workers.delete(s),i([])},a.postMessage({files:e,source:t})})}};var ty=[{type:"inline",id:Q(),properties:[],hasRule:!0,nested:[{type:"group",id:Q(),properties:["name","description","aspects","temporaryAspects"],nested:[{type:"heading",id:Q(),properties:["name"],conditioned:!0,size:1},{type:"text",id:Q(),properties:["description"],conditioned:!0,markdown:!0,text:null,dice:!1},{type:"text",id:Q(),properties:["aspects"],markdown:!0,text:null,dice:!1,conditioned:!0,heading:"Aspects"},{type:"text",id:Q(),properties:["temporaryAspects"],markdown:!0,text:null,dice:!1,conditioned:!0,heading:"Temporary Aspects"}],conditioned:!0},{type:"image",id:Q(),properties:["image"],conditioned:!0}]},{type:"table",id:Q(),properties:["stress"],headers:["Physical","Mental"],calculate:!1,hasRule:!0,conditioned:!0},{type:"traits",id:Q(),properties:["consequences"],conditioned:!0,heading:"Consequences"},{type:"traits",id:Q(),properties:["skills"],conditioned:!0,hasRule:!1,heading:"Skills"},{type:"traits",id:Q(),properties:["stunts"],markdown:!0,dice:!1,conditioned:!0,heading:"Stunts"},{type:"traits",id:Q(),properties:["items"],heading:"Items",conditioned:!0,markdown:!0,dice:!1},{type:"traits",id:Q(),properties:["extras"],heading:"Extras",conditioned:!0,markdown:!0,dice:!1}],Mh={blocks:ty,id:"basic-fate-core-layout",name:"Basic Fate Core Layout",edited:!1};var Ih={blocks:[{type:"inline",id:"e9b8483aeafa",properties:[],nested:[{type:"property",id:"2b596a6919fb",properties:["name"],fallback:"-",markdown:!0,dice:!1,conditioned:!0,display:" "},{type:"property",id:"98389a48f808",properties:["level"],fallback:"-",display:" ",conditioned:!0,markdown:!0,dice:!1}],hasRule:!0},{type:"group",id:"4b3a6809a938",properties:[],nested:[{type:"inline",id:"289a4b787968",properties:[],nested:[{type:"property",id:"694a3888b859",properties:["rare_01"],fallback:"-",conditioned:!0,markdown:!0},{type:"property",id:"590a88988ae8",properties:["rare_02"],fallback:"-",conditioned:!0,markdown:!0},{type:"property",id:"9a9be808699a",properties:["rare_03"],fallback:"-",conditioned:!0,markdown:!0},{type:"property",id:"2988db1a685a",properties:["rare_04"],fallback:"-",conditioned:!0,markdown:!0},{type:"property",id:"ba891ba8cbeb",properties:["alignment"],fallback:" ",display:" ",conditioned:!0,markdown:!0},{type:"property",id:"ebf9883938a8",properties:["size"],fallback:" ",display:" ",conditioned:!0,markdown:!0},{type:"property",id:"dabaf9e9fb68",properties:["trait_01"],fallback:" ",display:" ",conditioned:!0,markdown:!0},{type:"property",id:"e81a6aeadbf9",properties:["trait_02"],fallback:" ",display:" ",conditioned:!0,markdown:!0},{type:"property",id:"fa7919caabbb",properties:["trait_03"],fallback:"-",conditioned:!0,display:" ",markdown:!0},{type:"property",id:"58c9c8580b68",properties:["trait_04"],fallback:"-",conditioned:!0,display:" ",markdown:!0},{type:"property",id:"da894a7b8849",properties:["trait_05"],fallback:"-",display:" ",conditioned:!0,markdown:!0},{type:"property",id:"fb6b4b6bab49",properties:["trait_06"],fallback:"-",display:" ",conditioned:!0,markdown:!0},{type:"property",id:"480a5bfafb88",properties:["trait_07"],fallback:"-",display:" ",conditioned:!0,markdown:!0}],hasRule:!0,conditioned:!0}]},{type:"group",id:"5999ea79ca3b",properties:[],nested:[{type:"traits",id:"9a9af9fbe959",properties:["perception"],fallback:"-",heading:" ",conditioned:!0,dice:!0,markdown:!0,headingProp:!0},{type:"property",id:"ba28f9384918",properties:["languages"],fallback:"-",display:"Language",conditioned:!0,markdown:!0},{type:"traits",id:"a8f8187b89fb",properties:["skills"],fallback:"-",markdown:!0,dice:!0,conditioned:!0,heading:" "},{type:"table",id:"b82b0a1a9969",properties:["abilityMods"],headers:["Str","Dex","Con","Int","Wis","Cha"],calculate:!1,fallback:"-",conditioned:!0,dice:!0},{type:"traits",id:"e96ba9d8a80a",properties:["abilities_top"],fallback:"-",conditioned:!0,dice:!0,markdown:!0,heading:" ",hasRule:!1}],hasRule:!0},{type:"group",id:"faaa08993a98",properties:[],nested:[{type:"traits",id:"68ca69891bea",properties:["armorclass"],fallback:"-",heading:"",conditioned:!0,dice:!0,markdown:!0},{type:"traits",id:"9b1998e9a8da",properties:["health"],fallback:"-",heading:"",conditioned:!0,dice:!0,markdown:!0},{type:"traits",id:"ca2bf968987b",properties:["abilities_mid"],fallback:"-",heading:"",conditioned:!0,dice:!0,markdown:!0,hasRule:!1}],hasRule:!0},{type:"group",id:"cbeabaf93b58",properties:[],nested:[{type:"property",id:"0b4809ba0b29",properties:["speed"],fallback:"-",display:"Speed",conditioned:!0,markdown:!0,dice:!1},{type:"traits",id:"882bc9aa0898",properties:["attacks"],fallback:"-",conditioned:!0,dice:!0,markdown:!0,headingProp:!1,heading:""},{type:"traits",id:"6919b8996939",properties:["spellcasting"],fallback:"-",heading:" ",markdown:!0,dice:!0,conditioned:!0},{type:"traits",id:"aacb399a3b58",properties:["abilities_bot"],fallback:"-",conditioned:!0,dice:!0,markdown:!0,hasRule:!1}],hasRule:!0},{type:"text",id:"1b195a894b58",properties:["token"],text:null,fallback:"",heading:"Show to Players",conditioned:!0,markdown:!0},{type:"image",id:"1bba89582b29",properties:["token"],fallback:"",conditioned:!0,hasRule:!0},{type:"property",id:"88e97a485b79",properties:["sourcebook"],fallback:"-",conditioned:!0,markdown:!0,dice:!1,display:" Source:"}],name:"Basic Pathfinder 2e Layout",id:"path-2e-block",version:2,diceParsing:[{regex:/\((\d+d\d+(?:\s*[+-]\s*\d+)?)\)/.source,parser:`const [, text] = matches; return ["(", { text }, ")"];`,id:Q(),desc:"(1d8+3)"},{regex:/(\w+?) ([+-])(\d+)/.source,parser:`let [, initial, sign, number] = matches; diff --git a/.obsidian/plugins/obsidian-5e-statblocks/manifest.json b/.obsidian/plugins/obsidian-5e-statblocks/manifest.json index 8044111..b6b7a59 100644 --- a/.obsidian/plugins/obsidian-5e-statblocks/manifest.json +++ b/.obsidian/plugins/obsidian-5e-statblocks/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-5e-statblocks", "name": "Fantasy Statblocks", - "version": "4.10.0", + "version": "4.10.1", "description": "Create Fantasy Statblocks in Obsidian.md", "minAppVersion": "0.12.0", "author": "Jeremy Valentine", diff --git a/.obsidian/plugins/obsidian-git/main.js b/.obsidian/plugins/obsidian-git/main.js index c8eb0a7..9c7042d 100644 --- a/.obsidian/plugins/obsidian-git/main.js +++ b/.obsidian/plugins/obsidian-git/main.js @@ -3,105 +3,108 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git) */ -var qP=Object.create;var Fo=Object.defineProperty;var YP=Object.getOwnPropertyDescriptor;var XP=Object.getOwnPropertyNames;var ZP=Object.getPrototypeOf,KP=Object.prototype.hasOwnProperty;var Uv=e=>{throw TypeError(e)};var JP=(e,t,r)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var QP=(e,t)=>()=>(e&&(t=e(e=0)),t);var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),eR=(e,t)=>{for(var r in t)Fo(e,r,{get:t[r],enumerable:!0})},Gv=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of XP(t))!KP.call(e,i)&&i!==r&&Fo(e,i,{get:()=>t[i],enumerable:!(n=YP(t,i))||n.enumerable});return e};var Ve=(e,t,r)=>(r=e!=null?qP(ZP(e)):{},Gv(t||!e||!e.__esModule?Fo(r,"default",{value:e,enumerable:!0}):r,e)),tR=e=>Gv(Fo({},"__esModule",{value:!0}),e);var Pr=(e,t,r)=>JP(e,typeof t!="symbol"?t+"":t,r),zv=(e,t,r)=>t.has(e)||Uv("Cannot "+r);var Ht=(e,t,r)=>(zv(e,t,"read from private field"),r?r.call(e):t.get(e)),Cc=(e,t,r)=>t.has(e)?Uv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Pc=(e,t,r,n)=>(zv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var qv=F(Rc=>{"use strict";g();Rc.byteLength=nR;Rc.toByteArray=aR;Rc.fromByteArray=lR;var hn=[],Rr=[],rR=typeof Uint8Array!="undefined"?Uint8Array:Array,eh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ki=0,Vv=eh.length;Ki0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function nR(e){var t=Wv(e),r=t[0],n=t[1];return(r+n)*3/4-n}function iR(e,t,r){return(t+r)*3/4-r}function aR(e){var t,r=Wv(e),n=r[0],i=r[1],a=new rR(iR(e,n,i)),s=0,o=i>0?n-4:n,l;for(l=0;l>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=Rr[e.charCodeAt(l)]<<2|Rr[e.charCodeAt(l+1)]>>4,a[s++]=t&255),i===1&&(t=Rr[e.charCodeAt(l)]<<10|Rr[e.charCodeAt(l+1)]<<4|Rr[e.charCodeAt(l+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function sR(e){return hn[e>>18&63]+hn[e>>12&63]+hn[e>>6&63]+hn[e&63]}function oR(e,t,r){for(var n,i=[],a=t;ao?o:s+a));return n===1?(t=e[r-1],i.push(hn[t>>2]+hn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(hn[t>>10]+hn[t>>4&63]+hn[t<<2&63]+"=")),i.join("")}});var Yv=F(th=>{g();th.read=function(e,t,r,n,i){var a,s,o=i*8-n-1,l=(1<>1,u=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-u)-1,h>>=-u,u+=o;u>0;a=a*256+e[t+f],f+=d,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=s*256+e[t+f],f+=d,u-=8);if(a===0)a=1-c;else{if(a===l)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-c}return(h?-1:1)*s*Math.pow(2,a-n)};th.write=function(e,t,r,n,i,a){var s,o,l,c=a*8-i-1,u=(1<>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?t+=d/l:t+=d*Math.pow(2,1-f),t*l>=2&&(s++,l/=2),s+f>=u?(o=0,s=u):s+f>=1?(o=(t*l-1)*Math.pow(2,i),s=s+f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=o&255,h+=p,o/=256,i-=8);for(s=s<0;e[r+h]=s&255,h+=p,s/=256,c-=8);e[r+h-p]|=m*128}});var uh=F(Qa=>{"use strict";g();var rh=qv(),Ka=Yv(),Xv=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Qa.Buffer=M;Qa.SlowBuffer=pR;Qa.INSPECT_MAX_BYTES=50;var Mc=2147483647;Qa.kMaxLength=Mc;M.TYPED_ARRAY_SUPPORT=cR();!M.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function cR(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(M.prototype,"parent",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.buffer}});Object.defineProperty(M.prototype,"offset",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.byteOffset}});function Nn(e){if(e>Mc)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,M.prototype),t}function M(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return sh(e)}return Qv(e,t,r)}M.poolSize=8192;function Qv(e,t,r){if(typeof e=="string")return fR(e,t);if(ArrayBuffer.isView(e))return dR(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(pn(e,ArrayBuffer)||e&&pn(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(pn(e,SharedArrayBuffer)||e&&pn(e.buffer,SharedArrayBuffer)))return ih(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return M.from(n,t,r);let i=hR(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return M.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}M.from=function(e,t,r){return Qv(e,t,r)};Object.setPrototypeOf(M.prototype,Uint8Array.prototype);Object.setPrototypeOf(M,Uint8Array);function e1(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function uR(e,t,r){return e1(e),e<=0?Nn(e):t!==void 0?typeof r=="string"?Nn(e).fill(t,r):Nn(e).fill(t):Nn(e)}M.alloc=function(e,t,r){return uR(e,t,r)};function sh(e){return e1(e),Nn(e<0?0:oh(e)|0)}M.allocUnsafe=function(e){return sh(e)};M.allocUnsafeSlow=function(e){return sh(e)};function fR(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!M.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=t1(e,t)|0,n=Nn(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function nh(e){let t=e.length<0?0:oh(e.length)|0,r=Nn(t);for(let n=0;n=Mc)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Mc.toString(16)+" bytes");return e|0}function pR(e){return+e!=e&&(e=0),M.alloc(+e)}M.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==M.prototype};M.compare=function(t,r){if(pn(t,Uint8Array)&&(t=M.from(t,t.offset,t.byteLength)),pn(r,Uint8Array)&&(r=M.from(r,r.offset,r.byteLength)),!M.isBuffer(t)||!M.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,s=Math.min(n,i);ai.length?(M.isBuffer(s)||(s=M.from(s)),s.copy(i,a)):Uint8Array.prototype.set.call(i,s,a);else if(M.isBuffer(s))s.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=s.length}return i};function t1(e,t){if(M.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||pn(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ah(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return u1(e).length;default:if(i)return n?-1:ah(e).length;t=(""+t).toLowerCase(),i=!0}}M.byteLength=t1;function mR(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return AR(this,t,r);case"utf8":case"utf-8":return n1(this,t,r);case"ascii":return SR(this,t,r);case"latin1":case"binary":return ER(this,t,r);case"base64":return _R(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kR(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}M.prototype._isBuffer=!0;function Ji(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}M.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};Xv&&(M.prototype[Xv]=M.prototype.inspect);M.prototype.compare=function(t,r,n,i,a){if(pn(t,Uint8Array)&&(t=M.from(t,t.offset,t.byteLength)),!M.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let s=a-i,o=n-r,l=Math.min(s,o),c=this.slice(i,a),u=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ch(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=M.from(t,n)),M.isBuffer(t))return t.length===0?-1:Zv(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Zv(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Zv(e,t,r,n,i){let a=1,s=e.length,o=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,s/=2,o/=2,r/=2}function l(u,f){return a===1?u[f]:u.readUInt16BE(f*a)}let c;if(i){let u=-1;for(c=r;cs&&(r=s-o),c=r;c>=0;c--){let u=!0;for(let f=0;fi&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let s;for(s=0;s>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return gR(this,t,r,n);case"utf8":case"utf-8":return vR(this,t,r,n);case"ascii":case"latin1":case"binary":return yR(this,t,r,n);case"base64":return wR(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bR(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _R(e,t,r){return t===0&&r===e.length?rh.fromByteArray(e):rh.fromByteArray(e.slice(t,r))}function n1(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:a>223?3:a>191?2:1;if(i+o<=r){let l,c,u,f;switch(o){case 1:a<128&&(s=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(s=f));break;case 3:l=e[i+1],c=e[i+2],(l&192)===128&&(c&192)===128&&(f=(a&15)<<12|(l&63)<<6|c&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],(l&192)===128&&(c&192)===128&&(u&192)===128&&(f=(a&15)<<18|(l&63)<<12|(c&63)<<6|u&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=o}return xR(n)}var Kv=4096;function xR(e){let t=e.length;if(t<=Kv)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUintLE=M.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||_t(t,r,this.length);let i=this[t],a=1,s=0;for(;++s>>0,r=r>>>0,n||_t(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};M.prototype.readUint8=M.prototype.readUInt8=function(t,r){return t=t>>>0,r||_t(t,1,this.length),this[t]};M.prototype.readUint16LE=M.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||_t(t,2,this.length),this[t]|this[t+1]<<8};M.prototype.readUint16BE=M.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||_t(t,2,this.length),this[t]<<8|this[t+1]};M.prototype.readUint32LE=M.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};M.prototype.readUint32BE=M.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};M.prototype.readBigUInt64LE=fi(function(t){t=t>>>0,Ja(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$o(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<>>0,Ja(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$o(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||_t(t,r,this.length);let i=this[t],a=1,s=0;for(;++s=a&&(i-=Math.pow(2,8*r)),i};M.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||_t(t,r,this.length);let i=r,a=1,s=this[t+--i];for(;i>0&&(a*=256);)s+=this[t+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};M.prototype.readInt8=function(t,r){return t=t>>>0,r||_t(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};M.prototype.readInt16LE=function(t,r){t=t>>>0,r||_t(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};M.prototype.readInt16BE=function(t,r){t=t>>>0,r||_t(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};M.prototype.readInt32LE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};M.prototype.readInt32BE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};M.prototype.readBigInt64LE=fi(function(t){t=t>>>0,Ja(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$o(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<>>0,Ja(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$o(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||_t(t,4,this.length),Ka.read(this,t,!0,23,4)};M.prototype.readFloatBE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),Ka.read(this,t,!1,23,4)};M.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||_t(t,8,this.length),Ka.read(this,t,!0,52,8)};M.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||_t(t,8,this.length),Ka.read(this,t,!1,52,8)};function Jt(e,t,r,n,i,a){if(!M.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}M.prototype.writeUintLE=M.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;Jt(this,t,r,n,o,0)}let a=1,s=0;for(this[r]=t&255;++s>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;Jt(this,t,r,n,o,0)}let a=n-1,s=1;for(this[r+a]=t&255;--a>=0&&(s*=256);)this[r+a]=t/s&255;return r+n};M.prototype.writeUint8=M.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,1,255,0),this[r]=t&255,r+1};M.prototype.writeUint16LE=M.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};M.prototype.writeUint16BE=M.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};M.prototype.writeUint32LE=M.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};M.prototype.writeUint32BE=M.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function i1(e,t,r,n,i){c1(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function a1(e,t,r,n,i){c1(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}M.prototype.writeBigUInt64LE=fi(function(t,r=0){return i1(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeBigUInt64BE=fi(function(t,r=0){return a1(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Jt(this,t,r,n,l-1,-l)}let a=0,s=1,o=0;for(this[r]=t&255;++a>0)-o&255;return r+n};M.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Jt(this,t,r,n,l-1,-l)}let a=n-1,s=1,o=0;for(this[r+a]=t&255;--a>=0&&(s*=256);)t<0&&o===0&&this[r+a+1]!==0&&(o=1),this[r+a]=(t/s>>0)-o&255;return r+n};M.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};M.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};M.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};M.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};M.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};M.prototype.writeBigInt64LE=fi(function(t,r=0){return i1(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});M.prototype.writeBigInt64BE=fi(function(t,r=0){return a1(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function s1(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function o1(e,t,r,n,i){return t=+t,r=r>>>0,i||s1(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ka.write(e,t,r,n,23,4),r+4}M.prototype.writeFloatLE=function(t,r,n){return o1(this,t,r,!0,n)};M.prototype.writeFloatBE=function(t,r,n){return o1(this,t,r,!1,n)};function l1(e,t,r,n,i){return t=+t,r=r>>>0,i||s1(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ka.write(e,t,r,n,52,8),r+8}M.prototype.writeDoubleLE=function(t,r,n){return l1(this,t,r,!0,n)};M.prototype.writeDoubleBE=function(t,r,n){return l1(this,t,r,!1,n)};M.prototype.copy=function(t,r,n,i){if(!M.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?i=Jv(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Jv(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Jv(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function TR(e,t,r){Ja(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&$o(t,e.length-(r+1))}function c1(e,t,r,n,i,a){if(e>r||e3?t===0||t===BigInt(0)?o=`>= 0${s} and < 2${s} ** ${(a+1)*8}${s}`:o=`>= -(2${s} ** ${(a+1)*8-1}${s}) and < 2 ** ${(a+1)*8-1}${s}`:o=`>= ${t}${s} and <= ${r}${s}`,new Za.ERR_OUT_OF_RANGE("value",o,e)}TR(n,i,a)}function Ja(e,t){if(typeof e!="number")throw new Za.ERR_INVALID_ARG_TYPE(t,"number",e)}function $o(e,t,r){throw Math.floor(e)!==e?(Ja(e,r),new Za.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Za.ERR_BUFFER_OUT_OF_BOUNDS:new Za.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var CR=/[^+/0-9A-Za-z-_]/g;function PR(e){if(e=e.split("=")[0],e=e.trim().replace(CR,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function ah(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function RR(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function u1(e){return rh.toByteArray(PR(e))}function Oc(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function pn(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ch(e){return e!==e}var OR=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function fi(e){return typeof BigInt=="undefined"?IR:e}function IR(){throw new Error("BigInt not supported")}});var f1,fh,Buffer,g=QP(()=>{f1=require("obsidian");f1.Platform.isMobileApp?fh=uh().Buffer:fh=global.Buffer;Buffer=fh});var h1=F((QH,d1)=>{"use strict";g();var dr=function(e){if(e=e||{},this.Promise=e.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=e.domainReentrant||!1,this.domainReentrant){if(typeof process=="undefined"||typeof process.domain=="undefined")throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=e.timeout||dr.DEFAULT_TIMEOUT,this.maxOccupationTime=e.maxOccupationTime||dr.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=e.maxExecutionTime||dr.DEFAULT_MAX_EXECUTION_TIME,e.maxPending===1/0||Number.isInteger(e.maxPending)&&e.maxPending>=0?this.maxPending=e.maxPending:this.maxPending=dr.DEFAULT_MAX_PENDING};dr.DEFAULT_TIMEOUT=0;dr.DEFAULT_MAX_OCCUPATION_TIME=0;dr.DEFAULT_MAX_EXECUTION_TIME=0;dr.DEFAULT_MAX_PENDING=1e3;dr.prototype.acquire=function(e,t,r,n){if(Array.isArray(e))return this._acquireBatch(e,t,r,n);if(typeof t!="function")throw new Error("You must pass a function to execute");var i=null,a=null,s=null;typeof r!="function"&&(n=r,r=null,s=new this.Promise(function(b,x){i=b,a=x})),n=n||{};var o=!1,l=null,c=null,u=null,f=this,d=function(b,x,E){c&&(clearTimeout(c),c=null),u&&(clearTimeout(u),u=null),b&&(f.queues[e]&&f.queues[e].length===0&&delete f.queues[e],f.domainReentrant&&delete f.domains[e]),o||(s?x?a(x):i(E):typeof r=="function"&&r(x,E),o=!0),b&&f.queues[e]&&f.queues[e].length>0&&f.queues[e].shift()()},h=function(b){if(o)return d(b);l&&(clearTimeout(l),l=null),f.domainReentrant&&b&&(f.domains[e]=process.domain);var x=n.maxExecutionTime||f.maxExecutionTime;if(x&&(u=setTimeout(function(){f.queues[e]&&d(b,new Error("Maximum execution time is exceeded "+e))},x)),t.length===1){var E=!1;try{t(function(_,k){E||(E=!0,d(b,_,k))})}catch(_){E||(E=!0,d(b,_))}}else f._promiseTry(function(){return t()}).then(function(_){d(b,void 0,_)},function(_){d(b,_)})};f.domainReentrant&&process.domain&&(h=process.domain.bind(h));var p=n.maxPending||f.maxPending;if(!f.queues[e])f.queues[e]=[],h(!0);else if(f.domainReentrant&&process.domain&&process.domain===f.domains[e])h(!1);else if(f.queues[e].length>=p)d(!1,new Error("Too many pending tasks in queue "+e));else{var m=function(){h(!0)};n.skipQueue?f.queues[e].unshift(m):f.queues[e].push(m);var v=n.timeout||f.timeout;v&&(l=setTimeout(function(){l=null,d(!1,new Error("async-lock timed out in queue "+e))},v))}var y=n.maxOccupationTime||f.maxOccupationTime;if(y&&(c=setTimeout(function(){f.queues[e]&&d(!1,new Error("Maximum occupation time is exceeded in queue "+e))},y)),s)return s};dr.prototype._acquireBatch=function(e,t,r,n){typeof r!="function"&&(n=r,r=null);var i=this,a=function(o,l){return function(c){i.acquire(o,l,c,n)}},s=e.reduceRight(function(o,l){return a(l,o)},t);if(typeof r=="function")s(r);else return new this.Promise(function(o,l){s.length===1?s(function(c,u){c?l(c):o(u)}):o(s())})};dr.prototype.isBusy=function(e){return e?!!this.queues[e]:Object.keys(this.queues).length>0};dr.prototype._promiseTry=function(e){try{return this.Promise.resolve(e())}catch(t){return this.Promise.reject(t)}};d1.exports=dr});var m1=F((tU,p1)=>{"use strict";g();p1.exports=h1()});var g1=F((nU,dh)=>{g();typeof Object.create=="function"?dh.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:dh.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var ph=F((hh,y1)=>{g();var Ic=uh(),mn=Ic.Buffer;function v1(e,t){for(var r in e)t[r]=e[r]}mn.from&&mn.alloc&&mn.allocUnsafe&&mn.allocUnsafeSlow?y1.exports=Ic:(v1(Ic,hh),hh.Buffer=Qi);function Qi(e,t,r){return mn(e,t,r)}Qi.prototype=Object.create(mn.prototype);v1(mn,Qi);Qi.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return mn(e,t,r)};Qi.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=mn(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};Qi.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return mn(e)};Qi.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ic.SlowBuffer(e)}});var _1=F((sU,b1)=>{g();var w1=ph().Buffer;function Fc(e,t){this._block=w1.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Fc.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=w1.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a};Fc.prototype._update=function(){throw new Error("_update must be implemented by subclass")};b1.exports=Fc});var E1=F((lU,S1)=>{g();var FR=g1(),x1=_1(),$R=ph().Buffer,LR=[1518500249,1859775393,-1894007588,-899497514],DR=new Array(80);function Lo(){this.init(),this._w=DR,x1.call(this,64,56)}FR(Lo,x1);Lo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function NR(e){return e<<1|e>>>31}function BR(e){return e<<5|e>>>27}function jR(e){return e<<30|e>>>2}function HR(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Lo.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,s=this._e|0,o=0;o<16;++o)t[o]=e.readInt32BE(o*4);for(;o<80;++o)t[o]=NR(t[o-3]^t[o-8]^t[o-14]^t[o-16]);for(var l=0;l<80;++l){var c=~~(l/20),u=BR(r)+HR(c,n,i,a)+s+t[l]+LR[c]|0;s=a,a=i,i=jR(n),n=r,r=u}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0};Lo.prototype._hash=function(){var e=$R.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};S1.exports=Lo});var k1=F(mh=>{g();var A1;(function(e){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof mh=="object"?e(mh):typeof define=="function"&&define.amd?define(function(){var t={};return e(t),t}):e(A1={}):e(A1={})})(function(e){e.version="1.2.2";function t(){for(var w=0,A=new Array(256),S=0;S!=256;++S)w=S,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,A[S]=w;return typeof Int32Array!="undefined"?new Int32Array(A):A}var r=t();function n(w){var A=0,S=0,T=0,P=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(T=0;T!=256;++T)P[T]=w[T];for(T=0;T!=256;++T)for(S=w[T],A=256+T;A<4096;A+=256)S=P[A]=S>>>8^w[S&255];var I=[];for(T=1;T!=16;++T)I[T-1]=typeof Int32Array!="undefined"?P.subarray(T*256,T*256+256):P.slice(T*256,T*256+256);return I}var i=n(r),a=i[0],s=i[1],o=i[2],l=i[3],c=i[4],u=i[5],f=i[6],d=i[7],h=i[8],p=i[9],m=i[10],v=i[11],y=i[12],b=i[13],x=i[14];function E(w,A){for(var S=A^-1,T=0,P=w.length;T>>8^r[(S^w.charCodeAt(T++))&255];return~S}function _(w,A){for(var S=A^-1,T=w.length-15,P=0;P>8&255]^y[w[P++]^S>>16&255]^v[w[P++]^S>>>24]^m[w[P++]]^p[w[P++]]^h[w[P++]]^d[w[P++]]^f[w[P++]]^u[w[P++]]^c[w[P++]]^l[w[P++]]^o[w[P++]]^s[w[P++]]^a[w[P++]]^r[w[P++]];for(T+=15;P>>8^r[(S^w[P++])&255];return~S}function k(w,A){for(var S=A^-1,T=0,P=w.length,I=0,N=0;T>>8^r[(S^I)&255]:I<2048?(S=S>>>8^r[(S^(192|I>>6&31))&255],S=S>>>8^r[(S^(128|I&63))&255]):I>=55296&&I<57344?(I=(I&1023)+64,N=w.charCodeAt(T++)&1023,S=S>>>8^r[(S^(240|I>>8&7))&255],S=S>>>8^r[(S^(128|I>>2&63))&255],S=S>>>8^r[(S^(128|N>>6&15|(I&3)<<4))&255],S=S>>>8^r[(S^(128|N&63))&255]):(S=S>>>8^r[(S^(224|I>>12&15))&255],S=S>>>8^r[(S^(128|I>>6&63))&255],S=S>>>8^r[(S^(128|I&63))&255]);return~S}e.table=r,e.bstr=E,e.buf=_,e.str=k})});var Bn=F(Ut=>{"use strict";g();var UR=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function GR(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Ut.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)GR(r,n)&&(e[n]=r[n])}}return e};Ut.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var zR={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var a=0;a{"use strict";g();var WR=Bn(),qR=4,T1=0,C1=1,YR=2;function ts(e){for(var t=e.length;--t>=0;)e[t]=0}var XR=0,F1=1,ZR=2,KR=3,JR=258,xh=29,Uo=256,No=Uo+1+xh,es=30,Sh=19,$1=2*No+1,ea=15,gh=16,QR=7,Eh=256,L1=16,D1=17,N1=18,bh=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],e5=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B1=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],t5=512,jn=new Array((No+2)*2);ts(jn);var Do=new Array(es*2);ts(Do);var Bo=new Array(t5);ts(Bo);var jo=new Array(JR-KR+1);ts(jo);var Ah=new Array(xh);ts(Ah);var Lc=new Array(es);ts(Lc);function vh(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var j1,H1,U1;function yh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function G1(e){return e<256?Bo[e]:Bo[256+(e>>>7)]}function Ho(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Qt(e,t,r){e.bi_valid>gh-r?(e.bi_buf|=t<>gh-e.bi_valid,e.bi_valid+=r-gh):(e.bi_buf|=t<>>=1,r<<=1;while(--t>0);return r>>>1}function r5(e){e.bi_valid===16?(Ho(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function n5(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,l=t.stat_desc.max_length,c,u,f,d,h,p,m=0;for(d=0;d<=ea;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<$1;c++)u=e.heap[c],d=r[r[u*2+1]*2+1]+1,d>l&&(d=l,m++),r[u*2+1]=d,!(u>n)&&(e.bl_count[d]++,h=0,u>=o&&(h=s[u-o]),p=r[u*2],e.opt_len+=p*(d+h),a&&(e.static_len+=p*(i[u*2+1]+h)));if(m!==0){do{for(d=l-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(d=l;d!==0;d--)for(u=e.bl_count[d];u!==0;)f=e.heap[--c],!(f>n)&&(r[f*2+1]!==d&&(e.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),u--)}}function V1(e,t,r){var n=new Array(ea+1),i=0,a,s;for(a=1;a<=ea;a++)n[a]=i=i+r[a-1]<<1;for(s=0;s<=t;s++){var o=e[s*2+1];o!==0&&(e[s*2]=z1(n[o]++,o))}}function i5(){var e,t,r,n,i,a=new Array(ea+1);for(r=0,n=0;n>=7;n8?Ho(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function a5(e,t,r,n){q1(e),n&&(Ho(e,r),Ho(e,~r)),WR.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function P1(e,t,r,n){var i=t*2,a=r*2;return e[i]>1;s>=1;s--)wh(e,r,s);c=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],wh(e,r,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,r[c*2]=r[s*2]+r[o*2],e.depth[c]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,r[s*2+1]=r[o*2+1]=c,e.heap[1]=c++,wh(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],n5(e,t),V1(r,l,e.bl_count)}function M1(e,t,r){var n,i=-1,a,s=t[0*2+1],o=0,l=7,c=4;for(s===0&&(l=138,c=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=s,s=t[(n+1)*2+1],!(++o=3&&e.bl_tree[B1[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function o5(e,t,r,n){var i;for(Qt(e,t-257,5),Qt(e,r-1,5),Qt(e,n-4,4),i=0;i>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return T1;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return C1;for(r=32;r0?(e.strm.data_type===YR&&(e.strm.data_type=l5(e)),_h(e,e.l_desc),_h(e,e.d_desc),s=s5(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&t!==-1?Y1(e,t,r,n):e.strategy===qR||a===i?(Qt(e,(F1<<1)+(n?1:0),3),R1(e,jn,Do)):(Qt(e,(ZR<<1)+(n?1:0),3),o5(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),R1(e,e.dyn_ltree,e.dyn_dtree)),W1(e),n&&q1(e)}function d5(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(jo[r]+Uo+1)*2]++,e.dyn_dtree[G1(t)*2]++),e.last_lit===e.lit_bufsize-1}rs._tr_init=c5;rs._tr_stored_block=Y1;rs._tr_flush_block=f5;rs._tr_tally=d5;rs._tr_align=u5});var kh=F((gU,Z1)=>{"use strict";g();function h5(e,t,r,n){for(var i=e&65535|0,a=e>>>16&65535|0,s=0;r!==0;){s=r>2e3?2e3:r,r-=s;do i=i+t[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}Z1.exports=h5});var Th=F((yU,K1)=>{"use strict";g();function p5(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var m5=p5();function g5(e,t,r,n){var i=m5,a=n+r;e^=-1;for(var s=n;s>>8^i[(e^t[s])&255];return e^-1}K1.exports=g5});var Dc=F((bU,J1)=>{"use strict";g();J1.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var oy=F(wn=>{"use strict";g();var Gt=Bn(),Mr=X1(),ry=kh(),di=Th(),v5=Dc(),ia=0,y5=1,w5=3,vi=4,Q1=5,yn=0,ey=1,Or=-2,b5=-3,Ch=-5,_5=-1,x5=1,Nc=2,S5=3,E5=4,A5=0,k5=2,Uc=8,T5=9,C5=15,P5=8,R5=29,M5=256,Rh=M5+1+R5,O5=30,I5=19,F5=2*Rh+1,$5=15,_e=3,mi=258,Kr=mi+_e+1,L5=32,Gc=42,Mh=69,Bc=73,jc=91,Hc=103,ta=113,zo=666,vt=1,Vo=2,ra=3,as=4,D5=3;function gi(e,t){return e.msg=v5[t],t}function ty(e){return(e<<1)-(e>4?9:0)}function pi(e){for(var t=e.length;--t>=0;)e[t]=0}function hi(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Gt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function At(e,t){Mr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,hi(e.strm)}function Te(e,t){e.pending_buf[e.pending++]=t}function Go(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function N5(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,Gt.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=ry(e.adler,t,i,r):e.state.wrap===2&&(e.adler=di(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function ny(e,t){var r=e.max_chain_length,n=e.strstart,i,a,s=e.prev_length,o=e.nice_match,l=e.strstart>e.w_size-Kr?e.strstart-(e.w_size-Kr):0,c=e.window,u=e.w_mask,f=e.prev,d=e.strstart+mi,h=c[n+s-1],p=c[n+s];e.prev_length>=e.good_match&&(r>>=2),o>e.lookahead&&(o=e.lookahead);do if(i=t,!(c[i+s]!==p||c[i+s-1]!==h||c[i]!==c[n]||c[++i]!==c[n+1])){n+=2,i++;do;while(c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&ns){if(e.match_start=t,s=a,a>=o)break;h=c[n+s-1],p=c[n+s]}}while((t=f[t&u])>l&&--r!==0);return s<=e.lookahead?s:e.lookahead}function na(e){var t=e.w_size,r,n,i,a,s;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Kr)){Gt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=N5(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=_e)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(na(e),e.lookahead===0&&t===ia)return vt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,At(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Kr&&(At(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===vi?(At(e,!0),e.strm.avail_out===0?ra:as):(e.strstart>e.block_start&&(At(e,!1),e.strm.avail_out===0),vt)}function Ph(e,t){for(var r,n;;){if(e.lookahead=_e&&(e.ins_h=(e.ins_h<=_e)if(n=Mr._tr_tally(e,e.strstart-e.match_start,e.match_length-_e),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=_e){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=_e&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=_e-1)),e.prev_length>=_e&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-_e,n=Mr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-_e),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<=_e&&e.strstart>0&&(i=e.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=e.strstart+mi;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=_e?(r=Mr._tr_tally(e,1,e.match_length-_e),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(At(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===vi?(At(e,!0),e.strm.avail_out===0?ra:as):e.last_lit&&(At(e,!1),e.strm.avail_out===0)?vt:Vo}function H5(e,t){for(var r;;){if(e.lookahead===0&&(na(e),e.lookahead===0)){if(t===ia)return vt;break}if(e.match_length=0,r=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(At(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===vi?(At(e,!0),e.strm.avail_out===0?ra:as):e.last_lit&&(At(e,!1),e.strm.avail_out===0)?vt:Vo}function vn(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var is;is=[new vn(0,0,0,0,B5),new vn(4,4,8,4,Ph),new vn(4,5,16,8,Ph),new vn(4,6,32,32,Ph),new vn(4,4,16,16,ns),new vn(8,16,32,32,ns),new vn(8,16,128,128,ns),new vn(8,32,128,256,ns),new vn(32,128,258,1024,ns),new vn(32,258,258,4096,ns)];function U5(e){e.window_size=2*e.w_size,pi(e.head),e.max_lazy_match=is[e.level].max_lazy,e.good_match=is[e.level].good_length,e.nice_match=is[e.level].nice_length,e.max_chain_length=is[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=_e-1,e.match_available=0,e.ins_h=0}function G5(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Uc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Gt.Buf16(F5*2),this.dyn_dtree=new Gt.Buf16((2*O5+1)*2),this.bl_tree=new Gt.Buf16((2*I5+1)*2),pi(this.dyn_ltree),pi(this.dyn_dtree),pi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Gt.Buf16($5+1),this.heap=new Gt.Buf16(2*Rh+1),pi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Gt.Buf16(2*Rh+1),pi(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function iy(e){var t;return!e||!e.state?gi(e,Or):(e.total_in=e.total_out=0,e.data_type=k5,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Gc:ta,e.adler=t.wrap===2?0:1,t.last_flush=ia,Mr._tr_init(t),yn)}function ay(e){var t=iy(e);return t===yn&&U5(e.state),t}function z5(e,t){return!e||!e.state||e.state.wrap!==2?Or:(e.state.gzhead=t,yn)}function sy(e,t,r,n,i,a){if(!e)return Or;var s=1;if(t===_5&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>T5||r!==Uc||n<8||n>15||t<0||t>9||a<0||a>E5)return gi(e,Or);n===8&&(n=9);var o=new G5;return e.state=o,o.strm=e,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<Q1||t<0)return e?gi(e,Or):Or;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===zo&&t!==vi)return gi(e,e.avail_out===0?Ch:Or);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===Gc)if(n.wrap===2)e.adler=0,Te(n,31),Te(n,139),Te(n,8),n.gzhead?(Te(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Te(n,n.gzhead.time&255),Te(n,n.gzhead.time>>8&255),Te(n,n.gzhead.time>>16&255),Te(n,n.gzhead.time>>24&255),Te(n,n.level===9?2:n.strategy>=Nc||n.level<2?4:0),Te(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Te(n,n.gzhead.extra.length&255),Te(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=di(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Mh):(Te(n,0),Te(n,0),Te(n,0),Te(n,0),Te(n,0),Te(n,n.level===9?2:n.strategy>=Nc||n.level<2?4:0),Te(n,D5),n.status=ta);else{var s=Uc+(n.w_bits-8<<4)<<8,o=-1;n.strategy>=Nc||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,s|=o<<6,n.strstart!==0&&(s|=L5),s+=31-s%31,n.status=ta,Go(n,s),n.strstart!==0&&(Go(n,e.adler>>>16),Go(n,e.adler&65535)),e.adler=1}if(n.status===Mh)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),hi(e),i=n.pending,n.pending===n.pending_buf_size));)Te(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Bc)}else n.status=Bc;if(n.status===Bc)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),hi(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.gzindex=0,n.status=jc)}else n.status=jc;if(n.status===jc)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),hi(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.status=Hc)}else n.status=Hc;if(n.status===Hc&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&hi(e),n.pending+2<=n.pending_buf_size&&(Te(n,e.adler&255),Te(n,e.adler>>8&255),e.adler=0,n.status=ta)):n.status=ta),n.pending!==0){if(hi(e),e.avail_out===0)return n.last_flush=-1,yn}else if(e.avail_in===0&&ty(t)<=ty(r)&&t!==vi)return gi(e,Ch);if(n.status===zo&&e.avail_in!==0)return gi(e,Ch);if(e.avail_in!==0||n.lookahead!==0||t!==ia&&n.status!==zo){var l=n.strategy===Nc?H5(n,t):n.strategy===S5?j5(n,t):is[n.level].func(n,t);if((l===ra||l===as)&&(n.status=zo),l===vt||l===ra)return e.avail_out===0&&(n.last_flush=-1),yn;if(l===Vo&&(t===y5?Mr._tr_align(n):t!==Q1&&(Mr._tr_stored_block(n,0,0,!1),t===w5&&(pi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),hi(e),e.avail_out===0))return n.last_flush=-1,yn}return t!==vi?yn:n.wrap<=0?ey:(n.wrap===2?(Te(n,e.adler&255),Te(n,e.adler>>8&255),Te(n,e.adler>>16&255),Te(n,e.adler>>24&255),Te(n,e.total_in&255),Te(n,e.total_in>>8&255),Te(n,e.total_in>>16&255),Te(n,e.total_in>>24&255)):(Go(n,e.adler>>>16),Go(n,e.adler&65535)),hi(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?yn:ey)}function q5(e){var t;return!e||!e.state?Or:(t=e.state.status,t!==Gc&&t!==Mh&&t!==Bc&&t!==jc&&t!==Hc&&t!==ta&&t!==zo?gi(e,Or):(e.state=null,t===ta?gi(e,b5):yn))}function Y5(e,t){var r=t.length,n,i,a,s,o,l,c,u;if(!e||!e.state||(n=e.state,s=n.wrap,s===2||s===1&&n.status!==Gc||n.lookahead))return Or;for(s===1&&(e.adler=ry(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(s===0&&(pi(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new Gt.Buf8(n.w_size),Gt.arraySet(u,t,r-n.w_size,n.w_size,0),t=u,r=n.w_size),o=e.avail_in,l=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,na(n);n.lookahead>=_e;){i=n.strstart,a=n.lookahead-(_e-1);do n.ins_h=(n.ins_h<{"use strict";g();var zc=Bn(),ly=!0,cy=!0;try{String.fromCharCode.apply(null,[0])}catch(e){ly=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){cy=!1}var Wo=new zc.Buf8(256);for(Hn=0;Hn<256;Hn++)Wo[Hn]=Hn>=252?6:Hn>=248?5:Hn>=240?4:Hn>=224?3:Hn>=192?2:1;var Hn;Wo[254]=Wo[254]=1;ss.string2buf=function(e){var t,r,n,i,a,s=e.length,o=0;for(i=0;i>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function uy(e,t){if(t<65534&&(e.subarray&&cy||!e.subarray&&ly))return String.fromCharCode.apply(null,zc.shrinkBuf(e,t));for(var r="",n=0;n4){o[n++]=65533,r+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&r1){o[n++]=65533;continue}i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|i&1023)}return uy(o,n)};ss.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Wo[e[r]]>t?r:t}});var Ih=F((kU,fy)=>{"use strict";g();function X5(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}fy.exports=X5});var my=F(Xo=>{"use strict";g();var qo=oy(),Yo=Bn(),$h=Oh(),Lh=Dc(),Z5=Ih(),py=Object.prototype.toString,K5=0,Fh=4,os=0,dy=1,hy=2,J5=-1,Q5=0,eM=8;function aa(e){if(!(this instanceof aa))return new aa(e);this.options=Yo.assign({level:J5,method:eM,chunkSize:16384,windowBits:15,memLevel:8,strategy:Q5,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Z5,this.strm.avail_out=0;var r=qo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==os)throw new Error(Lh[r]);if(t.header&&qo.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=$h.string2buf(t.dictionary):py.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=qo.deflateSetDictionary(this.strm,n),r!==os)throw new Error(Lh[r]);this._dict_set=!0}}aa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?Fh:K5,typeof e=="string"?r.input=$h.string2buf(e):py.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Yo.Buf8(n),r.next_out=0,r.avail_out=n),i=qo.deflate(r,a),i!==dy&&i!==os)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===Fh||a===hy))&&(this.options.to==="string"?this.onData($h.buf2binstring(Yo.shrinkBuf(r.output,r.next_out))):this.onData(Yo.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==dy);return a===Fh?(i=qo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===os):(a===hy&&(this.onEnd(os),r.avail_out=0),!0)};aa.prototype.onData=function(e){this.chunks.push(e)};aa.prototype.onEnd=function(e){e===os&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Yo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Dh(e,t){var r=new aa(t);if(r.push(e,!0),r.err)throw r.msg||Lh[r.err];return r.result}function tM(e,t){return t=t||{},t.raw=!0,Dh(e,t)}function rM(e,t){return t=t||{},t.gzip=!0,Dh(e,t)}Xo.Deflate=aa;Xo.deflate=Dh;Xo.deflateRaw=tM;Xo.gzip=rM});var vy=F((RU,gy)=>{"use strict";g();var Vc=30,nM=12;gy.exports=function(t,r){var n,i,a,s,o,l,c,u,f,d,h,p,m,v,y,b,x,E,_,k,w,A,S,T,P;n=t.state,i=t.next_in,T=t.input,a=i+(t.avail_in-5),s=t.next_out,P=t.output,o=s-(r-t.avail_out),l=s+(t.avail_out-257),c=n.dmax,u=n.wsize,f=n.whave,d=n.wnext,h=n.window,p=n.hold,m=n.bits,v=n.lencode,y=n.distcode,b=(1<>>24,p>>>=_,m-=_,_=E>>>16&255,_===0)P[s++]=E&65535;else if(_&16){k=E&65535,_&=15,_&&(m<_&&(p+=T[i++]<>>=_,m-=_),m<15&&(p+=T[i++]<>>24,p>>>=_,m-=_,_=E>>>16&255,_&16){if(w=E&65535,_&=15,m<_&&(p+=T[i++]<c){t.msg="invalid distance too far back",n.mode=Vc;break e}if(p>>>=_,m-=_,_=s-o,w>_){if(_=w-_,_>f&&n.sane){t.msg="invalid distance too far back",n.mode=Vc;break e}if(A=0,S=h,d===0){if(A+=u-_,_2;)P[s++]=S[A++],P[s++]=S[A++],P[s++]=S[A++],k-=3;k&&(P[s++]=S[A++],k>1&&(P[s++]=S[A++]))}else{A=s-w;do P[s++]=P[A++],P[s++]=P[A++],P[s++]=P[A++],k-=3;while(k>2);k&&(P[s++]=P[A++],k>1&&(P[s++]=P[A++]))}}else if(_&64){t.msg="invalid distance code",n.mode=Vc;break e}else{E=y[(E&65535)+(p&(1<<_)-1)];continue r}break}}else if(_&64)if(_&32){n.mode=nM;break e}else{t.msg="invalid literal/length code",n.mode=Vc;break e}else{E=v[(E&65535)+(p&(1<<_)-1)];continue t}break}}while(i>3,i-=k,m-=k<<3,p&=(1<{"use strict";g();var yy=Bn(),ls=15,wy=852,by=592,_y=0,Nh=1,xy=2,iM=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],aM=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],sM=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],oM=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Sy.exports=function(t,r,n,i,a,s,o,l){var c=l.bits,u=0,f=0,d=0,h=0,p=0,m=0,v=0,y=0,b=0,x=0,E,_,k,w,A,S=null,T=0,P,I=new yy.Buf16(ls+1),N=new yy.Buf16(ls+1),L=null,ee=0,fe,J,Q;for(u=0;u<=ls;u++)I[u]=0;for(f=0;f=1&&I[h]===0;h--);if(p>h&&(p=h),h===0)return a[s++]=1<<24|64<<16|0,a[s++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d0&&(t===_y||h!==1))return-1;for(N[1]=0,u=1;uwy||t===xy&&b>by)return 1;for(;;){fe=u-v,o[f]P?(J=L[ee+o[f]],Q=S[T+o[f]]):(J=96,Q=0),E=1<>v)+_]=fe<<24|J<<16|Q|0;while(_!==0);for(E=1<>=1;if(E!==0?(x&=E-1,x+=E):x=0,f++,--I[u]===0){if(u===h)break;u=r[n+o[f]]}if(u>p&&(x&w)!==k){for(v===0&&(v=p),A+=d,m=u-v,y=1<wy||t===xy&&b>by)return 1;k=x&w,a[k]=p<<24|m<<16|A-s|0}}return x!==0&&(a[A+x]=u-v<<24|64<<16|0),l.bits=p,0}});var aw=F(Jr=>{"use strict";g();var hr=Bn(),zh=kh(),bn=Th(),lM=vy(),Zo=Ey(),cM=0,Zy=1,Ky=2,Ay=4,uM=5,Wc=6,sa=0,fM=1,dM=2,Ir=-2,Jy=-3,Vh=-4,hM=-5,ky=8,Qy=1,Ty=2,Cy=3,Py=4,Ry=5,My=6,Oy=7,Iy=8,Fy=9,$y=10,Xc=11,Un=12,Bh=13,Ly=14,jh=15,Dy=16,Ny=17,By=18,jy=19,qc=20,Yc=21,Hy=22,Uy=23,Gy=24,zy=25,Vy=26,Hh=27,Wy=28,qy=29,Be=30,Wh=31,pM=32,mM=852,gM=592,vM=15,yM=vM;function Yy(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function wM(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new hr.Buf16(320),this.work=new hr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ew(e){var t;return!e||!e.state?Ir:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Qy,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new hr.Buf32(mM),t.distcode=t.distdyn=new hr.Buf32(gM),t.sane=1,t.back=-1,sa)}function tw(e){var t;return!e||!e.state?Ir:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,ew(e))}function rw(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ir:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,tw(e))}function nw(e,t){var r,n;return e?(n=new wM,e.state=n,n.window=null,r=rw(e,t),r!==sa&&(e.state=null),r):Ir}function bM(e){return nw(e,yM)}var Xy=!0,Uh,Gh;function _M(e){if(Xy){var t;for(Uh=new hr.Buf32(512),Gh=new hr.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Zo(Zy,e.lens,0,288,Uh,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Zo(Ky,e.lens,0,32,Gh,0,e.work,{bits:5}),Xy=!1}e.lencode=Uh,e.lenbits=9,e.distcode=Gh,e.distbits=5}function iw(e,t,r,n){var i,a=e.state;return a.window===null&&(a.wsize=1<=a.wsize?(hr.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),hr.arraySet(a.window,t,r-n,i,a.wnext),n-=i,n?(hr.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=bn(r.check,S,2,0),c=0,u=0,r.mode=Ty;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=Be;break}if((c&15)!==ky){e.msg="unknown compression method",r.mode=Be;break}if(c>>>=4,u-=4,w=(c&15)+8,r.wbits===0)r.wbits=w;else if(w>r.wbits){e.msg="invalid window size",r.mode=Be;break}r.dmax=1<>8&1),r.flags&512&&(S[0]=c&255,S[1]=c>>>8&255,r.check=bn(r.check,S,2,0)),c=0,u=0,r.mode=Cy;case Cy:for(;u<32;){if(o===0)break e;o--,c+=n[a++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,r.check=bn(r.check,S,4,0)),c=0,u=0,r.mode=Py;case Py:for(;u<16;){if(o===0)break e;o--,c+=n[a++]<>8),r.flags&512&&(S[0]=c&255,S[1]=c>>>8&255,r.check=bn(r.check,S,2,0)),c=0,u=0,r.mode=Ry;case Ry:if(r.flags&1024){for(;u<16;){if(o===0)break e;o--,c+=n[a++]<>>8&255,r.check=bn(r.check,S,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=My;case My:if(r.flags&1024&&(h=r.length,h>o&&(h=o),h&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),hr.arraySet(r.head.extra,n,a,h,w)),r.flags&512&&(r.check=bn(r.check,n,h,a)),o-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=Oy;case Oy:if(r.flags&2048){if(o===0)break e;h=0;do w=n[a+h++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w));while(w&&h>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Un;break;case $y:for(;u<32;){if(o===0)break e;o--,c+=n[a++]<>>=u&7,u-=u&7,r.mode=Hh;break}for(;u<3;){if(o===0)break e;o--,c+=n[a++]<>>=1,u-=1,c&3){case 0:r.mode=Ly;break;case 1:if(_M(r),r.mode=qc,t===Wc){c>>>=2,u-=2;break e}break;case 2:r.mode=Ny;break;case 3:e.msg="invalid block type",r.mode=Be}c>>>=2,u-=2;break;case Ly:for(c>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,c+=n[a++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Be;break}if(r.length=c&65535,c=0,u=0,r.mode=jh,t===Wc)break e;case jh:r.mode=Dy;case Dy:if(h=r.length,h){if(h>o&&(h=o),h>l&&(h=l),h===0)break e;hr.arraySet(i,n,a,h,s),o-=h,a+=h,l-=h,s+=h,r.length-=h;break}r.mode=Un;break;case Ny:for(;u<14;){if(o===0)break e;o--,c+=n[a++]<>>=5,u-=5,r.ndist=(c&31)+1,c>>>=5,u-=5,r.ncode=(c&15)+4,c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Be;break}r.have=0,r.mode=By;case By:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[I[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},A=Zo(cM,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,A){e.msg="invalid code lengths set",r.mode=Be;break}r.have=0,r.mode=jy;case jy:for(;r.have>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=y,u-=y,r.lens[r.have++]=x;else{if(x===16){for(P=y+2;u>>=y,u-=y,r.have===0){e.msg="invalid bit length repeat",r.mode=Be;break}w=r.lens[r.have-1],h=3+(c&3),c>>>=2,u-=2}else if(x===17){for(P=y+3;u>>=y,u-=y,w=0,h=3+(c&7),c>>>=3,u-=3}else{for(P=y+7;u>>=y,u-=y,w=0,h=11+(c&127),c>>>=7,u-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Be;break}for(;h--;)r.lens[r.have++]=w}}if(r.mode===Be)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Be;break}if(r.lenbits=9,T={bits:r.lenbits},A=Zo(Zy,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,A){e.msg="invalid literal/lengths set",r.mode=Be;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},A=Zo(Ky,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,A){e.msg="invalid distances set",r.mode=Be;break}if(r.mode=qc,t===Wc)break e;case qc:r.mode=Yc;case Yc:if(o>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=a,e.avail_in=o,r.hold=c,r.bits=u,lM(e,d),s=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,c=r.hold,u=r.bits,r.mode===Un&&(r.back=-1);break}for(r.back=0;v=r.lencode[c&(1<>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>E)],y=v>>>24,b=v>>>16&255,x=v&65535,!(E+y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=E,u-=E,r.back+=E}if(c>>>=y,u-=y,r.back+=y,r.length=x,b===0){r.mode=Vy;break}if(b&32){r.back=-1,r.mode=Un;break}if(b&64){e.msg="invalid literal/length code",r.mode=Be;break}r.extra=b&15,r.mode=Hy;case Hy:if(r.extra){for(P=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Uy;case Uy:for(;v=r.distcode[c&(1<>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>E)],y=v>>>24,b=v>>>16&255,x=v&65535,!(E+y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=E,u-=E,r.back+=E}if(c>>>=y,u-=y,r.back+=y,b&64){e.msg="invalid distance code",r.mode=Be;break}r.offset=x,r.extra=b&15,r.mode=Gy;case Gy:if(r.extra){for(P=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Be;break}r.mode=zy;case zy:if(l===0)break e;if(h=d-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Be;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),m=r.window}else m=i,p=s-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[s++]=m[p++];while(--h);r.length===0&&(r.mode=Yc);break;case Vy:if(l===0)break e;i[s++]=r.length,l--,r.mode=Yc;break;case Hh:if(r.wrap){for(;u<32;){if(o===0)break e;o--,c|=n[a++]<{"use strict";g();sw.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var lw=F((NU,ow)=>{"use strict";g();function kM(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}ow.exports=kM});var uw=F(Jo=>{"use strict";g();var cs=aw(),Ko=Bn(),Zc=Oh(),nt=qh(),Yh=Dc(),TM=Ih(),CM=lw(),cw=Object.prototype.toString;function oa(e){if(!(this instanceof oa))return new oa(e);this.options=Ko.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new TM,this.strm.avail_out=0;var r=cs.inflateInit2(this.strm,t.windowBits);if(r!==nt.Z_OK)throw new Error(Yh[r]);if(this.header=new CM,cs.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Zc.string2buf(t.dictionary):cw.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=cs.inflateSetDictionary(this.strm,t.dictionary),r!==nt.Z_OK)))throw new Error(Yh[r])}oa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,a,s,o,l,c,u=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?nt.Z_FINISH:nt.Z_NO_FLUSH,typeof e=="string"?r.input=Zc.binstring2buf(e):cw.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ko.Buf8(n),r.next_out=0,r.avail_out=n),a=cs.inflate(r,nt.Z_NO_FLUSH),a===nt.Z_NEED_DICT&&i&&(a=cs.inflateSetDictionary(this.strm,i)),a===nt.Z_BUF_ERROR&&u===!0&&(a=nt.Z_OK,u=!1),a!==nt.Z_STREAM_END&&a!==nt.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===nt.Z_STREAM_END||r.avail_in===0&&(s===nt.Z_FINISH||s===nt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=Zc.utf8border(r.output,r.next_out),l=r.next_out-o,c=Zc.buf2string(r.output,o),r.next_out=l,r.avail_out=n-l,l&&Ko.arraySet(r.output,r.output,o,l,0),this.onData(c)):this.onData(Ko.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==nt.Z_STREAM_END);return a===nt.Z_STREAM_END&&(s=nt.Z_FINISH),s===nt.Z_FINISH?(a=cs.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===nt.Z_OK):(s===nt.Z_SYNC_FLUSH&&(this.onEnd(nt.Z_OK),r.avail_out=0),!0)};oa.prototype.onData=function(e){this.chunks.push(e)};oa.prototype.onEnd=function(e){e===nt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ko.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Xh(e,t){var r=new oa(t);if(r.push(e,!0),r.err)throw r.msg||Yh[r.err];return r.result}function PM(e,t){return t=t||{},t.raw=!0,Xh(e,t)}Jo.Inflate=oa;Jo.inflate=Xh;Jo.inflateRaw=PM;Jo.ungzip=Xh});var hw=F((UU,dw)=>{"use strict";g();var RM=Bn().assign,MM=my(),OM=uw(),IM=qh(),fw={};RM(fw,MM,OM,IM);dw.exports=fw});var gw=F((zU,mw)=>{"use strict";g();var pw=(e,t)=>function(...r){let n=t.promiseModule;return new n((i,a)=>{t.multiArgs?r.push((...s)=>{t.errorFirst?s[0]?a(s):(s.shift(),i(s)):i(s)}):t.errorFirst?r.push((s,o)=>{s?a(s):i(o)}):r.push(i),e.apply(this,r)})};mw.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=typeof e;if(!(e!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${e===null?"null":r}\``);let n=a=>{let s=o=>typeof o=="string"?a===o:o.test(a);return t.include?t.include.some(s):!t.exclude.some(s)},i;r==="function"?i=function(...a){return t.excludeMain?e(...a):pw(e,t).apply(this,a)}:i=Object.create(Object.getPrototypeOf(e));for(let a in e){let s=e[a];i[a]=typeof s=="function"&&n(a)?pw(s,t):s}return i}});var Aw=F((WU,Ew)=>{g();function vw(e){return Array.isArray(e)?e:[e]}var Jh="",yw=" ",Zh="\\",FM=/^\s+$/,$M=/(?:[^\\]|^)\\$/,LM=/^\\!/,DM=/^\\#/,NM=/\r?\n/g,BM=/^\.*\/|^\.+$/,Kh="/",_w="node-ignore";typeof Symbol!="undefined"&&(_w=Symbol.for("node-ignore"));var ww=_w,jM=(e,t,r)=>Object.defineProperty(e,t,{value:r}),HM=/([0-z])-([0-z])/g,xw=()=>!1,UM=e=>e.replace(HM,(t,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?t:Jh),GM=e=>{let{length:t}=e;return e.slice(0,t-t%2)},zM=[[/^\uFEFF/,()=>Jh],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?yw:Jh)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+yw}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6{let n=r.replace(/\\\*/g,"[^\\/]*");return t+n}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Zh],[/\\\\/g,()=>Zh],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,n,i)=>t===Zh?`\\[${r}${GM(n)}${i}`:i==="]"&&n.length%2===0?`[${UM(r)}${n}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],bw=Object.create(null),VM=(e,t)=>{let r=bw[e];return r||(r=zM.reduce((n,[i,a])=>n.replace(i,a.bind(e)),e),bw[e]=r),t?new RegExp(r,"i"):new RegExp(r)},tp=e=>typeof e=="string",WM=e=>e&&tp(e)&&!FM.test(e)&&!$M.test(e)&&e.indexOf("#")!==0,qM=e=>e.split(NM),Qh=class{constructor(t,r,n,i){this.origin=t,this.pattern=r,this.negative=n,this.regex=i}},YM=(e,t)=>{let r=e,n=!1;e.indexOf("!")===0&&(n=!0,e=e.substr(1)),e=e.replace(LM,"!").replace(DM,"#");let i=VM(e,t);return new Qh(r,e,n,i)},XM=(e,t)=>{throw new t(e)},Gn=(e,t,r)=>tp(e)?e?Gn.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),Sw=e=>BM.test(e);Gn.isNotRelative=Sw;Gn.convert=e=>e;var ep=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:n=!1}={}){jM(this,ww,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[ww]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(WM(t)){let r=YM(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,vw(tp(t)?qM(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let n=!1,i=!1;return this._rules.forEach(a=>{let{negative:s}=a;if(i===s&&n!==i||s&&!n&&!i&&!r)return;a.regex.test(t)&&(n=!s,i=s)}),{ignored:n,unignored:i}}_test(t,r,n,i){let a=t&&Gn.convert(t);return Gn(a,t,this._allowRelativePaths?xw:XM),this._t(a,r,n,i)}_t(t,r,n,i){if(t in r)return r[t];if(i||(i=t.split(Kh)),i.pop(),!i.length)return r[t]=this._testOne(t,n);let a=this._t(i.join(Kh)+Kh,r,n,i);return r[t]=a.ignored?a:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return vw(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},Kc=e=>new ep(e),ZM=e=>Gn(e&&Gn.convert(e),e,xw);Kc.isPathValid=ZM;Kc.default=Kc;Ew.exports=Kc;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Gn.convert=e;let t=/^[a-z]:\//i;Gn.isNotRelative=r=>t.test(r)||Sw(r)}});var Tw=F((YU,kw)=>{"use strict";g();function KM(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _n(e,t,r){return t=t instanceof RegExp?t:new RegExp(KM(t),"g"),e.replace(t,r)}var JM={clean:function(t){if(typeof t!="string")throw new Error("Expected a string, received: "+t);return t=_n(t,"./","/"),t=_n(t,"..","."),t=_n(t," ","-"),t=_n(t,/^[~^:?*\\\-]/g,""),t=_n(t,/[~^:?*\\]/g,"-"),t=_n(t,/[~^:?*\\\-]$/g,""),t=_n(t,"@{","-"),t=_n(t,/\.$/g,""),t=_n(t,/\/$/g,""),t=_n(t,/\.lock$/g,""),t}};kw.exports=JM});var Pw=F((ZU,Cw)=>{g();Cw.exports=function(e,t){var r=e,n=t,i=r.length,a=n.length,s=!1,o=null,l=i+1,c=[],u=[],f=[],d="",h=-1,p=0,m=1,v,y,b=function(){i>=a&&(v=r,y=i,r=n,n=v,i=a,a=y,s=!0,l=i+1)},x=function(w,A,S){return{x:w,y:A,k:S}},E=function(w,A){return{elem:w,t:A}},_=function(w,A,S){var T,P,I;for(A>S?T=c[w-1+l]:T=c[w+1+l],I=Math.max(A,S),P=I-w;P=0;--I)for(;TP-T?(s?f[f.length]=new E(n[P],h):f[f.length]=new E(n[P],m),++S,++P):w[I].y-w[I].x=w+1;--L)S[L+l]=_(L,S[L-1+l]+1,S[L+1+l]);S[w+l]=_(w,S[w-1+l]+1,S[w+1+l])}while(S[w+l]!==a);for(o=w+2*T,P=c[w+l],I=[];P!==-1;)I[I.length]=new x(u[P].x,u[P].y,null),P=u[P].k;k(I)}}}});var Ow=F((JU,Mw)=>{g();var QM=Pw();function eO(e,t){var r=new QM(e,t);r.compose();for(var n=r.getses(),i,a,s=e.length-1,o=t.length-1,l=n.length-1;l>=0;--l)n[l].t===r.SES_COMMON?(a?(a.chain={file1index:s,file2index:o,chain:null},a=a.chain):(i={file1index:s,file2index:o,chain:null},a=i),s--,o--):n[l].t===r.SES_DELETE?s--:n[l].t===r.SES_ADD&&o--;var c={file1index:-1,file2index:-1,chain:null};return a?(a.chain=c,i):c}function Rw(e,t){for(var r=[],n=e.length,i=t.length,a=eO(e,t);a!==null;a=a.chain){var s=n-a.file1index-1,o=i-a.file2index-1;n=a.file1index,i=a.file2index,(s||o)&&r.push({file1:[n+1,s],file2:[i+1,o]})}return r.reverse(),r}function tO(e,t,r){var n,i=Rw(t,e),a=Rw(t,r),s=[];function o(N,L){s.push([N.file1[0],L,N.file1[1],N.file2[0],N.file2[1]])}for(n=0;nc&&(l.push([1,c,N-c]),c=N)}for(var f=0;fm)break;m=Math.max(m,y+v[2]),f++}if(u(p),d==f)h[4]>0&&l.push([h[1],h[3],h[4]]);else{var b={0:[e.length,-1,t.length,-1],2:[r.length,-1,t.length,-1]};for(n=d;n<=f;n++){h=s[n];var x=h[1],E=b[x],_=h[0],k=_+h[2],w=h[3],A=w+h[4];E[0]=Math.min(w,E[0]),E[1]=Math.max(A,E[1]),E[2]=Math.min(_,E[2]),E[3]=Math.max(k,E[3])}var S=b[0][0]+(p-b[0][2]),T=b[0][1]+(m-b[0][3]),P=b[2][0]+(p-b[2][2]),I=b[2][1]+(m-b[2][3]);l.push([-1,S,T-S,p,m-p,P,I-P])}c=m}return u(t.length),l}function rO(e,t,r){var n=[],i=[e,t,r],a=tO(e,t,r),s=[];function o(){s.length&&n.push({ok:s}),s=[]}function l(h){for(var p=0;p{g();var Ts=1e3,Cs=Ts*60,Ps=Cs*60,pa=Ps*24,a8=pa*7,s8=pa*365.25;$2.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return o8(e);if(r==="number"&&isFinite(e))return t.long?c8(e):l8(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function o8(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*s8;case"weeks":case"week":case"w":return r*a8;case"days":case"day":case"d":return r*pa;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ps;case"minutes":case"minute":case"mins":case"min":case"m":return r*Cs;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ts;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function l8(e){var t=Math.abs(e);return t>=pa?Math.round(e/pa)+"d":t>=Ps?Math.round(e/Ps)+"h":t>=Cs?Math.round(e/Cs)+"m":t>=Ts?Math.round(e/Ts)+"s":e+"ms"}function c8(e){var t=Math.abs(e);return t>=pa?yu(e,t,pa,"day"):t>=Ps?yu(e,t,Ps,"hour"):t>=Cs?yu(e,t,Cs,"minute"):t>=Ts?yu(e,t,Ts,"second"):e+" ms"}function yu(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var N2=F((oG,D2)=>{g();function u8(e){r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=i,r.enabled=s,r.humanize=L2(),r.destroy=c,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let f=0;for(let d=0;d{if(k==="%%")return"%";E++;let A=r.formatters[w];if(typeof A=="function"){let S=v[E];k=A.call(y,S),v.splice(E,1),E--}return k}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return m.namespace=u,m.useColors=r.useColors(),m.color=r.selectColor(u),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,p=r.enabled(u)),p),set:v=>{d=v}}),typeof r.init=="function"&&r.init(m),m}function n(u,f){let d=r(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let f,d=(typeof u=="string"?u:"").split(/[\s,]+/),h=d.length;for(f=0;f"-"+f)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let f,d;for(f=0,d=r.skips.length;f{g();gr.formatArgs=d8;gr.save=h8;gr.load=p8;gr.useColors=f8;gr.storage=m8();gr.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();gr.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function f8(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function d8(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+wu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}gr.log=console.debug||console.log||(()=>{});function h8(e){try{e?gr.storage.setItem("debug",e):gr.storage.removeItem("debug")}catch(t){}}function p8(){let e;try{e=gr.storage.getItem("debug")}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}function m8(){try{return localStorage}catch(e){}}wu.exports=N2()(gr);var{formatters:g8}=wu.exports;g8.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var B2=F(vr=>{"use strict";g();var v8=vr&&vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var y8=require("fs"),w8=v8(bu()),Rs=w8.default("@kwsites/file-exists");function b8(e,t,r){Rs("checking %s",e);try{let n=y8.statSync(e);return n.isFile()&&t?(Rs("[OK] path represents a file"),!0):n.isDirectory()&&r?(Rs("[OK] path represents a directory"),!0):(Rs("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Rs("[FAIL] path is not accessible: %o",n),!1;throw Rs("[FATAL] %o",n),n}}function _8(e,t=vr.READABLE){return b8(e,(t&vr.FILE)>0,(t&vr.FOLDER)>0)}vr.exists=_8;vr.FILE=1;vr.FOLDER=2;vr.READABLE=vr.FILE+vr.FOLDER});var j2=F(_u=>{"use strict";g();function x8(e){for(var t in e)_u.hasOwnProperty(t)||(_u[t]=e[t])}Object.defineProperty(_u,"__esModule",{value:!0});x8(B2())});var Mp=F(ma=>{"use strict";g();Object.defineProperty(ma,"__esModule",{value:!0});ma.createDeferred=ma.deferred=void 0;function Rp(){let e,t,r="pending";return{promise:new Promise((i,a)=>{e=i,t=a}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}ma.deferred=Rp;ma.createDeferred=Rp;ma.default=Rp});var Px=F((QG,Cx)=>{"use strict";g();Cx.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Mx=F((tz,Rx)=>{g();var Sm={px:{px:1,cm:37.79527559055118,mm:3.7795275590551185,in:96,pt:1.3333333333333333,pc:16},cm:{px:.026458333333333334,cm:1,mm:.1,in:2.54,pt:.035277777777777776,pc:.42333333333333334},mm:{px:.26458333333333334,cm:10,mm:1,in:25.4,pt:.35277777777777775,pc:4.233333333333333},in:{px:.010416666666666666,cm:.39370078740157477,mm:.03937007874015748,in:1,pt:.013888888888888888,pc:.16666666666666666},pt:{px:.75,cm:28.346456692913385,mm:2.834645669291339,in:72,pt:1,pc:12},pc:{px:.0625,cm:2.3622047244094486,mm:.2362204724409449,in:6,pt:.08333333333333333,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:1.1111111111111112,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:.002777777777777778,grad:.0025,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:.39370078740157477,dppx:.010416666666666666},dpcm:{dpi:2.54,dpcm:1,dppx:.026458333333333334},dppx:{dpi:96,dpcm:37.79527559055118,dppx:1}};Rx.exports=function(e,t,r,n){if(!Sm.hasOwnProperty(r))throw new Error("Cannot convert to "+r);if(!Sm[r].hasOwnProperty(t))throw new Error("Cannot convert from "+t+" to "+r);var i=Sm[r][t]*e;return n!==!1?(n=Math.pow(10,parseInt(n)||5),Math.round(i*n)/n):i}});var Vx=F(Yn=>{"use strict";g();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.fromRgba=Ls;Yn.fromRgb=Em;Yn.fromHsla=Wu;Yn.fromHsl=Gx;Yn.fromString=zx;Yn.default=void 0;var Ox=$x(Px()),F$=$x(Mx());function $x(e){return e&&e.__esModule?e:{default:e}}function $$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ix(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1}function H$(e,t,r){var n=e/255,i=t/255,a=r/255,s=Math.max(n,i,a),o=Math.min(n,i,a),l=s-o,c=(s+o)/2;if(l===0)return[0,0,c*100];var u=l/(1-Math.abs(2*c-1)),f=function(){switch(s){case n:return(i-a)/l%6;case i:return(a-n)/l+2;default:return(n-i)/l+4}}();return[f*60,u*100,c*100]}function U$(e,t,r){var n=e/60,i=t/100,a=r/100,s=(1-Math.abs(2*a-1))*i,o=s*(1-Math.abs(n%2-1)),l=a-s/2,c=function(){return n<1?[s,o,0]:n<2?[o,s,0]:n<3?[0,s,o]:n<4?[0,o,s]:n<5?[o,0,s]:[s,0,o]}(),u=qt(c,3),f=u[0],d=u[1],h=u[2];return[(f+l)*255,(d+l)*255,(h+l)*255]}var G$=function(){function e(t){var r=qt(t,4),n=r[0],i=r[1],a=r[2],s=r[3];$$(this,e),this.values=[Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(a,10),255),0),s==null?1:Math.max(Math.min(parseFloat(s),255),0)]}return L$(e,[{key:"toRgbString",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return s===1?"rgb(".concat(n,", ").concat(i,", ").concat(a,")"):"rgba(".concat(n,", ").concat(i,", ").concat(a,", ").concat(s,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),n=qt(r,4),i=n[0],a=n[1],s=n[2],o=n[3];return o===1?"hsl(".concat(i,", ").concat(a,"%, ").concat(s,"%)"):"hsla(".concat(i,", ").concat(a,"%, ").concat(s,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return n=Number(n).toString(16).padStart(2,"0"),i=Number(i).toString(16).padStart(2,"0"),a=Number(a).toString(16).padStart(2,"0"),s=s<1?parseInt(s*255,10).toString(16).padStart(2,"0"):"","#".concat(n).concat(i).concat(a).concat(s)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3],o=H$(n,i,a),l=qt(o,3),c=l[0],u=l[1],f=l[2];return[c,u,f,s]}}]),e}();function Ls(e){var t=qt(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return new G$([r,n,i,a])}function Em(e){var t=qt(e,3),r=t[0],n=t[1],i=t[2];return Ls([r,n,i,1])}function Wu(e){var t=qt(e,4),r=t[0],n=t[1],i=t[2],a=t[3],s=U$(r,n,i),o=qt(s,3),l=o[0],c=o[1],u=o[2];return Ls([l,c,u,a])}function Gx(e){var t=qt(e,3),r=t[0],n=t[1],i=t[2];return Wu([r,n,i,1])}function z$(e){var t=Lx.exec(e)||Dx.exec(e),r=qt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=parseInt(n.length<2?n.repeat(2):n,16),i=parseInt(i.length<2?i.repeat(2):i,16),a=parseInt(a.length<2?a.repeat(2):a,16),s=s&&(parseInt(s.length<2?s.repeat(2):s,16)/255).toPrecision(1)||1,Ls([n,i,a,s])}function V$(e){var t=Nx.exec(e)||jx.exec(e)||Bx.exec(e)||Hx.exec(e),r=qt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=Fl(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),i=Fl(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),a=Fl(a,"%")>0?parseInt(a,10)*255/100:parseInt(a,10),s=s===void 0?1:parseFloat(s)/(Fl(s,"%")?100:1),Ls([n,i,a,s])}function W$(e){var t=Ux.exec(e),r=qt(t,6),n=r[1],i=r[2],a=r[3],s=r[4],o=r[5];return i=i||"deg",n=(0,F$.default)(parseFloat(n),i,"deg"),a=parseFloat(a),s=parseFloat(s),o=o===void 0?1:parseFloat(o)/(Fl(o,"%")?100:1),Wu([n,a,s,o])}function zx(e){return Ox.default[e]?Em(Ox.default[e]):Lx.test(e)||Dx.test(e)?z$(e):Nx.test(e)||jx.test(e)||Bx.test(e)||Hx.test(e)?V$(e):Ux.test(e)?W$(e):null}var q$={fromString:zx,fromRgb:Em,fromRgba:Ls,fromHsl:Gx,fromHsla:Wu};Yn.default=q$});var Am=F((az,qx)=>{"use strict";g();var Wx=Object.prototype.toString;qx.exports=function(t){var r=Wx.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Wx.call(t.callee)==="[object Function]"),n}});var rS=F((oz,tS)=>{"use strict";g();var eS;Object.keys||($l=Object.prototype.hasOwnProperty,km=Object.prototype.toString,Yx=Am(),Tm=Object.prototype.propertyIsEnumerable,Xx=!Tm.call({toString:null},"toString"),Zx=Tm.call(function(){},"prototype"),Ll=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],qu=function(e){var t=e.constructor;return t&&t.prototype===e},Kx={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Jx=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!Kx["$"+e]&&$l.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{qu(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),Qx=function(e){if(typeof window=="undefined"||!Jx)return qu(e);try{return qu(e)}catch(t){return!1}},eS=function(t){var r=t!==null&&typeof t=="object",n=km.call(t)==="[object Function]",i=Yx(t),a=r&&km.call(t)==="[object String]",s=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var o=Zx&&n;if(a&&t.length>0&&!$l.call(t,0))for(var l=0;l0)for(var c=0;c{"use strict";g();var Y$=Array.prototype.slice,X$=Am(),nS=Object.keys,Yu=nS?function(t){return nS(t)}:rS(),iS=Object.keys;Yu.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return X$(n)?iS(Y$.call(n)):iS(n)})}else Object.keys=Yu;return Object.keys||Yu};aS.exports=Yu});var oS=F((fz,sS)=>{"use strict";g();sS.exports=Error});var cS=F((hz,lS)=>{"use strict";g();lS.exports=EvalError});var fS=F((mz,uS)=>{"use strict";g();uS.exports=RangeError});var hS=F((vz,dS)=>{"use strict";g();dS.exports=ReferenceError});var Cm=F((wz,pS)=>{"use strict";g();pS.exports=SyntaxError});var Xn=F((_z,mS)=>{"use strict";g();mS.exports=TypeError});var vS=F((Sz,gS)=>{"use strict";g();gS.exports=URIError});var Dl=F((Az,yS)=>{"use strict";g();yS.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var Zu=F((Tz,bS)=>{"use strict";g();var wS=typeof Symbol!="undefined"&&Symbol,Z$=Dl();bS.exports=function(){return typeof wS!="function"||typeof Symbol!="function"||typeof wS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Z$()}});var xS=F((Pz,_S)=>{"use strict";g();var Pm={__proto__:null,foo:{}},K$=Object;_S.exports=function(){return{__proto__:Pm}.foo===Pm.foo&&!(Pm instanceof K$)}});var AS=F((Mz,ES)=>{"use strict";g();var J$="Function.prototype.bind called on incompatible ",Q$=Object.prototype.toString,eL=Math.max,tL="[object Function]",SS=function(t,r){for(var n=[],i=0;i{"use strict";g();var iL=AS();kS.exports=Function.prototype.bind||iL});var Rm=F(($z,TS)=>{"use strict";g();var aL=Function.prototype.call,sL=Object.prototype.hasOwnProperty,oL=Ku();TS.exports=oL.call(aL,sL)});var tn=F((Dz,OS)=>{"use strict";g();var be,lL=oS(),cL=cS(),uL=fS(),fL=hS(),js=Cm(),Bs=Xn(),dL=vS(),MS=Function,Mm=function(e){try{return MS('"use strict"; return ('+e+").constructor;")()}catch(t){}},ba=Object.getOwnPropertyDescriptor;if(ba)try{ba({},"")}catch(e){ba=null}var Om=function(){throw new Bs},hL=ba?function(){try{return arguments.callee,Om}catch(e){try{return ba(arguments,"callee").get}catch(t){return Om}}}():Om,Ds=Zu()(),pL=xS()(),xt=Object.getPrototypeOf||(pL?function(e){return e.__proto__}:null),Ns={},mL=typeof Uint8Array=="undefined"||!xt?be:xt(Uint8Array),_a={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?be:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?be:ArrayBuffer,"%ArrayIteratorPrototype%":Ds&&xt?xt([][Symbol.iterator]()):be,"%AsyncFromSyncIteratorPrototype%":be,"%AsyncFunction%":Ns,"%AsyncGenerator%":Ns,"%AsyncGeneratorFunction%":Ns,"%AsyncIteratorPrototype%":Ns,"%Atomics%":typeof Atomics=="undefined"?be:Atomics,"%BigInt%":typeof BigInt=="undefined"?be:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?be:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?be:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?be:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":lL,"%eval%":eval,"%EvalError%":cL,"%Float32Array%":typeof Float32Array=="undefined"?be:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?be:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?be:FinalizationRegistry,"%Function%":MS,"%GeneratorFunction%":Ns,"%Int8Array%":typeof Int8Array=="undefined"?be:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?be:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?be:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ds&&xt?xt(xt([][Symbol.iterator]())):be,"%JSON%":typeof JSON=="object"?JSON:be,"%Map%":typeof Map=="undefined"?be:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ds||!xt?be:xt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?be:Promise,"%Proxy%":typeof Proxy=="undefined"?be:Proxy,"%RangeError%":uL,"%ReferenceError%":fL,"%Reflect%":typeof Reflect=="undefined"?be:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?be:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ds||!xt?be:xt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?be:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ds&&xt?xt(""[Symbol.iterator]()):be,"%Symbol%":Ds?Symbol:be,"%SyntaxError%":js,"%ThrowTypeError%":hL,"%TypedArray%":mL,"%TypeError%":Bs,"%Uint8Array%":typeof Uint8Array=="undefined"?be:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?be:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?be:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?be:Uint32Array,"%URIError%":dL,"%WeakMap%":typeof WeakMap=="undefined"?be:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?be:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?be:WeakSet};if(xt)try{null.error}catch(e){CS=xt(xt(e)),_a["%Error.prototype%"]=CS}var CS,gL=function e(t){var r;if(t==="%AsyncFunction%")r=Mm("async function () {}");else if(t==="%GeneratorFunction%")r=Mm("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Mm("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&xt&&(r=xt(i.prototype))}return _a[t]=r,r},PS={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Nl=Ku(),Ju=Rm(),vL=Nl.call(Function.call,Array.prototype.concat),yL=Nl.call(Function.apply,Array.prototype.splice),RS=Nl.call(Function.call,String.prototype.replace),Qu=Nl.call(Function.call,String.prototype.slice),wL=Nl.call(Function.call,RegExp.prototype.exec),bL=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_L=/\\(\\)?/g,xL=function(t){var r=Qu(t,0,1),n=Qu(t,-1);if(r==="%"&&n!=="%")throw new js("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new js("invalid intrinsic syntax, expected opening `%`");var i=[];return RS(t,bL,function(a,s,o,l){i[i.length]=o?RS(l,_L,"$1"):s||a}),i},SL=function(t,r){var n=t,i;if(Ju(PS,n)&&(i=PS[n],n="%"+i[0]+"%"),Ju(_a,n)){var a=_a[n];if(a===Ns&&(a=gL(n)),typeof a=="undefined"&&!r)throw new Bs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new js("intrinsic "+t+" does not exist!")};OS.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Bs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Bs('"allowMissing" argument must be a boolean');if(wL(/^%?[^%]*%?$/,t)===null)throw new js("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=xL(t),i=n.length>0?n[0]:"",a=SL("%"+i+"%",r),s=a.name,o=a.value,l=!1,c=a.alias;c&&(i=c[0],yL(n,vL([0,1],c)));for(var u=1,f=!0;u=n.length){var m=ba(o,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[d]}else f=Ju(o,d),o=o[d];f&&!l&&(_a[s]=o)}}return o}});var tf=F((Bz,IS)=>{"use strict";g();var EL=tn(),ef=EL("%Object.defineProperty%",!0)||!1;if(ef)try{ef({},"a",{value:1})}catch(e){ef=!1}IS.exports=ef});var nf=F((Hz,FS)=>{"use strict";g();var AL=tn(),rf=AL("%Object.getOwnPropertyDescriptor%",!0);if(rf)try{rf([],"length")}catch(e){rf=null}FS.exports=rf});var af=F((Gz,DS)=>{"use strict";g();var $S=tf(),kL=Cm(),Hs=Xn(),LS=nf();DS.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Hs("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Hs("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Hs("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Hs("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Hs("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Hs("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!LS&&LS(t,r);if($S)$S(t,r,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(o||!i&&!a&&!s)t[r]=n;else throw new kL("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var sf=F((Vz,BS)=>{"use strict";g();var Im=tf(),NS=function(){return!!Im};NS.hasArrayLengthDefineBug=function(){if(!Im)return null;try{return Im([],"length",{value:1}).length!==1}catch(t){return!0}};BS.exports=NS});var Ci=F((qz,GS)=>{"use strict";g();var TL=Xu(),CL=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",PL=Object.prototype.toString,RL=Array.prototype.concat,jS=af(),ML=function(e){return typeof e=="function"&&PL.call(e)==="[object Function]"},HS=sf()(),OL=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!ML(n)||!n())return}HS?jS(e,t,r,!0):jS(e,t,r)},US=function(e,t){var r=arguments.length>2?arguments[2]:{},n=TL(t);CL&&(n=RL.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i{"use strict";g();var IL=tn(),zS=af(),FL=sf()(),VS=nf(),WS=Xn(),$L=IL("%Math.floor%");qS.exports=function(t,r){if(typeof t!="function")throw new WS("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||$L(r)!==r)throw new WS("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&VS){var s=VS(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(a=!1)}return(i||a||!n)&&(FL?zS(t,"length",r,!0,!0):zS(t,"length",r)),t}});var xa=F((Kz,of)=>{"use strict";g();var Fm=Ku(),lf=tn(),LL=YS(),DL=Xn(),KS=lf("%Function.prototype.apply%"),JS=lf("%Function.prototype.call%"),QS=lf("%Reflect.apply%",!0)||Fm.call(JS,KS),XS=tf(),NL=lf("%Math.max%");of.exports=function(t){if(typeof t!="function")throw new DL("a function is required");var r=QS(Fm,JS,arguments);return LL(r,1+NL(0,t.length-(arguments.length-1)),!0)};var ZS=function(){return QS(Fm,KS,arguments)};XS?XS(of.exports,"apply",{value:ZS}):of.exports.apply=ZS});var br=F((Qz,rE)=>{"use strict";g();var eE=tn(),tE=xa(),BL=tE(eE("String.prototype.indexOf"));rE.exports=function(t,r){var n=eE(t,!!r);return typeof n=="function"&&BL(t,".prototype.")>-1?tE(n):n}});var $m=F((tV,oE)=>{"use strict";g();var jL=Xu(),aE=Dl()(),sE=br(),nE=Object,HL=sE("Array.prototype.push"),iE=sE("Object.prototype.propertyIsEnumerable"),UL=aE?Object.getOwnPropertySymbols:null;oE.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=nE(t);if(arguments.length===1)return n;for(var i=1;i{"use strict";g();var Lm=$m(),GL=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";g();var VL=Ci(),WL=Dm();cE.exports=function(){var t=WL();return VL(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}});var pE=F((oV,hE)=>{"use strict";g();var qL=Ci(),YL=xa(),XL=$m(),fE=Dm(),ZL=uE(),KL=YL.apply(fE()),dE=function(t,r){return KL(Object,arguments)};qL(dE,{getPolyfill:fE,implementation:XL,shim:ZL});hE.exports=dE});var gE=F((cV,mE)=>{"use strict";g();var jl=function(){return typeof function(){}.name=="string"},Bl=Object.getOwnPropertyDescriptor;if(Bl)try{Bl([],"length")}catch(e){Bl=null}jl.functionsHaveConfigurableNames=function(){if(!jl()||!Bl)return!1;var t=Bl(function(){},"name");return!!t&&!!t.configurable};var JL=Function.prototype.bind;jl.boundFunctionsHaveNames=function(){return jl()&&typeof JL=="function"&&function(){}.bind().name!==""};mE.exports=jl});var wE=F((fV,yE)=>{"use strict";g();var vE=af(),QL=sf()(),eD=gE().functionsHaveConfigurableNames(),tD=Xn();yE.exports=function(t,r){if(typeof t!="function")throw new tD("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||eD)&&(QL?vE(t,"name",r,!0,!0):vE(t,"name",r)),t}});var Nm=F((hV,bE)=>{"use strict";g();var rD=wE(),nD=Xn(),iD=Object;bE.exports=rD(function(){if(this==null||this!==iD(this))throw new nD("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0)});var Bm=F((mV,_E)=>{"use strict";g();var aD=Nm(),sD=Ci().supportsDescriptors,oD=Object.getOwnPropertyDescriptor;_E.exports=function(){if(sD&&/a/mig.flags==="gim"){var t=oD(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),t.get.call(n),r==="dy")return t.get}}return aD}});var EE=F((vV,SE)=>{"use strict";g();var lD=Ci().supportsDescriptors,cD=Bm(),uD=Object.getOwnPropertyDescriptor,fD=Object.defineProperty,dD=TypeError,xE=Object.getPrototypeOf,hD=/a/;SE.exports=function(){if(!lD||!xE)throw new dD("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=cD(),r=xE(hD),n=uD(r,"flags");return(!n||n.get!==t)&&fD(r,"flags",{configurable:!0,enumerable:!1,get:t}),t}});var CE=F((wV,TE)=>{"use strict";g();var pD=Ci(),mD=xa(),gD=Nm(),AE=Bm(),vD=EE(),kE=mD(AE());pD(kE,{getPolyfill:AE,implementation:gD,shim:vD});TE.exports=kE});var Pi=F((_V,PE)=>{"use strict";g();var yD=Dl();PE.exports=function(){return yD()&&!!Symbol.toStringTag}});var Hm=F((SV,ME)=>{"use strict";g();var wD=Pi()(),bD=br(),jm=bD("Object.prototype.toString"),cf=function(t){return wD&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:jm(t)==="[object Arguments]"},RE=function(t){return cf(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&jm(t)!=="[object Array]"&&jm(t.callee)==="[object Function]"},_D=function(){return cf(arguments)}();cf.isLegacyArguments=RE;ME.exports=_D?cf:RE});var OE=F(()=>{g()});var JE=F((CV,KE)=>{g();var Km=typeof Map=="function"&&Map.prototype,Um=Object.getOwnPropertyDescriptor&&Km?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ff=Km&&Um&&typeof Um.get=="function"?Um.get:null,IE=Km&&Map.prototype.forEach,Jm=typeof Set=="function"&&Set.prototype,Gm=Object.getOwnPropertyDescriptor&&Jm?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,df=Jm&&Gm&&typeof Gm.get=="function"?Gm.get:null,FE=Jm&&Set.prototype.forEach,xD=typeof WeakMap=="function"&&WeakMap.prototype,Ul=xD?WeakMap.prototype.has:null,SD=typeof WeakSet=="function"&&WeakSet.prototype,Gl=SD?WeakSet.prototype.has:null,ED=typeof WeakRef=="function"&&WeakRef.prototype,$E=ED?WeakRef.prototype.deref:null,AD=Boolean.prototype.valueOf,kD=Object.prototype.toString,TD=Function.prototype.toString,CD=String.prototype.match,Qm=String.prototype.slice,Mi=String.prototype.replace,PD=String.prototype.toUpperCase,LE=String.prototype.toLowerCase,VE=RegExp.prototype.test,DE=Array.prototype.concat,An=Array.prototype.join,RD=Array.prototype.slice,NE=Math.floor,Wm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,zm=Object.getOwnPropertySymbols,qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Us=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Us||!0)?Symbol.toStringTag:null,WE=Object.prototype.propertyIsEnumerable,BE=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function jE(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||VE.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-NE(-e):NE(e);if(n!==e){var i=String(n),a=Qm.call(t,i.length+1);return Mi.call(i,r,"$&_")+"."+Mi.call(Mi.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mi.call(t,r,"$&_")}var Ym=OE(),HE=Ym.custom,UE=YE(HE)?HE:null;KE.exports=function e(t,r,n,i){var a=r||{};if(Ri(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ri(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Ri(a,"customInspect")?a.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ri(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ri(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=a.numericSeparator;if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ZE(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return o?jE(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return o?jE(t,c):c}var u=typeof a.depth=="undefined"?5:a.depth;if(typeof n=="undefined"&&(n=0),n>=u&&u>0&&typeof t=="object")return Xm(t)?"[Array]":"[Object]";var f=YD(a,n);if(typeof i=="undefined")i=[];else if(XE(i,t)>=0)return"[Circular]";function d(N,L,ee){if(L&&(i=RD.call(i),i.push(L)),ee){var fe={depth:a.depth};return Ri(a,"quoteStyle")&&(fe.quoteStyle=a.quoteStyle),e(N,fe,n+1,i)}return e(N,a,n+1,i)}if(typeof t=="function"&&!GE(t)){var h=BD(t),p=uf(t,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+An.call(p,", ")+" }":"")}if(YE(t)){var m=Us?Mi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):qm.call(t);return typeof t=="object"&&!Us?Hl(m):m}if(VD(t)){for(var v="<"+LE.call(String(t.nodeName)),y=t.attributes||[],b=0;b",v}if(Xm(t)){if(t.length===0)return"[]";var x=uf(t,d);return f&&!qD(x)?"["+Zm(x,f)+"]":"[ "+An.call(x,", ")+" ]"}if(ID(t)){var E=uf(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!WE.call(t,"cause")?"{ ["+String(t)+"] "+An.call(DE.call("[cause]: "+d(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+An.call(E,", ")+" }"}if(typeof t=="object"&&s){if(UE&&typeof t[UE]=="function"&&Ym)return Ym(t,{depth:u-n});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(jD(t)){var _=[];return IE&&IE.call(t,function(N,L){_.push(d(L,t,!0)+" => "+d(N,t))}),zE("Map",ff.call(t),_,f)}if(GD(t)){var k=[];return FE&&FE.call(t,function(N){k.push(d(N,t))}),zE("Set",df.call(t),k,f)}if(HD(t))return Vm("WeakMap");if(zD(t))return Vm("WeakSet");if(UD(t))return Vm("WeakRef");if($D(t))return Hl(d(Number(t)));if(DD(t))return Hl(d(Wm.call(t)));if(LD(t))return Hl(AD.call(t));if(FD(t))return Hl(d(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof global!="undefined"&&t===global)return"{ [object globalThis] }";if(!OD(t)&&!GE(t)){var w=uf(t,d),A=BE?BE(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",T=!A&&Ot&&Object(t)===t&&Ot in t?Qm.call(Oi(t),8,-1):S?"Object":"",P=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",I=P+(T||S?"["+An.call(DE.call([],T||[],S||[]),": ")+"] ":"");return w.length===0?I+"{}":f?I+"{"+Zm(w,f)+"}":I+"{ "+An.call(w,", ")+" }"}return String(t)};function qE(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function MD(e){return Mi.call(String(e),/"/g,""")}function Xm(e){return Oi(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function OD(e){return Oi(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function GE(e){return Oi(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function ID(e){return Oi(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function FD(e){return Oi(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function $D(e){return Oi(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function LD(e){return Oi(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function YE(e){if(Us)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!qm)return!1;try{return qm.call(e),!0}catch(t){}return!1}function DD(e){if(!e||typeof e!="object"||!Wm)return!1;try{return Wm.call(e),!0}catch(t){}return!1}var ND=Object.prototype.hasOwnProperty||function(e){return e in this};function Ri(e,t){return ND.call(e,t)}function Oi(e){return kD.call(e)}function BD(e){if(e.name)return e.name;var t=CD.call(TD.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function XE(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ZE(Qm.call(e,0,t.maxStringLength),t)+n}var i=Mi.call(Mi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,WD);return qE(i,"single",t)}function WD(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+PD.call(t.toString(16))}function Hl(e){return"Object("+e+")"}function Vm(e){return e+" { ? }"}function zE(e,t,r,n){var i=n?Zm(r,n):An.call(r,", ");return e+" ("+t+") {"+i+"}"}function qD(e){for(var t=0;t=0)return!1;return!0}function YD(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=An.call(Array(e.indent+1)," ");else return null;return{base:r,prev:An.call(Array(t+1),r)}}function Zm(e,t){if(e.length===0)return"";var r=` -`+t.prev+t.base;return r+An.call(e,","+r)+` -`+t.prev}function uf(e,t){var r=Xm(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";g();var QE=tn(),Gs=br(),XD=JE(),ZD=Xn(),hf=QE("%WeakMap%",!0),pf=QE("%Map%",!0),KD=Gs("WeakMap.prototype.get",!0),JD=Gs("WeakMap.prototype.set",!0),QD=Gs("WeakMap.prototype.has",!0),eN=Gs("Map.prototype.get",!0),tN=Gs("Map.prototype.set",!0),rN=Gs("Map.prototype.has",!0),eg=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},nN=function(e,t){var r=eg(e,t);return r&&r.value},iN=function(e,t,r){var n=eg(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},aN=function(e,t){return!!eg(e,t)};eA.exports=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new ZD("Side channel does not contain "+XD(a))},get:function(a){if(hf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return KD(t,a)}else if(pf){if(r)return eN(r,a)}else if(n)return nN(n,a)},has:function(a){if(hf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return QD(t,a)}else if(pf){if(r)return rN(r,a)}else if(n)return aN(n,a);return!1},set:function(a,s){hf&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new hf),JD(t,a,s)):pf?(r||(r=new pf),tN(r,a,s)):(n||(n={key:{},next:null}),iN(n,a,s))}};return i}});var rA=F((OV,tA)=>{"use strict";g();var sN=Rm(),zl=tg()(),Zn=Xn(),rg={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");if(zl.assert(e),!rg.has(e,t))throw new Zn("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=zl.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=zl.get(e);return!!r&&sN(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var n=zl.get(e);n||(n={},zl.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(rg);tA.exports=rg});var aA=F((FV,iA)=>{"use strict";g();var Vl=rA(),oN=SyntaxError,nA=typeof StopIteration=="object"?StopIteration:null;iA.exports=function(t){if(!nA)throw new oN("this environment lacks StopIteration");Vl.set(t,"[[Done]]",!1);var r={next:function(){var i=Vl.get(this,"[[Iterator]]"),a=Vl.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(s){if(Vl.set(i,"[[Done]]",!0),s!==nA)throw s;return{done:!0,value:void 0}}}};return Vl.set(r,"[[Iterator]]",t),r}});var ng=F((LV,sA)=>{g();var lN={}.toString;sA.exports=Array.isArray||function(e){return lN.call(e)=="[object Array]"}});var ig=F((NV,oA)=>{"use strict";g();var cN=String.prototype.valueOf,uN=function(t){try{return cN.call(t),!0}catch(r){return!1}},fN=Object.prototype.toString,dN="[object String]",hN=Pi()();oA.exports=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:hN?uN(t):fN.call(t)===dN}});var sg=F((jV,uA)=>{"use strict";g();var ag=typeof Map=="function"&&Map.prototype?Map:null,pN=typeof Set=="function"&&Set.prototype?Set:null,mf;ag||(mf=function(t){return!1});var cA=ag?Map.prototype.has:null,lA=pN?Set.prototype.has:null;!mf&&!cA&&(mf=function(t){return!1});uA.exports=mf||function(t){if(!t||typeof t!="object")return!1;try{if(cA.call(t),lA)try{lA.call(t)}catch(r){return!0}return t instanceof ag}catch(r){}return!1}});var lg=F((UV,hA)=>{"use strict";g();var mN=typeof Map=="function"&&Map.prototype?Map:null,og=typeof Set=="function"&&Set.prototype?Set:null,gf;og||(gf=function(t){return!1});var fA=mN?Map.prototype.has:null,dA=og?Set.prototype.has:null;!gf&&!dA&&(gf=function(t){return!1});hA.exports=gf||function(t){if(!t||typeof t!="object")return!1;try{if(dA.call(t),fA)try{fA.call(t)}catch(r){return!0}return t instanceof og}catch(r){}return!1}});var AA=F((zV,wf)=>{"use strict";g();var pA=Hm(),mA=aA();Zu()()||Dl()()?(vf=Symbol.iterator,wf.exports=function(t){if(t!=null&&typeof t[vf]!="undefined")return t[vf]();if(pA(t))return Array.prototype[vf].call(t)}):(gA=ng(),vA=ig(),cg=tn(),yA=cg("%Map%",!0),wA=cg("%Set%",!0),Dr=br(),ug=Dr("Array.prototype.push"),fg=Dr("String.prototype.charCodeAt"),bA=Dr("String.prototype.slice"),_A=function(t,r){var n=t.length;if(r+1>=n)return r+1;var i=fg(t,r);if(i<55296||i>56319)return r+1;var a=fg(t,r+1);return a<56320||a>57343?r+1:r+2},yf=function(t){var r=0;return{next:function(){var i=r>=t.length,a;return i||(a=t[r],r+=1),{done:i,value:a}}}},dg=function(t,r){if(gA(t)||pA(t))return yf(t);if(vA(t)){var n=0;return{next:function(){var a=_A(t,n),s=bA(t,n,a);return n=a,{done:a>t.length,value:s}}}}if(r&&typeof t["_es6-shim iterator_"]!="undefined")return t["_es6-shim iterator_"]()},!yA&&!wA?wf.exports=function(t){if(t!=null)return dg(t,!0)}:(xA=sg(),SA=lg(),hg=Dr("Map.prototype.forEach",!0),pg=Dr("Set.prototype.forEach",!0),(typeof process=="undefined"||!process.versions||!process.versions.node)&&(mg=Dr("Map.prototype.iterator",!0),gg=Dr("Set.prototype.iterator",!0)),vg=Dr("Map.prototype.@@iterator",!0)||Dr("Map.prototype._es6-shim iterator_",!0),yg=Dr("Set.prototype.@@iterator",!0)||Dr("Set.prototype._es6-shim iterator_",!0),EA=function(t){if(xA(t)){if(mg)return mA(mg(t));if(vg)return vg(t);if(hg){var r=[];return hg(t,function(i,a){ug(r,[a,i])}),yf(r)}}if(SA(t)){if(gg)return mA(gg(t));if(yg)return yg(t);if(pg){var n=[];return pg(t,function(i){ug(n,i)}),yf(n)}}},wf.exports=function(t){return EA(t)||dg(t)}));var vf,gA,vA,cg,yA,wA,Dr,ug,fg,bA,_A,yf,dg,xA,SA,hg,pg,mg,gg,vg,yg,EA});var wg=F((WV,TA)=>{"use strict";g();var kA=function(e){return e!==e};TA.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||kA(t)&&kA(r))}});var bg=F((YV,CA)=>{"use strict";g();var gN=wg();CA.exports=function(){return typeof Object.is=="function"?Object.is:gN}});var RA=F((ZV,PA)=>{"use strict";g();var vN=bg(),yN=Ci();PA.exports=function(){var t=vN();return yN(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var FA=F((JV,IA)=>{"use strict";g();var wN=Ci(),bN=xa(),_N=wg(),MA=bg(),xN=RA(),OA=bN(MA(),Object);wN(OA,{getPolyfill:MA,implementation:_N,shim:xN});IA.exports=OA});var xg=F((eW,NA)=>{"use strict";g();var SN=xa(),DA=br(),EN=tn(),_g=EN("%ArrayBuffer%",!0),bf=DA("ArrayBuffer.prototype.byteLength",!0),AN=DA("Object.prototype.toString"),$A=!!_g&&!bf&&new _g(0).slice,LA=!!$A&&SN($A);NA.exports=bf||LA?function(t){if(!t||typeof t!="object")return!1;try{return bf?bf(t):LA(t,0),!0}catch(r){return!1}}:_g?function(t){return AN(t)==="[object ArrayBuffer]"}:function(t){return!1}});var jA=F((rW,BA)=>{"use strict";g();var kN=Date.prototype.getDay,TN=function(t){try{return kN.call(t),!0}catch(r){return!1}},CN=Object.prototype.toString,PN="[object Date]",RN=Pi()();BA.exports=function(t){return typeof t!="object"||t===null?!1:RN?TN(t):CN.call(t)===PN}});var VA=F((iW,zA)=>{"use strict";g();var Sg=br(),HA=Pi()(),UA,GA,Eg,Ag;HA&&(UA=Sg("Object.prototype.hasOwnProperty"),GA=Sg("RegExp.prototype.exec"),Eg={},_f=function(){throw Eg},Ag={toString:_f,valueOf:_f},typeof Symbol.toPrimitive=="symbol"&&(Ag[Symbol.toPrimitive]=_f));var _f,MN=Sg("Object.prototype.toString"),ON=Object.getOwnPropertyDescriptor,IN="[object RegExp]";zA.exports=HA?function(t){if(!t||typeof t!="object")return!1;var r=ON(t,"lastIndex"),n=r&&UA(r,"value");if(!n)return!1;try{GA(t,Ag)}catch(i){return i===Eg}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:MN(t)===IN}});var YA=F((sW,qA)=>{"use strict";g();var FN=br(),WA=FN("SharedArrayBuffer.prototype.byteLength",!0);qA.exports=WA?function(t){if(!t||typeof t!="object")return!1;try{return WA(t),!0}catch(r){return!1}}:function(t){return!1}});var ZA=F((lW,XA)=>{"use strict";g();var $N=Number.prototype.toString,LN=function(t){try{return $N.call(t),!0}catch(r){return!1}},DN=Object.prototype.toString,NN="[object Number]",BN=Pi()();XA.exports=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:BN?LN(t):DN.call(t)===NN}});var QA=F((uW,JA)=>{"use strict";g();var KA=br(),jN=KA("Boolean.prototype.toString"),HN=KA("Object.prototype.toString"),UN=function(t){try{return jN(t),!0}catch(r){return!1}},GN="[object Boolean]",zN=Pi()();JA.exports=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:zN&&Symbol.toStringTag in t?UN(t):HN(t)===GN}});var nk=F((dW,kg)=>{"use strict";g();var VN=Object.prototype.toString,WN=Zu()();WN?(ek=Symbol.prototype.toString,tk=/^Symbol\(.*\)$/,rk=function(t){return typeof t.valueOf()!="symbol"?!1:tk.test(ek.call(t))},kg.exports=function(t){if(typeof t=="symbol")return!0;if(VN.call(t)!=="[object Symbol]")return!1;try{return rk(t)}catch(r){return!1}}):kg.exports=function(t){return!1};var ek,tk,rk});var sk=F((pW,ak)=>{"use strict";g();var ik=typeof BigInt!="undefined"&&BigInt;ak.exports=function(){return typeof ik=="function"&&typeof BigInt=="function"&&typeof ik(42)=="bigint"&&typeof BigInt(42)=="bigint"}});var ck=F((gW,Tg)=>{"use strict";g();var qN=sk()();qN?(ok=BigInt.prototype.valueOf,lk=function(t){try{return ok.call(t),!0}catch(r){}return!1},Tg.exports=function(t){return t===null||typeof t=="undefined"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:lk(t)}):Tg.exports=function(t){return!1};var ok,lk});var fk=F((yW,uk)=>{"use strict";g();var YN=ig(),XN=ZA(),ZN=QA(),KN=nk(),JN=ck();uk.exports=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(YN(t))return"String";if(XN(t))return"Number";if(ZN(t))return"Boolean";if(KN(t))return"Symbol";if(JN(t))return"BigInt"}});var pk=F((bW,hk)=>{"use strict";g();var xf=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,dk=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Sf;xf||(Sf=function(t){return!1});var Pg=xf?xf.prototype.has:null,Cg=dk?dk.prototype.has:null;!Sf&&!Pg&&(Sf=function(t){return!1});hk.exports=Sf||function(t){if(!t||typeof t!="object")return!1;try{if(Pg.call(t,Pg),Cg)try{Cg.call(t,Cg)}catch(r){return!0}return t instanceof xf}catch(r){}return!1}});var gk=F((xW,Mg)=>{"use strict";g();var QN=tn(),mk=br(),eB=QN("%WeakSet%",!0),Rg=mk("WeakSet.prototype.has",!0);Rg?(Ef=mk("WeakMap.prototype.has",!0),Mg.exports=function(t){if(!t||typeof t!="object")return!1;try{if(Rg(t,Rg),Ef)try{Ef(t,Ef)}catch(r){return!0}return t instanceof eB}catch(r){}return!1}):Mg.exports=function(t){return!1};var Ef});var yk=F((EW,vk)=>{"use strict";g();var tB=sg(),rB=lg(),nB=pk(),iB=gk();vk.exports=function(t){if(t&&typeof t=="object"){if(tB(t))return"Map";if(rB(t))return"Set";if(nB(t))return"WeakMap";if(iB(t))return"WeakSet"}return!1}});var xk=F((kW,_k)=>{"use strict";g();var bk=Function.prototype.toString,zs=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ig,Af;if(typeof zs=="function"&&typeof Object.defineProperty=="function")try{Ig=Object.defineProperty({},"length",{get:function(){throw Af}}),Af={},zs(function(){throw 42},null,Ig)}catch(e){e!==Af&&(zs=null)}else zs=null;var aB=/^\s*class\b/,Fg=function(t){try{var r=bk.call(t);return aB.test(r)}catch(n){return!1}},Og=function(t){try{return Fg(t)?!1:(bk.call(t),!0)}catch(r){return!1}},kf=Object.prototype.toString,sB="[object Object]",oB="[object Function]",lB="[object GeneratorFunction]",cB="[object HTMLAllCollection]",uB="[object HTML document.all class]",fB="[object HTMLCollection]",dB=typeof Symbol=="function"&&!!Symbol.toStringTag,hB=!(0 in[,]),$g=function(){return!1};typeof document=="object"&&(wk=document.all,kf.call(wk)===kf.call(document.all)&&($g=function(t){if((hB||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=kf.call(t);return(r===cB||r===uB||r===fB||r===sB)&&t("")==null}catch(n){}return!1}));var wk;_k.exports=zs?function(t){if($g(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{zs(t,null,Ig)}catch(r){if(r!==Af)return!1}return!Fg(t)&&Og(t)}:function(t){if($g(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(dB)return Og(t);if(Fg(t))return!1;var r=kf.call(t);return r!==oB&&r!==lB&&!/^\[object HTML/.test(r)?!1:Og(t)}});var Ak=F((CW,Ek)=>{"use strict";g();var pB=xk(),mB=Object.prototype.toString,Sk=Object.prototype.hasOwnProperty,gB=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),mB.call(t)==="[object Array]"?gB(t,r,i):typeof t=="string"?vB(t,r,i):yB(t,r,i)};Ek.exports=wB});var Tk=F((RW,kk)=>{"use strict";g();kk.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var Pk=F((OW,Ck)=>{"use strict";g();var Lg=Tk(),bB=typeof globalThis=="undefined"?global:globalThis;Ck.exports=function(){for(var t=[],r=0;r{"use strict";g();var Cf=Ak(),_B=Pk(),Rk=xa(),Bg=br(),Tf=nf(),xB=Bg("Object.prototype.toString"),Ok=Pi()(),Mk=typeof globalThis=="undefined"?global:globalThis,Ng=_B(),jg=Bg("String.prototype.slice"),Dg=Object.getPrototypeOf,SB=Bg("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:AB(t)}return Tf?EB(t):null}});var Dk=F((LW,Lk)=>{"use strict";g();var kB=br(),$k=kB("ArrayBuffer.prototype.byteLength",!0),TB=xg();Lk.exports=function(t){return TB(t)?$k?$k(t):t.byteLength:NaN}});var lT=F((NW,oT)=>{"use strict";g();var iT=pE(),kn=br(),Nk=CE(),CB=tn(),Vs=AA(),PB=tg(),Bk=FA(),jk=Hm(),Hk=ng(),Uk=xg(),Gk=jA(),zk=VA(),Vk=YA(),Wk=Xu(),qk=fk(),Yk=yk(),Xk=Fk(),Zk=Dk(),Kk=kn("SharedArrayBuffer.prototype.byteLength",!0),Jk=kn("Date.prototype.getTime"),Hg=Object.getPrototypeOf,Qk=kn("Object.prototype.toString"),Mf=CB("%Set%",!0),Ug=kn("Map.prototype.has",!0),Of=kn("Map.prototype.get",!0),eT=kn("Map.prototype.size",!0),If=kn("Set.prototype.add",!0),aT=kn("Set.prototype.delete",!0),Ff=kn("Set.prototype.has",!0),Rf=kn("Set.prototype.size",!0);function tT(e,t,r,n){for(var i=Vs(e),a;(a=i.next())&&!a.done;)if(rn(t,a.value,r,n))return aT(e,a.value),!0;return!1}function sT(e){if(typeof e=="undefined")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function RB(e,t,r,n,i,a){var s=sT(r);if(s!=null)return s;var o=Of(t,s),l=iT({},i,{strict:!1});return typeof o=="undefined"&&!Ug(t,s)||!rn(n,o,l,a)?!1:!Ug(e,s)&&rn(n,o,l,a)}function MB(e,t,r){var n=sT(r);return n!=null?n:Ff(t,n)&&!Ff(e,n)}function rT(e,t,r,n,i,a){for(var s=Vs(e),o,l;(o=s.next())&&!o.done;)if(l=o.value,rn(r,l,i,a)&&rn(n,Of(t,l),i,a))return aT(e,l),!0;return!1}function rn(e,t,r,n){var i=r||{};if(i.strict?Bk(e,t):e===t)return!0;var a=qk(e),s=qk(t);if(a!==s)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return i.strict?Bk(e,t):e==t;var o=n.has(e),l=n.has(t),c;if(o&&l){if(n.get(e)===n.get(t))return!0}else c={};return o||n.set(e,c),l||n.set(t,c),FB(e,t,i,n)}function nT(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function OB(e,t,r,n){if(Rf(e)!==Rf(t))return!1;for(var i=Vs(e),a=Vs(t),s,o,l;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object")l||(l=new Mf),If(l,s.value);else if(!Ff(t,s.value)){if(r.strict||!MB(e,t,s.value))return!1;l||(l=new Mf),If(l,s.value)}if(l){for(;(o=a.next())&&!o.done;)if(o.value&&typeof o.value=="object"){if(!tT(l,o.value,r.strict,n))return!1}else if(!r.strict&&!Ff(e,o.value)&&!tT(l,o.value,r.strict,n))return!1;return Rf(l)===0}return!0}function IB(e,t,r,n){if(eT(e)!==eT(t))return!1;for(var i=Vs(e),a=Vs(t),s,o,l,c,u,f;(s=i.next())&&!s.done;)if(c=s.value[0],u=s.value[1],c&&typeof c=="object")l||(l=new Mf),If(l,c);else if(f=Of(t,c),typeof f=="undefined"&&!Ug(t,c)||!rn(u,f,r,n)){if(r.strict||!RB(e,t,c,u,r,n))return!1;l||(l=new Mf),If(l,c)}if(l){for(;(o=a.next())&&!o.done;)if(c=o.value[0],f=o.value[1],c&&typeof c=="object"){if(!rT(l,e,c,f,r,n))return!1}else if(!r.strict&&(!e.has(c)||!rn(Of(e,c),f,r,n))&&!rT(l,e,c,f,iT({},r,{strict:!1}),n))return!1;return Rf(l)===0}return!0}function FB(e,t,r,n){var i,a;if(typeof e!=typeof t||e==null||t==null||Qk(e)!==Qk(t)||jk(e)!==jk(t))return!1;var s=Hk(e),o=Hk(t);if(s!==o)return!1;var l=e instanceof Error,c=t instanceof Error;if(l!==c||(l||c)&&(e.name!==t.name||e.message!==t.message))return!1;var u=zk(e),f=zk(t);if(u!==f||(u||f)&&(e.source!==t.source||Nk(e)!==Nk(t)))return!1;var d=Gk(e),h=Gk(t);if(d!==h||(d||h)&&Jk(e)!==Jk(t)||r.strict&&Hg&&Hg(e)!==Hg(t))return!1;var p=Xk(e),m=Xk(t);if(p!==m)return!1;if(p||m){if(e.length!==t.length)return!1;for(i=0;i=0;i--)if(k[i]!=w[i])return!1;for(i=k.length-1;i>=0;i--)if(a=k[i],!rn(e[a],t[a],r,n))return!1;var A=Yk(e),S=Yk(t);return A!==S?!1:A==="Set"||S==="Set"?OB(e,t,r,n):A==="Map"?IB(e,t,r,n):!0}oT.exports=function(t,r,n){return rn(t,r,n,PB())}});var Zg=F((exports,module)=>{g();(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(i){return t.create().update(i)};for(var r=0;r>2]|=e[i]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|n&63)<=57344?(o[a>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|n&63)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|n&63)<=64?(this.block=o[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=this.blocks,c,u,f,d,h,p,m,v,y,b,x;for(c=16;c<64;++c)h=l[c-15],u=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,h=l[c-2],f=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,l[c]=l[c-16]+u+l[c-7]+f<<0;for(x=t&r,c=0;c<64;c+=4)this.first?(this.is224?(v=300032,h=l[0]-1413257819,o=h-150054599<<0,n=h+24177077<<0):(v=704751109,h=l[0]-210244248,o=h-1521486534<<0,n=h+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),f=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),v=e&t,d=v^e&r^x,m=i&a^~i&s,h=o+f+m+K[c]+l[c],p=u+d,o=n+h<<0,n=h+p<<0),u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&e,d=y^n&t^v,m=o&i^~o&a,h=s+f+m+K[c+1]+l[c+1],p=u+d,s=r+h<<0,r=h+p<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),f=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&n,d=b^r&e^y,m=s&o^~s&i,h=a+f+m+K[c+2]+l[c+2],p=u+d,a=t+h<<0,t=h+p<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&r,d=x^t&n^b,m=a&s^~a&o,h=i+f+m+K[c+3]+l[c+3],p=u+d,i=e+h<<0,e=h+p<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+n<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+s<<0,this.h7=this.h7+o<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15];return this.is224||(l+=HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15]),l},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,r>>24&255,r>>16&255,r>>8&255,r&255,n>>24&255,n>>16&255,n>>8&255,n&255,i>>24&255,i>>16&255,i>>8&255,i&255,a>>24&255,a>>16&255,a>>8&255,a&255,s>>24&255,s>>16&255,s>>8&255,s&255];return this.is224||l.push(o>>24&255,o>>16&255,o>>8&255,o&255),l},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function HmacSha256(e,t,r){var n,i=typeof e;if(i==="string"){var a=[],s=e.length,o=0,l;for(n=0;n>6,a[o++]=128|l&63):l<55296||l>=57344?(a[o++]=224|l>>12,a[o++]=128|l>>6&63,a[o++]=128|l&63):(l=65536+((l&1023)<<10|e.charCodeAt(++n)&1023),a[o++]=240|l>>18,a[o++]=128|l>>12&63,a[o++]=128|l>>6&63,a[o++]=128|l&63);e=a}else if(i==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(t,!0).update(e).array());var c=[],u=[];for(n=0;n<64;++n){var f=e[n]||0;c[n]=92^f,u[n]=54^f}Sha256.call(this,t,r),this.update(u),this.oKeyPad=c,this.inner=!0,this.sharedMemory=r}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var MC=F(A0=>{g();(function(e){var t=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,a=/\\/g,s=/\u2028/,o=/\u2029/;e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(A,S){var T=A.length,P=0,I=1,N=2,L=P,ee=null,fe=null,J="",Q=[],Pe=!1,ge=0,z=0,Y="{{",O="}}";function he(){J.length>0&&(Q.push({tag:"_t",text:new String(J)}),J="")}function ze(){for(var ct=!0,rt=z;rt"&&(Ie.indent=Q[Et].text.toString()),Q.splice(Et,1));else rt||Q.push({tag:` -`});Pe=!1,z=Q.length}function Re(ct,rt){var Et="="+O,Ie=ct.indexOf(Et,rt),H=c(ct.substring(ct.indexOf("=",rt)+1,Ie)).split(" ");return Y=H[0],O=H[H.length-1],Ie+Et.length-1}for(S&&(S=S.split(" "),Y=S[0],O=S[1]),ge=0;ge0;){if(L=w.shift(),N&&N.tag=="<"&&!(L.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[L.tag]<=e.tags.$||h(L,T))S.push(L),L.nodes=d(w,L.tag,S,T);else if(L.tag=="/"){if(S.length===0)throw new Error("Closing tag without opener: /"+L.n);if(I=S.pop(),L.n!=I.n&&!p(L.n,I.n,T))throw new Error("Nesting error: "+I.n+" vs. "+L.n);return I.end=L.i,P}else L.tag==` -`&&(L.last=w.length==0||w[0].tag==` -`);P.push(L)}if(S.length>0)throw new Error("missing closing tag: "+S.pop().n);return P}function h(w,A){for(var S=0,T=A.length;S":E,"<":function(w,A){var S={partials:{},code:"",subs:{},inPartial:!0};e.walk(w.nodes,S);var T=A.partials[E(w,A)];T.subs=S.subs,T.partials=S.partials},$:function(w,A){var S={subs:{},code:"",partials:A.partials,prefix:w.n};e.walk(w.nodes,S),A.subs[w.n]=S.code,A.inPartial||(A.code+='t.sub("'+b(w.n)+'",c,p,i);')},"\n":function(w,A){A.code+=k('"\\n"'+(w.last?"":" + i"))},_v:function(w,A){A.code+="t.b(t.v(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'},_t:function(w,A){A.code+=k('"'+b(w.text)+'"')},"{":_,"&":_};function _(w,A){A.code+="t.b(t.t(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'}function k(w){return"t.b("+w+");"}e.walk=function(w,A){for(var S,T=0,P=w.length;T{g();var qj={};(function(e){e.Template=function(d,h,p,m){d=d||{},this.r=d.code||this.r,this.c=p,this.options=m||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},e.Template.prototype={r:function(d,h,p){return""},v:u,t:c,render:function(h,p,m){return this.ri([h],p||{},m)},ri:function(d,h,p){return this.r(d,h,p)},ep:function(d,h){var p=this.partials[d],m=h[p.name];if(p.instance&&p.base==m)return p.instance;if(typeof m=="string"){if(!this.c)throw new Error("No compiler available.");m=this.c.compile(m,this.options)}if(!m)return null;if(this.partials[d].base=m,p.subs){h.stackText||(h.stackText={});for(key in p.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);m=r(m,p.subs,p.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=m,m},rp:function(d,h,p,m){var v=this.ep(d,p);return v?v.ri(h,p,m):""},rs:function(d,h,p){var m=d[d.length-1];if(!f(m)){p(d,h,this);return}for(var v=0;v=0;E--)if(y=h[E],v=t(d,y,x),v!==void 0){b=!0;break}return b?(!m&&typeof v=="function"&&(v=this.mv(v,h,p)),v):m?!1:""},ls:function(d,h,p,m,v){var y=this.options.delimiters;return this.options.delimiters=v,this.b(this.ct(c(d.call(h,m)),h,p)),this.options.delimiters=y,!1},ct:function(d,h,p){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(d,this.options).render(h,p)},b:function(d){this.buf+=d},fl:function(){var d=this.buf;return this.buf="",d},ms:function(d,h,p,m,v,y,b){var x,E=h[h.length-1],_=d.call(E);return typeof _=="function"?m?!0:(x=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(_,E,p,x.substring(v,y),b)):_},mv:function(d,h,p){var m=h[h.length-1],v=d.call(m);return typeof v=="function"?this.ct(c(v.call(m)),m,p):v},sub:function(d,h,p,m){var v=this.subs[d];v&&(this.activeSub=d,v(h,p,this,m),this.activeSub=!1)}};function t(d,h,p){var m;return h&&typeof h=="object"&&(h[d]!==void 0?m=h[d]:p&&h.get&&typeof h.get=="function"&&(m=h.get(d))),m}function r(d,h,p,m,v,y){function b(){}b.prototype=d;function x(){}x.prototype=d.subs;var E,_=new b;_.subs=new x,_.subsText={},_.buf="",m=m||{},_.stackSubs=m,_.subsText=y;for(E in h)m[E]||(m[E]=h[E]);for(E in m)_.subs[E]=m[E];v=v||{},_.stackPartials=v;for(E in p)v[E]||(v[E]=p[E]);for(E in v)_.partials[E]=v[E];return _}var n=/&/g,i=//g,s=/\'/g,o=/\"/g,l=/[&<>\"\']/;function c(d){return String(d==null?"":d)}function u(d){return d=c(d),l.test(d)?d.replace(n,"&").replace(i,"<").replace(a,">").replace(s,"'").replace(o,"""):d}var f=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"}})(typeof k0!="undefined"?k0:qj)});var T0=F((qX,IC)=>{g();var hd=MC();hd.Template=OC().Template;hd.template=hd.Template;IC.exports=hd});var OP=F((Sc,$v)=>{g();(function(t,r){typeof Sc=="object"&&typeof $v=="object"?$v.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Sc=="object"?Sc.feather=r():t.feather=r()})(typeof self!="undefined"?self:Sc,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=0)}({"./dist/icons.json":function(e){e.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"divide-circle":'',"divide-square":'',divide:'',"dollar-sign":'',"download-cloud":'',download:'',dribbble:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',table:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',tool:'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitch:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}},"./node_modules/classnames/dedupe.js":function(e,t,r){var n,i;(function(){"use strict";var a=function(){function s(){}s.prototype=Object.create(null);function o(m,v){for(var y=v.length,b=0;b1?arguments[1]:void 0,v=m!==void 0,y=0,b=c(d),x,E,_,k;if(v&&(m=n(m,p>2?arguments[2]:void 0,2)),b!=null&&!(h==Array&&s(b)))for(k=b.call(d),E=new h;!(_=k.next()).done;y++)l(E,y,v?a(k,m,[_.value,y],!0):_.value);else for(x=o(d.length),E=new h(x);x>y;y++)l(E,y,v?m(d[y],y):d[y]);return E.length=y,E}},"./node_modules/core-js/internals/array-includes.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-indexed-object.js"),i=r("./node_modules/core-js/internals/to-length.js"),a=r("./node_modules/core-js/internals/to-absolute-index.js");e.exports=function(s){return function(o,l,c){var u=n(o),f=i(u.length),d=a(c,f),h;if(s&&l!=l){for(;f>d;)if(h=u[d++],h!=h)return!0}else for(;f>d;d++)if((s||d in u)&&u[d]===l)return s||d||0;return!s&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(e,t,r){var n=r("./node_modules/core-js/internals/a-function.js");e.exports=function(i,a,s){if(n(i),a===void 0)return i;switch(s){case 0:return function(){return i.call(a)};case 1:return function(o){return i.call(a,o)};case 2:return function(o,l){return i.call(a,o,l)};case 3:return function(o,l,c){return i.call(a,o,l,c)}}return function(){return i.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(e,t,r){var n=r("./node_modules/core-js/internals/an-object.js");e.exports=function(i,a,s,o){try{return o?a(n(s)[0],s[1]):a(s)}catch(c){var l=i.return;throw l!==void 0&&n(l.call(i)),c}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(e,t,r){var n=r("./node_modules/core-js/internals/well-known-symbol.js"),i=n("iterator"),a=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){a=!0}};o[i]=function(){return this},Array.from(o,function(){throw 2})}catch(l){}e.exports=function(l,c){if(!c&&!a)return!1;var u=!1;try{var f={};f[i]=function(){return{next:function(){return{done:u=!0}}}},l(f)}catch(d){}return u}},"./node_modules/core-js/internals/classof-raw.js":function(e,t){var r={}.toString;e.exports=function(n){return r.call(n).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(e,t,r){var n=r("./node_modules/core-js/internals/classof-raw.js"),i=r("./node_modules/core-js/internals/well-known-symbol.js"),a=i("toStringTag"),s=n(function(){return arguments}())=="Arguments",o=function(l,c){try{return l[c]}catch(u){}};e.exports=function(l){var c,u,f;return l===void 0?"Undefined":l===null?"Null":typeof(u=o(c=Object(l),a))=="string"?u:s?n(c):(f=n(c))=="Object"&&typeof c.callee=="function"?"Arguments":f}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/own-keys.js"),a=r("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),s=r("./node_modules/core-js/internals/object-define-property.js");e.exports=function(o,l){for(var c=i(l),u=s.f,f=a.f,d=0;d",x="java"+y+":",E;for(p.style.display="none",o.appendChild(p),p.src=String(x),E=p.contentWindow.document,E.open(),E.write(v+y+b+"document.F=Object"+v+"/"+y+b),E.close(),h=E.F;m--;)delete h[f][a[m]];return h()};e.exports=Object.create||function(m,v){var y;return m!==null?(d[f]=n(m),y=new d,d[f]=null,y[u]=m):y=h(),v===void 0?y:i(y,v)},s[u]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-define-property.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/object-keys.js");e.exports=n?Object.defineProperties:function(l,c){a(l);for(var u=s(c),f=u.length,d=0,h;f>d;)i.f(l,h=u[d++],c[h]);return l}},"./node_modules/core-js/internals/object-define-property.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/ie8-dom-define.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/to-primitive.js"),o=Object.defineProperty;t.f=n?o:function(c,u,f){if(a(c),u=s(u,!0),a(f),i)try{return o(c,u,f)}catch(d){}if("get"in f||"set"in f)throw TypeError("Accessors not supported");return"value"in f&&(c[u]=f.value),c}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=r("./node_modules/core-js/internals/create-property-descriptor.js"),s=r("./node_modules/core-js/internals/to-indexed-object.js"),o=r("./node_modules/core-js/internals/to-primitive.js"),l=r("./node_modules/core-js/internals/has.js"),c=r("./node_modules/core-js/internals/ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(d,h){if(d=s(d),h=o(h,!0),c)try{return u(d,h)}catch(p){}if(l(d,h))return a(!i.f.call(d,h),d[h])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js"),a=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(o){return n(o,a)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,t){t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-object.js"),a=r("./node_modules/core-js/internals/shared-key.js"),s=r("./node_modules/core-js/internals/correct-prototype-getter.js"),o=a("IE_PROTO"),l=Object.prototype;e.exports=s?Object.getPrototypeOf:function(c){return c=i(c),n(c,o)?c[o]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?l:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-indexed-object.js"),a=r("./node_modules/core-js/internals/array-includes.js"),s=r("./node_modules/core-js/internals/hidden-keys.js"),o=a(!1);e.exports=function(l,c){var u=i(l),f=0,d=[],h;for(h in u)!n(s,h)&&n(u,h)&&d.push(h);for(;c.length>f;)n(u,h=c[f++])&&(~o(d,h)||d.push(h));return d}},"./node_modules/core-js/internals/object-keys.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(s){return n(s,i)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);t.f=a?function(o){var l=i(this,o);return!!l&&l.enumerable}:n},"./node_modules/core-js/internals/object-set-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},s;try{s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,s.call(a,[]),i=a instanceof Array}catch(o){}return function(l,c){return n(l,c),i?s.call(l,c):l.__proto__=c,l}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/object-get-own-property-names.js"),a=r("./node_modules/core-js/internals/object-get-own-property-symbols.js"),s=r("./node_modules/core-js/internals/an-object.js"),o=n.Reflect;e.exports=o&&o.ownKeys||function(c){var u=i.f(s(c)),f=a.f;return f?u.concat(f(c)):u}},"./node_modules/core-js/internals/path.js":function(e,t,r){e.exports=r("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/hide.js"),s=r("./node_modules/core-js/internals/has.js"),o=r("./node_modules/core-js/internals/set-global.js"),l=r("./node_modules/core-js/internals/function-to-string.js"),c=r("./node_modules/core-js/internals/internal-state.js"),u=c.get,f=c.enforce,d=String(l).split("toString");i("inspectSource",function(h){return l.call(h)}),(e.exports=function(h,p,m,v){var y=v?!!v.unsafe:!1,b=v?!!v.enumerable:!1,x=v?!!v.noTargetGet:!1;if(typeof m=="function"&&(typeof p=="string"&&!s(m,"name")&&a(m,"name",p),f(m).source=d.join(typeof p=="string"?p:"")),h===n){b?h[p]=m:o(p,m);return}else y?!x&&h[p]&&(b=!0):delete h[p];b?h[p]=m:a(h,p,m)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||l.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(e,t){e.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},"./node_modules/core-js/internals/set-global.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/hide.js");e.exports=function(a,s){try{i(n,a,s)}catch(o){n[a]=s}return s}},"./node_modules/core-js/internals/set-to-string-tag.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-define-property.js").f,i=r("./node_modules/core-js/internals/has.js"),a=r("./node_modules/core-js/internals/well-known-symbol.js"),s=a("toStringTag");e.exports=function(o,l,c){o&&!i(o=c?o:o.prototype,s)&&n(o,s,{configurable:!0,value:l})}},"./node_modules/core-js/internals/shared-key.js":function(e,t,r){var n=r("./node_modules/core-js/internals/shared.js"),i=r("./node_modules/core-js/internals/uid.js"),a=n("keys");e.exports=function(s){return a[s]||(a[s]=i(s))}},"./node_modules/core-js/internals/shared.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/set-global.js"),a=r("./node_modules/core-js/internals/is-pure.js"),s="__core-js_shared__",o=n[s]||i(s,{});(e.exports=function(l,c){return o[l]||(o[l]=c!==void 0?c:{})})("versions",[]).push({version:"3.1.3",mode:a?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(a,s,o){var l=String(i(a)),c=n(s),u=l.length,f,d;return c<0||c>=u?o?"":void 0:(f=l.charCodeAt(c),f<55296||f>56319||c+1===u||(d=l.charCodeAt(c+1))<56320||d>57343?o?l.charAt(c):f:o?l.slice(c,c+2):(f-55296<<10)+(d-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.max,a=Math.min;e.exports=function(s,o){var l=n(s);return l<0?i(l+o,0):a(l,o)}},"./node_modules/core-js/internals/to-indexed-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/indexed-object.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(a){return n(i(a))}},"./node_modules/core-js/internals/to-integer.js":function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(i){return isNaN(i=+i)?0:(i>0?n:r)(i)}},"./node_modules/core-js/internals/to-length.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.min;e.exports=function(a){return a>0?i(n(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(i){return Object(n(i))}},"./node_modules/core-js/internals/to-primitive.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js");e.exports=function(i,a){if(!n(i))return i;var s,o;if(a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i))||typeof(s=i.valueOf)=="function"&&!n(o=s.call(i))||!a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i)))return o;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(e,t){var r=0,n=Math.random();e.exports=function(i){return"Symbol(".concat(i===void 0?"":i,")_",(++r+n).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js"),i=r("./node_modules/core-js/internals/an-object.js");e.exports=function(a,s){if(i(a),!n(s)&&s!==null)throw TypeError("Can't set "+String(s)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/uid.js"),s=r("./node_modules/core-js/internals/native-symbol.js"),o=n.Symbol,l=i("wks");e.exports=function(c){return l[c]||(l[c]=s&&o[c]||(s?o:a)("Symbol."+c))}},"./node_modules/core-js/modules/es.array.from.js":function(e,t,r){var n=r("./node_modules/core-js/internals/export.js"),i=r("./node_modules/core-js/internals/array-from.js"),a=r("./node_modules/core-js/internals/check-correctness-of-iteration.js"),s=!a(function(o){Array.from(o)});n({target:"Array",stat:!0,forced:s},{from:i})},"./node_modules/core-js/modules/es.string.iterator.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/string-at.js"),i=r("./node_modules/core-js/internals/internal-state.js"),a=r("./node_modules/core-js/internals/define-iterator.js"),s="String Iterator",o=i.set,l=i.getterFor(s);a(String,"String",function(c){o(this,{type:s,string:String(c),index:0})},function(){var u=l(this),f=u.string,d=u.index,h;return d>=f.length?{value:void 0,done:!0}:(h=n(f,d,!0),u.index+=h.length,{value:h,done:!1})})},"./node_modules/webpack/buildin/global.js":function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(n){typeof window=="object"&&(r=window)}e.exports=r},"./src/default-attrs.json":function(e){e.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(h){for(var p=1;p2&&arguments[2]!==void 0?arguments[2]:[];u(this,h),this.name=p,this.contents=m,this.tags=v,this.attrs=n({},l.default,{class:"feather feather-"+p})}return i(h,[{key:"toSvg",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=n({},this.attrs,m,{class:(0,s.default)(this.attrs.class,m.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),h}();function d(h){return Object.keys(h).map(function(p){return p+'="'+h[p]+'"'}).join(" ")}t.default=f},"./src/icons.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./src/icon.js"),i=c(n),a=r("./dist/icons.json"),s=c(a),o=r("./src/tags.json"),l=c(o);function c(u){return u&&u.__esModule?u:{default:u}}t.default=Object.keys(s.default).map(function(u){return new i.default(u,s.default[u],l.default[u])}).reduce(function(u,f){return u[f.name]=f,u},{})},"./src/index.js":function(e,t,r){"use strict";var n=r("./src/icons.js"),i=c(n),a=r("./src/to-svg.js"),s=c(a),o=r("./src/replace.js"),l=c(o);function c(u){return u&&u.__esModule?u:{default:u}}e.exports={icons:i.default,toSvg:s.default,replace:l.default}},"./src/replace.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(d){for(var h=1;h0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document=="undefined")throw new Error("`feather.replace()` only works in a browser environment.");var h=document.querySelectorAll("[data-feather]");Array.from(h).forEach(function(p){return u(p,d)})}function u(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f(d),m=p["data-feather"];if(delete p["data-feather"],o.default[m]===void 0){console.warn("feather: '"+m+"' is not a valid icon");return}var v=o.default[m].toSvg(n({},h,p,{class:(0,a.default)(h.class,p.class)})),y=new DOMParser().parseFromString(v,"image/svg+xml"),b=y.querySelector("svg");d.parentNode.replaceChild(b,d)}function f(d){return Array.from(d.attributes).reduce(function(h,p){return h[p.name]=p.value,h},{})}t.default=c},"./src/tags.json":function(e){e.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./src/icons.js"),i=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function s(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!o)throw new Error("The required `key` (icon name) parameter is missing.");if(!i.default[o])throw new Error("No icon matching '"+o+"'. See the complete list of icons at https://feathericons.com");return i.default[o].toSvg(l)}t.default=s},0:function(e,t,r){r("./node_modules/core-js/es/array/from.js"),e.exports=r("./src/index.js")}})})});var GH={};eR(GH,{default:()=>Qd});module.exports=tR(GH);g();g();var el=Ve(m1(),1),Ep=Ve(E1(),1),t2=Ve(k1(),1),fu=Ve(hw(),1),eu=Ve(gw(),1),r2=Ve(Aw(),1),Qr=Ve(Tw(),1),n2=Ve(Ow(),1),Se=class e extends Error{constructor(t){super(t),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(t){let r=new e(t.message);return r.code=t.code,r.data=t.data,r.caller=t.caller,r.stack=t.stack,r}get isIsomorphicGitError(){return!0}},tl=class e extends Se{constructor(t){super(`Modifying the index is not possible because you have unmerged files: ${t.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`),this.code=this.name=e.code,this.data={filepaths:t}}};tl.code="UnmergedPathsError";var le=class e extends Se{constructor(t){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${t}`),this.code=this.name=e.code,this.data={message:t}}};le.code="InternalError";var ds=class e extends Se{constructor(t){super(`The filepath "${t}" contains unsafe character sequences`),this.code=this.name=e.code,this.data={filepath:t}}};ds.code="UnsafeFilepathError";var Fr=class{constructor(t){this.buffer=t,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(t){this._start=t}slice(t){let r=this.buffer.slice(this._start,this._start+t);return this._start+=t,r}toString(t,r){let n=this.buffer.toString(t,this._start,this._start+r);return this._start+=r,n}write(t,r,n){let i=this.buffer.write(t,this._start,r,n);return this._start+=r,i}copy(t,r,n){let i=t.copy(this.buffer,this._start,r,n);return this._start+=i,i}readUInt8(){let t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){let r=this.buffer.writeUInt8(t,this._start);return this._start+=1,r}readUInt16BE(){let t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){let r=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,r}readUInt32BE(){let t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){let r=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,r}};function du(e,t){return-(et)}function i2(e,t){return du(e.path,t.path)}function a2(e){let t=e>0?e>>12:0;t!==4&&t!==8&&t!==10&&t!==14&&(t=8);let r=e&511;return r&73?r=493:r=420,t!==8&&(r=0),(t<<12)+r}var xn=2**32;function Iw(e,t,r,n){if(e!==void 0&&t!==void 0)return[e,t];r===void 0&&(r=n.valueOf());let i=Math.floor(r/1e3),a=(r-i*1e3)*1e6;return[i,a]}function hs(e){let[t,r]=Iw(e.ctimeSeconds,e.ctimeNanoseconds,e.ctimeMs,e.ctime),[n,i]=Iw(e.mtimeSeconds,e.mtimeNanoseconds,e.mtimeMs,e.mtime);return{ctimeSeconds:t%xn,ctimeNanoseconds:r%xn,mtimeSeconds:n%xn,mtimeNanoseconds:i%xn,dev:e.dev%xn,ino:e.ino%xn,mode:a2(e.mode%xn),uid:e.uid%xn,gid:e.gid%xn,size:e.size>-1?e.size%xn:0}}function nO(e){let t="";for(let r of new Uint8Array(e))r<16&&(t+="0"),t+=r.toString(16);return t}var rp=null;async function Vn(e){return rp===null&&(rp=await aO()),rp?s2(e):iO(e)}function iO(e){return new Ep.default().update(e).digest("hex")}async function s2(e){let t=await crypto.subtle.digest("SHA-1",e);return nO(t)}async function aO(){try{if(await s2(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709")return!0}catch(e){}return!1}function sO(e){return{assumeValid:!!(e&32768),extended:!!(e&16384),stage:(e&12288)>>12,nameLength:e&4095}}function oO(e){let t=e.flags;return t.extended=!1,t.nameLength=Math.min(Buffer.from(e.path).length,4095),(t.assumeValid?32768:0)+(t.extended?16384:0)+((t.stage&3)<<12)+(t.nameLength&4095)}var dp=class e{constructor(t,r){this._dirty=!1,this._unmergedPaths=r||new Set,this._entries=t||new Map}_addEntry(t){if(t.flags.stage===0)t.stages=[t],this._entries.set(t.path,t),this._unmergedPaths.delete(t.path);else{let r=this._entries.get(t.path);r||(this._entries.set(t.path,t),r=t),r.stages[t.flags.stage]=t,this._unmergedPaths.add(t.path)}}static async from(t){if(Buffer.isBuffer(t))return e.fromBuffer(t);if(t===null)return new e(null);throw new le("invalid type passed to GitIndex.from")}static async fromBuffer(t){if(t.length===0)throw new le("Index file is empty (.git/index)");let r=new e,n=new Fr(t),i=n.toString("utf8",4);if(i!=="DIRC")throw new le(`Invalid dircache magic file number: ${i}`);let a=await Vn(t.slice(0,-20)),s=t.slice(-20).toString("hex");if(s!==a)throw new le(`Invalid checksum in GitIndex buffer: expected ${s} but saw ${a}`);let o=n.readUInt32BE();if(o!==2)throw new le(`Unsupported dircache version: ${o}`);let l=n.readUInt32BE(),c=0;for(;!n.eof()&&ct.stages.length>1?t.stages.filter(r=>r):t)}*[Symbol.iterator](){for(let t of this.entries)yield t}insert({filepath:t,stats:r,oid:n,stage:i=0}){r||(r={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),r=hs(r);let a=Buffer.from(t),s={ctimeSeconds:r.ctimeSeconds,ctimeNanoseconds:r.ctimeNanoseconds,mtimeSeconds:r.mtimeSeconds,mtimeNanoseconds:r.mtimeNanoseconds,dev:r.dev,ino:r.ino,mode:r.mode||33188,uid:r.uid,gid:r.gid,size:r.size,path:t,oid:n,flags:{assumeValid:!1,extended:!1,stage:i,nameLength:a.length<4095?a.length:4095},stages:[]};this._addEntry(s),this._dirty=!0}delete({filepath:t}){if(this._entries.has(t))this._entries.delete(t);else for(let r of this._entries.keys())r.startsWith(t+"/")&&this._entries.delete(r);this._unmergedPaths.has(t)&&this._unmergedPaths.delete(t),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:t}){return this._entries.has(t)}render(){return this.entries.map(t=>`${t.mode.toString(8)} ${t.oid} ${t.path}`).join(` -`)}static async _entryToBuffer(t){let r=Buffer.from(t.path),n=Math.ceil((62+r.length+1)/8)*8,i=Buffer.alloc(n),a=new Fr(i),s=hs(t);return a.writeUInt32BE(s.ctimeSeconds),a.writeUInt32BE(s.ctimeNanoseconds),a.writeUInt32BE(s.mtimeSeconds),a.writeUInt32BE(s.mtimeNanoseconds),a.writeUInt32BE(s.dev),a.writeUInt32BE(s.ino),a.writeUInt32BE(s.mode),a.writeUInt32BE(s.uid),a.writeUInt32BE(s.gid),a.writeUInt32BE(s.size),a.write(t.oid,20,"hex"),a.writeUInt16BE(oO(t)),a.write(t.path,r.length,"utf8"),i}async toObject(){let t=Buffer.alloc(12),r=new Fr(t);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let n=[];for(let o of this.entries)if(n.push(e._entryToBuffer(o)),o.stages.length>1)for(let l of o.stages)l&&l!==o&&n.push(e._entryToBuffer(l));n=await Promise.all(n);let i=Buffer.concat(n),a=Buffer.concat([t,i]),s=await Vn(a);return Buffer.concat([a,Buffer.from(s,"hex")])}};function tu(e,t,r=!0,n=!0){let i=hs(e),a=hs(t);return r&&i.mode!==a.mode||i.mtimeSeconds!==a.mtimeSeconds||i.ctimeSeconds!==a.ctimeSeconds||i.uid!==a.uid||i.gid!==a.gid||n&&i.ino!==a.ino||i.size!==a.size}var np=null,us=Symbol("IndexCache");function lO(){return{map:new Map,stats:new Map}}async function cO(e,t,r){let n=await e.lstat(t),i=await e.read(t),a=await dp.from(i);r.map.set(t,a),r.stats.set(t,n)}async function uO(e,t,r){let n=r.stats.get(t);if(n===void 0)return!0;let i=await e.lstat(t);return n===null||i===null?!1:tu(n,i)}var yt=class{static async acquire({fs:t,gitdir:r,cache:n,allowUnmerged:i=!0},a){n[us]||(n[us]=lO());let s=`${r}/index`;np===null&&(np=new el.default({maxPending:1/0}));let o,l=[];return await np.acquire(s,async()=>{await uO(t,s,n[us])&&await cO(t,s,n[us]);let c=n[us].map.get(s);if(l=c.unmergedPaths,l.length&&!i)throw new tl(l);if(o=await a(c),c._dirty){let u=await c.toObject();await t.write(s,u),n[us].stats.set(s,await t.lstat(s)),c._dirty=!1}}),o}};function ru(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>-1&&(e=e.slice(t+1)),e}function ps(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t===-1?".":t===0?"/":e.slice(0,t)}function o2(e){let t=new Map,r=function(i){if(!t.has(i)){let a={type:"tree",fullpath:i,basename:ru(i),metadata:{},children:[]};t.set(i,a),a.parent=r(ps(i)),a.parent&&a.parent!==a&&a.parent.children.push(a)}return t.get(i)},n=function(i,a){if(!t.has(i)){let s={type:"blob",fullpath:i,basename:ru(i),metadata:a,parent:r(ps(i)),children:[]};s.parent&&s.parent.children.push(s),t.set(i,s)}return t.get(i)};r(".");for(let i of e)n(i.path,i);return t}function fO(e){switch(e){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new le(`Unexpected GitTree entry mode: ${e.toString(8)}`)}var hp=class{constructor({fs:t,gitdir:r,cache:n}){this.treePromise=yt.acquire({fs:t,gitdir:r,cache:n},async function(a){return o2(a.entries)});let i=this;this.ConstructEntry=class{constructor(s){this._fullpath=s,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return i.type(this)}async mode(){return i.mode(this)}async stat(){return i.stat(this)}async content(){return i.content(this)}async oid(){return i.oid(this)}}}async readdir(t){let r=t._fullpath,i=(await this.treePromise).get(r);if(!i||i.type==="blob")return null;if(i.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let a=i.children.map(s=>s.fullpath);return a.sort(du),a}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let n=(await this.treePromise).get(t._fullpath);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let i=n.type==="tree"?{}:hs(n.metadata);t._type=n.type==="tree"?"tree":fO(i.mode),t._mode=i.mode,n.type==="tree"?t._stat=void 0:t._stat=i}return t._stat}async content(t){}async oid(t){if(t._oid===!1){let n=(await this.treePromise).get(t._fullpath);t._oid=n.metadata.oid}return t._oid}},hu=Symbol("GitWalkSymbol");function pu(){let e=Object.create(null);return Object.defineProperty(e,hu,{value:function({fs:t,gitdir:r,cache:n}){return new hp({fs:t,gitdir:r,cache:n})}}),Object.freeze(e),e}var Le=class e extends Se{constructor(t){super(`Could not find ${t}.`),this.code=this.name=e.code,this.data={what:t}}};Le.code="NotFoundError";var zt=class e extends Se{constructor(t,r,n,i){super(`Object ${t} ${i?`at ${i}`:""}was anticipated to be a ${n} but it is a ${r}.`),this.code=this.name=e.code,this.data={oid:t,actual:r,expected:n,filepath:i}}};zt.code="ObjectTypeError";var _i=class e extends Se{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=e.code,this.data={value:t}}};_i.code="InvalidOidError";var rl=class e extends Se{constructor(t){super(`Could not find a fetch refspec for remote "${t}". Make sure the config file has an entry like the following: -[remote "${t}"] +var X5=Object.create;var wl=Object.defineProperty;var K5=Object.getOwnPropertyDescriptor;var Z5=Object.getOwnPropertyNames;var J5=Object.getPrototypeOf,Q5=Object.prototype.hasOwnProperty;var by=t=>{throw TypeError(t)};var eI=(t,e,r)=>e in t?wl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var tI=(t,e)=>()=>(t&&(e=t(t=0)),e);var M=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),rI=(t,e)=>{for(var r in e)wl(t,r,{get:e[r],enumerable:!0})},_y=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Z5(e))!Q5.call(t,i)&&i!==r&&wl(t,i,{get:()=>e[i],enumerable:!(n=K5(e,i))||n.enumerable});return t};var Ot=(t,e,r)=>(r=t!=null?X5(J5(t)):{},_y(e||!t||!t.__esModule?wl(r,"default",{value:t,enumerable:!0}):r,t)),nI=t=>_y(wl({},"__esModule",{value:!0}),t);var vt=(t,e,r)=>eI(t,typeof e!="symbol"?e+"":e,r),wp=(t,e,r)=>e.has(t)||by("Cannot "+r);var ue=(t,e,r)=>(wp(t,e,"read from private field"),r?r.call(t):e.get(t)),yt=(t,e,r)=>e.has(t)?by("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),It=(t,e,r,n)=>(wp(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),di=(t,e,r)=>(wp(t,e,"access private method"),r);var Ey=M(Iu=>{"use strict";m();Iu.byteLength=aI;Iu.toByteArray=oI;Iu.fromByteArray=uI;var Mn=[],Wr=[],iI=typeof Uint8Array!="undefined"?Uint8Array:Array,bp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ra=0,xy=bp.length;Ra0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function aI(t){var e=Sy(t),r=e[0],n=e[1];return(r+n)*3/4-n}function sI(t,e,r){return(e+r)*3/4-r}function oI(t){var e,r=Sy(t),n=r[0],i=r[1],a=new iI(sI(t,n,i)),s=0,o=i>0?n-4:n,l;for(l=0;l>16&255,a[s++]=e>>8&255,a[s++]=e&255;return i===2&&(e=Wr[t.charCodeAt(l)]<<2|Wr[t.charCodeAt(l+1)]>>4,a[s++]=e&255),i===1&&(e=Wr[t.charCodeAt(l)]<<10|Wr[t.charCodeAt(l+1)]<<4|Wr[t.charCodeAt(l+2)]>>2,a[s++]=e>>8&255,a[s++]=e&255),a}function lI(t){return Mn[t>>18&63]+Mn[t>>12&63]+Mn[t>>6&63]+Mn[t&63]}function cI(t,e,r){for(var n,i=[],a=e;ao?o:s+a));return n===1?(e=t[r-1],i.push(Mn[e>>2]+Mn[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Mn[e>>10]+Mn[e>>4&63]+Mn[e<<2&63]+"=")),i.join("")}});var Ay=M(_p=>{m();_p.read=function(t,e,r,n,i){var a,s,o=i*8-n-1,l=(1<>1,u=-7,f=r?i-1:0,d=r?-1:1,h=t[e+f];for(f+=d,a=h&(1<<-u)-1,h>>=-u,u+=o;u>0;a=a*256+t[e+f],f+=d,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=s*256+t[e+f],f+=d,u-=8);if(a===0)a=1-c;else{if(a===l)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-c}return(h?-1:1)*s*Math.pow(2,a-n)};_p.write=function(t,e,r,n,i,a){var s,o,l,c=a*8-i-1,u=(1<>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?e+=d/l:e+=d*Math.pow(2,1-f),e*l>=2&&(s++,l/=2),s+f>=u?(o=0,s=u):s+f>=1?(o=(e*l-1)*Math.pow(2,i),s=s+f):(o=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+h]=o&255,h+=p,o/=256,i-=8);for(s=s<0;t[r+h]=s&255,h+=p,s/=256,c-=8);t[r+h-p]|=g*128}});var Rp=M(Ls=>{"use strict";m();var xp=Ey(),Fs=Ay(),ky=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ls.Buffer=O;Ls.SlowBuffer=gI;Ls.INSPECT_MAX_BYTES=50;var $u=2147483647;Ls.kMaxLength=$u;O.TYPED_ARRAY_SUPPORT=fI();!O.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function fI(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch(t){return!1}}Object.defineProperty(O.prototype,"parent",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.buffer}});Object.defineProperty(O.prototype,"offset",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.byteOffset}});function hi(t){if(t>$u)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,O.prototype),e}function O(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return kp(t)}return Ry(t,e,r)}O.poolSize=8192;function Ry(t,e,r){if(typeof t=="string")return hI(t,e);if(ArrayBuffer.isView(t))return pI(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(On(t,ArrayBuffer)||t&&On(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(On(t,SharedArrayBuffer)||t&&On(t.buffer,SharedArrayBuffer)))return Ep(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return O.from(n,e,r);let i=mI(t);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return O.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}O.from=function(t,e,r){return Ry(t,e,r)};Object.setPrototypeOf(O.prototype,Uint8Array.prototype);Object.setPrototypeOf(O,Uint8Array);function My(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function dI(t,e,r){return My(t),t<=0?hi(t):e!==void 0?typeof r=="string"?hi(t).fill(e,r):hi(t).fill(e):hi(t)}O.alloc=function(t,e,r){return dI(t,e,r)};function kp(t){return My(t),hi(t<0?0:Tp(t)|0)}O.allocUnsafe=function(t){return kp(t)};O.allocUnsafeSlow=function(t){return kp(t)};function hI(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!O.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Oy(t,e)|0,n=hi(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function Sp(t){let e=t.length<0?0:Tp(t.length)|0,r=hi(e);for(let n=0;n=$u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$u.toString(16)+" bytes");return t|0}function gI(t){return+t!=t&&(t=0),O.alloc(+t)}O.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==O.prototype};O.compare=function(e,r){if(On(e,Uint8Array)&&(e=O.from(e,e.offset,e.byteLength)),On(r,Uint8Array)&&(r=O.from(r,r.offset,r.byteLength)),!O.isBuffer(e)||!O.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let a=0,s=Math.min(n,i);ai.length?(O.isBuffer(s)||(s=O.from(s)),s.copy(i,a)):Uint8Array.prototype.set.call(i,s,a);else if(O.isBuffer(s))s.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=s.length}return i};function Oy(t,e){if(O.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||On(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Ap(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Hy(t).length;default:if(i)return n?-1:Ap(t).length;e=(""+e).toLowerCase(),i=!0}}O.byteLength=Oy;function vI(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return TI(this,e,r);case"utf8":case"utf-8":return $y(this,e,r);case"ascii":return AI(this,e,r);case"latin1":case"binary":return kI(this,e,r);case"base64":return SI(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return CI(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}O.prototype._isBuffer=!0;function Ma(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}O.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(e+=" ... "),""};ky&&(O.prototype[ky]=O.prototype.inspect);O.prototype.compare=function(e,r,n,i,a){if(On(e,Uint8Array)&&(e=O.from(e,e.offset,e.byteLength)),!O.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;let s=a-i,o=n-r,l=Math.min(s,o),c=this.slice(i,a),u=e.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Pp(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=O.from(e,n)),O.isBuffer(e))return e.length===0?-1:Ty(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Ty(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Ty(t,e,r,n,i){let a=1,s=t.length,o=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,s/=2,o/=2,r/=2}function l(u,f){return a===1?u[f]:u.readUInt16BE(f*a)}let c;if(i){let u=-1;for(c=r;cs&&(r=s-o),c=r;c>=0;c--){let u=!0;for(let f=0;fi&&(n=i)):n=i;let a=e.length;n>a/2&&(n=a/2);let s;for(s=0;s>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return yI(this,e,r,n);case"utf8":case"utf-8":return wI(this,e,r,n);case"ascii":case"latin1":case"binary":return bI(this,e,r,n);case"base64":return _I(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xI(this,e,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function SI(t,e,r){return e===0&&r===t.length?xp.fromByteArray(t):xp.fromByteArray(t.slice(e,r))}function $y(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i239?4:a>223?3:a>191?2:1;if(i+o<=r){let l,c,u,f;switch(o){case 1:a<128&&(s=a);break;case 2:l=t[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(s=f));break;case 3:l=t[i+1],c=t[i+2],(l&192)===128&&(c&192)===128&&(f=(a&15)<<12|(l&63)<<6|c&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:l=t[i+1],c=t[i+2],u=t[i+3],(l&192)===128&&(c&192)===128&&(u&192)===128&&(f=(a&15)<<18|(l&63)<<12|(c&63)<<6|u&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=o}return EI(n)}var Cy=4096;function EI(t){let e=t.length;if(e<=Cy)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn)&&(r=n);let i="";for(let a=e;an&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}O.prototype.readUintLE=O.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||bt(e,r,this.length);let i=this[e],a=1,s=0;for(;++s>>0,r=r>>>0,n||bt(e,r,this.length);let i=this[e+--r],a=1;for(;r>0&&(a*=256);)i+=this[e+--r]*a;return i};O.prototype.readUint8=O.prototype.readUInt8=function(e,r){return e=e>>>0,r||bt(e,1,this.length),this[e]};O.prototype.readUint16LE=O.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||bt(e,2,this.length),this[e]|this[e+1]<<8};O.prototype.readUint16BE=O.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||bt(e,2,this.length),this[e]<<8|this[e+1]};O.prototype.readUint32LE=O.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||bt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};O.prototype.readUint32BE=O.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||bt(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};O.prototype.readBigUInt64LE=Ui(function(e){e=e>>>0,Ds(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&bl(e,this.length-8);let i=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,a=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<>>0,Ds(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&bl(e,this.length-8);let i=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],a=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||bt(e,r,this.length);let i=this[e],a=1,s=0;for(;++s=a&&(i-=Math.pow(2,8*r)),i};O.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||bt(e,r,this.length);let i=r,a=1,s=this[e+--i];for(;i>0&&(a*=256);)s+=this[e+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};O.prototype.readInt8=function(e,r){return e=e>>>0,r||bt(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};O.prototype.readInt16LE=function(e,r){e=e>>>0,r||bt(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};O.prototype.readInt16BE=function(e,r){e=e>>>0,r||bt(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};O.prototype.readInt32LE=function(e,r){return e=e>>>0,r||bt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};O.prototype.readInt32BE=function(e,r){return e=e>>>0,r||bt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};O.prototype.readBigInt64LE=Ui(function(e){e=e>>>0,Ds(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&bl(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<>>0,Ds(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&bl(e,this.length-8);let i=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<>>0,r||bt(e,4,this.length),Fs.read(this,e,!0,23,4)};O.prototype.readFloatBE=function(e,r){return e=e>>>0,r||bt(e,4,this.length),Fs.read(this,e,!1,23,4)};O.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||bt(e,8,this.length),Fs.read(this,e,!0,52,8)};O.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||bt(e,8,this.length),Fs.read(this,e,!1,52,8)};function cr(t,e,r,n,i,a){if(!O.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}O.prototype.writeUintLE=O.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;cr(this,e,r,n,o,0)}let a=1,s=0;for(this[r]=e&255;++s>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;cr(this,e,r,n,o,0)}let a=n-1,s=1;for(this[r+a]=e&255;--a>=0&&(s*=256);)this[r+a]=e/s&255;return r+n};O.prototype.writeUint8=O.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,1,255,0),this[r]=e&255,r+1};O.prototype.writeUint16LE=O.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};O.prototype.writeUint16BE=O.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};O.prototype.writeUint32LE=O.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};O.prototype.writeUint32BE=O.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Fy(t,e,r,n,i){By(e,n,i,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,r}function Dy(t,e,r,n,i){By(e,n,i,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a=a>>8,t[r+6]=a,a=a>>8,t[r+5]=a,a=a>>8,t[r+4]=a;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s=s>>8,t[r+2]=s,s=s>>8,t[r+1]=s,s=s>>8,t[r]=s,r+8}O.prototype.writeBigUInt64LE=Ui(function(e,r=0){return Fy(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});O.prototype.writeBigUInt64BE=Ui(function(e,r=0){return Dy(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});O.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let l=Math.pow(2,8*n-1);cr(this,e,r,n,l-1,-l)}let a=0,s=1,o=0;for(this[r]=e&255;++a>0)-o&255;return r+n};O.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let l=Math.pow(2,8*n-1);cr(this,e,r,n,l-1,-l)}let a=n-1,s=1,o=0;for(this[r+a]=e&255;--a>=0&&(s*=256);)e<0&&o===0&&this[r+a+1]!==0&&(o=1),this[r+a]=(e/s>>0)-o&255;return r+n};O.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};O.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};O.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};O.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};O.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||cr(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};O.prototype.writeBigInt64LE=Ui(function(e,r=0){return Fy(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});O.prototype.writeBigInt64BE=Ui(function(e,r=0){return Dy(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ly(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function jy(t,e,r,n,i){return e=+e,r=r>>>0,i||Ly(t,e,r,4,34028234663852886e22,-34028234663852886e22),Fs.write(t,e,r,n,23,4),r+4}O.prototype.writeFloatLE=function(e,r,n){return jy(this,e,r,!0,n)};O.prototype.writeFloatBE=function(e,r,n){return jy(this,e,r,!1,n)};function Ny(t,e,r,n,i){return e=+e,r=r>>>0,i||Ly(t,e,r,8,17976931348623157e292,-17976931348623157e292),Fs.write(t,e,r,n,52,8),r+8}O.prototype.writeDoubleLE=function(e,r,n){return Ny(this,e,r,!0,n)};O.prototype.writeDoubleBE=function(e,r,n){return Ny(this,e,r,!1,n)};O.prototype.copy=function(e,r,n,i){if(!O.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let a;if(typeof e=="number")for(a=r;a2**32?i=Py(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Py(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Py(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function PI(t,e,r){Ds(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&bl(e,t.length-(r+1))}function By(t,e,r,n,i,a){if(t>r||t3?e===0||e===BigInt(0)?o=`>= 0${s} and < 2${s} ** ${(a+1)*8}${s}`:o=`>= -(2${s} ** ${(a+1)*8-1}${s}) and < 2 ** ${(a+1)*8-1}${s}`:o=`>= ${e}${s} and <= ${r}${s}`,new $s.ERR_OUT_OF_RANGE("value",o,t)}PI(n,i,a)}function Ds(t,e){if(typeof t!="number")throw new $s.ERR_INVALID_ARG_TYPE(e,"number",t)}function bl(t,e,r){throw Math.floor(t)!==t?(Ds(t,r),new $s.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new $s.ERR_BUFFER_OUT_OF_BOUNDS:new $s.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var RI=/[^+/0-9A-Za-z-_]/g;function MI(t){if(t=t.split("=")[0],t=t.trim().replace(RI,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Ap(t,e){e=e||1/0;let r,n=t.length,i=null,a=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function OI(t){let e=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function Hy(t){return xp.toByteArray(MI(t))}function Fu(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function On(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Pp(t){return t!==t}var $I=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Ui(t){return typeof BigInt=="undefined"?FI:t}function FI(){throw new Error("BigInt not supported")}});var Uy,Mp,Buffer,m=tI(()=>{Uy=require("obsidian");Uy.Platform.isMobileApp?Mp=Rp().Buffer:Mp=global.Buffer;Buffer=Mp});var zy=M((GV,Gy)=>{"use strict";m();var Tr=function(t){if(t=t||{},this.Promise=t.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=t.domainReentrant||!1,this.domainReentrant){if(typeof process=="undefined"||typeof process.domain=="undefined")throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=t.timeout||Tr.DEFAULT_TIMEOUT,this.maxOccupationTime=t.maxOccupationTime||Tr.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=t.maxExecutionTime||Tr.DEFAULT_MAX_EXECUTION_TIME,t.maxPending===1/0||Number.isInteger(t.maxPending)&&t.maxPending>=0?this.maxPending=t.maxPending:this.maxPending=Tr.DEFAULT_MAX_PENDING};Tr.DEFAULT_TIMEOUT=0;Tr.DEFAULT_MAX_OCCUPATION_TIME=0;Tr.DEFAULT_MAX_EXECUTION_TIME=0;Tr.DEFAULT_MAX_PENDING=1e3;Tr.prototype.acquire=function(t,e,r,n){if(Array.isArray(t))return this._acquireBatch(t,e,r,n);if(typeof e!="function")throw new Error("You must pass a function to execute");var i=null,a=null,s=null;typeof r!="function"&&(n=r,r=null,s=new this.Promise(function(b,E){i=b,a=E})),n=n||{};var o=!1,l=null,c=null,u=null,f=this,d=function(b,E,S){c&&(clearTimeout(c),c=null),u&&(clearTimeout(u),u=null),b&&(f.queues[t]&&f.queues[t].length===0&&delete f.queues[t],f.domainReentrant&&delete f.domains[t]),o||(s?E?a(E):i(S):typeof r=="function"&&r(E,S),o=!0),b&&f.queues[t]&&f.queues[t].length>0&&f.queues[t].shift()()},h=function(b){if(o)return d(b);l&&(clearTimeout(l),l=null),f.domainReentrant&&b&&(f.domains[t]=process.domain);var E=n.maxExecutionTime||f.maxExecutionTime;if(E&&(u=setTimeout(function(){f.queues[t]&&d(b,new Error("Maximum execution time is exceeded "+t))},E)),e.length===1){var S=!1;try{e(function(A,k){S||(S=!0,d(b,A,k))})}catch(A){S||(S=!0,d(b,A))}}else f._promiseTry(function(){return e()}).then(function(A){d(b,void 0,A)},function(A){d(b,A)})};f.domainReentrant&&process.domain&&(h=process.domain.bind(h));var p=n.maxPending||f.maxPending;if(!f.queues[t])f.queues[t]=[],h(!0);else if(f.domainReentrant&&process.domain&&process.domain===f.domains[t])h(!1);else if(f.queues[t].length>=p)d(!1,new Error("Too many pending tasks in queue "+t));else{var g=function(){h(!0)};n.skipQueue?f.queues[t].unshift(g):f.queues[t].push(g);var v=n.timeout||f.timeout;v&&(l=setTimeout(function(){l=null,d(!1,new Error("async-lock timed out in queue "+t))},v))}var y=n.maxOccupationTime||f.maxOccupationTime;if(y&&(c=setTimeout(function(){f.queues[t]&&d(!1,new Error("Maximum occupation time is exceeded in queue "+t))},y)),s)return s};Tr.prototype._acquireBatch=function(t,e,r,n){typeof r!="function"&&(n=r,r=null);var i=this,a=function(o,l){return function(c){i.acquire(o,l,c,n)}},s=t.reduceRight(function(o,l){return a(l,o)},e);if(typeof r=="function")s(r);else return new this.Promise(function(o,l){s.length===1?s(function(c,u){c?l(c):o(u)}):o(s())})};Tr.prototype.isBusy=function(t){return t?!!this.queues[t]:Object.keys(this.queues).length>0};Tr.prototype._promiseTry=function(t){try{return this.Promise.resolve(t())}catch(e){return this.Promise.reject(e)}};Gy.exports=Tr});var Wy=M((VV,Vy)=>{"use strict";m();Vy.exports=zy()});var qy=M((qV,Op)=>{m();typeof Object.create=="function"?Op.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Op.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Lu=M((Ip,Xy)=>{m();var Du=Rp(),In=Du.Buffer;function Yy(t,e){for(var r in t)e[r]=t[r]}In.from&&In.alloc&&In.allocUnsafe&&In.allocUnsafeSlow?Xy.exports=Du:(Yy(Du,Ip),Ip.Buffer=Oa);function Oa(t,e,r){return In(t,e,r)}Oa.prototype=Object.create(In.prototype);Yy(In,Oa);Oa.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return In(t,e,r)};Oa.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=In(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Oa.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return In(t)};Oa.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Du.SlowBuffer(t)}});var ju=M((KV,Ky)=>{m();var DI={}.toString;Ky.exports=Array.isArray||function(t){return DI.call(t)=="[object Array]"}});var ur=M((JV,Zy)=>{"use strict";m();Zy.exports=TypeError});var Nu=M((eW,Jy)=>{"use strict";m();Jy.exports=Object});var $p=M((rW,Qy)=>{"use strict";m();Qy.exports=Error});var tw=M((iW,ew)=>{"use strict";m();ew.exports=EvalError});var nw=M((sW,rw)=>{"use strict";m();rw.exports=RangeError});var aw=M((lW,iw)=>{"use strict";m();iw.exports=ReferenceError});var Bu=M((uW,sw)=>{"use strict";m();sw.exports=SyntaxError});var lw=M((dW,ow)=>{"use strict";m();ow.exports=URIError});var uw=M((pW,cw)=>{"use strict";m();cw.exports=Math.abs});var dw=M((gW,fw)=>{"use strict";m();fw.exports=Math.floor});var pw=M((yW,hw)=>{"use strict";m();hw.exports=Math.max});var gw=M((bW,mw)=>{"use strict";m();mw.exports=Math.min});var yw=M((xW,vw)=>{"use strict";m();vw.exports=Math.pow});var bw=M((EW,ww)=>{"use strict";m();ww.exports=Math.round});var xw=M((kW,_w)=>{"use strict";m();_w.exports=Number.isNaN||function(e){return e!==e}});var Ew=M((CW,Sw)=>{"use strict";m();var LI=xw();Sw.exports=function(e){return LI(e)||e===0?e:e<0?-1:1}});var kw=M((RW,Aw)=>{"use strict";m();Aw.exports=Object.getOwnPropertyDescriptor});var Gi=M((OW,Tw)=>{"use strict";m();var Hu=kw();if(Hu)try{Hu([],"length")}catch(t){Hu=null}Tw.exports=Hu});var _l=M(($W,Cw)=>{"use strict";m();var Uu=Object.defineProperty||!1;if(Uu)try{Uu({},"a",{value:1})}catch(t){Uu=!1}Cw.exports=Uu});var xl=M((DW,Pw)=>{"use strict";m();Pw.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var Gu=M((jW,Mw)=>{"use strict";m();var Rw=typeof Symbol!="undefined"&&Symbol,jI=xl();Mw.exports=function(){return typeof Rw!="function"||typeof Symbol!="function"||typeof Rw("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:jI()}});var Fp=M((BW,Ow)=>{"use strict";m();Ow.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Dp=M((UW,Iw)=>{"use strict";m();var NI=Nu();Iw.exports=NI.getPrototypeOf||null});var Dw=M((zW,Fw)=>{"use strict";m();var BI="Function.prototype.bind called on incompatible ",HI=Object.prototype.toString,UI=Math.max,GI="[object Function]",$w=function(e,r){for(var n=[],i=0;i{"use strict";m();var WI=Dw();Lw.exports=Function.prototype.bind||WI});var zu=M((YW,jw)=>{"use strict";m();jw.exports=Function.prototype.call});var Vu=M((KW,Nw)=>{"use strict";m();Nw.exports=Function.prototype.apply});var Hw=M((JW,Bw)=>{"use strict";m();Bw.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Lp=M((eq,Uw)=>{"use strict";m();var qI=js(),YI=Vu(),XI=zu(),KI=Hw();Uw.exports=KI||qI.call(XI,YI)});var Wu=M((rq,Gw)=>{"use strict";m();var ZI=js(),JI=ur(),QI=zu(),e6=Lp();Gw.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new JI("a function is required");return e6(ZI,QI,e)}});var Xw=M((iq,Yw)=>{"use strict";m();var t6=Wu(),zw=Gi(),Ww;try{Ww=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var jp=!!Ww&&zw&&zw(Object.prototype,"__proto__"),qw=Object,Vw=qw.getPrototypeOf;Yw.exports=jp&&typeof jp.get=="function"?t6([jp.get]):typeof Vw=="function"?function(e){return Vw(e==null?e:qw(e))}:!1});var qu=M((sq,Qw)=>{"use strict";m();var Kw=Fp(),Zw=Dp(),Jw=Xw();Qw.exports=Kw?function(e){return Kw(e)}:Zw?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Zw(e)}:Jw?function(e){return Jw(e)}:null});var Yu=M((lq,eb)=>{"use strict";m();var r6=Function.prototype.call,n6=Object.prototype.hasOwnProperty,i6=js();eb.exports=i6.call(r6,n6)});var $n=M((uq,sb)=>{"use strict";m();var we,a6=Nu(),s6=$p(),o6=tw(),l6=nw(),c6=aw(),Us=Bu(),Hs=ur(),u6=lw(),f6=uw(),d6=dw(),h6=pw(),p6=gw(),m6=yw(),g6=bw(),v6=Ew(),ib=Function,Np=function(t){try{return ib('"use strict"; return ('+t+").constructor;")()}catch(e){}},Sl=Gi(),y6=_l(),Bp=function(){throw new Hs},w6=Sl?function(){try{return arguments.callee,Bp}catch(t){try{return Sl(arguments,"callee").get}catch(e){return Bp}}}():Bp,Ns=Gu()(),_t=qu(),b6=Dp(),_6=Fp(),ab=Vu(),El=zu(),Bs={},x6=typeof Uint8Array=="undefined"||!_t?we:_t(Uint8Array),Ia={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?we:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?we:ArrayBuffer,"%ArrayIteratorPrototype%":Ns&&_t?_t([][Symbol.iterator]()):we,"%AsyncFromSyncIteratorPrototype%":we,"%AsyncFunction%":Bs,"%AsyncGenerator%":Bs,"%AsyncGeneratorFunction%":Bs,"%AsyncIteratorPrototype%":Bs,"%Atomics%":typeof Atomics=="undefined"?we:Atomics,"%BigInt%":typeof BigInt=="undefined"?we:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?we:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?we:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?we:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":s6,"%eval%":eval,"%EvalError%":o6,"%Float16Array%":typeof Float16Array=="undefined"?we:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?we:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?we:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?we:FinalizationRegistry,"%Function%":ib,"%GeneratorFunction%":Bs,"%Int8Array%":typeof Int8Array=="undefined"?we:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?we:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?we:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ns&&_t?_t(_t([][Symbol.iterator]())):we,"%JSON%":typeof JSON=="object"?JSON:we,"%Map%":typeof Map=="undefined"?we:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ns||!_t?we:_t(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":a6,"%Object.getOwnPropertyDescriptor%":Sl,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?we:Promise,"%Proxy%":typeof Proxy=="undefined"?we:Proxy,"%RangeError%":l6,"%ReferenceError%":c6,"%Reflect%":typeof Reflect=="undefined"?we:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?we:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ns||!_t?we:_t(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?we:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ns&&_t?_t(""[Symbol.iterator]()):we,"%Symbol%":Ns?Symbol:we,"%SyntaxError%":Us,"%ThrowTypeError%":w6,"%TypedArray%":x6,"%TypeError%":Hs,"%Uint8Array%":typeof Uint8Array=="undefined"?we:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?we:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?we:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?we:Uint32Array,"%URIError%":u6,"%WeakMap%":typeof WeakMap=="undefined"?we:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?we:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?we:WeakSet,"%Function.prototype.call%":El,"%Function.prototype.apply%":ab,"%Object.defineProperty%":y6,"%Object.getPrototypeOf%":b6,"%Math.abs%":f6,"%Math.floor%":d6,"%Math.max%":h6,"%Math.min%":p6,"%Math.pow%":m6,"%Math.round%":g6,"%Math.sign%":v6,"%Reflect.getPrototypeOf%":_6};if(_t)try{null.error}catch(t){tb=_t(_t(t)),Ia["%Error.prototype%"]=tb}var tb,S6=function t(e){var r;if(e==="%AsyncFunction%")r=Np("async function () {}");else if(e==="%GeneratorFunction%")r=Np("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Np("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&_t&&(r=_t(i.prototype))}return Ia[e]=r,r},rb={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Al=js(),Xu=Yu(),E6=Al.call(El,Array.prototype.concat),A6=Al.call(ab,Array.prototype.splice),nb=Al.call(El,String.prototype.replace),Ku=Al.call(El,String.prototype.slice),k6=Al.call(El,RegExp.prototype.exec),T6=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C6=/\\(\\)?/g,P6=function(e){var r=Ku(e,0,1),n=Ku(e,-1);if(r==="%"&&n!=="%")throw new Us("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Us("invalid intrinsic syntax, expected opening `%`");var i=[];return nb(e,T6,function(a,s,o,l){i[i.length]=o?nb(l,C6,"$1"):s||a}),i},R6=function(e,r){var n=e,i;if(Xu(rb,n)&&(i=rb[n],n="%"+i[0]+"%"),Xu(Ia,n)){var a=Ia[n];if(a===Bs&&(a=S6(n)),typeof a=="undefined"&&!r)throw new Hs("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Us("intrinsic "+e+" does not exist!")};sb.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Hs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Hs('"allowMissing" argument must be a boolean');if(k6(/^%?[^%]*%?$/,e)===null)throw new Us("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=P6(e),i=n.length>0?n[0]:"",a=R6("%"+i+"%",r),s=a.name,o=a.value,l=!1,c=a.alias;c&&(i=c[0],A6(n,E6([0,1],c)));for(var u=1,f=!0;u=n.length){var g=Sl(o,d);f=!!g,f&&"get"in g&&!("originalValue"in g.get)?o=g.get:o=o[d]}else f=Xu(o,d),o=o[d];f&&!l&&(Ia[s]=o)}}return o}});var xt=M((dq,cb)=>{"use strict";m();var ob=$n(),lb=Wu(),M6=lb([ob("%String.prototype.indexOf%")]);cb.exports=function(e,r){var n=ob(e,!!r);return typeof n=="function"&&M6(e,".prototype.")>-1?lb([n]):n}});var hb=M((pq,db)=>{"use strict";m();var fb=Function.prototype.toString,Gs=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Up,Zu;if(typeof Gs=="function"&&typeof Object.defineProperty=="function")try{Up=Object.defineProperty({},"length",{get:function(){throw Zu}}),Zu={},Gs(function(){throw 42},null,Up)}catch(t){t!==Zu&&(Gs=null)}else Gs=null;var O6=/^\s*class\b/,Gp=function(e){try{var r=fb.call(e);return O6.test(r)}catch(n){return!1}},Hp=function(e){try{return Gp(e)?!1:(fb.call(e),!0)}catch(r){return!1}},Ju=Object.prototype.toString,I6="[object Object]",$6="[object Function]",F6="[object GeneratorFunction]",D6="[object HTMLAllCollection]",L6="[object HTML document.all class]",j6="[object HTMLCollection]",N6=typeof Symbol=="function"&&!!Symbol.toStringTag,B6=!(0 in[,]),zp=function(){return!1};typeof document=="object"&&(ub=document.all,Ju.call(ub)===Ju.call(document.all)&&(zp=function(e){if((B6||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=Ju.call(e);return(r===D6||r===L6||r===j6||r===I6)&&e("")==null}catch(n){}return!1}));var ub;db.exports=Gs?function(e){if(zp(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Gs(e,null,Up)}catch(r){if(r!==Zu)return!1}return!Gp(e)&&Hp(e)}:function(e){if(zp(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(N6)return Hp(e);if(Gp(e))return!1;var r=Ju.call(e);return r!==$6&&r!==F6&&!/^\[object HTML/.test(r)?!1:Hp(e)}});var gb=M((gq,mb)=>{"use strict";m();var H6=hb(),U6=Object.prototype.toString,pb=Object.prototype.hasOwnProperty,G6=function(e,r,n){for(var i=0,a=e.length;i=3&&(i=n),W6(e)?G6(e,r,i):typeof e=="string"?z6(e,r,i):V6(e,r,i)}});var yb=M((yq,vb)=>{"use strict";m();vb.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var bb=M((bq,wb)=>{"use strict";m();var Vp=yb(),q6=typeof globalThis=="undefined"?global:globalThis;wb.exports=function(){for(var e=[],r=0;r{"use strict";m();var _b=_l(),Y6=Bu(),zs=ur(),xb=Gi();Sb.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new zs("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new zs("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new zs("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new zs("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new zs("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new zs("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!xb&&xb(e,r);if(_b)_b(e,r,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(o||!i&&!a&&!s)e[r]=n;else throw new Y6("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var ef=M((Eq,Ab)=>{"use strict";m();var Wp=_l(),Eb=function(){return!!Wp};Eb.hasArrayLengthDefineBug=function(){if(!Wp)return null;try{return Wp([],"length",{value:1}).length!==1}catch(e){return!0}};Ab.exports=Eb});var Rb=M((kq,Pb)=>{"use strict";m();var X6=$n(),kb=Qu(),K6=ef()(),Tb=Gi(),Cb=ur(),Z6=X6("%Math.floor%");Pb.exports=function(e,r){if(typeof e!="function")throw new Cb("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Z6(r)!==r)throw new Cb("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in e&&Tb){var s=Tb(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(a=!1)}return(i||a||!n)&&(K6?kb(e,"length",r,!0,!0):kb(e,"length",r)),e}});var Ob=M((Cq,Mb)=>{"use strict";m();var J6=js(),Q6=Vu(),e$=Lp();Mb.exports=function(){return e$(J6,Q6,arguments)}});var $a=M((Rq,tf)=>{"use strict";m();var t$=Rb(),Ib=_l(),r$=Wu(),$b=Ob();tf.exports=function(e){var r=r$(arguments),n=e.length-(arguments.length-1);return t$(r,1+(n>0?n:0),!0)};Ib?Ib(tf.exports,"apply",{value:$b}):tf.exports.apply=$b});var zi=M((Oq,Fb)=>{"use strict";m();var n$=xl();Fb.exports=function(){return n$()&&!!Symbol.toStringTag}});var Kp=M(($q,Nb)=>{"use strict";m();var af=gb(),i$=bb(),Db=$a(),Yp=xt(),nf=Gi(),rf=qu(),a$=Yp("Object.prototype.toString"),jb=zi()(),Lb=typeof globalThis=="undefined"?global:globalThis,qp=i$(),Xp=Yp("String.prototype.slice"),s$=Yp("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n-1?r:r!=="Object"?!1:l$(e)}return nf?o$(e):null}});var Hb=M((Dq,Bb)=>{"use strict";m();var c$=Kp();Bb.exports=function(e){return!!c$(e)}});var Gb=M((jq,Ub)=>{"use strict";m();var u$=ur(),f$=xt(),d$=f$("TypedArray.prototype.buffer",!0),h$=Hb();Ub.exports=d$||function(e){if(!h$(e))throw new u$("Not a Typed Array");return e.buffer}});var Wb=M((Bq,Vb)=>{"use strict";m();var Fn=Lu().Buffer,p$=ju(),m$=Gb(),g$=ArrayBuffer.isView||function(e){try{return m$(e),!0}catch(r){return!1}},v$=typeof Uint8Array!="undefined",zb=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined",y$=zb&&(Fn.prototype instanceof Uint8Array||Fn.TYPED_ARRAY_SUPPORT);Vb.exports=function(e,r){if(e instanceof Fn)return e;if(typeof e=="string")return Fn.from(e,r);if(zb&&g$(e)){if(e.byteLength===0)return Fn.alloc(0);if(y$){var n=Fn.from(e.buffer,e.byteOffset,e.byteLength);if(n.byteLength===e.byteLength)return n}var i=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=Fn.from(i);if(a.length===e.byteLength)return a}if(v$&&e instanceof Uint8Array)return Fn.from(e);var s=p$(e);if(s)for(var o=0;o255||~~l!==l)throw new RangeError("Array items must be numbers in the range 0-255.")}if(s||Fn.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return Fn.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Yb=M((Uq,qb)=>{"use strict";m();var w$=Lu().Buffer,b$=Wb();function of(t,e){this._block=w$.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}of.prototype.update=function(t,e){t=b$(t,e||"utf8");for(var r=this._block,n=this._blockSize,i=t.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a};of.prototype._update=function(){throw new Error("_update must be implemented by subclass")};qb.exports=of});var Zb=M((zq,Kb)=>{"use strict";m();var _$=qy(),Xb=Yb(),x$=Lu().Buffer,S$=[1518500249,1859775393,-1894007588,-899497514],E$=new Array(80);function kl(){this.init(),this._w=E$,Xb.call(this,64,56)}_$(kl,Xb);kl.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function A$(t){return t<<1|t>>>31}function k$(t){return t<<5|t>>>27}function T$(t){return t<<30|t>>>2}function C$(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}kl.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,s=this._e|0,o=0;o<16;++o)e[o]=t.readInt32BE(o*4);for(;o<80;++o)e[o]=A$(e[o-3]^e[o-8]^e[o-14]^e[o-16]);for(var l=0;l<80;++l){var c=~~(l/20),u=k$(r)+C$(c,n,i,a)+s+e[l]+S$[c]|0;s=a,a=i,i=T$(n),n=r,r=u}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0};kl.prototype._hash=function(){var t=x$.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};Kb.exports=kl});var e2=M((Wq,Qb)=>{"use strict";m();function Dn(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function Jb(t,e){for(var r="",n=0,i=-1,a=0,s,o=0;o<=t.length;++o){if(o2){var l=r.lastIndexOf("/");if(l!==r.length-1){l===-1?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length===2||r.length===1){r="",n=0,i=o,a=0;continue}}e&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+t.slice(i+1,o):r=t.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a!==-1?++a:a=-1}return r}function P$(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+t+n:n}var Vs={resolve:function(){for(var e="",r=!1,n,i=arguments.length-1;i>=-1&&!r;i--){var a;i>=0?a=arguments[i]:(n===void 0&&(n=process.cwd()),a=n),Dn(a),a.length!==0&&(e=a+"/"+e,r=a.charCodeAt(0)===47)}return e=Jb(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(Dn(e),e.length===0)return".";var r=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47;return e=Jb(e,!r),e.length===0&&!r&&(e="."),e.length>0&&n&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return Dn(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r0&&(e===void 0?e=n:e+="/"+n)}return e===void 0?".":Vs.normalize(e)},relative:function(e,r){if(Dn(e),Dn(r),e===r||(e=Vs.resolve(e),r=Vs.resolve(r),e===r))return"";for(var n=1;nc){if(r.charCodeAt(s+f)===47)return r.slice(s+f+1);if(f===0)return r.slice(s+f)}else a>c&&(e.charCodeAt(n+f)===47?u=f:f===0&&(u=0));break}var d=e.charCodeAt(n+f),h=r.charCodeAt(s+f);if(d!==h)break;d===47&&(u=f)}var p="";for(f=n+u+1;f<=i;++f)(f===i||e.charCodeAt(f)===47)&&(p.length===0?p+="..":p+="/..");return p.length>0?p+r.slice(s+u):(s+=u,r.charCodeAt(s)===47&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(Dn(e),e.length===0)return".";for(var r=e.charCodeAt(0),n=r===47,i=-1,a=!0,s=e.length-1;s>=1;--s)if(r=e.charCodeAt(s),r===47){if(!a){i=s;break}}else a=!1;return i===-1?n?"/":".":n&&i===1?"//":e.slice(0,i)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Dn(e);var n=0,i=-1,a=!0,s;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var o=r.length-1,l=-1;for(s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c===47){if(!a){n=s+1;break}}else l===-1&&(a=!1,l=s+1),o>=0&&(c===r.charCodeAt(o)?--o===-1&&(i=s):(o=-1,i=l))}return n===i?i=l:i===-1&&(i=e.length),e.slice(n,i)}else{for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===47){if(!a){n=s+1;break}}else i===-1&&(a=!1,i=s+1);return i===-1?"":e.slice(n,i)}},extname:function(e){Dn(e);for(var r=-1,n=0,i=-1,a=!0,s=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(l===47){if(!a){n=o+1;break}continue}i===-1&&(a=!1,i=o+1),l===46?r===-1?r=o:s!==1&&(s=1):r!==-1&&(s=-1)}return r===-1||i===-1||s===0||s===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return P$("/",e)},parse:function(e){Dn(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var n=e.charCodeAt(0),i=n===47,a;i?(r.root="/",a=1):a=0;for(var s=-1,o=0,l=-1,c=!0,u=e.length-1,f=0;u>=a;--u){if(n=e.charCodeAt(u),n===47){if(!c){o=u+1;break}continue}l===-1&&(c=!1,l=u+1),n===46?s===-1?s=u:f!==1&&(f=1):s!==-1&&(f=-1)}return s===-1||l===-1||f===0||f===1&&s===l-1&&s===o+1?l!==-1&&(o===0&&i?r.base=r.name=e.slice(1,l):r.base=r.name=e.slice(o,l)):(o===0&&i?(r.name=e.slice(1,s),r.base=e.slice(1,l)):(r.name=e.slice(o,s),r.base=e.slice(o,l)),r.ext=e.slice(s,l)),o>0?r.dir=e.slice(0,o-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};Vs.posix=Vs;Qb.exports=Vs});var r2=M(Zp=>{m();var t2;(function(t){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof Zp=="object"?t(Zp):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(t2={}):t(t2={})})(function(t){t.version="1.2.2";function e(){for(var w=0,x=new Array(256),_=0;_!=256;++_)w=_,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,x[_]=w;return typeof Int32Array!="undefined"?new Int32Array(x):x}var r=e();function n(w){var x=0,_=0,T=0,C=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(T=0;T!=256;++T)C[T]=w[T];for(T=0;T!=256;++T)for(_=w[T],x=256+T;x<4096;x+=256)_=C[x]=_>>>8^w[_&255];var I=[];for(T=1;T!=16;++T)I[T-1]=typeof Int32Array!="undefined"?C.subarray(T*256,T*256+256):C.slice(T*256,T*256+256);return I}var i=n(r),a=i[0],s=i[1],o=i[2],l=i[3],c=i[4],u=i[5],f=i[6],d=i[7],h=i[8],p=i[9],g=i[10],v=i[11],y=i[12],b=i[13],E=i[14];function S(w,x){for(var _=x^-1,T=0,C=w.length;T>>8^r[(_^w.charCodeAt(T++))&255];return~_}function A(w,x){for(var _=x^-1,T=w.length-15,C=0;C>8&255]^y[w[C++]^_>>16&255]^v[w[C++]^_>>>24]^g[w[C++]]^p[w[C++]]^h[w[C++]]^d[w[C++]]^f[w[C++]]^u[w[C++]]^c[w[C++]]^l[w[C++]]^o[w[C++]]^s[w[C++]]^a[w[C++]]^r[w[C++]];for(T+=15;C>>8^r[(_^w[C++])&255];return~_}function k(w,x){for(var _=x^-1,T=0,C=w.length,I=0,L=0;T>>8^r[(_^I)&255]:I<2048?(_=_>>>8^r[(_^(192|I>>6&31))&255],_=_>>>8^r[(_^(128|I&63))&255]):I>=55296&&I<57344?(I=(I&1023)+64,L=w.charCodeAt(T++)&1023,_=_>>>8^r[(_^(240|I>>8&7))&255],_=_>>>8^r[(_^(128|I>>2&63))&255],_=_>>>8^r[(_^(128|L>>6&15|(I&3)<<4))&255],_=_>>>8^r[(_^(128|L&63))&255]):(_=_>>>8^r[(_^(224|I>>12&15))&255],_=_>>>8^r[(_^(128|I>>6&63))&255],_=_>>>8^r[(_^(128|I&63))&255]);return~_}t.table=r,t.bstr=S,t.buf=A,t.str=k})});var pi=M(Qt=>{"use strict";m();var R$=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function M$(t,e){return Object.prototype.hasOwnProperty.call(t,e)}Qt.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)M$(r,n)&&(t[n]=r[n])}}return t};Qt.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var O$={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray){t.set(e.subarray(r,r+n),i);return}for(var a=0;a{"use strict";m();var $$=pi(),F$=4,n2=0,i2=1,D$=2;function qs(t){for(var e=t.length;--e>=0;)t[e]=0}var L$=0,u2=1,j$=2,N$=3,B$=258,im=29,Ol=256,Cl=Ol+1+im,Ws=30,am=19,f2=2*Cl+1,Fa=15,Jp=16,H$=7,sm=256,d2=16,h2=17,p2=18,rm=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],lf=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],U$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],m2=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G$=512,mi=new Array((Cl+2)*2);qs(mi);var Tl=new Array(Ws*2);qs(Tl);var Pl=new Array(G$);qs(Pl);var Rl=new Array(B$-N$+1);qs(Rl);var om=new Array(im);qs(om);var cf=new Array(Ws);qs(cf);function Qp(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}var g2,v2,y2;function em(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w2(t){return t<256?Pl[t]:Pl[256+(t>>>7)]}function Ml(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function fr(t,e,r){t.bi_valid>Jp-r?(t.bi_buf|=e<>Jp-t.bi_valid,t.bi_valid+=r-Jp):(t.bi_buf|=e<>>=1,r<<=1;while(--e>0);return r>>>1}function z$(t){t.bi_valid===16?(Ml(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)}function V$(t,e){var r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length,c,u,f,d,h,p,g=0;for(d=0;d<=Fa;d++)t.bl_count[d]=0;for(r[t.heap[t.heap_max]*2+1]=0,c=t.heap_max+1;cl&&(d=l,g++),r[u*2+1]=d,!(u>n)&&(t.bl_count[d]++,h=0,u>=o&&(h=s[u-o]),p=r[u*2],t.opt_len+=p*(d+h),a&&(t.static_len+=p*(i[u*2+1]+h)));if(g!==0){do{for(d=l-1;t.bl_count[d]===0;)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[l]--,g-=2}while(g>0);for(d=l;d!==0;d--)for(u=t.bl_count[d];u!==0;)f=t.heap[--c],!(f>n)&&(r[f*2+1]!==d&&(t.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),u--)}}function _2(t,e,r){var n=new Array(Fa+1),i=0,a,s;for(a=1;a<=Fa;a++)n[a]=i=i+r[a-1]<<1;for(s=0;s<=e;s++){var o=t[s*2+1];o!==0&&(t[s*2]=b2(n[o]++,o))}}function W$(){var t,e,r,n,i,a=new Array(Fa+1);for(r=0,n=0;n>=7;n8?Ml(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function q$(t,e,r,n){S2(t),n&&(Ml(t,r),Ml(t,~r)),$$.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function a2(t,e,r,n){var i=e*2,a=r*2;return t[i]>1;s>=1;s--)tm(t,r,s);c=a;do s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],tm(t,r,1),o=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=o,r[c*2]=r[s*2]+r[o*2],t.depth[c]=(t.depth[s]>=t.depth[o]?t.depth[s]:t.depth[o])+1,r[s*2+1]=r[o*2+1]=c,t.heap[1]=c++,tm(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],V$(t,e),_2(r,l,t.bl_count)}function o2(t,e,r){var n,i=-1,a,s=e[0*2+1],o=0,l=7,c=4;for(s===0&&(l=138,c=3),e[(r+1)*2+1]=65535,n=0;n<=r;n++)a=s,s=e[(n+1)*2+1],!(++o=3&&t.bl_tree[m2[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function X$(t,e,r,n){var i;for(fr(t,e-257,5),fr(t,r-1,5),fr(t,n-4,4),i=0;i>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return n2;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return i2;for(r=32;r0?(t.strm.data_type===D$&&(t.strm.data_type=K$(t)),nm(t,t.l_desc),nm(t,t.d_desc),s=Y$(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&e!==-1?E2(t,e,r,n):t.strategy===F$||a===i?(fr(t,(u2<<1)+(n?1:0),3),s2(t,mi,Tl)):(fr(t,(j$<<1)+(n?1:0),3),X$(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),s2(t,t.dyn_ltree,t.dyn_dtree)),x2(t),n&&S2(t)}function eF(t,e,r){return t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255,t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255,t.pending_buf[t.l_buf+t.last_lit]=r&255,t.last_lit++,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(Rl[r]+Ol+1)*2]++,t.dyn_dtree[w2(e)*2]++),t.last_lit===t.lit_bufsize-1}Ys._tr_init=Z$;Ys._tr_stored_block=E2;Ys._tr_flush_block=Q$;Ys._tr_tally=eF;Ys._tr_align=J$});var lm=M((eY,k2)=>{"use strict";m();function tF(t,e,r,n){for(var i=t&65535|0,a=t>>>16&65535|0,s=0;r!==0;){s=r>2e3?2e3:r,r-=s;do i=i+e[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}k2.exports=tF});var cm=M((rY,T2)=>{"use strict";m();function rF(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e}var nF=rF();function iF(t,e,r,n){var i=nF,a=n+r;t^=-1;for(var s=n;s>>8^i[(t^e[s])&255];return t^-1}T2.exports=iF});var uf=M((iY,C2)=>{"use strict";m();C2.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var L2=M(Bn=>{"use strict";m();var er=pi(),qr=A2(),O2=lm(),Vi=cm(),aF=uf(),Na=0,sF=1,oF=3,Ki=4,P2=5,Nn=0,R2=1,Yr=-2,lF=-3,um=-5,cF=-1,uF=1,ff=2,fF=3,dF=4,hF=0,pF=2,mf=8,mF=9,gF=15,vF=8,yF=29,wF=256,dm=wF+1+yF,bF=30,_F=19,xF=2*dm+1,SF=15,Ee=3,Yi=258,dn=Yi+Ee+1,EF=32,gf=42,hm=69,df=73,hf=91,pf=103,Da=113,$l=666,wt=1,Fl=2,La=3,Zs=4,AF=3;function Xi(t,e){return t.msg=aF[e],e}function M2(t){return(t<<1)-(t>4?9:0)}function qi(t){for(var e=t.length;--e>=0;)t[e]=0}function Wi(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(er.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))}function $t(t,e){qr._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Wi(t.strm)}function Re(t,e){t.pending_buf[t.pending++]=e}function Il(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function kF(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),i===0?0:(t.avail_in-=i,er.arraySet(e,t.input,t.next_in,i,r),t.state.wrap===1?t.adler=O2(t.adler,e,i,r):t.state.wrap===2&&(t.adler=Vi(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)}function I2(t,e){var r=t.max_chain_length,n=t.strstart,i,a,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-dn?t.strstart-(t.w_size-dn):0,c=t.window,u=t.w_mask,f=t.prev,d=t.strstart+Yi,h=c[n+s-1],p=c[n+s];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do if(i=e,!(c[i+s]!==p||c[i+s-1]!==h||c[i]!==c[n]||c[++i]!==c[n+1])){n+=2,i++;do;while(c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&ns){if(t.match_start=e,s=a,a>=o)break;h=c[n+s-1],p=c[n+s]}}while((e=f[e&u])>l&&--r!==0);return s<=t.lookahead?s:t.lookahead}function ja(t){var e=t.w_size,r,n,i,a,s;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-dn)){er.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do i=t.head[--r],t.head[r]=i>=e?i-e:0;while(--n);n=e,r=n;do i=t.prev[--r],t.prev[r]=i>=e?i-e:0;while(--n);a+=e}if(t.strm.avail_in===0)break;if(n=kF(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=n,t.lookahead+t.insert>=Ee)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ja(t),t.lookahead===0&&e===Na)return wt;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((t.strstart===0||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,$t(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-dn&&($t(t,!1),t.strm.avail_out===0))return wt}return t.insert=0,e===Ki?($t(t,!0),t.strm.avail_out===0?La:Zs):(t.strstart>t.block_start&&($t(t,!1),t.strm.avail_out===0),wt)}function fm(t,e){for(var r,n;;){if(t.lookahead=Ee&&(t.ins_h=(t.ins_h<=Ee)if(n=qr._tr_tally(t,t.strstart-t.match_start,t.match_length-Ee),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=Ee){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=Ee&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=Ee-1)),t.prev_length>=Ee&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-Ee,n=qr._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-Ee),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=(t.ins_h<=Ee&&t.strstart>0&&(i=t.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=t.strstart+Yi;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=Ee?(r=qr._tr_tally(t,1,t.match_length-Ee),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=qr._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&($t(t,!1),t.strm.avail_out===0))return wt}return t.insert=0,e===Ki?($t(t,!0),t.strm.avail_out===0?La:Zs):t.last_lit&&($t(t,!1),t.strm.avail_out===0)?wt:Fl}function PF(t,e){for(var r;;){if(t.lookahead===0&&(ja(t),t.lookahead===0)){if(e===Na)return wt;break}if(t.match_length=0,r=qr._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&($t(t,!1),t.strm.avail_out===0))return wt}return t.insert=0,e===Ki?($t(t,!0),t.strm.avail_out===0?La:Zs):t.last_lit&&($t(t,!1),t.strm.avail_out===0)?wt:Fl}function jn(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}var Ks;Ks=[new jn(0,0,0,0,TF),new jn(4,4,8,4,fm),new jn(4,5,16,8,fm),new jn(4,6,32,32,fm),new jn(4,4,16,16,Xs),new jn(8,16,32,32,Xs),new jn(8,16,128,128,Xs),new jn(8,32,128,256,Xs),new jn(32,128,258,1024,Xs),new jn(32,258,258,4096,Xs)];function RF(t){t.window_size=2*t.w_size,qi(t.head),t.max_lazy_match=Ks[t.level].max_lazy,t.good_match=Ks[t.level].good_length,t.nice_match=Ks[t.level].nice_length,t.max_chain_length=Ks[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Ee-1,t.match_available=0,t.ins_h=0}function MF(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=mf,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new er.Buf16(xF*2),this.dyn_dtree=new er.Buf16((2*bF+1)*2),this.bl_tree=new er.Buf16((2*_F+1)*2),qi(this.dyn_ltree),qi(this.dyn_dtree),qi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new er.Buf16(SF+1),this.heap=new er.Buf16(2*dm+1),qi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new er.Buf16(2*dm+1),qi(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function $2(t){var e;return!t||!t.state?Xi(t,Yr):(t.total_in=t.total_out=0,t.data_type=pF,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?gf:Da,t.adler=e.wrap===2?0:1,e.last_flush=Na,qr._tr_init(e),Nn)}function F2(t){var e=$2(t);return e===Nn&&RF(t.state),e}function OF(t,e){return!t||!t.state||t.state.wrap!==2?Yr:(t.state.gzhead=e,Nn)}function D2(t,e,r,n,i,a){if(!t)return Yr;var s=1;if(e===cF&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>mF||r!==mf||n<8||n>15||e<0||e>9||a<0||a>dF)return Xi(t,Yr);n===8&&(n=9);var o=new MF;return t.state=o,o.strm=t,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<P2||e<0)return t?Xi(t,Yr):Yr;if(n=t.state,!t.output||!t.input&&t.avail_in!==0||n.status===$l&&e!==Ki)return Xi(t,t.avail_out===0?um:Yr);if(n.strm=t,r=n.last_flush,n.last_flush=e,n.status===gf)if(n.wrap===2)t.adler=0,Re(n,31),Re(n,139),Re(n,8),n.gzhead?(Re(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Re(n,n.gzhead.time&255),Re(n,n.gzhead.time>>8&255),Re(n,n.gzhead.time>>16&255),Re(n,n.gzhead.time>>24&255),Re(n,n.level===9?2:n.strategy>=ff||n.level<2?4:0),Re(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Re(n,n.gzhead.extra.length&255),Re(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=Vi(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=hm):(Re(n,0),Re(n,0),Re(n,0),Re(n,0),Re(n,0),Re(n,n.level===9?2:n.strategy>=ff||n.level<2?4:0),Re(n,AF),n.status=Da);else{var s=mf+(n.w_bits-8<<4)<<8,o=-1;n.strategy>=ff||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,s|=o<<6,n.strstart!==0&&(s|=EF),s+=31-s%31,n.status=Da,Il(n,s),n.strstart!==0&&(Il(n,t.adler>>>16),Il(n,t.adler&65535)),t.adler=1}if(n.status===hm)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(t.adler=Vi(t.adler,n.pending_buf,n.pending-i,i)),Wi(t),i=n.pending,n.pending===n.pending_buf_size));)Re(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(t.adler=Vi(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=df)}else n.status=df;if(n.status===df)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(t.adler=Vi(t.adler,n.pending_buf,n.pending-i,i)),Wi(t),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(t.adler=Vi(t.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.gzindex=0,n.status=hf)}else n.status=hf;if(n.status===hf)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(t.adler=Vi(t.adler,n.pending_buf,n.pending-i,i)),Wi(t),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(t.adler=Vi(t.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.status=pf)}else n.status=pf;if(n.status===pf&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Wi(t),n.pending+2<=n.pending_buf_size&&(Re(n,t.adler&255),Re(n,t.adler>>8&255),t.adler=0,n.status=Da)):n.status=Da),n.pending!==0){if(Wi(t),t.avail_out===0)return n.last_flush=-1,Nn}else if(t.avail_in===0&&M2(e)<=M2(r)&&e!==Ki)return Xi(t,um);if(n.status===$l&&t.avail_in!==0)return Xi(t,um);if(t.avail_in!==0||n.lookahead!==0||e!==Na&&n.status!==$l){var l=n.strategy===ff?PF(n,e):n.strategy===fF?CF(n,e):Ks[n.level].func(n,e);if((l===La||l===Zs)&&(n.status=$l),l===wt||l===La)return t.avail_out===0&&(n.last_flush=-1),Nn;if(l===Fl&&(e===sF?qr._tr_align(n):e!==P2&&(qr._tr_stored_block(n,0,0,!1),e===oF&&(qi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Wi(t),t.avail_out===0))return n.last_flush=-1,Nn}return e!==Ki?Nn:n.wrap<=0?R2:(n.wrap===2?(Re(n,t.adler&255),Re(n,t.adler>>8&255),Re(n,t.adler>>16&255),Re(n,t.adler>>24&255),Re(n,t.total_in&255),Re(n,t.total_in>>8&255),Re(n,t.total_in>>16&255),Re(n,t.total_in>>24&255)):(Il(n,t.adler>>>16),Il(n,t.adler&65535)),Wi(t),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Nn:R2)}function FF(t){var e;return!t||!t.state?Yr:(e=t.state.status,e!==gf&&e!==hm&&e!==df&&e!==hf&&e!==pf&&e!==Da&&e!==$l?Xi(t,Yr):(t.state=null,e===Da?Xi(t,lF):Nn))}function DF(t,e){var r=e.length,n,i,a,s,o,l,c,u;if(!t||!t.state||(n=t.state,s=n.wrap,s===2||s===1&&n.status!==gf||n.lookahead))return Yr;for(s===1&&(t.adler=O2(t.adler,e,r,0)),n.wrap=0,r>=n.w_size&&(s===0&&(qi(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new er.Buf8(n.w_size),er.arraySet(u,e,r-n.w_size,n.w_size,0),e=u,r=n.w_size),o=t.avail_in,l=t.next_in,c=t.input,t.avail_in=r,t.next_in=0,t.input=e,ja(n);n.lookahead>=Ee;){i=n.strstart,a=n.lookahead-(Ee-1);do n.ins_h=(n.ins_h<{"use strict";m();var vf=pi(),j2=!0,N2=!0;try{String.fromCharCode.apply(null,[0])}catch(t){j2=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){N2=!1}var Dl=new vf.Buf8(256);for(gi=0;gi<256;gi++)Dl[gi]=gi>=252?6:gi>=248?5:gi>=240?4:gi>=224?3:gi>=192?2:1;var gi;Dl[254]=Dl[254]=1;Js.string2buf=function(t){var e,r,n,i,a,s=t.length,o=0;for(i=0;i>>6,e[a++]=128|r&63):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|r&63):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|r&63);return e};function B2(t,e){if(e<65534&&(t.subarray&&N2||!t.subarray&&j2))return String.fromCharCode.apply(null,vf.shrinkBuf(t,e));for(var r="",n=0;n4){o[n++]=65533,r+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&r1){o[n++]=65533;continue}i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|i&1023)}return B2(o,n)};Js.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+Dl[t[r]]>e?r:e}});var mm=M((uY,H2)=>{"use strict";m();function LF(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}H2.exports=LF});var V2=M(Nl=>{"use strict";m();var Ll=L2(),jl=pi(),vm=pm(),ym=uf(),jF=mm(),z2=Object.prototype.toString,NF=0,gm=4,Qs=0,U2=1,G2=2,BF=-1,HF=0,UF=8;function Ba(t){if(!(this instanceof Ba))return new Ba(t);this.options=jl.assign({level:BF,method:UF,chunkSize:16384,windowBits:15,memLevel:8,strategy:HF,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new jF,this.strm.avail_out=0;var r=Ll.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Qs)throw new Error(ym[r]);if(e.header&&Ll.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(typeof e.dictionary=="string"?n=vm.string2buf(e.dictionary):z2.call(e.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(e.dictionary):n=e.dictionary,r=Ll.deflateSetDictionary(this.strm,n),r!==Qs)throw new Error(ym[r]);this._dict_set=!0}}Ba.prototype.push=function(t,e){var r=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;a=e===~~e?e:e===!0?gm:NF,typeof t=="string"?r.input=vm.string2buf(t):z2.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new jl.Buf8(n),r.next_out=0,r.avail_out=n),i=Ll.deflate(r,a),i!==U2&&i!==Qs)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===gm||a===G2))&&(this.options.to==="string"?this.onData(vm.buf2binstring(jl.shrinkBuf(r.output,r.next_out))):this.onData(jl.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==U2);return a===gm?(i=Ll.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Qs):(a===G2&&(this.onEnd(Qs),r.avail_out=0),!0)};Ba.prototype.onData=function(t){this.chunks.push(t)};Ba.prototype.onEnd=function(t){t===Qs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=jl.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function wm(t,e){var r=new Ba(e);if(r.push(t,!0),r.err)throw r.msg||ym[r.err];return r.result}function GF(t,e){return e=e||{},e.raw=!0,wm(t,e)}function zF(t,e){return e=e||{},e.gzip=!0,wm(t,e)}Nl.Deflate=Ba;Nl.deflate=wm;Nl.deflateRaw=GF;Nl.gzip=zF});var q2=M((pY,W2)=>{"use strict";m();var yf=30,VF=12;W2.exports=function(e,r){var n,i,a,s,o,l,c,u,f,d,h,p,g,v,y,b,E,S,A,k,w,x,_,T,C;n=e.state,i=e.next_in,T=e.input,a=i+(e.avail_in-5),s=e.next_out,C=e.output,o=s-(r-e.avail_out),l=s+(e.avail_out-257),c=n.dmax,u=n.wsize,f=n.whave,d=n.wnext,h=n.window,p=n.hold,g=n.bits,v=n.lencode,y=n.distcode,b=(1<>>24,p>>>=A,g-=A,A=S>>>16&255,A===0)C[s++]=S&65535;else if(A&16){k=S&65535,A&=15,A&&(g>>=A,g-=A),g<15&&(p+=T[i++]<>>24,p>>>=A,g-=A,A=S>>>16&255,A&16){if(w=S&65535,A&=15,gc){e.msg="invalid distance too far back",n.mode=yf;break e}if(p>>>=A,g-=A,A=s-o,w>A){if(A=w-A,A>f&&n.sane){e.msg="invalid distance too far back",n.mode=yf;break e}if(x=0,_=h,d===0){if(x+=u-A,A2;)C[s++]=_[x++],C[s++]=_[x++],C[s++]=_[x++],k-=3;k&&(C[s++]=_[x++],k>1&&(C[s++]=_[x++]))}else{x=s-w;do C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],k-=3;while(k>2);k&&(C[s++]=C[x++],k>1&&(C[s++]=C[x++]))}}else if(A&64){e.msg="invalid distance code",n.mode=yf;break e}else{S=y[(S&65535)+(p&(1<>3,i-=k,g-=k<<3,p&=(1<{"use strict";m();var Y2=pi(),eo=15,X2=852,K2=592,Z2=0,bm=1,J2=2,WF=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],qF=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],YF=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],XF=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Q2.exports=function(e,r,n,i,a,s,o,l){var c=l.bits,u=0,f=0,d=0,h=0,p=0,g=0,v=0,y=0,b=0,E=0,S,A,k,w,x,_=null,T=0,C,I=new Y2.Buf16(eo+1),L=new Y2.Buf16(eo+1),F=null,J=0,de,le,ce;for(u=0;u<=eo;u++)I[u]=0;for(f=0;f=1&&I[h]===0;h--);if(p>h&&(p=h),h===0)return a[s++]=1<<24|64<<16|0,a[s++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d0&&(e===Z2||h!==1))return-1;for(L[1]=0,u=1;uX2||e===J2&&b>K2)return 1;for(;;){de=u-v,o[f]C?(le=F[J+o[f]],ce=_[T+o[f]]):(le=96,ce=0),S=1<>v)+A]=de<<24|le<<16|ce|0;while(A!==0);for(S=1<>=1;if(S!==0?(E&=S-1,E+=S):E=0,f++,--I[u]===0){if(u===h)break;u=r[n+o[f]]}if(u>p&&(E&w)!==k){for(v===0&&(v=p),x+=d,g=u-v,y=1<X2||e===J2&&b>K2)return 1;k=E&w,a[k]=p<<24|g<<16|x-s|0}}return E!==0&&(a[x+E]=u-v<<24|64<<16|0),l.bits=p,0}});var F_=M(hn=>{"use strict";m();var Cr=pi(),km=lm(),Hn=cm(),KF=q2(),Bl=e_(),ZF=0,k_=1,T_=2,t_=4,JF=5,wf=6,Ha=0,QF=1,e8=2,Xr=-2,C_=-3,Tm=-4,t8=-5,r_=8,P_=1,n_=2,i_=3,a_=4,s_=5,o_=6,l_=7,c_=8,u_=9,f_=10,xf=11,vi=12,_m=13,d_=14,xm=15,h_=16,p_=17,m_=18,g_=19,bf=20,_f=21,v_=22,y_=23,w_=24,b_=25,__=26,Sm=27,x_=28,S_=29,Ye=30,Cm=31,r8=32,n8=852,i8=592,a8=15,s8=a8;function E_(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function o8(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Cr.Buf16(320),this.work=new Cr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function R_(t){var e;return!t||!t.state?Xr:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=P_,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Cr.Buf32(n8),e.distcode=e.distdyn=new Cr.Buf32(i8),e.sane=1,e.back=-1,Ha)}function M_(t){var e;return!t||!t.state?Xr:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,R_(t))}function O_(t,e){var r,n;return!t||!t.state||(n=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?Xr:(n.window!==null&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,M_(t))}function I_(t,e){var r,n;return t?(n=new o8,t.state=n,n.window=null,r=O_(t,e),r!==Ha&&(t.state=null),r):Xr}function l8(t){return I_(t,s8)}var A_=!0,Em,Am;function c8(t){if(A_){var e;for(Em=new Cr.Buf32(512),Am=new Cr.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Bl(k_,t.lens,0,288,Em,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Bl(T_,t.lens,0,32,Am,0,t.work,{bits:5}),A_=!1}t.lencode=Em,t.lenbits=9,t.distcode=Am,t.distbits=5}function $_(t,e,r,n){var i,a=t.state;return a.window===null&&(a.wsize=1<=a.wsize?(Cr.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),Cr.arraySet(a.window,e,r-n,i,a.wnext),n-=i,n?(Cr.arraySet(a.window,e,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=Hn(r.check,_,2,0),c=0,u=0,r.mode=n_;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=Ye;break}if((c&15)!==r_){t.msg="unknown compression method",r.mode=Ye;break}if(c>>>=4,u-=4,w=(c&15)+8,r.wbits===0)r.wbits=w;else if(w>r.wbits){t.msg="invalid window size",r.mode=Ye;break}r.dmax=1<>8&1),r.flags&512&&(_[0]=c&255,_[1]=c>>>8&255,r.check=Hn(r.check,_,2,0)),c=0,u=0,r.mode=i_;case i_:for(;u<32;){if(o===0)break e;o--,c+=n[a++]<>>8&255,_[2]=c>>>16&255,_[3]=c>>>24&255,r.check=Hn(r.check,_,4,0)),c=0,u=0,r.mode=a_;case a_:for(;u<16;){if(o===0)break e;o--,c+=n[a++]<>8),r.flags&512&&(_[0]=c&255,_[1]=c>>>8&255,r.check=Hn(r.check,_,2,0)),c=0,u=0,r.mode=s_;case s_:if(r.flags&1024){for(;u<16;){if(o===0)break e;o--,c+=n[a++]<>>8&255,r.check=Hn(r.check,_,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=o_;case o_:if(r.flags&1024&&(h=r.length,h>o&&(h=o),h&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Cr.arraySet(r.head.extra,n,a,h,w)),r.flags&512&&(r.check=Hn(r.check,n,h,a)),o-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=l_;case l_:if(r.flags&2048){if(o===0)break e;h=0;do w=n[a+h++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w));while(w&&h>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=vi;break;case f_:for(;u<32;){if(o===0)break e;o--,c+=n[a++]<>>=u&7,u-=u&7,r.mode=Sm;break}for(;u<3;){if(o===0)break e;o--,c+=n[a++]<>>=1,u-=1,c&3){case 0:r.mode=d_;break;case 1:if(c8(r),r.mode=bf,e===wf){c>>>=2,u-=2;break e}break;case 2:r.mode=p_;break;case 3:t.msg="invalid block type",r.mode=Ye}c>>>=2,u-=2;break;case d_:for(c>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,c+=n[a++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=Ye;break}if(r.length=c&65535,c=0,u=0,r.mode=xm,e===wf)break e;case xm:r.mode=h_;case h_:if(h=r.length,h){if(h>o&&(h=o),h>l&&(h=l),h===0)break e;Cr.arraySet(i,n,a,h,s),o-=h,a+=h,l-=h,s+=h,r.length-=h;break}r.mode=vi;break;case p_:for(;u<14;){if(o===0)break e;o--,c+=n[a++]<>>=5,u-=5,r.ndist=(c&31)+1,c>>>=5,u-=5,r.ncode=(c&15)+4,c>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=Ye;break}r.have=0,r.mode=m_;case m_:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[I[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},x=Bl(ZF,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,x){t.msg="invalid code lengths set",r.mode=Ye;break}r.have=0,r.mode=g_;case g_:for(;r.have>>24,b=v>>>16&255,E=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=y,u-=y,r.lens[r.have++]=E;else{if(E===16){for(C=y+2;u>>=y,u-=y,r.have===0){t.msg="invalid bit length repeat",r.mode=Ye;break}w=r.lens[r.have-1],h=3+(c&3),c>>>=2,u-=2}else if(E===17){for(C=y+3;u>>=y,u-=y,w=0,h=3+(c&7),c>>>=3,u-=3}else{for(C=y+7;u>>=y,u-=y,w=0,h=11+(c&127),c>>>=7,u-=7}if(r.have+h>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=Ye;break}for(;h--;)r.lens[r.have++]=w}}if(r.mode===Ye)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=Ye;break}if(r.lenbits=9,T={bits:r.lenbits},x=Bl(k_,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,x){t.msg="invalid literal/lengths set",r.mode=Ye;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},x=Bl(T_,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,x){t.msg="invalid distances set",r.mode=Ye;break}if(r.mode=bf,e===wf)break e;case bf:r.mode=_f;case _f:if(o>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=a,t.avail_in=o,r.hold=c,r.bits=u,KF(t,d),s=t.next_out,i=t.output,l=t.avail_out,a=t.next_in,n=t.input,o=t.avail_in,c=r.hold,u=r.bits,r.mode===vi&&(r.back=-1);break}for(r.back=0;v=r.lencode[c&(1<>>24,b=v>>>16&255,E=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>S)],y=v>>>24,b=v>>>16&255,E=v&65535,!(S+y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=S,u-=S,r.back+=S}if(c>>>=y,u-=y,r.back+=y,r.length=E,b===0){r.mode=__;break}if(b&32){r.back=-1,r.mode=vi;break}if(b&64){t.msg="invalid literal/length code",r.mode=Ye;break}r.extra=b&15,r.mode=v_;case v_:if(r.extra){for(C=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=y_;case y_:for(;v=r.distcode[c&(1<>>24,b=v>>>16&255,E=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>S)],y=v>>>24,b=v>>>16&255,E=v&65535,!(S+y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=S,u-=S,r.back+=S}if(c>>>=y,u-=y,r.back+=y,b&64){t.msg="invalid distance code",r.mode=Ye;break}r.offset=E,r.extra=b&15,r.mode=w_;case w_:if(r.extra){for(C=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=Ye;break}r.mode=b_;case b_:if(l===0)break e;if(h=d-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=Ye;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),g=r.window}else g=i,p=s-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[s++]=g[p++];while(--h);r.length===0&&(r.mode=_f);break;case __:if(l===0)break e;i[s++]=r.length,l--,r.mode=_f;break;case Sm:if(r.wrap){for(;u<32;){if(o===0)break e;o--,c|=n[a++]<{"use strict";m();D_.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var j_=M((xY,L_)=>{"use strict";m();function p8(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}L_.exports=p8});var B_=M(Ul=>{"use strict";m();var to=F_(),Hl=pi(),Sf=pm(),lt=Pm(),Rm=uf(),m8=mm(),g8=j_(),N_=Object.prototype.toString;function Ua(t){if(!(this instanceof Ua))return new Ua(t);this.options=Hl.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m8,this.strm.avail_out=0;var r=to.inflateInit2(this.strm,e.windowBits);if(r!==lt.Z_OK)throw new Error(Rm[r]);if(this.header=new g8,to.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Sf.string2buf(e.dictionary):N_.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=to.inflateSetDictionary(this.strm,e.dictionary),r!==lt.Z_OK)))throw new Error(Rm[r])}Ua.prototype.push=function(t,e){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,a,s,o,l,c,u=!1;if(this.ended)return!1;s=e===~~e?e:e===!0?lt.Z_FINISH:lt.Z_NO_FLUSH,typeof t=="string"?r.input=Sf.binstring2buf(t):N_.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Hl.Buf8(n),r.next_out=0,r.avail_out=n),a=to.inflate(r,lt.Z_NO_FLUSH),a===lt.Z_NEED_DICT&&i&&(a=to.inflateSetDictionary(this.strm,i)),a===lt.Z_BUF_ERROR&&u===!0&&(a=lt.Z_OK,u=!1),a!==lt.Z_STREAM_END&&a!==lt.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===lt.Z_STREAM_END||r.avail_in===0&&(s===lt.Z_FINISH||s===lt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=Sf.utf8border(r.output,r.next_out),l=r.next_out-o,c=Sf.buf2string(r.output,o),r.next_out=l,r.avail_out=n-l,l&&Hl.arraySet(r.output,r.output,o,l,0),this.onData(c)):this.onData(Hl.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==lt.Z_STREAM_END);return a===lt.Z_STREAM_END&&(s=lt.Z_FINISH),s===lt.Z_FINISH?(a=to.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===lt.Z_OK):(s===lt.Z_SYNC_FLUSH&&(this.onEnd(lt.Z_OK),r.avail_out=0),!0)};Ua.prototype.onData=function(t){this.chunks.push(t)};Ua.prototype.onEnd=function(t){t===lt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Hl.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Mm(t,e){var r=new Ua(e);if(r.push(t,!0),r.err)throw r.msg||Rm[r.err];return r.result}function v8(t,e){return e=e||{},e.raw=!0,Mm(t,e)}Ul.Inflate=Ua;Ul.inflate=Mm;Ul.inflateRaw=v8;Ul.ungzip=Mm});var G_=M((kY,U_)=>{"use strict";m();var y8=pi().assign,w8=V2(),b8=B_(),_8=Pm(),H_={};y8(H_,w8,b8,_8);U_.exports=H_});var W_=M((CY,V_)=>{"use strict";m();var z_=(t,e)=>function(...r){let n=e.promiseModule;return new n((i,a)=>{e.multiArgs?r.push((...s)=>{e.errorFirst?s[0]?a(s):(s.shift(),i(s)):i(s)}):e.errorFirst?r.push((s,o)=>{s?a(s):i(o)}):r.push(i),t.apply(this,r)})};V_.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);let r=typeof t;if(!(t!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${t===null?"null":r}\``);let n=a=>{let s=o=>typeof o=="string"?a===o:o.test(a);return e.include?e.include.some(s):!e.exclude.some(s)},i;r==="function"?i=function(...a){return e.excludeMain?t(...a):z_(t,e).apply(this,a)}:i=Object.create(Object.getPrototypeOf(t));for(let a in t){let s=t[a];i[a]=typeof s=="function"&&n(a)?z_(s,e):s}return i}});var tx=M((RY,ex)=>{m();function q_(t){return Array.isArray(t)?t:[t]}var $m="",Y_=" ",Om="\\",x8=/^\s+$/,S8=/(?:[^\\]|^)\\$/,E8=/^\\!/,A8=/^\\#/,k8=/\r?\n/g,T8=/^\.*\/|^\.+$/,Im="/",Z_="node-ignore";typeof Symbol!="undefined"&&(Z_=Symbol.for("node-ignore"));var X_=Z_,C8=(t,e,r)=>Object.defineProperty(t,e,{value:r}),P8=/([0-z])-([0-z])/g,J_=()=>!1,R8=t=>t.replace(P8,(e,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?e:$m),M8=t=>{let{length:e}=t;return t.slice(0,e-e%2)},O8=[[/^\uFEFF/,()=>$m],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,r)=>e+(r.indexOf("\\")===0?Y_:$m)],[/(\\+?)\s/g,(t,e)=>{let{length:r}=e;return e.slice(0,r-r%2)+Y_}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,r)=>e+6{let n=r.replace(/\\\*/g,"[^\\/]*");return e+n}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Om],[/\\\\/g,()=>Om],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,r,n,i)=>e===Om?`\\[${r}${M8(n)}${i}`:i==="]"&&n.length%2===0?`[${R8(r)}${n}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],K_=Object.create(null),I8=(t,e)=>{let r=K_[t];return r||(r=O8.reduce((n,[i,a])=>n.replace(i,a.bind(t)),t),K_[t]=r),e?new RegExp(r,"i"):new RegExp(r)},Lm=t=>typeof t=="string",$8=t=>t&&Lm(t)&&!x8.test(t)&&!S8.test(t)&&t.indexOf("#")!==0,F8=t=>t.split(k8),Fm=class{constructor(e,r,n,i){this.origin=e,this.pattern=r,this.negative=n,this.regex=i}},D8=(t,e)=>{let r=t,n=!1;t.indexOf("!")===0&&(n=!0,t=t.substr(1)),t=t.replace(E8,"!").replace(A8,"#");let i=I8(t,e);return new Fm(r,t,n,i)},L8=(t,e)=>{throw new e(t)},yi=(t,e,r)=>Lm(t)?t?yi.isNotRelative(t)?r(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${e}\``,TypeError),Q_=t=>T8.test(t);yi.isNotRelative=Q_;yi.convert=t=>t;var Dm=class{constructor({ignorecase:e=!0,ignoreCase:r=e,allowRelativePaths:n=!1}={}){C8(this,X_,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[X_]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if($8(e)){let r=D8(e,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(e){return this._added=!1,q_(Lm(e)?F8(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,r){let n=!1,i=!1;return this._rules.forEach(a=>{let{negative:s}=a;if(i===s&&n!==i||s&&!n&&!i&&!r)return;a.regex.test(e)&&(n=!s,i=s)}),{ignored:n,unignored:i}}_test(e,r,n,i){let a=e&&yi.convert(e);return yi(a,e,this._allowRelativePaths?J_:L8),this._t(a,r,n,i)}_t(e,r,n,i){if(e in r)return r[e];if(i||(i=e.split(Im)),i.pop(),!i.length)return r[e]=this._testOne(e,n);let a=this._t(i.join(Im)+Im,r,n,i);return r[e]=a.ignored?a:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return q_(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},Ef=t=>new Dm(t),j8=t=>yi(t&&yi.convert(t),t,J_);Ef.isPathValid=j8;Ef.default=Ef;ex.exports=Ef;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let t=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");yi.convert=t;let e=/^[a-z]:\//i;yi.isNotRelative=r=>e.test(r)||Q_(r)}});var nx=M((OY,rx)=>{"use strict";m();function N8(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Un(t,e,r){return e=e instanceof RegExp?e:new RegExp(N8(e),"g"),t.replace(e,r)}var B8={clean:function(e){if(typeof e!="string")throw new Error("Expected a string, received: "+e);return e=Un(e,"./","/"),e=Un(e,"..","."),e=Un(e," ","-"),e=Un(e,/^[~^:?*\\\-]/g,""),e=Un(e,/[~^:?*\\]/g,"-"),e=Un(e,/[~^:?*\\\-]$/g,""),e=Un(e,"@{","-"),e=Un(e,/\.$/g,""),e=Un(e,/\/$/g,""),e=Un(e,/\.lock$/g,""),e}};rx.exports=B8});var ax=M(($Y,ix)=>{m();ix.exports=function(t,e){var r=t,n=e,i=r.length,a=n.length,s=!1,o=null,l=i+1,c=[],u=[],f=[],d="",h=-1,p=0,g=1,v,y,b=function(){i>=a&&(v=r,y=i,r=n,n=v,i=a,a=y,s=!0,l=i+1)},E=function(w,x,_){return{x:w,y:x,k:_}},S=function(w,x){return{elem:w,t:x}},A=function(w,x,_){var T,C,I;for(x>_?T=c[w-1+l]:T=c[w+1+l],I=Math.max(x,_),C=I-w;C=0;--I)for(;TC-T?(s?f[f.length]=new S(n[C],h):f[f.length]=new S(n[C],g),++_,++C):w[I].y-w[I].x=w+1;--F)_[F+l]=A(F,_[F-1+l]+1,_[F+1+l]);_[w+l]=A(w,_[w-1+l]+1,_[w+1+l])}while(_[w+l]!==a);for(o=w+2*T,C=c[w+l],I=[];C!==-1;)I[I.length]=new E(u[C].x,u[C].y,null),C=u[C].k;k(I)}}}});var lx=M((DY,ox)=>{m();var H8=ax();function U8(t,e){var r=new H8(t,e);r.compose();for(var n=r.getses(),i,a,s=t.length-1,o=e.length-1,l=n.length-1;l>=0;--l)n[l].t===r.SES_COMMON?(a?(a.chain={file1index:s,file2index:o,chain:null},a=a.chain):(i={file1index:s,file2index:o,chain:null},a=i),s--,o--):n[l].t===r.SES_DELETE?s--:n[l].t===r.SES_ADD&&o--;var c={file1index:-1,file2index:-1,chain:null};return a?(a.chain=c,i):c}function sx(t,e){for(var r=[],n=t.length,i=e.length,a=U8(t,e);a!==null;a=a.chain){var s=n-a.file1index-1,o=i-a.file2index-1;n=a.file1index,i=a.file2index,(s||o)&&r.push({file1:[n+1,s],file2:[i+1,o]})}return r.reverse(),r}function G8(t,e,r){var n,i=sx(e,t),a=sx(e,r),s=[];function o(L,F){s.push([L.file1[0],F,L.file1[1],L.file2[0],L.file2[1]])}for(n=0;nc&&(l.push([1,c,L-c]),c=L)}for(var f=0;fg)break;g=Math.max(g,y+v[2]),f++}if(u(p),d==f)h[4]>0&&l.push([h[1],h[3],h[4]]);else{var b={0:[t.length,-1,e.length,-1],2:[r.length,-1,e.length,-1]};for(n=d;n<=f;n++){h=s[n];var E=h[1],S=b[E],A=h[0],k=A+h[2],w=h[3],x=w+h[4];S[0]=Math.min(w,S[0]),S[1]=Math.max(x,S[1]),S[2]=Math.min(A,S[2]),S[3]=Math.max(k,S[3])}var _=b[0][0]+(p-b[0][2]),T=b[0][1]+(g-b[0][3]),C=b[2][0]+(p-b[2][2]),I=b[2][1]+(g-b[2][3]);l.push([-1,_,T-_,p,g-p,C,I-C])}c=g}return u(e.length),l}function z8(t,e,r){var n=[],i=[t,e,r],a=G8(t,e,r),s=[];function o(){s.length&&n.push({ok:s}),s=[]}function l(h){for(var p=0;p{"use strict";m();Object.defineProperty(Y,"__esModule",{value:!0});function aa(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var zl=aa(Wy()),Mx=aa(Zb()),$=e2(),V8=aa(r2()),cg=aa(G_()),jm=aa(W_()),W8=aa(tx()),zn=aa(nx()),q8=aa(lx()),Ae=class t extends Error{constructor(e){super(e),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(e){let r=new t(e.message);return r.code=e.code,r.data=e.data,r.caller=e.caller,r.stack=e.stack,r}get isIsomorphicGitError(){return!0}},Vl=class t extends Ae{constructor(e){super(`Modifying the index is not possible because you have unmerged files: ${e.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`),this.code=this.name=t.code,this.data={filepaths:e}}};Vl.code="UnmergedPathsError";var pe=class t extends Ae{constructor(e){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${e}`),this.code=this.name=t.code,this.data={message:e}}};pe.code="InternalError";var no=class t extends Ae{constructor(e){super(`The filepath "${e}" contains unsafe character sequences`),this.code=this.name=t.code,this.data={filepath:e}}};no.code="UnsafeFilepathError";var Kr=class{constructor(e){this.buffer=e,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(e){this._start=e}slice(e){let r=this.buffer.slice(this._start,this._start+e);return this._start+=e,r}toString(e,r){let n=this.buffer.toString(e,this._start,this._start+r);return this._start+=r,n}write(e,r,n){let i=this.buffer.write(e,this._start,r,n);return this._start+=r,i}copy(e,r,n){let i=e.copy(this.buffer,this._start,r,n);return this._start+=i,i}readUInt8(){let e=this.buffer.readUInt8(this._start);return this._start+=1,e}writeUInt8(e){let r=this.buffer.writeUInt8(e,this._start);return this._start+=1,r}readUInt16BE(){let e=this.buffer.readUInt16BE(this._start);return this._start+=2,e}writeUInt16BE(e){let r=this.buffer.writeUInt16BE(e,this._start);return this._start+=2,r}readUInt32BE(){let e=this.buffer.readUInt32BE(this._start);return this._start+=4,e}writeUInt32BE(e){let r=this.buffer.writeUInt32BE(e,this._start);return this._start+=4,r}};function Lf(t,e){return-(te)}function Ox(t,e){return Lf(t.path,e.path)}function Ix(t){let e=t>0?t>>12:0;e!==4&&e!==8&&e!==10&&e!==14&&(e=8);let r=t&511;return r&73?r=493:r=420,e!==8&&(r=0),(e<<12)+r}var Gn=2**32;function cx(t,e,r,n){if(t!==void 0&&e!==void 0)return[t,e];r===void 0&&(r=n.valueOf());let i=Math.floor(r/1e3),a=(r-i*1e3)*1e6;return[i,a]}function io(t){let[e,r]=cx(t.ctimeSeconds,t.ctimeNanoseconds,t.ctimeMs,t.ctime),[n,i]=cx(t.mtimeSeconds,t.mtimeNanoseconds,t.mtimeMs,t.mtime);return{ctimeSeconds:e%Gn,ctimeNanoseconds:r%Gn,mtimeSeconds:n%Gn,mtimeNanoseconds:i%Gn,dev:t.dev%Gn,ino:t.ino%Gn,mode:Ix(t.mode%Gn),uid:t.uid%Gn,gid:t.gid%Gn,size:t.size>-1?t.size%Gn:0}}function Y8(t){let e="";for(let r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}var Nm=null;async function bi(t){return Nm===null&&(Nm=await K8()),Nm?$x(t):X8(t)}function X8(t){return new Mx().update(t).digest("hex")}async function $x(t){let e=await crypto.subtle.digest("SHA-1",t);return Y8(e)}async function K8(){try{if(await $x(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709")return!0}catch(t){}return!1}function Z8(t){return{assumeValid:!!(t&32768),extended:!!(t&16384),stage:(t&12288)>>12,nameLength:t&4095}}function J8(t){let e=t.flags;return e.extended=!1,e.nameLength=Math.min(Buffer.from(t.path).length,4095),(e.assumeValid?32768:0)+(e.extended?16384:0)+((e.stage&3)<<12)+(e.nameLength&4095)}var Zm=class t{constructor(e,r){this._dirty=!1,this._unmergedPaths=r||new Set,this._entries=e||new Map}_addEntry(e){if(e.flags.stage===0)e.stages=[e],this._entries.set(e.path,e),this._unmergedPaths.delete(e.path);else{let r=this._entries.get(e.path);r||(this._entries.set(e.path,e),r=e),r.stages[e.flags.stage]=e,this._unmergedPaths.add(e.path)}}static async from(e){if(Buffer.isBuffer(e))return t.fromBuffer(e);if(e===null)return new t(null);throw new pe("invalid type passed to GitIndex.from")}static async fromBuffer(e){if(e.length===0)throw new pe("Index file is empty (.git/index)");let r=new t,n=new Kr(e),i=n.toString("utf8",4);if(i!=="DIRC")throw new pe(`Invalid dircache magic file number: ${i}`);let a=await bi(e.slice(0,-20)),s=e.slice(-20).toString("hex");if(s!==a)throw new pe(`Invalid checksum in GitIndex buffer: expected ${s} but saw ${a}`);let o=n.readUInt32BE();if(o!==2)throw new pe(`Unsupported dircache version: ${o}`);let l=n.readUInt32BE(),c=0;for(;!n.eof()&&ce.stages.length>1?e.stages.filter(r=>r):e)}*[Symbol.iterator](){for(let e of this.entries)yield e}insert({filepath:e,stats:r,oid:n,stage:i=0}){r||(r={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),r=io(r);let a=Buffer.from(e),s={ctimeSeconds:r.ctimeSeconds,ctimeNanoseconds:r.ctimeNanoseconds,mtimeSeconds:r.mtimeSeconds,mtimeNanoseconds:r.mtimeNanoseconds,dev:r.dev,ino:r.ino,mode:r.mode||33188,uid:r.uid,gid:r.gid,size:r.size,path:e,oid:n,flags:{assumeValid:!1,extended:!1,stage:i,nameLength:a.length<4095?a.length:4095},stages:[]};this._addEntry(s),this._dirty=!0}delete({filepath:e}){if(this._entries.has(e))this._entries.delete(e);else for(let r of this._entries.keys())r.startsWith(e+"/")&&this._entries.delete(r);this._unmergedPaths.has(e)&&this._unmergedPaths.delete(e),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:e}){return this._entries.has(e)}render(){return this.entries.map(e=>`${e.mode.toString(8)} ${e.oid} ${e.path}`).join(` +`)}static async _entryToBuffer(e){let r=Buffer.from(e.path),n=Math.ceil((62+r.length+1)/8)*8,i=Buffer.alloc(n),a=new Kr(i),s=io(e);return a.writeUInt32BE(s.ctimeSeconds),a.writeUInt32BE(s.ctimeNanoseconds),a.writeUInt32BE(s.mtimeSeconds),a.writeUInt32BE(s.mtimeNanoseconds),a.writeUInt32BE(s.dev),a.writeUInt32BE(s.ino),a.writeUInt32BE(s.mode),a.writeUInt32BE(s.uid),a.writeUInt32BE(s.gid),a.writeUInt32BE(s.size),a.write(e.oid,20,"hex"),a.writeUInt16BE(J8(e)),a.write(e.path,r.length,"utf8"),i}async toObject(){let e=Buffer.alloc(12),r=new Kr(e);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let n=[];for(let o of this.entries)if(n.push(t._entryToBuffer(o)),o.stages.length>1)for(let l of o.stages)l&&l!==o&&n.push(t._entryToBuffer(l));n=await Promise.all(n);let i=Buffer.concat(n),a=Buffer.concat([e,i]),s=await bi(a);return Buffer.concat([a,Buffer.from(s,"hex")])}};function Tf(t,e,r=!0,n=!0){let i=io(t),a=io(e);return r&&i.mode!==a.mode||i.mtimeSeconds!==a.mtimeSeconds||i.ctimeSeconds!==a.ctimeSeconds||i.uid!==a.uid||i.gid!==a.gid||n&&i.ino!==a.ino||i.size!==a.size}var Bm=null,Hm=Symbol("IndexCache");function Q8(){return{map:new Map,stats:new Map}}async function e4(t,e,r){let[n,i]=await Promise.all([t.lstat(e),t.read(e)]),a=await Zm.from(i);r.map.set(e,a),r.stats.set(e,n)}async function t4(t,e,r){let n=r.stats.get(e);if(n===void 0)return!0;if(n===null)return!1;let i=await t.lstat(e);return i===null?!1:Tf(n,i)}var ct=class{static async acquire({fs:e,gitdir:r,cache:n,allowUnmerged:i=!0},a){n[Hm]||(n[Hm]=Q8());let s=`${r}/index`;Bm===null&&(Bm=new zl({maxPending:1/0}));let o,l=[];return await Bm.acquire(s,async()=>{let c=n[Hm];await t4(e,s,c)&&await e4(e,s,c);let u=c.map.get(s);if(l=u.unmergedPaths,l.length&&!i)throw new Vl(l);if(o=await a(u),u._dirty){let f=await u.toObject();await e.write(s,f),c.stats.set(s,await e.lstat(s)),u._dirty=!1}}),o}};function Cf(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e>-1&&(t=t.slice(e+1)),t}function ao(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e===-1?".":e===0?"/":t.slice(0,e)}function Fx(t){let e=new Map,r=function(i){if(!e.has(i)){let a={type:"tree",fullpath:i,basename:Cf(i),metadata:{},children:[]};e.set(i,a),a.parent=r(ao(i)),a.parent&&a.parent!==a&&a.parent.children.push(a)}return e.get(i)},n=function(i,a){if(!e.has(i)){let s={type:"blob",fullpath:i,basename:Cf(i),metadata:a,parent:r(ao(i)),children:[]};s.parent&&s.parent.children.push(s),e.set(i,s)}return e.get(i)};r(".");for(let i of t)n(i.path,i);return e}function r4(t){switch(t){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new pe(`Unexpected GitTree entry mode: ${t.toString(8)}`)}var Jm=class{constructor({fs:e,gitdir:r,cache:n}){this.treePromise=ct.acquire({fs:e,gitdir:r,cache:n},async function(a){return Fx(a.entries)});let i=this;this.ConstructEntry=class{constructor(s){this._fullpath=s,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return i.type(this)}async mode(){return i.mode(this)}async stat(){return i.stat(this)}async content(){return i.content(this)}async oid(){return i.oid(this)}}}async readdir(e){let r=e._fullpath,i=(await this.treePromise).get(r);if(!i||i.type==="blob")return null;if(i.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let a=i.children.map(s=>s.fullpath);return a.sort(Lf),a}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let n=(await this.treePromise).get(e._fullpath);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let i=n.type==="tree"?{}:io(n.metadata);e._type=n.type==="tree"?"tree":r4(i.mode),e._mode=i.mode,n.type==="tree"?e._stat=void 0:e._stat=i}return e._stat}async content(e){}async oid(e){if(e._oid===!1){let n=(await this.treePromise).get(e._fullpath);e._oid=n.metadata.oid}return e._oid}},jf=Symbol("GitWalkSymbol");function Ya(){let t=Object.create(null);return Object.defineProperty(t,jf,{value:function({fs:e,gitdir:r,cache:n}){return new Jm({fs:e,gitdir:r,cache:n})}}),Object.freeze(t),t}var je=class t extends Ae{constructor(e){super(`Could not find ${e}.`),this.code=this.name=t.code,this.data={what:e}}};je.code="NotFoundError";var tr=class t extends Ae{constructor(e,r,n,i){super(`Object ${e} ${i?`at ${i}`:""}was anticipated to be a ${n} but it is a ${r}.`),this.code=this.name=t.code,this.data={oid:e,actual:r,expected:n,filepath:i}}};tr.code="ObjectTypeError";var Qi=class t extends Ae{constructor(e){super(`Expected a 40-char hex object id but saw "${e}".`),this.code=this.name=t.code,this.data={value:e}}};Qi.code="InvalidOidError";var Wl=class t extends Ae{constructor(e){super(`Could not find a fetch refspec for remote "${e}". Make sure the config file has an entry like the following: +[remote "${e}"] fetch = +refs/heads/*:refs/remotes/origin/* -`),this.code=this.name=e.code,this.data={remote:t}}};rl.code="NoRefspecError";var nu=class e{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let r=null;this.parsedConfig=t.trim().split(` -`).map(n=>{if(/^\s*#/.test(n))return{line:n,comment:!0};let i=n.indexOf(" ");if(n.startsWith("^")){let a=n.slice(1);return this.refs.set(r+"^{}",a),{line:n,ref:r,peeled:a}}else{let a=n.slice(0,i);return r=n.slice(i+1),this.refs.set(r,a),{line:n,ref:r,oid:a}}})}return this}static from(t){return new e(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join(` +`),this.code=this.name=t.code,this.data={remote:e}}};Wl.code="NoRefspecError";var Pf=class t{constructor(e){if(this.refs=new Map,this.parsedConfig=[],e){let r=null;this.parsedConfig=e.trim().split(` +`).map(n=>{if(/^\s*#/.test(n))return{line:n,comment:!0};let i=n.indexOf(" ");if(n.startsWith("^")){let a=n.slice(1);return this.refs.set(r+"^{}",a),{line:n,ref:r,peeled:a}}else{let a=n.slice(0,i);return r=n.slice(i+1),this.refs.set(r,a),{line:n,ref:r,oid:a}}})}return this}static from(e){return new t(e)}delete(e){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==e),this.refs.delete(e)}toString(){return this.parsedConfig.map(({line:e})=>e).join(` `)+` -`}},iu=class e{constructor({remotePath:t,localPath:r,force:n,matchPrefix:i}){Object.assign(this,{remotePath:t,localPath:r,force:n,matchPrefix:i})}static from(t){let[r,n,i,a,s]=t.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",l=i==="*";if(l!==(s==="*"))throw new le("Invalid refspec");return new e({remotePath:n,localPath:a,force:o,matchPrefix:l})}translate(t){if(this.matchPrefix){if(t.startsWith(this.remotePath))return this.localPath+t.replace(this.remotePath,"")}else if(t===this.remotePath)return this.localPath;return null}reverseTranslate(t){if(this.matchPrefix){if(t.startsWith(this.localPath))return this.remotePath+t.replace(this.localPath,"")}else if(t===this.localPath)return this.remotePath;return null}},pp=class e{constructor(t=[]){this.rules=t}static from(t){let r=[];for(let n of t)r.push(iu.from(n));return new e(r)}add(t){let r=iu.from(t);this.rules.push(r)}translate(t){let r=[];for(let n of this.rules)for(let i of t){let a=n.translate(i);a&&r.push([i,a])}return r}translateOne(t){let r=null;for(let n of this.rules){let i=n.translate(t);i&&(r=i)}return r}localNamespaces(){return this.rules.filter(t=>t.matchPrefix).map(t=>t.localPath.replace(/\/$/,""))}};function dO(e,t){let r=e.replace(/\^\{\}$/,""),n=t.replace(/\^\{\}$/,""),i=-(rn);return i===0?e.endsWith("^{}")?1:-1:i}var Fw=new Map;function $w(e){let t=Fw.get(e);return t||(t=hO(e),Fw.set(e,t)),t}function hO(e){return e=e.split("/./").join("/").replace(/\/{2,}/g,"/"),e==="/."?"/":e==="./"||(e.startsWith("./")&&(e=e.slice(2)),e.endsWith("/.")&&(e=e.slice(0,-2)),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e==="")?".":e}function $(...e){return $w(e.map($w).join("/"))}var pO=e=>{e=e.toLowerCase();let t=parseInt(e);return e.endsWith("k")&&(t*=1024),e.endsWith("m")&&(t*=1024*1024),e.endsWith("g")&&(t*=1024*1024*1024),t},Qo=e=>{if(e=e.trim().toLowerCase(),e==="true"||e==="yes"||e==="on")return!0;if(e==="false"||e==="no"||e==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${e}`)},Lw={core:{filemode:Qo,bare:Qo,logallrefupdates:Qo,symlinks:Qo,ignorecase:Qo,bigFileThreshold:pO}},mO=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,gO=/^[A-Za-z0-9-.]+$/,vO=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,yO=/^[A-Za-z][A-Za-z-]*$/,wO=/^(.*?)( *[#;].*)$/,bO=e=>{let t=mO.exec(e);if(t!=null){let[r,n]=t.slice(1);return[r,n]}return null},_O=e=>{let t=vO.exec(e);if(t!=null){let[r,n="true"]=t.slice(1),i=xO(n),a=SO(i);return[r,a]}return null},xO=e=>{let t=wO.exec(e);if(t==null)return e;let[r,n]=t.slice(1);return Dw(r)&&Dw(n)?`${r}${n}`:r},Dw=e=>(e.match(/(?:^|[^\\])"/g)||[]).length%2!==0,SO=e=>e.split("").reduce((t,r,n,i)=>{let a=r==='"'&&i[n-1]!=="\\",s=r==="\\"&&i[n+1]==='"';return a||s?t:t+r},""),Nw=e=>e!=null?e.toLowerCase():null,mp=(e,t,r)=>[Nw(e),t,Nw(r)].filter(n=>n!=null).join("."),Bw=e=>{let t=e.split("."),r=t.shift(),n=t.pop(),i=t.length?t.join("."):void 0;return{section:r,subsection:i,name:n,path:mp(r,i,n),sectionPath:mp(r,i,null)}},EO=(e,t)=>e.reduce((r,n,i)=>t(n)?i:r,-1),gp=class e{constructor(t){let r=null,n=null;this.parsedConfig=t?t.split(` -`).map(i=>{let a=null,s=null,o=i.trim(),l=bO(o),c=l!=null;if(c)[r,n]=l;else{let f=_O(o);f!=null&&([a,s]=f)}let u=mp(r,n,a);return{line:i,isSection:c,section:r,subsection:n,name:a,value:s,path:u}}):[]}static from(t){return new e(t)}async get(t,r=!1){let n=Bw(t).path,i=this.parsedConfig.filter(a=>a.path===n).map(({section:a,name:s,value:o})=>{let l=Lw[a]&&Lw[a][s];return l?l(o):o});return r?i:i.pop()}async getall(t){return this.get(t,!0)}async getSubsections(t){return this.parsedConfig.filter(r=>r.section===t&&r.isSection).map(r=>r.subsection)}async deleteSection(t,r){this.parsedConfig=this.parsedConfig.filter(n=>!(n.section===t&&n.subsection===r))}async append(t,r){return this.set(t,r,!0)}async set(t,r,n=!1){let{section:i,subsection:a,name:s,path:o,sectionPath:l}=Bw(t),c=EO(this.parsedConfig,u=>u.path===o);if(r==null)c!==-1&&this.parsedConfig.splice(c,1);else if(c!==-1){let u=this.parsedConfig[c],f=Object.assign({},u,{name:s,value:r,modified:!0});n?this.parsedConfig.splice(c+1,0,f):this.parsedConfig[c]=f}else{let u=this.parsedConfig.findIndex(d=>d.path===l),f={section:i,subsection:a,name:s,value:r,modified:!0,path:o};if(gO.test(i)&&yO.test(s))if(u>=0)this.parsedConfig.splice(u+1,0,f);else{let d={section:i,subsection:a,modified:!0,path:l};this.parsedConfig.push(d,f)}}}toString(){return this.parsedConfig.map(({line:t,section:r,subsection:n,name:i,value:a,modified:s=!1})=>s?i!=null&&a!=null?typeof a=="string"&&/[#;]/.test(a)?` ${i} = "${a}"`:` ${i} = ${a}`:n!=null?`[${r} "${n}"]`:`[${r}]`:t).join(` -`)}},qe=class{static async get({fs:t,gitdir:r}){let n=await t.read(`${r}/config`,{encoding:"utf8"});return gp.from(n)}static async save({fs:t,gitdir:r,config:n}){await t.write(`${r}/config`,n.toString(),{encoding:"utf8"})}},Jc=e=>[`${e}`,`refs/${e}`,`refs/tags/${e}`,`refs/heads/${e}`,`refs/remotes/${e}`,`refs/remotes/${e}/HEAD`],AO=["config","description","index","shallow","commondir"],ip;async function yi(e,t){return ip===void 0&&(ip=new el.default),ip.acquire(e,t)}var W=class e{static async updateRemoteRefs({fs:t,gitdir:r,remote:n,refs:i,symrefs:a,tags:s,refspecs:o=void 0,prune:l=!1,pruneTags:c=!1}){for(let v of i.values())if(!v.match(/[0-9a-f]{40}/))throw new _i(v);let u=await qe.get({fs:t,gitdir:r});if(!o){if(o=await u.getall(`remote.${n}.fetch`),o.length===0)throw new rl(n);o.unshift(`+HEAD:refs/remotes/${n}/HEAD`)}let f=pp.from(o),d=new Map;if(c){let v=await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"});await e.deleteRefs({fs:t,gitdir:r,refs:v.map(y=>`refs/tags/${y}`)})}if(s){for(let v of i.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await e.exists({fs:t,gitdir:r,ref:v})){let y=i.get(v);d.set(v,y)}}let h=f.translate([...i.keys()]);for(let[v,y]of h){let b=i.get(v);d.set(y,b)}let p=f.translate([...a.keys()]);for(let[v,y]of p){let b=a.get(v),x=f.translateOne(b);x&&d.set(y,`ref: ${x}`)}let m=[];if(l){for(let v of f.localNamespaces()){let y=(await e.listRefs({fs:t,gitdir:r,filepath:v})).map(b=>`${v}/${b}`);for(let b of y)d.has(b)||m.push(b)}m.length>0&&await e.deleteRefs({fs:t,gitdir:r,refs:m})}for(let[v,y]of d)await yi(v,async()=>t.write($(r,v),`${y.trim()} -`,"utf8"));return{pruned:m}}static async writeRef({fs:t,gitdir:r,ref:n,value:i}){if(!i.match(/[0-9a-f]{40}/))throw new _i(i);await yi(n,async()=>t.write($(r,n),`${i.trim()} -`,"utf8"))}static async writeSymbolicRef({fs:t,gitdir:r,ref:n,value:i}){await yi(n,async()=>t.write($(r,n),`ref: ${i.trim()} -`,"utf8"))}static async deleteRef({fs:t,gitdir:r,ref:n}){return e.deleteRefs({fs:t,gitdir:r,refs:[n]})}static async deleteRefs({fs:t,gitdir:r,refs:n}){await Promise.all(n.map(o=>t.rm($(r,o))));let i=await yi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"})),a=nu.from(i),s=a.refs.size;for(let o of n)a.refs.has(o)&&a.delete(o);a.refs.sizet.write(`${r}/packed-refs`,i,{encoding:"utf8"})))}static async resolve({fs:t,gitdir:r,ref:n,depth:i=void 0}){if(i!==void 0&&(i--,i===-1))return n;if(n.startsWith("ref: "))return n=n.slice(5),e.resolve({fs:t,gitdir:r,ref:n,depth:i});if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let a=await e.packedRefs({fs:t,gitdir:r}),s=Jc(n).filter(o=>!AO.includes(o));for(let o of s){let l=await yi(o,async()=>await t.read(`${r}/${o}`,{encoding:"utf8"})||a.get(o));if(l)return e.resolve({fs:t,gitdir:r,ref:l.trim(),depth:i})}throw new Le(n)}static async exists({fs:t,gitdir:r,ref:n}){try{return await e.expand({fs:t,gitdir:r,ref:n}),!0}catch(i){return!1}}static async expand({fs:t,gitdir:r,ref:n}){if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let i=await e.packedRefs({fs:t,gitdir:r}),a=Jc(n);for(let s of a)if(await yi(s,async()=>t.exists(`${r}/${s}`))||i.has(s))return s;throw new Le(n)}static async expandAgainstMap({ref:t,map:r}){let n=Jc(t);for(let i of n)if(await r.has(i))return i;throw new Le(t)}static resolveAgainstMap({ref:t,fullref:r=t,depth:n=void 0,map:i}){if(n!==void 0&&(n--,n===-1))return{fullref:r,oid:t};if(t.startsWith("ref: "))return t=t.slice(5),e.resolveAgainstMap({ref:t,fullref:r,depth:n,map:i});if(t.length===40&&/[0-9a-f]{40}/.test(t))return{fullref:r,oid:t};let a=Jc(t);for(let s of a){let o=i.get(s);if(o)return e.resolveAgainstMap({ref:o.trim(),fullref:s,depth:n,map:i})}throw new Le(t)}static async packedRefs({fs:t,gitdir:r}){let n=await yi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"}));return nu.from(n).refs}static async listRefs({fs:t,gitdir:r,filepath:n}){let i=e.packedRefs({fs:t,gitdir:r}),a=null;try{a=await t.readdirDeep(`${r}/${n}`),a=a.map(s=>s.replace(`${r}/${n}/`,""))}catch(s){a=[]}for(let s of(await i).keys())s.startsWith(n)&&(s=s.replace(n+"/",""),a.includes(s)||a.push(s));return a.sort(dO),a}static async listBranches({fs:t,gitdir:r,remote:n}){return n?e.listRefs({fs:t,gitdir:r,filepath:`refs/remotes/${n}`}):e.listRefs({fs:t,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:t,gitdir:r}){return(await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"})).filter(i=>!i.endsWith("^{}"))}};function kO(e,t){return du(jw(e),jw(t))}function jw(e){return e.mode==="040000"?e.path+"/":e.path}function l2(e){switch(e){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new le(`Unexpected GitTree entry mode: ${e}`)}function TO(e){let t=[],r=0;for(;r`${t.mode} ${t.type} ${t.oid} ${t.path}`).join(` -`)}toObject(){let t=[...this._entries];return t.sort(kO),Buffer.concat(t.map(r=>{let n=Buffer.from(r.mode.replace(/^0/,"")),i=Buffer.from(" "),a=Buffer.from(r.path,"utf8"),s=Buffer.from([0]),o=Buffer.from(r.oid,"hex");return Buffer.concat([n,i,a,s,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let t of this._entries)yield t}},xi=class{static wrap({type:t,object:r}){return Buffer.concat([Buffer.from(`${t} ${r.byteLength.toString()}\0`),Buffer.from(r)])}static unwrap(t){let r=t.indexOf(32),n=t.indexOf(0),i=t.slice(0,r).toString("utf8"),a=t.slice(r+1,n).toString("utf8"),s=t.length-(n+1);if(parseInt(a)!==s)throw new le(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:i,object:Buffer.from(t.slice(n+1))}}};async function RO({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=await e.read(`${t}/${n}`);return i?{object:i,format:"deflated",source:n}:null}function MO(e,t){let r=new Fr(e),n=Hw(r);if(n!==t.byteLength)throw new le(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${t.length} bytes`);let i=Hw(r),a,s=Gw(r,t);if(s.byteLength===i)a=s;else{a=Buffer.alloc(i);let o=new Fr(a);for(o.copy(s);!r.eof();)o.copy(Gw(r,t));let l=o.tell();if(i!==l)throw new le(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${l} bytes`)}return a}function Hw(e){let t=0,r=0,n=null;do n=e.readUInt8(),t|=(n&127)<>=1,i+=8;return n}function Gw(e,t){let r=e.readUInt8(),n=128,i=15,a=112;if(r&n){let s=Uw(e,r&i,4),o=Uw(e,(r&a)>>4,3);return o===0&&(o=65536),t.slice(s,s+o)}else return e.slice(r)}function OO(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function c2(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:OO(e)}var au=class{constructor(t){if(typeof Buffer=="undefined")throw new Error("Missing Buffer dependency");this.stream=c2(t),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(t){if(!this.eof())return this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t),this.buffer.slice(this.undoCursor,this.cursor)}async skip(t){this.eof()||(this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:t,value:r}=await this.stream.next();return t&&(this._ended=!0,!r)?Buffer.alloc(0):(r&&(r=Buffer.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(t){this.undoCursor=this.cursor,this.cursor+=t,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(t){if(this._ended)return;let r=[this.buffer];for(;this.cursor+t>IO(r);){let n=await this._next();if(this._ended)break;r.push(n)}this.buffer=Buffer.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function IO(e){return e.reduce((t,r)=>t+r.length,0)}async function FO(e,t){let r=new au(e),n=await r.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new le(`Invalid PACK header '${n}'`);let i=await r.read(4);if(i=i.readUInt32BE(0),i!==2)throw new le(`Invalid packfile version: ${i}`);let a=await r.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!r.eof()&&a--;){let s=r.tell(),{type:o,length:l,ofs:c,reference:u}=await $O(r),f=new fu.default.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new le(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==l)throw new le("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await t({data:f.result,type:o,num:a,offset:s,end:h,reference:u,ofs:c})}}}}async function $O(e){let t=await e.byte(),r=t>>4&7,n=t&15;if(t&128){let s=4;do t=await e.byte(),n|=(t&127)<i+1<<7|a,-1)}function BO(e,t){let r=t,n=4,i=null;do i=e.readUInt8(),r|=(i&127)<2048*1024*1024)throw new le("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");n.seek(n.tell()+4*255);let s=n.readUInt32BE(),o=[];for(let u=0;u{u===null&&(u=E);let _=Math.floor((u-E)*100/u);_!==f&&n&&await n({phase:"Receiving objects",loaded:u-E,total:u}),f=_,y=i[y],["commit","tree","blob","tag"].includes(y)?a[x]={type:y,offset:x}:y==="ofs-delta"?a[x]={type:y,offset:x}:y==="ref-delta"&&(a[x]={type:y,offset:x})});let d=Object.keys(a).map(Number);for(let[v,y]of d.entries()){let b=v+1===d.length?t.byteLength-20:d[v+1],x=a[y],E=t2.default.buf(t.slice(y,b))>>>0;x.end=b,x.crc=E}let h=new e({pack:Promise.resolve(t),packfileSha:s,crcs:l,hashes:o,offsets:c,getExternalRefDelta:r});f=null;let p=0,m=[0,0,0,0,0,0,0,0,0,0,0,0];for(let v in a){v=Number(v);let y=Math.floor(p*100/u);y!==f&&n&&await n({phase:"Resolving deltas",loaded:p,total:u}),p++,f=y;let b=a[v];if(!b.oid)try{h.readDepth=0,h.externalReadDepth=0;let{type:x,object:E}=await h.readSlice({start:v});m[h.readDepth]+=1;let _=await Vn(xi.wrap({type:x,object:E}));b.oid=_,o.push(_),c.set(_,v),l[_]=b.crc}catch(x){continue}}return o.sort(),h}async toBuffer(){let t=[],r=(c,u)=>{t.push(Buffer.from(c,u))};r("ff744f63","hex"),r("00000002","hex");let n=new Fr(Buffer.alloc(256*4));for(let c=0;c<256;c++){let u=0;for(let f of this.hashes)parseInt(f.slice(0,2),16)<=c&&u++;n.writeUInt32BE(u)}t.push(n.buffer);for(let c of this.hashes)r(c,"hex");let i=new Fr(Buffer.alloc(this.hashes.length*4));for(let c of this.hashes)i.writeUInt32BE(this.crcs[c]);t.push(i.buffer);let a=new Fr(Buffer.alloc(this.hashes.length*4));for(let c of this.hashes)a.writeUInt32BE(this.offsets.get(c));t.push(a.buffer),r(this.packfileSha,"hex");let s=Buffer.concat(t),o=await Vn(s),l=Buffer.alloc(20);return l.write(o,"hex"),Buffer.concat([s,l])}async load({pack:t}){this.pack=t}async unload(){this.pack=null}async read({oid:t}){if(!this.offsets.get(t)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(t);throw new le(`Could not read object ${t} from packfile`)}let r=this.offsets.get(t);return this.readSlice({start:r})}async readSlice({start:t}){if(this.offsetCache[t])return Object.assign({},this.offsetCache[t]);this.readDepth++;let r={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new le("Tried to read from a GitPackIndex with no packfile loaded into memory");let n=(await this.pack).slice(t),i=new Fr(n),a=i.readUInt8(),s=a&112,o=r[s];if(o===void 0)throw new le("Unrecognized type: 0b"+s.toString(2));let l=a&15,c=l;a&128&&(c=BO(i,l));let f=null,d=null;if(o==="ofs_delta"){let p=NO(i),m=t-p;({object:f,type:o}=await this.readSlice({start:m}))}if(o==="ref_delta"){let p=i.slice(20).toString("hex");({object:f,type:o}=await this.read({oid:p}))}let h=n.slice(i.tell());if(d=Buffer.from(await u2(h)),d.byteLength!==c)throw new le(`Packfile told us object would have length ${c} but it had length ${d.byteLength}`);return f&&(d=Buffer.from(MO(d,f))),this.readDepth>3&&(this.offsetCache[t]={type:o,object:d}),{type:o,format:"content",object:d}}},Qc=Symbol("PackfileCache");async function jO({fs:e,filename:t,getExternalRefDelta:r,emitter:n,emitterPrefix:i}){let a=await e.read(t);return nl.fromIdx({idx:a,getExternalRefDelta:r})}function Ap({fs:e,cache:t,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}){t[Qc]||(t[Qc]=new Map);let s=t[Qc].get(r);return s||(s=jO({fs:e,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}),t[Qc].set(r,s)),s}async function HO({fs:e,cache:t,gitdir:r,oid:n,format:i="content",getExternalRefDelta:a}){let s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let l=`${r}/objects/pack/${o}`,c=await Ap({fs:e,cache:t,filename:l,getExternalRefDelta:a});if(c.error)throw new le(c.error);if(c.offsets.has(n)){if(!c.pack){let f=l.replace(/idx$/,"pack");c.pack=e.read(f)}let u=await c.read({oid:n,getExternalRefDelta:a});return u.format="content",u.source=`objects/pack/${o.replace(/idx$/,"pack")}`,u}}return null}async function Ye({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=u=>Ye({fs:e,cache:t,gitdir:r,oid:u}),s;if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904"&&(s={format:"wrapped",object:Buffer.from("tree 0\0")}),s||(s=await RO({fs:e,gitdir:r,oid:n})),!s){if(s=await HO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a}),!s)throw new Le(n);return s}if(i==="deflated"||(s.format==="deflated"&&(s.object=Buffer.from(await u2(s.object)),s.format="wrapped"),i==="wrapped"))return s;let o=await Vn(s.object);if(o!==n)throw new le(`SHA check failed! Expected ${n}, computed ${o}`);let{object:l,type:c}=xi.unwrap(s.object);if(s.type=c,s.object=l,s.format="content",i==="content")return s;throw new le(`invalid requested format "${i}"`)}var en=class e extends Se{constructor(t,r,n=!0){super(`Failed to create ${t} at ${r} because it already exists.${n?` (Hint: use 'force: true' parameter to overwrite existing ${t}.)`:""}`),this.code=this.name=e.code,this.data={noun:t,where:r,canForce:n}}};en.code="AlreadyExistsError";var il=class e extends Se{constructor(t,r,n){super(`Found multiple ${t} matching "${r}" (${n.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=e.code,this.data={nouns:t,short:r,matches:n}}};il.code="AmbiguousError";var al=class e extends Se{constructor(t){super(`Your local changes to the following files would be overwritten by checkout: ${t.join(", ")}`),this.code=this.name=e.code,this.data={filepaths:t}}};al.code="CheckoutConflictError";var sl=class e extends Se{constructor(t,r){super(`Failed to checkout "${t}" because commit ${r} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=e.code,this.data={ref:t,oid:r}}};sl.code="CommitNotFetchedError";var ol=class e extends Se{constructor(){super("Empty response from git server."),this.code=this.name=e.code,this.data={}}};ol.code="EmptyServerResponseError";var ll=class e extends Se{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=e.code,this.data={}}};ll.code="FastForwardError";var cl=class e extends Se{constructor(t,r){super(`One or more branches were not updated: ${t}`),this.code=this.name=e.code,this.data={prettyDetails:t,result:r}}};cl.code="GitPushError";var ms=class e extends Se{constructor(t,r,n){super(`HTTP Error: ${t} ${r}`),this.code=this.name=e.code,this.data={statusCode:t,statusMessage:r,response:n}}};ms.code="HttpError";var Si=class e extends Se{constructor(t){let r="invalid filepath";t==="leading-slash"||t==="trailing-slash"?r='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.':t==="directory"&&(r='"filepath" should not be a directory.'),super(r),this.code=this.name=e.code,this.data={reason:t}}};Si.code="InvalidFilepathError";var Wn=class e extends Se{constructor(t,r){super(`"${t}" would be an invalid git reference. (Hint: a valid alternative would be "${r}".)`),this.code=this.name=e.code,this.data={ref:t,suggestion:r}}};Wn.code="InvalidRefNameError";var ul=class e extends Se{constructor(t){super(`Maximum search depth of ${t} exceeded.`),this.code=this.name=e.code,this.data={depth:t}}};ul.code="MaxDepthError";var gs=class e extends Se{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=e.code,this.data={}}};gs.code="MergeNotSupportedError";var vs=class e extends Se{constructor(t,r,n,i){super(`Automatic merge failed with one or more merge conflicts in the following files: ${t.toString()}. Fix conflicts then commit the result.`),this.code=this.name=e.code,this.data={filepaths:t,bothModified:r,deleteByUs:n,deleteByTheirs:i}}};vs.code="MergeConflictError";var Vt=class e extends Se{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=e.code,this.data={role:t}}};Vt.code="MissingNameError";var er=class e extends Se{constructor(t){super(`The function requires a "${t}" parameter but none was provided.`),this.code=this.name=e.code,this.data={parameter:t}}};er.code="MissingParameterError";var fl=class e extends Se{constructor(t){super('There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more'),this.code=this.name=e.code,this.data={errors:t},this.errors=t}};fl.code="MultipleGitError";var ua=class e extends Se{constructor(t,r){super(`Expected "${t}" but received "${r}".`),this.code=this.name=e.code,this.data={expected:t,actual:r}}};ua.code="ParseError";var ys=class e extends Se{constructor(t){let r="";t==="not-fast-forward"?r=" because it was not a simple fast-forward":t==="tag-exists"&&(r=" because tag already exists"),super(`Push rejected${r}. Use "force: true" to override.`),this.code=this.name=e.code,this.data={reason:t}}};ys.code="PushRejectedError";var wi=class e extends Se{constructor(t,r){super(`Remote does not support the "${t}" so the "${r}" parameter cannot be used.`),this.code=this.name=e.code,this.data={capability:t,parameter:r}}};wi.code="RemoteCapabilityError";var dl=class e extends Se{constructor(t,r){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${t}`),this.code=this.name=e.code,this.data={preview:t,response:r}}};dl.code="SmartHttpError";var hl=class e extends Se{constructor(t,r,n){super(`Git remote "${t}" uses an unrecognized transport protocol: "${r}"`),this.code=this.name=e.code,this.data={url:t,transport:r,suggestion:n}}};hl.code="UnknownTransportError";var pl=class e extends Se{constructor(t){super(`Cannot parse remote URL: "${t}"`),this.code=this.name=e.code,this.data={url:t}}};pl.code="UrlParseError";var ws=class e extends Se{constructor(){super("The operation was canceled."),this.code=this.name=e.code,this.data={}}};ws.code="UserCanceledError";var ml=class e extends Se{constructor(t){super(`Could not merge index: Entry for '${t}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=e.code,this.data={filepath:t}}};ml.code="IndexResetError";var gl=class e extends Se{constructor(t){super(`"${t}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=e.code,this.data={ref:t}}};gl.code="NoCommitError";var yl=Object.freeze({__proto__:null,AlreadyExistsError:en,AmbiguousError:il,CheckoutConflictError:al,CommitNotFetchedError:sl,EmptyServerResponseError:ol,FastForwardError:ll,GitPushError:cl,HttpError:ms,InternalError:le,InvalidFilepathError:Si,InvalidOidError:_i,InvalidRefNameError:Wn,MaxDepthError:ul,MergeNotSupportedError:gs,MergeConflictError:vs,MissingNameError:Vt,MissingParameterError:er,MultipleGitError:fl,NoRefspecError:rl,NotFoundError:Le,ObjectTypeError:zt,ParseError:ua,PushRejectedError:ys,RemoteCapabilityError:wi,SmartHttpError:dl,UnknownTransportError:hl,UnsafeFilepathError:ds,UrlParseError:pl,UserCanceledError:ws,UnmergedPathsError:tl,IndexResetError:ml,NoCommitError:gl});function vp({name:e,email:t,timestamp:r,timezoneOffset:n}){return n=UO(n),`${e} <${t}> ${r} ${n}`}function UO(e){let t=GO(zO(e));e=Math.abs(e);let r=Math.floor(e/60);e-=r*60;let n=String(r),i=String(e);return n.length<2&&(n="0"+n),i.length<2&&(i="0"+i),(t===-1?"-":"+")+n+i}function GO(e){return Math.sign(e)||(Object.is(e,-0)?-1:1)}function zO(e){return e===0?e:-e}function zn(e){return e=e.replace(/\r/g,""),e=e.replace(/^\n+/,""),e=e.replace(/\n+$/,"")+` -`,e}function su(e){let[,t,r,n,i]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:t,email:r,timestamp:Number(n),timezoneOffset:VO(i)}}function VO(e){let[,t,r,n]=e.match(/(\+|-)(\d\d)(\d\d)/);return n=(t==="+"?1:-1)*(Number(r)*60+Number(n)),WO(n)}function WO(e){return e===0?e:-e}var pr=class e{constructor(t){if(typeof t=="string")this._tag=t;else if(Buffer.isBuffer(t))this._tag=t.toString("utf8");else if(typeof t=="object")this._tag=e.render(t);else throw new le("invalid type passed to GitAnnotatedTag constructor")}static from(t){return new e(t)}static render(t){return`object ${t.object} -type ${t.type} -tag ${t.tag} -tagger ${vp(t.tagger)} +`}},Rf=class t{constructor({remotePath:e,localPath:r,force:n,matchPrefix:i}){Object.assign(this,{remotePath:e,localPath:r,force:n,matchPrefix:i})}static from(e){let[r,n,i,a,s]=e.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",l=i==="*";if(l!==(s==="*"))throw new pe("Invalid refspec");return new t({remotePath:n,localPath:a,force:o,matchPrefix:l})}translate(e){if(this.matchPrefix){if(e.startsWith(this.remotePath))return this.localPath+e.replace(this.remotePath,"")}else if(e===this.remotePath)return this.localPath;return null}reverseTranslate(e){if(this.matchPrefix){if(e.startsWith(this.localPath))return this.remotePath+e.replace(this.localPath,"")}else if(e===this.localPath)return this.remotePath;return null}},Qm=class t{constructor(e=[]){this.rules=e}static from(e){let r=[];for(let n of e)r.push(Rf.from(n));return new t(r)}add(e){let r=Rf.from(e);this.rules.push(r)}translate(e){let r=[];for(let n of this.rules)for(let i of e){let a=n.translate(i);a&&r.push([i,a])}return r}translateOne(e){let r=null;for(let n of this.rules){let i=n.translate(e);i&&(r=i)}return r}localNamespaces(){return this.rules.filter(e=>e.matchPrefix).map(e=>e.localPath.replace(/\/$/,""))}};function n4(t,e){let r=t.replace(/\^\{\}$/,""),n=e.replace(/\^\{\}$/,""),i=-(rn);return i===0?t.endsWith("^{}")?1:-1:i}var i4=t=>{if(typeof t=="number")return t;t=t.toLowerCase();let e=parseInt(t);return t.endsWith("k")&&(e*=1024),t.endsWith("m")&&(e*=1024*1024),t.endsWith("g")&&(e*=1024*1024*1024),e},Gl=t=>{if(typeof t=="boolean")return t;if(t=t.trim().toLowerCase(),t==="true"||t==="yes"||t==="on")return!0;if(t==="false"||t==="no"||t==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${t}`)},ux={core:{filemode:Gl,bare:Gl,logallrefupdates:Gl,symlinks:Gl,ignorecase:Gl,bigFileThreshold:i4}},a4=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,s4=/^[A-Za-z0-9-.]+$/,o4=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,l4=/^[A-Za-z][A-Za-z-]*$/,c4=/^(.*?)( *[#;].*)$/,u4=t=>{let e=a4.exec(t);if(e!=null){let[r,n]=e.slice(1);return[r,n]}return null},f4=t=>{let e=o4.exec(t);if(e!=null){let[r,n="true"]=e.slice(1),i=d4(n),a=h4(i);return[r,a]}return null},d4=t=>{let e=c4.exec(t);if(e==null)return t;let[r,n]=e.slice(1);return fx(r)&&fx(n)?`${r}${n}`:r},fx=t=>(t.match(/(?:^|[^\\])"/g)||[]).length%2!==0,h4=t=>t.split("").reduce((e,r,n,i)=>{let a=r==='"'&&i[n-1]!=="\\",s=r==="\\"&&i[n+1]==='"';return a||s?e:e+r},""),dx=t=>t!=null?t.toLowerCase():null,eg=(t,e,r)=>[dx(t),e,dx(r)].filter(n=>n!=null).join("."),hx=t=>{let e=t.split("."),r=e.shift(),n=e.pop(),i=e.length?e.join("."):void 0;return{section:r,subsection:i,name:n,path:eg(r,i,n),sectionPath:eg(r,i,null),isSection:!!r}},p4=(t,e)=>t.reduce((r,n,i)=>e(n)?i:r,-1),tg=class t{constructor(e){let r=null,n=null;this.parsedConfig=e?e.split(` +`).map(i=>{let a=null,s=null,o=i.trim(),l=u4(o),c=l!=null;if(c)[r,n]=l;else{let f=f4(o);f!=null&&([a,s]=f)}let u=eg(r,n,a);return{line:i,isSection:c,section:r,subsection:n,name:a,value:s,path:u}}):[]}static from(e){return new t(e)}async get(e,r=!1){let n=hx(e).path,i=this.parsedConfig.filter(a=>a.path===n).map(({section:a,name:s,value:o})=>{let l=ux[a]&&ux[a][s];return l?l(o):o});return r?i:i.pop()}async getall(e){return this.get(e,!0)}async getSubsections(e){return this.parsedConfig.filter(r=>r.isSection&&r.section===e).map(r=>r.subsection)}async deleteSection(e,r){this.parsedConfig=this.parsedConfig.filter(n=>!(n.section===e&&n.subsection===r))}async append(e,r){return this.set(e,r,!0)}async set(e,r,n=!1){let{section:i,subsection:a,name:s,path:o,sectionPath:l,isSection:c}=hx(e),u=p4(this.parsedConfig,f=>f.path===o);if(r==null)u!==-1&&this.parsedConfig.splice(u,1);else if(u!==-1){let f=this.parsedConfig[u],d=Object.assign({},f,{name:s,value:r,modified:!0});n?this.parsedConfig.splice(u+1,0,d):this.parsedConfig[u]=d}else{let f=this.parsedConfig.findIndex(h=>h.path===l),d={section:i,subsection:a,name:s,value:r,modified:!0,path:o};if(s4.test(i)&&l4.test(s))if(f>=0)this.parsedConfig.splice(f+1,0,d);else{let h={isSection:c,section:i,subsection:a,modified:!0,path:l};this.parsedConfig.push(h,d)}}}toString(){return this.parsedConfig.map(({line:e,section:r,subsection:n,name:i,value:a,modified:s=!1})=>s?i!=null&&a!=null?typeof a=="string"&&/[#;]/.test(a)?` ${i} = "${a}"`:` ${i} = ${a}`:n!=null?`[${r} "${n}"]`:`[${r}]`:e).join(` +`)}},nt=class{static async get({fs:e,gitdir:r}){let n=await e.read(`${r}/config`,{encoding:"utf8"});return tg.from(n)}static async save({fs:e,gitdir:r,config:n}){await e.write(`${r}/config`,n.toString(),{encoding:"utf8"})}},Af=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],m4=["config","description","index","shallow","commondir"],Um;async function Zi(t,e){return Um===void 0&&(Um=new zl),Um.acquire(t,e)}var V=class t{static async updateRemoteRefs({fs:e,gitdir:r,remote:n,refs:i,symrefs:a,tags:s,refspecs:o=void 0,prune:l=!1,pruneTags:c=!1}){for(let v of i.values())if(!v.match(/[0-9a-f]{40}/))throw new Qi(v);let u=await nt.get({fs:e,gitdir:r});if(!o){if(o=await u.getall(`remote.${n}.fetch`),o.length===0)throw new Wl(n);o.unshift(`+HEAD:refs/remotes/${n}/HEAD`)}let f=Qm.from(o),d=new Map;if(c){let v=await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"});await t.deleteRefs({fs:e,gitdir:r,refs:v.map(y=>`refs/tags/${y}`)})}if(s){for(let v of i.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await t.exists({fs:e,gitdir:r,ref:v})){let y=i.get(v);d.set(v,y)}}let h=f.translate([...i.keys()]);for(let[v,y]of h){let b=i.get(v);d.set(y,b)}let p=f.translate([...a.keys()]);for(let[v,y]of p){let b=a.get(v),E=f.translateOne(b);E&&d.set(y,`ref: ${E}`)}let g=[];if(l){for(let v of f.localNamespaces()){let y=(await t.listRefs({fs:e,gitdir:r,filepath:v})).map(b=>`${v}/${b}`);for(let b of y)d.has(b)||g.push(b)}g.length>0&&await t.deleteRefs({fs:e,gitdir:r,refs:g})}for(let[v,y]of d)await Zi(v,async()=>e.write($.join(r,v),`${y.trim()} +`,"utf8"));return{pruned:g}}static async writeRef({fs:e,gitdir:r,ref:n,value:i}){if(!i.match(/[0-9a-f]{40}/))throw new Qi(i);await Zi(n,async()=>e.write($.join(r,n),`${i.trim()} +`,"utf8"))}static async writeSymbolicRef({fs:e,gitdir:r,ref:n,value:i}){await Zi(n,async()=>e.write($.join(r,n),`ref: ${i.trim()} +`,"utf8"))}static async deleteRef({fs:e,gitdir:r,ref:n}){return t.deleteRefs({fs:e,gitdir:r,refs:[n]})}static async deleteRefs({fs:e,gitdir:r,refs:n}){await Promise.all(n.map(o=>e.rm($.join(r,o))));let i=await Zi("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"})),a=Pf.from(i),s=a.refs.size;for(let o of n)a.refs.has(o)&&a.delete(o);a.refs.sizee.write(`${r}/packed-refs`,i,{encoding:"utf8"})))}static async resolve({fs:e,gitdir:r,ref:n,depth:i=void 0}){if(i!==void 0&&(i--,i===-1))return n;if(n.startsWith("ref: "))return n=n.slice(5),t.resolve({fs:e,gitdir:r,ref:n,depth:i});if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let a=await t.packedRefs({fs:e,gitdir:r}),s=Af(n).filter(o=>!m4.includes(o));for(let o of s){let l=await Zi(o,async()=>await e.read(`${r}/${o}`,{encoding:"utf8"})||a.get(o));if(l)return t.resolve({fs:e,gitdir:r,ref:l.trim(),depth:i})}throw new je(n)}static async exists({fs:e,gitdir:r,ref:n}){try{return await t.expand({fs:e,gitdir:r,ref:n}),!0}catch(i){return!1}}static async expand({fs:e,gitdir:r,ref:n}){if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let i=await t.packedRefs({fs:e,gitdir:r}),a=Af(n);for(let s of a)if(await Zi(s,async()=>e.exists(`${r}/${s}`))||i.has(s))return s;throw new je(n)}static async expandAgainstMap({ref:e,map:r}){let n=Af(e);for(let i of n)if(await r.has(i))return i;throw new je(e)}static resolveAgainstMap({ref:e,fullref:r=e,depth:n=void 0,map:i}){if(n!==void 0&&(n--,n===-1))return{fullref:r,oid:e};if(e.startsWith("ref: "))return e=e.slice(5),t.resolveAgainstMap({ref:e,fullref:r,depth:n,map:i});if(e.length===40&&/[0-9a-f]{40}/.test(e))return{fullref:r,oid:e};let a=Af(e);for(let s of a){let o=i.get(s);if(o)return t.resolveAgainstMap({ref:o.trim(),fullref:s,depth:n,map:i})}throw new je(e)}static async packedRefs({fs:e,gitdir:r}){let n=await Zi("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"}));return Pf.from(n).refs}static async listRefs({fs:e,gitdir:r,filepath:n}){let i=t.packedRefs({fs:e,gitdir:r}),a=null;try{a=await e.readdirDeep(`${r}/${n}`),a=a.map(s=>s.replace(`${r}/${n}/`,""))}catch(s){a=[]}for(let s of(await i).keys())s.startsWith(n)&&(s=s.replace(n+"/",""),a.includes(s)||a.push(s));return a.sort(n4),a}static async listBranches({fs:e,gitdir:r,remote:n}){return n?t.listRefs({fs:e,gitdir:r,filepath:`refs/remotes/${n}`}):t.listRefs({fs:e,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:e,gitdir:r}){return(await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"})).filter(i=>!i.endsWith("^{}"))}};function g4(t,e){return Lf(px(t),px(e))}function px(t){return t.mode==="040000"?t.path+"/":t.path}function Dx(t){switch(t){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new pe(`Unexpected GitTree entry mode: ${t}`)}function v4(t){let e=[],r=0;for(;r`${e.mode} ${e.type} ${e.oid} ${e.path}`).join(` +`)}toObject(){let e=[...this._entries];return e.sort(g4),Buffer.concat(e.map(r=>{let n=Buffer.from(r.mode.replace(/^0/,"")),i=Buffer.from(" "),a=Buffer.from(r.path,"utf8"),s=Buffer.from([0]),o=Buffer.from(r.oid,"hex");return Buffer.concat([n,i,a,s,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let e of this._entries)yield e}},ea=class{static wrap({type:e,object:r}){return Buffer.concat([Buffer.from(`${e} ${r.byteLength.toString()}\0`),Buffer.from(r)])}static unwrap(e){let r=e.indexOf(32),n=e.indexOf(0),i=e.slice(0,r).toString("utf8"),a=e.slice(r+1,n).toString("utf8"),s=e.length-(n+1);if(parseInt(a)!==s)throw new pe(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:i,object:Buffer.from(e.slice(n+1))}}};async function Lx({fs:t,gitdir:e,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=await t.read(`${e}/${n}`);return i?{object:i,format:"deflated",source:n}:null}function b4(t,e){let r=new Kr(t),n=mx(r);if(n!==e.byteLength)throw new pe(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${e.length} bytes`);let i=mx(r),a,s=vx(r,e);if(s.byteLength===i)a=s;else{a=Buffer.alloc(i);let o=new Kr(a);for(o.copy(s);!r.eof();)o.copy(vx(r,e));let l=o.tell();if(i!==l)throw new pe(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${l} bytes`)}return a}function mx(t){let e=0,r=0,n=null;do n=t.readUInt8(),e|=(n&127)<>=1,i+=8;return n}function vx(t,e){let r=t.readUInt8(),n=128,i=15,a=112;if(r&n){let s=gx(t,r&i,4),o=gx(t,(r&a)>>4,3);return o===0&&(o=65536),e.slice(s,s+o)}else return t.slice(r)}function _4(t){let e=[t];return{next(){return Promise.resolve({done:e.length===0,value:e.pop()})},return(){return e=[],{}},[Symbol.asyncIterator](){return this}}}function jx(t){return t[Symbol.asyncIterator]?t[Symbol.asyncIterator]():t[Symbol.iterator]?t[Symbol.iterator]():t.next?t:_4(t)}var Mf=class{constructor(e){if(typeof Buffer=="undefined")throw new Error("Missing Buffer dependency");this.stream=jx(e),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(e){if(!this.eof())return this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e),this.buffer.slice(this.undoCursor,this.cursor)}async skip(e){this.eof()||(this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:e,value:r}=await this.stream.next();return e&&(this._ended=!0,!r)?Buffer.alloc(0):(r&&(r=Buffer.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(e){this.undoCursor=this.cursor,this.cursor+=e,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(e){if(this._ended)return;let r=[this.buffer];for(;this.cursor+e>x4(r);){let n=await this._next();if(this._ended)break;r.push(n)}this.buffer=Buffer.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function x4(t){return t.reduce((e,r)=>e+r.length,0)}async function S4(t,e){let r=new Mf(t),n=await r.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new pe(`Invalid PACK header '${n}'`);let i=await r.read(4);if(i=i.readUInt32BE(0),i!==2)throw new pe(`Invalid packfile version: ${i}`);let a=await r.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!r.eof()&&a--;){let s=r.tell(),{type:o,length:l,ofs:c,reference:u}=await E4(r),f=new cg.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new pe(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==l)throw new pe("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await e({data:f.result,type:o,num:a,offset:s,end:h,reference:u,ofs:c})}}}}async function E4(t){let e=await t.byte(),r=e>>4&7,n=e&15;if(e&128){let s=4;do e=await t.byte(),n|=(e&127)<i+1<<7|a,-1)}function C4(t,e){let r=e,n=4,i=null;do i=t.readUInt8(),r|=(i&127)<2048*1024*1024)throw new pe("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");n.seek(n.tell()+4*255);let s=n.readUInt32BE(),o=[];for(let u=0;u{u===null&&(u=S);let A=Math.floor((u-S)*100/u);A!==f&&n&&await n({phase:"Receiving objects",loaded:u-S,total:u}),f=A,y=i[y],["commit","tree","blob","tag"].includes(y)?a[E]={type:y,offset:E}:y==="ofs-delta"?a[E]={type:y,offset:E}:y==="ref-delta"&&(a[E]={type:y,offset:E})});let d=Object.keys(a).map(Number);for(let[v,y]of d.entries()){let b=v+1===d.length?e.byteLength-20:d[v+1],E=a[y],S=V8.buf(e.slice(y,b))>>>0;E.end=b,E.crc=S}let h=new t({pack:Promise.resolve(e),packfileSha:s,crcs:l,hashes:o,offsets:c,getExternalRefDelta:r});f=null;let p=0,g=[0,0,0,0,0,0,0,0,0,0,0,0];for(let v in a){v=Number(v);let y=Math.floor(p*100/u);y!==f&&n&&await n({phase:"Resolving deltas",loaded:p,total:u}),p++,f=y;let b=a[v];if(!b.oid)try{h.readDepth=0,h.externalReadDepth=0;let{type:E,object:S}=await h.readSlice({start:v});g[h.readDepth]+=1;let A=await bi(ea.wrap({type:E,object:S}));b.oid=A,o.push(A),c.set(A,v),l[A]=b.crc}catch(E){continue}}return o.sort(),h}async toBuffer(){let e=[],r=(c,u)=>{e.push(Buffer.from(c,u))};r("ff744f63","hex"),r("00000002","hex");let n=new Kr(Buffer.alloc(256*4));for(let c=0;c<256;c++){let u=0;for(let f of this.hashes)parseInt(f.slice(0,2),16)<=c&&u++;n.writeUInt32BE(u)}e.push(n.buffer);for(let c of this.hashes)r(c,"hex");let i=new Kr(Buffer.alloc(this.hashes.length*4));for(let c of this.hashes)i.writeUInt32BE(this.crcs[c]);e.push(i.buffer);let a=new Kr(Buffer.alloc(this.hashes.length*4));for(let c of this.hashes)a.writeUInt32BE(this.offsets.get(c));e.push(a.buffer),r(this.packfileSha,"hex");let s=Buffer.concat(e),o=await bi(s),l=Buffer.alloc(20);return l.write(o,"hex"),Buffer.concat([s,l])}async load({pack:e}){this.pack=e}async unload(){this.pack=null}async read({oid:e}){if(!this.offsets.get(e)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(e);throw new pe(`Could not read object ${e} from packfile`)}let r=this.offsets.get(e);return this.readSlice({start:r})}async readSlice({start:e}){if(this.offsetCache[e])return Object.assign({},this.offsetCache[e]);this.readDepth++;let r={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new pe("Tried to read from a GitPackIndex with no packfile loaded into memory");let n=(await this.pack).slice(e),i=new Kr(n),a=i.readUInt8(),s=a&112,o=r[s];if(o===void 0)throw new pe("Unrecognized type: 0b"+s.toString(2));let l=a&15,c=l;a&128&&(c=C4(i,l));let f=null,d=null;if(o==="ofs_delta"){let p=T4(i),g=e-p;({object:f,type:o}=await this.readSlice({start:g}))}if(o==="ref_delta"){let p=i.slice(20).toString("hex");({object:f,type:o}=await this.read({oid:p}))}let h=n.slice(i.tell());if(d=Buffer.from(await Nx(h)),d.byteLength!==c)throw new pe(`Packfile told us object would have length ${c} but it had length ${d.byteLength}`);return f&&(d=Buffer.from(b4(d,f))),this.readDepth>3&&(this.offsetCache[e]={type:o,object:d}),{type:o,format:"content",object:d}}},kf=Symbol("PackfileCache");async function P4({fs:t,filename:e,getExternalRefDelta:r,emitter:n,emitterPrefix:i}){let a=await t.read(e);return ql.fromIdx({idx:a,getExternalRefDelta:r})}function ug({fs:t,cache:e,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}){e[kf]||(e[kf]=new Map);let s=e[kf].get(r);return s||(s=P4({fs:t,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}),e[kf].set(r,s)),s}async function R4({fs:t,cache:e,gitdir:r,oid:n,format:i="content",getExternalRefDelta:a}){let s=await t.readdir($.join(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let l=`${r}/objects/pack/${o}`,c=await ug({fs:t,cache:e,filename:l,getExternalRefDelta:a});if(c.error)throw new pe(c.error);if(c.offsets.has(n)){if(!c.pack){let f=l.replace(/idx$/,"pack");c.pack=t.read(f)}let u=await c.read({oid:n,getExternalRefDelta:a});return u.format="content",u.source=`objects/pack/${o.replace(/idx$/,"pack")}`,u}}return null}async function Ge({fs:t,cache:e,gitdir:r,oid:n,format:i="content"}){let a=u=>Ge({fs:t,cache:e,gitdir:r,oid:u}),s;if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904"&&(s={format:"wrapped",object:Buffer.from("tree 0\0")}),s||(s=await Lx({fs:t,gitdir:r,oid:n})),!s){if(s=await R4({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:a}),!s)throw new je(n);return s}if(i==="deflated"||(s.format==="deflated"&&(s.object=Buffer.from(await Nx(s.object)),s.format="wrapped"),i==="wrapped"))return s;let o=await bi(s.object);if(o!==n)throw new pe(`SHA check failed! Expected ${n}, computed ${o}`);let{object:l,type:c}=ea.unwrap(s.object);if(s.type=c,s.object=l,s.format="content",i==="content")return s;throw new pe(`invalid requested format "${i}"`)}var pn=class t extends Ae{constructor(e,r,n=!0){super(`Failed to create ${e} at ${r} because it already exists.${n?` (Hint: use 'force: true' parameter to overwrite existing ${e}.)`:""}`),this.code=this.name=t.code,this.data={noun:e,where:r,canForce:n}}};pn.code="AlreadyExistsError";var Yl=class t extends Ae{constructor(e,r,n){super(`Found multiple ${e} matching "${r}" (${n.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=t.code,this.data={nouns:e,short:r,matches:n}}};Yl.code="AmbiguousError";var Xl=class t extends Ae{constructor(e){super(`Your local changes to the following files would be overwritten by checkout: ${e.join(", ")}`),this.code=this.name=t.code,this.data={filepaths:e}}};Xl.code="CheckoutConflictError";var Kl=class t extends Ae{constructor(e,r){super(`Failed to checkout "${e}" because commit ${r} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=t.code,this.data={ref:e,oid:r}}};Kl.code="CommitNotFetchedError";var Zl=class t extends Ae{constructor(){super("Empty response from git server."),this.code=this.name=t.code,this.data={}}};Zl.code="EmptyServerResponseError";var Jl=class t extends Ae{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=t.code,this.data={}}};Jl.code="FastForwardError";var Ql=class t extends Ae{constructor(e,r){super(`One or more branches were not updated: ${e}`),this.code=this.name=t.code,this.data={prettyDetails:e,result:r}}};Ql.code="GitPushError";var so=class t extends Ae{constructor(e,r,n){super(`HTTP Error: ${e} ${r}`),this.code=this.name=t.code,this.data={statusCode:e,statusMessage:r,response:n}}};so.code="HttpError";var ta=class t extends Ae{constructor(e){let r="invalid filepath";e==="leading-slash"||e==="trailing-slash"?r='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.':e==="directory"&&(r='"filepath" should not be a directory.'),super(r),this.code=this.name=t.code,this.data={reason:e}}};ta.code="InvalidFilepathError";var mn=class t extends Ae{constructor(e,r){super(`"${e}" would be an invalid git reference. (Hint: a valid alternative would be "${r}".)`),this.code=this.name=t.code,this.data={ref:e,suggestion:r}}};mn.code="InvalidRefNameError";var ec=class t extends Ae{constructor(e){super(`Maximum search depth of ${e} exceeded.`),this.code=this.name=t.code,this.data={depth:e}}};ec.code="MaxDepthError";var oo=class t extends Ae{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=t.code,this.data={}}};oo.code="MergeNotSupportedError";var lo=class t extends Ae{constructor(e,r,n,i){super(`Automatic merge failed with one or more merge conflicts in the following files: ${e.toString()}. Fix conflicts then commit the result.`),this.code=this.name=t.code,this.data={filepaths:e,bothModified:r,deleteByUs:n,deleteByTheirs:i}}};lo.code="MergeConflictError";var zt=class t extends Ae{constructor(e){super(`No name was provided for ${e} in the argument or in the .git/config file.`),this.code=this.name=t.code,this.data={role:e}}};zt.code="MissingNameError";var dr=class t extends Ae{constructor(e){super(`The function requires a "${e}" parameter but none was provided.`),this.code=this.name=t.code,this.data={parameter:e}}};dr.code="MissingParameterError";var tc=class t extends Ae{constructor(e){super('There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more'),this.code=this.name=t.code,this.data={errors:e},this.errors=e}};tc.code="MultipleGitError";var Va=class t extends Ae{constructor(e,r){super(`Expected "${e}" but received "${r}".`),this.code=this.name=t.code,this.data={expected:e,actual:r}}};Va.code="ParseError";var co=class t extends Ae{constructor(e){let r="";e==="not-fast-forward"?r=" because it was not a simple fast-forward":e==="tag-exists"&&(r=" because tag already exists"),super(`Push rejected${r}. Use "force: true" to override.`),this.code=this.name=t.code,this.data={reason:e}}};co.code="PushRejectedError";var Ji=class t extends Ae{constructor(e,r){super(`Remote does not support the "${e}" so the "${r}" parameter cannot be used.`),this.code=this.name=t.code,this.data={capability:e,parameter:r}}};Ji.code="RemoteCapabilityError";var rc=class t extends Ae{constructor(e,r){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${e}`),this.code=this.name=t.code,this.data={preview:e,response:r}}};rc.code="SmartHttpError";var nc=class t extends Ae{constructor(e,r,n){super(`Git remote "${e}" uses an unrecognized transport protocol: "${r}"`),this.code=this.name=t.code,this.data={url:e,transport:r,suggestion:n}}};nc.code="UnknownTransportError";var ic=class t extends Ae{constructor(e){super(`Cannot parse remote URL: "${e}"`),this.code=this.name=t.code,this.data={url:e}}};ic.code="UrlParseError";var uo=class t extends Ae{constructor(){super("The operation was canceled."),this.code=this.name=t.code,this.data={}}};uo.code="UserCanceledError";var ac=class t extends Ae{constructor(e){super(`Could not merge index: Entry for '${e}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=t.code,this.data={filepath:e}}};ac.code="IndexResetError";var sc=class t extends Ae{constructor(e){super(`"${e}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=t.code,this.data={ref:e}}};sc.code="NoCommitError";var Bx=Object.freeze({__proto__:null,AlreadyExistsError:pn,AmbiguousError:Yl,CheckoutConflictError:Xl,CommitNotFetchedError:Kl,EmptyServerResponseError:Zl,FastForwardError:Jl,GitPushError:Ql,HttpError:so,InternalError:pe,InvalidFilepathError:ta,InvalidOidError:Qi,InvalidRefNameError:mn,MaxDepthError:ec,MergeNotSupportedError:oo,MergeConflictError:lo,MissingNameError:zt,MissingParameterError:dr,MultipleGitError:tc,NoRefspecError:Wl,NotFoundError:je,ObjectTypeError:tr,ParseError:Va,PushRejectedError:co,RemoteCapabilityError:Ji,SmartHttpError:rc,UnknownTransportError:nc,UnsafeFilepathError:no,UrlParseError:ic,UserCanceledError:uo,UnmergedPathsError:Vl,IndexResetError:ac,NoCommitError:sc});function rg({name:t,email:e,timestamp:r,timezoneOffset:n}){return n=M4(n),`${t} <${e}> ${r} ${n}`}function M4(t){let e=O4(I4(t));t=Math.abs(t);let r=Math.floor(t/60);t-=r*60;let n=String(r),i=String(t);return n.length<2&&(n="0"+n),i.length<2&&(i="0"+i),(e===-1?"-":"+")+n+i}function O4(t){return Math.sign(t)||(Object.is(t,-0)?-1:1)}function I4(t){return t===0?t:-t}function wi(t){return t=t.replace(/\r/g,""),t=t.replace(/^\n+/,""),t=t.replace(/\n+$/,"")+` +`,t}function Of(t){let[,e,r,n,i]=t.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:e,email:r,timestamp:Number(n),timezoneOffset:$4(i)}}function $4(t){let[,e,r,n]=t.match(/(\+|-)(\d\d)(\d\d)/);return n=(e==="+"?1:-1)*(Number(r)*60+Number(n)),F4(n)}function F4(t){return t===0?t:-t}var Rr=class t{constructor(e){if(typeof e=="string")this._tag=e;else if(Buffer.isBuffer(e))this._tag=e.toString("utf8");else if(typeof e=="object")this._tag=t.render(e);else throw new pe("invalid type passed to GitAnnotatedTag constructor")}static from(e){return new t(e)}static render(e){return`object ${e.object} +type ${e.type} +tag ${e.tag} +tagger ${rg(e.tagger)} -${t.message} -${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(` +${e.message} +${e.gpgsig?e.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(` -`))}message(){let t=this.withoutSignature();return t.slice(t.indexOf(` +`))}message(){let e=this.withoutSignature();return e.slice(e.indexOf(` -`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let t=this.justHeaders().split(` -`),r=[];for(let i of t)i[0]===" "?r[r.length-1]+=` -`+i.slice(1):r.push(i);let n={};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.tagger&&(n.tagger=su(n.tagger)),n.committer&&(n.committer=su(n.committer)),n}withoutSignature(){let t=zn(this._tag);return t.indexOf(` ------BEGIN PGP SIGNATURE-----`)===-1?t:t.slice(0,t.lastIndexOf(` +`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let e=this.justHeaders().split(` +`),r=[];for(let i of e)i[0]===" "?r[r.length-1]+=` +`+i.slice(1):r.push(i);let n={};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.tagger&&(n.tagger=Of(n.tagger)),n.committer&&(n.committer=Of(n.committer)),n}withoutSignature(){let e=wi(this._tag);return e.indexOf(` +-----BEGIN PGP SIGNATURE-----`)===-1?e:e.slice(0,e.lastIndexOf(` -----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(` ------BEGIN PGP SIGNATURE-----`)===-1)return;let t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return zn(t)}payload(){return this.withoutSignature()+` -`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(t,r,n){let i=t.payload(),{signature:a}=await r({payload:i,secretKey:n});a=zn(a);let s=i+a;return e.from(s)}};function sp(e){return e.trim().split(` -`).map(t=>" "+t).join(` +-----BEGIN PGP SIGNATURE-----`)===-1)return;let e=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return wi(e)}payload(){return this.withoutSignature()+` +`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(e,r,n){let i=e.payload(),{signature:a}=await r({payload:i,secretKey:n});a=wi(a);let s=i+a;return t.from(s)}};function zm(t){return t.trim().split(` +`).map(e=>" "+e).join(` `)+` -`}function qO(e){return e.split(` -`).map(t=>t.replace(/^ /,"")).join(` -`)}var rr=class e{constructor(t){if(typeof t=="string")this._commit=t;else if(Buffer.isBuffer(t))this._commit=t.toString("utf8");else if(typeof t=="object")this._commit=e.render(t);else throw new le("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:t,signature:r}){let n=e.justHeaders(t),i=e.justMessage(t),a=zn(n+` -gpgsig`+sp(r)+` -`+i);return new e(a)}static from(t){return new e(t)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return e.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return zn(t.slice(t.indexOf(` +`}function D4(t){return t.split(` +`).map(e=>e.replace(/^ /,"")).join(` +`)}var pr=class t{constructor(e){if(typeof e=="string")this._commit=e;else if(Buffer.isBuffer(e))this._commit=e.toString("utf8");else if(typeof e=="object")this._commit=t.render(e);else throw new pe("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:e,signature:r}){let n=t.justHeaders(e),i=t.justMessage(e),a=wi(n+` +gpgsig`+zm(r)+` +`+i);return new t(a)}static from(e){return new t(e)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return t.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(e){return wi(e.slice(e.indexOf(` -`)+2))}static justHeaders(t){return t.slice(0,t.indexOf(` +`)+2))}static justHeaders(e){return e.slice(0,e.indexOf(` -`))}parseHeaders(){let t=e.justHeaders(this._commit).split(` -`),r=[];for(let i of t)i[0]===" "?r[r.length-1]+=` -`+i.slice(1):r.push(i);let n={parent:[]};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.author&&(n.author=su(n.author)),n.committer&&(n.committer=su(n.committer)),n}static renderHeaders(t){let r="";if(t.tree?r+=`tree ${t.tree} +`))}parseHeaders(){let e=t.justHeaders(this._commit).split(` +`),r=[];for(let i of e)i[0]===" "?r[r.length-1]+=` +`+i.slice(1):r.push(i);let n={parent:[]};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.author&&(n.author=Of(n.author)),n.committer&&(n.committer=Of(n.committer)),n}static renderHeaders(e){let r="";if(e.tree?r+=`tree ${e.tree} `:r+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 -`,t.parent){if(t.parent.length===void 0)throw new le("commit 'parent' property should be an array");for(let a of t.parent)r+=`parent ${a} -`}let n=t.author;r+=`author ${vp(n)} -`;let i=t.committer||t.author;return r+=`committer ${vp(i)} -`,t.gpgsig&&(r+="gpgsig"+sp(t.gpgsig)),r}static render(t){return e.renderHeaders(t)+` -`+zn(t.message)}render(){return this._commit}withoutSignature(){let t=zn(this._commit);if(t.indexOf(` -gpgsig`)===-1)return t;let r=t.slice(0,t.indexOf(` -gpgsig`)),n=t.slice(t.indexOf(`-----END PGP SIGNATURE----- -`)+28);return zn(r+` -`+n)}isolateSignature(){let t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return qO(t)}static async sign(t,r,n){let i=t.withoutSignature(),a=e.justMessage(t._commit),{signature:s}=await r({payload:i,secretKey:n});s=zn(s);let l=e.justHeaders(t._commit)+` -gpgsig`+sp(s)+` -`+a;return e.from(l)}};async function bs({fs:e,cache:t,gitdir:r,oid:n}){if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:tr.from([]),oid:n};let{type:i,object:a}=await Ye({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,bs({fs:e,cache:t,gitdir:r,oid:n});if(i==="commit")return n=rr.from(a).parse().tree,bs({fs:e,cache:t,gitdir:r,oid:n});if(i!=="tree")throw new zt(n,i,"tree");return{tree:tr.from(a),oid:n}}var yp=class{constructor({fs:t,gitdir:r,ref:n,cache:i}){this.fs=t,this.cache=i,this.gitdir=r,this.mapPromise=(async()=>{let s=new Map,o;try{o=await W.resolve({fs:t,gitdir:r,ref:n})}catch(c){c instanceof Le&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let l=await bs({fs:t,cache:this.cache,gitdir:r,oid:o});return l.type="tree",l.mode="40000",s.set(".",l),s})();let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,cache:i,gitdir:a}=this,s=await this.mapPromise,o=s.get(r);if(!o)throw new Error(`No obj for ${r}`);let l=o.oid;if(!l)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:c,object:u}=await Ye({fs:n,cache:i,gitdir:a,oid:l});if(c!==o.type)throw new zt(l,c,o.type);let f=tr.from(u);for(let d of f)s.set($(r,d.path),d);return f.entries().map(d=>$(r,d.path))}async type(t){if(t._type===!1){let r=await this.mapPromise,{type:n}=r.get(t._fullpath);t._type=n}return t._type}async mode(t){if(t._mode===!1){let r=await this.mapPromise,{mode:n}=r.get(t._fullpath);t._mode=a2(parseInt(n,8))}return t._mode}async stat(t){}async content(t){if(t._content===!1){let r=await this.mapPromise,{fs:n,cache:i,gitdir:a}=this,o=r.get(t._fullpath).oid,{type:l,object:c}=await Ye({fs:n,cache:i,gitdir:a,oid:o});l!=="blob"?t._content=void 0:t._content=new Uint8Array(c)}return t._content}async oid(t){if(t._oid===!1){let n=(await this.mapPromise).get(t._fullpath);t._oid=n.oid}return t._oid}};function bi({ref:e="HEAD"}={}){let t=Object.create(null);return Object.defineProperty(t,hu,{value:function({fs:r,gitdir:n,cache:i}){return new yp({fs:r,gitdir:n,ref:e,cache:i})}}),Object.freeze(t),t}var wp=class{constructor({fs:t,dir:r,gitdir:n,cache:i}){this.fs=t,this.cache=i,this.dir=r,this.gitdir=n;let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,dir:i}=this,a=await n.readdir($(i,r));return a===null?null:a.map(s=>$(r,s))}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let{fs:r,dir:n}=this,i=await r.lstat(`${n}/${t._fullpath}`);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let a=i.isDirectory()?"tree":"blob";a==="blob"&&!i.isFile()&&!i.isSymbolicLink()&&(a="special"),t._type=a,i=hs(i),t._mode=i.mode,i.size===-1&&t._actualSize&&(i.size=t._actualSize),t._stat=i}return t._stat}async content(t){if(t._content===!1){let{fs:r,dir:n,gitdir:i}=this;if(await t.type()==="tree")t._content=void 0;else{let s=await(await qe.get({fs:r,gitdir:i})).get("core.autocrlf"),o=await r.read(`${n}/${t._fullpath}`,{autocrlf:s});t._actualSize=o.length,t._stat&&t._stat.size===-1&&(t._stat.size=t._actualSize),t._content=new Uint8Array(o)}}return t._content}async oid(t){if(t._oid===!1){let{fs:r,gitdir:n,cache:i}=this,a;await yt.acquire({fs:r,gitdir:n,cache:i},async function(s){let o=s.entriesMap.get(t._fullpath),l=await t.stat(),u=await(await qe.get({fs:r,gitdir:n})).get("core.filemode"),f=typeof process!="undefined"?process.platform!=="win32":!0;!o||tu(l,o,u,f)?await t.content()===void 0?a=void 0:(a=await Vn(xi.wrap({type:"blob",object:await t.content()})),o&&a===o.oid&&(!u||l.mode===o.mode)&&tu(l,o,u,f)&&s.insert({filepath:t._fullpath,stats:l,oid:a})):a=o.oid}),t._oid=a}return t._oid}};function mu(){let e=Object.create(null);return Object.defineProperty(e,hu,{value:function({fs:t,dir:r,gitdir:n,cache:i}){return new wp({fs:t,dir:r,gitdir:n,cache:i})}}),Object.freeze(e),e}function YO(e,t){let r=t-e;return Array.from({length:r},(n,i)=>e+i)}var f2=typeof Array.prototype.flat=="undefined"?e=>e.reduce((t,r)=>t.concat(r),[]):e=>e.flat(),bp=class{constructor(){this.value=null}consider(t){t!=null&&(this.value===null?this.value=t:tc,reduce:s=async(l,c)=>{let u=f2(c);return l!==void 0&&u.unshift(l),u},iterate:o=(l,c)=>Promise.all([...c].map(l))}){let l=i.map(h=>h[hu]({fs:e,dir:r,gitdir:n,cache:t})),c=new Array(l.length).fill("."),u=YO(0,l.length),f=async h=>{u.map(v=>{h[v]=h[v]&&new l[v].ConstructEntry(h[v])});let m=(await Promise.all(u.map(v=>h[v]?l[v].readdir(h[v]):[]))).map(v=>v===null?[]:v).map(v=>v[Symbol.iterator]());return{entries:h,children:XO(m)}},d=async h=>{let{entries:p,children:m}=await f(h),v=p.find(b=>b&&b._fullpath)._fullpath,y=await a(v,p);if(y!==null){let b=await o(d,m);return b=b.filter(x=>x!==void 0),s(y,b)}};return d(c)}async function _p(e,t){let r=await e.readdir(t);r==null?await e.rm(t):r.length?await Promise.all(r.map(n=>{let i=$(t,n);return e.lstat(i).then(a=>{if(a)return a.isDirectory()?_p(e,i):e.rm(i)})})).then(()=>e.rmdir(t)):await e.rmdir(t)}function ZO(e){return KO(e)&&zw(e.then)&&zw(e.catch)}function KO(e){return e&&typeof e=="object"}function zw(e){return typeof e=="function"}function Vw(e){return ZO((r=>{try{return r.readFile().catch(n=>n)}catch(n){return n}})(e))}var Ww=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function qw(e,t){if(Vw(t))for(let r of Ww)e[`_${r}`]=t[r].bind(t);else for(let r of Ww)e[`_${r}`]=(0,eu.default)(t[r].bind(t));Vw(t)?t.rm?e._rm=t.rm.bind(t):t.rmdir.length>1?e._rm=t.rmdir.bind(t):e._rm=_p.bind(null,e):t.rm?e._rm=(0,eu.default)(t.rm.bind(t)):t.rmdir.length>2?e._rm=(0,eu.default)(t.rmdir.bind(t)):e._rm=_p.bind(null,e)}var X=class{constructor(t){if(typeof t._original_unwrapped_fs!="undefined")return t;let r=Object.getOwnPropertyDescriptor(t,"promises");r&&r.enumerable?qw(this,t.promises):qw(this,t),this._original_unwrapped_fs=t}async exists(t,r={}){try{return await this._stat(t),!0}catch(n){if(n.code==="ENOENT"||n.code==="ENOTDIR")return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',n),n}}async read(t,r={}){try{let n=await this._readFile(t,r);if(r.autocrlf==="true")try{n=new TextDecoder("utf8",{fatal:!0}).decode(n),n=n.replace(/\r\n/g,` -`),n=new TextEncoder().encode(n)}catch(i){}return typeof n!="string"&&(n=Buffer.from(n)),n}catch(n){return null}}async write(t,r,n={}){try{await this._writeFile(t,r,n);return}catch(i){await this.mkdir(ps(t)),await this._writeFile(t,r,n)}}async mkdir(t,r=!1){try{await this._mkdir(t);return}catch(n){if(n===null||n.code==="EEXIST")return;if(r)throw n;if(n.code==="ENOENT"){let i=ps(t);if(i==="."||i==="/"||i===t)throw n;await this.mkdir(i),await this.mkdir(t,!0)}}}async rm(t){try{await this._unlink(t)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(t,r){try{r&&r.recursive?await this._rm(t,r):await this._rmdir(t)}catch(n){if(n.code!=="ENOENT")throw n}}async readdir(t){try{let r=await this._readdir(t);return r.sort(du),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(t){let r=await this._readdir(t);return(await Promise.all(r.map(async i=>{let a=t+"/"+i;return(await this._stat(a)).isDirectory()?this.readdirDeep(a):a}))).reduce((i,a)=>i.concat(a),[])}async lstat(t){try{return await this._lstat(t)}catch(r){if(r.code==="ENOENT")return null;throw r}}async readlink(t,r={encoding:"buffer"}){try{let n=await this._readlink(t,r);return Buffer.isBuffer(n)?n:Buffer.from(n)}catch(n){if(n.code==="ENOENT")return null;throw n}}async writelink(t,r){return this._symlink(r.toString("utf8"),t)}};function C(e,t){if(t===void 0)throw new er(e)}async function ou(e,t){return!e&&!t?!1:e&&!t||!e&&t?!0:!(await e.type()==="tree"&&await t.type()==="tree"||await e.type()===await t.type()&&await e.mode()===await t.mode()&&await e.oid()===await t.oid())}async function JO({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n="HEAD",cache:i={}}){try{C("fs",e),C("dir",t),C("gitdir",r);let a=new X(e),s=[bi({ref:n}),mu(),pu()],o=[];await yt.acquire({fs:a,gitdir:r,cache:i},async function(c){o=c.unmergedPaths});let l=await _s({fs:a,cache:i,dir:t,gitdir:r,trees:s,map:async function(c,[u,f,d]){let h=!await ou(f,d),p=o.includes(c),m=!await ou(d,u);if(h||p)return u?{path:c,mode:await u.mode(),oid:await u.oid(),type:await u.type(),content:await u.content()}:void 0;if(m)return!1;throw new ml(c)}});await yt.acquire({fs:a,gitdir:r,cache:i},async function(c){for(let u of l)if(u!==!1){if(!u){await a.rmdir(`${t}/${u.path}`,{recursive:!0}),c.delete({filepath:u.path});continue}if(u.type==="blob"){let f=new TextDecoder().decode(u.content);await a.write(`${t}/${u.path}`,f,{mode:u.mode}),c.insert({filepath:u.path,oid:u.oid,stage:0})}}})}catch(a){throw a.caller="git.abortMerge",a}}var xs=class{static async isIgnored({fs:t,dir:r,gitdir:n=$(r,".git"),filepath:i}){if(ru(i)===".git")return!0;if(i===".")return!1;let a="",s=$(n,"info","exclude");await t.exists(s)&&(a=await t.read(s,"utf8"));let o=[{gitignore:$(r,".gitignore"),filepath:i}],l=i.split("/").filter(Boolean);for(let u=1;uxp({dir:t,gitdir:r,fs:o,filepath:n,index:l,force:a,parallel:s}))}catch(o){throw o.caller="git.add",o}}async function xp({dir:e,gitdir:t,fs:r,filepath:n,index:i,force:a,parallel:s}){n=Array.isArray(n)?n:[n];let o=n.map(async f=>{if(!a&&await xs.isIgnored({fs:r,dir:e,gitdir:t,filepath:f}))return;let d=await r.lstat($(e,f));if(!d)throw new Le(f);if(d.isDirectory()){let h=await r.readdir($(e,f));if(s){let p=h.map(m=>xp({dir:e,gitdir:t,fs:r,filepath:[$(f,m)],index:i,force:a,parallel:s}));await Promise.all(p)}else for(let p of h)await xp({dir:e,gitdir:t,fs:r,filepath:[$(f,p)],index:i,force:a,parallel:s})}else{let p=await(await qe.get({fs:r,gitdir:t})).get("core.autocrlf"),m=d.isSymbolicLink()?await r.readlink($(e,f)).then(r6):await r.read($(e,f),{autocrlf:p});if(m===null)throw new Le(f);let v=await mr({fs:r,gitdir:t,type:"blob",object:m});i.insert({filepath:f,stats:d,oid:v})}}),l=await Promise.allSettled(o),c=l.filter(f=>f.status==="rejected").map(f=>f.reason);if(c.length>1)throw new fl(c);if(c.length===1)throw c[0];return l.filter(f=>f.status==="fulfilled"&&f.value).map(f=>f.value)}async function vl({fs:e,gitdir:t,path:r}){return(await qe.get({fs:e,gitdir:t})).get(r)}function h2(e,...t){for(let r of t)if(r)for(let n of Object.keys(r)){let i=r[n];i!==void 0&&(e[n]=i)}return e}async function fa({fs:e,gitdir:t,author:r,commit:n}){let i=Math.floor(Date.now()/1e3),a={name:await vl({fs:e,gitdir:t,path:"user.name"}),email:await vl({fs:e,gitdir:t,path:"user.email"})||"",timestamp:i,timezoneOffset:new Date(i*1e3).getTimezoneOffset()},s=h2({},a,n?n.author:void 0,r);if(s.name!==void 0)return s}async function Ss({fs:e,gitdir:t,author:r,committer:n,commit:i}){let a=Math.floor(Date.now()/1e3),s={name:await vl({fs:e,gitdir:t,path:"user.name"}),email:await vl({fs:e,gitdir:t,path:"user.email"})||"",timestamp:a,timezoneOffset:new Date(a*1e3).getTimezoneOffset()},o=h2({},s,i?i.committer:void 0,r,n);if(o.name!==void 0)return o}async function p2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await Ye({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,p2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="commit")throw new zt(n,i,"commit");return{commit:rr.from(a),oid:n}}async function lu({fs:e,cache:t,gitdir:r,oid:n}){let{commit:i,oid:a}=await p2({fs:e,cache:t,gitdir:r,oid:n});return{oid:a,commit:i.parse(),payload:i.withoutSignature()}}async function gu({fs:e,cache:t,onSign:r,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h}){let p=!1;f||(f=await W.resolve({fs:e,gitdir:n,ref:"HEAD",depth:2}));let m,v;try{m=await W.resolve({fs:e,gitdir:n,ref:f}),v=await lu({fs:e,gitdir:n,oid:m,cache:{}})}catch(x){p=!0}if(l&&p)throw new gl(f);let y=l?await fa({fs:e,gitdir:n,author:a,commit:v.commit}):await fa({fs:e,gitdir:n,author:a});if(!y)throw new Vt("author");let b=l?await Ss({fs:e,gitdir:n,author:y,committer:s,commit:v.commit}):await Ss({fs:e,gitdir:n,author:y,committer:s});if(!b)throw new Vt("committer");return yt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async function(x){let _=o2(x.entries).get(".");if(h||(h=await m2({fs:e,gitdir:n,inode:_,dryRun:c})),d?d=await Promise.all(d.map(A=>W.resolve({fs:e,gitdir:n,ref:A}))):l?d=v.commit.parent:d=m?[m]:[],!i)if(l)i=v.commit.message;else throw new er("message");let k=rr.from({tree:h,parent:d,author:y,committer:b,message:i});o&&(k=await rr.sign(k,r,o));let w=await mr({fs:e,gitdir:n,type:"commit",object:k.toObject(),dryRun:c});return!u&&!c&&await W.writeRef({fs:e,gitdir:n,ref:f,value:w}),w})}async function m2({fs:e,gitdir:t,inode:r,dryRun:n}){let i=r.children;for(let l of i)l.type==="tree"&&(l.metadata.mode="040000",l.metadata.oid=await m2({fs:e,gitdir:t,inode:l,dryRun:n}));let a=i.map(l=>({mode:l.metadata.mode,path:l.basename,oid:l.metadata.oid,type:l.type})),s=tr.from(a);return await mr({fs:e,gitdir:t,type:"tree",object:s.toObject(),dryRun:n})}async function wl({fs:e,cache:t,gitdir:r,oid:n,filepath:i}){if(i.startsWith("/"))throw new Si("leading-slash");if(i.endsWith("/"))throw new Si("trailing-slash");let a=n,s=await bs({fs:e,cache:t,gitdir:r,oid:n}),o=s.tree;if(i==="")n=s.oid;else{let l=i.split("/");n=await g2({fs:e,cache:t,gitdir:r,tree:o,pathArray:l,oid:a,filepath:i})}return n}async function g2({fs:e,cache:t,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s}){let o=i.shift();for(let l of n)if(l.path===o){if(i.length===0)return l.oid;{let{type:c,object:u}=await Ye({fs:e,cache:t,gitdir:r,oid:l.oid});if(c!=="tree")throw new zt(a,c,"tree",s);return n=tr.from(u),g2({fs:e,cache:t,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s})}}throw new Le(`file or directory found at "${a}:${s}"`)}async function ks({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){i!==void 0&&(n=await wl({fs:e,cache:t,gitdir:r,oid:n,filepath:i}));let{tree:a,oid:s}=await bs({fs:e,cache:t,gitdir:r,oid:n});return{oid:s,tree:a.entries()}}async function kp({fs:e,gitdir:t,tree:r}){let n=tr.from(r).toObject();return await mr({fs:e,gitdir:t,type:"tree",object:n,format:"content"})}async function i6({fs:e,cache:t,onSign:r,gitdir:n,ref:i,oid:a,note:s,force:o,author:l,committer:c,signingKey:u}){let f;try{f=await W.resolve({gitdir:n,fs:e,ref:i})}catch(y){if(!(y instanceof Le))throw y}let h=(await ks({fs:e,cache:t,gitdir:n,oid:f||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;if(o)h=h.filter(y=>y.path!==a);else for(let y of h)if(y.path===a)throw new en("note",a);typeof s=="string"&&(s=Buffer.from(s,"utf8"));let p=await mr({fs:e,gitdir:n,type:"blob",object:s,format:"content"});h.push({mode:"100644",path:a,oid:p,type:"blob"});let m=await kp({fs:e,gitdir:n,tree:h});return await gu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:m,parent:f&&[f],message:`Note added by 'isomorphic-git addNote' -`,author:l,committer:c,signingKey:u})}async function a6({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,note:s,force:o,author:l,committer:c,signingKey:u,cache:f={}}){try{C("fs",e),C("gitdir",n),C("oid",a),C("note",s),u&&C("onSign",t);let d=new X(e),h=await fa({fs:d,gitdir:n,author:l});if(!h)throw new Vt("author");let p=await Ss({fs:d,gitdir:n,author:h,committer:c});if(!p)throw new Vt("committer");return await i6({fs:new X(d),cache:f,onSign:t,gitdir:n,ref:i,oid:a,note:s,force:o,author:h,committer:p,signingKey:u})}catch(d){throw d.caller="git.addNote",d}}async function v2({fs:e,gitdir:t,remote:r,url:n,force:i}){if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let a=await qe.get({fs:e,gitdir:t});if(!i&&(await a.getSubsections("remote")).includes(r)&&n!==await a.get(`remote.${r}.url`))throw new en("remote",r);await a.set(`remote.${r}.url`,n),await a.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await qe.save({fs:e,gitdir:t,config:a})}async function s6({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n,url:i,force:a=!1}){try{return C("fs",e),C("gitdir",r),C("remote",n),C("url",i),await v2({fs:new X(e),gitdir:r,remote:n,url:i,force:a})}catch(s){throw s.caller="git.addRemote",s}}async function o6({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:c,force:u=!1}){if(i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`,!u&&await W.exists({fs:e,gitdir:n,ref:i}))throw new en("tag",i);let f=await W.resolve({fs:e,gitdir:n,ref:l||"HEAD"}),{type:d}=await Ye({fs:e,cache:t,gitdir:n,oid:f}),h=pr.from({object:f,type:d,tag:i.replace("refs/tags/",""),tagger:a,message:s,gpgsig:o});c&&(h=await pr.sign(h,r,c));let p=await mr({fs:e,gitdir:n,type:"tag",object:h.toObject()});await W.writeRef({fs:e,gitdir:n,ref:i,value:p})}async function l6({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:c,force:u=!1,cache:f={}}){try{C("fs",e),C("gitdir",n),C("ref",i),c&&C("onSign",t);let d=new X(e),h=await fa({fs:d,gitdir:n,author:a});if(!h)throw new Vt("tagger");return await o6({fs:d,cache:f,onSign:t,gitdir:n,ref:i,tagger:h,message:s,gpgsig:o,object:l,signingKey:c,force:u})}catch(d){throw d.caller="git.annotatedTag",d}}async function c6({fs:e,gitdir:t,ref:r,object:n,checkout:i=!1,force:a=!1}){if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let s=`refs/heads/${r}`;if(!a&&await W.exists({fs:e,gitdir:t,ref:s}))throw new en("branch",r,!1);let o;try{o=await W.resolve({fs:e,gitdir:t,ref:n||"HEAD"})}catch(l){}o&&await W.writeRef({fs:e,gitdir:t,ref:s,value:o}),i&&await W.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function u6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,checkout:a=!1,force:s=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),await c6({fs:new X(e),gitdir:r,ref:n,object:i,checkout:a,force:s})}catch(o){throw o.caller="git.branch",o}}var y2=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);async function Tp({fs:e,cache:t,onProgress:r,onPostCheckout:n,dir:i,gitdir:a,remote:s,ref:o,filepaths:l,noCheckout:c,noUpdateHead:u,dryRun:f,force:d,track:h=!0}){let p;if(n)try{p=await W.resolve({fs:e,gitdir:a,ref:"HEAD"})}catch(v){p="0000000000000000000000000000000000000000"}let m;try{m=await W.resolve({fs:e,gitdir:a,ref:o})}catch(v){if(o==="HEAD")throw v;let y=`${s}/${o}`;if(m=await W.resolve({fs:e,gitdir:a,ref:y}),h){let b=await qe.get({fs:e,gitdir:a});await b.set(`branch.${o}.remote`,s),await b.set(`branch.${o}.merge`,`refs/heads/${o}`),await qe.save({fs:e,gitdir:a,config:b})}await W.writeRef({fs:e,gitdir:a,ref:`refs/heads/${o}`,value:m})}if(!c){let v;try{v=await f6({fs:e,cache:t,onProgress:r,dir:i,gitdir:a,ref:o,force:d,filepaths:l})}catch(_){throw _ instanceof Le&&_.data.what===m?new sl(o,m):_}let y=v.filter(([_])=>_==="conflict").map(([_,k])=>k);if(y.length>0)throw new al(y);let b=v.filter(([_])=>_==="error").map(([_,k])=>k);if(b.length>0)throw new le(b.join(", "));if(f){n&&await n({previousHead:p,newHead:m,type:l!=null&&l.length>0?"file":"branch"});return}let x=0,E=v.length;await yt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="delete"||k==="delete-index").map(async function([k,w]){let A=`${i}/${w}`;k==="delete"&&await e.rm(A),_.delete({filepath:w}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}))}),await yt.acquire({fs:e,gitdir:a,cache:t},async function(_){for(let[k,w]of v)if(k==="rmdir"||k==="rmdir-index"){let A=`${i}/${w}`;try{k==="rmdir-index"&&_.delete({filepath:w}),await e.rmdir(A),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(S){if(S.code==="ENOTEMPTY")console.log(`Did not delete ${w} because directory is not empty`);else throw S}}}),await Promise.all(v.filter(([_])=>_==="mkdir"||_==="mkdir-index").map(async function([_,k]){let w=`${i}/${k}`;await e.mkdir(w),r&&await r({phase:"Updating workdir",loaded:++x,total:E})})),await yt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="create"||k==="create-index"||k==="update"||k==="mkdir-index").map(async function([k,w,A,S,T]){let P=`${i}/${w}`;try{if(k!=="create-index"&&k!=="mkdir-index"){let{object:N}=await Ye({fs:e,cache:t,gitdir:a,oid:A});if(T&&await e.rm(P),S===33188)await e.write(P,N);else if(S===33261)await e.write(P,N,{mode:511});else if(S===40960)await e.writelink(P,N);else throw new le(`Invalid mode 0o${S.toString(8)} detected in blob ${A}`)}let I=await e.lstat(P);S===33261&&(I.mode=493),k==="mkdir-index"&&(I.mode=57344),_.insert({filepath:w,stats:I,oid:A}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(I){console.log(I)}}))}),n&&await n({previousHead:p,newHead:m,type:l!=null&&l.length>0?"file":"branch"})}if(!u){let v=await W.expand({fs:e,gitdir:a,ref:o});v.startsWith("refs/heads")?await W.writeSymbolicRef({fs:e,gitdir:a,ref:"HEAD",value:v}):await W.writeRef({fs:e,gitdir:a,ref:"HEAD",value:m})}}async function f6({fs:e,cache:t,onProgress:r,dir:n,gitdir:i,ref:a,force:s,filepaths:o}){let l=0;return _s({fs:e,cache:t,dir:n,gitdir:i,trees:[bi({ref:a}),mu(),pu()],map:async function(c,[u,f,d]){if(c===".")return;if(o&&!o.some(p=>y2(c,p)))return null;switch(r&&await r({phase:"Analyzing workdir",loaded:++l}),[!!d,!!u,!!f].map(Number).join("")){case"000":return;case"001":return s&&o&&o.includes(c)?["delete",c]:void 0;case"010":switch(await u.type()){case"tree":return["mkdir",c];case"blob":return["create",c,await u.oid(),await u.mode()];case"commit":return["mkdir-index",c,await u.oid(),await u.mode()];default:return["error",`new entry Unhandled type ${await u.type()}`]}case"011":switch(`${await u.type()}-${await f.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",c];case"blob-blob":return await u.oid()!==await f.oid()?s?["update",c,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",c]:await u.mode()!==await f.mode()?s?["update",c,await u.oid(),await u.mode(),!0]:["conflict",c]:["create-index",c,await u.oid(),await u.mode()];case"commit-tree":return;case"commit-blob":return["conflict",c];default:return["error",`new entry Unhandled type ${u.type}`]}case"100":return["delete-index",c];case"101":switch(await d.type()){case"tree":return["rmdir",c];case"blob":return await d.oid()!==await f.oid()?s?["delete",c]:["conflict",c]:["delete",c];case"commit":return["rmdir-index",c];default:return["error",`delete entry Unhandled type ${await d.type()}`]}case"110":case"111":switch(`${await d.type()}-${await u.type()}`){case"tree-tree":return;case"blob-blob":{if(await d.oid()===await u.oid()&&await d.mode()===await u.mode()&&!s)return;if(f){if(await f.oid()!==await d.oid()&&await f.oid()!==await u.oid())return s?["update",c,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",c]}else if(s)return["update",c,await u.oid(),await u.mode(),await u.mode()!==await d.mode()];return await u.mode()!==await d.mode()?["update",c,await u.oid(),await u.mode(),!0]:await u.oid()!==await d.oid()?["update",c,await u.oid(),await u.mode(),!1]:void 0}case"tree-blob":return["update-dir-to-blob",c,await u.oid()];case"blob-tree":return["update-blob-to-tree",c];case"commit-commit":return["mkdir-index",c,await u.oid(),await u.mode()];default:return["error",`update entry Unhandled type ${await d.type()}-${await u.type()}`]}}},reduce:async function(c,u){return u=f2(u),c?c&&c[0]==="rmdir"?(u.push(c),u):(u.unshift(c),u):u}})}async function d6({fs:e,onProgress:t,onPostCheckout:r,dir:n,gitdir:i=$(n,".git"),remote:a="origin",ref:s,filepaths:o,noCheckout:l=!1,noUpdateHead:c=s===void 0,dryRun:u=!1,force:f=!1,track:d=!0,cache:h={}}){try{C("fs",e),C("dir",n),C("gitdir",i);let p=s||"HEAD";return await Tp({fs:new X(e),cache:h,onProgress:t,onPostCheckout:r,dir:n,gitdir:i,remote:a,ref:p,filepaths:o,noCheckout:l,noUpdateHead:c,dryRun:u,force:f,track:d})}catch(p){throw p.caller="git.checkout",p}}var h6=new RegExp("^refs/(heads/|tags/|remotes/)?(.*)");function ca(e){let t=h6.exec(e);return t?t[1]==="remotes/"&&e.endsWith("/HEAD")?t[2].slice(0,-5):t[2]:e}async function ha({fs:e,gitdir:t,fullname:r=!1,test:n=!1}){let i=await W.resolve({fs:e,gitdir:t,ref:"HEAD",depth:2});if(n)try{await W.resolve({fs:e,gitdir:t,ref:i})}catch(a){return}if(i.startsWith("refs/"))return r?i:ca(i)}function p6(e){return e=e.replace(/^git@([^:]+):/,"https://$1/"),e=e.replace(/^ssh:\/\//,"https://"),e}function w2({username:e="",password:t=""}){return`Basic ${Buffer.from(`${e}:${t}`).toString("base64")}`}async function bl(e,t){let r=c2(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function cu(e){let t=0,r=[];await bl(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}function Yw(e){let t=e.match(/^https?:\/\/([^/]+)@/);if(t==null)return{url:e,auth:{}};t=t[1];let[r,n]=t.split(":");return e=e.replace(`${t}@`,""),{url:e,auth:{username:r,password:n}}}function Sp(e,t){let r=t.toString(16);return"0".repeat(e-r.length)+r}var We=class{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(t){typeof t=="string"&&(t=Buffer.from(t));let r=t.length+4,n=Sp(4,r);return Buffer.concat([Buffer.from(n,"utf8"),t])}static streamReader(t){let r=new au(t);return async function(){try{let i=await r.read(4);if(i==null)return!0;if(i=parseInt(i.toString("utf8"),16),i===0||i===1)return null;let a=await r.read(i-4);return a==null?!0:a}catch(i){return t.error=i,!0}}}};async function Xw(e){let t={},r;for(;r=await e(),r!==!0;){if(r===null)continue;r=r.toString("utf8").replace(/\n$/,"");let n=r.indexOf("=");if(n>-1){let i=r.slice(0,n),a=r.slice(n+1);t[i]=a}else t[r]=!0}return{protocolVersion:2,capabilities2:t}}async function Zw(e,{service:t}){let r=new Set,n=new Map,i=new Map,a=We.streamReader(e),s=await a();for(;s===null;)s=await a();if(s===!0)throw new ol;if(s.includes("version 2"))return Xw(a);if(s.toString("utf8").replace(/\n$/,"")!==`# service=${t}`)throw new ua(`# service=${t}\\n`,s.toString("utf8"));let o=await a();for(;o===null;)o=await a();if(o===!0)return{capabilities:r,refs:n,symrefs:i};if(o=o.toString("utf8"),o.includes("version 2"))return Xw(a);let[l,c]=lp(o,"\0","\\x00");if(c.split(" ").map(u=>r.add(u)),l!=="0000000000000000000000000000000000000000 capabilities^{}"){let[u,f]=lp(l," "," ");for(n.set(f,u);;){let d=await a();if(d===!0)break;if(d!==null){let[h,p]=lp(d.toString("utf8")," "," ");n.set(p,h)}}}for(let u of r)if(u.startsWith("symref=")){let f=u.match(/symref=([^:]+):(.*)/);f.length===3&&i.set(f[1],f[2])}return{protocolVersion:1,capabilities:r,refs:n,symrefs:i}}function lp(e,t,r){let n=e.trim().split(t);if(n.length!==2)throw new ua(`Two strings separated by '${r}'`,e.toString("utf8"));return n}var Kw=(e,t)=>e.endsWith("?")?`${e}${t}`:`${e}/${t.replace(/^https?:\/\//,"")}`,Jw=(e,t)=>{(t.username||t.password)&&(e.Authorization=w2(t)),t.headers&&Object.assign(e,t.headers)},cp=async e=>{try{let t=Buffer.from(await cu(e.body)),r=t.toString("utf8");return{preview:r.length<256?r:r.slice(0,256)+"...",response:r,data:t}}catch(t){return{}}},Es=class{static async capabilities(){return["discover","connect"]}static async discover({http:t,onProgress:r,onAuth:n,onAuthSuccess:i,onAuthFailure:a,corsProxy:s,service:o,url:l,headers:c,protocolVersion:u}){let{url:f,auth:d}=Yw(l),h=s?Kw(s,f):f;(d.username||d.password)&&(c.Authorization=w2(d)),u===2&&(c["Git-Protocol"]="version=2");let p,m,v=!1;do if(p=await t.request({onProgress:r,method:"GET",url:`${h}/info/refs?service=${o}`,headers:c}),m=!1,p.statusCode===401||p.statusCode===203){let y=v?a:n;if(y){if(d=await y(f,{...d,headers:{...c}}),d&&d.cancel)throw new ws;d&&(Jw(c,d),v=!0,m=!0)}}else p.statusCode===200&&v&&i&&await i(f,d);while(m);if(p.statusCode!==200){let{response:y}=await cp(p);throw new ms(p.statusCode,p.statusMessage,y)}if(p.headers["content-type"]===`application/x-${o}-advertisement`){let y=await Zw(p.body,{service:o});return y.auth=d,y}else{let{preview:y,response:b,data:x}=await cp(p);try{let E=await Zw([x],{service:o});return E.auth=d,E}catch(E){throw new dl(y,b)}}}static async connect({http:t,onProgress:r,corsProxy:n,service:i,url:a,auth:s,body:o,headers:l}){let c=Yw(a);c&&(a=c.url),n&&(a=Kw(n,a)),l["content-type"]=`application/x-${i}-request`,l.accept=`application/x-${i}-result`,Jw(l,s);let u=await t.request({onProgress:r,method:"POST",url:`${a}/${i}`,body:o,headers:l});if(u.statusCode!==200){let{response:f}=cp(u);throw new ms(u.statusCode,u.statusMessage,f)}return u}};function m6({url:e}){if(e.startsWith("git@"))return{transport:"ssh",address:e};let t=e.match(/(\w+)(:\/\/|::)(.*)/);if(t!==null){if(t[2]==="://")return{transport:t[1],address:t[0]};if(t[2]==="::")return{transport:t[1],address:t[3]}}}var As=class{static getRemoteHelperFor({url:t}){let r=new Map;r.set("http",Es),r.set("https",Es);let n=m6({url:t});if(!n)throw new pl(t);if(r.has(n.transport))return r.get(n.transport);throw new hl(t,n.transport,n.transport==="ssh"?p6(t):void 0)}},la=null,da=class{static async read({fs:t,gitdir:r}){la===null&&(la=new el.default);let n=$(r,"shallow"),i=new Set;return await la.acquire(n,async function(){let a=await t.read(n,{encoding:"utf8"});if(a===null||a.trim()==="")return i;a.trim().split(` -`).map(s=>i.add(s))}),i}static async write({fs:t,gitdir:r,oids:n}){la===null&&(la=new el.default);let i=$(r,"shallow");if(n.size>0){let a=[...n].join(` +`,e.parent){if(e.parent.length===void 0)throw new pe("commit 'parent' property should be an array");for(let a of e.parent)r+=`parent ${a} +`}let n=e.author;r+=`author ${rg(n)} +`;let i=e.committer||e.author;return r+=`committer ${rg(i)} +`,e.gpgsig&&(r+="gpgsig"+zm(e.gpgsig)),r}static render(e){return t.renderHeaders(e)+` +`+wi(e.message)}render(){return this._commit}withoutSignature(){let e=wi(this._commit);if(e.indexOf(` +gpgsig`)===-1)return e;let r=e.slice(0,e.indexOf(` +gpgsig`)),n=e.slice(e.indexOf(`-----END PGP SIGNATURE----- +`)+28);return wi(r+` +`+n)}isolateSignature(){let e=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return D4(e)}static async sign(e,r,n){let i=e.withoutSignature(),a=t.justMessage(e._commit),{signature:s}=await r({payload:i,secretKey:n});s=wi(s);let l=t.justHeaders(e._commit)+` +gpgsig`+zm(s)+` +`+a;return t.from(l)}};async function fo({fs:t,cache:e,gitdir:r,oid:n}){if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:hr.from([]),oid:n};let{type:i,object:a}=await Ge({fs:t,cache:e,gitdir:r,oid:n});if(i==="tag")return n=Rr.from(a).parse().object,fo({fs:t,cache:e,gitdir:r,oid:n});if(i==="commit")return n=pr.from(a).parse().tree,fo({fs:t,cache:e,gitdir:r,oid:n});if(i!=="tree")throw new tr(n,i,"tree");return{tree:hr.from(a),oid:n}}var ng=class{constructor({fs:e,gitdir:r,ref:n,cache:i}){this.fs=e,this.cache=i,this.gitdir=r,this.mapPromise=(async()=>{let s=new Map,o;try{o=await V.resolve({fs:e,gitdir:r,ref:n})}catch(c){c instanceof je&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let l=await fo({fs:e,cache:this.cache,gitdir:r,oid:o});return l.type="tree",l.mode="40000",s.set(".",l),s})();let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(e){let r=e._fullpath,{fs:n,cache:i,gitdir:a}=this,s=await this.mapPromise,o=s.get(r);if(!o)throw new Error(`No obj for ${r}`);let l=o.oid;if(!l)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:c,object:u}=await Ge({fs:n,cache:i,gitdir:a,oid:l});if(c!==o.type)throw new tr(l,c,o.type);let f=hr.from(u);for(let d of f)s.set($.join(r,d.path),d);return f.entries().map(d=>$.join(r,d.path))}async type(e){if(e._type===!1){let r=await this.mapPromise,{type:n}=r.get(e._fullpath);e._type=n}return e._type}async mode(e){if(e._mode===!1){let r=await this.mapPromise,{mode:n}=r.get(e._fullpath);e._mode=Ix(parseInt(n,8))}return e._mode}async stat(e){}async content(e){if(e._content===!1){let r=await this.mapPromise,{fs:n,cache:i,gitdir:a}=this,o=r.get(e._fullpath).oid,{type:l,object:c}=await Ge({fs:n,cache:i,gitdir:a,oid:o});l!=="blob"?e._content=void 0:e._content=new Uint8Array(c)}return e._content}async oid(e){if(e._oid===!1){let n=(await this.mapPromise).get(e._fullpath);e._oid=n.oid}return e._oid}};function Pr({ref:t="HEAD"}={}){let e=Object.create(null);return Object.defineProperty(e,jf,{value:function({fs:r,gitdir:n,cache:i}){return new ng({fs:r,gitdir:n,ref:t,cache:i})}}),Object.freeze(e),e}var ig=class{constructor({fs:e,dir:r,gitdir:n,cache:i}){this.fs=e,this.cache=i,this.dir=r,this.gitdir=n,this.config=null;let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(e){let r=e._fullpath,{fs:n,dir:i}=this,a=await n.readdir($.join(i,r));return a===null?null:a.map(s=>$.join(r,s))}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let{fs:r,dir:n}=this,i=await r.lstat(`${n}/${e._fullpath}`);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let a=i.isDirectory()?"tree":"blob";a==="blob"&&!i.isFile()&&!i.isSymbolicLink()&&(a="special"),e._type=a,i=io(i),e._mode=i.mode,i.size===-1&&e._actualSize&&(i.size=e._actualSize),e._stat=i}return e._stat}async content(e){if(e._content===!1){let{fs:r,dir:n,gitdir:i}=this;if(await e.type()==="tree")e._content=void 0;else{let s=await(await this._getGitConfig(r,i)).get("core.autocrlf"),o=await r.read(`${n}/${e._fullpath}`,{autocrlf:s});e._actualSize=o.length,e._stat&&e._stat.size===-1&&(e._stat.size=e._actualSize),e._content=new Uint8Array(o)}}return e._content}async oid(e){if(e._oid===!1){let r=this,{fs:n,gitdir:i,cache:a}=this,s;await ct.acquire({fs:n,gitdir:i,cache:a},async function(o){let l=o.entriesMap.get(e._fullpath),c=await e.stat(),f=await(await r._getGitConfig(n,i)).get("core.filemode"),d=typeof process!="undefined"?process.platform!=="win32":!0;if(!l||Tf(c,l,f,d)){let h=await e.content();h===void 0?s=void 0:(s=await bi(ea.wrap({type:"blob",object:h})),l&&s===l.oid&&(!f||c.mode===l.mode)&&Tf(c,l,f,d)&&o.insert({filepath:e._fullpath,stats:c,oid:s}))}else s=l.oid}),e._oid=s}return e._oid}async _getGitConfig(e,r){return this.config?this.config:(this.config=await nt.get({fs:e,gitdir:r}),this.config)}};function yo(){let t=Object.create(null);return Object.defineProperty(t,jf,{value:function({fs:e,dir:r,gitdir:n,cache:i}){return new ig({fs:e,dir:r,gitdir:n,cache:i})}}),Object.freeze(t),t}function L4(t,e){let r=e-t;return Array.from({length:r},(n,i)=>t+i)}var Hx=typeof Array.prototype.flat=="undefined"?t=>t.reduce((e,r)=>e.concat(r),[]):t=>t.flat(),ag=class{constructor(){this.value=null}consider(e){e!=null&&(this.value===null?this.value=e:ec,reduce:s=async(l,c)=>{let u=Hx(c);return l!==void 0&&u.unshift(l),u},iterate:o=(l,c)=>Promise.all([...c].map(l))}){let l=i.map(h=>h[jf]({fs:t,dir:r,gitdir:n,cache:e})),c=new Array(l.length).fill("."),u=L4(0,l.length),f=async h=>{u.map(v=>{let y=h[v];h[v]=y&&new l[v].ConstructEntry(y)});let g=(await Promise.all(u.map(v=>{let y=h[v];return y?l[v].readdir(y):[]}))).map(v=>(v===null?[]:v)[Symbol.iterator]());return{entries:h,children:j4(g)}},d=async h=>{let{entries:p,children:g}=await f(h),v=p.find(b=>b&&b._fullpath)._fullpath,y=await a(v,p);if(y!==null){let b=await o(d,g);return b=b.filter(E=>E!==void 0),s(y,b)}};return d(c)}async function sg(t,e){let r=await t.readdir(e);r==null?await t.rm(e):r.length?await Promise.all(r.map(n=>{let i=$.join(e,n);return t.lstat(i).then(a=>{if(a)return a.isDirectory()?sg(t,i):t.rm(i)})})).then(()=>t.rmdir(e)):await t.rmdir(e)}function N4(t){return B4(t)&&yx(t.then)&&yx(t.catch)}function B4(t){return t&&typeof t=="object"}function yx(t){return typeof t=="function"}function wx(t){return N4((r=>{try{return r.readFile().catch(n=>n)}catch(n){return n}})(t))}var bx=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function _x(t,e){if(wx(e))for(let r of bx)t[`_${r}`]=e[r].bind(e);else for(let r of bx)t[`_${r}`]=jm(e[r].bind(e));wx(e)?e.rm?t._rm=e.rm.bind(e):e.rmdir.length>1?t._rm=e.rmdir.bind(e):t._rm=sg.bind(null,t):e.rm?t._rm=jm(e.rm.bind(e)):e.rmdir.length>2?t._rm=jm(e.rmdir.bind(e)):t._rm=sg.bind(null,t)}var Q=class{constructor(e){if(typeof e._original_unwrapped_fs!="undefined")return e;let r=Object.getOwnPropertyDescriptor(e,"promises");r&&r.enumerable?_x(this,e.promises):_x(this,e),this._original_unwrapped_fs=e}async exists(e,r={}){try{return await this._stat(e),!0}catch(n){if(n.code==="ENOENT"||n.code==="ENOTDIR"||(n.code||"").includes("ENS"))return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',n),n}}async read(e,r={}){try{let n=await this._readFile(e,r);if(r.autocrlf==="true")try{n=new TextDecoder("utf8",{fatal:!0}).decode(n),n=n.replace(/\r\n/g,` +`),n=new TextEncoder().encode(n)}catch(i){}return typeof n!="string"&&(n=Buffer.from(n)),n}catch(n){return null}}async write(e,r,n={}){try{await this._writeFile(e,r,n);return}catch(i){await this.mkdir(ao(e)),await this._writeFile(e,r,n)}}async mkdir(e,r=!1){try{await this._mkdir(e);return}catch(n){if(n===null||n.code==="EEXIST")return;if(r)throw n;if(n.code==="ENOENT"){let i=ao(e);if(i==="."||i==="/"||i===e)throw n;await this.mkdir(i),await this.mkdir(e,!0)}}}async rm(e){try{await this._unlink(e)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(e,r){try{r&&r.recursive?await this._rm(e,r):await this._rmdir(e)}catch(n){if(n.code!=="ENOENT")throw n}}async readdir(e){try{let r=await this._readdir(e);return r.sort(Lf),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(e){let r=await this._readdir(e);return(await Promise.all(r.map(async i=>{let a=e+"/"+i;return(await this._stat(a)).isDirectory()?this.readdirDeep(a):a}))).reduce((i,a)=>i.concat(a),[])}async lstat(e){try{return await this._lstat(e)}catch(r){if(r.code==="ENOENT"||(r.code||"").includes("ENS"))return null;throw r}}async readlink(e,r={encoding:"buffer"}){try{let n=await this._readlink(e,r);return Buffer.isBuffer(n)?n:Buffer.from(n)}catch(n){if(n.code==="ENOENT"||(n.code||"").includes("ENS"))return null;throw n}}async writelink(e,r){return this._symlink(r.toString("utf8"),e)}};function P(t,e){if(e===void 0)throw new dr(t)}async function If(t,e){return!t&&!e?!1:t&&!e||!t&&e?!0:!(await t.type()==="tree"&&await e.type()==="tree"||await t.type()===await e.type()&&await t.mode()===await e.mode()&&await t.oid()===await e.oid())}async function Ux({fs:t,dir:e,gitdir:r=$.join(e,".git"),commit:n="HEAD",cache:i={}}){try{P("fs",t),P("dir",e),P("gitdir",r);let a=new Q(t),s=[Pr({ref:n}),yo(),Ya()],o=[];await ct.acquire({fs:a,gitdir:r,cache:i},async function(c){o=c.unmergedPaths});let l=await ra({fs:a,cache:i,dir:e,gitdir:r,trees:s,map:async function(c,[u,f,d]){let h=!await If(f,d),p=o.includes(c),g=!await If(d,u);if(h||p)return u?{path:c,mode:await u.mode(),oid:await u.oid(),type:await u.type(),content:await u.content()}:void 0;if(g)return!1;throw new ac(c)}});await ct.acquire({fs:a,gitdir:r,cache:i},async function(c){for(let u of l)if(u!==!1){if(!u){await a.rmdir(`${e}/${u.path}`,{recursive:!0}),c.delete({filepath:u.path});continue}if(u.type==="blob"){let f=new TextDecoder().decode(u.content);await a.write(`${e}/${u.path}`,f,{mode:u.mode}),c.insert({filepath:u.path,oid:u.oid,stage:0})}}})}catch(a){throw a.caller="git.abortMerge",a}}var na=class{static async isIgnored({fs:e,dir:r,gitdir:n=$.join(r,".git"),filepath:i}){if(Cf(i)===".git")return!0;if(i===".")return!1;let a="",s=$.join(n,"info","exclude");await e.exists(s)&&(a=await e.read(s,"utf8"));let o=[{gitignore:$.join(r,".gitignore"),filepath:i}],l=i.split("/").filter(Boolean);for(let u=1;u{let u=await(await nt.get({fs:o,gitdir:r})).get("core.autocrlf");return og({dir:e,gitdir:r,fs:o,filepath:n,index:l,force:a,parallel:s,autocrlf:u})})}catch(o){throw o.caller="git.add",o}}async function og({dir:t,gitdir:e,fs:r,filepath:n,index:i,force:a,parallel:s,autocrlf:o}){n=Array.isArray(n)?n:[n];let l=n.map(async d=>{if(!a&&await na.isIgnored({fs:r,dir:t,gitdir:e,filepath:d}))return;let h=await r.lstat($.join(t,d));if(!h)throw new je(d);if(h.isDirectory()){let p=await r.readdir($.join(t,d));if(s){let g=p.map(v=>og({dir:t,gitdir:e,fs:r,filepath:[$.join(d,v)],index:i,force:a,parallel:s,autocrlf:o}));await Promise.all(g)}else for(let g of p)await og({dir:t,gitdir:e,fs:r,filepath:[$.join(d,g)],index:i,force:a,parallel:s,autocrlf:o})}else{let p=h.isSymbolicLink()?await r.readlink($.join(t,d)).then(zx):await r.read($.join(t,d),{autocrlf:o});if(p===null)throw new je(d);let g=await mr({fs:r,gitdir:e,type:"blob",object:p});i.insert({filepath:d,stats:h,oid:g})}}),c=await Promise.allSettled(l),u=c.filter(d=>d.status==="rejected").map(d=>d.reason);if(u.length>1)throw new tc(u);if(u.length===1)throw u[0];return c.filter(d=>d.status==="fulfilled"&&d.value).map(d=>d.value)}async function oc({fs:t,gitdir:e,path:r}){return(await nt.get({fs:t,gitdir:e})).get(r)}function Wx(t,...e){for(let r of e)if(r)for(let n of Object.keys(r)){let i=r[n];i!==void 0&&(t[n]=i)}return t}async function ia({fs:t,gitdir:e,author:r,commit:n}){let i=Math.floor(Date.now()/1e3),a={name:await oc({fs:t,gitdir:e,path:"user.name"}),email:await oc({fs:t,gitdir:e,path:"user.email"})||"",timestamp:i,timezoneOffset:new Date(i*1e3).getTimezoneOffset()},s=Wx({},a,n?n.author:void 0,r);if(s.name!==void 0)return s}async function ho({fs:t,gitdir:e,author:r,committer:n,commit:i}){let a=Math.floor(Date.now()/1e3),s={name:await oc({fs:t,gitdir:e,path:"user.name"}),email:await oc({fs:t,gitdir:e,path:"user.email"})||"",timestamp:a,timezoneOffset:new Date(a*1e3).getTimezoneOffset()},o=Wx({},s,i?i.committer:void 0,r,n);if(o.name!==void 0)return o}async function qx({fs:t,cache:e,gitdir:r,oid:n}){let{type:i,object:a}=await Ge({fs:t,cache:e,gitdir:r,oid:n});if(i==="tag")return n=Rr.from(a).parse().object,qx({fs:t,cache:e,gitdir:r,oid:n});if(i!=="commit")throw new tr(n,i,"commit");return{commit:pr.from(a),oid:n}}async function po({fs:t,cache:e,gitdir:r,oid:n}){let{commit:i,oid:a}=await qx({fs:t,cache:e,gitdir:r,oid:n});return{oid:a,commit:i.parse(),payload:i.withoutSignature()}}async function Nf({fs:t,cache:e,onSign:r,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h}){let p=!1;f||(f=await V.resolve({fs:t,gitdir:n,ref:"HEAD",depth:2}));let g,v;try{g=await V.resolve({fs:t,gitdir:n,ref:f}),v=await po({fs:t,gitdir:n,oid:g,cache:{}})}catch(E){p=!0}if(l&&p)throw new sc(f);let y=l?await ia({fs:t,gitdir:n,author:a,commit:v.commit}):await ia({fs:t,gitdir:n,author:a});if(!y)throw new zt("author");let b=l?await ho({fs:t,gitdir:n,author:y,committer:s,commit:v.commit}):await ho({fs:t,gitdir:n,author:y,committer:s});if(!b)throw new zt("committer");return ct.acquire({fs:t,gitdir:n,cache:e,allowUnmerged:!1},async function(E){let A=Fx(E.entries).get(".");if(h||(h=await Yx({fs:t,gitdir:n,inode:A,dryRun:c})),d?d=await Promise.all(d.map(x=>V.resolve({fs:t,gitdir:n,ref:x}))):l?d=v.commit.parent:d=g?[g]:[],!i)if(l)i=v.commit.message;else throw new dr("message");let k=pr.from({tree:h,parent:d,author:y,committer:b,message:i});o&&(k=await pr.sign(k,r,o));let w=await mr({fs:t,gitdir:n,type:"commit",object:k.toObject(),dryRun:c});return!u&&!c&&await V.writeRef({fs:t,gitdir:n,ref:f,value:w}),w})}async function Yx({fs:t,gitdir:e,inode:r,dryRun:n}){let i=r.children;for(let l of i)l.type==="tree"&&(l.metadata.mode="040000",l.metadata.oid=await Yx({fs:t,gitdir:e,inode:l,dryRun:n}));let a=i.map(l=>({mode:l.metadata.mode,path:l.basename,oid:l.metadata.oid,type:l.type})),s=hr.from(a);return await mr({fs:t,gitdir:e,type:"tree",object:s.toObject(),dryRun:n})}async function lc({fs:t,cache:e,gitdir:r,oid:n,filepath:i}){if(i.startsWith("/"))throw new ta("leading-slash");if(i.endsWith("/"))throw new ta("trailing-slash");let a=n,s=await fo({fs:t,cache:e,gitdir:r,oid:n}),o=s.tree;if(i==="")n=s.oid;else{let l=i.split("/");n=await Xx({fs:t,cache:e,gitdir:r,tree:o,pathArray:l,oid:a,filepath:i})}return n}async function Xx({fs:t,cache:e,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s}){let o=i.shift();for(let l of n)if(l.path===o){if(i.length===0)return l.oid;{let{type:c,object:u}=await Ge({fs:t,cache:e,gitdir:r,oid:l.oid});if(c!=="tree")throw new tr(a,c,"tree",s);return n=hr.from(u),Xx({fs:t,cache:e,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s})}}throw new je(`file or directory found at "${a}:${s}"`)}async function wo({fs:t,cache:e,gitdir:r,oid:n,filepath:i=void 0}){i!==void 0&&(n=await lc({fs:t,cache:e,gitdir:r,oid:n,filepath:i}));let{tree:a,oid:s}=await fo({fs:t,cache:e,gitdir:r,oid:n});return{oid:s,tree:a.entries()}}async function cc({fs:t,gitdir:e,tree:r}){let n=hr.from(r).toObject();return await mr({fs:t,gitdir:e,type:"tree",object:n,format:"content"})}async function z4({fs:t,cache:e,onSign:r,gitdir:n,ref:i,oid:a,note:s,force:o,author:l,committer:c,signingKey:u}){let f;try{f=await V.resolve({gitdir:n,fs:t,ref:i})}catch(y){if(!(y instanceof je))throw y}let h=(await wo({fs:t,cache:e,gitdir:n,oid:f||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;if(o)h=h.filter(y=>y.path!==a);else for(let y of h)if(y.path===a)throw new pn("note",a);typeof s=="string"&&(s=Buffer.from(s,"utf8"));let p=await mr({fs:t,gitdir:n,type:"blob",object:s,format:"content"});h.push({mode:"100644",path:a,oid:p,type:"blob"});let g=await cc({fs:t,gitdir:n,tree:h});return await Nf({fs:t,cache:e,onSign:r,gitdir:n,ref:i,tree:g,parent:f&&[f],message:`Note added by 'isomorphic-git addNote' +`,author:l,committer:c,signingKey:u})}async function Kx({fs:t,onSign:e,dir:r,gitdir:n=$.join(r,".git"),ref:i="refs/notes/commits",oid:a,note:s,force:o,author:l,committer:c,signingKey:u,cache:f={}}){try{P("fs",t),P("gitdir",n),P("oid",a),P("note",s),u&&P("onSign",e);let d=new Q(t),h=await ia({fs:d,gitdir:n,author:l});if(!h)throw new zt("author");let p=await ho({fs:d,gitdir:n,author:h,committer:c});if(!p)throw new zt("committer");return await z4({fs:new Q(d),cache:f,onSign:e,gitdir:n,ref:i,oid:a,note:s,force:o,author:h,committer:p,signingKey:u})}catch(d){throw d.caller="git.addNote",d}}async function Zx({fs:t,gitdir:e,remote:r,url:n,force:i}){if(r!==zn.clean(r))throw new mn(r,zn.clean(r));let a=await nt.get({fs:t,gitdir:e});if(!i&&(await a.getSubsections("remote")).includes(r)&&n!==await a.get(`remote.${r}.url`))throw new pn("remote",r);await a.set(`remote.${r}.url`,n),await a.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await nt.save({fs:t,gitdir:e,config:a})}async function Jx({fs:t,dir:e,gitdir:r=$.join(e,".git"),remote:n,url:i,force:a=!1}){try{return P("fs",t),P("gitdir",r),P("remote",n),P("url",i),await Zx({fs:new Q(t),gitdir:r,remote:n,url:i,force:a})}catch(s){throw s.caller="git.addRemote",s}}async function V4({fs:t,cache:e,onSign:r,gitdir:n,ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:c,force:u=!1}){if(i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`,!u&&await V.exists({fs:t,gitdir:n,ref:i}))throw new pn("tag",i);let f=await V.resolve({fs:t,gitdir:n,ref:l||"HEAD"}),{type:d}=await Ge({fs:t,cache:e,gitdir:n,oid:f}),h=Rr.from({object:f,type:d,tag:i.replace("refs/tags/",""),tagger:a,message:s,gpgsig:o});c&&(h=await Rr.sign(h,r,c));let p=await mr({fs:t,gitdir:n,type:"tag",object:h.toObject()});await V.writeRef({fs:t,gitdir:n,ref:i,value:p})}async function Qx({fs:t,onSign:e,dir:r,gitdir:n=$.join(r,".git"),ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:c,force:u=!1,cache:f={}}){try{P("fs",t),P("gitdir",n),P("ref",i),c&&P("onSign",e);let d=new Q(t),h=await ia({fs:d,gitdir:n,author:a});if(!h)throw new zt("tagger");return await V4({fs:d,cache:f,onSign:e,gitdir:n,ref:i,tagger:h,message:s,gpgsig:o,object:l,signingKey:c,force:u})}catch(d){throw d.caller="git.annotatedTag",d}}async function W4({fs:t,gitdir:e,ref:r,object:n,checkout:i=!1,force:a=!1}){if(r!==zn.clean(r))throw new mn(r,zn.clean(r));let s=`refs/heads/${r}`;if(!a&&await V.exists({fs:t,gitdir:e,ref:s}))throw new pn("branch",r,!1);let o;try{o=await V.resolve({fs:t,gitdir:e,ref:n||"HEAD"})}catch(l){}o&&await V.writeRef({fs:t,gitdir:e,ref:s,value:o}),i&&await V.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:s})}async function eS({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n,object:i,checkout:a=!1,force:s=!1}){try{return P("fs",t),P("gitdir",r),P("ref",n),await W4({fs:new Q(t),gitdir:r,ref:n,object:i,checkout:a,force:s})}catch(o){throw o.caller="git.branch",o}}var tS=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);async function fg({fs:t,cache:e,onProgress:r,onPostCheckout:n,dir:i,gitdir:a,remote:s,ref:o,filepaths:l,noCheckout:c,noUpdateHead:u,dryRun:f,force:d,track:h=!0,nonBlocking:p=!1,batchSize:g=100}){let v;if(n)try{v=await V.resolve({fs:t,gitdir:a,ref:"HEAD"})}catch(b){v="0000000000000000000000000000000000000000"}let y;try{y=await V.resolve({fs:t,gitdir:a,ref:o})}catch(b){if(o==="HEAD")throw b;let E=`${s}/${o}`;if(y=await V.resolve({fs:t,gitdir:a,ref:E}),h){let S=await nt.get({fs:t,gitdir:a});await S.set(`branch.${o}.remote`,s),await S.set(`branch.${o}.merge`,`refs/heads/${o}`),await nt.save({fs:t,gitdir:a,config:S})}await V.writeRef({fs:t,gitdir:a,ref:`refs/heads/${o}`,value:y})}if(!c){let b;try{b=await q4({fs:t,cache:e,onProgress:r,dir:i,gitdir:a,ref:o,force:d,filepaths:l})}catch(w){throw w instanceof je&&w.data.what===y?new Kl(o,y):w}let E=b.filter(([w])=>w==="conflict").map(([w,x])=>x);if(E.length>0)throw new Xl(E);let S=b.filter(([w])=>w==="error").map(([w,x])=>x);if(S.length>0)throw new pe(S.join(", "));if(f){n&&await n({previousHead:v,newHead:y,type:l!=null&&l.length>0?"file":"branch"});return}let A=0,k=b.length;if(await ct.acquire({fs:t,gitdir:a,cache:e},async function(w){await Promise.all(b.filter(([x])=>x==="delete"||x==="delete-index").map(async function([x,_]){let T=`${i}/${_}`;x==="delete"&&await t.rm(T),w.delete({filepath:_}),r&&await r({phase:"Updating workdir",loaded:++A,total:k})}))}),await ct.acquire({fs:t,gitdir:a,cache:e},async function(w){for(let[x,_]of b)if(x==="rmdir"||x==="rmdir-index"){let T=`${i}/${_}`;try{x==="rmdir"&&await t.rmdir(T),w.delete({filepath:_}),r&&await r({phase:"Updating workdir",loaded:++A,total:k})}catch(C){if(C.code==="ENOTEMPTY")console.log(`Did not delete ${_} because directory is not empty`);else throw C}}}),await Promise.all(b.filter(([w])=>w==="mkdir"||w==="mkdir-index").map(async function([w,x]){let _=`${i}/${x}`;await t.mkdir(_),r&&await r({phase:"Updating workdir",loaded:++A,total:k})})),p){let w=b.filter(([_])=>_==="create"||_==="create-index"||_==="update"||_==="mkdir-index"),x=await xx("Update Working Dir",w.map(([_,T,C,I,L])=>()=>X4({fs:t,cache:e,gitdir:a,dir:i},[_,T,C,I,L])),r,g);await ct.acquire({fs:t,gitdir:a,cache:e,allowUnmerged:!0},async function(_){await xx("Update Index",x.map(([T,C,I])=>()=>Y4({index:_,fullpath:T,oid:C,stats:I})),r,g)})}else await ct.acquire({fs:t,gitdir:a,cache:e,allowUnmerged:!0},async function(w){await Promise.all(b.filter(([x])=>x==="create"||x==="create-index"||x==="update"||x==="mkdir-index").map(async function([x,_,T,C,I]){let L=`${i}/${_}`;try{if(x!=="create-index"&&x!=="mkdir-index"){let{object:J}=await Ge({fs:t,cache:e,gitdir:a,oid:T});if(I&&await t.rm(L),C===33188)await t.write(L,J);else if(C===33261)await t.write(L,J,{mode:511});else if(C===40960)await t.writelink(L,J);else throw new pe(`Invalid mode 0o${C.toString(8)} detected in blob ${T}`)}let F=await t.lstat(L);C===33261&&(F.mode=493),x==="mkdir-index"&&(F.mode=57344),w.insert({filepath:_,stats:F,oid:T}),r&&await r({phase:"Updating workdir",loaded:++A,total:k})}catch(F){console.log(F)}}))});n&&await n({previousHead:v,newHead:y,type:l!=null&&l.length>0?"file":"branch"})}if(!u){let b=await V.expand({fs:t,gitdir:a,ref:o});b.startsWith("refs/heads")?await V.writeSymbolicRef({fs:t,gitdir:a,ref:"HEAD",value:b}):await V.writeRef({fs:t,gitdir:a,ref:"HEAD",value:y})}}async function q4({fs:t,cache:e,onProgress:r,dir:n,gitdir:i,ref:a,force:s,filepaths:o}){let l=0;return ra({fs:t,cache:e,dir:n,gitdir:i,trees:[Pr({ref:a}),yo(),Ya()],map:async function(c,[u,f,d]){if(c===".")return;if(o&&!o.some(p=>tS(c,p)))return null;switch(r&&await r({phase:"Analyzing workdir",loaded:++l}),[!!d,!!u,!!f].map(Number).join("")){case"000":return;case"001":return s&&o&&o.includes(c)?["delete",c]:void 0;case"010":switch(await u.type()){case"tree":return["mkdir",c];case"blob":return["create",c,await u.oid(),await u.mode()];case"commit":return["mkdir-index",c,await u.oid(),await u.mode()];default:return["error",`new entry Unhandled type ${await u.type()}`]}case"011":switch(`${await u.type()}-${await f.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",c];case"blob-blob":return await u.oid()!==await f.oid()?s?["update",c,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",c]:await u.mode()!==await f.mode()?s?["update",c,await u.oid(),await u.mode(),!0]:["conflict",c]:["create-index",c,await u.oid(),await u.mode()];case"commit-tree":return;case"commit-blob":return["conflict",c];default:return["error",`new entry Unhandled type ${u.type}`]}case"100":return["delete-index",c];case"101":switch(await d.type()){case"tree":return["rmdir-index",c];case"blob":return await d.oid()!==await f.oid()?s?["delete",c]:["conflict",c]:["delete",c];case"commit":return["rmdir-index",c];default:return["error",`delete entry Unhandled type ${await d.type()}`]}case"110":case"111":switch(`${await d.type()}-${await u.type()}`){case"tree-tree":return;case"blob-blob":{if(await d.oid()===await u.oid()&&await d.mode()===await u.mode()&&!s)return;if(f){if(await f.oid()!==await d.oid()&&await f.oid()!==await u.oid())return s?["update",c,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",c]}else if(s)return["update",c,await u.oid(),await u.mode(),await u.mode()!==await d.mode()];return await u.mode()!==await d.mode()?["update",c,await u.oid(),await u.mode(),!0]:await u.oid()!==await d.oid()?["update",c,await u.oid(),await u.mode(),!1]:void 0}case"tree-blob":return["update-dir-to-blob",c,await u.oid()];case"blob-tree":return["update-blob-to-tree",c];case"commit-commit":return["mkdir-index",c,await u.oid(),await u.mode()];default:return["error",`update entry Unhandled type ${await d.type()}-${await u.type()}`]}}},reduce:async function(c,u){return u=Hx(u),c?c&&c[0]==="rmdir"?(u.push(c),u):(u.unshift(c),u):u}})}async function Y4({index:t,fullpath:e,stats:r,oid:n}){try{t.insert({filepath:e,stats:r,oid:n})}catch(i){console.warn(`Error inserting ${e} into index:`,i)}}async function X4({fs:t,cache:e,gitdir:r,dir:n},[i,a,s,o,l]){let c=`${n}/${a}`;if(i!=="create-index"&&i!=="mkdir-index"){let{object:f}=await Ge({fs:t,cache:e,gitdir:r,oid:s});if(l&&await t.rm(c),o===33188)await t.write(c,f);else if(o===33261)await t.write(c,f,{mode:511});else if(o===40960)await t.writelink(c,f);else throw new pe(`Invalid mode 0o${o.toString(8)} detected in blob ${s}`)}let u=await t.lstat(c);return o===33261&&(u.mode=493),i==="mkdir-index"&&(u.mode=57344),[a,s,u]}async function xx(t,e,r,n){let i=[];try{for(let a=0;al());(await Promise.allSettled(s)).forEach(l=>{l.status==="fulfilled"&&i.push(l.value)}),r&&await r({phase:"Updating workdir",loaded:a+s.length,total:e.length})}return i}catch(a){console.error(`Error during ${t}: ${a}`)}return i}async function dg({fs:t,onProgress:e,onPostCheckout:r,dir:n,gitdir:i=$.join(n,".git"),remote:a="origin",ref:s,filepaths:o,noCheckout:l=!1,noUpdateHead:c=s===void 0,dryRun:u=!1,force:f=!1,track:d=!0,cache:h={},nonBlocking:p=!1,batchSize:g=100}){try{P("fs",t),P("dir",n),P("gitdir",i);let v=s||"HEAD";return await fg({fs:new Q(t),cache:h,onProgress:e,onPostCheckout:r,dir:n,gitdir:i,remote:a,ref:v,filepaths:o,noCheckout:l,noUpdateHead:c,dryRun:u,force:f,track:d,nonBlocking:p,batchSize:g})}catch(v){throw v.caller="git.checkout",v}}var K4=new RegExp("^refs/(heads/|tags/|remotes/)?(.*)");function za(t){let e=K4.exec(t);return e?e[1]==="remotes/"&&t.endsWith("/HEAD")?e[2].slice(0,-5):e[2]:t}async function sa({fs:t,gitdir:e,fullname:r=!1,test:n=!1}){let i=await V.resolve({fs:t,gitdir:e,ref:"HEAD",depth:2});if(n)try{await V.resolve({fs:t,gitdir:e,ref:i})}catch(a){return}if(i.startsWith("refs/"))return r?i:za(i)}function Z4(t){return t=t.replace(/^git@([^:]+):/,"https://$1/"),t=t.replace(/^ssh:\/\//,"https://"),t}function rS({username:t="",password:e=""}){return`Basic ${Buffer.from(`${t}:${e}`).toString("base64")}`}async function uc(t,e){let r=jx(t);for(;;){let{value:n,done:i}=await r.next();if(n&&await e(n),i)break}r.return&&r.return()}async function $f(t){let e=0,r=[];await uc(t,a=>{r.push(a),e+=a.byteLength});let n=new Uint8Array(e),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}function Sx(t){let e=t.match(/^https?:\/\/([^/]+)@/);if(e==null)return{url:t,auth:{}};e=e[1];let[r,n]=e.split(":");return t=t.replace(`${e}@`,""),{url:t,auth:{username:r,password:n}}}function lg(t,e){let r=e.toString(16);return"0".repeat(t-r.length)+r}var Qe=class{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(e){typeof e=="string"&&(e=Buffer.from(e));let r=e.length+4,n=lg(4,r);return Buffer.concat([Buffer.from(n,"utf8"),e])}static streamReader(e){let r=new Mf(e);return async function(){try{let i=await r.read(4);if(i==null)return!0;if(i=parseInt(i.toString("utf8"),16),i===0||i===1)return null;let a=await r.read(i-4);return a==null?!0:a}catch(i){return e.error=i,!0}}}};async function Ex(t){let e={},r;for(;r=await t(),r!==!0;){if(r===null)continue;r=r.toString("utf8").replace(/\n$/,"");let n=r.indexOf("=");if(n>-1){let i=r.slice(0,n),a=r.slice(n+1);e[i]=a}else e[r]=!0}return{protocolVersion:2,capabilities2:e}}async function Ax(t,{service:e}){let r=new Set,n=new Map,i=new Map,a=Qe.streamReader(t),s=await a();for(;s===null;)s=await a();if(s===!0)throw new Zl;if(s.includes("version 2"))return Ex(a);if(s.toString("utf8").replace(/\n$/,"")!==`# service=${e}`)throw new Va(`# service=${e}\\n`,s.toString("utf8"));let o=await a();for(;o===null;)o=await a();if(o===!0)return{capabilities:r,refs:n,symrefs:i};if(o=o.toString("utf8"),o.includes("version 2"))return Ex(a);let[l,c]=Wm(o,"\0","\\x00");if(c.split(" ").map(u=>r.add(u)),l!=="0000000000000000000000000000000000000000 capabilities^{}"){let[u,f]=Wm(l," "," ");for(n.set(f,u);;){let d=await a();if(d===!0)break;if(d!==null){let[h,p]=Wm(d.toString("utf8")," "," ");n.set(p,h)}}}for(let u of r)if(u.startsWith("symref=")){let f=u.match(/symref=([^:]+):(.*)/);f.length===3&&i.set(f[1],f[2])}return{protocolVersion:1,capabilities:r,refs:n,symrefs:i}}function Wm(t,e,r){let n=t.trim().split(e);if(n.length!==2)throw new Va(`Two strings separated by '${r}'`,t.toString("utf8"));return n}var kx=(t,e)=>t.endsWith("?")?`${t}${e}`:`${t}/${e.replace(/^https?:\/\//,"")}`,Tx=(t,e)=>{(e.username||e.password)&&(t.Authorization=rS(e)),e.headers&&Object.assign(t,e.headers)},qm=async t=>{try{let e=Buffer.from(await $f(t.body)),r=e.toString("utf8");return{preview:r.length<256?r:r.slice(0,256)+"...",response:r,data:e}}catch(e){return{}}},mo=class{static async capabilities(){return["discover","connect"]}static async discover({http:e,onProgress:r,onAuth:n,onAuthSuccess:i,onAuthFailure:a,corsProxy:s,service:o,url:l,headers:c,protocolVersion:u}){let{url:f,auth:d}=Sx(l),h=s?kx(s,f):f;(d.username||d.password)&&(c.Authorization=rS(d)),u===2&&(c["Git-Protocol"]="version=2");let p,g,v=!1;do if(p=await e.request({onProgress:r,method:"GET",url:`${h}/info/refs?service=${o}`,headers:c}),g=!1,p.statusCode===401||p.statusCode===203){let y=v?a:n;if(y){if(d=await y(f,{...d,headers:{...c}}),d&&d.cancel)throw new uo;d&&(Tx(c,d),v=!0,g=!0)}}else p.statusCode===200&&v&&i&&await i(f,d);while(g);if(p.statusCode!==200){let{response:y}=await qm(p);throw new so(p.statusCode,p.statusMessage,y)}if(p.headers["content-type"]===`application/x-${o}-advertisement`){let y=await Ax(p.body,{service:o});return y.auth=d,y}else{let{preview:y,response:b,data:E}=await qm(p);try{let S=await Ax([E],{service:o});return S.auth=d,S}catch(S){throw new rc(y,b)}}}static async connect({http:e,onProgress:r,corsProxy:n,service:i,url:a,auth:s,body:o,headers:l}){let c=Sx(a);c&&(a=c.url),n&&(a=kx(n,a)),l["content-type"]=`application/x-${i}-request`,l.accept=`application/x-${i}-result`,Tx(l,s);let u=await e.request({onProgress:r,method:"POST",url:`${a}/${i}`,body:o,headers:l});if(u.statusCode!==200){let{response:f}=qm(u);throw new so(u.statusCode,u.statusMessage,f)}return u}};function J4({url:t}){if(t.startsWith("git@"))return{transport:"ssh",address:t};let e=t.match(/(\w+)(:\/\/|::)(.*)/);if(e!==null){if(e[2]==="://")return{transport:e[1],address:e[0]};if(e[2]==="::")return{transport:e[1],address:e[3]}}}var go=class{static getRemoteHelperFor({url:e}){let r=new Map;r.set("http",mo),r.set("https",mo);let n=J4({url:e});if(!n)throw new ic(e);if(r.has(n.transport))return r.get(n.transport);throw new nc(e,n.transport,n.transport==="ssh"?Z4(e):void 0)}},Ga=null,Wa=class{static async read({fs:e,gitdir:r}){Ga===null&&(Ga=new zl);let n=$.join(r,"shallow"),i=new Set;return await Ga.acquire(n,async function(){let a=await e.read(n,{encoding:"utf8"});if(a===null||a.trim()==="")return i;a.trim().split(` +`).map(s=>i.add(s))}),i}static async write({fs:e,gitdir:r,oids:n}){Ga===null&&(Ga=new zl);let i=$.join(r,"shallow");if(n.size>0){let a=[...n].join(` `)+` -`;await la.acquire(i,async function(){await t.write(i,a,{encoding:"utf8"})})}else await la.acquire(i,async function(){await t.rm(i)})}};async function g6({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`;return e.exists(`${t}/${n}`)}async function v6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=await e.readdir($(r,"objects/pack"));a=a.filter(s=>s.endsWith(".idx"));for(let s of a){let o=`${r}/objects/pack/${s}`,l=await Ap({fs:e,cache:t,filename:o,getExternalRefDelta:i});if(l.error)throw new le(l.error);if(l.offsets.has(n))return!0}return!1}async function Qw({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=o=>Ye({fs:e,cache:t,gitdir:r,oid:o}),s=await g6({fs:e,gitdir:r,oid:n});return s||(s=await v6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a})),s}function y6(e){let i="5041434b"+"00000002"+"00000000";return e.slice(0,12).toString("hex")===i}function b2(e,t){let r=e.map(n=>n.split("=",1)[0]);return t.filter(n=>{let i=n.split("=",1)[0];return r.includes(i)})}var vu={name:"isomorphic-git",version:"1.27.1",agent:"git/isomorphic-git@1.27.1"},fs=class{constructor(){this._queue=[]}write(t){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:t})}else this._queue.push(t)}end(){if(this._ended=!0,this._waiting){let t=this._waiting;this._waiting=null,t({done:!0})}}destroy(t){this.error=t,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(t=>{this._waiting=t})}};function w6(e){let t=e.indexOf("\r"),r=e.indexOf(` -`);return t===-1&&r===-1?-1:t===-1?r+1:r===-1?t+1:r===t+1?r+1:Math.min(t,r)+1}function _2(e){let t=new fs,r="";return(async()=>(await bl(e,n=>{for(n=n.toString("utf8"),r+=n;;){let i=w6(r);if(i===-1)break;t.write(r.slice(0,i)),r=r.slice(i)}}),r.length>0&&t.write(r),t.end()))(),t}var uu=class{static demux(t){let r=We.streamReader(t),n=new fs,i=new fs,a=new fs,s=async function(){let o=await r();if(o===null)return s();if(o===!0){n.end(),a.end(),t.error?i.destroy(t.error):i.end();return}switch(o[0]){case 1:{i.write(o.slice(1));break}case 2:{a.write(o.slice(1));break}case 3:{let l=o.slice(1);a.write(l),n.end(),a.end(),i.destroy(new Error(l.toString("utf8")));return}default:n.write(o)}s()};return s(),{packetlines:n,packfile:i,progress:a}}};async function b6(e){let{packetlines:t,packfile:r,progress:n}=uu.demux(e),i=[],a=[],s=[],o=!1,l=!1;return new Promise((c,u)=>{bl(t,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&u(new _i(h)),i.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&u(new _i(h)),a.push(h)}else if(d.startsWith("ACK")){let[,h,p]=d.split(" ");s.push({oid:h,status:p}),p||(l=!0)}else d.startsWith("NAK")?(o=!0,l=!0):(l=!0,o=!0);l&&(e.error?u(e.error):c({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))}).finally(()=>{l||(e.error?u(e.error):c({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))})})}function _6({capabilities:e=[],wants:t=[],haves:r=[],shallows:n=[],depth:i=null,since:a=null,exclude:s=[]}){let o=[];t=[...new Set(t)];let l=` ${e.join(" ")}`;for(let c of t)o.push(We.encode(`want ${c}${l} -`)),l="";for(let c of n)o.push(We.encode(`shallow ${c} -`));i!==null&&o.push(We.encode(`deepen ${i} -`)),a!==null&&o.push(We.encode(`deepen-since ${Math.floor(a.valueOf()/1e3)} -`));for(let c of s)o.push(We.encode(`deepen-not ${c} -`));o.push(We.flush());for(let c of r)o.push(We.encode(`have ${c} -`));return o.push(We.encode(`done -`)),o}async function Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:l,ref:c,remoteRef:u,remote:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1}){let w=c||await ha({fs:e,gitdir:l,test:!0}),A=await qe.get({fs:e,gitdir:l}),S=f||w&&await A.get(`branch.${w}.remote`)||"origin",T=d||await A.get(`remote.${S}.url`);if(typeof T=="undefined")throw new er("remote OR url");let P=u||w&&await A.get(`branch.${w}.merge`)||c||"HEAD";h===void 0&&(h=await A.get("http.corsProxy"));let I=As.getRemoteHelperFor({url:T}),N=await I.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:h,service:"git-upload-pack",url:T,headers:E,protocolVersion:1}),L=N.auth,ee=N.refs;if(ee.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(p!==null&&!N.capabilities.has("shallow"))throw new wi("shallow","depth");if(m!==null&&!N.capabilities.has("deepen-since"))throw new wi("deepen-since","since");if(v.length>0&&!N.capabilities.has("deepen-not"))throw new wi("deepen-not","exclude");if(y===!0&&!N.capabilities.has("deepen-relative"))throw new wi("deepen-relative","relative");let{oid:fe,fullref:J}=W.resolveAgainstMap({ref:P,map:ee});for(let H of ee.keys())H===J||H==="HEAD"||H.startsWith("refs/heads/")||b&&H.startsWith("refs/tags/")||ee.delete(H);let Q=b2([...N.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${vu.agent}`]);y&&Q.push("deepen-relative");let Pe=x?[fe]:ee.values(),ge=x?[w]:await W.listRefs({fs:e,gitdir:l,filepath:"refs"}),z=[];for(let H of ge)try{H=await W.expand({fs:e,gitdir:l,ref:H});let Je=await W.resolve({fs:e,gitdir:l,ref:H});await Qw({fs:e,cache:t,gitdir:l,oid:Je})&&z.push(Je)}catch(Je){}z=[...new Set(z)];let Y=await da.read({fs:e,gitdir:l}),O=N.capabilities.has("shallow")?[...Y]:[],he=_6({capabilities:Q,wants:Pe,haves:z,shallows:O,depth:p,since:m,exclude:v}),ze=Buffer.from(await cu(he)),gt=await I.connect({http:r,onProgress:n,corsProxy:h,service:"git-upload-pack",url:T,auth:L,body:[ze],headers:E}),Re=await b6(gt.body);gt.headers&&(Re.headers=gt.headers);for(let H of Re.shallows)if(!Y.has(H))try{let{object:Je}=await Ye({fs:e,cache:t,gitdir:l,oid:H}),D=new rr(Je),q=await Promise.all(D.headers().parent.map(Ne=>Qw({fs:e,cache:t,gitdir:l,oid:Ne})));q.length===0||q.every(Ne=>Ne)||Y.add(H)}catch(Je){Y.add(H)}for(let H of Re.unshallows)Y.delete(H);if(await da.write({fs:e,gitdir:l,oids:Y}),x){let H=new Map([[J,fe]]),Je=new Map,D=10,q=J;for(;D--;){let bt=N.symrefs.get(q);if(bt===void 0)break;Je.set(q,bt),q=bt}let ve=ee.get(q);ve&&H.set(q,ve);let{pruned:Ne}=await W.updateRemoteRefs({fs:e,gitdir:l,remote:S,refs:H,symrefs:Je,tags:b,prune:_});_&&(Re.pruned=Ne)}else{let{pruned:H}=await W.updateRemoteRefs({fs:e,gitdir:l,remote:S,refs:ee,symrefs:N.symrefs,tags:b,prune:_,pruneTags:k});_&&(Re.pruned=H)}if(Re.HEAD=N.symrefs.get("HEAD"),Re.HEAD===void 0){let{oid:H}=W.resolveAgainstMap({ref:"HEAD",map:ee});for(let[Je,D]of ee.entries())if(Je!=="HEAD"&&D===H){Re.HEAD=Je;break}}let ct=J.startsWith("refs/tags")?"tag":"branch";if(Re.FETCH_HEAD={oid:fe,description:`${ct} '${ca(J)}' of ${T}`},n||i){let H=_2(Re.progress);bl(H,async Je=>{if(i&&await i(Je),n){let D=Je.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);D&&await n({phase:D[1].trim(),loaded:parseInt(D[2],10),total:parseInt(D[3],10)})}})}let rt=Buffer.from(await cu(Re.packfile));if(gt.body.error)throw gt.body.error;let Et=rt.slice(-20).toString("hex"),Ie={defaultBranch:Re.HEAD,fetchHead:Re.FETCH_HEAD.oid,fetchHeadDescription:Re.FETCH_HEAD.description};if(Re.headers&&(Ie.headers=Re.headers),_&&(Ie.pruned=Re.pruned),Et!==""&&!y6(rt)){Ie.packfile=`objects/pack/pack-${Et}.pack`;let H=$(l,Ie.packfile);await e.write(H,rt);let Je=q=>Ye({fs:e,cache:t,gitdir:l,oid:q}),D=await nl.fromPack({pack:rt,getExternalRefDelta:Je,onProgress:n});await e.write(H.replace(/\.pack$/,".idx"),await D.toBuffer())}return Ie}async function x2({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){if(await e.exists(n+"/config"))return;let a=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];a=a.map(s=>n+"/"+s);for(let s of a)await e.mkdir(s);await e.write(n+"/config",`[core] +`;await Ga.acquire(i,async function(){await e.write(i,a,{encoding:"utf8"})})}else await Ga.acquire(i,async function(){await e.rm(i)})}};async function Q4({fs:t,gitdir:e,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`;return t.exists(`${e}/${n}`)}async function eD({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:i}){let a=await t.readdir($.join(r,"objects/pack"));a=a.filter(s=>s.endsWith(".idx"));for(let s of a){let o=`${r}/objects/pack/${s}`,l=await ug({fs:t,cache:e,filename:o,getExternalRefDelta:i});if(l.error)throw new pe(l.error);if(l.offsets.has(n))return!0}return!1}async function Cx({fs:t,cache:e,gitdir:r,oid:n,format:i="content"}){let a=o=>Ge({fs:t,cache:e,gitdir:r,oid:o}),s=await Q4({fs:t,gitdir:r,oid:n});return s||(s=await eD({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:a})),s}function tD(t){let i="5041434b"+"00000002"+"00000000";return t.slice(0,12).toString("hex")===i}function nS(t,e){let r=t.map(n=>n.split("=",1)[0]);return e.filter(n=>{let i=n.split("=",1)[0];return r.includes(i)})}var Bf={name:"isomorphic-git",version:"1.32.2",agent:"git/isomorphic-git@1.32.2"},ro=class{constructor(){this._queue=[]}write(e){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:e})}else this._queue.push(e)}end(){if(this._ended=!0,this._waiting){let e=this._waiting;this._waiting=null,e({done:!0})}}destroy(e){this.error=e,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(e=>{this._waiting=e})}};function rD(t){let e=t.indexOf("\r"),r=t.indexOf(` +`);return e===-1&&r===-1?-1:e===-1?r+1:r===-1?e+1:r===e+1?r+1:Math.min(e,r)+1}function iS(t){let e=new ro,r="";return(async()=>(await uc(t,n=>{for(n=n.toString("utf8"),r+=n;;){let i=rD(r);if(i===-1)break;e.write(r.slice(0,i)),r=r.slice(i)}}),r.length>0&&e.write(r),e.end()))(),e}var Ff=class{static demux(e){let r=Qe.streamReader(e),n=new ro,i=new ro,a=new ro,s=async function(){let o=await r();if(o===null)return s();if(o===!0){n.end(),a.end(),e.error?i.destroy(e.error):i.end();return}switch(o[0]){case 1:{i.write(o.slice(1));break}case 2:{a.write(o.slice(1));break}case 3:{let l=o.slice(1);a.write(l),n.end(),a.end(),i.destroy(new Error(l.toString("utf8")));return}default:n.write(o)}s()};return s(),{packetlines:n,packfile:i,progress:a}}};async function nD(t){let{packetlines:e,packfile:r,progress:n}=Ff.demux(t),i=[],a=[],s=[],o=!1,l=!1;return new Promise((c,u)=>{uc(e,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&u(new Qi(h)),i.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&u(new Qi(h)),a.push(h)}else if(d.startsWith("ACK")){let[,h,p]=d.split(" ");s.push({oid:h,status:p}),p||(l=!0)}else d.startsWith("NAK")?(o=!0,l=!0):(l=!0,o=!0);l&&(t.error?u(t.error):c({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))}).finally(()=>{l||(t.error?u(t.error):c({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))})})}function iD({capabilities:t=[],wants:e=[],haves:r=[],shallows:n=[],depth:i=null,since:a=null,exclude:s=[]}){let o=[];e=[...new Set(e)];let l=` ${t.join(" ")}`;for(let c of e)o.push(Qe.encode(`want ${c}${l} +`)),l="";for(let c of n)o.push(Qe.encode(`shallow ${c} +`));i!==null&&o.push(Qe.encode(`deepen ${i} +`)),a!==null&&o.push(Qe.encode(`deepen-since ${Math.floor(a.valueOf()/1e3)} +`));for(let c of s)o.push(Qe.encode(`deepen-not ${c} +`));o.push(Qe.flush());for(let c of r)o.push(Qe.encode(`have ${c} +`));return o.push(Qe.encode(`done +`)),o}async function hg({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:l,ref:c,remoteRef:u,remote:f,url:d,corsProxy:h,depth:p=null,since:g=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:E=!1,headers:S={},prune:A=!1,pruneTags:k=!1}){let w=c||await sa({fs:t,gitdir:l,test:!0}),x=await nt.get({fs:t,gitdir:l}),_=f||w&&await x.get(`branch.${w}.remote`)||"origin",T=d||await x.get(`remote.${_}.url`);if(typeof T=="undefined")throw new dr("remote OR url");let C=u||w&&await x.get(`branch.${w}.merge`)||c||"HEAD";h===void 0&&(h=await x.get("http.corsProxy"));let I=go.getRemoteHelperFor({url:T}),L=await I.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:h,service:"git-upload-pack",url:T,headers:S,protocolVersion:1}),F=L.auth,J=L.refs;if(J.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(p!==null&&!L.capabilities.has("shallow"))throw new Ji("shallow","depth");if(g!==null&&!L.capabilities.has("deepen-since"))throw new Ji("deepen-since","since");if(v.length>0&&!L.capabilities.has("deepen-not"))throw new Ji("deepen-not","exclude");if(y===!0&&!L.capabilities.has("deepen-relative"))throw new Ji("deepen-relative","relative");let{oid:de,fullref:le}=V.resolveAgainstMap({ref:C,map:J});for(let U of J.keys())U===le||U==="HEAD"||U.startsWith("refs/heads/")||b&&U.startsWith("refs/tags/")||J.delete(U);let ce=nS([...L.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${Bf.agent}`]);y&&ce.push("deepen-relative");let Te=E?[de]:J.values(),ne=E?[w]:await V.listRefs({fs:t,gitdir:l,filepath:"refs"}),N=[];for(let U of ne)try{U=await V.expand({fs:t,gitdir:l,ref:U});let Je=await V.resolve({fs:t,gitdir:l,ref:U});await Cx({fs:t,cache:e,gitdir:l,oid:Je})&&N.push(Je)}catch(Je){}N=[...new Set(N)];let q=await Wa.read({fs:t,gitdir:l}),B=L.capabilities.has("shallow")?[...q]:[],Fe=iD({capabilities:ce,wants:Te,haves:N,shallows:B,depth:p,since:g,exclude:v}),lr=Buffer.from(await $f(Fe)),Ut=await I.connect({http:r,onProgress:n,corsProxy:h,service:"git-upload-pack",url:T,auth:F,body:[lr],headers:S}),X=await nD(Ut.body);Ut.headers&&(X.headers=Ut.headers);for(let U of X.shallows)if(!q.has(U))try{let{object:Je}=await Ge({fs:t,cache:e,gitdir:l,oid:U}),j=new pr(Je),Z=await Promise.all(j.headers().parent.map(qe=>Cx({fs:t,cache:e,gitdir:l,oid:qe})));Z.length===0||Z.every(qe=>qe)||q.add(U)}catch(Je){q.add(U)}for(let U of X.unshallows)q.delete(U);if(await Wa.write({fs:t,gitdir:l,oids:q}),E){let U=new Map([[le,de]]),Je=new Map,j=10,Z=le;for(;j--;){let Rt=L.symrefs.get(Z);if(Rt===void 0)break;Je.set(Z,Rt),Z=Rt}let Se=J.get(Z);Se&&U.set(Z,Se);let{pruned:qe}=await V.updateRemoteRefs({fs:t,gitdir:l,remote:_,refs:U,symrefs:Je,tags:b,prune:A});A&&(X.pruned=qe)}else{let{pruned:U}=await V.updateRemoteRefs({fs:t,gitdir:l,remote:_,refs:J,symrefs:L.symrefs,tags:b,prune:A,pruneTags:k});A&&(X.pruned=U)}if(X.HEAD=L.symrefs.get("HEAD"),X.HEAD===void 0){let{oid:U}=V.resolveAgainstMap({ref:"HEAD",map:J});for(let[Je,j]of J.entries())if(Je!=="HEAD"&&j===U){X.HEAD=Je;break}}let Oe=le.startsWith("refs/tags")?"tag":"branch";if(X.FETCH_HEAD={oid:de,description:`${Oe} '${za(le)}' of ${T}`},n||i){let U=iS(X.progress);uc(U,async Je=>{if(i&&await i(Je),n){let j=Je.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);j&&await n({phase:j[1].trim(),loaded:parseInt(j[2],10),total:parseInt(j[3],10)})}})}let De=Buffer.from(await $f(X.packfile));if(Ut.body.error)throw Ut.body.error;let Pt=De.slice(-20).toString("hex"),Le={defaultBranch:X.HEAD,fetchHead:X.FETCH_HEAD.oid,fetchHeadDescription:X.FETCH_HEAD.description};if(X.headers&&(Le.headers=X.headers),A&&(Le.pruned=X.pruned),Pt!==""&&!tD(De)){Le.packfile=`objects/pack/pack-${Pt}.pack`;let U=$.join(l,Le.packfile);await t.write(U,De);let Je=Z=>Ge({fs:t,cache:e,gitdir:l,oid:Z}),j=await ql.fromPack({pack:De,getExternalRefDelta:Je,onProgress:n});await t.write(U.replace(/\.pack$/,".idx"),await j.toBuffer())}return Le}async function aS({fs:t,bare:e=!1,dir:r,gitdir:n=e?r:$.join(r,".git"),defaultBranch:i="master"}){if(await t.exists(n+"/config"))return;let a=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];a=a.map(s=>n+"/"+s);for(let s of a)await t.mkdir(s);await t.write(n+"/config",`[core] repositoryformatversion = 0 filemode = false - bare = ${t} -`+(t?"":` logallrefupdates = true + bare = ${e} +`+(e?"":` logallrefupdates = true `)+` symlinks = false ignorecase = true -`),await e.write(n+"/HEAD",`ref: refs/heads/${i} -`)}async function x6({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPostCheckout:l,dir:c,gitdir:u,url:f,corsProxy:d,ref:h,remote:p,depth:m,since:v,exclude:y,relative:b,singleBranch:x,noCheckout:E,noTags:_,headers:k}){try{if(await x2({fs:e,gitdir:u}),await v2({fs:e,gitdir:u,remote:p,url:f,force:!1}),d){let S=await qe.get({fs:e,gitdir:u});await S.set("http.corsProxy",d),await qe.save({fs:e,gitdir:u,config:S})}let{defaultBranch:w,fetchHead:A}=await Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:u,ref:h,remote:p,corsProxy:d,depth:m,since:v,exclude:y,relative:b,singleBranch:x,headers:k,tags:!_});if(A===null)return;h=h||w,h=h.replace("refs/heads/",""),await Tp({fs:e,cache:t,onProgress:n,onPostCheckout:l,dir:c,gitdir:u,ref:h,remote:p,noCheckout:E})}catch(w){throw await e.rmdir(u,{recursive:!0,maxRetries:10}).catch(()=>{}),w}}async function S6({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:c=$(l,".git"),url:u,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:p=void 0,since:m=void 0,exclude:v=[],relative:y=!1,singleBranch:b=!1,noCheckout:x=!1,noTags:E=!1,headers:_={},cache:k={}}){try{return C("fs",e),C("http",t),C("gitdir",c),x||C("dir",l),C("url",u),await x6({fs:new X(e),cache:k,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:c,url:u,corsProxy:f,ref:d,remote:h,depth:p,since:m,exclude:v,relative:y,singleBranch:b,noCheckout:x,noTags:E,headers:_})}catch(w){throw w.caller="git.clone",w}}async function E6({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),message:i,author:a,committer:s,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h,cache:p={}}){try{C("fs",e),l||C("message",i),o&&C("onSign",t);let m=new X(e);return await gu({fs:m,cache:p,onSign:t,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:l,dryRun:c,noUpdateBranch:u,ref:f,parent:d,tree:h})}catch(m){throw m.caller="git.commit",m}}async function A6({fs:e,dir:t,gitdir:r=$(t,".git"),fullname:n=!1,test:i=!1}){try{return C("fs",e),C("gitdir",r),await ha({fs:new X(e),gitdir:r,fullname:n,test:i})}catch(a){throw a.caller="git.currentBranch",a}}async function k6({fs:e,gitdir:t,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await W.exists({fs:e,gitdir:t,ref:r}))throw new Le(r);let i=await W.expand({fs:e,gitdir:t,ref:r}),a=await ha({fs:e,gitdir:t,fullname:!0});if(i===a){let l=await W.resolve({fs:e,gitdir:t,ref:i});await W.writeRef({fs:e,gitdir:t,ref:"HEAD",value:l})}await W.deleteRef({fs:e,gitdir:t,ref:i});let s=ca(r),o=await qe.get({fs:e,gitdir:t});await o.deleteSection("branch",s),await qe.save({fs:e,gitdir:t,config:o})}async function T6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await k6({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteBranch",i}}async function C6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{C("fs",e),C("ref",n),await W.deleteRef({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteRef",i}}async function P6({fs:e,gitdir:t,remote:r}){let n=await qe.get({fs:e,gitdir:t});await n.deleteSection("remote",r),await qe.save({fs:e,gitdir:t,config:n})}async function R6({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("remote",n),await P6({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.deleteRemote",i}}async function M6({fs:e,gitdir:t,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await W.deleteRef({fs:e,gitdir:t,ref:r})}async function O6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await M6({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteTag",i}}async function I6({fs:e,gitdir:t,oid:r}){let n=r.slice(0,2);return(await e.readdir(`${t}/objects/${n}`)).map(a=>`${n}${a}`).filter(a=>a.startsWith(r))}async function F6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=[],s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let l=`${r}/objects/pack/${o}`,c=await Ap({fs:e,cache:t,filename:l,getExternalRefDelta:i});if(c.error)throw new le(c.error);for(let u of c.offsets.keys())u.startsWith(n)&&a.push(u)}return a}async function $6({fs:e,cache:t,gitdir:r,oid:n}){let i=o=>Ye({fs:e,cache:t,gitdir:r,oid:o}),a=await I6({fs:e,gitdir:r,oid:n}),s=await F6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i});for(let o of s)a.indexOf(o)===-1&&a.push(o);if(a.length===1)return a[0];throw a.length>1?new il("oids",n,a):new Le(`an object matching "${n}"`)}async function L6({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await $6({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.expandOid",a}}async function D6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("gitdir",r),C("ref",n),await W.expand({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.expandRef",i}}async function Pp({fs:e,cache:t,gitdir:r,oids:n}){let i={},a=n.length,s=n.map((o,l)=>({index:l,oid:o}));for(;s.length;){let o=new Set;for(let{oid:c,index:u}of s)i[c]||(i[c]=new Set),i[c].add(u),i[c].size===a&&o.add(c);if(o.size>0)return[...o];let l=new Map;for(let{oid:c,index:u}of s)try{let{object:f}=await Ye({fs:e,cache:t,gitdir:r,oid:c}),d=rr.from(f),{parent:h}=d.parseHeaders();for(let p of h)(!i[p]||!i[p].has(u))&&l.set(p+":"+u,{oid:p,index:u})}catch(f){}s=Array.from(l.values())}return[]}var up=/^.*(\r?\n|$)/gm;function N6({branches:e,contents:t}){let r=e[1],n=e[2],i=t[0],a=t[1],s=t[2],o=a.match(up),l=i.match(up),c=s.match(up),u=(0,n2.default)(o,l,c),f=7,d="",h=!0;for(let p of u)p.ok&&(d+=p.ok.join("")),p.conflict&&(h=!1,d+=`${"<".repeat(f)} ${r} +`),await t.write(n+"/HEAD",`ref: refs/heads/${i} +`)}async function aD({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPostCheckout:l,dir:c,gitdir:u,url:f,corsProxy:d,ref:h,remote:p,depth:g,since:v,exclude:y,relative:b,singleBranch:E,noCheckout:S,noTags:A,headers:k,nonBlocking:w,batchSize:x=100}){try{if(await aS({fs:t,gitdir:u}),await Zx({fs:t,gitdir:u,remote:p,url:f,force:!1}),d){let C=await nt.get({fs:t,gitdir:u});await C.set("http.corsProxy",d),await nt.save({fs:t,gitdir:u,config:C})}let{defaultBranch:_,fetchHead:T}=await hg({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:u,ref:h,remote:p,corsProxy:d,depth:g,since:v,exclude:y,relative:b,singleBranch:E,headers:k,tags:!A});if(T===null)return;h=h||_,h=h.replace("refs/heads/",""),await fg({fs:t,cache:e,onProgress:n,onPostCheckout:l,dir:c,gitdir:u,ref:h,remote:p,noCheckout:S,nonBlocking:w,batchSize:x})}catch(_){throw await t.rmdir(u,{recursive:!0,maxRetries:10}).catch(()=>{}),_}}async function sS({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:c=$.join(l,".git"),url:u,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:p=void 0,since:g=void 0,exclude:v=[],relative:y=!1,singleBranch:b=!1,noCheckout:E=!1,noTags:S=!1,headers:A={},cache:k={},nonBlocking:w=!1,batchSize:x=100}){try{return P("fs",t),P("http",e),P("gitdir",c),E||P("dir",l),P("url",u),await aD({fs:new Q(t),cache:k,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:c,url:u,corsProxy:f,ref:d,remote:h,depth:p,since:g,exclude:v,relative:y,singleBranch:b,noCheckout:E,noTags:S,headers:A,nonBlocking:w,batchSize:x})}catch(_){throw _.caller="git.clone",_}}async function oS({fs:t,onSign:e,dir:r,gitdir:n=$.join(r,".git"),message:i,author:a,committer:s,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h,cache:p={}}){try{P("fs",t),l||P("message",i),o&&P("onSign",e);let g=new Q(t);return await Nf({fs:g,cache:p,onSign:e,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:l,dryRun:c,noUpdateBranch:u,ref:f,parent:d,tree:h})}catch(g){throw g.caller="git.commit",g}}async function lS({fs:t,dir:e,gitdir:r=$.join(e,".git"),fullname:n=!1,test:i=!1}){try{return P("fs",t),P("gitdir",r),await sa({fs:new Q(t),gitdir:r,fullname:n,test:i})}catch(a){throw a.caller="git.currentBranch",a}}async function sD({fs:t,gitdir:e,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await V.exists({fs:t,gitdir:e,ref:r}))throw new je(r);let i=await V.expand({fs:t,gitdir:e,ref:r}),a=await sa({fs:t,gitdir:e,fullname:!0});if(i===a){let l=await V.resolve({fs:t,gitdir:e,ref:i});await V.writeRef({fs:t,gitdir:e,ref:"HEAD",value:l})}await V.deleteRef({fs:t,gitdir:e,ref:i});let s=za(r),o=await nt.get({fs:t,gitdir:e});await o.deleteSection("branch",s),await nt.save({fs:t,gitdir:e,config:o})}async function cS({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n}){try{return P("fs",t),P("ref",n),await sD({fs:new Q(t),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteBranch",i}}async function uS({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n}){try{P("fs",t),P("ref",n),await V.deleteRef({fs:new Q(t),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteRef",i}}async function oD({fs:t,gitdir:e,remote:r}){let n=await nt.get({fs:t,gitdir:e});await n.deleteSection("remote",r),await nt.save({fs:t,gitdir:e,config:n})}async function fS({fs:t,dir:e,gitdir:r=$.join(e,".git"),remote:n}){try{return P("fs",t),P("remote",n),await oD({fs:new Q(t),gitdir:r,remote:n})}catch(i){throw i.caller="git.deleteRemote",i}}async function lD({fs:t,gitdir:e,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await V.deleteRef({fs:t,gitdir:e,ref:r})}async function dS({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n}){try{return P("fs",t),P("ref",n),await lD({fs:new Q(t),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteTag",i}}async function cD({fs:t,gitdir:e,oid:r}){let n=r.slice(0,2);return(await t.readdir(`${e}/objects/${n}`)).map(a=>`${n}${a}`).filter(a=>a.startsWith(r))}async function uD({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:i}){let a=[],s=await t.readdir($.join(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let l=`${r}/objects/pack/${o}`,c=await ug({fs:t,cache:e,filename:l,getExternalRefDelta:i});if(c.error)throw new pe(c.error);for(let u of c.offsets.keys())u.startsWith(n)&&a.push(u)}return a}async function fD({fs:t,cache:e,gitdir:r,oid:n}){let i=o=>Ge({fs:t,cache:e,gitdir:r,oid:o}),a=await cD({fs:t,gitdir:r,oid:n}),s=await uD({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:i});for(let o of s)a.indexOf(o)===-1&&a.push(o);if(a.length===1)return a[0];throw a.length>1?new Yl("oids",n,a):new je(`an object matching "${n}"`)}async function hS({fs:t,dir:e,gitdir:r=$.join(e,".git"),oid:n,cache:i={}}){try{return P("fs",t),P("gitdir",r),P("oid",n),await fD({fs:new Q(t),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.expandOid",a}}async function pS({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n}){try{return P("fs",t),P("gitdir",r),P("ref",n),await V.expand({fs:new Q(t),gitdir:r,ref:n})}catch(i){throw i.caller="git.expandRef",i}}async function pg({fs:t,cache:e,gitdir:r,oids:n}){let i={},a=n.length,s=n.map((o,l)=>({index:l,oid:o}));for(;s.length;){let o=new Set;for(let{oid:c,index:u}of s)i[c]||(i[c]=new Set),i[c].add(u),i[c].size===a&&o.add(c);if(o.size>0)return[...o];let l=new Map;for(let{oid:c,index:u}of s)try{let{object:f}=await Ge({fs:t,cache:e,gitdir:r,oid:c}),d=pr.from(f),{parent:h}=d.parseHeaders();for(let p of h)(!i[p]||!i[p].has(u))&&l.set(p+":"+u,{oid:p,index:u})}catch(f){}s=Array.from(l.values())}return[]}var Ym=/^.*(\r?\n|$)/gm;function dD({branches:t,contents:e}){let r=t[1],n=t[2],i=e[0],a=e[1],s=e[2],o=a.match(Ym),l=i.match(Ym),c=s.match(Ym),u=q8(o,l,c),f=7,d="",h=!0;for(let p of u)p.ok&&(d+=p.ok.join("")),p.conflict&&(h=!1,d+=`${"<".repeat(f)} ${r} `,d+=p.conflict.a.join(""),d+=`${"=".repeat(f)} `,d+=p.conflict.b.join(""),d+=`${">".repeat(f)} ${n} -`);return{cleanMerge:h,mergedText:d}}async function B6({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),index:i,ourOid:a,baseOid:s,theirOid:o,ourName:l="ours",baseName:c="base",theirName:u="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let p=bi({ref:a}),m=bi({ref:s}),v=bi({ref:o}),y=[],b=[],x=[],E=[],_=await _s({fs:e,cache:t,dir:r,gitdir:n,trees:[p,m,v],map:async function(k,[w,A,S]){let T=ru(k),P=await ou(w,A),I=await ou(S,A);switch(`${P}-${I}`){case"false-false":return{mode:await A.mode(),path:T,oid:await A.oid(),type:await A.type()};case"false-true":return S?{mode:await S.mode(),path:T,oid:await S.oid(),type:await S.type()}:void 0;case"true-false":return w?{mode:await w.mode(),path:T,oid:await w.oid(),type:await w.type()}:void 0;case"true-true":{if(w&&A&&S&&await w.type()==="blob"&&await A.type()==="blob"&&await S.type()==="blob")return j6({fs:e,gitdir:n,path:T,ours:w,base:A,theirs:S,ourName:l,baseName:c,theirName:u,mergeDriver:h}).then(async N=>{if(N.cleanMerge)d||i.insert({filepath:k,oid:N.mergeResult.oid,stage:0});else if(y.push(k),b.push(k),!d){let L=await A.oid(),ee=await w.oid(),fe=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:L,stage:1}),i.insert({filepath:k,oid:ee,stage:2}),i.insert({filepath:k,oid:fe,stage:3})}return N.mergeResult});if(A&&!w&&S&&await A.type()==="blob"&&await S.type()==="blob"){if(y.push(k),x.push(k),!d){let N=await A.oid(),L=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:N,stage:1}),i.insert({filepath:k,oid:L,stage:3})}return{mode:await S.mode(),oid:await S.oid(),type:"blob",path:T}}if(A&&w&&!S&&await A.type()==="blob"&&await w.type()==="blob"){if(y.push(k),E.push(k),!d){let N=await A.oid(),L=await w.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:N,stage:1}),i.insert({filepath:k,oid:L,stage:2})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:T}}if(A&&!w&&!S&&await A.type()==="blob")return;throw new gs}}},reduce:y.length!==0&&(!r||d)?void 0:async(k,w)=>{let A=w.filter(Boolean);if(k&&!(k&&k.type==="tree"&&A.length===0)){if(A.length>0){let T=new tr(A).toObject(),P=await mr({fs:e,gitdir:n,type:"tree",object:T,dryRun:f});k.oid=P}return k}}});return y.length!==0?(r&&!d&&await _s({fs:e,cache:t,dir:r,gitdir:n,trees:[bi({ref:_.oid})],map:async function(k,[w]){let A=`${r}/${k}`;if(await w.type()==="blob"){let S=await w.mode(),T=new TextDecoder().decode(await w.content());await e.write(A,T,{mode:S})}return!0}}),new vs(y,b,x,E)):_.oid}async function j6({fs:e,gitdir:t,path:r,ours:n,base:i,theirs:a,ourName:s,theirName:o,baseName:l,dryRun:c,mergeDriver:u=N6}){let f="blob",d=await i.mode()===await n.mode()?await a.mode():await n.mode();if(await n.oid()===await a.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};if(await n.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await a.oid(),type:f}};if(await a.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};let h=Buffer.from(await n.content()).toString("utf8"),p=Buffer.from(await i.content()).toString("utf8"),m=Buffer.from(await a.content()).toString("utf8"),{mergedText:v,cleanMerge:y}=await u({branches:[l,s,o],contents:[p,h,m],path:r}),b=await mr({fs:e,gitdir:t,type:"blob",object:Buffer.from(v,"utf8"),dryRun:c});return{cleanMerge:y,mergeResult:{mode:d,path:r,oid:b,type:f}}}async function S2({fs:e,cache:t,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,onSign:m,mergeDriver:v}){i===void 0&&(i=await ha({fs:e,gitdir:n,fullname:!0})),i=await W.expand({fs:e,gitdir:n,ref:i}),a=await W.expand({fs:e,gitdir:n,ref:a});let y=await W.resolve({fs:e,gitdir:n,ref:i}),b=await W.resolve({fs:e,gitdir:n,ref:a}),x=await Pp({fs:e,cache:t,gitdir:n,oids:[y,b]});if(x.length!==1)throw new gs;let E=x[0];if(E===b)return{oid:y,alreadyMerged:!0};if(s&&E===y)return!l&&!c&&await W.writeRef({fs:e,gitdir:n,ref:i,value:b}),{oid:b,fastForward:!0};{if(o)throw new ll;let _=await yt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async w=>B6({fs:e,cache:t,dir:r,gitdir:n,index:w,ourOid:y,theirOid:b,baseOid:E,ourName:ca(i),baseName:"base",theirName:ca(a),dryRun:l,abortOnConflict:u,mergeDriver:v}));if(_ instanceof vs)throw _;return f||(f=`Merge branch '${ca(a)}' into ${ca(i)}`),{oid:await gu({fs:e,cache:t,gitdir:n,message:f,ref:i,tree:_,parent:[y,b],author:d,committer:h,signingKey:p,onSign:m,dryRun:l,noUpdateBranch:c}),tree:_,mergeCommit:!0}}}async function E2({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,dir:l,gitdir:c,ref:u,url:f,remote:d,remoteRef:h,prune:p,pruneTags:m,fastForward:v,fastForwardOnly:y,corsProxy:b,singleBranch:x,headers:E,author:_,committer:k,signingKey:w}){try{if(!u){let T=await ha({fs:e,gitdir:c});if(!T)throw new er("ref");u=T}let{fetchHead:A,fetchHeadDescription:S}=await Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:c,corsProxy:b,ref:u,url:f,remote:d,remoteRef:h,singleBranch:x,headers:E,prune:p,pruneTags:m});await S2({fs:e,cache:t,gitdir:c,ours:u,theirs:A,fastForward:v,fastForwardOnly:y,message:`Merge ${S}`,author:_,committer:k,signingKey:w,dryRun:!1,noUpdateBranch:!1}),await Tp({fs:e,cache:t,onProgress:n,dir:l,gitdir:c,ref:u,remote:d,noCheckout:!1})}catch(A){throw A.caller="git.pull",A}}async function H6({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$(o,".git"),ref:c,url:u,remote:f,remoteRef:d,corsProxy:h,singleBranch:p,headers:m={},cache:v={}}){try{C("fs",e),C("http",t),C("gitdir",l);let y={name:"",email:"",timestamp:Date.now(),timezoneOffset:0};return await E2({fs:new X(e),cache:v,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l,ref:c,url:u,remote:f,remoteRef:d,fastForwardOnly:!0,corsProxy:h,singleBranch:p,headers:m,author:y,committer:y})}catch(y){throw y.caller="git.fastForward",y}}async function U6({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$(o,".git"),ref:c,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1,cache:w={}}){try{return C("fs",e),C("http",t),C("gitdir",l),await Cp({fs:new X(e),cache:w,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,gitdir:l,ref:c,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p,since:m,exclude:v,relative:y,tags:b,singleBranch:x,headers:E,prune:_,pruneTags:k})}catch(A){throw A.caller="git.fetch",A}}async function G6({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oids",n),await Pp({fs:new X(e),cache:i,gitdir:r,oids:n})}catch(a){throw a.caller="git.findMergeBase",a}}async function A2({fs:e,filepath:t}){if(await e.exists($(t,".git")))return t;{let r=ps(t);if(r===t)throw new Le(`git root for ${t}`);return A2({fs:e,filepath:r})}}async function z6({fs:e,filepath:t}){try{return C("fs",e),C("filepath",t),await A2({fs:new X(e),filepath:t})}catch(r){throw r.caller="git.findRoot",r}}async function V6({fs:e,dir:t,gitdir:r=$(t,".git"),path:n}){try{return C("fs",e),C("gitdir",r),C("path",n),await vl({fs:new X(e),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfig",i}}async function W6({fs:e,gitdir:t,path:r}){return(await qe.get({fs:e,gitdir:t})).getall(r)}async function q6({fs:e,dir:t,gitdir:r=$(t,".git"),path:n}){try{return C("fs",e),C("gitdir",r),C("path",n),await W6({fs:new X(e),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfigAll",i}}async function Y6({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1}){try{C("http",e),C("url",a);let c=await As.getRemoteHelperFor({url:a}).discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:1}),u={capabilities:[...c.capabilities]};for(let[f,d]of c.refs){let h=f.split("/"),p=h.pop(),m=u;for(let v of h)m[v]=m[v]||{},m=m[v];m[p]=d}for(let[f,d]of c.symrefs){let h=f.split("/"),p=h.pop(),m=u;for(let v of h)m[v]=m[v]||{},m=m[v];m[p]=d}return u}catch(l){throw l.caller="git.getRemoteInfo",l}}function k2(e,t,r,n){let i=[];for(let[a,s]of e.refs){if(t&&!a.startsWith(t))continue;if(a.endsWith("^{}")){if(n){let l=a.replace("^{}",""),c=i[i.length-1],u=c.ref===l?c:i.find(f=>f.ref===l);if(u===void 0)throw new Error("I did not expect this to happen");u.peeled=s}continue}let o={ref:a,oid:s};r&&e.symrefs.has(a)&&(o.target=e.symrefs.get(a)),i.push(o)}return i}async function X6({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2}){try{C("http",e),C("url",a);let u=await As.getRemoteHelperFor({url:a}).discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(u.protocolVersion===2)return{protocolVersion:u.protocolVersion,capabilities:u.capabilities2};let f={};for(let d of u.capabilities){let[h,p]=d.split("=");p?f[h]=p:f[h]=!0}return{protocolVersion:1,capabilities:f,refs:k2(u,void 0,!0,!0)}}catch(c){throw c.caller="git.getRemoteInfo2",c}}async function Z6({type:e,object:t,format:r="content",oid:n=void 0}){return r!=="deflated"&&(r!=="wrapped"&&(t=xi.wrap({type:e,object:t})),n=await Vn(t)),{oid:n,object:t}}async function K6({object:e}){try{C("object",e),typeof e=="string"?e=Buffer.from(e,"utf8"):e=Buffer.from(e);let t="blob",{oid:r,object:n}=await Z6({type:"blob",format:"content",object:e});return{oid:r,type:t,object:new Uint8Array(n),format:"wrapped"}}catch(t){throw t.caller="git.hashBlob",t}}async function J6({fs:e,cache:t,onProgress:r,dir:n,gitdir:i,filepath:a}){try{a=$(n,a);let s=await e.read(a),o=c=>Ye({fs:e,cache:t,gitdir:i,oid:c}),l=await nl.fromPack({pack:s,getExternalRefDelta:o,onProgress:r});return await e.write(a.replace(/\.pack$/,".idx"),await l.toBuffer()),{oids:[...l.hashes]}}catch(s){throw s.caller="git.indexPack",s}}async function Q6({fs:e,onProgress:t,dir:r,gitdir:n=$(r,".git"),filepath:i,cache:a={}}){try{return C("fs",e),C("dir",r),C("gitdir",r),C("filepath",i),await J6({fs:new X(e),cache:a,onProgress:t,dir:r,gitdir:n,filepath:i})}catch(s){throw s.caller="git.indexPack",s}}async function eI({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){try{return C("fs",e),C("gitdir",n),t||C("dir",r),await x2({fs:new X(e),bare:t,dir:r,gitdir:n,defaultBranch:i})}catch(a){throw a.caller="git.init",a}}async function T2({fs:e,cache:t,gitdir:r,oid:n,ancestor:i,depth:a}){let s=await da.read({fs:e,gitdir:r});if(!n)throw new er("oid");if(!i)throw new er("ancestor");if(n===i)return!1;let o=[n],l=new Set,c=0;for(;o.length;){if(c++===a)throw new ul(a);let u=o.shift(),{type:f,object:d}=await Ye({fs:e,cache:t,gitdir:r,oid:u});if(f!=="commit")throw new zt(u,f,"commit");let h=rr.from(d).parse();for(let p of h.parent)if(p===i)return!0;if(!s.has(u))for(let p of h.parent)l.has(p)||(o.push(p),l.add(p))}return!1}async function tI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,ancestor:i,depth:a=-1,cache:s={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),C("ancestor",i),await T2({fs:new X(e),cache:s,gitdir:r,oid:n,ancestor:i,depth:a})}catch(o){throw o.caller="git.isDescendent",o}}async function rI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n}){try{return C("fs",e),C("dir",t),C("gitdir",r),C("filepath",n),xs.isIgnored({fs:new X(e),dir:t,gitdir:r,filepath:n})}catch(i){throw i.caller="git.isIgnored",i}}async function nI({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("gitdir",r),W.listBranches({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.listBranches",i}}async function iI({fs:e,gitdir:t,ref:r,cache:n}){if(r){let i=await W.resolve({gitdir:t,fs:e,ref:r}),a=[];return await C2({fs:e,cache:n,gitdir:t,oid:i,filenames:a,prefix:""}),a}else return yt.acquire({fs:e,gitdir:t,cache:n},async function(i){return i.entries.map(a=>a.path)})}async function C2({fs:e,cache:t,gitdir:r,oid:n,filenames:i,prefix:a}){let{tree:s}=await ks({fs:e,cache:t,gitdir:r,oid:n});for(let o of s)o.type==="tree"?await C2({fs:e,cache:t,gitdir:r,oid:o.oid,filenames:i,prefix:$(a,o.path)}):i.push($(a,o.path))}async function aI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),await iI({fs:new X(e),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listFiles",a}}async function sI({fs:e,cache:t,gitdir:r,ref:n}){let i;try{i=await W.resolve({gitdir:r,fs:e,ref:n})}catch(o){if(o instanceof Le)return[]}return(await ks({fs:e,cache:t,gitdir:r,oid:i})).tree.map(o=>({target:o.path,note:o.oid}))}async function oI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",cache:i={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),await sI({fs:new X(e),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listNotes",a}}async function lI({fs:e,gitdir:t}){let r=await qe.get({fs:e,gitdir:t}),n=await r.getSubsections("remote");return Promise.all(n.map(async a=>{let s=await r.get(`remote.${a}.url`);return{remote:a,url:s}}))}async function cI({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),await lI({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listRemotes",n}}async function uI(e){let t=We.streamReader(e),r=[],n;for(;n=await t(),n!==!0;){if(n===null)continue;n=n.toString("utf8").replace(/\n$/,"");let[i,a,...s]=n.split(" "),o={ref:a,oid:i};for(let l of s){let[c,u]=l.split(":");c==="symref-target"?o.target=u:c==="peeled"&&(o.peeled=u)}r.push(o)}return r}async function fI({prefix:e,symrefs:t,peelTags:r}){let n=[];return n.push(We.encode(`command=ls-refs -`)),n.push(We.encode(`agent=${vu.agent} -`)),(r||t||e)&&n.push(We.delim()),r&&n.push(We.encode("peel")),t&&n.push(We.encode("symrefs")),e&&n.push(We.encode(`ref-prefix ${e}`)),n.push(We.flush()),n}async function dI({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2,prefix:c,symrefs:u,peelTags:f}){try{C("http",e),C("url",a);let d=await Es.discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(d.protocolVersion===1)return k2(d,c,u,f);let h=await fI({prefix:c,symrefs:u,peelTags:f}),p=await Es.connect({http:e,auth:d.auth,headers:s,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,body:h});return uI(p.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function hI({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),W.listTags({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listTags",n}}function pI(e,t){return e.committer.timestamp-t.committer.timestamp}var mI="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function e2({fs:e,cache:t,gitdir:r,oid:n,fileId:i}){if(i===mI)return;let a=n,s,o=await bs({fs:e,cache:t,gitdir:r,oid:n}),l=o.tree;return i===o.oid?s=o.path:(s=await P2({fs:e,cache:t,gitdir:r,tree:l,fileId:i,oid:a}),Array.isArray(s)&&(s.length===0?s=void 0:s.length===1&&(s=s[0]))),s}async function P2({fs:e,cache:t,gitdir:r,tree:n,fileId:i,oid:a,filepaths:s=[],parentPath:o=""}){let l=n.entries().map(function(c){let u;return c.oid===i?(u=$(o,c.path),s.push(u)):c.type==="tree"&&(u=Ye({fs:e,cache:t,gitdir:r,oid:c.oid}).then(function({object:f}){return P2({fs:e,cache:t,gitdir:r,tree:tr.from(f),fileId:i,oid:a,filepaths:s,parentPath:$(o,c.path)})})),u});return await Promise.all(l),s}async function gI({fs:e,cache:t,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l}){let c=typeof s=="undefined"?void 0:Math.floor(s.valueOf()/1e3),u=[],f=await da.read({fs:e,gitdir:r}),d=await W.resolve({fs:e,gitdir:r,ref:i}),h=[await lu({fs:e,cache:t,gitdir:r,oid:d})],p,m,v;function y(b){v&&n&&u.push(b)}for(;h.length>0;){let b=h.pop();if(c!==void 0&&b.commit.committer.timestamp<=c)break;if(n){let x;try{x=await wl({fs:e,cache:t,gitdir:r,oid:b.commit.tree,filepath:n}),m&&p!==x&&u.push(m),p=x,m=b,v=!0}catch(E){if(E instanceof Le){let _=l&&p;if(_&&(_=await e2({fs:e,cache:t,gitdir:r,oid:b.commit.tree,fileId:p}),_))if(Array.isArray(_)){if(m){let k=await e2({fs:e,cache:t,gitdir:r,oid:m.commit.tree,fileId:p});if(Array.isArray(k))if(_=_.filter(w=>k.indexOf(w)===-1),_.length===1)_=_[0],n=_,m&&u.push(m);else{_=!1,m&&u.push(m);break}}}else n=_,m&&u.push(m);if(!_){if(v&&p&&(u.push(m),!o))break;if(!o&&!l)throw E}m=b,v=!1}else throw E}}else u.push(b);if(a!==void 0&&u.length===a){y(b);break}if(!f.has(b.oid))for(let x of b.commit.parent){let E=await lu({fs:e,cache:t,gitdir:r,oid:x});h.map(_=>_.oid).includes(E.oid)||h.push(E)}h.length===0&&y(b),h.sort((x,E)=>pI(x.commit,E.commit))}return u}async function vI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i="HEAD",depth:a,since:s,force:o,follow:l,cache:c={}}){try{return C("fs",e),C("gitdir",r),C("ref",i),await gI({fs:new X(e),cache:c,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l})}catch(u){throw u.caller="git.log",u}}async function yI({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,cache:m={},mergeDriver:v}){try{C("fs",e),p&&C("onSign",t);let y=new X(e),b=await fa({fs:y,gitdir:n,author:d});if(!b&&(!o||!s))throw new Vt("author");let x=await Ss({fs:y,gitdir:n,author:b,committer:h});if(!x&&(!o||!s))throw new Vt("committer");return await S2({fs:y,cache:m,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s,fastForwardOnly:o,dryRun:l,noUpdateBranch:c,abortOnConflict:u,message:f,author:b,committer:x,signingKey:p,onSign:t,mergeDriver:v})}catch(y){throw y.caller="git.merge",y}}var wI={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function R2({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Ep.default,s=[];function o(u,f){let d=Buffer.from(u,f);s.push(d),a.update(d)}async function l({stype:u,object:f}){let d=wI[u],h=f.length,p=h>15?128:0,m=h&15;h=h>>>4;let v=(p|d|m).toString(16);for(o(v,"hex");p;)p=h>127?128:0,v=p|h&127,o(Sp(2,v),"hex"),h=h>>>7;o(Buffer.from(await d2(f)))}o("PACK"),o("00000002","hex"),o(Sp(8,i.length),"hex");for(let u of i){let{type:f,object:d}=await Ye({fs:e,cache:t,gitdir:n,oid:u});await l({write:o,object:d,stype:f})}let c=a.digest();return s.push(c),s}async function bI({fs:e,cache:t,gitdir:r,oids:n,write:i}){let a=await R2({fs:e,cache:t,gitdir:r,oids:n}),s=Buffer.from(await cu(a)),l=`pack-${s.slice(-20).toString("hex")}.pack`;return i?(await e.write($(r,`objects/pack/${l}`),s),{filename:l}):{filename:l,packfile:new Uint8Array(s)}}async function _I({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,write:i=!1,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oids",n),await bI({fs:new X(e),cache:a,gitdir:r,oids:n,write:i})}catch(s){throw s.caller="git.packObjects",s}}async function xI({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$(o,".git"),ref:c,url:u,remote:f,remoteRef:d,prune:h=!1,pruneTags:p=!1,fastForward:m=!0,fastForwardOnly:v=!1,corsProxy:y,singleBranch:b,headers:x={},author:E,committer:_,signingKey:k,cache:w={}}){try{C("fs",e),C("gitdir",l);let A=new X(e),S=await fa({fs:A,gitdir:l,author:E});if(!S)throw new Vt("author");let T=await Ss({fs:A,gitdir:l,author:S,committer:_});if(!T)throw new Vt("committer");return await E2({fs:A,cache:w,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l,ref:c,url:u,remote:f,remoteRef:d,fastForward:m,fastForwardOnly:v,corsProxy:y,singleBranch:b,headers:x,author:S,committer:T,signingKey:k,prune:h,pruneTags:p})}catch(A){throw A.caller="git.pull",A}}async function SI({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),start:i,finish:a}){let s=await da.read({fs:e,gitdir:n}),o=new Set,l=new Set;for(let f of i)o.add(await W.resolve({fs:e,gitdir:n,ref:f}));for(let f of a)try{let d=await W.resolve({fs:e,gitdir:n,ref:f});l.add(d)}catch(d){}let c=new Set;async function u(f){c.add(f);let{type:d,object:h}=await Ye({fs:e,cache:t,gitdir:n,oid:f});if(d==="tag"){let m=pr.from(h).headers().object;return u(m)}if(d!=="commit")throw new zt(f,d,"commit");if(!s.has(f)){let m=rr.from(h).headers().parent;for(f of m)!l.has(f)&&!c.has(f)&&await u(f)}}for(let f of o)await u(f);return c}async function fp({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Set;async function s(o){if(a.has(o))return;a.add(o);let{type:l,object:c}=await Ye({fs:e,cache:t,gitdir:n,oid:o});if(l==="tag"){let f=pr.from(c).headers().object;await s(f)}else if(l==="commit"){let f=rr.from(c).headers().tree;await s(f)}else if(l==="tree"){let u=tr.from(c);for(let f of u)f.type==="blob"&&a.add(f.oid),f.type==="tree"&&await s(f.oid)}}for(let o of i)await s(o);return a}async function EI(e){let t={},r="",n=We.streamReader(e),i=await n();for(;i!==!0;)i!==null&&(r+=i.toString("utf8")+` +`);return{cleanMerge:h,mergedText:d}}async function hD({fs:t,cache:e,dir:r,gitdir:n=$.join(r,".git"),index:i,ourOid:a,baseOid:s,theirOid:o,ourName:l="ours",baseName:c="base",theirName:u="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let p=Pr({ref:a}),g=Pr({ref:s}),v=Pr({ref:o}),y=[],b=[],E=[],S=[],A=await ra({fs:t,cache:e,dir:r,gitdir:n,trees:[p,g,v],map:async function(k,[w,x,_]){let T=Cf(k),C=await If(w,x),I=await If(_,x);switch(`${C}-${I}`){case"false-false":return{mode:await x.mode(),path:T,oid:await x.oid(),type:await x.type()};case"false-true":return!_&&await w.type()==="tree"?{mode:await w.mode(),path:T,oid:await w.oid(),type:await w.type()}:_?{mode:await _.mode(),path:T,oid:await _.oid(),type:await _.type()}:void 0;case"true-false":return!w&&await _.type()==="tree"?{mode:await _.mode(),path:T,oid:await _.oid(),type:await _.type()}:w?{mode:await w.mode(),path:T,oid:await w.oid(),type:await w.type()}:void 0;case"true-true":{if(w&&_&&await w.type()==="tree"&&await _.type()==="tree")return{mode:await w.mode(),path:T,oid:await w.oid(),type:"tree"};if(w&&_&&await w.type()==="blob"&&await _.type()==="blob")return pD({fs:t,gitdir:n,path:T,ours:w,base:x,theirs:_,ourName:l,baseName:c,theirName:u,mergeDriver:h}).then(async L=>{if(L.cleanMerge)d||i.insert({filepath:k,oid:L.mergeResult.oid,stage:0});else if(y.push(k),b.push(k),!d){let F="";x&&await x.type()==="blob"&&(F=await x.oid());let J=await w.oid(),de=await _.oid();i.delete({filepath:k}),F&&i.insert({filepath:k,oid:F,stage:1}),i.insert({filepath:k,oid:J,stage:2}),i.insert({filepath:k,oid:de,stage:3})}return L.mergeResult});if(x&&!w&&_&&await x.type()==="blob"&&await _.type()==="blob"){if(y.push(k),E.push(k),!d){let L=await x.oid(),F=await _.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:L,stage:1}),i.insert({filepath:k,oid:F,stage:3})}return{mode:await _.mode(),oid:await _.oid(),type:"blob",path:T}}if(x&&w&&!_&&await x.type()==="blob"&&await w.type()==="blob"){if(y.push(k),S.push(k),!d){let L=await x.oid(),F=await w.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:L,stage:1}),i.insert({filepath:k,oid:F,stage:2})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:T}}if(x&&!w&&!_&&(await x.type()==="blob"||await x.type()==="tree"))return;throw new oo}}},reduce:y.length!==0&&(!r||d)?void 0:async(k,w)=>{let x=w.filter(Boolean);if(k&&!(k&&k.type==="tree"&&x.length===0&&k.path!==".")){if(x.length>0||k.path==="."&&x.length===0){let T=new hr(x).toObject(),C=await mr({fs:t,gitdir:n,type:"tree",object:T,dryRun:f});k.oid=C}return k}}});return y.length!==0?(r&&!d&&await ra({fs:t,cache:e,dir:r,gitdir:n,trees:[Pr({ref:A.oid})],map:async function(k,[w]){let x=`${r}/${k}`;if(await w.type()==="blob"){let _=await w.mode(),T=new TextDecoder().decode(await w.content());await t.write(x,T,{mode:_})}return!0}}),new lo(y,b,E,S)):A.oid}async function pD({fs:t,gitdir:e,path:r,ours:n,base:i,theirs:a,ourName:s,theirName:o,baseName:l,dryRun:c,mergeDriver:u=dD}){let f="blob",d="100755",h="",p="";i&&await i.type()==="blob"&&(d=await i.mode(),h=await i.oid(),p=Buffer.from(await i.content()).toString("utf8"));let g=d===await n.mode()?await a.mode():await n.mode();if(await n.oid()===await a.oid())return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await n.oid(),type:f}};if(await n.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await a.oid(),type:f}};if(await a.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await n.oid(),type:f}};let v=Buffer.from(await n.content()).toString("utf8"),y=Buffer.from(await a.content()).toString("utf8"),{mergedText:b,cleanMerge:E}=await u({branches:[l,s,o],contents:[p,v,y],path:r}),S=await mr({fs:t,gitdir:e,type:"blob",object:Buffer.from(b,"utf8"),dryRun:c});return{cleanMerge:E,mergeResult:{mode:g,path:r,oid:S,type:f}}}async function mS({fs:t,cache:e,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,onSign:g,mergeDriver:v,allowUnrelatedHistories:y=!1}){i===void 0&&(i=await sa({fs:t,gitdir:n,fullname:!0})),i=await V.expand({fs:t,gitdir:n,ref:i}),a=await V.expand({fs:t,gitdir:n,ref:a});let b=await V.resolve({fs:t,gitdir:n,ref:i}),E=await V.resolve({fs:t,gitdir:n,ref:a}),S=await pg({fs:t,cache:e,gitdir:n,oids:[b,E]});if(S.length!==1)if(S.length===0&&y)S.push("4b825dc642cb6eb9a060e54bf8d69288fbee4904");else throw new oo;let A=S[0];if(A===E)return{oid:b,alreadyMerged:!0};if(s&&A===b)return!l&&!c&&await V.writeRef({fs:t,gitdir:n,ref:i,value:E}),{oid:E,fastForward:!0};{if(o)throw new Jl;let k=await ct.acquire({fs:t,gitdir:n,cache:e,allowUnmerged:!1},async x=>hD({fs:t,cache:e,dir:r,gitdir:n,index:x,ourOid:b,theirOid:E,baseOid:A,ourName:za(i),baseName:"base",theirName:za(a),dryRun:l,abortOnConflict:u,mergeDriver:v}));if(k instanceof lo)throw k;return f||(f=`Merge branch '${za(a)}' into ${za(i)}`),{oid:await Nf({fs:t,cache:e,gitdir:n,message:f,ref:i,tree:k,parent:[b,E],author:d,committer:h,signingKey:p,onSign:g,dryRun:l,noUpdateBranch:c}),tree:k,mergeCommit:!0}}}async function gS({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,dir:l,gitdir:c,ref:u,url:f,remote:d,remoteRef:h,prune:p,pruneTags:g,fastForward:v,fastForwardOnly:y,corsProxy:b,singleBranch:E,headers:S,author:A,committer:k,signingKey:w}){try{if(!u){let T=await sa({fs:t,gitdir:c});if(!T)throw new dr("ref");u=T}let{fetchHead:x,fetchHeadDescription:_}=await hg({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:c,corsProxy:b,ref:u,url:f,remote:d,remoteRef:h,singleBranch:E,headers:S,prune:p,pruneTags:g});await mS({fs:t,cache:e,gitdir:c,ours:u,theirs:x,fastForward:v,fastForwardOnly:y,message:`Merge ${_}`,author:A,committer:k,signingKey:w,dryRun:!1,noUpdateBranch:!1}),await fg({fs:t,cache:e,onProgress:n,dir:l,gitdir:c,ref:u,remote:d,noCheckout:!1})}catch(x){throw x.caller="git.pull",x}}async function vS({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$.join(o,".git"),ref:c,url:u,remote:f,remoteRef:d,corsProxy:h,singleBranch:p,headers:g={},cache:v={}}){try{P("fs",t),P("http",e),P("gitdir",l);let y={name:"",email:"",timestamp:Date.now(),timezoneOffset:0};return await gS({fs:new Q(t),cache:v,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l,ref:c,url:u,remote:f,remoteRef:d,fastForwardOnly:!0,corsProxy:h,singleBranch:p,headers:g,author:y,committer:y})}catch(y){throw y.caller="git.fastForward",y}}async function yS({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$.join(o,".git"),ref:c,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p=null,since:g=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:E=!1,headers:S={},prune:A=!1,pruneTags:k=!1,cache:w={}}){try{return P("fs",t),P("http",e),P("gitdir",l),await hg({fs:new Q(t),cache:w,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,gitdir:l,ref:c,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p,since:g,exclude:v,relative:y,tags:b,singleBranch:E,headers:S,prune:A,pruneTags:k})}catch(x){throw x.caller="git.fetch",x}}async function wS({fs:t,dir:e,gitdir:r=$.join(e,".git"),oids:n,cache:i={}}){try{return P("fs",t),P("gitdir",r),P("oids",n),await pg({fs:new Q(t),cache:i,gitdir:r,oids:n})}catch(a){throw a.caller="git.findMergeBase",a}}async function bS({fs:t,filepath:e}){if(await t.exists($.join(e,".git")))return e;{let r=ao(e);if(r===e)throw new je(`git root for ${e}`);return bS({fs:t,filepath:r})}}async function _S({fs:t,filepath:e}){try{return P("fs",t),P("filepath",e),await bS({fs:new Q(t),filepath:e})}catch(r){throw r.caller="git.findRoot",r}}async function xS({fs:t,dir:e,gitdir:r=$.join(e,".git"),path:n}){try{return P("fs",t),P("gitdir",r),P("path",n),await oc({fs:new Q(t),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfig",i}}async function mD({fs:t,gitdir:e,path:r}){return(await nt.get({fs:t,gitdir:e})).getall(r)}async function SS({fs:t,dir:e,gitdir:r=$.join(e,".git"),path:n}){try{return P("fs",t),P("gitdir",r),P("path",n),await mD({fs:new Q(t),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfigAll",i}}async function ES({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1}){try{P("http",t),P("url",a);let c=await go.getRemoteHelperFor({url:a}).discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:1}),u={capabilities:[...c.capabilities]};for(let[f,d]of c.refs){let h=f.split("/"),p=h.pop(),g=u;for(let v of h)g[v]=g[v]||{},g=g[v];g[p]=d}for(let[f,d]of c.symrefs){let h=f.split("/"),p=h.pop(),g=u;for(let v of h)g[v]=g[v]||{},g=g[v];g[p]=d}return u}catch(l){throw l.caller="git.getRemoteInfo",l}}function AS(t,e,r,n){let i=[];for(let[a,s]of t.refs){if(e&&!a.startsWith(e))continue;if(a.endsWith("^{}")){if(n){let l=a.replace("^{}",""),c=i[i.length-1],u=c.ref===l?c:i.find(f=>f.ref===l);if(u===void 0)throw new Error("I did not expect this to happen");u.peeled=s}continue}let o={ref:a,oid:s};r&&t.symrefs.has(a)&&(o.target=t.symrefs.get(a)),i.push(o)}return i}async function kS({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2}){try{P("http",t),P("url",a);let u=await go.getRemoteHelperFor({url:a}).discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(u.protocolVersion===2)return{protocolVersion:u.protocolVersion,capabilities:u.capabilities2};let f={};for(let d of u.capabilities){let[h,p]=d.split("=");p?f[h]=p:f[h]=!0}return{protocolVersion:1,capabilities:f,refs:AS(u,void 0,!0,!0)}}catch(c){throw c.caller="git.getRemoteInfo2",c}}async function gD({type:t,object:e,format:r="content",oid:n=void 0}){return r!=="deflated"&&(r!=="wrapped"&&(e=ea.wrap({type:t,object:e})),n=await bi(e)),{oid:n,object:e}}async function TS({object:t}){try{P("object",t),typeof t=="string"?t=Buffer.from(t,"utf8"):t=Buffer.from(t);let e="blob",{oid:r,object:n}=await gD({type:"blob",format:"content",object:t});return{oid:r,type:e,object:new Uint8Array(n),format:"wrapped"}}catch(e){throw e.caller="git.hashBlob",e}}async function vD({fs:t,cache:e,onProgress:r,dir:n,gitdir:i,filepath:a}){try{a=$.join(n,a);let s=await t.read(a),o=c=>Ge({fs:t,cache:e,gitdir:i,oid:c}),l=await ql.fromPack({pack:s,getExternalRefDelta:o,onProgress:r});return await t.write(a.replace(/\.pack$/,".idx"),await l.toBuffer()),{oids:[...l.hashes]}}catch(s){throw s.caller="git.indexPack",s}}async function CS({fs:t,onProgress:e,dir:r,gitdir:n=$.join(r,".git"),filepath:i,cache:a={}}){try{return P("fs",t),P("dir",r),P("gitdir",r),P("filepath",i),await vD({fs:new Q(t),cache:a,onProgress:e,dir:r,gitdir:n,filepath:i})}catch(s){throw s.caller="git.indexPack",s}}async function PS({fs:t,bare:e=!1,dir:r,gitdir:n=e?r:$.join(r,".git"),defaultBranch:i="master"}){try{return P("fs",t),P("gitdir",n),e||P("dir",r),await aS({fs:new Q(t),bare:e,dir:r,gitdir:n,defaultBranch:i})}catch(a){throw a.caller="git.init",a}}async function RS({fs:t,cache:e,gitdir:r,oid:n,ancestor:i,depth:a}){let s=await Wa.read({fs:t,gitdir:r});if(!n)throw new dr("oid");if(!i)throw new dr("ancestor");if(n===i)return!1;let o=[n],l=new Set,c=0;for(;o.length;){if(c++===a)throw new ec(a);let u=o.shift(),{type:f,object:d}=await Ge({fs:t,cache:e,gitdir:r,oid:u});if(f!=="commit")throw new tr(u,f,"commit");let h=pr.from(d).parse();for(let p of h.parent)if(p===i)return!0;if(!s.has(u))for(let p of h.parent)l.has(p)||(o.push(p),l.add(p))}return!1}async function MS({fs:t,dir:e,gitdir:r=$.join(e,".git"),oid:n,ancestor:i,depth:a=-1,cache:s={}}){try{return P("fs",t),P("gitdir",r),P("oid",n),P("ancestor",i),await RS({fs:new Q(t),cache:s,gitdir:r,oid:n,ancestor:i,depth:a})}catch(o){throw o.caller="git.isDescendent",o}}async function OS({fs:t,dir:e,gitdir:r=$.join(e,".git"),filepath:n}){try{return P("fs",t),P("dir",e),P("gitdir",r),P("filepath",n),na.isIgnored({fs:new Q(t),dir:e,gitdir:r,filepath:n})}catch(i){throw i.caller="git.isIgnored",i}}async function IS({fs:t,dir:e,gitdir:r=$.join(e,".git"),remote:n}){try{return P("fs",t),P("gitdir",r),V.listBranches({fs:new Q(t),gitdir:r,remote:n})}catch(i){throw i.caller="git.listBranches",i}}async function yD({fs:t,gitdir:e,ref:r,cache:n}){if(r){let i=await V.resolve({gitdir:e,fs:t,ref:r}),a=[];return await $S({fs:t,cache:n,gitdir:e,oid:i,filenames:a,prefix:""}),a}else return ct.acquire({fs:t,gitdir:e,cache:n},async function(i){return i.entries.map(a=>a.path)})}async function $S({fs:t,cache:e,gitdir:r,oid:n,filenames:i,prefix:a}){let{tree:s}=await wo({fs:t,cache:e,gitdir:r,oid:n});for(let o of s)o.type==="tree"?await $S({fs:t,cache:e,gitdir:r,oid:o.oid,filenames:i,prefix:$.join(a,o.path)}):i.push($.join(a,o.path))}async function FS({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n,cache:i={}}){try{return P("fs",t),P("gitdir",r),await yD({fs:new Q(t),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listFiles",a}}async function wD({fs:t,cache:e,gitdir:r,ref:n}){let i;try{i=await V.resolve({gitdir:r,fs:t,ref:n})}catch(o){if(o instanceof je)return[]}return(await wo({fs:t,cache:e,gitdir:r,oid:i})).tree.map(o=>({target:o.path,note:o.oid}))}async function DS({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n="refs/notes/commits",cache:i={}}){try{return P("fs",t),P("gitdir",r),P("ref",n),await wD({fs:new Q(t),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listNotes",a}}async function LS({fs:t,dir:e,gitdir:r=$.join(e,".git"),filepath:n}){try{return P("fs",t),P("gitdir",r),V.listRefs({fs:new Q(t),gitdir:r,filepath:n})}catch(i){throw i.caller="git.listRefs",i}}async function bD({fs:t,gitdir:e}){let r=await nt.get({fs:t,gitdir:e}),n=await r.getSubsections("remote");return Promise.all(n.map(async a=>{let s=await r.get(`remote.${a}.url`);return{remote:a,url:s}}))}async function jS({fs:t,dir:e,gitdir:r=$.join(e,".git")}){try{return P("fs",t),P("gitdir",r),await bD({fs:new Q(t),gitdir:r})}catch(n){throw n.caller="git.listRemotes",n}}async function _D(t){let e=Qe.streamReader(t),r=[],n;for(;n=await e(),n!==!0;){if(n===null)continue;n=n.toString("utf8").replace(/\n$/,"");let[i,a,...s]=n.split(" "),o={ref:a,oid:i};for(let l of s){let[c,u]=l.split(":");c==="symref-target"?o.target=u:c==="peeled"&&(o.peeled=u)}r.push(o)}return r}async function xD({prefix:t,symrefs:e,peelTags:r}){let n=[];return n.push(Qe.encode(`command=ls-refs +`)),n.push(Qe.encode(`agent=${Bf.agent} +`)),(r||e||t)&&n.push(Qe.delim()),r&&n.push(Qe.encode("peel")),e&&n.push(Qe.encode("symrefs")),t&&n.push(Qe.encode(`ref-prefix ${t}`)),n.push(Qe.flush()),n}async function NS({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2,prefix:c,symrefs:u,peelTags:f}){try{P("http",t),P("url",a);let d=await mo.discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(d.protocolVersion===1)return AS(d,c,u,f);let h=await xD({prefix:c,symrefs:u,peelTags:f}),p=await mo.connect({http:t,auth:d.auth,headers:s,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,body:h});return _D(p.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function BS({fs:t,dir:e,gitdir:r=$.join(e,".git")}){try{return P("fs",t),P("gitdir",r),V.listTags({fs:new Q(t),gitdir:r})}catch(n){throw n.caller="git.listTags",n}}function SD(t,e){return t.committer.timestamp-e.committer.timestamp}var ED="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function Px({fs:t,cache:e,gitdir:r,oid:n,fileId:i}){if(i===ED)return;let a=n,s,o=await fo({fs:t,cache:e,gitdir:r,oid:n}),l=o.tree;return i===o.oid?s=o.path:(s=await HS({fs:t,cache:e,gitdir:r,tree:l,fileId:i,oid:a}),Array.isArray(s)&&(s.length===0?s=void 0:s.length===1&&(s=s[0]))),s}async function HS({fs:t,cache:e,gitdir:r,tree:n,fileId:i,oid:a,filepaths:s=[],parentPath:o=""}){let l=n.entries().map(function(c){let u;return c.oid===i?(u=$.join(o,c.path),s.push(u)):c.type==="tree"&&(u=Ge({fs:t,cache:e,gitdir:r,oid:c.oid}).then(function({object:f}){return HS({fs:t,cache:e,gitdir:r,tree:hr.from(f),fileId:i,oid:a,filepaths:s,parentPath:$.join(o,c.path)})})),u});return await Promise.all(l),s}async function AD({fs:t,cache:e,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l}){let c=typeof s=="undefined"?void 0:Math.floor(s.valueOf()/1e3),u=[],f=await Wa.read({fs:t,gitdir:r}),d=await V.resolve({fs:t,gitdir:r,ref:i}),h=[await po({fs:t,cache:e,gitdir:r,oid:d})],p,g,v;function y(b){v&&n&&u.push(b)}for(;h.length>0;){let b=h.pop();if(c!==void 0&&b.commit.committer.timestamp<=c)break;if(n){let E;try{E=await lc({fs:t,cache:e,gitdir:r,oid:b.commit.tree,filepath:n}),g&&p!==E&&u.push(g),p=E,g=b,v=!0}catch(S){if(S instanceof je){let A=l&&p;if(A&&(A=await Px({fs:t,cache:e,gitdir:r,oid:b.commit.tree,fileId:p}),A))if(Array.isArray(A)){if(g){let k=await Px({fs:t,cache:e,gitdir:r,oid:g.commit.tree,fileId:p});if(Array.isArray(k))if(A=A.filter(w=>k.indexOf(w)===-1),A.length===1)A=A[0],n=A,g&&u.push(g);else{A=!1,g&&u.push(g);break}}}else n=A,g&&u.push(g);if(!A){if(v&&p&&(u.push(g),!o))break;if(!o&&!l)throw S}g=b,v=!1}else throw S}}else u.push(b);if(a!==void 0&&u.length===a){y(b);break}if(!f.has(b.oid))for(let E of b.commit.parent){let S=await po({fs:t,cache:e,gitdir:r,oid:E});h.map(A=>A.oid).includes(S.oid)||h.push(S)}h.length===0&&y(b),h.sort((E,S)=>SD(E.commit,S.commit))}return u}async function US({fs:t,dir:e,gitdir:r=$.join(e,".git"),filepath:n,ref:i="HEAD",depth:a,since:s,force:o,follow:l,cache:c={}}){try{return P("fs",t),P("gitdir",r),P("ref",i),await AD({fs:new Q(t),cache:c,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l})}catch(u){throw u.caller="git.log",u}}async function GS({fs:t,onSign:e,dir:r,gitdir:n=$.join(r,".git"),ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,cache:g={},mergeDriver:v,allowUnrelatedHistories:y=!1}){try{P("fs",t),p&&P("onSign",e);let b=new Q(t),E=await ia({fs:b,gitdir:n,author:d});if(!E&&(!o||!s))throw new zt("author");let S=await ho({fs:b,gitdir:n,author:E,committer:h});if(!S&&(!o||!s))throw new zt("committer");return await mS({fs:b,cache:g,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s,fastForwardOnly:o,dryRun:l,noUpdateBranch:c,abortOnConflict:u,message:f,author:E,committer:S,signingKey:p,onSign:e,mergeDriver:v,allowUnrelatedHistories:y})}catch(b){throw b.caller="git.merge",b}}var kD={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function zS({fs:t,cache:e,dir:r,gitdir:n=$.join(r,".git"),oids:i}){let a=new Mx,s=[];function o(u,f){let d=Buffer.from(u,f);s.push(d),a.update(d)}async function l({stype:u,object:f}){let d=kD[u],h=f.length,p=h>15?128:0,g=h&15;h=h>>>4;let v=(p|d|g).toString(16);for(o(v,"hex");p;)p=h>127?128:0,v=p|h&127,o(lg(2,v),"hex"),h=h>>>7;o(Buffer.from(await Gx(f)))}o("PACK"),o("00000002","hex"),o(lg(8,i.length),"hex");for(let u of i){let{type:f,object:d}=await Ge({fs:t,cache:e,gitdir:n,oid:u});await l({write:o,object:d,stype:f})}let c=a.digest();return s.push(c),s}async function TD({fs:t,cache:e,gitdir:r,oids:n,write:i}){let a=await zS({fs:t,cache:e,gitdir:r,oids:n}),s=Buffer.from(await $f(a)),l=`pack-${s.slice(-20).toString("hex")}.pack`;return i?(await t.write($.join(r,`objects/pack/${l}`),s),{filename:l}):{filename:l,packfile:new Uint8Array(s)}}async function VS({fs:t,dir:e,gitdir:r=$.join(e,".git"),oids:n,write:i=!1,cache:a={}}){try{return P("fs",t),P("gitdir",r),P("oids",n),await TD({fs:new Q(t),cache:a,gitdir:r,oids:n,write:i})}catch(s){throw s.caller="git.packObjects",s}}async function WS({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$.join(o,".git"),ref:c,url:u,remote:f,remoteRef:d,prune:h=!1,pruneTags:p=!1,fastForward:g=!0,fastForwardOnly:v=!1,corsProxy:y,singleBranch:b,headers:E={},author:S,committer:A,signingKey:k,cache:w={}}){try{P("fs",t),P("gitdir",l);let x=new Q(t),_=await ia({fs:x,gitdir:l,author:S});if(!_)throw new zt("author");let T=await ho({fs:x,gitdir:l,author:_,committer:A});if(!T)throw new zt("committer");return await gS({fs:x,cache:w,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l,ref:c,url:u,remote:f,remoteRef:d,fastForward:g,fastForwardOnly:v,corsProxy:y,singleBranch:b,headers:E,author:_,committer:T,signingKey:k,prune:h,pruneTags:p})}catch(x){throw x.caller="git.pull",x}}async function CD({fs:t,cache:e,dir:r,gitdir:n=$.join(r,".git"),start:i,finish:a}){let s=await Wa.read({fs:t,gitdir:n}),o=new Set,l=new Set;for(let f of i)o.add(await V.resolve({fs:t,gitdir:n,ref:f}));for(let f of a)try{let d=await V.resolve({fs:t,gitdir:n,ref:f});l.add(d)}catch(d){}let c=new Set;async function u(f){c.add(f);let{type:d,object:h}=await Ge({fs:t,cache:e,gitdir:n,oid:f});if(d==="tag"){let g=Rr.from(h).headers().object;return u(g)}if(d!=="commit")throw new tr(f,d,"commit");if(!s.has(f)){let g=pr.from(h).headers().parent;for(f of g)!l.has(f)&&!c.has(f)&&await u(f)}}for(let f of o)await u(f);return c}async function Xm({fs:t,cache:e,dir:r,gitdir:n=$.join(r,".git"),oids:i}){let a=new Set;async function s(o){if(a.has(o))return;a.add(o);let{type:l,object:c}=await Ge({fs:t,cache:e,gitdir:n,oid:o});if(l==="tag"){let f=Rr.from(c).headers().object;await s(f)}else if(l==="commit"){let f=pr.from(c).headers().tree;await s(f)}else if(l==="tree"){let u=hr.from(c);for(let f of u)f.type==="blob"&&a.add(f.oid),f.type==="tree"&&await s(f.oid)}}for(let o of i)await s(o);return a}async function PD(t){let e={},r="",n=Qe.streamReader(t),i=await n();for(;i!==!0;)i!==null&&(r+=i.toString("utf8")+` `),i=await n();let a=r.toString("utf8").split(` -`);if(i=a.shift(),!i.startsWith("unpack "))throw new ua('unpack ok" or "unpack [error message]',i);t.ok=i==="unpack ok",t.ok||(t.error=i.slice(7)),t.refs={};for(let s of a){if(s.trim()==="")continue;let o=s.slice(0,2),l=s.slice(3),c=l.indexOf(" ");c===-1&&(c=l.length);let u=l.slice(0,c),f=l.slice(c+1);t.refs[u]={ok:o==="ok",error:f}}return t}async function AI({capabilities:e=[],triplets:t=[]}){let r=[],n=`\0 ${e.join(" ")}`;for(let i of t)r.push(We.encode(`${i.oldoid} ${i.oid} ${i.fullRef}${n} -`)),n="";return r.push(We.flush()),r}async function kI({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPrePush:l,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={}}){let b=u||await ha({fs:e,gitdir:c});if(typeof b=="undefined")throw new er("ref");let x=await qe.get({fs:e,gitdir:c});d=d||await x.get(`branch.${b}.pushRemote`)||await x.get("remote.pushDefault")||await x.get(`branch.${b}.remote`)||"origin";let E=h||await x.get(`remote.${d}.pushurl`)||await x.get(`remote.${d}.url`);if(typeof E=="undefined")throw new er("remote OR url");let _=f||await x.get(`branch.${b}.merge`);if(typeof E=="undefined")throw new er("remoteRef");v===void 0&&(v=await x.get("http.corsProxy"));let k=await W.expand({fs:e,gitdir:c,ref:b}),w=m?"0000000000000000000000000000000000000000":await W.resolve({fs:e,gitdir:c,ref:k}),A=As.getRemoteHelperFor({url:E}),S=await A.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:v,service:"git-receive-pack",url:E,headers:y,protocolVersion:1}),T=S.auth,P;if(!_)P=k;else try{P=await W.expandAgainstMap({ref:_,map:S.refs})}catch(Y){if(Y instanceof Le)P=_.startsWith("refs/")?_:`refs/heads/${_}`;else throw Y}let I=S.refs.get(P)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:d,url:E,localRef:{ref:m?"(delete)":k,oid:w},remoteRef:{ref:P,oid:I}}))throw new ws;let N=!S.capabilities.has("no-thin"),L=new Set;if(!m){let Y=[...S.refs.values()],O=new Set;if(I!=="0000000000000000000000000000000000000000"){let he=await Pp({fs:e,cache:t,gitdir:c,oids:[w,I]});for(let ze of he)Y.push(ze);N&&(O=await fp({fs:e,cache:t,gitdir:c,oids:he}))}if(!Y.includes(w)){let he=await SI({fs:e,cache:t,gitdir:c,start:[w],finish:Y});L=await fp({fs:e,cache:t,gitdir:c,oids:he})}if(N){try{let he=await W.resolve({fs:e,gitdir:c,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:ze}=await W.resolveAgainstMap({ref:he.replace(`refs/remotes/${d}/`,""),fullref:he,map:S.refs}),gt=[ze];for(let Re of await fp({fs:e,cache:t,gitdir:c,oids:gt}))O.add(Re)}catch(he){}for(let he of O)L.delete(he)}if(w===I&&(p=!0),!p){if(k.startsWith("refs/tags")&&I!=="0000000000000000000000000000000000000000")throw new ys("tag-exists");if(w!=="0000000000000000000000000000000000000000"&&I!=="0000000000000000000000000000000000000000"&&!await T2({fs:e,cache:t,gitdir:c,oid:w,ancestor:I,depth:-1}))throw new ys("not-fast-forward")}}let ee=b2([...S.capabilities],["report-status","side-band-64k",`agent=${vu.agent}`]),fe=await AI({capabilities:ee,triplets:[{oldoid:I,oid:w,fullRef:P}]}),J=m?[]:await R2({fs:e,cache:t,gitdir:c,oids:[...L]}),Q=await A.connect({http:r,onProgress:n,corsProxy:v,service:"git-receive-pack",url:E,auth:T,headers:y,body:[...fe,...J]}),{packfile:Pe,progress:ge}=await uu.demux(Q.body);if(i){let Y=_2(ge);bl(Y,async O=>{await i(O)})}let z=await EI(Pe);if(Q.headers&&(z.headers=Q.headers),d&&z.ok&&z.refs[P].ok&&!k.startsWith("refs/tags")){let Y=`refs/remotes/${d}/${P.replace("refs/heads","")}`;m?await W.deleteRef({fs:e,gitdir:c,ref:Y}):await W.writeRef({fs:e,gitdir:c,ref:Y,value:w})}if(z.ok&&Object.values(z.refs).every(Y=>Y.ok))return z;{let Y=Object.entries(z.refs).filter(([O,he])=>!he.ok).map(([O,he])=>` - - ${O}: ${he.error}`).join("");throw new cl(Y,z)}}async function TI({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,dir:l,gitdir:c=$(l,".git"),ref:u,remoteRef:f,remote:d="origin",url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={},cache:b={}}){try{return C("fs",e),C("http",t),C("gitdir",c),await kI({fs:new X(e),cache:b,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p,delete:m,corsProxy:v,headers:y})}catch(x){throw x.caller="git.push",x}}async function M2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await Ye({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,M2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="blob")throw new zt(n,i,"blob");return{oid:n,blob:new Uint8Array(a)}}async function O2({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){return i!==void 0&&(n=await wl({fs:e,cache:t,gitdir:r,oid:n,filepath:i})),await M2({fs:e,cache:t,gitdir:r,oid:n})}async function _l({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await O2({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readBlob",s}}async function CI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await lu({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readCommit",a}}async function PI({fs:e,cache:t,gitdir:r,ref:n="refs/notes/commits",oid:i}){let a=await W.resolve({gitdir:r,fs:e,ref:n}),{blob:s}=await O2({fs:e,cache:t,gitdir:r,oid:a,filepath:i});return s}async function RI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",oid:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oid",i),await PI({fs:new X(e),cache:a,gitdir:r,ref:n,oid:i})}catch(s){throw s.caller="git.readNote",s}}async function MI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,format:i="parsed",filepath:a=void 0,encoding:s=void 0,cache:o={}}){try{C("fs",e),C("gitdir",r),C("oid",n);let l=new X(e);a!==void 0&&(n=await wl({fs:l,cache:o,gitdir:r,oid:n,filepath:a}));let u=await Ye({fs:l,cache:o,gitdir:r,oid:n,format:i==="parsed"?"content":i});if(u.oid=n,i==="parsed")switch(u.format="parsed",u.type){case"commit":u.object=rr.from(u.object).parse();break;case"tree":u.object=tr.from(u.object).entries();break;case"blob":s?u.object=u.object.toString(s):(u.object=new Uint8Array(u.object),u.format="content");break;case"tag":u.object=pr.from(u.object).parse();break;default:throw new zt(u.oid,u.type,"blob|commit|tag|tree")}else(u.format==="deflated"||u.format==="wrapped")&&(u.type=u.format);return u}catch(l){throw l.caller="git.readObject",l}}async function OI({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await Ye({fs:e,cache:t,gitdir:r,oid:n,format:"content"});if(i!=="tag")throw new zt(n,i,"tag");let s=pr.from(a);return{oid:n,tag:s.parse(),payload:s.payload()}}async function II({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await OI({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readTag",a}}async function FI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i=void 0,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await ks({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readTree",s}}async function $I({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n),await yt.acquire({fs:new X(e),gitdir:r,cache:i},async function(a){a.delete({filepath:n})})}catch(a){throw a.caller="git.remove",a}}async function LI({fs:e,cache:t,onSign:r,gitdir:n,ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l}){let c;try{c=await W.resolve({gitdir:n,fs:e,ref:i})}catch(p){if(!(p instanceof Le))throw p}let f=(await ks({fs:e,gitdir:n,oid:c||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==a);let d=await kp({fs:e,gitdir:n,tree:f});return await gu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:d,parent:c&&[c],message:`Note removed by 'isomorphic-git removeNote' -`,author:s,committer:o,signingKey:l})}async function DI({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l,cache:c={}}){try{C("fs",e),C("gitdir",n),C("oid",a);let u=new X(e),f=await fa({fs:u,gitdir:n,author:s});if(!f)throw new Vt("author");let d=await Ss({fs:u,gitdir:n,author:f,committer:o});if(!d)throw new Vt("committer");return await LI({fs:u,cache:c,onSign:t,gitdir:n,ref:i,oid:a,author:f,committer:d,signingKey:l})}catch(u){throw u.caller="git.removeNote",u}}async function NI({fs:e,gitdir:t,oldref:r,ref:n,checkout:i=!1}){if(n!==Qr.default.clean(n))throw new Wn(n,Qr.default.clean(n));if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let a=`refs/heads/${r}`,s=`refs/heads/${n}`;if(await W.exists({fs:e,gitdir:t,ref:s}))throw new en("branch",n,!1);let l=await W.resolve({fs:e,gitdir:t,ref:a,depth:1});await W.writeRef({fs:e,gitdir:t,ref:s,value:l}),await W.deleteRef({fs:e,gitdir:t,ref:a});let u=await ha({fs:e,gitdir:t,fullname:!0})===a;(i||u)&&await W.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function BI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,oldref:i,checkout:a=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oldref",i),await NI({fs:new X(e),gitdir:r,ref:n,oldref:i,checkout:a})}catch(s){throw s.caller="git.renameBranch",s}}async function I2({gitdir:e,type:t,object:r}){return Vn(xi.wrap({type:t,object:r}))}async function jI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i,cache:a={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let s=new X(e),o,l;try{o=await W.resolve({fs:s,gitdir:r,ref:i||"HEAD"})}catch(f){if(i)throw f}if(o)try{o=await wl({fs:s,cache:a,gitdir:r,oid:o,filepath:n})}catch(f){o=null}let c={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},u=t&&await s.read($(t,n));u&&(l=await I2({gitdir:r,type:"blob",object:u}),o===l&&(c=await s.lstat($(t,n)))),await yt.acquire({fs:s,gitdir:r,cache:a},async function(f){f.delete({filepath:n}),o&&f.insert({filepath:n,stats:c,oid:o})})}catch(s){throw s.caller="git.reset",s}}async function HI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,depth:i}){try{return C("fs",e),C("gitdir",r),C("ref",n),await W.resolve({fs:new X(e),gitdir:r,ref:n,depth:i})}catch(a){throw a.caller="git.resolveRef",a}}async function UI({fs:e,dir:t,gitdir:r=$(t,".git"),path:n,value:i,append:a=!1}){try{C("fs",e),C("gitdir",r),C("path",n);let s=new X(e),o=await qe.get({fs:s,gitdir:r});a?await o.append(n,i):await o.set(n,i),await qe.save({fs:s,gitdir:r,config:o})}catch(s){throw s.caller="git.setConfig",s}}async function GI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let a=new X(e);if(await xs.isIgnored({fs:a,gitdir:r,dir:t,filepath:n}))return"ignored";let o=await zI({fs:a,cache:i,gitdir:r}),l=await F2({fs:a,cache:i,gitdir:r,tree:o,path:n}),c=await yt.acquire({fs:a,gitdir:r,cache:i},async function(m){for(let v of m)if(v.path===n)return v;return null}),u=await a.lstat($(t,n)),f=l!==null,d=c!==null,h=u!==null,p=async()=>{if(d&&!tu(c,u))return c.oid;{let m=await a.read($(t,n)),v=await I2({gitdir:r,type:"blob",object:m});return d&&c.oid===v&&u.size!==-1&&yt.acquire({fs:a,gitdir:r,cache:i},async function(y){y.insert({filepath:n,stats:u,oid:v})}),v}};if(!f&&!h&&!d)return"absent";if(!f&&!h&&d)return"*absent";if(!f&&h&&!d)return"*added";if(!f&&h&&d)return await p()===c.oid?"added":"*added";if(f&&!h&&!d)return"deleted";if(f&&!h&&d)return l===c.oid,"*deleted";if(f&&h&&!d)return await p()===l?"*undeleted":"*undeletemodified";if(f&&h&&d){let m=await p();return m===l?m===c.oid?"unmodified":"*unmodified":m===c.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function F2({fs:e,cache:t,gitdir:r,tree:n,path:i}){typeof i=="string"&&(i=i.split("/"));let a=i.shift();for(let s of n)if(s.path===a){if(i.length===0)return s.oid;let{type:o,object:l}=await Ye({fs:e,cache:t,gitdir:r,oid:s.oid});if(o==="tree"){let c=tr.from(l);return F2({fs:e,cache:t,gitdir:r,tree:c,path:i})}if(o==="blob")throw new zt(s.oid,o,"blob",i.join("/"))}return null}async function zI({fs:e,cache:t,gitdir:r}){let n;try{n=await W.resolve({fs:e,gitdir:r,ref:"HEAD"})}catch(a){if(a instanceof Le)return[]}let{tree:i}=await ks({fs:e,cache:t,gitdir:r,oid:n});return i}async function VI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="HEAD",filepaths:i=["."],filter:a,cache:s={},ignored:o=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let l=new X(e);return await _s({fs:l,cache:s,dir:t,gitdir:r,trees:[bi({ref:n}),mu(),pu()],map:async function(c,[u,f,d]){if(!u&&!d&&f&&!o&&await xs.isIgnored({fs:l,dir:t,filepath:c})||!i.some(k=>y2(c,k)))return null;if(a&&!a(c))return;let[h,p,m]=await Promise.all([u&&u.type(),f&&f.type(),d&&d.type()]),v=[h,p,m].includes("blob");if((h==="tree"||h==="special")&&!v)return;if(h==="commit")return null;if((p==="tree"||p==="special")&&!v)return;if(m==="commit")return null;if((m==="tree"||m==="special")&&!v)return;let y=h==="blob"?await u.oid():void 0,b=m==="blob"?await d.oid():void 0,x;h!=="blob"&&p==="blob"&&m!=="blob"?x="42":p==="blob"&&(x=await f.oid());let E=[void 0,y,x,b],_=E.map(k=>E.indexOf(k));return _.shift(),[c,..._]}})}catch(l){throw l.caller="git.statusMatrix",l}}async function WI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,force:a=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let s=new X(e);if(n===void 0)throw new er("ref");n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`;let o=await W.resolve({fs:s,gitdir:r,ref:i||"HEAD"});if(!a&&await W.exists({fs:s,gitdir:r,ref:n}))throw new en("tag",n);await W.writeRef({fs:s,gitdir:r,ref:n,value:o})}catch(s){throw s.caller="git.tag",s}}async function qI({fs:e,dir:t,gitdir:r=$(t,".git"),cache:n={},filepath:i,oid:a,mode:s,add:o,remove:l,force:c}){try{C("fs",e),C("gitdir",r),C("filepath",i);let u=new X(e);if(l)return await yt.acquire({fs:u,gitdir:r,cache:n},async function(d){let h;if(!c&&(h=await u.lstat($(t,i)),h)){if(h.isDirectory())throw new Si("directory");return}d.has({filepath:i})&&d.delete({filepath:i})});let f;if(!a){if(f=await u.lstat($(t,i)),!f)throw new Le(`file at "${i}" on disk and "remove" not set`);if(f.isDirectory())throw new Si("directory")}return await yt.acquire({fs:u,gitdir:r,cache:n},async function(d){if(!o&&!d.has({filepath:i}))throw new Le(`file at "${i}" in index and "add" not set`);let h={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:s,uid:0,gid:0,size:0};if(!a){h=f;let p=h.isSymbolicLink()?await u.readlink($(t,i)):await u.read($(t,i));a=await mr({fs:u,gitdir:r,type:"blob",format:"content",object:p})}return d.insert({filepath:i,oid:a,stats:h}),a})}catch(u){throw u.caller="git.updateIndex",u}}function YI(){try{return vu.version}catch(e){throw e.caller="git.version",e}}async function XI({fs:e,dir:t,gitdir:r=$(t,".git"),trees:n,map:i,reduce:a,iterate:s,cache:o={}}){try{return C("fs",e),C("gitdir",r),C("trees",n),await _s({fs:new X(e),cache:o,dir:t,gitdir:r,trees:n,map:i,reduce:a,iterate:s})}catch(l){throw l.caller="git.walk",l}}async function ZI({fs:e,dir:t,gitdir:r=$(t,".git"),blob:n}){try{return C("fs",e),C("gitdir",r),C("blob",n),await mr({fs:new X(e),gitdir:r,type:"blob",object:n,format:"content"})}catch(i){throw i.caller="git.writeBlob",i}}async function KI({fs:e,gitdir:t,commit:r}){let n=rr.from(r).toObject();return await mr({fs:e,gitdir:t,type:"commit",object:n,format:"content"})}async function JI({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n}){try{return C("fs",e),C("gitdir",r),C("commit",n),await KI({fs:new X(e),gitdir:r,commit:n})}catch(i){throw i.caller="git.writeCommit",i}}async function QI({fs:e,dir:t,gitdir:r=$(t,".git"),type:n,object:i,format:a="parsed",oid:s,encoding:o=void 0}){try{let l=new X(e);if(a==="parsed"){switch(n){case"commit":i=rr.from(i).toObject();break;case"tree":i=tr.from(i).toObject();break;case"blob":i=Buffer.from(i,o);break;case"tag":i=pr.from(i).toObject();break;default:throw new zt(s||"",n,"blob|commit|tag|tree")}a="content"}return s=await mr({fs:l,gitdir:r,type:n,object:i,oid:s,format:a}),s}catch(l){throw l.caller="git.writeObject",l}}async function e8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,value:i,force:a=!1,symbolic:s=!1}){try{C("fs",e),C("gitdir",r),C("ref",n),C("value",i);let o=new X(e);if(n!==Qr.default.clean(n))throw new Wn(n,Qr.default.clean(n));if(!a&&await W.exists({fs:o,gitdir:r,ref:n}))throw new en("ref",n);s?await W.writeSymbolicRef({fs:o,gitdir:r,ref:n,value:i}):(i=await W.resolve({fs:o,gitdir:r,ref:i}),await W.writeRef({fs:o,gitdir:r,ref:n,value:i}))}catch(o){throw o.caller="git.writeRef",o}}async function t8({fs:e,gitdir:t,tag:r}){let n=pr.from(r).toObject();return await mr({fs:e,gitdir:t,type:"tag",object:n,format:"content"})}async function r8({fs:e,dir:t,gitdir:r=$(t,".git"),tag:n}){try{return C("fs",e),C("gitdir",r),C("tag",n),await t8({fs:new X(e),gitdir:r,tag:n})}catch(i){throw i.caller="git.writeTag",i}}async function n8({fs:e,dir:t,gitdir:r=$(t,".git"),tree:n}){try{return C("fs",e),C("gitdir",r),C("tree",n),await kp({fs:new X(e),gitdir:r,tree:n})}catch(i){throw i.caller="git.writeTree",i}}var i8={Errors:yl,STAGE:pu,TREE:bi,WORKDIR:mu,add:n6,abortMerge:JO,addNote:a6,addRemote:s6,annotatedTag:l6,branch:u6,checkout:d6,clone:S6,commit:E6,getConfig:V6,getConfigAll:q6,setConfig:UI,currentBranch:A6,deleteBranch:T6,deleteRef:C6,deleteRemote:R6,deleteTag:O6,expandOid:L6,expandRef:D6,fastForward:H6,fetch:U6,findMergeBase:G6,findRoot:z6,getRemoteInfo:Y6,getRemoteInfo2:X6,hashBlob:K6,indexPack:Q6,init:eI,isDescendent:tI,isIgnored:rI,listBranches:nI,listFiles:aI,listNotes:oI,listRemotes:cI,listServerRefs:dI,listTags:hI,log:vI,merge:yI,packObjects:_I,pull:xI,push:TI,readBlob:_l,readCommit:CI,readNote:RI,readObject:MI,readTag:II,readTree:FI,remove:$I,removeNote:DI,renameBranch:BI,resetIndex:jI,updateIndex:qI,resolveRef:HI,status:GI,statusMatrix:VI,tag:WI,version:YI,walk:XI,writeBlob:ZI,writeCommit:JI,writeObject:QI,writeRef:e8,writeTag:r8,writeTree:n8},ie=i8;var we=require("obsidian"),DP=Ve(require("path"));g();var Aa=require("obsidian");g();var ST=Ve(bu()),_r=Ve(require("fs/promises")),Jn=require("obsidian"),De=Ve(require("path")),Yl=require("path");g();var Fu=Ve(j2(),1),Ru=Ve(bu(),1),d_=require("child_process"),X_=Ve(Mp(),1),Ms=Ve(Mp(),1),_x=require("node:events"),Ou=Object.defineProperty,S8=Object.defineProperties,E8=Object.getOwnPropertyDescriptor,A8=Object.getOwnPropertyDescriptors,Kp=Object.getOwnPropertyNames,H2=Object.getOwnPropertySymbols,bb=Object.prototype.hasOwnProperty,k8=Object.prototype.propertyIsEnumerable,U2=(e,t,r)=>t in e?Ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$r=(e,t)=>{for(var r in t||(t={}))bb.call(t,r)&&U2(e,r,t[r]);if(H2)for(var r of H2(t))k8.call(t,r)&&U2(e,r,t[r]);return e},El=(e,t)=>S8(e,A8(t)),V=(e,t)=>function(){return e&&(t=(0,e[Kp(e)[0]])(e=0)),t},T8=(e,t)=>function(){return t||(0,e[Kp(e)[0]])((t={exports:{}}).exports,t),t.exports},at=(e,t)=>{for(var r in t)Ou(e,r,{get:t[r],enumerable:!0})},C8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Kp(t))!bb.call(e,i)&&i!==r&&Ou(e,i,{get:()=>t[i],enumerable:!(n=E8(t,i))||n.enumerable});return e},Qe=e=>C8(Ou({},"__esModule",{value:!0}),e),Sl=(e,t,r)=>new Promise((n,i)=>{var a=l=>{try{o(r.next(l))}catch(c){i(c)}},s=l=>{try{o(r.throw(l))}catch(c){i(c)}},o=l=>l.done?n(l.value):Promise.resolve(l.value).then(a,s);o((r=r.apply(e,t)).next())});function P8(...e){let t=new String(e);return Iu.set(t,e),t}function Cu(e){return e instanceof String&&Iu.has(e)}function G2(e){return Iu.get(e)||[]}var Iu,Cl=V({"src/lib/args/pathspec.ts"(){"use strict";Iu=new WeakMap}}),wr,Ai=V({"src/lib/errors/git-error.ts"(){"use strict";wr=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),Pl,Is=V({"src/lib/errors/git-response-error.ts"(){"use strict";Ai(),Pl=class extends wr{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),_b,xb=V({"src/lib/errors/task-configuration-error.ts"(){"use strict";Ai(),_b=class extends wr{constructor(e){super(void 0,e)}}}});function Sb(e){return typeof e=="function"?e:ya}function Eb(e){return typeof e=="function"&&e!==ya}function Ab(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function kb(e,t=0){return Tb(e)&&e.length>t?e[t]:void 0}function va(e,t=0){if(Tb(e)&&e.length>t)return e[e.length-1-t]}function Tb(e){return!!(e&&typeof e.length=="number")}function Rl(e="",t=!0,r=` -`){return e.split(r).reduce((n,i)=>{let a=t?i.trim():i;return a&&n.push(a),n},[])}function Jp(e,t){return Rl(e,!0).map(r=>t(r))}function Qp(e){return(0,Fu.exists)(e,Fu.FOLDER)}function Ce(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Cb(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function $u(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Sn(e){return Array.isArray(e)?e:[e]}function Pb(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Rb(e){return Sn(e).map(String)}function Fe(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function Al(e,t){let r=[];for(let n=0,i=e.length;nr in e?{[r]:e[r]}:{}))}function Np(e=0){return new Promise(t=>setTimeout(t,e))}function Bp(e){if(e!==!1)return e}var Os,ya,Ml,Lu=V({"src/lib/utils/util.ts"(){"use strict";Os="\0",ya=()=>{},Ml=Object.prototype.toString.call.bind(Object.prototype.toString)}});function En(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function em(e,t){let r=Cu(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function tm(e){return!!e&&Ml(e)==="[object Object]"}function Ob(e){return typeof e=="function"}var Ol,Mt,Ib,Pu,rm,Fb=V({"src/lib/utils/argument-filters.ts"(){"use strict";Lu(),Cl(),Ol=e=>Array.isArray(e),Mt=e=>typeof e=="string",Ib=e=>Array.isArray(e)&&e.every(Mt),Pu=e=>Mt(e)||Array.isArray(e)&&e.every(Mt),rm=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),jp,R8=V({"src/lib/utils/exit-codes.ts"(){"use strict";jp=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(jp||{})}}),Tl,M8=V({"src/lib/utils/git-output-streams.ts"(){"use strict";Tl=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new Tl(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),ce,Ei,O8=V({"src/lib/utils/line-parser.ts"(){"use strict";ce=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((i,a)=>this.addMatch(i,a,r(a)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},Ei=class extends ce{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function $b(...e){let t=process.cwd(),r=Object.assign($r({baseDir:t},Lb),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Lb,I8=V({"src/lib/utils/simple-git-options.ts"(){"use strict";Lb={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function nm(e,t=[]){return tm(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];return Cu(i)?r.push(i):em(i,["boolean"])?r.push(n+"="+i):r.push(n),r},t):t}function nr(e,t=0,r=!1){let n=[];for(let i=0,a=t<0?e.length:t;i{for(let a=Rl(i,n),s=0,o=a.length;s{if(!(s+c>=o))return a[s+c]};t.some(({parse:c})=>c(l,e))}}),e}var L8=V({"src/lib/utils/task-parser.ts"(){"use strict";Lu()}}),Db={};at(Db,{ExitCodes:()=>jp,GitOutputStreams:()=>Tl,LineParser:()=>ce,NOOP:()=>ya,NULL:()=>Os,RemoteLineParser:()=>Ei,append:()=>Ce,appendTaskOptions:()=>nm,asArray:()=>Sn,asCamelCase:()=>Pb,asFunction:()=>Sb,asNumber:()=>Fe,asStringArray:()=>Rb,bufferToString:()=>kl,callTaskParser:()=>Hp,createInstanceConfig:()=>$b,delay:()=>Np,filterArray:()=>Ol,filterFunction:()=>Ob,filterHasLength:()=>rm,filterPlainObject:()=>tm,filterPrimitives:()=>em,filterString:()=>Mt,filterStringArray:()=>Ib,filterStringOrStringArray:()=>Pu,filterType:()=>En,first:()=>kb,folderExists:()=>Qp,forEachLineWithContent:()=>Jp,getTrailingOptions:()=>nr,including:()=>Cb,isUserFunction:()=>Eb,last:()=>va,objectToString:()=>Ml,orVoid:()=>Bp,parseStringResponse:()=>ar,pick:()=>Mb,prefixedArray:()=>Al,remove:()=>$u,splitOn:()=>Ab,toLinesWithContent:()=>Rl,trailingFunctionArgument:()=>et,trailingOptionsArgument:()=>im});var oe=V({"src/lib/utils/index.ts"(){"use strict";Fb(),R8(),M8(),O8(),I8(),$8(),L8(),Lu()}}),Nb={};at(Nb,{CheckRepoActions:()=>Up,checkIsBareRepoTask:()=>jb,checkIsRepoRootTask:()=>Bb,checkIsRepoTask:()=>D8});function D8(e){switch(e){case"bare":return jb();case"root":return Bb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:Du,parser:am}}function Bb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:Du,parser(t){return/^\.(git)?$/.test(t.trim())}}}function jb(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:Du,parser:am}}function N8(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Up,Du,am,Hb=V({"src/lib/tasks/check-is-repo.ts"(){"use strict";oe(),Up=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Up||{}),Du=({exitCode:e},t,r,n)=>{if(e===128&&N8(t))return r(Buffer.from("false"));n(t)},am=e=>e.trim()==="true"}});function B8(e,t){let r=new Ub(e),n=e?zb:Gb;return Rl(t).forEach(i=>{let a=i.replace(n,"");r.paths.push(a),(Vb.test(a)?r.folders:r.files).push(a)}),r}var Ub,Gb,zb,Vb,j8=V({"src/lib/responses/CleanSummary.ts"(){"use strict";oe(),Ub=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Gb=/^[a-z]+\s*/i,zb=/^[a-z]+\s+[a-z]+\s*/i,Vb=/\/$/}}),Gp={};at(Gp,{EMPTY_COMMANDS:()=>Nu,adhocExecTask:()=>Wb,configurationErrorTask:()=>ir,isBufferTask:()=>Yb,isEmptyTask:()=>Xb,straightThroughBufferTask:()=>qb,straightThroughStringTask:()=>Wt});function Wb(e){return{commands:Nu,format:"empty",parser:e}}function ir(e){return{commands:Nu,format:"empty",parser(){throw typeof e=="string"?new _b(e):e}}}function Wt(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function qb(e){return{commands:e,format:"buffer",parser(t){return t}}}function Yb(e){return e.format==="buffer"}function Xb(e){return e.format==="empty"||!e.commands.length}var Nu,it=V({"src/lib/tasks/task.ts"(){"use strict";xb(),Nu=[]}}),Zb={};at(Zb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>sm,CONFIG_ERROR_MODE_REQUIRED:()=>om,CONFIG_ERROR_UNKNOWN_OPTION:()=>lm,CleanOptions:()=>Eu,cleanTask:()=>Kb,cleanWithOptionsTask:()=>H8,isCleanOptionsArray:()=>U8});function H8(e,t){let{cleanMode:r,options:n,valid:i}=G8(e);return r?i.options?(n.push(...t),n.some(W8)?ir(sm):Kb(r,n)):ir(lm+JSON.stringify(e)):ir(om)}function Kb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return B8(e==="n",n)}}}function U8(e){return Array.isArray(e)&&e.every(t=>cm.has(t))}function G8(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{z8(i)?(t=i,n.cleanMode=!0):n.options=n.options&&V8(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function z8(e){return e==="f"||e==="n"}function V8(e){return/^-[a-z]$/i.test(e)&&cm.has(e.charAt(1))}function W8(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var sm,om,lm,Eu,cm,Jb=V({"src/lib/tasks/clean.ts"(){"use strict";j8(),oe(),it(),sm="Git clean interactive mode is not supported",om='Git clean mode parameter ("n" or "f") is required',lm="Git clean unknown option found in: ",Eu=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(Eu||{}),cm=new Set(["i",...Rb(Object.values(Eu))])}});function q8(e){let t=new e_;for(let r of Qb(e))t.addValue(r.file,String(r.key),r.value);return t}function Y8(e,t){let r=null,n=[],i=new Map;for(let a of Qb(e,t))a.key===t&&(n.push(r=a.value),i.has(a.file)||i.set(a.file,[]),i.get(a.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:n}}function X8(e){return e.replace(/^(file):/,"")}function*Qb(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;nObject.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=va(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Op(e,t){return typeof e=="string"&&zp.hasOwnProperty(e)?e:t}function K8(e,t,r,n){let i=["config",`--${n}`];return r&&i.push("--add"),i.push(e,t),{commands:i,format:"utf-8",parser(a){return a}}}function J8(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return Y8(n,e)}}}function Q8(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return q8(r)}}}function eF(){return{addConfig(e,t,...r){return this._runTask(K8(e,t,r[0]===!0,Op(r[1],"local")),et(arguments))},getConfig(e,t){return this._runTask(J8(e,Op(t,void 0)),et(arguments))},listConfig(...e){return this._runTask(Q8(Op(e[0],void 0)),et(arguments))}}}var zp,t_=V({"src/lib/tasks/config.ts"(){"use strict";Z8(),oe(),zp=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(zp||{})}});function tF(e){return r_.has(e)}var Ip,r_,n_=V({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ip=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Ip||{}),r_=new Set(Object.values(Ip))}});function rF(...e){return new a_().param(...e)}function nF(e){let t=new Set,r={};return Jp(e,n=>{let[i,a,s]=n.split(Os);t.add(i),(r[i]=r[i]||[]).push({line:Fe(a),path:i,preview:s})}),{paths:t,results:r}}function iF(){return{grep(e){let t=et(arguments),r=nr(arguments);for(let i of i_)if(r.includes(i))return this._runTask(ir(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=rF().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(i){return nF(i)}},t)}}}var i_,xl,z2,a_,s_=V({"src/lib/tasks/grep.ts"(){"use strict";oe(),it(),i_=["-h"],xl=Symbol("grepQuery"),a_=class{constructor(){this[z2]=[]}*[(z2=xl,Symbol.iterator)](){for(let e of this[xl])yield e}and(...e){return e.length&&this[xl].push("--and","(",...Al(e,"-e"),")"),this}param(...e){return this[xl].push(...Al(e,"-e")),this}}}}),o_={};at(o_,{ResetMode:()=>Au,getResetMode:()=>sF,resetTask:()=>aF});function aF(e,t){let r=["reset"];return l_(e)&&r.push(`--${e}`),r.push(...t),Wt(r)}function sF(e){if(l_(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function l_(e){return c_.includes(e)}var Au,c_,u_=V({"src/lib/tasks/reset.ts"(){"use strict";it(),Au=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(Au||{}),c_=Array.from(Object.values(Au))}});function oF(){return(0,Ru.default)("simple-git")}function V2(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...i)=>{e(n,...i),r(n,...i)}:e:(n,...i)=>{e(`%s ${n}`,t,...i),r&&r(n,...i)}}function lF(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function um(e,t,r,n=oF()){let i=e&&`[${e}]`||"",a=[],s=typeof t=="string"?n.extend(t):t,o=lF(En(t,Mt),s,n);return c(r);function l(u,f){return Ce(a,um(e,o.replace(/^[^:]+/,u),f,n))}function c(u){let f=u&&`[${u}]`||"",d=s&&V2(s,f)||ya,h=V2(n,`${i} ${f}`,d);return Object.assign(s?d:h,{label:e,sibling:l,info:h,step:c})}}var f_=V({"src/lib/git-logger.ts"(){"use strict";oe(),Ru.default.formatters.L=e=>String(rm(e)?e.length:"-"),Ru.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Ml(e)}}),xu,Vp,cF=V({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";Ai(),f_(),xu=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=xu.getName(e.commands[0]),r=um(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new wr(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++xu.counter}`}},Vp=xu,Vp.counter=0}});function ga(e,t){return{method:kb(e.commands)||"",commands:t}}function uF(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function W2(e,t,r,n){return i=>{r("%s received %L bytes",t,i),n("%B",i),e.push(i)}}var Wp,fF=V({"src/lib/runners/git-executor-chain.ts"(){"use strict";Ai(),it(),oe(),cF(),Wp=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Vp}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return Sl(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield Xb(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof wr?Object.assign(t,{task:e}):new wr(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return Sl(this,null,function*(){let r=this._plugins.exec("spawn.binary","",ga(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],ga(e,e.commands)),i=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),a=yield this.handleTaskData(e,n,i,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),Yb(e)?Hp(e.parser,a):Hp(e.parser,a.asStrings())})}attemptEmptyTask(e,t){return Sl(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:i,rejection:a,stdOut:s,stdErr:o}=r;return new Promise((l,c)=>{n("Preparing to handle process response exitCode=%d stdOut=",i);let{error:u}=this._plugins.exec("task.error",{error:a},$r($r({},ga(e,t)),r));if(u&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,u,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",Ml(f)),l(new Tl(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(o)))},c);if(u)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,o.length,a),c(u);n.info("retrieving task output complete"),l(new Tl(Buffer.concat(s),Buffer.concat(o)))})}gitResponse(e,t,r,n,i){return Sl(this,null,function*(){let a=i.sibling("output"),s=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},ga(e,e.commands));return new Promise(o=>{let l=[],c=[];i.info("%s %o",t,r),i("%O",s);let u=this._beforeSpawn(e,r);if(u)return o({stdOut:l,stdErr:c,exitCode:9901,rejection:u});this._plugins.exec("spawn.before",void 0,El($r({},ga(e,r)),{kill(d){u=d||u}}));let f=(0,d_.spawn)(t,r,s);f.stdout.on("data",W2(l,"stdOut",i,a.step("stdOut"))),f.stderr.on("data",W2(c,"stdErr",i,a.step("stdErr"))),f.on("error",uF(c,i)),n&&(i("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,El($r({},ga(e,r)),{spawned:f,close(d,h){o({stdOut:l,stdErr:c,exitCode:d,rejection:u||h})},kill(d){f.killed||(u=d,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,El($r({},ga(e,t)),{kill(n){r=n||r}})),r}}}}),h_={};at(h_,{GitExecutor:()=>p_});var p_,dF=V({"src/lib/runners/git-executor.ts"(){"use strict";fF(),p_=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new Wp(this,this._scheduler,this._plugins)}chain(){return new Wp(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function hF(e,t,r=ya){let n=a=>{r(null,a)},i=a=>{(a==null?void 0:a.task)===e&&r(a instanceof Pl?pF(a):a,void 0)};t.then(n,i)}function pF(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=ya};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,i){return i in e||(n[i]={enumerable:!1,configurable:!1,get(){return t(i),e.git[i]}}),n}}var mF=V({"src/lib/task-callback.ts"(){"use strict";Is(),oe()}});function q2(e,t){return Wb(r=>{if(!Qp(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var gF=V({"src/lib/tasks/change-working-directory.ts"(){"use strict";oe(),it()}});function Fp(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=$u(t,"-B")),Wt(t)}function vF(){return{checkout(){return this._runTask(Fp(nr(arguments,1)),et(arguments))},checkoutBranch(e,t){return this._runTask(Fp(["-b",e,t,...nr(arguments)]),et(arguments))},checkoutLocalBranch(e){return this._runTask(Fp(["-b",e,...nr(arguments)]),et(arguments))}}}var yF=V({"src/lib/tasks/checkout.ts"(){"use strict";oe(),it()}});function wF(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function bF(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return ar(wF(),[m_],e)}})}}}var m_,_F=V({"src/lib/tasks/count-objects.ts"(){"use strict";oe(),m_=new ce(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Pb(t);e.hasOwnProperty(n)&&(e[n]=Fe(r))})}});function xF(e){return ar({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},g_,e)}var g_,SF=V({"src/lib/parsers/parse-commit.ts"(){"use strict";oe(),g_=[new ce(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new ce(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new ce(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new ce(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(r,10)||0;n==="-"?e.summary.deletions=i:n==="+"&&(e.summary.insertions=i)})]}});function EF(e,t,r){return{commands:["-c","core.abbrev=40","commit",...Al(e,"-m"),...t,...r],format:"utf-8",parser:xF}}function AF(){return{commit(t,...r){let n=et(arguments),i=e(t)||EF(Sn(t),Sn(En(r[0],Pu,[])),[...En(r[1],Ol,[]),...nr(arguments,0,!0)]);return this._runTask(i,n)}};function e(t){return!Pu(t)&&ir("git.commit: requires the commit message to be supplied as a string/string[]")}}var kF=V({"src/lib/tasks/commit.ts"(){"use strict";SF(),oe(),it()}});function TF(){return{firstCommit(){return this._runTask(Wt(["rev-list","--max-parents=0","HEAD"],!0),et(arguments))}}}var CF=V({"src/lib/tasks/first-commit.ts"(){"use strict";oe(),it()}});function PF(e,t){let r=["hash-object",e];return t&&r.push("-w"),Wt(r,!0)}var RF=V({"src/lib/tasks/hash-object.ts"(){"use strict";it()}});function MF(e,t,r){let n=String(r).trim(),i;if(i=v_.exec(n))return new ku(e,t,!1,i[1]);if(i=y_.exec(n))return new ku(e,t,!0,i[1]);let a="",s=n.split(" ");for(;s.length;)if(s.shift()==="in"){a=s.join(" ");break}return new ku(e,t,/^re/i.test(n),a)}var ku,v_,y_,OF=V({"src/lib/responses/InitSummary.ts"(){"use strict";ku=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},v_=/^Init.+ repository in (.+)$/,y_=/^Rein.+ in (.+)$/}});function IF(e){return e.includes(fm)}function FF(e=!1,t,r){let n=["init",...r];return e&&!IF(n)&&n.splice(1,0,fm),{commands:n,format:"utf-8",parser(i){return MF(n.includes("--bare"),t,i)}}}var fm,$F=V({"src/lib/tasks/init.ts"(){"use strict";OF(),fm="--bare"}});function dm(e){for(let t=0;tar(new w_,t,r,!1)}var $p,Y2,X2,Z2,__,x_=V({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";Il(),DF(),n_(),oe(),$p=[new ce(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:Fe(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new ce(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:Fe(r),after:Fe(n),binary:!0})}),new ce(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=Fe(t),e.insertions=Fe(n==null?void 0:n[1]),e.deletions=Fe(i==null?void 0:i[1])})],Y2=[new ce(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let i=Fe(t),a=Fe(r);e.changed++,e.insertions+=i,e.deletions+=a,e.files.push({file:n,changes:i+a,insertions:i,deletions:a,binary:!1})}),new ce(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],X2=[new ce(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],Z2=[new ce(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,i,a])=>{e.changed++,e.files.push({file:a!=null?a:n,changes:0,insertions:0,deletions:0,binary:!1,status:Bp(tF(t)&&t),from:Bp(!!a&&n!==a&&n),similarity:Fe(r)})})],__={"":$p,"--stat":$p,"--numstat":Y2,"--name-status":Z2,"--name-only":X2}}});function NF(e,t){return t.reduce((r,n,i)=>(r[n]=e[i]||"",r),Object.create({diff:null}))}function S_(e=gm,t=E_,r=""){let n=b_(r);return function(i){let a=Rl(i.trim(),!1,pm).map(function(s){let o=s.split(mm),l=NF(o[0].split(e),t);return o.length>1&&o[1].trim()&&(l.diff=n(o[1])),l});return{all:a,latest:a.length&&a[0]||null,total:a.length}}}var pm,mm,gm,E_,A_=V({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";oe(),x_(),Il(),pm="\xF2\xF2\xF2\xF2\xF2\xF2 ",mm=" \xF2\xF2",gm=" \xF2 ",E_=["hash","date","message","refs","author_name","author_email"]}}),k_={};at(k_,{diffSummaryTask:()=>BF,validateLogFormatConfig:()=>Bu});function BF(e){let t=dm(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Bu(r)||{commands:r,format:"utf-8",parser:b_(t)}}function Bu(e){let t=e.filter(LF);if(t.length>1)return ir(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return ir(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var vm=V({"src/lib/tasks/diff.ts"(){"use strict";Il(),x_(),it()}});function jF(e,t){let r=[],n=[];return Object.keys(e).forEach(i=>{r.push(i),n.push(String(e[i]))}),[r,n.join(t)]}function HF(e){return Object.keys(e).reduce((t,r)=>(r in qp||(t[r]=e[r]),t),{})}function T_(e={},t=[]){let r=En(e.splitter,Mt,gm),n=!em(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[i,a]=jF(n,r),s=[],o=[`--pretty=format:${pm}${a}${mm}`,...t],l=e.n||e["max-count"]||e.maxCount;if(l&&o.push(`--max-count=${l}`),e.from||e.to){let c=e.symmetric!==!1?"...":"..";s.push(`${e.from||""}${c}${e.to||""}`)}return Mt(e.file)&&o.push("--follow",P8(e.file)),nm(HF(e),o),{fields:i,splitter:r,commands:[...o,...s]}}function UF(e,t,r){let n=S_(e,t,dm(r));return{commands:["log",...r],format:"utf-8",parser:n}}function GF(){return{log(...r){let n=et(arguments),i=T_(im(arguments),En(arguments[0],Ol)),a=t(...r)||Bu(i.commands)||e(i);return this._runTask(a,n)}};function e(r){return UF(r.splitter,r.fields,r.commands)}function t(r,n){return Mt(r)&&Mt(n)&&ir("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var qp,C_=V({"src/lib/tasks/log.ts"(){"use strict";Il(),Cl(),A_(),oe(),it(),vm(),qp=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(qp||{})}}),Tu,P_,zF=V({"src/lib/responses/MergeSummary.ts"(){"use strict";Tu=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},P_=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Yp,R_,VF=V({"src/lib/responses/PullSummary.ts"(){"use strict";Yp=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},R_=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Lp(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function K2(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:Fe(t&&t[1]||"0"),delta:Fe(r&&r[1]||"0")}}var M_,WF=V({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";oe(),M_=[new Ei(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=Lp(e.remoteMessages);Object.assign(i,{[n]:Fe(r)})}),new Ei(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=Lp(e.remoteMessages);Object.assign(i,{[n]:Fe(r)})}),new Ei(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let i=Lp(e.remoteMessages);i.total=K2(t),i.reused=K2(r),i.packReused=Fe(n)})]}});function O_(e,t){return ar({remoteMessages:new F_},I_,t)}var I_,F_,$_=V({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";oe(),WF(),I_=[new Ei(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...M_,new Ei([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new Ei([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:Fe(t),summary:r,url:n}})],F_=class{constructor(){this.all=[]}}}});function qF(e,t){let r=ar(new R_,L_,[e,t]);return r.message&&r}var J2,Q2,eb,tb,L_,rb,ym,D_=V({"src/lib/parsers/parse-pull.ts"(){"use strict";VF(),oe(),$_(),J2=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Q2=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,eb=/^(create|delete) mode \d+ (.+)/,tb=[new ce(J2,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new ce(Q2,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new ce(eb,(e,[t,r])=>{Ce(e.files,r),Ce(t==="create"?e.created:e.deleted,r)})],L_=[new ce(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new ce(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new ce(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,i])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=i,e.hash.remote=r})],rb=(e,t)=>ar(new Yp,tb,[e,t]),ym=(e,t)=>Object.assign(new Yp,rb(e,t),O_(e,t))}}),nb,N_,ib,YF=V({"src/lib/parsers/parse-merge.ts"(){"use strict";zF(),oe(),D_(),nb=[new ce(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new ce(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new Tu(t,r))}),new ce(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new Tu(t,r,{deleteRef:n}))}),new ce(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new Tu(t,null))}),new ce(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],N_=(e,t)=>Object.assign(ib(e,t),ym(e,t)),ib=e=>ar(new P_,nb,e)}});function ab(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=N_(t,r);if(n.failed)throw new Pl(n);return n}}:ir("Git.merge requires at least one option")}var XF=V({"src/lib/tasks/merge.ts"(){"use strict";Is(),YF(),it()}});function ZF(e,t,r){let n=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(e),a=!r.includes("new");return{deleted:n,tag:i,branch:!i,new:!a,alreadyUpdated:a,local:e,remote:t}}var sb,B_,ob,KF=V({"src/lib/parsers/parse-push.ts"(){"use strict";oe(),$_(),sb=[new ce(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new ce(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=El($r({},e.ref||{}),{local:t})}),new ce(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(ZF(t,r,n))}),new ce(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=El($r({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new ce(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,i])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:i}}})],B_=(e,t)=>{let r=ob(e,t),n=O_(e,t);return $r($r({},r),n)},ob=(e,t)=>ar({pushed:[]},sb,[e,t])}}),j_={};at(j_,{pushTagsTask:()=>JF,pushTask:()=>wm});function JF(e={},t){return Ce(t,"--tags"),wm(e,t)}function wm(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),$u(r,"-v"),Ce(r,"--verbose"),Ce(r,"--porcelain"),{commands:r,format:"utf-8",parser:B_}}var H_=V({"src/lib/tasks/push.ts"(){"use strict";KF(),oe()}});function QF(){return{showBuffer(){let e=["show",...nr(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(qb(e),et(arguments))},show(){let e=["show",...nr(arguments,1)];return this._runTask(Wt(e),et(arguments))}}}var e4=V({"src/lib/tasks/show.ts"(){"use strict";oe(),it()}}),lb,U_,t4=V({"src/lib/responses/FileStatusSummary.ts"(){"use strict";lb=/^(.+)\0(.+)$/,U_=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=lb.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function cb(e){let[t,r]=e.split(Os);return{from:r||t,to:t}}function yr(e,t,r){return[`${e}${t}`,r]}function Dp(e,...t){return t.map(r=>yr(e,r,(n,i)=>Ce(n.conflicted,i)))}function r4(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(i,a,s){let o=`${i}${a}`,l=G_.get(o);l&&l(e,s),o!=="##"&&o!=="!!"&&e.files.push(new U_(s,i,a))}}var ub,G_,z_,n4=V({"src/lib/responses/StatusSummary.ts"(){"use strict";oe(),t4(),ub=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},G_=new Map([yr(" ","A",(e,t)=>Ce(e.created,t)),yr(" ","D",(e,t)=>Ce(e.deleted,t)),yr(" ","M",(e,t)=>Ce(e.modified,t)),yr("A"," ",(e,t)=>Ce(e.created,t)&&Ce(e.staged,t)),yr("A","M",(e,t)=>Ce(e.created,t)&&Ce(e.staged,t)&&Ce(e.modified,t)),yr("D"," ",(e,t)=>Ce(e.deleted,t)&&Ce(e.staged,t)),yr("M"," ",(e,t)=>Ce(e.modified,t)&&Ce(e.staged,t)),yr("M","M",(e,t)=>Ce(e.modified,t)&&Ce(e.staged,t)),yr("R"," ",(e,t)=>{Ce(e.renamed,cb(t))}),yr("R","M",(e,t)=>{let r=cb(t);Ce(e.renamed,r),Ce(e.modified,r.to)}),yr("!","!",(e,t)=>{Ce(e.ignored=e.ignored||[],t)}),yr("?","?",(e,t)=>Ce(e.not_added,t)),...Dp("A","A","U"),...Dp("D","D","U"),...Dp("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,a=/\.{3}(\S*)/,s=/\son\s([\S]+)$/,o;o=r.exec(t),e.ahead=o&&+o[1]||0,o=n.exec(t),e.behind=o&&+o[1]||0,o=i.exec(t),e.current=o&&o[1],o=a.exec(t),e.tracking=o&&o[1],o=s.exec(t),e.current=o&&o[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),z_=function(e){let t=e.split(Os),r=new ub;for(let n=0,i=t.length;n!V_.includes(r))],parser(r){return z_(r)}}}var V_,a4=V({"src/lib/tasks/status.ts"(){"use strict";n4(),V_=["--null","-z"]}});function Mu(e=0,t=0,r=0,n="",i=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function s4(){return Mu(0,0,0,"",!1)}function o4(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:l4,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(bm));n(t)}})}}}function l4(e){return e===bm?s4():ar(Mu(0,0,0,e),W_,e)}var bm,W_,c4=V({"src/lib/tasks/version.ts"(){"use strict";oe(),bm="installed=false",W_=[new ce(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,i=""])=>{Object.assign(e,Mu(Fe(t),Fe(r),Fe(n),i))}),new ce(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,i=""])=>{Object.assign(e,Mu(Fe(t),Fe(r),n,i))})]}}),q_={};at(q_,{SimpleGitApi:()=>Xp});var Xp,u4=V({"src/lib/simple-git-api.ts"(){"use strict";mF(),gF(),yF(),_F(),kF(),t_(),CF(),s_(),RF(),$F(),C_(),XF(),H_(),e4(),a4(),it(),c4(),oe(),Xp=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&hF(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(Wt(["add",...Sn(e)]),et(arguments))}cwd(e){let t=et(arguments);return typeof e=="string"?this._runTask(q2(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(q2(e.path,e.root&&this._executor||void 0),t):this._runTask(ir("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(PF(e,t===!0),et(arguments))}init(e){return this._runTask(FF(e===!0,this._executor.cwd,nr(arguments)),et(arguments))}merge(){return this._runTask(ab(nr(arguments)),et(arguments))}mergeFromTo(e,t){return Mt(e)&&Mt(t)?this._runTask(ab([e,t,...nr(arguments)]),et(arguments,!1)):this._runTask(ir("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=wm({remote:En(arguments[0],Mt),branch:En(arguments[1],Mt)},nr(arguments));return this._runTask(e,et(arguments))}stash(){return this._runTask(Wt(["stash",...nr(arguments)]),et(arguments))}status(){return this._runTask(i4(nr(arguments)),et(arguments))}},Object.assign(Xp.prototype,vF(),AF(),eF(),bF(),TF(),iF(),GF(),QF(),o4())}}),Y_={};at(Y_,{Scheduler:()=>Z_});var fb,Z_,f4=V({"src/lib/runners/scheduler.ts"(){"use strict";oe(),f_(),fb=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,X_.createDeferred)();return{promise:t,done:r,id:e}}})(),Z_=class{constructor(e=2){this.concurrency=e,this.logger=um("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=Ce(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),$u(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=Ce(this.pending,fb());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),K_={};at(K_,{applyPatchTask:()=>d4});function d4(e,t){return Wt(["apply",...t,...e])}var h4=V({"src/lib/tasks/apply-patch.ts"(){"use strict";it()}});function p4(e,t){return{branch:e,hash:t,success:!0}}function m4(e){return{branch:e,hash:null,success:!1}}var J_,g4=V({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";J_=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Q_(e,t){return t===1&&Zp.test(e)}var db,Zp,hb,ju,v4=V({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";g4(),oe(),db=/(\S+)\s+\(\S+\s([^)]+)\)/,Zp=/^error[^']+'([^']+)'/m,hb=[new ce(db,(e,[t,r])=>{let n=p4(t,r);e.all.push(n),e.branches[t]=n}),new ce(Zp,(e,[t])=>{let r=m4(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],ju=(e,t)=>ar(new J_,hb,[e,t])}}),ex,y4=V({"src/lib/responses/BranchSummary.ts"(){"use strict";ex=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,i){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:i}}}}});function pb(e){return e?e.charAt(0):""}function tx(e){return ar(new ex,rx,e)}var rx,w4=V({"src/lib/parsers/parse-branch.ts"(){"use strict";y4(),oe(),rx=[new ce(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,i])=>{e.push(pb(t),!0,r,n,i)}),new ce(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,i])=>{e.push(pb(t),!1,r,n,i)})]}}),nx={};at(nx,{branchLocalTask:()=>_4,branchTask:()=>b4,containsDeleteBranchCommand:()=>ix,deleteBranchTask:()=>S4,deleteBranchesTask:()=>x4});function ix(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function b4(e){let t=ix(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,i){return t?ju(n,i).all[0]:tx(n)}}}function _4(){return{format:"utf-8",commands:["branch","-v"],parser:tx}}function x4(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return ju(r,n)},onError({exitCode:r,stdOut:n},i,a,s){if(!Q_(String(i),r))return s(i);a(n)}}}function S4(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,i){return ju(n,i).branches[e]},onError({exitCode:n,stdErr:i,stdOut:a},s,o,l){if(!Q_(String(s),n))return l(s);throw new Pl(r.parser(kl(a),kl(i)),String(s))}};return r}var E4=V({"src/lib/tasks/branch.ts"(){"use strict";Is(),v4(),w4(),oe()}}),ax,A4=V({"src/lib/responses/CheckIgnore.ts"(){"use strict";ax=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),sx={};at(sx,{checkIgnoreTask:()=>k4});function k4(e){return{commands:["check-ignore",...e],format:"utf-8",parser:ax}}var T4=V({"src/lib/tasks/check-ignore.ts"(){"use strict";A4()}}),ox={};at(ox,{cloneMirrorTask:()=>P4,cloneTask:()=>lx});function C4(e){return/^--upload-pack(=|$)/.test(e)}function lx(e,t,r){let n=["clone",...r];return Mt(e)&&n.push(e),Mt(t)&&n.push(t),n.find(C4)?ir("git.fetch: potential exploit argument blocked."):Wt(n)}function P4(e,t,r){return Ce(r,"--mirror"),lx(e,t,r)}var R4=V({"src/lib/tasks/clone.ts"(){"use strict";it(),oe()}});function M4(e,t){return ar({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},cx,[e,t])}var cx,O4=V({"src/lib/parsers/parse-fetch.ts"(){"use strict";oe(),cx=[new ce(/From (.+)$/,(e,[t])=>{e.remote=t}),new ce(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new ce(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new ce(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new ce(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,i])=>{e.updated.push({name:n,tracking:i,to:r,from:t})})]}}),ux={};at(ux,{fetchTask:()=>F4});function I4(e){return/^--upload-pack(=|$)/.test(e)}function F4(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(I4)?ir("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:M4}}var $4=V({"src/lib/tasks/fetch.ts"(){"use strict";O4(),it()}});function L4(e){return ar({moves:[]},fx,e)}var fx,D4=V({"src/lib/parsers/parse-move.ts"(){"use strict";oe(),fx=[new ce(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),dx={};at(dx,{moveTask:()=>N4});function N4(e,t){return{commands:["mv","-v",...Sn(e),t],format:"utf-8",parser:L4}}var B4=V({"src/lib/tasks/move.ts"(){"use strict";D4(),oe()}}),hx={};at(hx,{pullTask:()=>j4});function j4(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(i,a){return ym(i,a)},onError(i,a,s,o){let l=qF(kl(i.stdOut),kl(i.stdErr));if(l)return o(new Pl(l));o(a)}}}var H4=V({"src/lib/tasks/pull.ts"(){"use strict";Is(),D_(),oe()}});function U4(e){let t={};return px(e,([r])=>t[r]={name:r}),Object.values(t)}function G4(e){let t={};return px(e,([r,n,i])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),i&&n&&(t[r].refs[i.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function px(e,t){Jp(e,r=>t(r.split(/\s+/)))}var z4=V({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";oe()}}),mx={};at(mx,{addRemoteTask:()=>V4,getRemotesTask:()=>W4,listRemotesTask:()=>q4,remoteTask:()=>Y4,removeRemoteTask:()=>X4});function V4(e,t,r){return Wt(["remote","add",...r,e,t])}function W4(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?G4:U4}}function q4(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),Wt(t)}function Y4(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),Wt(t)}function X4(e){return Wt(["remote","remove",e])}var Z4=V({"src/lib/tasks/remote.ts"(){"use strict";z4(),it()}}),gx={};at(gx,{stashListTask:()=>K4});function K4(e={},t){let r=T_(e),n=["stash","list",...r.commands,...t],i=S_(r.splitter,r.fields,dm(n));return Bu(n)||{commands:n,format:"utf-8",parser:i}}var J4=V({"src/lib/tasks/stash-list.ts"(){"use strict";Il(),A_(),vm(),C_()}}),vx={};at(vx,{addSubModuleTask:()=>Q4,initSubModuleTask:()=>e$,subModuleTask:()=>Hu,updateSubModuleTask:()=>t$});function Q4(e,t){return Hu(["add",e,t])}function e$(e){return Hu(["init",...e])}function Hu(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),Wt(t)}function t$(e){return Hu(["update",...e])}var r$=V({"src/lib/tasks/sub-module.ts"(){"use strict";it()}});function n$(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?yx(e,t):0}function yx(e,t){return e===t?0:e>t?1:-1}function i$(e){return e.trim()}function Su(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var mb,wx,a$=V({"src/lib/responses/TagList.ts"(){"use strict";mb=class{constructor(e,t){this.all=e,this.latest=t}},wx=function(e,t=!1){let r=e.split(` -`).map(i$).filter(Boolean);t||r.sort(function(i,a){let s=i.split("."),o=a.split(".");if(s.length===1||o.length===1)return n$(Su(s[0]),Su(o[0]));for(let l=0,c=Math.max(s.length,o.length);li.indexOf(".")>=0);return new mb(r,n)}}}),bx={};at(bx,{addAnnotatedTagTask:()=>l$,addTagTask:()=>o$,tagListTask:()=>s$});function s$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return wx(r,t)}}}function o$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function l$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var c$=V({"src/lib/tasks/tag.ts"(){"use strict";a$()}}),u$=T8({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(dF(),Qe(h_)),{SimpleGitApi:n}=(u4(),Qe(q_)),{Scheduler:i}=(f4(),Qe(Y_)),{configurationErrorTask:a}=(it(),Qe(Gp)),{asArray:s,filterArray:o,filterPrimitives:l,filterString:c,filterStringOrStringArray:u,filterType:f,getTrailingOptions:d,trailingFunctionArgument:h,trailingOptionsArgument:p}=(oe(),Qe(Db)),{applyPatchTask:m}=(h4(),Qe(K_)),{branchTask:v,branchLocalTask:y,deleteBranchesTask:b,deleteBranchTask:x}=(E4(),Qe(nx)),{checkIgnoreTask:E}=(T4(),Qe(sx)),{checkIsRepoTask:_}=(Hb(),Qe(Nb)),{cloneTask:k,cloneMirrorTask:w}=(R4(),Qe(ox)),{cleanWithOptionsTask:A,isCleanOptionsArray:S}=(Jb(),Qe(Zb)),{diffSummaryTask:T}=(vm(),Qe(k_)),{fetchTask:P}=($4(),Qe(ux)),{moveTask:I}=(B4(),Qe(dx)),{pullTask:N}=(H4(),Qe(hx)),{pushTagsTask:L}=(H_(),Qe(j_)),{addRemoteTask:ee,getRemotesTask:fe,listRemotesTask:J,remoteTask:Q,removeRemoteTask:Pe}=(Z4(),Qe(mx)),{getResetMode:ge,resetTask:z}=(u_(),Qe(o_)),{stashListTask:Y}=(J4(),Qe(gx)),{addSubModuleTask:O,initSubModuleTask:he,subModuleTask:ze,updateSubModuleTask:gt}=(r$(),Qe(vx)),{addAnnotatedTagTask:Re,addTagTask:ct,tagListTask:rt}=(c$(),Qe(bx)),{straightThroughBufferTask:Et,straightThroughStringTask:Ie}=(it(),Qe(Gp));function H(D,q){this._plugins=q,this._executor=new r(D.baseDir,new i(D.maxConcurrentProcesses),q),this._trimmed=D.trimmed}(H.prototype=Object.create(n.prototype)).constructor=H,H.prototype.customBinary=function(D){return this._plugins.reconfigure("binary",D),this},H.prototype.env=function(D,q){return arguments.length===1&&typeof D=="object"?this._executor.env=D:(this._executor.env=this._executor.env||{})[D]=q,this},H.prototype.stashList=function(D){return this._runTask(Y(p(arguments)||{},o(D)&&D||[]),h(arguments))};function Je(D,q,ve,Ne){return typeof ve!="string"?a(`git.${D}() requires a string 'repoPath'`):q(ve,f(Ne,c),d(arguments))}H.prototype.clone=function(){return this._runTask(Je("clone",k,...arguments),h(arguments))},H.prototype.mirror=function(){return this._runTask(Je("mirror",w,...arguments),h(arguments))},H.prototype.mv=function(D,q){return this._runTask(I(D,q),h(arguments))},H.prototype.checkoutLatestTag=function(D){var q=this;return this.pull(function(){q.tags(function(ve,Ne){q.checkout(Ne.latest,D)})})},H.prototype.pull=function(D,q,ve,Ne){return this._runTask(N(f(D,c),f(q,c),d(arguments)),h(arguments))},H.prototype.fetch=function(D,q){return this._runTask(P(f(D,c),f(q,c),d(arguments)),h(arguments))},H.prototype.silent=function(D){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},H.prototype.tags=function(D,q){return this._runTask(rt(d(arguments)),h(arguments))},H.prototype.rebase=function(){return this._runTask(Ie(["rebase",...d(arguments)]),h(arguments))},H.prototype.reset=function(D){return this._runTask(z(ge(D),d(arguments)),h(arguments))},H.prototype.revert=function(D){let q=h(arguments);return typeof D!="string"?this._runTask(a("Commit must be a string"),q):this._runTask(Ie(["revert",...d(arguments,0,!0),D]),q)},H.prototype.addTag=function(D){let q=typeof D=="string"?ct(D):a("Git.addTag requires a tag name");return this._runTask(q,h(arguments))},H.prototype.addAnnotatedTag=function(D,q){return this._runTask(Re(D,q),h(arguments))},H.prototype.deleteLocalBranch=function(D,q,ve){return this._runTask(x(D,typeof q=="boolean"?q:!1),h(arguments))},H.prototype.deleteLocalBranches=function(D,q,ve){return this._runTask(b(D,typeof q=="boolean"?q:!1),h(arguments))},H.prototype.branch=function(D,q){return this._runTask(v(d(arguments)),h(arguments))},H.prototype.branchLocal=function(D){return this._runTask(y(),h(arguments))},H.prototype.raw=function(D){let q=!Array.isArray(D),ve=[].slice.call(q?arguments:D,0);for(let bt=0;bte.removeEventListener("abort",a))}}]:void 0}function h$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function p$(e,t){if(h$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new qn(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function m$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new qn(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new qn(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new qn(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function g$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((i,a)=>{let s=aNp(i))).then(s.done)}return{type:"spawn.after",action(i,a){return Sl(this,arguments,function*(s,{spawned:o,close:l}){var c,u;let f=r(),d=!0,h=()=>void(d=!1);(c=o.stdout)==null||c.on("data",h),(u=o.stderr)==null||u.on("data",h),o.on("error",h),o.on("close",p=>f.close(p)),o.on("exit",p=>f.exit(p));try{yield f.result,d&&(yield Np(50)),l(f.exitCode)}catch(p){l(f.exitCode,p)}})}}}oe();var w$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",vb="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function b$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function yb(e,t){if(e.length<1||e.length>2)throw new qn(void 0,"binary",w$);if(e.some(b$))if(t)console.warn(vb);else throw new qn(void 0,"binary",vb);let[n,i]=e;return{binary:n,prefix:i}}function _$(e,t=["git"],r=!1){let n=yb(Sn(t),r);e.on("binary",i=>{n=yb(Sn(i),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",i=>n.prefix?[n.prefix,...i]:i)}Ai();function x$(e){return!!(e.exitCode&&e.stdErr.length)}function S$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function E$(e=!1,t=x$,r=S$){return(n,i)=>!e&&n||!t(i)?n:r(i)}function wb(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new wr(void 0,n.toString("utf-8"))}:{error:n}}}}oe();var A$=class{constructor(){this.plugins=new Set,this.events=new _x.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=Ce(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Sn(e).forEach(r=>r&&this.plugins.add(Ce(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,i=Object.freeze(Object.create(r));for(let a of this.plugins)a.type===e&&(n=a.action(n,i));return n}};oe();function k$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(a,s){return r.includes(s.method)?Cb(a,t):a}},{type:"spawn.after",action(a,s){var o;s.commands.includes(t)&&((o=s.spawned.stderr)==null||o.on("data",l=>{let c=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(l.toString("utf8"));c&&e({method:s.method,stage:T$(c[1]),progress:Fe(c[2]),processed:Fe(c[3]),total:Fe(c[4])})}))}}]}function T$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}oe();function C$(e){let t=Mb(e,["uid","gid"]);return{type:"spawn.options",action(r){return $r($r({},t),r)}}}function P$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,i){var a,s;let o;function l(){o&&clearTimeout(o),o=setTimeout(u,e)}function c(){var f,d;(f=i.spawned.stdout)==null||f.off("data",l),(d=i.spawned.stderr)==null||d.off("data",l),i.spawned.off("exit",c),i.spawned.off("close",c),o&&clearTimeout(o)}function u(){c(),i.kill(new qn(void 0,"timeout","block timeout reached"))}r&&((a=i.spawned.stdout)==null||a.on("data",l)),t&&((s=i.spawned.stderr)==null||s.on("data",l)),i.spawned.on("exit",c),i.spawned.on("close",c),l()}}}Cl();function R$(){return{type:"spawn.args",action(e){let t=[],r;function n(i){(r=r||[]).push(...i)}for(let i=0;iCu(s)&&G2(s)||s));break}t.push(a)}return r?[...t,"--",...r.map(String)]:t}}}oe();var M$=u$();function O$(e,t){var r;let n=new A$,i=$b(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!Qp(i.baseDir))throw new f$(i,"Cannot use simple-git on a directory that does not exist");return Array.isArray(i.config)&&n.add(v$(i.config)),n.add(g$(i.unsafe)),n.add(R$()),n.add(y$(i.completion)),i.abort&&n.add(d$(i.abort)),i.progress&&n.add(k$(i.progress)),i.timeout&&n.add(P$(i.timeout)),i.spawnOptions&&n.add(C$(i.spawnOptions)),n.add(wb(E$(!0))),i.errors&&n.add(wb(i.errors)),_$(n,i.binary,(r=i.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new M$(i,n)}Is();var xx=O$;g();var Sx=require("obsidian"),Uu="YYYY-MM-DD",_m=`${Uu} HH:mm`,xm=`${Uu} HH:mm:ss`,Gu=40,Fs="conflict-files-obsidian-git.md",je={commitMessage:"vault backup: {{date}}",autoCommitMessage:"vault backup: {{date}}",commitMessageScript:"",commitDateFormat:xm,autoSaveInterval:0,autoPushInterval:0,autoPullInterval:0,autoPullOnBoot:!1,disablePush:!1,pullBeforePush:!0,disablePopups:!1,showErrorNotices:!0,disablePopupsForNoChanges:!1,listChangedFilesInMessageBody:!1,showStatusBar:!0,updateSubmodules:!1,syncMethod:"merge",customMessageOnAutoBackup:!1,autoBackupAfterFileChange:!1,treeStructure:!1,refreshSourceControl:Sx.Platform.isDesktopApp,basePath:"",differentIntervalCommitAndPush:!1,changedFilesInStatusBar:!1,showedMobileNotice:!1,refreshSourceControlTimer:7e3,showBranchStatusBar:!0,setLastSaveToLastCommit:!1,submoduleRecurseCheckout:!1,gitDir:"",showFileMenu:!0,authorInHistoryView:"hide",dateInHistoryView:!1,diffStyle:"split",lineAuthor:{show:!1,followMovement:"inactive",authorDisplay:"initials",showCommitHash:!1,dateTimeFormatOptions:"date",dateTimeFormatCustomString:_m,dateTimeTimezone:"viewer-local",coloringMaxAge:"1y",colorNew:{r:255,g:150,b:150},colorOld:{r:120,g:160,b:255},textColorCss:"var(--text-muted)",ignoreWhitespace:!1,gutterSpacingFallbackLength:5}},kt={type:"git-view",name:"Source Control",icon:"git-pull-request"},Lr={type:"git-history-view",name:"History",icon:"history"},ki={type:"split-diff-view",name:"Diff view",icon:"diff"},Ti={type:"diff-view",name:"Diff View",icon:"git-pull-request"},zu="C:\\Program Files\\Git\\cmd\\git.exe",Vu="git_credentials_input",wa="obsidian_askpass.sh",Ex=`#!/bin/sh +`);if(i=a.shift(),!i.startsWith("unpack "))throw new Va('unpack ok" or "unpack [error message]',i);e.ok=i==="unpack ok",e.ok||(e.error=i.slice(7)),e.refs={};for(let s of a){if(s.trim()==="")continue;let o=s.slice(0,2),l=s.slice(3),c=l.indexOf(" ");c===-1&&(c=l.length);let u=l.slice(0,c),f=l.slice(c+1);e.refs[u]={ok:o==="ok",error:f}}return e}async function RD({capabilities:t=[],triplets:e=[]}){let r=[],n=`\0 ${t.join(" ")}`;for(let i of e)r.push(Qe.encode(`${i.oldoid} ${i.oid} ${i.fullRef}${n} +`)),n="";return r.push(Qe.flush()),r}async function MD({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPrePush:l,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p=!1,delete:g=!1,corsProxy:v,headers:y={}}){let b=u||await sa({fs:t,gitdir:c});if(typeof b=="undefined")throw new dr("ref");let E=await nt.get({fs:t,gitdir:c});d=d||await E.get(`branch.${b}.pushRemote`)||await E.get("remote.pushDefault")||await E.get(`branch.${b}.remote`)||"origin";let S=h||await E.get(`remote.${d}.pushurl`)||await E.get(`remote.${d}.url`);if(typeof S=="undefined")throw new dr("remote OR url");let A=f||await E.get(`branch.${b}.merge`);if(typeof S=="undefined")throw new dr("remoteRef");v===void 0&&(v=await E.get("http.corsProxy"));let k=await V.expand({fs:t,gitdir:c,ref:b}),w=g?"0000000000000000000000000000000000000000":await V.resolve({fs:t,gitdir:c,ref:k}),x=go.getRemoteHelperFor({url:S}),_=await x.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:v,service:"git-receive-pack",url:S,headers:y,protocolVersion:1}),T=_.auth,C;if(!A)C=k;else try{C=await V.expandAgainstMap({ref:A,map:_.refs})}catch(q){if(q instanceof je)C=A.startsWith("refs/")?A:`refs/heads/${A}`;else throw q}let I=_.refs.get(C)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:d,url:S,localRef:{ref:g?"(delete)":k,oid:w},remoteRef:{ref:C,oid:I}}))throw new uo;let L=!_.capabilities.has("no-thin"),F=new Set;if(!g){let q=[..._.refs.values()],B=new Set;if(I!=="0000000000000000000000000000000000000000"){let Fe=await pg({fs:t,cache:e,gitdir:c,oids:[w,I]});for(let lr of Fe)q.push(lr);L&&(B=await Xm({fs:t,cache:e,gitdir:c,oids:Fe}))}if(!q.includes(w)){let Fe=await CD({fs:t,cache:e,gitdir:c,start:[w],finish:q});F=await Xm({fs:t,cache:e,gitdir:c,oids:Fe})}if(L){try{let Fe=await V.resolve({fs:t,gitdir:c,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:lr}=await V.resolveAgainstMap({ref:Fe.replace(`refs/remotes/${d}/`,""),fullref:Fe,map:_.refs}),Ut=[lr];for(let X of await Xm({fs:t,cache:e,gitdir:c,oids:Ut}))B.add(X)}catch(Fe){}for(let Fe of B)F.delete(Fe)}if(w===I&&(p=!0),!p){if(k.startsWith("refs/tags")&&I!=="0000000000000000000000000000000000000000")throw new co("tag-exists");if(w!=="0000000000000000000000000000000000000000"&&I!=="0000000000000000000000000000000000000000"&&!await RS({fs:t,cache:e,gitdir:c,oid:w,ancestor:I,depth:-1}))throw new co("not-fast-forward")}}let J=nS([..._.capabilities],["report-status","side-band-64k",`agent=${Bf.agent}`]),de=await RD({capabilities:J,triplets:[{oldoid:I,oid:w,fullRef:C}]}),le=g?[]:await zS({fs:t,cache:e,gitdir:c,oids:[...F]}),ce=await x.connect({http:r,onProgress:n,corsProxy:v,service:"git-receive-pack",url:S,auth:T,headers:y,body:[...de,...le]}),{packfile:Te,progress:ne}=await Ff.demux(ce.body);if(i){let q=iS(ne);uc(q,async B=>{await i(B)})}let N=await PD(Te);if(ce.headers&&(N.headers=ce.headers),d&&N.ok&&N.refs[C].ok&&!k.startsWith("refs/tags")){let q=`refs/remotes/${d}/${C.replace("refs/heads","")}`;g?await V.deleteRef({fs:t,gitdir:c,ref:q}):await V.writeRef({fs:t,gitdir:c,ref:q,value:w})}if(N.ok&&Object.values(N.refs).every(q=>q.ok))return N;{let q=Object.entries(N.refs).filter(([B,Fe])=>!Fe.ok).map(([B,Fe])=>` + - ${B}: ${Fe.error}`).join("");throw new Ql(q,N)}}async function qS({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,dir:l,gitdir:c=$.join(l,".git"),ref:u,remoteRef:f,remote:d="origin",url:h,force:p=!1,delete:g=!1,corsProxy:v,headers:y={},cache:b={}}){try{return P("fs",t),P("http",e),P("gitdir",c),await MD({fs:new Q(t),cache:b,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p,delete:g,corsProxy:v,headers:y})}catch(E){throw E.caller="git.push",E}}async function YS({fs:t,cache:e,gitdir:r,oid:n}){let{type:i,object:a}=await Ge({fs:t,cache:e,gitdir:r,oid:n});if(i==="tag")return n=Rr.from(a).parse().object,YS({fs:t,cache:e,gitdir:r,oid:n});if(i!=="blob")throw new tr(n,i,"blob");return{oid:n,blob:new Uint8Array(a)}}async function XS({fs:t,cache:e,gitdir:r,oid:n,filepath:i=void 0}){return i!==void 0&&(n=await lc({fs:t,cache:e,gitdir:r,oid:n,filepath:i})),await YS({fs:t,cache:e,gitdir:r,oid:n})}async function KS({fs:t,dir:e,gitdir:r=$.join(e,".git"),oid:n,filepath:i,cache:a={}}){try{return P("fs",t),P("gitdir",r),P("oid",n),await XS({fs:new Q(t),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readBlob",s}}async function mg({fs:t,dir:e,gitdir:r=$.join(e,".git"),oid:n,cache:i={}}){try{return P("fs",t),P("gitdir",r),P("oid",n),await po({fs:new Q(t),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readCommit",a}}async function OD({fs:t,cache:e,gitdir:r,ref:n="refs/notes/commits",oid:i}){let a=await V.resolve({gitdir:r,fs:t,ref:n}),{blob:s}=await XS({fs:t,cache:e,gitdir:r,oid:a,filepath:i});return s}async function ZS({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n="refs/notes/commits",oid:i,cache:a={}}){try{return P("fs",t),P("gitdir",r),P("ref",n),P("oid",i),await OD({fs:new Q(t),cache:a,gitdir:r,ref:n,oid:i})}catch(s){throw s.caller="git.readNote",s}}async function JS({fs:t,dir:e,gitdir:r=$.join(e,".git"),oid:n,format:i="parsed",filepath:a=void 0,encoding:s=void 0,cache:o={}}){try{P("fs",t),P("gitdir",r),P("oid",n);let l=new Q(t);a!==void 0&&(n=await lc({fs:l,cache:o,gitdir:r,oid:n,filepath:a}));let u=await Ge({fs:l,cache:o,gitdir:r,oid:n,format:i==="parsed"?"content":i});if(u.oid=n,i==="parsed")switch(u.format="parsed",u.type){case"commit":u.object=pr.from(u.object).parse();break;case"tree":u.object=hr.from(u.object).entries();break;case"blob":s?u.object=u.object.toString(s):(u.object=new Uint8Array(u.object),u.format="content");break;case"tag":u.object=Rr.from(u.object).parse();break;default:throw new tr(u.oid,u.type,"blob|commit|tag|tree")}else(u.format==="deflated"||u.format==="wrapped")&&(u.type=u.format);return u}catch(l){throw l.caller="git.readObject",l}}async function ID({fs:t,cache:e,gitdir:r,oid:n}){let{type:i,object:a}=await Ge({fs:t,cache:e,gitdir:r,oid:n,format:"content"});if(i!=="tag")throw new tr(n,i,"tag");let s=Rr.from(a);return{oid:n,tag:s.parse(),payload:s.payload()}}async function QS({fs:t,dir:e,gitdir:r=$.join(e,".git"),oid:n,cache:i={}}){try{return P("fs",t),P("gitdir",r),P("oid",n),await ID({fs:new Q(t),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readTag",a}}async function eE({fs:t,dir:e,gitdir:r=$.join(e,".git"),oid:n,filepath:i=void 0,cache:a={}}){try{return P("fs",t),P("gitdir",r),P("oid",n),await wo({fs:new Q(t),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readTree",s}}async function tE({fs:t,dir:e,gitdir:r=$.join(e,".git"),filepath:n,cache:i={}}){try{P("fs",t),P("gitdir",r),P("filepath",n),await ct.acquire({fs:new Q(t),gitdir:r,cache:i},async function(a){a.delete({filepath:n})})}catch(a){throw a.caller="git.remove",a}}async function $D({fs:t,cache:e,onSign:r,gitdir:n,ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l}){let c;try{c=await V.resolve({gitdir:n,fs:t,ref:i})}catch(p){if(!(p instanceof je))throw p}let f=(await wo({fs:t,gitdir:n,oid:c||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==a);let d=await cc({fs:t,gitdir:n,tree:f});return await Nf({fs:t,cache:e,onSign:r,gitdir:n,ref:i,tree:d,parent:c&&[c],message:`Note removed by 'isomorphic-git removeNote' +`,author:s,committer:o,signingKey:l})}async function rE({fs:t,onSign:e,dir:r,gitdir:n=$.join(r,".git"),ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l,cache:c={}}){try{P("fs",t),P("gitdir",n),P("oid",a);let u=new Q(t),f=await ia({fs:u,gitdir:n,author:s});if(!f)throw new zt("author");let d=await ho({fs:u,gitdir:n,author:f,committer:o});if(!d)throw new zt("committer");return await $D({fs:u,cache:c,onSign:e,gitdir:n,ref:i,oid:a,author:f,committer:d,signingKey:l})}catch(u){throw u.caller="git.removeNote",u}}async function FD({fs:t,gitdir:e,oldref:r,ref:n,checkout:i=!1}){if(n!==zn.clean(n))throw new mn(n,zn.clean(n));if(r!==zn.clean(r))throw new mn(r,zn.clean(r));let a=`refs/heads/${r}`,s=`refs/heads/${n}`;if(await V.exists({fs:t,gitdir:e,ref:s}))throw new pn("branch",n,!1);let l=await V.resolve({fs:t,gitdir:e,ref:a,depth:1});await V.writeRef({fs:t,gitdir:e,ref:s,value:l}),await V.deleteRef({fs:t,gitdir:e,ref:a});let u=await sa({fs:t,gitdir:e,fullname:!0})===a;(i||u)&&await V.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:s})}async function nE({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n,oldref:i,checkout:a=!1}){try{return P("fs",t),P("gitdir",r),P("ref",n),P("oldref",i),await FD({fs:new Q(t),gitdir:r,ref:n,oldref:i,checkout:a})}catch(s){throw s.caller="git.renameBranch",s}}async function iE({gitdir:t,type:e,object:r}){return bi(ea.wrap({type:e,object:r}))}async function aE({fs:t,dir:e,gitdir:r=$.join(e,".git"),filepath:n,ref:i,cache:a={}}){try{P("fs",t),P("gitdir",r),P("filepath",n);let s=new Q(t),o,l;try{o=await V.resolve({fs:s,gitdir:r,ref:i||"HEAD"})}catch(f){if(i)throw f}if(o)try{o=await lc({fs:s,cache:a,gitdir:r,oid:o,filepath:n})}catch(f){o=null}let c={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},u=e&&await s.read($.join(e,n));u&&(l=await iE({gitdir:r,type:"blob",object:u}),o===l&&(c=await s.lstat($.join(e,n)))),await ct.acquire({fs:s,gitdir:r,cache:a},async function(f){f.delete({filepath:n}),o&&f.insert({filepath:n,stats:c,oid:o})})}catch(s){throw s.caller="git.reset",s}}async function sE({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n,depth:i}){try{return P("fs",t),P("gitdir",r),P("ref",n),await V.resolve({fs:new Q(t),gitdir:r,ref:n,depth:i})}catch(a){throw a.caller="git.resolveRef",a}}async function oE({fs:t,dir:e,gitdir:r=$.join(e,".git"),path:n,value:i,append:a=!1}){try{P("fs",t),P("gitdir",r),P("path",n);let s=new Q(t),o=await nt.get({fs:s,gitdir:r});a?await o.append(n,i):await o.set(n,i),await nt.save({fs:s,gitdir:r,config:o})}catch(s){throw s.caller="git.setConfig",s}}async function lE({fs:t,gitdir:e,commit:r}){let n=pr.from(r).toObject();return await mr({fs:t,gitdir:e,type:"commit",object:n,format:"content"})}var Df=class t{static get timezoneOffsetForRefLogEntry(){let e=new Date().getTimezoneOffset(),r=Math.abs(Math.floor(e/60)),n=Math.abs(e%60).toString().padStart(2,"0");return`${e>0?"-":"+"}${r.toString().padStart(2,"0")}${n}`}static createStashReflogEntry(e,r,n){let i=e.name.replace(/\s/g,""),a="0000000000000000000000000000000000000000",s=Math.floor(Date.now()/1e3),o=t.timezoneOffsetForRefLogEntry;return`${a} ${r} ${i} ${e.email} ${s} ${o} ${n} +`}static getStashReflogEntry(e,r=!1){return e.split(` +`).filter(a=>a).reverse().map((a,s)=>r?`stash@{${s}}: ${a.split(" ")[1]}`:a)}},DD={stage:Ya,workdir:yo},Km;async function vo(t,e){return Km===void 0&&(Km=new zl),Km.acquire(t,e)}async function LD(t,e,r,n,i=null){let a=$.join(r,n),s=await t.lstat(a);if(!s)throw new je(a);if(s.isDirectory())throw new pe(`${a}: file expected, but found directory`);let o=i?await Lx({fs:t,gitdir:e,oid:i}):void 0,l=o?i:void 0;return o||await vo({fs:t,gitdir:e,currentFilepath:a},async()=>{let c=s.isSymbolicLink()?await t.readlink(a).then(zx):await t.read(a);if(c===null)throw new je(a);l=await mr({fs:t,gitdir:e,type:"blob",object:c})}),l}async function jD({fs:t,dir:e,gitdir:r,entries:n}){async function i(a){if(a.type==="tree"){if(!a.oid){let s=await Promise.all(a.children.map(i));a.oid=await cc({fs:t,gitdir:r,tree:s}),a.mode=16384}}else a.type==="blob"&&(a.oid=await LD(t,r,e,a.path,a.oid),a.mode=33188);return a.path=a.path.split("/").pop(),a}return Promise.all(n.map(i))}async function Rx({fs:t,dir:e,gitdir:r,treePair:n}){let i=n[1]==="stage",a=n.map(h=>typeof h=="string"?DD[h]():h),s=[],u=await ra({fs:t,cache:{},dir:e,gitdir:r,trees:a,map:async(h,[p,g])=>{if(!(h==="."||await na.isIgnored({fs:t,dir:e,gitdir:r,filepath:h}))&&g)return(!p||await p.oid()!==await g.oid()&&await g.oid()!==void 0)&&s.push([p,g]),{mode:await g.mode(),path:h,oid:await g.oid(),type:await g.type()}},reduce:async(h,p)=>(p=p.filter(Boolean),h?(h.children=p,h):p.length>0?p:void 0),iterate:async(h,p)=>{let g=[];for(let v of p){let[y,b]=v;i?b&&(await t.exists(`${e}/${b.toString()}`)?g.push(v):s.push([null,b])):y&&(b?g.push(v):s.push([y,null]))}return g.length?Promise.all(g.map(h)):[]}});if(s.length===0||u.length===0)return null;let d=(await jD({fs:t,dir:e,gitdir:r,entries:u})).filter(Boolean).map(h=>({mode:h.mode,path:h.path,oid:h.oid,type:h.type}));return cc({fs:t,gitdir:r,tree:d})}async function ND({fs:t,dir:e,gitdir:r,stashCommit:n,parentCommit:i,wasStaged:a}){let s=[],o=[],l=await ra({fs:t,cache:{},dir:e,gitdir:r,trees:[Pr({ref:i}),Pr({ref:n})],map:async(c,[u,f])=>{if(c==="."||await na.isIgnored({fs:t,dir:e,gitdir:r,filepath:c}))return;let d=f?await f.type():await u.type();if(d!=="tree"&&d!=="blob")return;if(!f&&u){let p=d==="tree"?"rmdir":"rm";return d==="tree"&&s.push(c),d==="blob"&&a&&o.push({filepath:c,oid:await u.oid()}),{method:p,filepath:c}}let h=await f.oid();if(!u||await u.oid()!==h)return d==="tree"?{method:"mkdir",filepath:c}:(a&&o.push({filepath:c,oid:h,stats:await t.lstat($.join(e,c))}),{method:"write",filepath:c,oid:h})}});await vo({fs:t,gitdir:r,dirRemoved:s,ops:l},async()=>{for(let c of l){let u=$.join(e,c.filepath);switch(c.method){case"rmdir":await t.rmdir(u);break;case"mkdir":await t.mkdir(u);break;case"rm":await t.rm(u);break;case"write":if(!s.some(f=>u.startsWith(f))){let{object:f}=await Ge({fs:t,cache:{},gitdir:r,oid:c.oid});await t.exists(u)&&await t.rm(u),await t.write(u,f)}break}}}),await ct.acquire({fs:t,gitdir:r,cache:{}},async c=>{o.forEach(({filepath:u,stats:f,oid:d})=>{c.insert({filepath:u,stats:f,oid:d})})})}var qa=class t{constructor({fs:e,dir:r,gitdir:n=$.join(r,".git")}){Object.assign(this,{fs:e,dir:r,gitdir:n,_author:null})}static get refStash(){return"refs/stash"}static get refLogsStash(){return"logs/refs/stash"}get refStashPath(){return $.join(this.gitdir,t.refStash)}get refLogsStashPath(){return $.join(this.gitdir,t.refLogsStash)}async getAuthor(){if(!this._author&&(this._author=await ia({fs:this.fs,gitdir:this.gitdir,author:{}}),!this._author))throw new zt("author");return this._author}async getStashSHA(e,r){return await this.fs.exists(this.refStashPath)?(r||await this.readStashReflogs({parsed:!1}))[e].split(" ")[1]:null}async writeStashCommit({message:e,tree:r,parent:n}){return lE({fs:this.fs,gitdir:this.gitdir,commit:{message:e,tree:r,parent:n,author:await this.getAuthor(),committer:await this.getAuthor()}})}async readStashCommit(e){let r=await this.readStashReflogs({parsed:!1});if(e!==0&&(e<0||e>r.length-1))throw new mn(`stash@${e}`,"number that is in range of [0, num of stash pushed]");let n=await this.getStashSHA(e,r);return n?po({fs:this.fs,cache:{},gitdir:this.gitdir,oid:n}):{}}async writeStashRef(e){return V.writeRef({fs:this.fs,gitdir:this.gitdir,ref:t.refStash,value:e})}async writeStashReflogEntry({stashCommit:e,message:r}){let n=await this.getAuthor(),i=Df.createStashReflogEntry(n,e,r),a=this.refLogsStashPath;await vo({filepath:a,entry:i},async()=>{let s=await this.fs.exists(a)?await this.fs.read(a,"utf8"):"";await this.fs.write(a,s+i,"utf8")})}async readStashReflogs({parsed:e=!1}){if(!await this.fs.exists(this.refLogsStashPath))return[];let n=(await this.fs.read(this.refLogsStashPath)).toString();return Df.getStashReflogEntry(n,e)}};async function BD({fs:t,dir:e,gitdir:r,message:n=""}){let i=new qa({fs:t,dir:e,gitdir:r});await i.getAuthor();let a=await sa({fs:t,gitdir:r,fullname:!1}),s=await V.resolve({fs:t,gitdir:r,ref:"HEAD"}),l=(await mg({fs:t,dir:e,gitdir:r,oid:s})).commit.message,c=[s],u=null,f=Pr({ref:"HEAD"}),d=await Rx({fs:t,dir:e,gitdir:r,treePair:[Pr({ref:"HEAD"}),"stage"]});if(d){let v=await i.writeStashCommit({message:`stash-Index: WIP on ${a} - ${new Date().toISOString()}`,tree:d,parent:c});c.push(v),u=d,f=Ya()}let h=await Rx({fs:t,dir:e,gitdir:r,treePair:[f,"workdir"]});if(h){let v=await i.writeStashCommit({message:`stash-WorkDir: WIP on ${a} - ${new Date().toISOString()}`,tree:h,parent:[c[c.length-1]]});c.push(v),u=h}if(!u||!d&&!h)throw new je("changes, nothing to stash");let p=(n.trim()||`WIP on ${a}`)+`: ${s.substring(0,7)} ${l}`,g=await i.writeStashCommit({message:p,tree:u,parent:c});return await i.writeStashRef(g),await i.writeStashReflogEntry({stashCommit:g,message:p}),await dg({fs:t,dir:e,gitdir:r,ref:a,track:!1,force:!0}),g}async function cE({fs:t,dir:e,gitdir:r,refIdx:n=0}){let a=await new qa({fs:t,dir:e,gitdir:r}).readStashCommit(n),{parent:s=null}=a.commit?a.commit:{};if(!(!s||!Array.isArray(s)))for(let o=0;o{await t.exists(s)&&await t.rm(s)});let o=await i.readStashReflogs({parsed:!1});if(!o.length)return;o.splice(n,1);let l=i.refLogsStashPath;await vo({reflogEntries:o,stashReflogPath:l,stashMgr:i},async()=>{if(o.length){await t.write(l,o.join(` +`),"utf8");let c=o[o.length-1].split(" ")[1];await i.writeStashRef(c)}else await t.rm(l)})}async function HD({fs:t,dir:e,gitdir:r}){return new qa({fs:t,dir:e,gitdir:r}).readStashReflogs({parsed:!0})}async function UD({fs:t,dir:e,gitdir:r}){let n=new qa({fs:t,dir:e,gitdir:r}),i=[n.refStashPath,n.refLogsStashPath];await vo(i,async()=>{await Promise.all(i.map(async a=>{if(await t.exists(a))return t.rm(a)}))})}async function GD({fs:t,dir:e,gitdir:r,refIdx:n=0}){await cE({fs:t,dir:e,gitdir:r,refIdx:n}),await uE({fs:t,dir:e,gitdir:r,refIdx:n})}async function fE({fs:t,dir:e,gitdir:r=$.join(e,".git"),op:n="push",message:i="",refIdx:a=0}){P("fs",t),P("dir",e),P("gitdir",r),P("op",n);let s={push:BD,apply:cE,drop:uE,list:HD,clear:UD,pop:GD},o=["apply","drop","pop"];try{let l=new Q(t);["refs","logs","logs/refs"].map(f=>$.join(r,f)).forEach(async f=>{await l.exists(f)||await l.mkdir(f)});let u=s[n];if(u){if(o.includes(n)&&a<0)throw new mn(`stash@${a}`,"number that is in range of [0, num of stash pushed]");return await u({fs:l,dir:e,gitdir:r,message:i,refIdx:a})}throw new Error(`To be implemented: ${n}`)}catch(l){throw l.caller="git.stash",l}}async function dE({fs:t,dir:e,gitdir:r=$.join(e,".git"),filepath:n,cache:i={}}){try{P("fs",t),P("gitdir",r),P("filepath",n);let a=new Q(t);if(await na.isIgnored({fs:a,gitdir:r,dir:e,filepath:n}))return"ignored";let o=await zD({fs:a,cache:i,gitdir:r}),l=await hE({fs:a,cache:i,gitdir:r,tree:o,path:n}),c=await ct.acquire({fs:a,gitdir:r,cache:i},async function(g){for(let v of g)if(v.path===n)return v;return null}),u=await a.lstat($.join(e,n)),f=l!==null,d=c!==null,h=u!==null,p=async()=>{if(d&&!Tf(c,u))return c.oid;{let g=await a.read($.join(e,n)),v=await iE({gitdir:r,type:"blob",object:g});return d&&c.oid===v&&u.size!==-1&&ct.acquire({fs:a,gitdir:r,cache:i},async function(y){y.insert({filepath:n,stats:u,oid:v})}),v}};if(!f&&!h&&!d)return"absent";if(!f&&!h&&d)return"*absent";if(!f&&h&&!d)return"*added";if(!f&&h&&d)return await p()===c.oid?"added":"*added";if(f&&!h&&!d)return"deleted";if(f&&!h&&d)return l===c.oid,"*deleted";if(f&&h&&!d)return await p()===l?"*undeleted":"*undeletemodified";if(f&&h&&d){let g=await p();return g===l?g===c.oid?"unmodified":"*unmodified":g===c.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function hE({fs:t,cache:e,gitdir:r,tree:n,path:i}){typeof i=="string"&&(i=i.split("/"));let a=i.shift();for(let s of n)if(s.path===a){if(i.length===0)return s.oid;let{type:o,object:l}=await Ge({fs:t,cache:e,gitdir:r,oid:s.oid});if(o==="tree"){let c=hr.from(l);return hE({fs:t,cache:e,gitdir:r,tree:c,path:i})}if(o==="blob")throw new tr(s.oid,o,"blob",i.join("/"))}return null}async function zD({fs:t,cache:e,gitdir:r}){let n;try{n=await V.resolve({fs:t,gitdir:r,ref:"HEAD"})}catch(a){if(a instanceof je)return[]}let{tree:i}=await wo({fs:t,cache:e,gitdir:r,oid:n});return i}async function pE({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n="HEAD",filepaths:i=["."],filter:a,cache:s={},ignored:o=!1}){try{P("fs",t),P("gitdir",r),P("ref",n);let l=new Q(t);return await ra({fs:l,cache:s,dir:e,gitdir:r,trees:[Pr({ref:n}),yo(),Ya()],map:async function(c,[u,f,d]){if(!u&&!d&&f&&!o&&await na.isIgnored({fs:l,dir:e,filepath:c})||!i.some(k=>tS(c,k)))return null;if(a&&!a(c))return;let[h,p,g]=await Promise.all([u&&u.type(),f&&f.type(),d&&d.type()]),v=[h,p,g].includes("blob");if((h==="tree"||h==="special")&&!v)return;if(h==="commit")return null;if((p==="tree"||p==="special")&&!v)return;if(g==="commit")return null;if((g==="tree"||g==="special")&&!v)return;let y=h==="blob"?await u.oid():void 0,b=g==="blob"?await d.oid():void 0,E;h!=="blob"&&p==="blob"&&g!=="blob"?E="42":p==="blob"&&(E=await f.oid());let S=[void 0,y,E,b],A=S.map(k=>S.indexOf(k));return A.shift(),[c,...A]}})}catch(l){throw l.caller="git.statusMatrix",l}}async function mE({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n,object:i,force:a=!1}){try{P("fs",t),P("gitdir",r),P("ref",n);let s=new Q(t);if(n===void 0)throw new dr("ref");n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`;let o=await V.resolve({fs:s,gitdir:r,ref:i||"HEAD"});if(!a&&await V.exists({fs:s,gitdir:r,ref:n}))throw new pn("tag",n);await V.writeRef({fs:s,gitdir:r,ref:n,value:o})}catch(s){throw s.caller="git.tag",s}}async function gE({fs:t,dir:e,gitdir:r=$.join(e,".git"),cache:n={},filepath:i,oid:a,mode:s,add:o,remove:l,force:c}){try{P("fs",t),P("gitdir",r),P("filepath",i);let u=new Q(t);if(l)return await ct.acquire({fs:u,gitdir:r,cache:n},async function(d){if(!c){let h=await u.lstat($.join(e,i));if(h){if(h.isDirectory())throw new ta("directory");return}}d.has({filepath:i})&&d.delete({filepath:i})});let f;if(!a){if(f=await u.lstat($.join(e,i)),!f)throw new je(`file at "${i}" on disk and "remove" not set`);if(f.isDirectory())throw new ta("directory")}return await ct.acquire({fs:u,gitdir:r,cache:n},async function(d){if(!o&&!d.has({filepath:i}))throw new je(`file at "${i}" in index and "add" not set`);let h;if(a)h={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:s,uid:0,gid:0,size:0};else{h=f;let p=h.isSymbolicLink()?await u.readlink($.join(e,i)):await u.read($.join(e,i));a=await mr({fs:u,gitdir:r,type:"blob",format:"content",object:p})}return d.insert({filepath:i,oid:a,stats:h}),a})}catch(u){throw u.caller="git.updateIndex",u}}function vE(){try{return Bf.version}catch(t){throw t.caller="git.version",t}}async function yE({fs:t,dir:e,gitdir:r=$.join(e,".git"),trees:n,map:i,reduce:a,iterate:s,cache:o={}}){try{return P("fs",t),P("gitdir",r),P("trees",n),await ra({fs:new Q(t),cache:o,dir:e,gitdir:r,trees:n,map:i,reduce:a,iterate:s})}catch(l){throw l.caller="git.walk",l}}async function wE({fs:t,dir:e,gitdir:r=$.join(e,".git"),blob:n}){try{return P("fs",t),P("gitdir",r),P("blob",n),await mr({fs:new Q(t),gitdir:r,type:"blob",object:n,format:"content"})}catch(i){throw i.caller="git.writeBlob",i}}async function bE({fs:t,dir:e,gitdir:r=$.join(e,".git"),commit:n}){try{return P("fs",t),P("gitdir",r),P("commit",n),await lE({fs:new Q(t),gitdir:r,commit:n})}catch(i){throw i.caller="git.writeCommit",i}}async function _E({fs:t,dir:e,gitdir:r=$.join(e,".git"),type:n,object:i,format:a="parsed",oid:s,encoding:o=void 0}){try{let l=new Q(t);if(a==="parsed"){switch(n){case"commit":i=pr.from(i).toObject();break;case"tree":i=hr.from(i).toObject();break;case"blob":i=Buffer.from(i,o);break;case"tag":i=Rr.from(i).toObject();break;default:throw new tr(s||"",n,"blob|commit|tag|tree")}a="content"}return s=await mr({fs:l,gitdir:r,type:n,object:i,oid:s,format:a}),s}catch(l){throw l.caller="git.writeObject",l}}async function xE({fs:t,dir:e,gitdir:r=$.join(e,".git"),ref:n,value:i,force:a=!1,symbolic:s=!1}){try{P("fs",t),P("gitdir",r),P("ref",n),P("value",i);let o=new Q(t);if(n!==zn.clean(n))throw new mn(n,zn.clean(n));if(!a&&await V.exists({fs:o,gitdir:r,ref:n}))throw new pn("ref",n);s?await V.writeSymbolicRef({fs:o,gitdir:r,ref:n,value:i}):(i=await V.resolve({fs:o,gitdir:r,ref:i}),await V.writeRef({fs:o,gitdir:r,ref:n,value:i}))}catch(o){throw o.caller="git.writeRef",o}}async function VD({fs:t,gitdir:e,tag:r}){let n=Rr.from(r).toObject();return await mr({fs:t,gitdir:e,type:"tag",object:n,format:"content"})}async function SE({fs:t,dir:e,gitdir:r=$.join(e,".git"),tag:n}){try{return P("fs",t),P("gitdir",r),P("tag",n),await VD({fs:new Q(t),gitdir:r,tag:n})}catch(i){throw i.caller="git.writeTag",i}}async function EE({fs:t,dir:e,gitdir:r=$.join(e,".git"),tree:n}){try{return P("fs",t),P("gitdir",r),P("tree",n),await cc({fs:new Q(t),gitdir:r,tree:n})}catch(i){throw i.caller="git.writeTree",i}}var WD={Errors:Bx,STAGE:Ya,TREE:Pr,WORKDIR:yo,add:Vx,abortMerge:Ux,addNote:Kx,addRemote:Jx,annotatedTag:Qx,branch:eS,checkout:dg,clone:sS,commit:oS,getConfig:xS,getConfigAll:SS,setConfig:oE,currentBranch:lS,deleteBranch:cS,deleteRef:uS,deleteRemote:fS,deleteTag:dS,expandOid:hS,expandRef:pS,fastForward:vS,fetch:yS,findMergeBase:wS,findRoot:_S,getRemoteInfo:ES,getRemoteInfo2:kS,hashBlob:TS,indexPack:CS,init:PS,isDescendent:MS,isIgnored:OS,listBranches:IS,listFiles:FS,listNotes:DS,listRefs:LS,listRemotes:jS,listServerRefs:NS,listTags:BS,log:US,merge:GS,packObjects:VS,pull:WS,push:qS,readBlob:KS,readCommit:mg,readNote:ZS,readObject:JS,readTag:QS,readTree:eE,remove:tE,removeNote:rE,renameBranch:nE,resetIndex:aE,updateIndex:gE,resolveRef:sE,status:dE,statusMatrix:pE,tag:mE,version:vE,walk:yE,writeBlob:wE,writeCommit:bE,writeObject:_E,writeRef:xE,writeTag:SE,writeTree:EE,stash:fE};Y.Errors=Bx;Y.STAGE=Ya;Y.TREE=Pr;Y.WORKDIR=yo;Y.abortMerge=Ux;Y.add=Vx;Y.addNote=Kx;Y.addRemote=Jx;Y.annotatedTag=Qx;Y.branch=eS;Y.checkout=dg;Y.clone=sS;Y.commit=oS;Y.currentBranch=lS;Y.default=WD;Y.deleteBranch=cS;Y.deleteRef=uS;Y.deleteRemote=fS;Y.deleteTag=dS;Y.expandOid=hS;Y.expandRef=pS;Y.fastForward=vS;Y.fetch=yS;Y.findMergeBase=wS;Y.findRoot=_S;Y.getConfig=xS;Y.getConfigAll=SS;Y.getRemoteInfo=ES;Y.getRemoteInfo2=kS;Y.hashBlob=TS;Y.indexPack=CS;Y.init=PS;Y.isDescendent=MS;Y.isIgnored=OS;Y.listBranches=IS;Y.listFiles=FS;Y.listNotes=DS;Y.listRefs=LS;Y.listRemotes=jS;Y.listServerRefs=NS;Y.listTags=BS;Y.log=US;Y.merge=GS;Y.packObjects=VS;Y.pull=WS;Y.push=qS;Y.readBlob=KS;Y.readCommit=mg;Y.readNote=ZS;Y.readObject=JS;Y.readTag=QS;Y.readTree=eE;Y.remove=tE;Y.removeNote=rE;Y.renameBranch=nE;Y.resetIndex=aE;Y.resolveRef=sE;Y.setConfig=oE;Y.stash=fE;Y.status=dE;Y.statusMatrix=pE;Y.tag=mE;Y.updateIndex=gE;Y.version=vE;Y.walk=yE;Y.writeBlob=wE;Y.writeCommit=bE;Y.writeObject=_E;Y.writeRef=xE;Y.writeTag=SE;Y.writeTree=EE});var kE=M((GY,AE)=>{m();var bo=1e3,_o=bo*60,xo=_o*60,Xa=xo*24,qD=Xa*7,YD=Xa*365.25;AE.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return XD(t);if(r==="number"&&isFinite(t))return e.long?ZD(t):KD(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function XD(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*YD;case"weeks":case"week":case"w":return r*qD;case"days":case"day":case"d":return r*Xa;case"hours":case"hour":case"hrs":case"hr":case"h":return r*xo;case"minutes":case"minute":case"mins":case"min":case"m":return r*_o;case"seconds":case"second":case"secs":case"sec":case"s":return r*bo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function KD(t){var e=Math.abs(t);return e>=Xa?Math.round(t/Xa)+"d":e>=xo?Math.round(t/xo)+"h":e>=_o?Math.round(t/_o)+"m":e>=bo?Math.round(t/bo)+"s":t+"ms"}function ZD(t){var e=Math.abs(t);return e>=Xa?Hf(t,e,Xa,"day"):e>=xo?Hf(t,e,xo,"hour"):e>=_o?Hf(t,e,_o,"minute"):e>=bo?Hf(t,e,bo,"second"):t+" ms"}function Hf(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var CE=M((VY,TE)=>{m();function JD(t){r.debug=r,r.default=r,r.coerce=l,r.disable=s,r.enable=i,r.enabled=o,r.humanize=kE(),r.destroy=c,Object.keys(t).forEach(u=>{r[u]=t[u]}),r.names=[],r.skips=[],r.formatters={};function e(u){let f=0;for(let d=0;d{if(k==="%%")return"%";S++;let x=r.formatters[w];if(typeof x=="function"){let _=v[S];k=x.call(y,_),v.splice(S,1),S--}return k}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return g.namespace=u,g.useColors=r.useColors(),g.color=r.selectColor(u),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,p=r.enabled(u)),p),set:v=>{d=v}}),typeof r.init=="function"&&r.init(g),g}function n(u,f){let d=r(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let f=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function a(u,f){let d=0,h=0,p=-1,g=0;for(;d"-"+f)].join(",");return r.enable(""),u}function o(u){for(let f of r.skips)if(a(u,f))return!1;for(let f of r.names)if(a(u,f))return!0;return!1}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}TE.exports=JD});var Gf=M((gr,Uf)=>{m();gr.formatArgs=eL;gr.save=tL;gr.load=rL;gr.useColors=QD;gr.storage=nL();gr.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();gr.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function QD(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function eL(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Uf.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}gr.log=console.debug||console.log||(()=>{});function tL(t){try{t?gr.storage.setItem("debug",t):gr.storage.removeItem("debug")}catch(e){}}function rL(){let t;try{t=gr.storage.getItem("debug")||gr.storage.getItem("DEBUG")}catch(e){}return!t&&typeof process!="undefined"&&"env"in process&&(t=process.env.DEBUG),t}function nL(){try{return localStorage}catch(t){}}Uf.exports=CE()(gr);var{formatters:iL}=Uf.exports;iL.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var PE=M(Mr=>{"use strict";m();var aL=Mr&&Mr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mr,"__esModule",{value:!0});var sL=require("fs"),oL=aL(Gf()),So=oL.default("@kwsites/file-exists");function lL(t,e,r){So("checking %s",t);try{let n=sL.statSync(t);return n.isFile()&&e?(So("[OK] path represents a file"),!0):n.isDirectory()&&r?(So("[OK] path represents a directory"),!0):(So("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return So("[FAIL] path is not accessible: %o",n),!1;throw So("[FATAL] %o",n),n}}function cL(t,e=Mr.READABLE){return lL(t,(e&Mr.FILE)>0,(e&Mr.FOLDER)>0)}Mr.exists=cL;Mr.FILE=1;Mr.FOLDER=2;Mr.READABLE=Mr.FILE+Mr.FOLDER});var RE=M(zf=>{"use strict";m();function uL(t){for(var e in t)zf.hasOwnProperty(e)||(zf[e]=t[e])}Object.defineProperty(zf,"__esModule",{value:!0});uL(PE())});var yg=M(Ka=>{"use strict";m();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.createDeferred=Ka.deferred=void 0;function vg(){let t,e,r="pending";return{promise:new Promise((i,a)=>{t=i,e=a}),done(i){r==="pending"&&(r="resolved",t(i))},fail(i){r==="pending"&&(r="rejected",e(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}Ka.deferred=vg;Ka.createDeferred=vg;Ka.default=vg});var yT=M((FX,vT)=>{"use strict";m();vT.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var bT=M((LX,wT)=>{m();var c0={px:{px:1,cm:37.79527559055118,mm:3.7795275590551185,in:96,pt:1.3333333333333333,pc:16},cm:{px:.026458333333333334,cm:1,mm:.1,in:2.54,pt:.035277777777777776,pc:.42333333333333334},mm:{px:.26458333333333334,cm:10,mm:1,in:25.4,pt:.35277777777777775,pc:4.233333333333333},in:{px:.010416666666666666,cm:.39370078740157477,mm:.03937007874015748,in:1,pt:.013888888888888888,pc:.16666666666666666},pt:{px:.75,cm:28.346456692913385,mm:2.834645669291339,in:72,pt:1,pc:12},pc:{px:.0625,cm:2.3622047244094486,mm:.2362204724409449,in:6,pt:.08333333333333333,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:1.1111111111111112,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:.002777777777777778,grad:.0025,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:.39370078740157477,dppx:.010416666666666666},dpcm:{dpi:2.54,dpcm:1,dppx:.026458333333333334},dppx:{dpi:96,dpcm:37.79527559055118,dppx:1}};wT.exports=function(t,e,r,n){if(!c0.hasOwnProperty(r))throw new Error("Cannot convert to "+r);if(!c0[r].hasOwnProperty(e))throw new Error("Cannot convert from "+e+" to "+r);var i=c0[r][e]*t;return n!==!1?(n=Math.pow(10,parseInt(n)||5),Math.round(i*n)/n):i}});var $T=M(xi=>{"use strict";m();Object.defineProperty(xi,"__esModule",{value:!0});xi.fromRgba=Po;xi.fromRgb=u0;xi.fromHsla=md;xi.fromHsl=OT;xi.fromString=IT;xi.default=void 0;var _T=ET(yT()),bB=ET(bT());function ET(t){return t&&t.__esModule?t:{default:t}}function _B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xT(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r-1}function TB(t,e,r){var n=t/255,i=e/255,a=r/255,s=Math.max(n,i,a),o=Math.min(n,i,a),l=s-o,c=(s+o)/2;if(l===0)return[0,0,c*100];var u=l/(1-Math.abs(2*c-1)),f=function(){switch(s){case n:return(i-a)/l%6;case i:return(a-n)/l+2;default:return(n-i)/l+4}}();return[f*60,u*100,c*100]}function CB(t,e,r){var n=t/60,i=e/100,a=r/100,s=(1-Math.abs(2*a-1))*i,o=s*(1-Math.abs(n%2-1)),l=a-s/2,c=function(){return n<1?[s,o,0]:n<2?[o,s,0]:n<3?[0,s,o]:n<4?[0,o,s]:n<5?[o,0,s]:[s,0,o]}(),u=nr(c,3),f=u[0],d=u[1],h=u[2];return[(f+l)*255,(d+l)*255,(h+l)*255]}var PB=function(){function t(e){var r=nr(e,4),n=r[0],i=r[1],a=r[2],s=r[3];_B(this,t),this.values=[Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(a,10),255),0),s==null?1:Math.max(Math.min(parseFloat(s),255),0)]}return xB(t,[{key:"toRgbString",value:function(){var r=nr(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return s===1?"rgb(".concat(n,", ").concat(i,", ").concat(a,")"):"rgba(".concat(n,", ").concat(i,", ").concat(a,", ").concat(s,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),n=nr(r,4),i=n[0],a=n[1],s=n[2],o=n[3];return o===1?"hsl(".concat(i,", ").concat(a,"%, ").concat(s,"%)"):"hsla(".concat(i,", ").concat(a,"%, ").concat(s,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=nr(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return n=Number(n).toString(16).padStart(2,"0"),i=Number(i).toString(16).padStart(2,"0"),a=Number(a).toString(16).padStart(2,"0"),s=s<1?parseInt(s*255,10).toString(16).padStart(2,"0"):"","#".concat(n).concat(i).concat(a).concat(s)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=nr(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3],o=TB(n,i,a),l=nr(o,3),c=l[0],u=l[1],f=l[2];return[c,u,f,s]}}]),t}();function Po(t){var e=nr(t,4),r=e[0],n=e[1],i=e[2],a=e[3];return new PB([r,n,i,a])}function u0(t){var e=nr(t,3),r=e[0],n=e[1],i=e[2];return Po([r,n,i,1])}function md(t){var e=nr(t,4),r=e[0],n=e[1],i=e[2],a=e[3],s=CB(r,n,i),o=nr(s,3),l=o[0],c=o[1],u=o[2];return Po([l,c,u,a])}function OT(t){var e=nr(t,3),r=e[0],n=e[1],i=e[2];return md([r,n,i,1])}function RB(t){var e=AT.exec(t)||kT.exec(t),r=nr(e,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=parseInt(n.length<2?n.repeat(2):n,16),i=parseInt(i.length<2?i.repeat(2):i,16),a=parseInt(a.length<2?a.repeat(2):a,16),s=s&&(parseInt(s.length<2?s.repeat(2):s,16)/255).toPrecision(1)||1,Po([n,i,a,s])}function MB(t){var e=TT.exec(t)||PT.exec(t)||CT.exec(t)||RT.exec(t),r=nr(e,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=bc(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),i=bc(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),a=bc(a,"%")>0?parseInt(a,10)*255/100:parseInt(a,10),s=s===void 0?1:parseFloat(s)/(bc(s,"%")?100:1),Po([n,i,a,s])}function OB(t){var e=MT.exec(t),r=nr(e,6),n=r[1],i=r[2],a=r[3],s=r[4],o=r[5];return i=i||"deg",n=(0,bB.default)(parseFloat(n),i,"deg"),a=parseFloat(a),s=parseFloat(s),o=o===void 0?1:parseFloat(o)/(bc(o,"%")?100:1),md([n,a,s,o])}function IT(t){return _T.default[t]?u0(_T.default[t]):AT.test(t)||kT.test(t)?RB(t):TT.test(t)||PT.test(t)||CT.test(t)||RT.test(t)?MB(t):MT.test(t)?OB(t):null}var IB={fromString:IT,fromRgb:u0,fromRgba:Po,fromHsl:OT,fromHsla:md};xi.default=IB});var f0=M((HX,DT)=>{"use strict";m();var FT=Object.prototype.toString;DT.exports=function(e){var r=FT.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&FT.call(e.callee)==="[object Function]"),n}});var VT=M((GX,zT)=>{"use strict";m();var GT;Object.keys||(_c=Object.prototype.hasOwnProperty,d0=Object.prototype.toString,LT=f0(),h0=Object.prototype.propertyIsEnumerable,jT=!h0.call({toString:null},"toString"),NT=h0.call(function(){},"prototype"),xc=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],gd=function(t){var e=t.constructor;return e&&e.prototype===t},BT={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},HT=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!BT["$"+t]&&_c.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{gd(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),UT=function(t){if(typeof window=="undefined"||!HT)return gd(t);try{return gd(t)}catch(e){return!1}},GT=function(e){var r=e!==null&&typeof e=="object",n=d0.call(e)==="[object Function]",i=LT(e),a=r&&d0.call(e)==="[object String]",s=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var o=NT&&n;if(a&&e.length>0&&!_c.call(e,0))for(var l=0;l0)for(var c=0;c{"use strict";m();var $B=Array.prototype.slice,FB=f0(),WT=Object.keys,vd=WT?function(e){return WT(e)}:VT(),qT=Object.keys;vd.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return FB(n)?qT($B.call(n)):qT(n)})}else Object.keys=vd;return Object.keys||vd};YT.exports=vd});var fa=M((qX,JT)=>{"use strict";m();var DB=yd(),LB=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",jB=Object.prototype.toString,NB=Array.prototype.concat,XT=Qu(),BB=function(t){return typeof t=="function"&&jB.call(t)==="[object Function]"},KT=ef()(),HB=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!BB(n)||!n())return}KT?XT(t,e,r,!0):XT(t,e,r)},ZT=function(t,e){var r=arguments.length>2?arguments[2]:{},n=DB(e);LB&&(n=NB.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i{"use strict";m();var UB=yd(),eC=xl()(),tC=xt(),wd=Nu(),GB=tC("Array.prototype.push"),QT=tC("Object.prototype.propertyIsEnumerable"),zB=eC?wd.getOwnPropertySymbols:null;rC.exports=function(e,r){if(e==null)throw new TypeError("target must be an object");var n=wd(e);if(arguments.length===1)return n;for(var i=1;i{"use strict";m();var m0=p0(),VB=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n{"use strict";m();var qB=fa(),YB=g0();iC.exports=function(){var e=YB();return qB(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e}});var cC=M((tK,lC)=>{"use strict";m();var XB=fa(),KB=$a(),ZB=p0(),sC=g0(),JB=aC(),QB=KB.apply(sC()),oC=function(e,r){return QB(Object,arguments)};XB(oC,{getPolyfill:sC,implementation:ZB,shim:JB});lC.exports=oC});var v0=M((nK,dC)=>{"use strict";m();var uC=$n(),fC=$a(),e7=fC(uC("String.prototype.indexOf"));dC.exports=function(e,r){var n=uC(e,!!r);return typeof n=="function"&&e7(e,".prototype.")>-1?fC(n):n}});var pC=M((aK,hC)=>{"use strict";m();var Ec=function(){return typeof function(){}.name=="string"},Sc=Object.getOwnPropertyDescriptor;if(Sc)try{Sc([],"length")}catch(t){Sc=null}Ec.functionsHaveConfigurableNames=function(){if(!Ec()||!Sc)return!1;var e=Sc(function(){},"name");return!!e&&!!e.configurable};var t7=Function.prototype.bind;Ec.boundFunctionsHaveNames=function(){return Ec()&&typeof t7=="function"&&function(){}.bind().name!==""};hC.exports=Ec});var vC=M((oK,gC)=>{"use strict";m();var mC=Qu(),r7=ef()(),n7=pC().functionsHaveConfigurableNames(),i7=ur();gC.exports=function(e,r){if(typeof e!="function")throw new i7("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||n7)&&(r7?mC(e,"name",r,!0,!0):mC(e,"name",r)),e}});var y0=M((cK,yC)=>{"use strict";m();var a7=vC(),s7=ur(),o7=Object;yC.exports=a7(function(){if(this==null||this!==o7(this))throw new s7("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0)});var w0=M((fK,wC)=>{"use strict";m();var l7=y0(),c7=fa().supportsDescriptors,u7=Object.getOwnPropertyDescriptor;wC.exports=function(){if(c7&&/a/mig.flags==="gim"){var e=u7(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),e.get.call(n),r==="dy")return e.get}}return l7}});var xC=M((hK,_C)=>{"use strict";m();var f7=fa().supportsDescriptors,d7=w0(),h7=Gi(),p7=Object.defineProperty,m7=$p(),bC=qu(),g7=/a/;_C.exports=function(){if(!f7||!bC)throw new m7("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=d7(),r=bC(g7),n=h7(r,"flags");return(!n||n.get!==e)&&p7(r,"flags",{configurable:!0,enumerable:!1,get:e}),e}});var kC=M((mK,AC)=>{"use strict";m();var v7=fa(),y7=$a(),w7=y0(),SC=w0(),b7=xC(),EC=y7(SC());v7(EC,{getPolyfill:SC,implementation:w7,shim:b7});AC.exports=EC});var _0=M((vK,CC)=>{"use strict";m();var _7=zi()(),x7=xt(),b0=x7("Object.prototype.toString"),bd=function(e){return _7&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:b0(e)==="[object Arguments]"},TC=function(e){return bd(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&b0(e)!=="[object Array]"&&"callee"in e&&b0(e.callee)==="[object Function]"},S7=function(){return bd(arguments)}();bd.isLegacyArguments=TC;CC.exports=S7?bd:TC});var PC=M(()=>{m()});var Pc=M((xK,XC)=>{m();var M0=typeof Map=="function"&&Map.prototype,x0=Object.getOwnPropertyDescriptor&&M0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xd=M0&&x0&&typeof x0.get=="function"?x0.get:null,RC=M0&&Map.prototype.forEach,O0=typeof Set=="function"&&Set.prototype,S0=Object.getOwnPropertyDescriptor&&O0?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Sd=O0&&S0&&typeof S0.get=="function"?S0.get:null,MC=O0&&Set.prototype.forEach,E7=typeof WeakMap=="function"&&WeakMap.prototype,kc=E7?WeakMap.prototype.has:null,A7=typeof WeakSet=="function"&&WeakSet.prototype,Tc=A7?WeakSet.prototype.has:null,k7=typeof WeakRef=="function"&&WeakRef.prototype,OC=k7?WeakRef.prototype.deref:null,T7=Boolean.prototype.valueOf,C7=Object.prototype.toString,P7=Function.prototype.toString,R7=String.prototype.match,I0=String.prototype.slice,da=String.prototype.replace,M7=String.prototype.toUpperCase,IC=String.prototype.toLowerCase,UC=RegExp.prototype.test,$C=Array.prototype.concat,qn=Array.prototype.join,O7=Array.prototype.slice,FC=Math.floor,k0=typeof BigInt=="function"?BigInt.prototype.valueOf:null,E0=Object.getOwnPropertySymbols,T0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ro=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Cc=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ro||!0)?Symbol.toStringTag:null,GC=Object.prototype.propertyIsEnumerable,DC=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function LC(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||UC.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-FC(-t):FC(t);if(n!==t){var i=String(n),a=I0.call(e,i.length+1);return da.call(i,r,"$&_")+"."+da.call(da.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return da.call(e,r,"$&_")}var C0=PC(),jC=C0.custom,NC=WC(jC)?jC:null,zC={__proto__:null,double:'"',single:"'"},I7={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};XC.exports=function t(e,r,n,i){var a=r||{};if(Si(a,"quoteStyle")&&!Si(zC,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Si(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Si(a,"customInspect")?a.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Si(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Si(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=a.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return YC(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return o?LC(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return o?LC(e,c):c}var u=typeof a.depth=="undefined"?5:a.depth;if(typeof n=="undefined"&&(n=0),n>=u&&u>0&&typeof e=="object")return P0(e)?"[Array]":"[Object]";var f=Z7(a,n);if(typeof i=="undefined")i=[];else if(qC(i,e)>=0)return"[Circular]";function d(L,F,J){if(F&&(i=O7.call(i),i.push(F)),J){var de={depth:a.depth};return Si(a,"quoteStyle")&&(de.quoteStyle=a.quoteStyle),t(L,de,n+1,i)}return t(L,a,n+1,i)}if(typeof e=="function"&&!BC(e)){var h=U7(e),p=_d(e,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+qn.call(p,", ")+" }":"")}if(WC(e)){var g=Ro?da.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):T0.call(e);return typeof e=="object"&&!Ro?Ac(g):g}if(Y7(e)){for(var v="<"+IC.call(String(e.nodeName)),y=e.attributes||[],b=0;b",v}if(P0(e)){if(e.length===0)return"[]";var E=_d(e,d);return f&&!K7(E)?"["+R0(E,f)+"]":"[ "+qn.call(E,", ")+" ]"}if(D7(e)){var S=_d(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!GC.call(e,"cause")?"{ ["+String(e)+"] "+qn.call($C.call("[cause]: "+d(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+qn.call(S,", ")+" }"}if(typeof e=="object"&&s){if(NC&&typeof e[NC]=="function"&&C0)return C0(e,{depth:u-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(G7(e)){var A=[];return RC&&RC.call(e,function(L,F){A.push(d(F,e,!0)+" => "+d(L,e))}),HC("Map",xd.call(e),A,f)}if(W7(e)){var k=[];return MC&&MC.call(e,function(L){k.push(d(L,e))}),HC("Set",Sd.call(e),k,f)}if(z7(e))return A0("WeakMap");if(q7(e))return A0("WeakSet");if(V7(e))return A0("WeakRef");if(j7(e))return Ac(d(Number(e)));if(B7(e))return Ac(d(k0.call(e)));if(N7(e))return Ac(T7.call(e));if(L7(e))return Ac(d(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof global!="undefined"&&e===global)return"{ [object globalThis] }";if(!F7(e)&&!BC(e)){var w=_d(e,d),x=DC?DC(e)===Object.prototype:e instanceof Object||e.constructor===Object,_=e instanceof Object?"":"null prototype",T=!x&&Cc&&Object(e)===e&&Cc in e?I0.call(ha(e),8,-1):_?"Object":"",C=x||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",I=C+(T||_?"["+qn.call($C.call([],T||[],_||[]),": ")+"] ":"");return w.length===0?I+"{}":f?I+"{"+R0(w,f)+"}":I+"{ "+qn.call(w,", ")+" }"}return String(e)};function VC(t,e,r){var n=r.quoteStyle||e,i=zC[n];return i+t+i}function $7(t){return da.call(String(t),/"/g,""")}function ts(t){return!Cc||!(typeof t=="object"&&(Cc in t||typeof t[Cc]!="undefined"))}function P0(t){return ha(t)==="[object Array]"&&ts(t)}function F7(t){return ha(t)==="[object Date]"&&ts(t)}function BC(t){return ha(t)==="[object RegExp]"&&ts(t)}function D7(t){return ha(t)==="[object Error]"&&ts(t)}function L7(t){return ha(t)==="[object String]"&&ts(t)}function j7(t){return ha(t)==="[object Number]"&&ts(t)}function N7(t){return ha(t)==="[object Boolean]"&&ts(t)}function WC(t){if(Ro)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!T0)return!1;try{return T0.call(t),!0}catch(e){}return!1}function B7(t){if(!t||typeof t!="object"||!k0)return!1;try{return k0.call(t),!0}catch(e){}return!1}var H7=Object.prototype.hasOwnProperty||function(t){return t in this};function Si(t,e){return H7.call(t,e)}function ha(t){return C7.call(t)}function U7(t){if(t.name)return t.name;var e=R7.call(P7.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function qC(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return YC(I0.call(t,0,e.maxStringLength),e)+n}var i=I7[e.quoteStyle||"single"];i.lastIndex=0;var a=da.call(da.call(t,i,"\\$1"),/[\x00-\x1f]/g,X7);return VC(a,"single",e)}function X7(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+M7.call(e.toString(16))}function Ac(t){return"Object("+t+")"}function A0(t){return t+" { ? }"}function HC(t,e,r,n){var i=n?R0(r,n):qn.call(r,", ");return t+" ("+e+") {"+i+"}"}function K7(t){for(var e=0;e=0)return!1;return!0}function Z7(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=qn.call(Array(t.indent+1)," ");else return null;return{base:r,prev:qn.call(Array(e+1),r)}}function R0(t,e){if(t.length===0)return"";var r=` +`+e.prev+e.base;return r+qn.call(t,","+r)+` +`+e.prev}function _d(t,e){var r=P0(t),n=[];if(r){n.length=t.length;for(var i=0;i{"use strict";m();var J7=Pc(),Q7=ur(),Ed=function(t,e,r){for(var n=t,i;(i=n.next)!=null;n=i)if(i.key===e)return n.next=i.next,r||(i.next=t.next,t.next=i),i},e9=function(t,e){if(t){var r=Ed(t,e);return r&&r.value}},t9=function(t,e,r){var n=Ed(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},r9=function(t,e){return t?!!Ed(t,e):!1},n9=function(t,e){if(t)return Ed(t,e,!0)};KC.exports=function(){var e,r={assert:function(n){if(!r.has(n))throw new Q7("Side channel does not contain "+J7(n))},delete:function(n){var i=e&&e.next,a=n9(e,n);return a&&i&&i===a&&(e=void 0),!!a},get:function(n){return e9(e,n)},has:function(n){return r9(e,n)},set:function(n,i){e||(e={next:void 0}),t9(e,n,i)}};return r}});var $0=M((kK,QC)=>{"use strict";m();var i9=$n(),Rc=xt(),a9=Pc(),s9=ur(),JC=i9("%Map%",!0),o9=Rc("Map.prototype.get",!0),l9=Rc("Map.prototype.set",!0),c9=Rc("Map.prototype.has",!0),u9=Rc("Map.prototype.delete",!0),f9=Rc("Map.prototype.size",!0);QC.exports=!!JC&&function(){var e,r={assert:function(n){if(!r.has(n))throw new s9("Side channel does not contain "+a9(n))},delete:function(n){if(e){var i=u9(e,n);return f9(e)===0&&(e=void 0),i}return!1},get:function(n){if(e)return o9(e,n)},has:function(n){return e?c9(e,n):!1},set:function(n,i){e||(e=new JC),l9(e,n,i)}};return r}});var tP=M((CK,eP)=>{"use strict";m();var d9=$n(),kd=xt(),h9=Pc(),Ad=$0(),p9=ur(),Mo=d9("%WeakMap%",!0),m9=kd("WeakMap.prototype.get",!0),g9=kd("WeakMap.prototype.set",!0),v9=kd("WeakMap.prototype.has",!0),y9=kd("WeakMap.prototype.delete",!0);eP.exports=Mo?function(){var e,r,n={assert:function(i){if(!n.has(i))throw new p9("Side channel does not contain "+h9(i))},delete:function(i){if(Mo&&i&&(typeof i=="object"||typeof i=="function")){if(e)return y9(e,i)}else if(Ad&&r)return r.delete(i);return!1},get:function(i){return Mo&&i&&(typeof i=="object"||typeof i=="function")&&e?m9(e,i):r&&r.get(i)},has:function(i){return Mo&&i&&(typeof i=="object"||typeof i=="function")&&e?v9(e,i):!!r&&r.has(i)},set:function(i,a){Mo&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Mo),g9(e,i,a)):Ad&&(r||(r=Ad()),r.set(i,a))}};return n}:Ad});var F0=M((RK,rP)=>{"use strict";m();var w9=ur(),b9=Pc(),_9=ZC(),x9=$0(),S9=tP(),E9=S9||x9||_9;rP.exports=function(){var e,r={assert:function(n){if(!r.has(n))throw new w9("Side channel does not contain "+b9(n))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,i){e||(e=E9()),e.set(n,i)}};return r}});var iP=M((OK,nP)=>{"use strict";m();var A9=Yu(),Mc=F0()(),Ei=ur(),D0={assert:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Ei("`O` is not an object");if(typeof e!="string")throw new Ei("`slot` must be a string");if(Mc.assert(t),!D0.has(t,e))throw new Ei("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Ei("`O` is not an object");if(typeof e!="string")throw new Ei("`slot` must be a string");var r=Mc.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Ei("`O` is not an object");if(typeof e!="string")throw new Ei("`slot` must be a string");var r=Mc.get(t);return!!r&&A9(r,"$"+e)},set:function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ei("`O` is not an object");if(typeof e!="string")throw new Ei("`slot` must be a string");var n=Mc.get(t);n||(n={},Mc.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(D0);nP.exports=D0});var oP=M(($K,sP)=>{"use strict";m();var Oc=iP(),k9=Bu(),aP=typeof StopIteration=="object"?StopIteration:null;sP.exports=function(e){if(!aP)throw new k9("this environment lacks StopIteration");Oc.set(e,"[[Done]]",!1);var r={next:function(){var i=Oc.get(this,"[[Iterator]]"),a=!!Oc.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(s){if(Oc.set(i,"[[Done]]",!0),s!==aP)throw s;return{done:!0,value:void 0}}}};return Oc.set(r,"[[Iterator]]",e),r}});var L0=M((DK,cP)=>{"use strict";m();var lP=xt(),T9=lP("String.prototype.valueOf"),C9=function(e){try{return T9(e),!0}catch(r){return!1}},P9=lP("Object.prototype.toString"),R9="[object String]",M9=zi()();cP.exports=function(e){return typeof e=="string"?!0:!e||typeof e!="object"?!1:M9?C9(e):P9(e)===R9}});var N0=M((jK,dP)=>{"use strict";m();var j0=typeof Map=="function"&&Map.prototype?Map:null,O9=typeof Set=="function"&&Set.prototype?Set:null,Td;j0||(Td=function(e){return!1});var fP=j0?Map.prototype.has:null,uP=O9?Set.prototype.has:null;!Td&&!fP&&(Td=function(e){return!1});dP.exports=Td||function(e){if(!e||typeof e!="object")return!1;try{if(fP.call(e),uP)try{uP.call(e)}catch(r){return!0}return e instanceof j0}catch(r){}return!1}});var H0=M((BK,mP)=>{"use strict";m();var I9=typeof Map=="function"&&Map.prototype?Map:null,B0=typeof Set=="function"&&Set.prototype?Set:null,Cd;B0||(Cd=function(e){return!1});var hP=I9?Map.prototype.has:null,pP=B0?Set.prototype.has:null;!Cd&&!pP&&(Cd=function(e){return!1});mP.exports=Cd||function(e){if(!e||typeof e!="object")return!1;try{if(pP.call(e),hP)try{hP.call(e)}catch(r){return!0}return e instanceof B0}catch(r){}return!1}});var TP=M((UK,Md)=>{"use strict";m();var gP=_0(),vP=oP();Gu()()||xl()()?(Pd=Symbol.iterator,Md.exports=function(e){if(e!=null&&typeof e[Pd]!="undefined")return e[Pd]();if(gP(e))return Array.prototype[Pd].call(e)}):(yP=ju(),wP=L0(),U0=$n(),bP=U0("%Map%",!0),_P=U0("%Set%",!0),Jr=v0(),G0=Jr("Array.prototype.push"),z0=Jr("String.prototype.charCodeAt"),xP=Jr("String.prototype.slice"),SP=function(e,r){var n=e.length;if(r+1>=n)return r+1;var i=z0(e,r);if(i<55296||i>56319)return r+1;var a=z0(e,r+1);return a<56320||a>57343?r+1:r+2},Rd=function(e){var r=0;return{next:function(){var i=r>=e.length,a;return i||(a=e[r],r+=1),{done:i,value:a}}}},V0=function(e,r){if(yP(e)||gP(e))return Rd(e);if(wP(e)){var n=0;return{next:function(){var a=SP(e,n),s=xP(e,n,a);return n=a,{done:a>e.length,value:s}}}}if(r&&typeof e["_es6-shim iterator_"]!="undefined")return e["_es6-shim iterator_"]()},!bP&&!_P?Md.exports=function(e){if(e!=null)return V0(e,!0)}:(EP=N0(),AP=H0(),W0=Jr("Map.prototype.forEach",!0),q0=Jr("Set.prototype.forEach",!0),(typeof process=="undefined"||!process.versions||!process.versions.node)&&(Y0=Jr("Map.prototype.iterator",!0),X0=Jr("Set.prototype.iterator",!0)),K0=Jr("Map.prototype.@@iterator",!0)||Jr("Map.prototype._es6-shim iterator_",!0),Z0=Jr("Set.prototype.@@iterator",!0)||Jr("Set.prototype._es6-shim iterator_",!0),kP=function(e){if(EP(e)){if(Y0)return vP(Y0(e));if(K0)return K0(e);if(W0){var r=[];return W0(e,function(i,a){G0(r,[a,i])}),Rd(r)}}if(AP(e)){if(X0)return vP(X0(e));if(Z0)return Z0(e);if(q0){var n=[];return q0(e,function(i){G0(n,i)}),Rd(n)}}},Md.exports=function(e){return kP(e)||V0(e)}));var Pd,yP,wP,U0,bP,_P,Jr,G0,z0,xP,SP,Rd,V0,EP,AP,W0,q0,Y0,X0,K0,Z0,kP});var J0=M((zK,PP)=>{"use strict";m();var CP=function(t){return t!==t};PP.exports=function(e,r){return e===0&&r===0?1/e===1/r:!!(e===r||CP(e)&&CP(r))}});var Q0=M((WK,RP)=>{"use strict";m();var $9=J0();RP.exports=function(){return typeof Object.is=="function"?Object.is:$9}});var OP=M((YK,MP)=>{"use strict";m();var F9=Q0(),D9=fa();MP.exports=function(){var e=F9();return D9(Object,{is:e},{is:function(){return Object.is!==e}}),e}});var DP=M((KK,FP)=>{"use strict";m();var L9=fa(),j9=$a(),N9=J0(),IP=Q0(),B9=OP(),$P=j9(IP(),Object);L9($P,{getPolyfill:IP,implementation:N9,shim:B9});FP.exports=$P});var tv=M((JK,BP)=>{"use strict";m();var H9=$a(),NP=xt(),U9=$n(),ev=U9("%ArrayBuffer%",!0),Od=NP("ArrayBuffer.prototype.byteLength",!0),G9=NP("Object.prototype.toString"),LP=!!ev&&!Od&&new ev(0).slice,jP=!!LP&&H9(LP);BP.exports=Od||jP?function(e){if(!e||typeof e!="object")return!1;try{return Od?Od(e):jP(e,0),!0}catch(r){return!1}}:ev?function(e){return G9(e)==="[object ArrayBuffer]"}:function(e){return!1}});var GP=M((eZ,UP)=>{"use strict";m();var HP=xt(),z9=HP("Date.prototype.getDay"),V9=function(e){try{return z9(e),!0}catch(r){return!1}},W9=HP("Object.prototype.toString"),q9="[object Date]",Y9=zi()();UP.exports=function(e){return typeof e!="object"||e===null?!1:Y9?V9(e):W9(e)===q9}});var av=M((rZ,YP)=>{"use strict";m();var zP=xt(),X9=zi()(),K9=Yu(),Z9=Gi(),iv;X9?(VP=zP("RegExp.prototype.exec"),rv={},Id=function(){throw rv},nv={toString:Id,valueOf:Id},typeof Symbol.toPrimitive=="symbol"&&(nv[Symbol.toPrimitive]=Id),iv=function(e){if(!e||typeof e!="object")return!1;var r=Z9(e,"lastIndex"),n=r&&K9(r,"value");if(!n)return!1;try{VP(e,nv)}catch(i){return i===rv}}):(WP=zP("Object.prototype.toString"),qP="[object RegExp]",iv=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:WP(e)===qP});var VP,rv,Id,nv,WP,qP;YP.exports=iv});var ZP=M((iZ,KP)=>{"use strict";m();var J9=xt(),XP=J9("SharedArrayBuffer.prototype.byteLength",!0);KP.exports=XP?function(e){if(!e||typeof e!="object")return!1;try{return XP(e),!0}catch(r){return!1}}:function(e){return!1}});var eR=M((sZ,QP)=>{"use strict";m();var JP=xt(),Q9=JP("Number.prototype.toString"),eH=function(e){try{return Q9(e),!0}catch(r){return!1}},tH=JP("Object.prototype.toString"),rH="[object Number]",nH=zi()();QP.exports=function(e){return typeof e=="number"?!0:!e||typeof e!="object"?!1:nH?eH(e):tH(e)===rH}});var nR=M((lZ,rR)=>{"use strict";m();var tR=xt(),iH=tR("Boolean.prototype.toString"),aH=tR("Object.prototype.toString"),sH=function(e){try{return iH(e),!0}catch(r){return!1}},oH="[object Boolean]",lH=zi()();rR.exports=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:lH?sH(e):aH(e)===oH}});var aR=M((uZ,iR)=>{"use strict";m();var cH=xt(),uH=av(),fH=cH("RegExp.prototype.exec"),dH=ur();iR.exports=function(e){if(!uH(e))throw new dH("`regex` must be a RegExp");return function(n){return fH(e,n)!==null}}});var uR=M((dZ,sv)=>{"use strict";m();var cR=xt(),hH=cR("Object.prototype.toString"),pH=Gu()(),mH=aR();pH?(sR=cR("Symbol.prototype.toString"),oR=mH(/^Symbol\(.*\)$/),lR=function(e){return typeof e.valueOf()!="symbol"?!1:oR(sR(e))},sv.exports=function(e){if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||hH(e)!=="[object Symbol]")return!1;try{return lR(e)}catch(r){return!1}}):sv.exports=function(e){return!1};var sR,oR,lR});var hR=M((pZ,dR)=>{"use strict";m();var fR=typeof BigInt!="undefined"&&BigInt;dR.exports=function(){return typeof fR=="function"&&typeof BigInt=="function"&&typeof fR(42)=="bigint"&&typeof BigInt(42)=="bigint"}});var gR=M((gZ,ov)=>{"use strict";m();var gH=hR()();gH?(pR=BigInt.prototype.valueOf,mR=function(e){try{return pR.call(e),!0}catch(r){}return!1},ov.exports=function(e){return e===null||typeof e=="undefined"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:mR(e)}):ov.exports=function(e){return!1};var pR,mR});var yR=M((yZ,vR)=>{"use strict";m();var vH=L0(),yH=eR(),wH=nR(),bH=uR(),_H=gR();vR.exports=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(vH(e))return"String";if(yH(e))return"Number";if(wH(e))return"Boolean";if(bH(e))return"Symbol";if(_H(e))return"BigInt"}});var _R=M((bZ,bR)=>{"use strict";m();var $d=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,wR=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Fd;$d||(Fd=function(e){return!1});var cv=$d?$d.prototype.has:null,lv=wR?wR.prototype.has:null;!Fd&&!cv&&(Fd=function(e){return!1});bR.exports=Fd||function(e){if(!e||typeof e!="object")return!1;try{if(cv.call(e,cv),lv)try{lv.call(e,lv)}catch(r){return!0}return e instanceof $d}catch(r){}return!1}});var SR=M((xZ,fv)=>{"use strict";m();var xH=$n(),xR=xt(),SH=xH("%WeakSet%",!0),uv=xR("WeakSet.prototype.has",!0);uv?(Dd=xR("WeakMap.prototype.has",!0),fv.exports=function(e){if(!e||typeof e!="object")return!1;try{if(uv(e,uv),Dd)try{Dd(e,Dd)}catch(r){return!0}return e instanceof SH}catch(r){}return!1}):fv.exports=function(e){return!1};var Dd});var AR=M((EZ,ER)=>{"use strict";m();var EH=N0(),AH=H0(),kH=_R(),TH=SR();ER.exports=function(e){if(e&&typeof e=="object"){if(EH(e))return"Map";if(AH(e))return"Set";if(kH(e))return"WeakMap";if(TH(e))return"WeakSet"}return!1}});var CR=M((kZ,TR)=>{"use strict";m();var CH=xt(),kR=CH("ArrayBuffer.prototype.byteLength",!0),PH=tv();TR.exports=function(e){return PH(e)?kR?kR(e):e.byteLength:NaN}});var QR=M((CZ,JR)=>{"use strict";m();var XR=cC(),Yn=v0(),PR=kC(),RH=$n(),Oo=TP(),MH=F0(),RR=DP(),MR=_0(),OR=ju(),IR=tv(),$R=GP(),FR=av(),DR=ZP(),LR=yd(),jR=yR(),NR=AR(),BR=Kp(),HR=CR(),UR=Yn("SharedArrayBuffer.prototype.byteLength",!0),GR=Yn("Date.prototype.getTime"),dv=Object.getPrototypeOf,zR=Yn("Object.prototype.toString"),jd=RH("%Set%",!0),hv=Yn("Map.prototype.has",!0),Nd=Yn("Map.prototype.get",!0),VR=Yn("Map.prototype.size",!0),Bd=Yn("Set.prototype.add",!0),KR=Yn("Set.prototype.delete",!0),Hd=Yn("Set.prototype.has",!0),Ld=Yn("Set.prototype.size",!0);function WR(t,e,r,n){for(var i=Oo(t),a;(a=i.next())&&!a.done;)if(gn(e,a.value,r,n))return KR(t,a.value),!0;return!1}function ZR(t){if(typeof t=="undefined")return null;if(typeof t!="object")return typeof t=="symbol"?!1:typeof t=="string"||typeof t=="number"?+t==+t:!0}function OH(t,e,r,n,i,a){var s=ZR(r);if(s!=null)return s;var o=Nd(e,s),l=XR({},i,{strict:!1});return typeof o=="undefined"&&!hv(e,s)||!gn(n,o,l,a)?!1:!hv(t,s)&&gn(n,o,l,a)}function IH(t,e,r){var n=ZR(r);return n!=null?n:Hd(e,n)&&!Hd(t,n)}function qR(t,e,r,n,i,a){for(var s=Oo(t),o,l;(o=s.next())&&!o.done;)if(l=o.value,gn(r,l,i,a)&&gn(n,Nd(e,l),i,a))return KR(t,l),!0;return!1}function gn(t,e,r,n){var i=r||{};if(i.strict?RR(t,e):t===e)return!0;var a=jR(t),s=jR(e);if(a!==s)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?RR(t,e):t==e;var o=n.has(t),l=n.has(e),c;if(o&&l){if(n.get(t)===n.get(e))return!0}else c={};return o||n.set(t,c),l||n.set(e,c),DH(t,e,i,n)}function YR(t){return!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function $H(t,e,r,n){if(Ld(t)!==Ld(e))return!1;for(var i=Oo(t),a=Oo(e),s,o,l;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object")l||(l=new jd),Bd(l,s.value);else if(!Hd(e,s.value)){if(r.strict||!IH(t,e,s.value))return!1;l||(l=new jd),Bd(l,s.value)}if(l){for(;(o=a.next())&&!o.done;)if(o.value&&typeof o.value=="object"){if(!WR(l,o.value,r.strict,n))return!1}else if(!r.strict&&!Hd(t,o.value)&&!WR(l,o.value,r.strict,n))return!1;return Ld(l)===0}return!0}function FH(t,e,r,n){if(VR(t)!==VR(e))return!1;for(var i=Oo(t),a=Oo(e),s,o,l,c,u,f;(s=i.next())&&!s.done;)if(c=s.value[0],u=s.value[1],c&&typeof c=="object")l||(l=new jd),Bd(l,c);else if(f=Nd(e,c),typeof f=="undefined"&&!hv(e,c)||!gn(u,f,r,n)){if(r.strict||!OH(t,e,c,u,r,n))return!1;l||(l=new jd),Bd(l,c)}if(l){for(;(o=a.next())&&!o.done;)if(c=o.value[0],f=o.value[1],c&&typeof c=="object"){if(!qR(l,t,c,f,r,n))return!1}else if(!r.strict&&(!t.has(c)||!gn(Nd(t,c),f,r,n))&&!qR(l,t,c,f,XR({},r,{strict:!1}),n))return!1;return Ld(l)===0}return!0}function DH(t,e,r,n){var i,a;if(typeof t!=typeof e||t==null||e==null||zR(t)!==zR(e)||MR(t)!==MR(e))return!1;var s=OR(t),o=OR(e);if(s!==o)return!1;var l=t instanceof Error,c=e instanceof Error;if(l!==c||(l||c)&&(t.name!==e.name||t.message!==e.message))return!1;var u=FR(t),f=FR(e);if(u!==f||(u||f)&&(t.source!==e.source||PR(t)!==PR(e)))return!1;var d=$R(t),h=$R(e);if(d!==h||(d||h)&&GR(t)!==GR(e)||r.strict&&dv&&dv(t)!==dv(e))return!1;var p=BR(t),g=BR(e);if(p!==g)return!1;if(p||g){if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(k[i]!=w[i])return!1;for(i=k.length-1;i>=0;i--)if(a=k[i],!gn(t[a],e[a],r,n))return!1;var x=NR(t),_=NR(e);return x!==_?!1:x==="Set"||_==="Set"?$H(t,e,r,n):x==="Map"?FH(t,e,r,n):!0}JR.exports=function(e,r,n){return gn(e,r,n,MH())}});var _v=M((exports,module)=>{m();(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t,e){return function(r){return new Sha256(e,!0).update(r)[t]()}},createMethod=function(t){var e=createOutputMethod("hex",t);NODE_JS&&(e=nodeWrap(e,t)),e.create=function(){return new Sha256(t)},e.update=function(i){return e.create().update(i)};for(var r=0;r>2]|=t[i]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|n&63)<=57344?(o[a>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|n&63)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|n&63)<=64?(this.block=o[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=this.blocks,c,u,f,d,h,p,g,v,y,b,E;for(c=16;c<64;++c)h=l[c-15],u=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,h=l[c-2],f=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,l[c]=l[c-16]+u+l[c-7]+f<<0;for(E=e&r,c=0;c<64;c+=4)this.first?(this.is224?(v=300032,h=l[0]-1413257819,o=h-150054599<<0,n=h+24177077<<0):(v=704751109,h=l[0]-210244248,o=h-1521486534<<0,n=h+143694565<<0),this.first=!1):(u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),f=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),v=t&e,d=v^t&r^E,g=i&a^~i&s,h=o+f+g+K[c]+l[c],p=u+d,o=n+h<<0,n=h+p<<0),u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&t,d=y^n&e^v,g=o&i^~o&a,h=s+f+g+K[c+1]+l[c+1],p=u+d,s=r+h<<0,r=h+p<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),f=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&n,d=b^r&t^y,g=s&o^~s&i,h=a+f+g+K[c+2]+l[c+2],p=u+d,a=e+h<<0,e=h+p<<0,u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),E=e&r,d=E^e&n^b,g=a&s^~a&o,h=i+f+g+K[c+3]+l[c+3],p=u+d,i=t+h<<0,t=h+p<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+r<<0,this.h3=this.h3+n<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+s<<0,this.h7=this.h7+o<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15];return this.is224||(l+=HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15]),l},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24&255,r>>16&255,r>>8&255,r&255,n>>24&255,n>>16&255,n>>8&255,n&255,i>>24&255,i>>16&255,i>>8&255,i&255,a>>24&255,a>>16&255,a>>8&255,a&255,s>>24&255,s>>16&255,s>>8&255,s&255];return this.is224||l.push(o>>24&255,o>>16&255,o>>8&255,o&255),l},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function HmacSha256(t,e,r){var n,i=typeof t;if(i==="string"){var a=[],s=t.length,o=0,l;for(n=0;n>6,a[o++]=128|l&63):l<55296||l>=57344?(a[o++]=224|l>>12,a[o++]=128|l>>6&63,a[o++]=128|l&63):(l=65536+((l&1023)<<10|t.charCodeAt(++n)&1023),a[o++]=240|l>>18,a[o++]=128|l>>12&63,a[o++]=128|l>>6&63,a[o++]=128|l&63);t=a}else if(i==="object"){if(t===null)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw new Error(ERROR)}else throw new Error(ERROR);t.length>64&&(t=new Sha256(e,!0).update(t).array());var c=[],u=[];for(n=0;n<64;++n){var f=t[n]||0;c[n]=92^f,u[n]=54^f}Sha256.call(this,e,r),this.update(u),this.oKeyPad=c,this.inner=!0,this.sharedMemory=r}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var bM=M(qv=>{m();(function(t){var e=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,a=/\\/g,s=/\u2028/,o=/\u2029/;t.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(x,_){var T=x.length,C=0,I=1,L=2,F=C,J=null,de=null,le="",ce=[],Te=!1,ne=0,N=0,q="{{",B="}}";function Fe(){le.length>0&&(ce.push({tag:"_t",text:new String(le)}),le="")}function lr(){for(var Oe=!0,De=N;De"&&(Le.indent=ce[Pt].text.toString()),ce.splice(Pt,1));else De||ce.push({tag:` +`});Te=!1,N=ce.length}function X(Oe,De){var Pt="="+B,Le=Oe.indexOf(Pt,De),U=c(Oe.substring(Oe.indexOf("=",De)+1,Le)).split(" ");return q=U[0],B=U[U.length-1],Le+Pt.length-1}for(_&&(_=_.split(" "),q=_[0],B=_[1]),ne=0;ne0;){if(F=w.shift(),L&&L.tag=="<"&&!(F.tag in f))throw new Error("Illegal content in < super tag.");if(t.tags[F.tag]<=t.tags.$||h(F,T))_.push(F),F.nodes=d(w,F.tag,_,T);else if(F.tag=="/"){if(_.length===0)throw new Error("Closing tag without opener: /"+F.n);if(I=_.pop(),F.n!=I.n&&!p(F.n,I.n,T))throw new Error("Nesting error: "+I.n+" vs. "+F.n);return I.end=F.i,C}else F.tag==` +`&&(F.last=w.length==0||w[0].tag==` +`);C.push(F)}if(_.length>0)throw new Error("missing closing tag: "+_.pop().n);return C}function h(w,x){for(var _=0,T=x.length;_":S,"<":function(w,x){var _={partials:{},code:"",subs:{},inPartial:!0};t.walk(w.nodes,_);var T=x.partials[S(w,x)];T.subs=_.subs,T.partials=_.partials},$:function(w,x){var _={subs:{},code:"",partials:x.partials,prefix:w.n};t.walk(w.nodes,_),x.subs[w.n]=_.code,x.inPartial||(x.code+='t.sub("'+b(w.n)+'",c,p,i);')},"\n":function(w,x){x.code+=k('"\\n"'+(w.last?"":" + i"))},_v:function(w,x){x.code+="t.b(t.v(t."+E(w.n)+'("'+b(w.n)+'",c,p,0)));'},_t:function(w,x){x.code+=k('"'+b(w.text)+'"')},"{":A,"&":A};function A(w,x){x.code+="t.b(t.t(t."+E(w.n)+'("'+b(w.n)+'",c,p,0)));'}function k(w){return"t.b("+w+");"}t.walk=function(w,x){for(var _,T=0,C=w.length;T{m();var HU={};(function(t){t.Template=function(d,h,p,g){d=d||{},this.r=d.code||this.r,this.c=p,this.options=g||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},t.Template.prototype={r:function(d,h,p){return""},v:u,t:c,render:function(h,p,g){return this.ri([h],p||{},g)},ri:function(d,h,p){return this.r(d,h,p)},ep:function(d,h){var p=this.partials[d],g=h[p.name];if(p.instance&&p.base==g)return p.instance;if(typeof g=="string"){if(!this.c)throw new Error("No compiler available.");g=this.c.compile(g,this.options)}if(!g)return null;if(this.partials[d].base=g,p.subs){h.stackText||(h.stackText={});for(key in p.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);g=r(g,p.subs,p.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=g,g},rp:function(d,h,p,g){var v=this.ep(d,p);return v?v.ri(h,p,g):""},rs:function(d,h,p){var g=d[d.length-1];if(!f(g)){p(d,h,this);return}for(var v=0;v=0;S--)if(y=h[S],v=e(d,y,E),v!==void 0){b=!0;break}return b?(!g&&typeof v=="function"&&(v=this.mv(v,h,p)),v):g?!1:""},ls:function(d,h,p,g,v){var y=this.options.delimiters;return this.options.delimiters=v,this.b(this.ct(c(d.call(h,g)),h,p)),this.options.delimiters=y,!1},ct:function(d,h,p){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(d,this.options).render(h,p)},b:function(d){this.buf+=d},fl:function(){var d=this.buf;return this.buf="",d},ms:function(d,h,p,g,v,y,b){var E,S=h[h.length-1],A=d.call(S);return typeof A=="function"?g?!0:(E=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(A,S,p,E.substring(v,y),b)):A},mv:function(d,h,p){var g=h[h.length-1],v=d.call(g);return typeof v=="function"?this.ct(c(v.call(g)),g,p):v},sub:function(d,h,p,g){var v=this.subs[d];v&&(this.activeSub=d,v(h,p,this,g),this.activeSub=!1)}};function e(d,h,p){var g;return h&&typeof h=="object"&&(h[d]!==void 0?g=h[d]:p&&h.get&&typeof h.get=="function"&&(g=h.get(d))),g}function r(d,h,p,g,v,y){function b(){}b.prototype=d;function E(){}E.prototype=d.subs;var S,A=new b;A.subs=new E,A.subsText={},A.buf="",g=g||{},A.stackSubs=g,A.subsText=y;for(S in h)g[S]||(g[S]=h[S]);for(S in g)A.subs[S]=g[S];v=v||{},A.stackPartials=v;for(S in p)v[S]||(v[S]=p[S]);for(S in v)A.partials[S]=v[S];return A}var n=/&/g,i=//g,s=/\'/g,o=/\"/g,l=/[&<>\"\']/;function c(d){return String(d==null?"":d)}function u(d){return d=c(d),l.test(d)?d.replace(n,"&").replace(i,"<").replace(a,">").replace(s,"'").replace(o,"""):d}var f=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"}})(typeof Yv!="undefined"?Yv:HU)});var Xv=M((Dee,xM)=>{m();var _h=bM();_h.Template=_M().Template;_h.template=_h.Template;xM.exports=_h});var R5=M((Eu,uy)=>{m();(function(e,r){typeof Eu=="object"&&typeof uy=="object"?uy.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Eu=="object"?Eu.feather=r():e.feather=r()})(typeof self!="undefined"?self:Eu,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=0)}({"./dist/icons.json":function(t){t.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"divide-circle":'',"divide-square":'',divide:'',"dollar-sign":'',"download-cloud":'',download:'',dribbble:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',table:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',tool:'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitch:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}},"./node_modules/classnames/dedupe.js":function(t,e,r){var n,i;(function(){"use strict";var a=function(){function s(){}s.prototype=Object.create(null);function o(g,v){for(var y=v.length,b=0;b1?arguments[1]:void 0,v=g!==void 0,y=0,b=c(d),E,S,A,k;if(v&&(g=n(g,p>2?arguments[2]:void 0,2)),b!=null&&!(h==Array&&s(b)))for(k=b.call(d),S=new h;!(A=k.next()).done;y++)l(S,y,v?a(k,g,[A.value,y],!0):A.value);else for(E=o(d.length),S=new h(E);E>y;y++)l(S,y,v?g(d[y],y):d[y]);return S.length=y,S}},"./node_modules/core-js/internals/array-includes.js":function(t,e,r){var n=r("./node_modules/core-js/internals/to-indexed-object.js"),i=r("./node_modules/core-js/internals/to-length.js"),a=r("./node_modules/core-js/internals/to-absolute-index.js");t.exports=function(s){return function(o,l,c){var u=n(o),f=i(u.length),d=a(c,f),h;if(s&&l!=l){for(;f>d;)if(h=u[d++],h!=h)return!0}else for(;f>d;d++)if((s||d in u)&&u[d]===l)return s||d||0;return!s&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(t,e,r){var n=r("./node_modules/core-js/internals/a-function.js");t.exports=function(i,a,s){if(n(i),a===void 0)return i;switch(s){case 0:return function(){return i.call(a)};case 1:return function(o){return i.call(a,o)};case 2:return function(o,l){return i.call(a,o,l)};case 3:return function(o,l,c){return i.call(a,o,l,c)}}return function(){return i.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(t,e,r){var n=r("./node_modules/core-js/internals/an-object.js");t.exports=function(i,a,s,o){try{return o?a(n(s)[0],s[1]):a(s)}catch(c){var l=i.return;throw l!==void 0&&n(l.call(i)),c}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(t,e,r){var n=r("./node_modules/core-js/internals/well-known-symbol.js"),i=n("iterator"),a=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){a=!0}};o[i]=function(){return this},Array.from(o,function(){throw 2})}catch(l){}t.exports=function(l,c){if(!c&&!a)return!1;var u=!1;try{var f={};f[i]=function(){return{next:function(){return{done:u=!0}}}},l(f)}catch(d){}return u}},"./node_modules/core-js/internals/classof-raw.js":function(t,e){var r={}.toString;t.exports=function(n){return r.call(n).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(t,e,r){var n=r("./node_modules/core-js/internals/classof-raw.js"),i=r("./node_modules/core-js/internals/well-known-symbol.js"),a=i("toStringTag"),s=n(function(){return arguments}())=="Arguments",o=function(l,c){try{return l[c]}catch(u){}};t.exports=function(l){var c,u,f;return l===void 0?"Undefined":l===null?"Null":typeof(u=o(c=Object(l),a))=="string"?u:s?n(c):(f=n(c))=="Object"&&typeof c.callee=="function"?"Arguments":f}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(t,e,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/own-keys.js"),a=r("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),s=r("./node_modules/core-js/internals/object-define-property.js");t.exports=function(o,l){for(var c=i(l),u=s.f,f=a.f,d=0;d",E="java"+y+":",S;for(p.style.display="none",o.appendChild(p),p.src=String(E),S=p.contentWindow.document,S.open(),S.write(v+y+b+"document.F=Object"+v+"/"+y+b),S.close(),h=S.F;g--;)delete h[f][a[g]];return h()};t.exports=Object.create||function(g,v){var y;return g!==null?(d[f]=n(g),y=new d,d[f]=null,y[u]=g):y=h(),v===void 0?y:i(y,v)},s[u]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(t,e,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-define-property.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/object-keys.js");t.exports=n?Object.defineProperties:function(l,c){a(l);for(var u=s(c),f=u.length,d=0,h;f>d;)i.f(l,h=u[d++],c[h]);return l}},"./node_modules/core-js/internals/object-define-property.js":function(t,e,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/ie8-dom-define.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/to-primitive.js"),o=Object.defineProperty;e.f=n?o:function(c,u,f){if(a(c),u=s(u,!0),a(f),i)try{return o(c,u,f)}catch(d){}if("get"in f||"set"in f)throw TypeError("Accessors not supported");return"value"in f&&(c[u]=f.value),c}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(t,e,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=r("./node_modules/core-js/internals/create-property-descriptor.js"),s=r("./node_modules/core-js/internals/to-indexed-object.js"),o=r("./node_modules/core-js/internals/to-primitive.js"),l=r("./node_modules/core-js/internals/has.js"),c=r("./node_modules/core-js/internals/ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;e.f=n?u:function(d,h){if(d=s(d),h=o(h,!0),c)try{return u(d,h)}catch(p){}if(l(d,h))return a(!i.f.call(d,h),d[h])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(t,e,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js"),a=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(o){return n(o,a)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(t,e){e.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(t,e,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-object.js"),a=r("./node_modules/core-js/internals/shared-key.js"),s=r("./node_modules/core-js/internals/correct-prototype-getter.js"),o=a("IE_PROTO"),l=Object.prototype;t.exports=s?Object.getPrototypeOf:function(c){return c=i(c),n(c,o)?c[o]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?l:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(t,e,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-indexed-object.js"),a=r("./node_modules/core-js/internals/array-includes.js"),s=r("./node_modules/core-js/internals/hidden-keys.js"),o=a(!1);t.exports=function(l,c){var u=i(l),f=0,d=[],h;for(h in u)!n(s,h)&&n(u,h)&&d.push(h);for(;c.length>f;)n(u,h=c[f++])&&(~o(d,h)||d.push(h));return d}},"./node_modules/core-js/internals/object-keys.js":function(t,e,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js");t.exports=Object.keys||function(s){return n(s,i)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(t,e,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);e.f=a?function(o){var l=i(this,o);return!!l&&l.enumerable}:n},"./node_modules/core-js/internals/object-set-prototype-of.js":function(t,e,r){var n=r("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},s;try{s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,s.call(a,[]),i=a instanceof Array}catch(o){}return function(l,c){return n(l,c),i?s.call(l,c):l.__proto__=c,l}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(t,e,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/object-get-own-property-names.js"),a=r("./node_modules/core-js/internals/object-get-own-property-symbols.js"),s=r("./node_modules/core-js/internals/an-object.js"),o=n.Reflect;t.exports=o&&o.ownKeys||function(c){var u=i.f(s(c)),f=a.f;return f?u.concat(f(c)):u}},"./node_modules/core-js/internals/path.js":function(t,e,r){t.exports=r("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(t,e,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/hide.js"),s=r("./node_modules/core-js/internals/has.js"),o=r("./node_modules/core-js/internals/set-global.js"),l=r("./node_modules/core-js/internals/function-to-string.js"),c=r("./node_modules/core-js/internals/internal-state.js"),u=c.get,f=c.enforce,d=String(l).split("toString");i("inspectSource",function(h){return l.call(h)}),(t.exports=function(h,p,g,v){var y=v?!!v.unsafe:!1,b=v?!!v.enumerable:!1,E=v?!!v.noTargetGet:!1;if(typeof g=="function"&&(typeof p=="string"&&!s(g,"name")&&a(g,"name",p),f(g).source=d.join(typeof p=="string"?p:"")),h===n){b?h[p]=g:o(p,g);return}else y?!E&&h[p]&&(b=!0):delete h[p];b?h[p]=g:a(h,p,g)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||l.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(t,e){t.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},"./node_modules/core-js/internals/set-global.js":function(t,e,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/hide.js");t.exports=function(a,s){try{i(n,a,s)}catch(o){n[a]=s}return s}},"./node_modules/core-js/internals/set-to-string-tag.js":function(t,e,r){var n=r("./node_modules/core-js/internals/object-define-property.js").f,i=r("./node_modules/core-js/internals/has.js"),a=r("./node_modules/core-js/internals/well-known-symbol.js"),s=a("toStringTag");t.exports=function(o,l,c){o&&!i(o=c?o:o.prototype,s)&&n(o,s,{configurable:!0,value:l})}},"./node_modules/core-js/internals/shared-key.js":function(t,e,r){var n=r("./node_modules/core-js/internals/shared.js"),i=r("./node_modules/core-js/internals/uid.js"),a=n("keys");t.exports=function(s){return a[s]||(a[s]=i(s))}},"./node_modules/core-js/internals/shared.js":function(t,e,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/set-global.js"),a=r("./node_modules/core-js/internals/is-pure.js"),s="__core-js_shared__",o=n[s]||i(s,{});(t.exports=function(l,c){return o[l]||(o[l]=c!==void 0?c:{})})("versions",[]).push({version:"3.1.3",mode:a?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(t,e,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");t.exports=function(a,s,o){var l=String(i(a)),c=n(s),u=l.length,f,d;return c<0||c>=u?o?"":void 0:(f=l.charCodeAt(c),f<55296||f>56319||c+1===u||(d=l.charCodeAt(c+1))<56320||d>57343?o?l.charAt(c):f:o?l.slice(c,c+2):(f-55296<<10)+(d-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(t,e,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.max,a=Math.min;t.exports=function(s,o){var l=n(s);return l<0?i(l+o,0):a(l,o)}},"./node_modules/core-js/internals/to-indexed-object.js":function(t,e,r){var n=r("./node_modules/core-js/internals/indexed-object.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");t.exports=function(a){return n(i(a))}},"./node_modules/core-js/internals/to-integer.js":function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(i){return isNaN(i=+i)?0:(i>0?n:r)(i)}},"./node_modules/core-js/internals/to-length.js":function(t,e,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.min;t.exports=function(a){return a>0?i(n(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(t,e,r){var n=r("./node_modules/core-js/internals/require-object-coercible.js");t.exports=function(i){return Object(n(i))}},"./node_modules/core-js/internals/to-primitive.js":function(t,e,r){var n=r("./node_modules/core-js/internals/is-object.js");t.exports=function(i,a){if(!n(i))return i;var s,o;if(a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i))||typeof(s=i.valueOf)=="function"&&!n(o=s.call(i))||!a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i)))return o;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(t,e){var r=0,n=Math.random();t.exports=function(i){return"Symbol(".concat(i===void 0?"":i,")_",(++r+n).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(t,e,r){var n=r("./node_modules/core-js/internals/is-object.js"),i=r("./node_modules/core-js/internals/an-object.js");t.exports=function(a,s){if(i(a),!n(s)&&s!==null)throw TypeError("Can't set "+String(s)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(t,e,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/uid.js"),s=r("./node_modules/core-js/internals/native-symbol.js"),o=n.Symbol,l=i("wks");t.exports=function(c){return l[c]||(l[c]=s&&o[c]||(s?o:a)("Symbol."+c))}},"./node_modules/core-js/modules/es.array.from.js":function(t,e,r){var n=r("./node_modules/core-js/internals/export.js"),i=r("./node_modules/core-js/internals/array-from.js"),a=r("./node_modules/core-js/internals/check-correctness-of-iteration.js"),s=!a(function(o){Array.from(o)});n({target:"Array",stat:!0,forced:s},{from:i})},"./node_modules/core-js/modules/es.string.iterator.js":function(t,e,r){"use strict";var n=r("./node_modules/core-js/internals/string-at.js"),i=r("./node_modules/core-js/internals/internal-state.js"),a=r("./node_modules/core-js/internals/define-iterator.js"),s="String Iterator",o=i.set,l=i.getterFor(s);a(String,"String",function(c){o(this,{type:s,string:String(c),index:0})},function(){var u=l(this),f=u.string,d=u.index,h;return d>=f.length?{value:void 0,done:!0}:(h=n(f,d,!0),u.index+=h.length,{value:h,done:!1})})},"./node_modules/webpack/buildin/global.js":function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(n){typeof window=="object"&&(r=window)}t.exports=r},"./src/default-attrs.json":function(t){t.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(h){for(var p=1;p2&&arguments[2]!==void 0?arguments[2]:[];u(this,h),this.name=p,this.contents=g,this.tags=v,this.attrs=n({},l.default,{class:"feather feather-"+p})}return i(h,[{key:"toSvg",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=n({},this.attrs,g,{class:(0,s.default)(this.attrs.class,g.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),h}();function d(h){return Object.keys(h).map(function(p){return p+'="'+h[p]+'"'}).join(" ")}e.default=f},"./src/icons.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r("./src/icon.js"),i=c(n),a=r("./dist/icons.json"),s=c(a),o=r("./src/tags.json"),l=c(o);function c(u){return u&&u.__esModule?u:{default:u}}e.default=Object.keys(s.default).map(function(u){return new i.default(u,s.default[u],l.default[u])}).reduce(function(u,f){return u[f.name]=f,u},{})},"./src/index.js":function(t,e,r){"use strict";var n=r("./src/icons.js"),i=c(n),a=r("./src/to-svg.js"),s=c(a),o=r("./src/replace.js"),l=c(o);function c(u){return u&&u.__esModule?u:{default:u}}t.exports={icons:i.default,toSvg:s.default,replace:l.default}},"./src/replace.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(d){for(var h=1;h0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document=="undefined")throw new Error("`feather.replace()` only works in a browser environment.");var h=document.querySelectorAll("[data-feather]");Array.from(h).forEach(function(p){return u(p,d)})}function u(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f(d),g=p["data-feather"];if(delete p["data-feather"],o.default[g]===void 0){console.warn("feather: '"+g+"' is not a valid icon");return}var v=o.default[g].toSvg(n({},h,p,{class:(0,a.default)(h.class,p.class)})),y=new DOMParser().parseFromString(v,"image/svg+xml"),b=y.querySelector("svg");d.parentNode.replaceChild(b,d)}function f(d){return Array.from(d.attributes).reduce(function(h,p){return h[p.name]=p.value,h},{})}e.default=c},"./src/tags.json":function(t){t.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r("./src/icons.js"),i=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function s(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!o)throw new Error("The required `key` (icon name) parameter is missing.");if(!i.default[o])throw new Error("No icon matching '"+o+"'. See the complete list of icons at https://feathericons.com");return i.default[o].toSvg(l)}e.default=s},0:function(t,e,r){r("./node_modules/core-js/es/array/from.js"),t.exports=r("./src/index.js")}})})});var IV={};rI(IV,{default:()=>vp});module.exports=nI(IV);m();var D5=Ot(gg()),_e=require("obsidian"),L5=Ot(require("path"));m();var is=require("obsidian");m();var p3=Ot(Gf()),$r=Ot(require("fs/promises")),Ti=require("obsidian"),Ve=Ot(require("path")),Dc=require("path");m();var rd=Ot(RE(),1),Qf=Ot(Gf(),1),tk=require("child_process"),jk=Ot(yg(),1),Eo=Ot(yg(),1),uT=require("node:events"),jg=Object.defineProperty,fL=Object.getOwnPropertyDescriptor,Ng=Object.getOwnPropertyNames,dL=Object.prototype.hasOwnProperty,W=(t,e)=>function(){return t&&(e=(0,t[Ng(t)[0]])(t=0)),e},hL=(t,e)=>function(){return e||(0,t[Ng(t)[0]])((e={exports:{}}).exports,e),e.exports},ft=(t,e)=>{for(var r in e)jg(t,r,{get:e[r],enumerable:!0})},pL=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ng(e))!dL.call(t,i)&&i!==r&&jg(t,i,{get:()=>e[i],enumerable:!(n=fL(e,i))||n.enumerable});return t},it=t=>pL(jg({},"__esModule",{value:!0}),t);function mL(...t){let e=new String(t);return td.set(e,t),e}function Kf(t){return t instanceof String&&td.has(t)}function ME(t){return td.get(t)||[]}var td,pc=W({"src/lib/args/pathspec.ts"(){"use strict";td=new WeakMap}}),Ir,la=W({"src/lib/errors/git-error.ts"(){"use strict";Ir=class extends Error{constructor(t,e){super(e),this.task=t,Object.setPrototypeOf(this,new.target.prototype)}}}}),mc,ko=W({"src/lib/errors/git-response-error.ts"(){"use strict";la(),mc=class extends Ir{constructor(t,e){super(void 0,e||String(t)),this.git=t}}}}),lA,cA=W({"src/lib/errors/task-configuration-error.ts"(){"use strict";la(),lA=class extends Ir{constructor(t){super(void 0,t)}}}});function uA(t){return typeof t!="function"?Qa:t}function fA(t){return typeof t=="function"&&t!==Qa}function dA(t,e){let r=t.indexOf(e);return r<=0?[t,""]:[t.substr(0,r),t.substr(r+1)]}function hA(t,e=0){return pA(t)&&t.length>e?t[e]:void 0}function Ja(t,e=0){if(pA(t)&&t.length>e)return t[t.length-1-e]}function pA(t){return!!(t&&typeof t.length=="number")}function gc(t="",e=!0,r=` +`){return t.split(r).reduce((n,i)=>{let a=e?i.trim():i;return a&&n.push(a),n},[])}function Bg(t,e){return gc(t,!0).map(r=>e(r))}function Hg(t){return(0,rd.exists)(t,rd.FOLDER)}function Me(t,e){return Array.isArray(t)?t.includes(e)||t.push(e):t.add(e),e}function mA(t,e){return Array.isArray(t)&&!t.includes(e)&&t.push(e),t}function nd(t,e){if(Array.isArray(t)){let r=t.indexOf(e);r>=0&&t.splice(r,1)}else t.delete(e);return e}function Vn(t){return Array.isArray(t)?t:[t]}function gA(t){return t.replace(/[\s-]+(.)/g,(e,r)=>r.toUpperCase())}function vA(t){return Vn(t).map(String)}function He(t,e=0){if(t==null)return e;let r=parseInt(t,10);return isNaN(r)?e:r}function dc(t,e){let r=[];for(let n=0,i=t.length;nr in t?{[r]:t[r]}:{}))}function Ag(t=0){return new Promise(e=>setTimeout(e,t))}function kg(t){if(t!==!1)return t}var Ao,Qa,vc,id=W({"src/lib/utils/util.ts"(){"use strict";Ao="\0",Qa=()=>{},vc=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Wn(t,e,r){return e(t)?t:arguments.length>2?r:void 0}function Tg(t,e){let r=Kf(t)?"string":typeof t;return/number|string|boolean/.test(r)&&(!e||!e.includes(r))}function ad(t){return!!t&&vc(t)==="[object Object]"}function wA(t){return typeof t=="function"}var yc,Vt,bA,Zf,Ug,_A=W({"src/lib/utils/argument-filters.ts"(){"use strict";id(),pc(),yc=t=>Array.isArray(t),Vt=t=>typeof t=="string",bA=t=>Array.isArray(t)&&t.every(Vt),Zf=t=>Vt(t)||Array.isArray(t)&&t.every(Vt),Ug=t=>t==null||"number|boolean|function".includes(typeof t)?!1:Array.isArray(t)||typeof t=="string"||typeof t.length=="number"}}),Cg,gL=W({"src/lib/utils/exit-codes.ts"(){"use strict";Cg=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.NOT_FOUND=-2]="NOT_FOUND",t[t.UNCLEAN=128]="UNCLEAN",t))(Cg||{})}}),Jf,vL=W({"src/lib/utils/git-output-streams.ts"(){"use strict";Jf=class xA{constructor(e,r){this.stdOut=e,this.stdErr=r}asStrings(){return new xA(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),me,oa,yL=W({"src/lib/utils/line-parser.ts"(){"use strict";me=class{constructor(t,e){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((i,a)=>this.addMatch(i,a,r(a)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(t)?t:[t],e&&(this.useMatches=e)}useMatches(t,e){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(t,e,r){let n=r&&t.exec(r);return n&&this.pushMatch(e,n),!!n}pushMatch(t,e){this.matches.push(...e.slice(1))}},oa=class extends me{addMatch(t,e,r){return/^remote:\s/.test(String(r))&&super.addMatch(t,e,r)}pushMatch(t,e){(t>0||e.length>1)&&super.pushMatch(t,e)}}}});function SA(...t){let e=process.cwd(),r=Object.assign({baseDir:e,...EA},...t.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||e,r.trimmed=r.trimmed===!0,r}var EA,wL=W({"src/lib/utils/simple-git-options.ts"(){"use strict";EA={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Gg(t,e=[]){return ad(t)?Object.keys(t).reduce((r,n)=>{let i=t[n];if(Kf(i))r.push(i);else if(Tg(i,["boolean"]))r.push(n+"="+i);else if(Array.isArray(i))for(let a of i)Tg(a,["string","number"])||r.push(n+"="+a);else r.push(n);return r},e):e}function vr(t,e=0,r=!1){let n=[];for(let i=0,a=e<0?t.length:e;i{for(let a=gc(i,n),s=0,o=a.length;s{if(!(s+c>=o))return a[s+c]};e.some(({parse:c})=>c(l,t))}}),t}var xL=W({"src/lib/utils/task-parser.ts"(){"use strict";id()}}),AA={};ft(AA,{ExitCodes:()=>Cg,GitOutputStreams:()=>Jf,LineParser:()=>me,NOOP:()=>Qa,NULL:()=>Ao,RemoteLineParser:()=>oa,append:()=>Me,appendTaskOptions:()=>Gg,asArray:()=>Vn,asCamelCase:()=>gA,asFunction:()=>uA,asNumber:()=>He,asStringArray:()=>vA,bufferToString:()=>hc,callTaskParser:()=>Pg,createInstanceConfig:()=>SA,delay:()=>Ag,filterArray:()=>yc,filterFunction:()=>wA,filterHasLength:()=>Ug,filterPlainObject:()=>ad,filterPrimitives:()=>Tg,filterString:()=>Vt,filterStringArray:()=>bA,filterStringOrStringArray:()=>Zf,filterType:()=>Wn,first:()=>hA,folderExists:()=>Hg,forEachLineWithContent:()=>Bg,getTrailingOptions:()=>vr,including:()=>mA,isUserFunction:()=>fA,last:()=>Ja,objectToString:()=>vc,orVoid:()=>kg,parseStringResponse:()=>wr,pick:()=>yA,prefixedArray:()=>dc,remove:()=>nd,splitOn:()=>dA,toLinesWithContent:()=>gc,trailingFunctionArgument:()=>at,trailingOptionsArgument:()=>zg});var he=W({"src/lib/utils/index.ts"(){"use strict";_A(),gL(),vL(),yL(),wL(),_L(),xL(),id()}}),kA={};ft(kA,{CheckRepoActions:()=>Rg,checkIsBareRepoTask:()=>CA,checkIsRepoRootTask:()=>TA,checkIsRepoTask:()=>SL});function SL(t){switch(t){case"bare":return CA();case"root":return TA()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:sd,parser:Vg}}function TA(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:sd,parser(e){return/^\.(git)?$/.test(e.trim())}}}function CA(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:sd,parser:Vg}}function EL(t){return/(Not a git repository|Kein Git-Repository)/i.test(String(t))}var Rg,sd,Vg,PA=W({"src/lib/tasks/check-is-repo.ts"(){"use strict";he(),Rg=(t=>(t.BARE="bare",t.IN_TREE="tree",t.IS_REPO_ROOT="root",t))(Rg||{}),sd=({exitCode:t},e,r,n)=>{if(t===128&&EL(e))return r(Buffer.from("false"));n(e)},Vg=t=>t.trim()==="true"}});function AL(t,e){let r=new RA(t),n=t?OA:MA;return gc(e).forEach(i=>{let a=i.replace(n,"");r.paths.push(a),(IA.test(a)?r.folders:r.files).push(a)}),r}var RA,MA,OA,IA,kL=W({"src/lib/responses/CleanSummary.ts"(){"use strict";he(),RA=class{constructor(t){this.dryRun=t,this.paths=[],this.files=[],this.folders=[]}},MA=/^[a-z]+\s*/i,OA=/^[a-z]+\s+[a-z]+\s*/i,IA=/\/$/}}),Mg={};ft(Mg,{EMPTY_COMMANDS:()=>od,adhocExecTask:()=>$A,configurationErrorTask:()=>yr,isBufferTask:()=>DA,isEmptyTask:()=>LA,straightThroughBufferTask:()=>FA,straightThroughStringTask:()=>rr});function $A(t){return{commands:od,format:"empty",parser:t}}function yr(t){return{commands:od,format:"empty",parser(){throw typeof t=="string"?new lA(t):t}}}function rr(t,e=!1){return{commands:t,format:"utf-8",parser(r){return e?String(r).trim():r}}}function FA(t){return{commands:t,format:"buffer",parser(e){return e}}}function DA(t){return t.format==="buffer"}function LA(t){return t.format==="empty"||!t.commands.length}var od,ut=W({"src/lib/tasks/task.ts"(){"use strict";cA(),od=[]}}),jA={};ft(jA,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Wg,CONFIG_ERROR_MODE_REQUIRED:()=>qg,CONFIG_ERROR_UNKNOWN_OPTION:()=>Yg,CleanOptions:()=>Wf,cleanTask:()=>NA,cleanWithOptionsTask:()=>TL,isCleanOptionsArray:()=>CL});function TL(t,e){let{cleanMode:r,options:n,valid:i}=PL(t);return r?i.options?(n.push(...e),n.some(OL)?yr(Wg):NA(r,n)):yr(Yg+JSON.stringify(t)):yr(qg)}function NA(t,e){return{commands:["clean",`-${t}`,...e],format:"utf-8",parser(n){return AL(t==="n",n)}}}function CL(t){return Array.isArray(t)&&t.every(e=>Xg.has(e))}function PL(t){let e,r=[],n={cleanMode:!1,options:!0};return t.replace(/[^a-z]i/g,"").split("").forEach(i=>{RL(i)?(e=i,n.cleanMode=!0):n.options=n.options&&ML(r[r.length]=`-${i}`)}),{cleanMode:e,options:r,valid:n}}function RL(t){return t==="f"||t==="n"}function ML(t){return/^-[a-z]$/i.test(t)&&Xg.has(t.charAt(1))}function OL(t){return/^-[^\-]/.test(t)?t.indexOf("i")>0:t==="--interactive"}var Wg,qg,Yg,Wf,Xg,BA=W({"src/lib/tasks/clean.ts"(){"use strict";kL(),he(),ut(),Wg="Git clean interactive mode is not supported",qg='Git clean mode parameter ("n" or "f") is required',Yg="Git clean unknown option found in: ",Wf=(t=>(t.DRY_RUN="n",t.FORCE="f",t.IGNORED_INCLUDED="x",t.IGNORED_ONLY="X",t.EXCLUDING="e",t.QUIET="q",t.RECURSIVE="d",t))(Wf||{}),Xg=new Set(["i",...vA(Object.values(Wf))])}});function IL(t){let e=new UA;for(let r of HA(t))e.addValue(r.file,String(r.key),r.value);return e}function $L(t,e){let r=null,n=[],i=new Map;for(let a of HA(t,e))a.key===e&&(n.push(r=a.value),i.has(a.file)||i.set(a.file,[]),i.get(a.file).push(r));return{key:e,paths:Array.from(i.keys()),scopes:i,value:r,values:n}}function FL(t){return t.replace(/^(file):/,"")}function*HA(t,e=null){let r=t.split("\0");for(let n=0,i=r.length-1;nObject.assign(t,this.values[e]),{})),this._all}addFile(t){if(!(t in this.values)){let e=Ja(this.files);this.values[t]=e?Object.create(this.values[e]):{},this.files.push(t)}return this.values[t]}addValue(t,e,r){let n=this.addFile(t);n.hasOwnProperty(e)?Array.isArray(n[e])?n[e].push(r):n[e]=[n[e],r]:n[e]=r,this._all=void 0}}}});function wg(t,e){return typeof t=="string"&&Og.hasOwnProperty(t)?t:e}function LL(t,e,r,n){let i=["config",`--${n}`];return r&&i.push("--add"),i.push(t,e),{commands:i,format:"utf-8",parser(a){return a}}}function jL(t,e){let r=["config","--null","--show-origin","--get-all",t];return e&&r.splice(1,0,`--${e}`),{commands:r,format:"utf-8",parser(n){return $L(n,t)}}}function NL(t){let e=["config","--list","--show-origin","--null"];return t&&e.push(`--${t}`),{commands:e,format:"utf-8",parser(r){return IL(r)}}}function BL(){return{addConfig(t,e,...r){return this._runTask(LL(t,e,r[0]===!0,wg(r[1],"local")),at(arguments))},getConfig(t,e){return this._runTask(jL(t,wg(e,void 0)),at(arguments))},listConfig(...t){return this._runTask(NL(wg(t[0],void 0)),at(arguments))}}}var Og,GA=W({"src/lib/tasks/config.ts"(){"use strict";DL(),he(),Og=(t=>(t.system="system",t.global="global",t.local="local",t.worktree="worktree",t))(Og||{})}});function HL(t){return zA.has(t)}var bg,zA,VA=W({"src/lib/tasks/diff-name-status.ts"(){"use strict";bg=(t=>(t.ADDED="A",t.COPIED="C",t.DELETED="D",t.MODIFIED="M",t.RENAMED="R",t.CHANGED="T",t.UNMERGED="U",t.UNKNOWN="X",t.BROKEN="B",t))(bg||{}),zA=new Set(Object.values(bg))}});function UL(...t){return new qA().param(...t)}function GL(t){let e=new Set,r={};return Bg(t,n=>{let[i,a,s]=n.split(Ao);e.add(i),(r[i]=r[i]||[]).push({line:He(a),path:i,preview:s})}),{paths:e,results:r}}function zL(){return{grep(t){let e=at(arguments),r=vr(arguments);for(let i of WA)if(r.includes(i))return this._runTask(yr(`git.grep: use of "${i}" is not supported.`),e);typeof t=="string"&&(t=UL().param(t));let n=["grep","--null","-n","--full-name",...r,...t];return this._runTask({commands:n,format:"utf-8",parser(i){return GL(i)}},e)}}}var WA,fc,OE,qA,YA=W({"src/lib/tasks/grep.ts"(){"use strict";he(),ut(),WA=["-h"],fc=Symbol("grepQuery"),qA=class{constructor(){this[OE]=[]}*[(OE=fc,Symbol.iterator)](){for(let t of this[fc])yield t}and(...t){return t.length&&this[fc].push("--and","(",...dc(t,"-e"),")"),this}param(...t){return this[fc].push(...dc(t,"-e")),this}}}}),XA={};ft(XA,{ResetMode:()=>qf,getResetMode:()=>WL,resetTask:()=>VL});function VL(t,e){let r=["reset"];return KA(t)&&r.push(`--${t}`),r.push(...e),rr(r)}function WL(t){if(KA(t))return t;switch(typeof t){case"string":case"undefined":return"soft"}}function KA(t){return ZA.includes(t)}var qf,ZA,JA=W({"src/lib/tasks/reset.ts"(){"use strict";ut(),qf=(t=>(t.MIXED="mixed",t.SOFT="soft",t.HARD="hard",t.MERGE="merge",t.KEEP="keep",t))(qf||{}),ZA=Array.from(Object.values(qf))}});function qL(){return(0,Qf.default)("simple-git")}function IE(t,e,r){return!e||!String(e).replace(/\s*/,"")?r?(n,...i)=>{t(n,...i),r(n,...i)}:t:(n,...i)=>{t(`%s ${n}`,e,...i),r&&r(n,...i)}}function YL(t,e,{namespace:r}){if(typeof t=="string")return t;let n=e&&e.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Kg(t,e,r,n=qL()){let i=t&&`[${t}]`||"",a=[],s=typeof e=="string"?n.extend(e):e,o=YL(Wn(e,Vt),s,n);return c(r);function l(u,f){return Me(a,Kg(t,o.replace(/^[^:]+/,u),f,n))}function c(u){let f=u&&`[${u}]`||"",d=s&&IE(s,f)||Qa,h=IE(n,`${i} ${f}`,d);return Object.assign(s?d:h,{label:t,sibling:l,info:h,step:c})}}var QA=W({"src/lib/git-logger.ts"(){"use strict";he(),Qf.default.formatters.L=t=>String(Ug(t)?t.length:"-"),Qf.default.formatters.B=t=>Buffer.isBuffer(t)?t.toString("utf8"):vc(t)}}),ek,XL=W({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";var t;la(),QA(),ek=(t=class{constructor(r="GitExecutor"){this.logLabel=r,this._queue=new Map}withProgress(r){return this._queue.get(r)}createProgress(r){let n=t.getName(r.commands[0]),i=Kg(this.logLabel,n);return{task:r,logger:i,name:n}}push(r){let n=this.createProgress(r);return n.logger("Adding task to the queue, commands = %o",r.commands),this._queue.set(r,n),n}fatal(r){for(let[n,{logger:i}]of Array.from(this._queue.entries()))n===r.task?(i.info("Failed %o",r),i("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):i.info("A fatal exception occurred in a previous task, the queue has been purged: %o",r.message),this.complete(n);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(r){this.withProgress(r)&&this._queue.delete(r)}attempt(r){let n=this.withProgress(r);if(!n)throw new Ir(void 0,"TasksPendingQueue: attempt called for an unknown task");return n.logger("Starting task"),n}static getName(r="empty"){return`task:${r}:${++t.counter}`}},t.counter=0,t)}});function Za(t,e){return{method:hA(t.commands)||"",commands:e}}function KL(t,e){return r=>{e("[ERROR] child process exception %o",r),t.push(Buffer.from(String(r.stack),"ascii"))}}function $E(t,e,r,n){return i=>{r("%s received %L bytes",e,i),n("%B",i),t.push(i)}}var Ig,ZL=W({"src/lib/runners/git-executor-chain.ts"(){"use strict";la(),ut(),he(),XL(),Ig=class{constructor(t,e,r){this._executor=t,this._scheduler=e,this._plugins=r,this._chain=Promise.resolve(),this._queue=new ek}get cwd(){return this._cwd||this._executor.cwd}set cwd(t){this._cwd=t}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(t){return this._queue.push(t),this._chain=this._chain.then(()=>this.attemptTask(t))}async attemptTask(t){let e=await this._scheduler.next(),r=()=>this._queue.complete(t);try{let{logger:n}=this._queue.attempt(t);return await(LA(t)?this.attemptEmptyTask(t,n):this.attemptRemoteTask(t,n))}catch(n){throw this.onFatalException(t,n)}finally{r(),e()}}onFatalException(t,e){let r=e instanceof Ir?Object.assign(e,{task:t}):new Ir(t,e&&String(e));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(t,e){let r=this._plugins.exec("spawn.binary","",Za(t,t.commands)),n=this._plugins.exec("spawn.args",[...t.commands],Za(t,t.commands)),i=await this.gitResponse(t,r,n,this.outputHandler,e.step("SPAWN")),a=await this.handleTaskData(t,n,i,e.step("HANDLE"));return e("passing response to task's parser as a %s",t.format),DA(t)?Pg(t.parser,a):Pg(t.parser,a.asStrings())}async attemptEmptyTask(t,e){return e("empty task bypassing child process to call to task's parser"),t.parser(this)}handleTaskData(t,e,r,n){let{exitCode:i,rejection:a,stdOut:s,stdErr:o}=r;return new Promise((l,c)=>{n("Preparing to handle process response exitCode=%d stdOut=",i);let{error:u}=this._plugins.exec("task.error",{error:a},{...Za(t,e),...r});if(u&&t.onError)return n.info("exitCode=%s handling with custom error handler"),t.onError(r,u,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",vc(f)),l(new Jf(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(o)))},c);if(u)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,o.length,a),c(u);n.info("retrieving task output complete"),l(new Jf(Buffer.concat(s),Buffer.concat(o)))})}async gitResponse(t,e,r,n,i){let a=i.sibling("output"),s=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Za(t,t.commands));return new Promise(o=>{let l=[],c=[];i.info("%s %o",e,r),i("%O",s);let u=this._beforeSpawn(t,r);if(u)return o({stdOut:l,stdErr:c,exitCode:9901,rejection:u});this._plugins.exec("spawn.before",void 0,{...Za(t,r),kill(d){u=d||u}});let f=(0,tk.spawn)(e,r,s);f.stdout.on("data",$E(l,"stdOut",i,a.step("stdOut"))),f.stderr.on("data",$E(c,"stdErr",i,a.step("stdErr"))),f.on("error",KL(c,i)),n&&(i("Passing child process stdOut/stdErr to custom outputHandler"),n(e,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...Za(t,r),spawned:f,close(d,h){o({stdOut:l,stdErr:c,exitCode:d,rejection:u||h})},kill(d){f.killed||(u=d,f.kill("SIGINT"))}})})}_beforeSpawn(t,e){let r;return this._plugins.exec("spawn.before",void 0,{...Za(t,e),kill(n){r=n||r}}),r}}}}),rk={};ft(rk,{GitExecutor:()=>nk});var nk,JL=W({"src/lib/runners/git-executor.ts"(){"use strict";ZL(),nk=class{constructor(t,e,r){this.cwd=t,this._scheduler=e,this._plugins=r,this._chain=new Ig(this,this._scheduler,this._plugins)}chain(){return new Ig(this,this._scheduler,this._plugins)}push(t){return this._chain.push(t)}}}});function QL(t,e,r=Qa){let n=a=>{r(null,a)},i=a=>{(a==null?void 0:a.task)===t&&r(a instanceof mc?ej(a):a,void 0)};e.then(n,i)}function ej(t){let e=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),e=Qa};return Object.create(t,Object.getOwnPropertyNames(t.git).reduce(r,{}));function r(n,i){return i in t||(n[i]={enumerable:!1,configurable:!1,get(){return e(i),t.git[i]}}),n}}var tj=W({"src/lib/task-callback.ts"(){"use strict";ko(),he()}});function FE(t,e){return $A(r=>{if(!Hg(t))throw new Error(`Git.cwd: cannot change to non-directory "${t}"`);return(e||r).cwd=t})}var rj=W({"src/lib/tasks/change-working-directory.ts"(){"use strict";he(),ut()}});function _g(t){let e=["checkout",...t];return e[1]==="-b"&&e.includes("-B")&&(e[1]=nd(e,"-B")),rr(e)}function nj(){return{checkout(){return this._runTask(_g(vr(arguments,1)),at(arguments))},checkoutBranch(t,e){return this._runTask(_g(["-b",t,e,...vr(arguments)]),at(arguments))},checkoutLocalBranch(t){return this._runTask(_g(["-b",t,...vr(arguments)]),at(arguments))}}}var ij=W({"src/lib/tasks/checkout.ts"(){"use strict";he(),ut()}});function aj(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function sj(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(t){return wr(aj(),[ik],t)}})}}}var ik,oj=W({"src/lib/tasks/count-objects.ts"(){"use strict";he(),ik=new me(/([a-z-]+): (\d+)$/,(t,[e,r])=>{let n=gA(e);t.hasOwnProperty(n)&&(t[n]=He(r))})}});function lj(t){return wr({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},ak,t)}var ak,cj=W({"src/lib/parsers/parse-commit.ts"(){"use strict";he(),ak=[new me(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(t,[e,r,n])=>{t.branch=e,t.commit=n,t.root=!!r}),new me(/\s*Author:\s(.+)/i,(t,[e])=>{let r=e.split("<"),n=r.pop();!n||!n.includes("@")||(t.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new me(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(t,[e,r,n])=>{t.summary.changes=parseInt(e,10)||0,t.summary.insertions=parseInt(r,10)||0,t.summary.deletions=parseInt(n,10)||0}),new me(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(t,[e,r,n])=>{t.summary.changes=parseInt(e,10)||0;let i=parseInt(r,10)||0;n==="-"?t.summary.deletions=i:n==="+"&&(t.summary.insertions=i)})]}});function uj(t,e,r){return{commands:["-c","core.abbrev=40","commit",...dc(t,"-m"),...e,...r],format:"utf-8",parser:lj}}function fj(){return{commit(e,...r){let n=at(arguments),i=t(e)||uj(Vn(e),Vn(Wn(r[0],Zf,[])),[...Wn(r[1],yc,[]),...vr(arguments,0,!0)]);return this._runTask(i,n)}};function t(e){return!Zf(e)&&yr("git.commit: requires the commit message to be supplied as a string/string[]")}}var dj=W({"src/lib/tasks/commit.ts"(){"use strict";cj(),he(),ut()}});function hj(){return{firstCommit(){return this._runTask(rr(["rev-list","--max-parents=0","HEAD"],!0),at(arguments))}}}var pj=W({"src/lib/tasks/first-commit.ts"(){"use strict";he(),ut()}});function mj(t,e){let r=["hash-object",t];return e&&r.push("-w"),rr(r,!0)}var gj=W({"src/lib/tasks/hash-object.ts"(){"use strict";ut()}});function vj(t,e,r){let n=String(r).trim(),i;if(i=sk.exec(n))return new Yf(t,e,!1,i[1]);if(i=ok.exec(n))return new Yf(t,e,!0,i[1]);let a="",s=n.split(" ");for(;s.length;)if(s.shift()==="in"){a=s.join(" ");break}return new Yf(t,e,/^re/i.test(n),a)}var Yf,sk,ok,yj=W({"src/lib/responses/InitSummary.ts"(){"use strict";Yf=class{constructor(t,e,r,n){this.bare=t,this.path=e,this.existing=r,this.gitDir=n}},sk=/^Init.+ repository in (.+)$/,ok=/^Rein.+ in (.+)$/}});function wj(t){return t.includes(Zg)}function bj(t=!1,e,r){let n=["init",...r];return t&&!wj(n)&&n.splice(1,0,Zg),{commands:n,format:"utf-8",parser(i){return vj(n.includes("--bare"),e,i)}}}var Zg,_j=W({"src/lib/tasks/init.ts"(){"use strict";yj(),Zg="--bare"}});function Jg(t){for(let e=0;ewr(new lk,e,r,!1)}var xg,DE,LE,jE,uk,fk=W({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";wc(),Sj(),VA(),he(),xg=[new me(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(t,[e,r,n=""])=>{t.files.push({file:e.trim(),changes:He(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new me(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(t,[e,r,n])=>{t.files.push({file:e.trim(),before:He(r),after:He(n),binary:!0})}),new me(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(t,[e,r])=>{let n=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);t.changed=He(e),t.insertions=He(n==null?void 0:n[1]),t.deletions=He(i==null?void 0:i[1])})],DE=[new me(/(\d+)\t(\d+)\t(.+)$/,(t,[e,r,n])=>{let i=He(e),a=He(r);t.changed++,t.insertions+=i,t.deletions+=a,t.files.push({file:n,changes:i+a,insertions:i,deletions:a,binary:!1})}),new me(/-\t-\t(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,after:0,before:0,binary:!0})})],LE=[new me(/(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,changes:0,insertions:0,deletions:0,binary:!1})})],jE=[new me(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(t,[e,r,n,i,a])=>{t.changed++,t.files.push({file:a!=null?a:n,changes:0,insertions:0,deletions:0,binary:!1,status:kg(HL(e)&&e),from:kg(!!a&&n!==a&&n),similarity:He(r)})})],uk={"":xg,"--stat":xg,"--numstat":DE,"--name-status":jE,"--name-only":LE}}});function Ej(t,e){return e.reduce((r,n,i)=>(r[n]=t[i]||"",r),Object.create({diff:null}))}function dk(t=r0,e=hk,r=""){let n=ck(r);return function(i){let a=gc(i.trim(),!1,e0).map(function(s){let o=s.split(t0),l=Ej(o[0].split(t),e);return o.length>1&&o[1].trim()&&(l.diff=n(o[1])),l});return{all:a,latest:a.length&&a[0]||null,total:a.length}}}var e0,t0,r0,hk,pk=W({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";he(),fk(),wc(),e0="\xF2\xF2\xF2\xF2\xF2\xF2 ",t0=" \xF2\xF2",r0=" \xF2 ",hk=["hash","date","message","refs","author_name","author_email"]}}),mk={};ft(mk,{diffSummaryTask:()=>Aj,validateLogFormatConfig:()=>ld});function Aj(t){let e=Jg(t),r=["diff"];return e===""&&(e="--stat",r.push("--stat=4096")),r.push(...t),ld(r)||{commands:r,format:"utf-8",parser:ck(e)}}function ld(t){let e=t.filter(xj);if(e.length>1)return yr(`Summary flags are mutually exclusive - pick one of ${e.join(",")}`);if(e.length&&t.includes("-z"))return yr(`Summary flag ${e} parsing is not compatible with null termination option '-z'`)}var n0=W({"src/lib/tasks/diff.ts"(){"use strict";wc(),fk(),ut()}});function kj(t,e){let r=[],n=[];return Object.keys(t).forEach(i=>{r.push(i),n.push(String(t[i]))}),[r,n.join(e)]}function Tj(t){return Object.keys(t).reduce((e,r)=>(r in $g||(e[r]=t[r]),e),{})}function gk(t={},e=[]){let r=Wn(t.splitter,Vt,r0),n=ad(t.format)?t.format:{hash:"%H",date:t.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:t.multiLine?"%B":"%b",author_name:t.mailMap!==!1?"%aN":"%an",author_email:t.mailMap!==!1?"%aE":"%ae"},[i,a]=kj(n,r),s=[],o=[`--pretty=format:${e0}${a}${t0}`,...e],l=t.n||t["max-count"]||t.maxCount;if(l&&o.push(`--max-count=${l}`),t.from||t.to){let c=t.symmetric!==!1?"...":"..";s.push(`${t.from||""}${c}${t.to||""}`)}return Vt(t.file)&&o.push("--follow",mL(t.file)),Gg(Tj(t),o),{fields:i,splitter:r,commands:[...o,...s]}}function Cj(t,e,r){let n=dk(t,e,Jg(r));return{commands:["log",...r],format:"utf-8",parser:n}}function Pj(){return{log(...r){let n=at(arguments),i=gk(zg(arguments),Wn(arguments[0],yc)),a=e(...r)||ld(i.commands)||t(i);return this._runTask(a,n)}};function t(r){return Cj(r.splitter,r.fields,r.commands)}function e(r,n){return Vt(r)&&Vt(n)&&yr("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var $g,vk=W({"src/lib/tasks/log.ts"(){"use strict";wc(),pc(),pk(),he(),ut(),n0(),$g=(t=>(t[t["--pretty"]=0]="--pretty",t[t["max-count"]=1]="max-count",t[t.maxCount=2]="maxCount",t[t.n=3]="n",t[t.file=4]="file",t[t.format=5]="format",t[t.from=6]="from",t[t.to=7]="to",t[t.splitter=8]="splitter",t[t.symmetric=9]="symmetric",t[t.mailMap=10]="mailMap",t[t.multiLine=11]="multiLine",t[t.strictDate=12]="strictDate",t))($g||{})}}),Xf,yk,Rj=W({"src/lib/responses/MergeSummary.ts"(){"use strict";Xf=class{constructor(t,e=null,r){this.reason=t,this.file=e,this.meta=r}toString(){return`${this.file}:${this.reason}`}},yk=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Fg,wk,Mj=W({"src/lib/responses/PullSummary.ts"(){"use strict";Fg=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},wk=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Sg(t){return t.objects=t.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function NE(t){let e=/^\s*(\d+)/.exec(t),r=/delta (\d+)/i.exec(t);return{count:He(e&&e[1]||"0"),delta:He(r&&r[1]||"0")}}var bk,Oj=W({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";he(),bk=[new oa(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(t,[e,r])=>{let n=e.toLowerCase(),i=Sg(t.remoteMessages);Object.assign(i,{[n]:He(r)})}),new oa(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(t,[e,r])=>{let n=e.toLowerCase(),i=Sg(t.remoteMessages);Object.assign(i,{[n]:He(r)})}),new oa(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(t,[e,r,n])=>{let i=Sg(t.remoteMessages);i.total=NE(e),i.reused=NE(r),i.packReused=He(n)})]}});function _k(t,e){return wr({remoteMessages:new Sk},xk,e)}var xk,Sk,Ek=W({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";he(),Oj(),xk=[new oa(/^remote:\s*(.+)$/,(t,[e])=>(t.remoteMessages.all.push(e.trim()),!1)),...bk,new oa([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(t,[e])=>{t.remoteMessages.pullRequestUrl=e}),new oa([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(t,[e,r,n])=>{t.remoteMessages.vulnerabilities={count:He(e),summary:r,url:n}})],Sk=class{constructor(){this.all=[]}}}});function Ij(t,e){let r=wr(new wk,Ak,[t,e]);return r.message&&r}var BE,HE,UE,GE,Ak,zE,i0,kk=W({"src/lib/parsers/parse-pull.ts"(){"use strict";Mj(),he(),Ek(),BE=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,HE=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,UE=/^(create|delete) mode \d+ (.+)/,GE=[new me(BE,(t,[e,r,n])=>{t.files.push(e),r&&(t.insertions[e]=r.length),n&&(t.deletions[e]=n.length)}),new me(HE,(t,[e,,r,,n])=>r!==void 0||n!==void 0?(t.summary.changes=+e||0,t.summary.insertions=+r||0,t.summary.deletions=+n||0,!0):!1),new me(UE,(t,[e,r])=>{Me(t.files,r),Me(e==="create"?t.created:t.deleted,r)})],Ak=[new me(/^from\s(.+)$/i,(t,[e])=>void(t.remote=e)),new me(/^fatal:\s(.+)$/,(t,[e])=>void(t.message=e)),new me(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(t,[e,r,n,i])=>{t.branch.local=n,t.hash.local=e,t.branch.remote=i,t.hash.remote=r})],zE=(t,e)=>wr(new Fg,GE,[t,e]),i0=(t,e)=>Object.assign(new Fg,zE(t,e),_k(t,e))}}),VE,Tk,WE,$j=W({"src/lib/parsers/parse-merge.ts"(){"use strict";Rj(),he(),kk(),VE=[new me(/^Auto-merging\s+(.+)$/,(t,[e])=>{t.merges.push(e)}),new me(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(t,[e,r])=>{t.conflicts.push(new Xf(e,r))}),new me(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(t,[e,r,n])=>{t.conflicts.push(new Xf(e,r,{deleteRef:n}))}),new me(/^CONFLICT\s+\((.+)\):/,(t,[e])=>{t.conflicts.push(new Xf(e,null))}),new me(/^Automatic merge failed;\s+(.+)$/,(t,[e])=>{t.result=e})],Tk=(t,e)=>Object.assign(WE(t,e),i0(t,e)),WE=t=>wr(new yk,VE,t)}});function qE(t){return t.length?{commands:["merge",...t],format:"utf-8",parser(e,r){let n=Tk(e,r);if(n.failed)throw new mc(n);return n}}:yr("Git.merge requires at least one option")}var Fj=W({"src/lib/tasks/merge.ts"(){"use strict";ko(),$j(),ut()}});function Dj(t,e,r){let n=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(t),a=!r.includes("new");return{deleted:n,tag:i,branch:!i,new:!a,alreadyUpdated:a,local:t,remote:e}}var YE,Ck,XE,Lj=W({"src/lib/parsers/parse-push.ts"(){"use strict";he(),Ek(),YE=[new me(/^Pushing to (.+)$/,(t,[e])=>{t.repo=e}),new me(/^updating local tracking ref '(.+)'/,(t,[e])=>{t.ref={...t.ref||{},local:e}}),new me(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(t,[e,r,n])=>{t.pushed.push(Dj(e,r,n))}),new me(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(t,[e,r,n])=>{t.branch={...t.branch||{},local:e,remote:r,remoteName:n}}),new me(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(t,[e,r,n,i])=>{t.update={head:{local:e,remote:r},hash:{from:n,to:i}}})],Ck=(t,e)=>{let r=XE(t,e),n=_k(t,e);return{...r,...n}},XE=(t,e)=>wr({pushed:[]},YE,[t,e])}}),Pk={};ft(Pk,{pushTagsTask:()=>jj,pushTask:()=>a0});function jj(t={},e){return Me(e,"--tags"),a0(t,e)}function a0(t={},e){let r=["push",...e];return t.branch&&r.splice(1,0,t.branch),t.remote&&r.splice(1,0,t.remote),nd(r,"-v"),Me(r,"--verbose"),Me(r,"--porcelain"),{commands:r,format:"utf-8",parser:Ck}}var Rk=W({"src/lib/tasks/push.ts"(){"use strict";Lj(),he()}});function Nj(){return{showBuffer(){let t=["show",...vr(arguments,1)];return t.includes("--binary")||t.splice(1,0,"--binary"),this._runTask(FA(t),at(arguments))},show(){let t=["show",...vr(arguments,1)];return this._runTask(rr(t),at(arguments))}}}var Bj=W({"src/lib/tasks/show.ts"(){"use strict";he(),ut()}}),KE,Mk,Hj=W({"src/lib/responses/FileStatusSummary.ts"(){"use strict";KE=/^(.+)\0(.+)$/,Mk=class{constructor(t,e,r){if(this.path=t,this.index=e,this.working_dir=r,e==="R"||r==="R"){let n=KE.exec(t)||[null,t,t];this.from=n[2]||"",this.path=n[1]||""}}}}});function ZE(t){let[e,r]=t.split(Ao);return{from:r||e,to:e}}function Or(t,e,r){return[`${t}${e}`,r]}function Eg(t,...e){return e.map(r=>Or(t,r,(n,i)=>Me(n.conflicted,i)))}function Uj(t,e){let r=e.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(i,a,s){let o=`${i}${a}`,l=Ok.get(o);l&&l(t,s),o!=="##"&&o!=="!!"&&t.files.push(new Mk(s,i,a))}}var JE,Ok,Ik,Gj=W({"src/lib/responses/StatusSummary.ts"(){"use strict";he(),Hj(),JE=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},Ok=new Map([Or(" ","A",(t,e)=>Me(t.created,e)),Or(" ","D",(t,e)=>Me(t.deleted,e)),Or(" ","M",(t,e)=>Me(t.modified,e)),Or("A"," ",(t,e)=>Me(t.created,e)&&Me(t.staged,e)),Or("A","M",(t,e)=>Me(t.created,e)&&Me(t.staged,e)&&Me(t.modified,e)),Or("D"," ",(t,e)=>Me(t.deleted,e)&&Me(t.staged,e)),Or("M"," ",(t,e)=>Me(t.modified,e)&&Me(t.staged,e)),Or("M","M",(t,e)=>Me(t.modified,e)&&Me(t.staged,e)),Or("R"," ",(t,e)=>{Me(t.renamed,ZE(e))}),Or("R","M",(t,e)=>{let r=ZE(e);Me(t.renamed,r),Me(t.modified,r.to)}),Or("!","!",(t,e)=>{Me(t.ignored=t.ignored||[],e)}),Or("?","?",(t,e)=>Me(t.not_added,e)),...Eg("A","A","U"),...Eg("D","D","U"),...Eg("U","A","D","U"),["##",(t,e)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,a=/\.{3}(\S*)/,s=/\son\s([\S]+)$/,o;o=r.exec(e),t.ahead=o&&+o[1]||0,o=n.exec(e),t.behind=o&&+o[1]||0,o=i.exec(e),t.current=o&&o[1],o=a.exec(e),t.tracking=o&&o[1],o=s.exec(e),t.current=o&&o[1]||t.current,t.detached=/\(no branch\)/.test(e)}]]),Ik=function(t){let e=t.split(Ao),r=new JE;for(let n=0,i=e.length;n!$k.includes(r))],parser(r){return Ik(r)}}}var $k,Vj=W({"src/lib/tasks/status.ts"(){"use strict";Gj(),$k=["--null","-z"]}});function ed(t=0,e=0,r=0,n="",i=!0){return Object.defineProperty({major:t,minor:e,patch:r,agent:n,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function Wj(){return ed(0,0,0,"",!1)}function qj(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:Yj,onError(t,e,r,n){if(t.exitCode===-2)return r(Buffer.from(s0));n(e)}})}}}function Yj(t){return t===s0?Wj():wr(ed(0,0,0,t),Fk,t)}var s0,Fk,Xj=W({"src/lib/tasks/version.ts"(){"use strict";he(),s0="installed=false",Fk=[new me(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(t,[e,r,n,i=""])=>{Object.assign(t,ed(He(e),He(r),He(n),i))}),new me(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(t,[e,r,n,i=""])=>{Object.assign(t,ed(He(e),He(r),n,i))})]}}),Dk={};ft(Dk,{SimpleGitApi:()=>Dg});var Dg,Kj=W({"src/lib/simple-git-api.ts"(){"use strict";tj(),rj(),ij(),oj(),dj(),GA(),pj(),YA(),gj(),_j(),vk(),Fj(),Rk(),Bj(),Vj(),ut(),Xj(),he(),Dg=class{constructor(t){this._executor=t}_runTask(t,e){let r=this._executor.chain(),n=r.push(t);return e&&QL(t,n,e),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(t){return this._runTask(rr(["add",...Vn(t)]),at(arguments))}cwd(t){let e=at(arguments);return typeof t=="string"?this._runTask(FE(t,this._executor),e):typeof(t==null?void 0:t.path)=="string"?this._runTask(FE(t.path,t.root&&this._executor||void 0),e):this._runTask(yr("Git.cwd: workingDirectory must be supplied as a string"),e)}hashObject(t,e){return this._runTask(mj(t,e===!0),at(arguments))}init(t){return this._runTask(bj(t===!0,this._executor.cwd,vr(arguments)),at(arguments))}merge(){return this._runTask(qE(vr(arguments)),at(arguments))}mergeFromTo(t,e){return Vt(t)&&Vt(e)?this._runTask(qE([t,e,...vr(arguments)]),at(arguments,!1)):this._runTask(yr("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(t){return this._executor.outputHandler=t,this}push(){let t=a0({remote:Wn(arguments[0],Vt),branch:Wn(arguments[1],Vt)},vr(arguments));return this._runTask(t,at(arguments))}stash(){return this._runTask(rr(["stash",...vr(arguments)]),at(arguments))}status(){return this._runTask(zj(vr(arguments)),at(arguments))}},Object.assign(Dg.prototype,nj(),fj(),BL(),sj(),hj(),zL(),Pj(),Nj(),qj())}}),Lk={};ft(Lk,{Scheduler:()=>Nk});var QE,Nk,Zj=W({"src/lib/runners/scheduler.ts"(){"use strict";he(),QA(),QE=(()=>{let t=0;return()=>{t++;let{promise:e,done:r}=(0,jk.createDeferred)();return{promise:e,done:r,id:t}}})(),Nk=class{constructor(t=2){this.concurrency=t,this.logger=Kg("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",t)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let t=Me(this.running,this.pending.shift());this.logger("Attempting id=%s",t.id),t.done(()=>{this.logger("Completing id=",t.id),nd(this.running,t),this.schedule()})}next(){let{promise:t,id:e}=Me(this.pending,QE());return this.logger("Scheduling id=%s",e),this.schedule(),t}}}}),Bk={};ft(Bk,{applyPatchTask:()=>Jj});function Jj(t,e){return rr(["apply",...e,...t])}var Qj=W({"src/lib/tasks/apply-patch.ts"(){"use strict";ut()}});function eN(t,e){return{branch:t,hash:e,success:!0}}function tN(t){return{branch:t,hash:null,success:!1}}var Hk,rN=W({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";Hk=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Uk(t,e){return e===1&&Lg.test(t)}var eA,Lg,tA,cd,nN=W({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";rN(),he(),eA=/(\S+)\s+\(\S+\s([^)]+)\)/,Lg=/^error[^']+'([^']+)'/m,tA=[new me(eA,(t,[e,r])=>{let n=eN(e,r);t.all.push(n),t.branches[e]=n}),new me(Lg,(t,[e])=>{let r=tN(e);t.errors.push(r),t.all.push(r),t.branches[e]=r})],cd=(t,e)=>wr(new Hk,tA,[t,e])}}),Gk,iN=W({"src/lib/responses/BranchSummary.ts"(){"use strict";Gk=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(t,e,r,n,i){t==="*"&&(this.detached=e,this.current=r),this.all.push(r),this.branches[r]={current:t==="*",linkedWorkTree:t==="+",name:r,commit:n,label:i}}}}});function rA(t){return t?t.charAt(0):""}function zk(t){return wr(new Gk,Vk,t)}var Vk,aN=W({"src/lib/parsers/parse-branch.ts"(){"use strict";iN(),he(),Vk=[new me(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(t,[e,r,n,i])=>{t.push(rA(e),!0,r,n,i)}),new me(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(t,[e,r,n,i])=>{t.push(rA(e),!1,r,n,i)})]}}),Wk={};ft(Wk,{branchLocalTask:()=>oN,branchTask:()=>sN,containsDeleteBranchCommand:()=>qk,deleteBranchTask:()=>cN,deleteBranchesTask:()=>lN});function qk(t){let e=["-d","-D","--delete"];return t.some(r=>e.includes(r))}function sN(t){let e=qk(t),r=["branch",...t];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,i){return e?cd(n,i).all[0]:zk(n)}}}function oN(){return{format:"utf-8",commands:["branch","-v"],parser:zk}}function lN(t,e=!1){return{format:"utf-8",commands:["branch","-v",e?"-D":"-d",...t],parser(r,n){return cd(r,n)},onError({exitCode:r,stdOut:n},i,a,s){if(!Uk(String(i),r))return s(i);a(n)}}}function cN(t,e=!1){let r={format:"utf-8",commands:["branch","-v",e?"-D":"-d",t],parser(n,i){return cd(n,i).branches[t]},onError({exitCode:n,stdErr:i,stdOut:a},s,o,l){if(!Uk(String(s),n))return l(s);throw new mc(r.parser(hc(a),hc(i)),String(s))}};return r}var uN=W({"src/lib/tasks/branch.ts"(){"use strict";ko(),nN(),aN(),he()}}),Yk,fN=W({"src/lib/responses/CheckIgnore.ts"(){"use strict";Yk=t=>t.split(/\n/g).map(e=>e.trim()).filter(e=>!!e)}}),Xk={};ft(Xk,{checkIgnoreTask:()=>dN});function dN(t){return{commands:["check-ignore",...t],format:"utf-8",parser:Yk}}var hN=W({"src/lib/tasks/check-ignore.ts"(){"use strict";fN()}}),Kk={};ft(Kk,{cloneMirrorTask:()=>mN,cloneTask:()=>Zk});function pN(t){return/^--upload-pack(=|$)/.test(t)}function Zk(t,e,r){let n=["clone",...r];return Vt(t)&&n.push(t),Vt(e)&&n.push(e),n.find(pN)?yr("git.fetch: potential exploit argument blocked."):rr(n)}function mN(t,e,r){return Me(r,"--mirror"),Zk(t,e,r)}var gN=W({"src/lib/tasks/clone.ts"(){"use strict";ut(),he()}});function vN(t,e){return wr({raw:t,remote:null,branches:[],tags:[],updated:[],deleted:[]},Jk,[t,e])}var Jk,yN=W({"src/lib/parsers/parse-fetch.ts"(){"use strict";he(),Jk=[new me(/From (.+)$/,(t,[e])=>{t.remote=e}),new me(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.branches.push({name:e,tracking:r})}),new me(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.tags.push({name:e,tracking:r})}),new me(/- \[deleted]\s+\S+\s*-> (.+)$/,(t,[e])=>{t.deleted.push({tracking:e})}),new me(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(t,[e,r,n,i])=>{t.updated.push({name:n,tracking:i,to:r,from:e})})]}}),Qk={};ft(Qk,{fetchTask:()=>bN});function wN(t){return/^--upload-pack(=|$)/.test(t)}function bN(t,e,r){let n=["fetch",...r];return t&&e&&n.push(t,e),n.find(wN)?yr("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:vN}}var _N=W({"src/lib/tasks/fetch.ts"(){"use strict";yN(),ut()}});function xN(t){return wr({moves:[]},eT,t)}var eT,SN=W({"src/lib/parsers/parse-move.ts"(){"use strict";he(),eT=[new me(/^Renaming (.+) to (.+)$/,(t,[e,r])=>{t.moves.push({from:e,to:r})})]}}),tT={};ft(tT,{moveTask:()=>EN});function EN(t,e){return{commands:["mv","-v",...Vn(t),e],format:"utf-8",parser:xN}}var AN=W({"src/lib/tasks/move.ts"(){"use strict";SN(),he()}}),rT={};ft(rT,{pullTask:()=>kN});function kN(t,e,r){let n=["pull",...r];return t&&e&&n.splice(1,0,t,e),{commands:n,format:"utf-8",parser(i,a){return i0(i,a)},onError(i,a,s,o){let l=Ij(hc(i.stdOut),hc(i.stdErr));if(l)return o(new mc(l));o(a)}}}var TN=W({"src/lib/tasks/pull.ts"(){"use strict";ko(),kk(),he()}});function CN(t){let e={};return nT(t,([r])=>e[r]={name:r}),Object.values(e)}function PN(t){let e={};return nT(t,([r,n,i])=>{e.hasOwnProperty(r)||(e[r]={name:r,refs:{fetch:"",push:""}}),i&&n&&(e[r].refs[i.replace(/[^a-z]/g,"")]=n)}),Object.values(e)}function nT(t,e){Bg(t,r=>e(r.split(/\s+/)))}var RN=W({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";he()}}),iT={};ft(iT,{addRemoteTask:()=>MN,getRemotesTask:()=>ON,listRemotesTask:()=>IN,remoteTask:()=>$N,removeRemoteTask:()=>FN});function MN(t,e,r){return rr(["remote","add",...r,t,e])}function ON(t){let e=["remote"];return t&&e.push("-v"),{commands:e,format:"utf-8",parser:t?PN:CN}}function IN(t){let e=[...t];return e[0]!=="ls-remote"&&e.unshift("ls-remote"),rr(e)}function $N(t){let e=[...t];return e[0]!=="remote"&&e.unshift("remote"),rr(e)}function FN(t){return rr(["remote","remove",t])}var DN=W({"src/lib/tasks/remote.ts"(){"use strict";RN(),ut()}}),aT={};ft(aT,{stashListTask:()=>LN});function LN(t={},e){let r=gk(t),n=["stash","list",...r.commands,...e],i=dk(r.splitter,r.fields,Jg(n));return ld(n)||{commands:n,format:"utf-8",parser:i}}var jN=W({"src/lib/tasks/stash-list.ts"(){"use strict";wc(),pk(),n0(),vk()}}),sT={};ft(sT,{addSubModuleTask:()=>NN,initSubModuleTask:()=>BN,subModuleTask:()=>ud,updateSubModuleTask:()=>HN});function NN(t,e){return ud(["add",t,e])}function BN(t){return ud(["init",...t])}function ud(t){let e=[...t];return e[0]!=="submodule"&&e.unshift("submodule"),rr(e)}function HN(t){return ud(["update",...t])}var UN=W({"src/lib/tasks/sub-module.ts"(){"use strict";ut()}});function GN(t,e){let r=isNaN(t),n=isNaN(e);return r!==n?r?1:-1:r?oT(t,e):0}function oT(t,e){return t===e?0:t>e?1:-1}function zN(t){return t.trim()}function Vf(t){return typeof t=="string"&&parseInt(t.replace(/^\D+/g,""),10)||0}var nA,lT,VN=W({"src/lib/responses/TagList.ts"(){"use strict";nA=class{constructor(t,e){this.all=t,this.latest=e}},lT=function(t,e=!1){let r=t.split(` +`).map(zN).filter(Boolean);e||r.sort(function(i,a){let s=i.split("."),o=a.split(".");if(s.length===1||o.length===1)return GN(Vf(s[0]),Vf(o[0]));for(let l=0,c=Math.max(s.length,o.length);li.indexOf(".")>=0);return new nA(r,n)}}}),cT={};ft(cT,{addAnnotatedTagTask:()=>YN,addTagTask:()=>qN,tagListTask:()=>WN});function WN(t=[]){let e=t.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...t],parser(r){return lT(r,e)}}}function qN(t){return{format:"utf-8",commands:["tag",t],parser(){return{name:t}}}}function YN(t,e){return{format:"utf-8",commands:["tag","-a","-m",e,t],parser(){return{name:t}}}}var XN=W({"src/lib/tasks/tag.ts"(){"use strict";VN()}}),KN=hL({"src/git.js"(t,e){"use strict";var{GitExecutor:r}=(JL(),it(rk)),{SimpleGitApi:n}=(Kj(),it(Dk)),{Scheduler:i}=(Zj(),it(Lk)),{configurationErrorTask:a}=(ut(),it(Mg)),{asArray:s,filterArray:o,filterPrimitives:l,filterString:c,filterStringOrStringArray:u,filterType:f,getTrailingOptions:d,trailingFunctionArgument:h,trailingOptionsArgument:p}=(he(),it(AA)),{applyPatchTask:g}=(Qj(),it(Bk)),{branchTask:v,branchLocalTask:y,deleteBranchesTask:b,deleteBranchTask:E}=(uN(),it(Wk)),{checkIgnoreTask:S}=(hN(),it(Xk)),{checkIsRepoTask:A}=(PA(),it(kA)),{cloneTask:k,cloneMirrorTask:w}=(gN(),it(Kk)),{cleanWithOptionsTask:x,isCleanOptionsArray:_}=(BA(),it(jA)),{diffSummaryTask:T}=(n0(),it(mk)),{fetchTask:C}=(_N(),it(Qk)),{moveTask:I}=(AN(),it(tT)),{pullTask:L}=(TN(),it(rT)),{pushTagsTask:F}=(Rk(),it(Pk)),{addRemoteTask:J,getRemotesTask:de,listRemotesTask:le,remoteTask:ce,removeRemoteTask:Te}=(DN(),it(iT)),{getResetMode:ne,resetTask:N}=(JA(),it(XA)),{stashListTask:q}=(jN(),it(aT)),{addSubModuleTask:B,initSubModuleTask:Fe,subModuleTask:lr,updateSubModuleTask:Ut}=(UN(),it(sT)),{addAnnotatedTagTask:X,addTagTask:Oe,tagListTask:De}=(XN(),it(cT)),{straightThroughBufferTask:Pt,straightThroughStringTask:Le}=(ut(),it(Mg));function U(j,Z){this._plugins=Z,this._executor=new r(j.baseDir,new i(j.maxConcurrentProcesses),Z),this._trimmed=j.trimmed}(U.prototype=Object.create(n.prototype)).constructor=U,U.prototype.customBinary=function(j){return this._plugins.reconfigure("binary",j),this},U.prototype.env=function(j,Z){return arguments.length===1&&typeof j=="object"?this._executor.env=j:(this._executor.env=this._executor.env||{})[j]=Z,this},U.prototype.stashList=function(j){return this._runTask(q(p(arguments)||{},o(j)&&j||[]),h(arguments))};function Je(j,Z,Se,qe){return typeof Se!="string"?a(`git.${j}() requires a string 'repoPath'`):Z(Se,f(qe,c),d(arguments))}U.prototype.clone=function(){return this._runTask(Je("clone",k,...arguments),h(arguments))},U.prototype.mirror=function(){return this._runTask(Je("mirror",w,...arguments),h(arguments))},U.prototype.mv=function(j,Z){return this._runTask(I(j,Z),h(arguments))},U.prototype.checkoutLatestTag=function(j){var Z=this;return this.pull(function(){Z.tags(function(Se,qe){Z.checkout(qe.latest,j)})})},U.prototype.pull=function(j,Z,Se,qe){return this._runTask(L(f(j,c),f(Z,c),d(arguments)),h(arguments))},U.prototype.fetch=function(j,Z){return this._runTask(C(f(j,c),f(Z,c),d(arguments)),h(arguments))},U.prototype.silent=function(j){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},U.prototype.tags=function(j,Z){return this._runTask(De(d(arguments)),h(arguments))},U.prototype.rebase=function(){return this._runTask(Le(["rebase",...d(arguments)]),h(arguments))},U.prototype.reset=function(j){return this._runTask(N(ne(j),d(arguments)),h(arguments))},U.prototype.revert=function(j){let Z=h(arguments);return typeof j!="string"?this._runTask(a("Commit must be a string"),Z):this._runTask(Le(["revert",...d(arguments,0,!0),j]),Z)},U.prototype.addTag=function(j){let Z=typeof j=="string"?Oe(j):a("Git.addTag requires a tag name");return this._runTask(Z,h(arguments))},U.prototype.addAnnotatedTag=function(j,Z){return this._runTask(X(j,Z),h(arguments))},U.prototype.deleteLocalBranch=function(j,Z,Se){return this._runTask(E(j,typeof Z=="boolean"?Z:!1),h(arguments))},U.prototype.deleteLocalBranches=function(j,Z,Se){return this._runTask(b(j,typeof Z=="boolean"?Z:!1),h(arguments))},U.prototype.branch=function(j,Z){return this._runTask(v(d(arguments)),h(arguments))},U.prototype.branchLocal=function(j){return this._runTask(y(),h(arguments))},U.prototype.raw=function(j){let Z=!Array.isArray(j),Se=[].slice.call(Z?arguments:j,0);for(let Rt=0;Rtt.removeEventListener("abort",a))}}]:void 0}function QN(t){return typeof t=="string"&&t.trim().toLowerCase()==="-c"}function eB(t,e){if(QN(t)&&/^\s*protocol(.[a-z]+)?.allow/.test(e))throw new _i(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function tB(t,e){if(/^\s*--(upload|receive)-pack/.test(t))throw new _i(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(e==="clone"&&/^\s*-u\b/.test(t))throw new _i(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(e==="push"&&/^\s*--exec\b/.test(t))throw new _i(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function rB({allowUnsafeProtocolOverride:t=!1,allowUnsafePack:e=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((i,a)=>{let s=aAg(i))).then(s.done)}return{type:"spawn.after",async action(i,{spawned:a,close:s}){var u,f;let o=r(),l=!0,c=()=>void(l=!1);(u=a.stdout)==null||u.on("data",c),(f=a.stderr)==null||f.on("data",c),a.on("error",c),a.on("close",d=>o.close(d)),a.on("exit",d=>o.exit(d));try{await o.result,l&&await Ag(50),s(o.exitCode)}catch(d){s(o.exitCode,d)}}}}he();var aB="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",aA="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function sB(t){return!t||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(t)}function sA(t,e){if(t.length<1||t.length>2)throw new _i(void 0,"binary",aB);if(t.some(sB))if(e)console.warn(aA);else throw new _i(void 0,"binary",aA);let[n,i]=t;return{binary:n,prefix:i}}function oB(t,e=["git"],r=!1){let n=sA(Vn(e),r);t.on("binary",i=>{n=sA(Vn(i),r)}),t.append("spawn.binary",()=>n.binary),t.append("spawn.args",i=>n.prefix?[n.prefix,...i]:i)}la();function lB(t){return!!(t.exitCode&&t.stdErr.length)}function cB(t){return Buffer.concat([...t.stdOut,...t.stdErr])}function uB(t=!1,e=lB,r=cB){return(n,i)=>!t&&n||!e(i)?n:r(i)}function oA(t){return{type:"task.error",action(e,r){let n=t(e.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new Ir(void 0,n.toString("utf-8"))}:{error:n}}}}he();var fB=class{constructor(){this.plugins=new Set,this.events=new uT.EventEmitter}on(t,e){this.events.on(t,e)}reconfigure(t,e){this.events.emit(t,e)}append(t,e){let r=Me(this.plugins,{type:t,action:e});return()=>this.plugins.delete(r)}add(t){let e=[];return Vn(t).forEach(r=>r&&this.plugins.add(Me(e,r))),()=>{e.forEach(r=>this.plugins.delete(r))}}exec(t,e,r){let n=e,i=Object.freeze(Object.create(r));for(let a of this.plugins)a.type===t&&(n=a.action(n,i));return n}};he();function dB(t){let e="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(a,s){return r.includes(s.method)?mA(a,e):a}},{type:"spawn.after",action(a,s){var o;s.commands.includes(e)&&((o=s.spawned.stderr)==null||o.on("data",l=>{let c=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(l.toString("utf8"));c&&t({method:s.method,stage:hB(c[1]),progress:He(c[2]),processed:He(c[3]),total:He(c[4])})}))}}]}function hB(t){return String(t.toLowerCase().split(" ",1))||"unknown"}he();function pB(t){let e=yA(t,["uid","gid"]);return{type:"spawn.options",action(r){return{...e,...r}}}}function mB({block:t,stdErr:e=!0,stdOut:r=!0}){if(t>0)return{type:"spawn.after",action(n,i){var c,u;let a;function s(){a&&clearTimeout(a),a=setTimeout(l,t)}function o(){var f,d;(f=i.spawned.stdout)==null||f.off("data",s),(d=i.spawned.stderr)==null||d.off("data",s),i.spawned.off("exit",o),i.spawned.off("close",o),a&&clearTimeout(a)}function l(){o(),i.kill(new _i(void 0,"timeout","block timeout reached"))}r&&((c=i.spawned.stdout)==null||c.on("data",s)),e&&((u=i.spawned.stderr)==null||u.on("data",s)),i.spawned.on("exit",o),i.spawned.on("close",o),s()}}}pc();function gB(){return{type:"spawn.args",action(t){let e=[],r;function n(i){(r=r||[]).push(...i)}for(let i=0;iKf(s)&&ME(s)||s));break}e.push(a)}return r?[...e,"--",...r.map(String)]:e}}}he();var vB=KN();function yB(t,e){var i;let r=new fB,n=SA(t&&(typeof t=="string"?{baseDir:t}:t)||{},e);if(!Hg(n.baseDir))throw new ZN(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&r.add(nB(n.config)),r.add(rB(n.unsafe)),r.add(gB()),r.add(iB(n.completion)),n.abort&&r.add(JN(n.abort)),n.progress&&r.add(dB(n.progress)),n.timeout&&r.add(mB(n.timeout)),n.spawnOptions&&r.add(pB(n.spawnOptions)),r.add(oA(uB(!0))),n.errors&&r.add(oA(n.errors)),oB(r,n.binary,(i=n.unsafe)==null?void 0:i.allowUnsafeCustomBinary),new vB(n,r)}ko();var fT=yB;m();var dT=require("obsidian"),fd="YYYY-MM-DD",o0=`${fd} HH:mm`,l0=`${fd} HH:mm:ss`,dd=40,To="conflict-files-obsidian-git.md",Xe={commitMessage:"vault backup: {{date}}",autoCommitMessage:"vault backup: {{date}}",commitMessageScript:"",commitDateFormat:l0,autoSaveInterval:0,autoPushInterval:0,autoPullInterval:0,autoPullOnBoot:!1,autoCommitOnlyStaged:!1,disablePush:!1,pullBeforePush:!0,disablePopups:!1,showErrorNotices:!0,disablePopupsForNoChanges:!1,listChangedFilesInMessageBody:!1,showStatusBar:!0,updateSubmodules:!1,syncMethod:"merge",customMessageOnAutoBackup:!1,autoBackupAfterFileChange:!1,treeStructure:!1,refreshSourceControl:dT.Platform.isDesktopApp,basePath:"",differentIntervalCommitAndPush:!1,changedFilesInStatusBar:!1,showedMobileNotice:!1,refreshSourceControlTimer:7e3,showBranchStatusBar:!0,setLastSaveToLastCommit:!1,submoduleRecurseCheckout:!1,gitDir:"",showFileMenu:!0,authorInHistoryView:"hide",dateInHistoryView:!1,diffStyle:"split",lineAuthor:{show:!1,followMovement:"inactive",authorDisplay:"initials",showCommitHash:!1,dateTimeFormatOptions:"date",dateTimeFormatCustomString:o0,dateTimeTimezone:"viewer-local",coloringMaxAge:"1y",colorNew:{r:255,g:150,b:150},colorOld:{r:120,g:160,b:255},textColorCss:"var(--text-muted)",ignoreWhitespace:!1,gutterSpacingFallbackLength:5}},Ft={type:"git-view",name:"Source Control",icon:"git-pull-request"},Zr={type:"git-history-view",name:"History",icon:"history"},ca={type:"split-diff-view",name:"Diff view",icon:"diff"},ua={type:"diff-view",name:"Diff View",icon:"git-pull-request"},hd="C:\\Program Files\\Git\\cmd\\git.exe",pd="git_credentials_input",es="obsidian_askpass.sh",hT=`#!/bin/sh PROMPT="$1" TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT" @@ -124,48 +127,48 @@ done RESPONSE=$(cat "$TEMP_FILE.response") echo "$RESPONSE" -`,Ax=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];g();var kx=require("obsidian"),I$={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0,obscure:!1},$e=class extends kx.SuggestModal{constructor(t,r){if(super(t.app),this.config={...I$,...r},this.setPlaceholder(this.config.placeholder),this.config.obscure){this.inputEl.type="password";let n=this.containerEl.querySelector(".prompt-input-container");n.addClass("git-obscure-prompt"),n.setAttr("git-is-obscured","true");let i=n==null?void 0:n.createDiv({cls:"search-input-clear-button"});i.style.marginRight="32px",i.id="git-show-password",i.addEventListener("click",()=>{n.getAttr("git-is-obscured")==="true"?(this.inputEl.type="text",n.setAttr("git-is-obscured","false")):(this.inputEl.type="password",n.setAttr("git-is-obscured","true"))})}}openAndGetResult(){return new Promise(t=>{this.resolve=t,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(t=>setTimeout(t,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(t){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[t.length>0?t:" ",...this.config.options]:[t.length>0?t:"...",...this.config.options]}renderSuggestion(t,r){this.config.obscure?r.hide():r.setText(t)}onChooseSuggestion(t,r){if(this.resolve){let n;this.config.allowEmpty&&t===" "?n="":t==="..."?n=void 0:n=t,this.resolve(n)}}};g();function Tx(e,t){let r=Object.assign({},e.lineAuthor,t.lineAuthor);return Object.assign({},e,t,{lineAuthor:r})}var $s=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};g();var cT=Ve(Vx()),uT=require("child_process"),fT=Ve(lT()),Kn=require("obsidian");var Gg=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);function nn(e,t){let r;if(t){if(t.button===0||t.button===1){let n=Kn.Keymap.isModEvent(t);r=e.workspace.getLeaf(n)}}else r=e.workspace.getLeaf(!1);return r}function Tn(e,t,r,n,i){if(t.button==2){let a=e.vault.getAbstractFileByPath(r);if(a!=null){let s=new Kn.Menu;e.workspace.trigger("file-menu",s,a,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}else{let s=new Kn.Menu;e.workspace.trigger("obsidian-git:menu",s,r,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}}}function Ii(e){throw new Error("Impossible branch: "+e)}function zg(e){return`rgb(${e.r},${e.g},${e.b})`}function dT(e){var a;let t=(a=cT.fromString(e))==null?void 0:a.toRgbaArray();if(t===void 0)return;let[r,n,i]=t;return{r,g:n,b:i}}function hT(e){return e.diff(Kn.moment.unix(0),"seconds")}function pT(e){if(e.length!==0)return e.slice().sort()[Math.floor(e.length/2)]}function mT(e,t){return(0,fT.default)(e,t,{strict:!0})}function Wl(e,t){return new Proxy(e,{get(r,n){return n==="length"?Math.min(t,r.length):r[n]}})}function gT(e,t,r){return e.length<=t?new Array(t-e.length).fill(r).join("")+e:e.substring(e.length-t)}function vT(e,t){if(t<=0)return e;let r=new Array(t).fill(" ").join(""),n=e.substring(t,e.length);return r+n}function Vg(e,t,r){return e<=t&&t<=r}function Fi(e){let[t,...r]=e.split("/");return[t,r.length===0?void 0:r.join("/")]}function Cn(e){return e.endsWith("/")?e:e.split("/").last().replace(/\.md$/,"")}function yT(e){return e===1?"1 minute":`${e} minutes`}function $B(e){let t=e.lastIndexOf(".");return e.substring(t+1)}function Ws(e){if(e.endsWith(".md"))return!1;let t=$B(e);return Ax.includes(t)}function Wg(e){return(e.startsWith("https://github.com/")||e.startsWith("https://gitlab.com/"))&&(e.endsWith(".git")||(e=e+".git")),e}function qs(e,t){let r=t.vault.getAbstractFileByPath(e);if(!(r instanceof Kn.TFile))return!1;try{return!!t.viewRegistry.getTypeByExtension(r.extension)}catch(n){return!0}}function wT({isFolder:e,gitRelativePath:t}){let r="/";return r+=t,e&&(r+="/"),r.replace(/([\\!#*?[\]])/g,String.raw`\$1`).replace(/\s(?=\s*$)/g,String.raw`\ `)}function ql(e,t,r={}){return new Promise((n,i)=>{let a=(0,uT.spawn)(e,t,r),s="",o="";a.stdout.on("data",l=>{s+=l.toString()}),a.stderr.on("data",l=>{o+=l.toString()}),a.on("error",l=>{n({error:new Error(l.message),stdout:s,stderr:s,code:1})}),a.on("close",l=>{n({stdout:s,stderr:o,code:l!=null?l:1,error:void 0})})})}g();var bT=require("obsidian"),Ys=class{constructor(t){this.plugin=t,this.app=t.app}getRelativeVaultPath(t){return this.plugin.settings.basePath?this.plugin.settings.basePath+"/"+t:t}getRelativeRepoPath(t,r=!0){return r&&this.plugin.settings.basePath.length>0?t.substring(this.plugin.settings.basePath.length+1):t}unload(){}_getTreeStructure(t,r=0){let n=[];for(t=[...t];t.length>0;){let i=t.first(),a=i.path.substring(r);if(a.contains("/")){let s=a.substring(0,a.indexOf("/")),o=t.filter(c=>c.path.substring(r).startsWith(s+"/"));o.forEach(c=>t.remove(c));let l=i.path.substring(0,a.indexOf("/")+r);n.push({title:s,path:l,vaultPath:this.getRelativeVaultPath(l),children:this._getTreeStructure(o,(r>0?r+s.length:s.length)+1)})}else n.push({title:a,data:i,path:i.path,vaultPath:this.getRelativeVaultPath(i.path)}),t.remove(i)}return n}simplify(t){var r,n,i,a;for(let s of t){for(;;){let o=((r=s.children)==null?void 0:r.length)==1,l=((i=(n=s.children)==null?void 0:n.first())==null?void 0:i.data)==null;if(!(s.children!=null&&o&&l))break;let c=s.children.first();s.title+="/"+c.title,s.data=c.data,s.path=c.path,s.vaultPath=c.vaultPath,s.children=c.children}s.children!=null&&this.simplify(s.children),(a=s.children)==null||a.sort((o,l)=>{let c=(l.data==null?1:0)-(o.data==null?1:0);return c!=0?c:o.title.localeCompare(l.title)})}return t.sort((s,o)=>{let l=(o.data==null?1:0)-(s.data==null?1:0);return l!=0?l:s.title.localeCompare(o.title)})}getTreeStructure(t){let r=this._getTreeStructure(t);return this.simplify(r)}async formatCommitMessage(t){let r;if(t.includes("{{numFiles}}")){r=await this.status();let n=r.staged.length;t=t.replace("{{numFiles}}",String(n))}if(t.includes("{{hostname}}")){let n=this.plugin.localStorage.getHostname()||"";t=t.replace("{{hostname}}",n)}if(t.includes("{{files}}")){r=r!=null?r:await this.status();let n={},i="";if(r.staged.length<100){r.staged.forEach(s=>{s.index in n?n[s.index].push(s.path):n[s.index]=[s.path]});let a=[];for(let[s,o]of Object.entries(n))a.push(s+" "+o.join(" "));i=a.join(", ")}else i="Too many files to list";t=t.replace("{{files}}",i)}if(t=t.replace("{{date}}",(0,bT.moment)().format(this.plugin.settings.commitDateFormat)),this.plugin.settings.listChangedFilesInMessageBody){let n=r!=null?r:await this.status(),i="";n.staged.length<100?i=n.staged.map(a=>a.path).join(` -`):i="Too many files to list",t=t+` +`,pT=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];m();var mT=require("obsidian"),wB={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0,obscure:!1},ze=class extends mT.SuggestModal{constructor(e,r){if(super(e.app),this.config={...wB,...r},this.setPlaceholder(this.config.placeholder),this.config.obscure){this.inputEl.type="password";let n=this.containerEl.querySelector(".prompt-input-container");n.addClass("git-obscure-prompt"),n.setAttr("git-is-obscured","true");let i=n==null?void 0:n.createDiv({cls:"search-input-clear-button"});i.style.marginRight="32px",i.id="git-show-password",i.addEventListener("click",()=>{n.getAttr("git-is-obscured")==="true"?(this.inputEl.type="text",n.setAttr("git-is-obscured","false")):(this.inputEl.type="password",n.setAttr("git-is-obscured","true"))})}}openAndGetResult(){return new Promise(e=>{this.resolve=e,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(e=>setTimeout(e,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(e){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[e.length>0?e:" ",...this.config.options]:[e.length>0?e:"...",...this.config.options]}renderSuggestion(e,r){this.config.obscure?r.hide():r.setText(e)}onChooseSuggestion(e,r){if(this.resolve){let n;this.config.allowEmpty&&e===" "?n="":e==="..."?n=void 0:n=e,this.resolve(n)}}};m();function gT(t,e){let r=Object.assign({},t.lineAuthor,e.lineAuthor);return Object.assign({},t,e,{lineAuthor:r})}var Co=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};m();var e3=Ot($T()),t3=require("child_process"),r3=Ot(QR()),Ai=require("obsidian");function Ud(t){throw new Error(`Unexpected object: ${t}`)}function Ic(t,e,r){return t===1?`${t} ${e}`:`${t} ${r!=null?r:e+"s"}`}var pv=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);function vn(t,e){let r;if(e){if(e.button===0||e.button===1){let n=Ai.Keymap.isModEvent(e);r=t.workspace.getLeaf(n)}}else r=t.workspace.getLeaf(!1);return r}function Xn(t,e,r,n,i){if(e.button==2){let a=t.vault.getAbstractFileByPath(r);if(a!=null){let s=new Ai.Menu;t.workspace.trigger("file-menu",s,a,i,n),s.showAtPosition({x:e.pageX,y:e.pageY})}else{let s=new Ai.Menu;t.workspace.trigger("obsidian-git:menu",s,r,i,n),s.showAtPosition({x:e.pageX,y:e.pageY})}}}function pa(t){throw new Error("Impossible branch: "+t)}function mv(t){return`rgb(${t.r},${t.g},${t.b})`}function n3(t){var a;let e=(a=e3.fromString(t))==null?void 0:a.toRgbaArray();if(e===void 0)return;let[r,n,i]=e;return{r,g:n,b:i}}function i3(t){return t.diff(Ai.moment.unix(0),"seconds")}function a3(t){if(t.length!==0)return t.slice().sort()[Math.floor(t.length/2)]}function s3(t,e){return(0,r3.default)(t,e,{strict:!0})}function $c(t,e){return new Proxy(t,{get(r,n){return n==="length"?Math.min(e,r.length):r[n]}})}function o3(t,e,r){return t.length<=e?new Array(e-t.length).fill(r).join("")+t:t.substring(t.length-e)}function l3(t,e){if(e<=0)return t;let r=new Array(e).fill(" ").join(""),n=t.substring(e,t.length);return r+n}function gv(t,e,r){return t<=e&&e<=r}function ki(t){let[e,...r]=t.split("/");return[e,r.length===0?void 0:r.join("/")]}function Kn(t){return t.endsWith("/")?t:t.split("/").last().replace(/\.md$/,"")}function c3(t){return t===1?"1 minute":`${t} minutes`}function LH(t){let e=t.lastIndexOf(".");return t.substring(e+1)}function Io(t){if(t.endsWith(".md"))return!1;let e=LH(t);return pT.includes(e)}function vv(t){return(t.startsWith("https://github.com/")||t.startsWith("https://gitlab.com/"))&&(t.endsWith(".git")||(t=t+".git")),t}function $o(t,e){let r=e.vault.getAbstractFileByPath(t);if(!(r instanceof Ai.TFile))return!1;try{return!!e.viewRegistry.getTypeByExtension(r.extension)}catch(n){return!0}}function u3({isFolder:t,gitRelativePath:e}){let r="/";return r+=e,t&&(r+="/"),r.replace(/([\\!#*?[\]])/g,String.raw`\$1`).replace(/\s(?=\s*$)/g,String.raw`\ `)}function Fc(t,e,r={}){return new Promise((n,i)=>{let a=(0,t3.spawn)(t,e,r),s="",o="";a.stdout.on("data",l=>{s+=l.toString()}),a.stderr.on("data",l=>{o+=l.toString()}),a.on("error",l=>{n({error:new Error(l.message),stdout:s,stderr:s,code:1})}),a.on("close",l=>{n({stdout:s,stderr:o,code:l!=null?l:1,error:void 0})})})}m();var f3=require("obsidian"),Fo=class{constructor(e){this.plugin=e,this.app=e.app}getRelativeVaultPath(e){return this.plugin.settings.basePath?this.plugin.settings.basePath+"/"+e:e}getRelativeRepoPath(e,r=!0){return r&&this.plugin.settings.basePath.length>0?e.substring(this.plugin.settings.basePath.length+1):e}unload(){}_getTreeStructure(e,r=0){let n=[];for(e=[...e];e.length>0;){let i=e.first(),a=i.path.substring(r);if(a.contains("/")){let s=a.substring(0,a.indexOf("/")),o=e.filter(c=>c.path.substring(r).startsWith(s+"/"));o.forEach(c=>e.remove(c));let l=i.path.substring(0,a.indexOf("/")+r);n.push({title:s,path:l,vaultPath:this.getRelativeVaultPath(l),children:this._getTreeStructure(o,(r>0?r+s.length:s.length)+1)})}else n.push({title:a,data:i,path:i.path,vaultPath:this.getRelativeVaultPath(i.path)}),e.remove(i)}return n}simplify(e){var r,n,i,a;for(let s of e){for(;;){let o=((r=s.children)==null?void 0:r.length)==1,l=((i=(n=s.children)==null?void 0:n.first())==null?void 0:i.data)==null;if(!(s.children!=null&&o&&l))break;let c=s.children.first();s.title+="/"+c.title,s.data=c.data,s.path=c.path,s.vaultPath=c.vaultPath,s.children=c.children}s.children!=null&&this.simplify(s.children),(a=s.children)==null||a.sort((o,l)=>{let c=(l.data==null?1:0)-(o.data==null?1:0);return c!=0?c:o.title.localeCompare(l.title)})}return e.sort((s,o)=>{let l=(o.data==null?1:0)-(s.data==null?1:0);return l!=0?l:s.title.localeCompare(o.title)})}getTreeStructure(e){let r=this._getTreeStructure(e);return this.simplify(r)}async formatCommitMessage(e){let r;if(e.includes("{{numFiles}}")){r=await this.status();let n=r.staged.length;e=e.replace("{{numFiles}}",String(n))}if(e.includes("{{hostname}}")){let n=this.plugin.localStorage.getHostname()||"";e=e.replace("{{hostname}}",n)}if(e.includes("{{files}}")){r=r!=null?r:await this.status();let n={},i="";if(r.staged.length<100){r.staged.forEach(s=>{s.index in n?n[s.index].push(s.path):n[s.index]=[s.path]});let a=[];for(let[s,o]of Object.entries(n))a.push(s+" "+o.join(" "));i=a.join(", ")}else i="Too many files to list";e=e.replace("{{files}}",i)}if(e=e.replace("{{date}}",(0,f3.moment)().format(this.plugin.settings.commitDateFormat)),this.plugin.settings.listChangedFilesInMessageBody){let n=r!=null?r:await this.status(),i="";n.staged.length<100?i=n.staged.map(a=>a.path).join(` +`):i="Too many files to list",e=e+` Affected files: -`+i}return t}};var Ee=class extends Ys{constructor(r){super(r);this.useDefaultWindowsGitPath=!1}async setGitInstance(r=!1){var n;if(await this.isGitInstalled()){let i=this.app.vault.adapter,a=i.getBasePath(),s=a;this.plugin.settings.basePath&&(await i.exists((0,Jn.normalizePath)(this.plugin.settings.basePath))?s=De.join(a,this.plugin.settings.basePath):r||new Jn.Notice("ObsidianGit: Base path does not exist")),this.absoluteRepoPath=s,this.git=xx({baseDir:s,binary:this.plugin.localStorage.getGitPath()||(this.useDefaultWindowsGitPath?zu:void 0),config:["core.quotepath=off"],unsafe:{allowUnsafeCustomBinary:!0}});let o=this.plugin.localStorage.getPATHPaths(),l=this.plugin.localStorage.getEnvVars(),c=this.plugin.settings.gitDir;if(o.length>0){let v=process.env.PATH+":"+o.join(":");process.env.PATH=v}c&&(process.env.GIT_DIR=c);for(let v of l){let[y,b]=v.split("=");process.env[y]=b}let u="simple-git",f=",",h=((n=localStorage.debug)!=null?n:"").split(f);if(!h.includes(u)&&!h.includes(`-${u}`)&&(h.push(u),ST.default.enable(h.join(f))),await this.git.checkIsRepo()){let v=await this.git.revparse("--show-cdup"),y=(0,Yl.resolve)(s+Yl.sep+v);this.absoluteRepoPath=y,await this.git.cwd(y)}let p=De.join(a,this.app.vault.configDir,"plugins","obsidian-git"),m=De.join(p,wa);process.env.SSH_ASKPASS==null&&(process.env.SSH_ASKPASS=m),process.env.OBSIDIAN_GIT_CREDENTIALS_INPUT=De.join(p,Vu),process.env.SSH_ASKPASS==m&&this.askpass().catch(v=>this.plugin.displayError(v))}}getRelativeVaultPath(r){let i=this.app.vault.adapter.getBasePath(),a=De.join(this.absoluteRepoPath,r),s=De.relative(i,a);return Jn.Platform.isWin&&(s=s.replace(/\\/g,"/")),s}getRelativeRepoPath(r,n=!0){if(n){let a=this.plugin.app.vault.adapter.getBasePath(),s=this.absoluteRepoPath,o=De.join(a,r),l=De.relative(s,o);return Jn.Platform.isWin&&(l=l.replace(/\\/g,"/")),l}return r}async askpass(){let r=this.app.vault.adapter,n=r.getBasePath(),i=De.join(n,this.app.vault.configDir,"plugins","obsidian-git"),a=this.app.vault.configDir+"/plugins/obsidian-git/";await this.addAskPassScriptToExclude(),await _r.writeFile(De.join(i,wa),Ex),await _r.chmod(De.join(i,wa),493),this.watchAbortController=new AbortController;let{signal:s}=this.watchAbortController;try{let o=_r.watch(i,{signal:s});for await(let l of o){if(l.filename!=Vu)continue;let c=a+Vu;if(!await r.exists(c))continue;let u=await r.read(c),f;u.length>60&&(f=new Jn.Notice(u,999999));let d=await new $e(this.plugin,{allowEmpty:!0,obscure:!0,placeholder:u.length>60?"Enter a response to the message.":u}).openAndGetResult();f==null||f.hide(),await r.exists(c)&&await r.write(`${c}.response`,d!=null?d:"")}}catch(o){this.plugin.displayError(o),await _r.rm(De.join(i,wa),{force:!0}),await _r.rm(De.join(i,`${wa}.response`),{force:!0}),await new Promise(l=>setTimeout(l,5e3)),this.plugin.log("Retry watch for ask pass"),await this.askpass()}}async addAskPassScriptToExclude(){try{let r=await this.git.revparse(["--path-format=absolute","--git-path","info/exclude"]),n=De.join(this.app.vault.configDir,"plugins","obsidian-git",wa),i=this.getRelativeRepoPath(n,!0);(await _r.readFile(r,"utf-8")).split(` -`).some(l=>l.contains(i))||await _r.appendFile(r,i+` -`)}catch(r){console.error("Error while adding askpass script to exclude file:",r)}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(){this.plugin.setPluginState({gitAction:1});let r=await this.git.status();this.plugin.setPluginState({gitAction:0});let n=r.files.map(i=>{let a=this.formatPath(i);return{path:a.path,from:a.from,index:i.index==="?"?"U":i.index,workingDir:i.working_dir==="?"?"U":i.working_dir,vaultPath:this.getRelativeVaultPath(a.path)}});return{all:n,changed:n.filter(i=>i.workingDir!==" "),staged:n.filter(i=>i.index!==" "&&i.index!="U"),conflicted:r.conflicted.map(i=>this.formatPath({path:i}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let n=this.getRelativeRepoPath(r),a=["-C",De.dirname(n),"rev-parse","HEAD"],s=this.git.raw(a);return s.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),s}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((n,i,a,s)=>{if(!(s.contains("submodule")&&s.contains("foreach")))return;let o="",l=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");i.on("data",c=>{o+=c.toString("utf8")}),i.on("end",()=>{let u=o.split(` -`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return l+"/"+d[1]+Yl.sep}).filter(f=>!!f);u.reverse(),r(u)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},n=>this.plugin.displayError(n))})}formatPath(r,n=!1){function i(a){if(a!=null)return a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a}return n?{from:i(r.from),path:i(r.path)}:{path:i(r.path)}}async blame(r,n,i){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let a=await this.getSubmoduleOfFile(r),s=a?["-C",a.submodule]:[],o=a?a.relativeFilepath:r;s.push("blame","--porcelain"),i&&s.push("-w");let l=`-C${Gu}`;switch(n){case"inactive":break;case"same-commit":s.push("-C",l);break;case"all-commits":s.push("-C","-C",l);break;default:Ii(n)}s.push("--",o);let c=await this.git.raw(s);return LB(c)}async isTracked(r){let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("ls-files","--",a),this.git.raw(i).then(s=>s.trim()!=="")}async commitAll({message:r}){if(this.plugin.settings.updateSubmodules){this.plugin.setPluginState({gitAction:4});let i=await this.getSubmodulePaths();for(let a of i)await this.git.cwd({path:a,root:!1}).add("-A"),await this.git.cwd({path:a,root:!1}).commit(await this.formatCommitMessage(r))}this.plugin.setPluginState({gitAction:3}),await this.git.add("-A"),this.plugin.setPluginState({gitAction:4});let n=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),n.summary.changes}async commit({message:r,amend:n}){this.plugin.setPluginState({gitAction:4});let i=(await this.git.commit(await this.formatCommitMessage(r),n?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),this.plugin.setPluginState({gitAction:0}),i}async stage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.add(["--",r]),this.plugin.setPluginState({gitAction:0})}async stageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.add(r!=null?r:"-A"),this.plugin.setPluginState({gitAction:0})}async unstageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.reset(r!=null?["--",r]:[]),this.plugin.setPluginState({gitAction:0})}async unstage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.reset(["--",r]),this.plugin.setPluginState({gitAction:0})}async discard(r){this.plugin.setPluginState({gitAction:3}),await this.isTracked(r)?await this.git.checkout(["--",r]):await this.app.vault.adapter.rmdir(this.getRelativeVaultPath(r),!0),this.plugin.setPluginState({gitAction:0})}async hashObject(r){r=this.getRelativeRepoPath(r);let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("hash-object","--",a),this.git.raw(i)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){this.plugin.setPluginState({gitAction:2});try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo(),n=await this.git.revparse([r.current]);if(!r.tracking&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring pull of main repo and updating submodules only.");return}await this.git.fetch();let i=await this.git.revparse([r.tracking]);if(n!==i){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{switch(this.plugin.settings.syncMethod){case"merge":await this.git.merge([r.tracking]);break;case"rebase":await this.git.rebase([r.tracking])}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,i]),await this.unstageAll({})}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`)}this.app.workspace.trigger("obsidian-git:head-change");let a=await this.git.revparse([r.current]);return(await this.git.diff([`${n}..${a}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}}async push(){this.plugin.setPluginState({gitAction:5});try{if(this.plugin.settings.updateSubmodules){let s=await this.git.env({...process.env,OBSIDIAN_GIT:1}).subModule(["foreach","--recursive",`tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi`]);console.log(s)}let r=await this.git.status(),n=r.tracking,i=r.current;if(!n&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring push of main repo and updating submodules only.");return}let a=(await this.git.diffSummary([i,n,"--"])).changed;return await this.git.env({...process.env,OBSIDIAN_GIT:1}).push(),a}catch(r){this.convertErrors(r)}}async getUnpushedCommits(){let r=await this.git.status(),n=r.tracking,i=r.current;return n==null||i==null?0:(await this.git.diffSummary([i,n,"--"])).changed}async canPush(){if(this.plugin.settings.updateSubmodules===!0)return!0;let r=await this.git.status(),n=r.tracking,i=r.current;return n?(await this.git.diffSummary([i,n,"--"])).changed!==0:!1}async checkRequirements(){return await this.isGitInstalled()?await this.git.checkIsRepo()?"valid":"missing-repo":"missing-git"}async branchInfo(){let r=await this.git.status(),n=await this.git.branch(["--no-color"]);return{current:r.current||void 0,tracking:r.tracking||void 0,branches:n.all}}async getRemoteUrl(r){try{return await this.git.remote(["get-url",r])||void 0}catch(n){if(String(n).contains(r))return;throw n}}async log(r,n=!0,i,a){let s;r&&(s=this.getRelativeRepoPath(r,n));let o={file:s,maxCount:i,"--diff-merges":"first-parent","--name-status":null};return a&&(o[a]=null),(await this.git.log(o)).all.map(c=>{var u,f,d,h;return{...c,author:{name:c.author_name,email:c.author_email},refs:c.refs.split(", ").filter(p=>p.length>0),diff:{...c.diff,files:(f=(u=c.diff)==null?void 0:u.files.map(p=>({...p,status:p.status,path:p.file,hash:c.hash,vaultPath:this.getRelativeVaultPath(p.file),fromPath:p.from,fromVaultPath:p.from!=null?this.getRelativeVaultPath(p.from):void 0,binary:p.binary})))!=null?f:[]},fileName:(h=(d=c.diff)==null?void 0:d.files.first())==null?void 0:h.file}})}async show(r,n,i=!0){let a=this.getRelativeRepoPath(n,i);return this.git.show([r+":"+a])}async checkout(r,n){if(n&&(r=`${n}/${r}`),await this.git.checkout(r),this.plugin.settings.submoduleRecurseCheckout){let i=await this.getSubmodulePaths();for(let a of i){let s=await this.git.cwd({path:a,root:!1}).branch();Object.keys(s.branches).includes(r)&&await this.git.cwd({path:a,root:!1}).checkout(r)}}}async createBranch(r){await this.git.checkout(["-b",r])}async deleteBranch(r,n){await this.git.branch([n?"-D":"-d",r])}async branchIsMerged(r){return!(await this.git.branch(["--no-merged"])).all.contains(r)}async init(){await this.git.init(!1)}async clone(r,n,i){await this.git.clone(r,De.join(this.app.vault.adapter.getBasePath(),n),i?["--depth",`${i}`]:[])}async setConfig(r,n){n==null?await this.git.raw(["config","--local","--unset",r]):await this.git.addConfig(r,n)}async getConfig(r){let i=(await this.git.listConfig("local")).all[r];if(typeof i=="string"||i==null)return i;throw new Error("Config value is not a string")}async fetch(r){await this.git.fetch(r!=null?[r]:[])}async setRemote(r,n){(await this.getRemotes()).includes(r)?await this.git.remote(["set-url",r,n]):await this.git.remote(["add",r,n])}async getRemoteBranches(r){let n=await this.git.branch(["-r","--list",`${r}*`]),i=[];for(let a in n.branches)i.push(n.branches[a].name);return i}async getRemotes(){let r=await this.git.remote([]);return r?r.trim().split(` -`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(n){try{await this.git.branch(["--set-upstream",r])}catch(i){await this.git.push(["--set-upstream",...Fi(r)])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,n=!1,i){return n?await this.git.diff(["--cached","--",r]):i?await this.git.show([`${i}`,"--",r]):await this.git.diff(["--",r])}async diff(r,n,i){return await this.git.diff([`${n}..${i}`,"--",r])}async rawCommand(r){let n=r.split(" ");return await this.git.raw(n[0],...n.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(De.dirname(r)))return;let n=await this.git.raw(["-C",De.dirname(r),"rev-parse","--show-toplevel"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message));if(n=n.trim(),(await this.git.raw(["-C",De.dirname(r),"rev-parse","--show-superproject-working-tree"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message))).trim()==="")return;let s=this.app.vault.adapter.getFullPath(De.normalize(r)),o=De.relative(n,s);return{submodule:n,relativeFilepath:o}}async getLastCommitTime(){let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}async isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),n=await ql(r||"git",["--version"],{});if(n.error)if(Jn.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${zu}) of Git for Windows.`);let i=await ql(zu,["--version"]);if(i.error)return console.error(i.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(n.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof wr){let n=String(r.message);if(n.contains("Could not resolve host")||n.contains("Unable to resolve host")||n.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||n.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||n.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new $s(n)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(n){let i=n instanceof Error?n.message:String(n);return this.plugin.displayError(`Error checking LFS status: ${i}`),!1}}},ET={hash:"000000",isZeroCommit:!0,summary:""};function LB(e){let r=e.replace(`\r +`+i}return e}};var Ce=class extends Fo{constructor(r){super(r);this.useDefaultWindowsGitPath=!1}async setGitInstance(r=!1){var n;if(await this.isGitInstalled()){let i=this.app.vault.adapter,a=i.getBasePath(),s=a;this.plugin.settings.basePath&&(await i.exists((0,Ti.normalizePath)(this.plugin.settings.basePath))?s=Ve.join(a,this.plugin.settings.basePath):r||new Ti.Notice("ObsidianGit: Base path does not exist")),this.absoluteRepoPath=s,this.git=fT({baseDir:s,binary:this.plugin.localStorage.getGitPath()||(this.useDefaultWindowsGitPath?hd:void 0),config:["core.quotepath=off"],unsafe:{allowUnsafeCustomBinary:!0}});let o=this.plugin.localStorage.getPATHPaths(),l=this.plugin.localStorage.getEnvVars(),c=this.plugin.settings.gitDir;if(o.length>0){let v=process.env.PATH+":"+o.join(":");process.env.PATH=v}c&&(process.env.GIT_DIR=c);for(let v of l){let[y,b]=v.split("=");process.env[y]=b}let u="simple-git",f=",",h=((n=localStorage.debug)!=null?n:"").split(f);if(!h.includes(u)&&!h.includes(`-${u}`)&&(h.push(u),p3.default.enable(h.join(f))),await this.git.checkIsRepo()){let v=await this.git.revparse("--show-cdup"),y=(0,Dc.resolve)(s+Dc.sep+v);this.absoluteRepoPath=y,await this.git.cwd(y)}let p=Ve.join(a,this.app.vault.configDir,"plugins","obsidian-git"),g=Ve.join(p,es);process.env.SSH_ASKPASS==null&&(process.env.SSH_ASKPASS=g),process.env.OBSIDIAN_GIT_CREDENTIALS_INPUT=Ve.join(p,pd),process.env.SSH_ASKPASS==g&&this.askpass().catch(v=>this.plugin.displayError(v))}}getRelativeVaultPath(r){let i=this.app.vault.adapter.getBasePath(),a=Ve.join(this.absoluteRepoPath,r),s=Ve.relative(i,a);return Ti.Platform.isWin&&(s=s.replace(/\\/g,"/")),s}getRelativeRepoPath(r,n=!0){if(n){let a=this.plugin.app.vault.adapter.getBasePath(),s=this.absoluteRepoPath,o=Ve.join(a,r),l=Ve.relative(s,o);return Ti.Platform.isWin&&(l=l.replace(/\\/g,"/")),l}return r}async askpass(){let r=this.app.vault.adapter,n=r.getBasePath(),i=Ve.join(n,this.app.vault.configDir,"plugins","obsidian-git"),a=this.app.vault.configDir+"/plugins/obsidian-git/";await this.addAskPassScriptToExclude(),await $r.writeFile(Ve.join(i,es),hT),await $r.chmod(Ve.join(i,es),493),this.watchAbortController=new AbortController;let{signal:s}=this.watchAbortController;try{let o=$r.watch(i,{signal:s});for await(let l of o){if(l.filename!=pd)continue;let c=a+pd;if(!await r.exists(c))continue;let u=await r.read(c),f;u.length>60&&(f=new Ti.Notice(u,999999));let d=await new ze(this.plugin,{allowEmpty:!0,obscure:!0,placeholder:u.length>60?"Enter a response to the message.":u}).openAndGetResult();f==null||f.hide(),await r.exists(c)&&await r.write(`${c}.response`,d!=null?d:"")}}catch(o){this.plugin.displayError(o),await $r.rm(Ve.join(i,es),{force:!0}),await $r.rm(Ve.join(i,`${es}.response`),{force:!0}),await new Promise(l=>setTimeout(l,5e3)),this.plugin.log("Retry watch for ask pass"),await this.askpass()}}async addAskPassScriptToExclude(){try{let r=await this.git.revparse(["--path-format=absolute","--git-path","info/exclude"]),n=Ve.join(this.app.vault.configDir,"plugins","obsidian-git",es),i=this.getRelativeRepoPath(n,!0);(await $r.readFile(r,"utf-8")).split(` +`).some(l=>l.contains(i))||await $r.appendFile(r,i+` +`)}catch(r){console.error("Error while adding askpass script to exclude file:",r)}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(r){let n=r==null?void 0:r.path;this.plugin.setPluginState({gitAction:1});let i=await this.git.status(n!=null?["--",n]:[]);this.plugin.setPluginState({gitAction:0});let a=i.files.map(s=>{let o=this.formatPath(s);return{path:o.path,from:o.from,index:s.index==="?"?"U":s.index,workingDir:s.working_dir==="?"?"U":s.working_dir,vaultPath:this.getRelativeVaultPath(o.path)}});return{all:a,changed:a.filter(s=>s.workingDir!==" "),staged:a.filter(s=>s.index!==" "&&s.index!="U"),conflicted:i.conflicted.map(s=>this.formatPath({path:s}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let n=this.getRelativeRepoPath(r),a=["-C",Ve.dirname(n),"rev-parse","HEAD"],s=this.git.raw(a);return s.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),s}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((n,i,a,s)=>{if(!(s.contains("submodule")&&s.contains("foreach")))return;let o="",l=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");i.on("data",c=>{o+=c.toString("utf8")}),i.on("end",()=>{let u=o.split(` +`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return l+"/"+d[1]+Dc.sep}).filter(f=>!!f);u.reverse(),r(u)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},n=>this.plugin.displayError(n))})}formatPath(r){function n(i){if(i!=null)return i.startsWith('"')&&i.endsWith('"')?i.substring(1,i.length-1):i}return r.from!=null?{from:n(r.from),path:n(r.path)}:{path:n(r.path)}}async blame(r,n,i){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let a=await this.getSubmoduleOfFile(r),s=a?["-C",a.submodule]:[],o=a?a.relativeFilepath:r;s.push("blame","--porcelain"),i&&s.push("-w");let l=`-C${dd}`;switch(n){case"inactive":break;case"same-commit":s.push("-C",l);break;case"all-commits":s.push("-C","-C",l);break;default:pa(n)}s.push("--",o);let c=await this.git.raw(s);return jH(c)}async isTracked(r){let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("ls-files","--",a),this.git.raw(i).then(s=>s.trim()!=="")}async commitAll({message:r}){if(this.plugin.settings.updateSubmodules){this.plugin.setPluginState({gitAction:4});let i=await this.getSubmodulePaths();for(let a of i)await this.git.cwd({path:a,root:!1}).add("-A"),await this.git.cwd({path:a,root:!1}).commit(await this.formatCommitMessage(r))}this.plugin.setPluginState({gitAction:3}),await this.git.add("-A"),this.plugin.setPluginState({gitAction:4});let n=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),n.summary.changes}async commit({message:r,amend:n}){this.plugin.setPluginState({gitAction:4});let i=(await this.git.commit(await this.formatCommitMessage(r),n?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),this.plugin.setPluginState({gitAction:0}),i}async stage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.add(["--",r]),this.plugin.setPluginState({gitAction:0})}async stageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.add(r!=null?r:"-A"),this.plugin.setPluginState({gitAction:0})}async unstageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.reset(r!=null?["--",r]:[]),this.plugin.setPluginState({gitAction:0})}async unstage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.reset(["--",r]),this.plugin.setPluginState({gitAction:0})}async discard(r){this.plugin.setPluginState({gitAction:3}),await this.isTracked(r)&&await this.git.checkout(["--",r]),this.plugin.setPluginState({gitAction:0})}async getUntrackedPaths(r){let n=r==null?void 0:r.path;this.plugin.setPluginState({gitAction:1});let i=["ls-files","--others","--exclude-standard","--directory"];n!=null&&i.push("--",n);let a=await this.git.raw(i);return this.plugin.setPluginState({gitAction:0}),a.split(/\r\n|\r|\n/).filter(s=>s.length>0)}async hashObject(r){r=this.getRelativeRepoPath(r);let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("hash-object","--",a),this.git.raw(i)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){this.plugin.setPluginState({gitAction:2});try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo(),n=await this.git.revparse([r.current]);if(!r.tracking&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring pull of main repo and updating submodules only.");return}await this.git.fetch();let i=await this.git.revparse([r.tracking]);if(n!==i){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{switch(this.plugin.settings.syncMethod){case"merge":await this.git.merge([r.tracking]);break;case"rebase":await this.git.rebase([r.tracking])}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,i]),await this.unstageAll({})}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`)}this.app.workspace.trigger("obsidian-git:head-change");let a=await this.git.revparse([r.current]);return(await this.git.diff([`${n}..${a}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}}async push(){this.plugin.setPluginState({gitAction:5});try{if(this.plugin.settings.updateSubmodules){let s=await this.git.env({...process.env,OBSIDIAN_GIT:1}).subModule(["foreach","--recursive",`tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi`]);console.log(s)}let r=await this.git.status(),n=r.tracking,i=r.current;if(!n&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring push of main repo and updating submodules only.");return}let a=(await this.git.diffSummary([i,n,"--"])).changed;return await this.git.env({...process.env,OBSIDIAN_GIT:1}).push(),a}catch(r){this.convertErrors(r)}}async getUnpushedCommits(){let r=await this.git.status(),n=r.tracking,i=r.current;if(n==null||i==null)return 0;let[a,s]=ki(n);return(await this.getRemoteBranches(a)).includes(n)?(await this.git.diffSummary([i,n,"--"])).changed:(this.plugin.log(`Tracking branch ${n} does not exist on remote ${a}.`),0)}async canPush(){if(this.plugin.settings.updateSubmodules===!0)return!0;let r=await this.git.status(),n=r.tracking,i=r.current;return n?(await this.git.diffSummary([i,n,"--"])).changed!==0:!1}async checkRequirements(){return await this.isGitInstalled()?await this.git.checkIsRepo()?"valid":"missing-repo":"missing-git"}async branchInfo(){let r=await this.git.status(),n=await this.git.branch(["--no-color"]);return{current:r.current||void 0,tracking:r.tracking||void 0,branches:n.all}}async getRemoteUrl(r){try{return await this.git.remote(["get-url",r])||void 0}catch(n){if(String(n).contains(r))return;throw n}}async log(r,n=!0,i,a){let s;r&&(s=this.getRelativeRepoPath(r,n));let o={file:s,maxCount:i,"--diff-merges":"first-parent","--name-status":null};return a&&(o[a]=null),(await this.git.log(o)).all.map(c=>{var u,f,d,h;return{...c,author:{name:c.author_name,email:c.author_email},refs:c.refs.split(", ").filter(p=>p.length>0),diff:{...c.diff,files:(f=(u=c.diff)==null?void 0:u.files.map(p=>({...p,status:p.status,path:p.file,hash:c.hash,vaultPath:this.getRelativeVaultPath(p.file),fromPath:p.from,fromVaultPath:p.from!=null?this.getRelativeVaultPath(p.from):void 0,binary:p.binary})))!=null?f:[]},fileName:(h=(d=c.diff)==null?void 0:d.files.first())==null?void 0:h.file}})}async show(r,n,i=!0){let a=this.getRelativeRepoPath(n,i);return this.git.show([r+":"+a])}async checkout(r,n){if(n&&(r=`${n}/${r}`),await this.git.checkout(r),this.plugin.settings.submoduleRecurseCheckout){let i=await this.getSubmodulePaths();for(let a of i){let s=await this.git.cwd({path:a,root:!1}).branch();Object.keys(s.branches).includes(r)&&await this.git.cwd({path:a,root:!1}).checkout(r)}}}async createBranch(r){await this.git.checkout(["-b",r])}async deleteBranch(r,n){await this.git.branch([n?"-D":"-d",r])}async branchIsMerged(r){return!(await this.git.branch(["--no-merged"])).all.contains(r)}async init(){await this.git.init(!1)}async clone(r,n,i){await this.git.clone(r,Ve.join(this.app.vault.adapter.getBasePath(),n),i?["--depth",`${i}`]:[])}async setConfig(r,n){n==null?await this.git.raw(["config","--local","--unset",r]):await this.git.addConfig(r,n)}async getConfig(r){let i=(await this.git.listConfig("local")).all[r];if(typeof i=="string"||i==null)return i;throw new Error("Config value is not a string")}async fetch(r){await this.git.fetch(r!=null?[r]:[])}async setRemote(r,n){(await this.getRemotes()).includes(r)?await this.git.remote(["set-url",r,n]):await this.git.remote(["add",r,n])}async getRemoteBranches(r){let n=await this.git.branch(["-r","--list",`${r}*`]),i=[];for(let a in n.branches)i.push(n.branches[a].name);return i}async getRemotes(){let r=await this.git.remote([]);return r?r.trim().split(` +`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(n){try{await this.git.branch(["--set-upstream",r])}catch(i){let[a,s]=ki(r),o=await this.branchInfo();await this.git.push(["--set-upstream",a,`${o.current}:${s}`])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,n=!1,i){return n?await this.git.diff(["--cached","--",r]):i?await this.git.show([`${i}`,"--",r]):await this.git.diff(["--",r])}async diff(r,n,i){return await this.git.diff([`${n}..${i}`,"--",r])}async rawCommand(r){let n=r.split(" ");return await this.git.raw(n[0],...n.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(Ve.dirname(r)))return;let n=await this.git.raw(["-C",Ve.dirname(r),"rev-parse","--show-toplevel"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message));if(n=n.trim(),(await this.git.raw(["-C",Ve.dirname(r),"rev-parse","--show-superproject-working-tree"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message))).trim()==="")return;let s=this.app.vault.adapter.getFullPath(Ve.normalize(r)),o=Ve.relative(n,s);return{submodule:n,relativeFilepath:o}}async getLastCommitTime(){let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}async isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),n=await Fc(r||"git",["--version"],{});if(n.error)if(Ti.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${hd}) of Git for Windows.`);let i=await Fc(hd,["--version"]);if(i.error)return console.error(i.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(n.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof Ir){let n=String(r.message);if(n.contains("Could not resolve host")||n.contains("Unable to resolve host")||n.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||n.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||n.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new Co(n)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(n){let i=n instanceof Error?n.message:String(n);return this.plugin.displayError(`Error checking LFS status: ${i}`),!1}}},m3={hash:"000000",isZeroCommit:!0,summary:""};function jH(t){let r=t.replace(`\r `,` `).split(` -`),n={commits:new Map,hashPerLine:[void 0],originalFileLineNrPerLine:[void 0],finalFileLineNrPerLine:[void 0],groupSizePerStartingLine:new Map},i=1;for(let a=0;a=4&&r.groupSizePerStartingLine.set(t,parseInt(e[3])),parseInt(e[2])!==t)throw Error(`git-blame output is out of order: ${t} vs ${e[2]}`);return n}function NB(e,t,r){let n=e[0],i=e.slice(1).join(" "),a=t.hashPerLine[r],s=t.commits.get(a)||{hash:a,author:{},committer:{},previous:{}};switch(n){case"summary":s.summary=i;break;case"author":s.author.name=i;break;case"author-mail":s.author.email=xT(i);break;case"author-time":s.author.epochSeconds=parseInt(i);break;case"author-tz":s.author.tz=i;break;case"committer":s.committer.name=i;break;case"committer-mail":s.committer.email=xT(i);break;case"committer-time":s.committer.epochSeconds=parseInt(i);break;case"committer-tz":s.committer.tz=i;break;case"previous":s.previous.commitHash=i;break;case"filename":s.previous.filename=i;break}t.commits.set(a,s)}function BB(e){if(e.summary===void 0)throw Error(`Summary not provided for commit: ${e.hash}`);qg(e.author)&&(e.author=void 0),qg(e.committer)&&(e.committer=void 0),qg(e.previous)&&(e.previous=void 0),e.isZeroCommit=!!e.hash.match(/^0*$/)}function qg(e){return!e||Object.keys(e).length===0}function _T(e){return e.length>0&&e[0].trim()===e[0]}function xT(e){let t=e.startsWith("<")?e.substring(1):e;return t.endsWith(">")?t.substring(0,t.length-1):t}g();var aC=require("@codemirror/state");g();var NT=require("@codemirror/state"),qf=require("obsidian");g();var Xg=class{constructor(){this.eventsPerFilepath=new Map;this.startRemoveStalesSubscribersInterval()}ifFilepathDefinedTransformSubscribers(t,r){if(t)return this.ensureInitialized(t),r(this.eventsPerFilepath.get(t))}forEachSubscriber(t){this.eventsPerFilepath.forEach(r=>r.forEach(t))}ensureInitialized(t){this.eventsPerFilepath.get(t)||this.eventsPerFilepath.set(t,new Set)}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(t=>t==null?void 0:t.removeIfStale()),6e4)}clear(){window.clearInterval(this.removeStalesSubscribersTimer),this.eventsPerFilepath.clear()}},Xs=new Xg;g();var zf=require("@codemirror/state"),IT=Ve(Zg());g();var U=require("obsidian");g();g();function an(){}an.prototype={diff:function(t,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.callback;typeof i=="function"&&(a=i,i={});var s=this;function o(E){return E=s.postProcess(E,i),a?(setTimeout(function(){a(E)},0),!0):E}t=this.castInput(t,i),r=this.castInput(r,i),t=this.removeEmpty(this.tokenize(t,i)),r=this.removeEmpty(this.tokenize(r,i));var l=r.length,c=t.length,u=1,f=l+c;i.maxEditLength!=null&&(f=Math.min(f,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],r,t,0,i);if(p[0].oldPos+1>=c&&m+1>=l)return o(AT(s,p[0].lastComponent,r,t,s.useLongestToken));var v=-1/0,y=1/0;function b(){for(var E=Math.max(v,-u);E<=Math.min(y,u);E+=2){var _=void 0,k=p[E-1],w=p[E+1];k&&(p[E-1]=void 0);var A=!1;if(w){var S=w.oldPos-E;A=w&&0<=S&&S=c&&m+1>=l)return o(AT(s,_.lastComponent,r,t,s.useLongestToken));p[E]=_,_.oldPos+1>=c&&(y=Math.min(y,E-1)),m+1>=l&&(v=Math.max(v,E+1))}u++}if(a)(function E(){setTimeout(function(){if(u>f||Date.now()>h)return a();b()||E()},0)})();else for(;u<=f&&Date.now()<=h;){var x=b();if(x)return x}},addToPath:function(t,r,n,i,a){var s=t.lastComponent;return s&&!a.oneChangePerToken&&s.added===r&&s.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,i,a){for(var s=r.length,o=n.length,l=t.oldPos,c=l-i,u=0;c+1h.length?m:h}),f.value=e.join(d)}else f.value=e.join(r.slice(c,c+f.count));c+=f.count,f.added||(u+=f.count)}}return a}var rq=new an;function kT(e,t){var r;for(r=0;rt.length&&(r=e.length-t.length);var n=t.length;e.length0&&t[s]!=t[a];)a=i[a];t[s]==t[a]&&a++}a=0;for(var o=r;o0&&e[o]!=t[a];)a=i[a];e[o]==t[a]&&a++}return a}var Lf="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",HB=new RegExp("[".concat(Lf,"]+|\\s+|[^").concat(Lf,"]"),"ug"),Nf=new an;Nf.equals=function(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()};Nf.tokenize=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(t.intlSegmenter){if(t.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(t.intlSegmenter.segment(e),function(a){return a.segment})}else r=e.match(HB)||[];var n=[],i=null;return r.forEach(function(a){/\s/.test(a)?i==null?n.push(a):n.push(n.pop()+a):/\s/.test(i)?n[n.length-1]==i?n.push(n.pop()+a):n.push(i+a):n.push(a),i=a}),n};Nf.join=function(e){return e.map(function(t,r){return r==0?t:t.replace(/^\s+/,"")}).join("")};Nf.postProcess=function(e,t){if(!e||t.oneChangePerToken)return e;var r=null,n=null,i=null;return e.forEach(function(a){a.added?n=a:a.removed?i=a:((n||i)&&PT(r,i,n,a),r=a,n=null,i=null)}),(n||i)&&PT(r,i,n,null),e};function PT(e,t,r,n){if(t&&r){var i=t.value.match(/^\s*/)[0],a=t.value.match(/\s*$/)[0],s=r.value.match(/^\s*/)[0],o=r.value.match(/\s*$/)[0];if(e){var l=kT(i,s);e.value=Qg(e.value,s,l),t.value=Xl(t.value,l),r.value=Xl(r.value,l)}if(n){var c=TT(a,o);n.value=Jg(n.value,o,c),t.value=$f(t.value,c),r.value=$f(r.value,c)}}else if(r)e&&(r.value=r.value.replace(/^\s*/,"")),n&&(n.value=n.value.replace(/^\s*/,""));else if(e&&n){var u=n.value.match(/^\s*/)[0],f=t.value.match(/^\s*/)[0],d=t.value.match(/\s*$/)[0],h=kT(u,f);t.value=Xl(t.value,h);var p=TT(Xl(u,h),d);t.value=$f(t.value,p),n.value=Jg(n.value,u,p),e.value=Qg(e.value,u,u.slice(0,u.length-p.length))}else if(n){var m=n.value.match(/^\s*/)[0],v=t.value.match(/\s*$/)[0],y=CT(v,m);t.value=$f(t.value,y)}else if(e){var b=e.value.match(/\s*$/)[0],x=t.value.match(/^\s*/)[0],E=CT(b,x);t.value=Xl(t.value,E)}}var UB=new an;UB.tokenize=function(e){var t=new RegExp("(\\r?\\n)|[".concat(Lf,"]+|[^\\S\\n\\r]+|[^").concat(Lf,"]"),"ug");return e.match(t)||[]};var Bf=new an;Bf.tokenize=function(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` -`));var r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?f(I.lines.slice(-s.context)):[],h-=m.length,p-=m.length)}(P=m).push.apply(P,Kg(T.map(function(J){return(S.added?"+":"-")+J}))),S.added?y+=T.length:v+=T.length}else{if(h)if(T.length<=s.context*2&&x=4&&r.groupSizePerStartingLine.set(e,parseInt(t[3])),parseInt(t[2])!==e)throw Error(`git-blame output is out of order: ${e} vs ${t[2]}`);return n}function BH(t,e,r){let n=t[0],i=t.slice(1).join(" "),a=e.hashPerLine[r],s=e.commits.get(a)||{hash:a,author:{},committer:{},previous:{}};switch(n){case"summary":s.summary=i;break;case"author":s.author.name=i;break;case"author-mail":s.author.email=h3(i);break;case"author-time":s.author.epochSeconds=parseInt(i);break;case"author-tz":s.author.tz=i;break;case"committer":s.committer.name=i;break;case"committer-mail":s.committer.email=h3(i);break;case"committer-time":s.committer.epochSeconds=parseInt(i);break;case"committer-tz":s.committer.tz=i;break;case"previous":s.previous.commitHash=i;break;case"filename":s.previous.filename=i;break}e.commits.set(a,s)}function HH(t){if(t.summary===void 0)throw Error(`Summary not provided for commit: ${t.hash}`);yv(t.author)&&(t.author=void 0),yv(t.committer)&&(t.committer=void 0),yv(t.previous)&&(t.previous=void 0),t.isZeroCommit=!!t.hash.match(/^0*$/)}function yv(t){return!t||Object.keys(t).length===0}function d3(t){return t.length>0&&t[0].trim()===t[0]}function h3(t){let e=t.startsWith("<")?t.substring(1):t;return e.endsWith(">")?e.substring(0,e.length-1):e}m();var Q3=require("@codemirror/state");m();var O3=require("@codemirror/state"),th=require("obsidian");m();var bv=class{constructor(){this.eventsPerFilepath=new Map;this.startRemoveStalesSubscribersInterval()}ifFilepathDefinedTransformSubscribers(e,r){if(e)return this.ensureInitialized(e),r(this.eventsPerFilepath.get(e))}forEachSubscriber(e){this.eventsPerFilepath.forEach(r=>r.forEach(e))}ensureInitialized(e){this.eventsPerFilepath.get(e)||this.eventsPerFilepath.set(e,new Set)}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(e=>e==null?void 0:e.removeIfStale()),6e4)}clear(){window.clearInterval(this.removeStalesSubscribersTimer),this.eventsPerFilepath.clear()}},Do=new bv;m();var Jd=require("@codemirror/state"),T3=Ot(_v());m();var z=require("obsidian");m();m();function yn(){}yn.prototype={diff:function(e,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.callback;typeof i=="function"&&(a=i,i={});var s=this;function o(S){return S=s.postProcess(S,i),a?(setTimeout(function(){a(S)},0),!0):S}e=this.castInput(e,i),r=this.castInput(r,i),e=this.removeEmpty(this.tokenize(e,i)),r=this.removeEmpty(this.tokenize(r,i));var l=r.length,c=e.length,u=1,f=l+c;i.maxEditLength!=null&&(f=Math.min(f,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,p=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(p[0],r,e,0,i);if(p[0].oldPos+1>=c&&g+1>=l)return o(g3(s,p[0].lastComponent,r,e,s.useLongestToken));var v=-1/0,y=1/0;function b(){for(var S=Math.max(v,-u);S<=Math.min(y,u);S+=2){var A=void 0,k=p[S-1],w=p[S+1];k&&(p[S-1]=void 0);var x=!1;if(w){var _=w.oldPos-S;x=w&&0<=_&&_=c&&g+1>=l)return o(g3(s,A.lastComponent,r,e,s.useLongestToken));p[S]=A,A.oldPos+1>=c&&(y=Math.min(y,S-1)),g+1>=l&&(v=Math.max(v,S+1))}u++}if(a)(function S(){setTimeout(function(){if(u>f||Date.now()>h)return a();b()||S()},0)})();else for(;u<=f&&Date.now()<=h;){var E=b();if(E)return E}},addToPath:function(e,r,n,i,a){var s=e.lastComponent;return s&&!a.oneChangePerToken&&s.added===r&&s.removed===n?{oldPos:e.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(e,r,n,i,a){for(var s=r.length,o=n.length,l=e.oldPos,c=l-i,u=0;c+1h.length?g:h}),f.value=t.join(d)}else f.value=t.join(r.slice(c,c+f.count));c+=f.count,f.added||(u+=f.count)}}return a}var UH=new yn;function E3(t,e,r){return UH.diff(t,e,r)}function v3(t,e){var r;for(r=0;re.length&&(r=t.length-e.length);var n=e.length;t.length0&&e[s]!=e[a];)a=i[a];e[s]==e[a]&&a++}a=0;for(var o=r;o0&&t[o]!=e[a];)a=i[a];t[o]==e[a]&&a++}return a}var zd="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",zH=new RegExp("[".concat(zd,"]+|\\s+|[^").concat(zd,"]"),"ug"),Wd=new yn;Wd.equals=function(t,e,r){return r.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t.trim()===e.trim()};Wd.tokenize=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(e.intlSegmenter){if(e.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(e.intlSegmenter.segment(t),function(a){return a.segment})}else r=t.match(zH)||[];var n=[],i=null;return r.forEach(function(a){/\s/.test(a)?i==null?n.push(a):n.push(n.pop()+a):/\s/.test(i)?n[n.length-1]==i?n.push(n.pop()+a):n.push(i+a):n.push(a),i=a}),n};Wd.join=function(t){return t.map(function(e,r){return r==0?e:e.replace(/^\s+/,"")}).join("")};Wd.postProcess=function(t,e){if(!t||e.oneChangePerToken)return t;var r=null,n=null,i=null;return t.forEach(function(a){a.added?n=a:a.removed?i=a:((n||i)&&b3(r,i,n,a),r=a,n=null,i=null)}),(n||i)&&b3(r,i,n,null),t};function b3(t,e,r,n){if(e&&r){var i=e.value.match(/^\s*/)[0],a=e.value.match(/\s*$/)[0],s=r.value.match(/^\s*/)[0],o=r.value.match(/\s*$/)[0];if(t){var l=v3(i,s);t.value=Ev(t.value,s,l),e.value=Lc(e.value,l),r.value=Lc(r.value,l)}if(n){var c=y3(a,o);n.value=Sv(n.value,o,c),e.value=Gd(e.value,c),r.value=Gd(r.value,c)}}else if(r)t&&(r.value=r.value.replace(/^\s*/,"")),n&&(n.value=n.value.replace(/^\s*/,""));else if(t&&n){var u=n.value.match(/^\s*/)[0],f=e.value.match(/^\s*/)[0],d=e.value.match(/\s*$/)[0],h=v3(u,f);e.value=Lc(e.value,h);var p=y3(Lc(u,h),d);e.value=Gd(e.value,p),n.value=Sv(n.value,u,p),t.value=Ev(t.value,u,u.slice(0,u.length-p.length))}else if(n){var g=n.value.match(/^\s*/)[0],v=e.value.match(/\s*$/)[0],y=w3(v,g);e.value=Gd(e.value,y)}else if(t){var b=t.value.match(/\s*$/)[0],E=e.value.match(/^\s*/)[0],S=w3(b,E);e.value=Lc(e.value,S)}}var A3=new yn;A3.tokenize=function(t){var e=new RegExp("(\\r?\\n)|[".concat(zd,"]+|[^\\S\\n\\r]+|[^").concat(zd,"]"),"ug");return t.match(e)||[]};function k3(t,e,r){return A3.diff(t,e,r)}var qd=new yn;qd.tokenize=function(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,` +`));var r=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;it.length)&&(e=t.length);for(var r=0,n=new Array(e);r0?f(I.lines.slice(-s.context)):[],h-=g.length,p-=g.length)}(C=g).push.apply(C,xv(T.map(function(le){return(_.added?"+":"-")+le}))),_.added?y+=T.length:v+=T.length}else{if(h)if(T.length<=s.context*2&&E(0,$i.normalizePath)(a.substring(t.length))):i=n,i}async mkdir(t){return this.adapter.mkdir(t)}async rmdir(t,r){var n,i;return this.adapter.rmdir(t,(i=(n=r==null?void 0:r.options)==null?void 0:n.recursive)!=null?i:!1)}async stat(t){if(t.endsWith(this.gitDir+"/index")){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.length,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let n=await this.adapter.stat(t);if(n==null)throw{code:"ENOENT"};return this.indexctime=n.ctime,this.indexmtime=n.mtime,{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}t==="."&&(t="/");let r=this.vault.getAbstractFileByPath(t);if(this.maybeLog("Stat: "+t),r instanceof $i.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let n=await this.adapter.stat(t);if(n)return{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:n.type==="folder"?"directory":n.type,isFile:()=>n.type==="file",isDirectory:()=>n.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(t){return this.adapter.remove(t)}async lstat(t){return this.stat(t)}async readlink(t){throw new Error(`readlink of (${t}) is not implemented.`)}async symlink(t){throw new Error(`symlink of (${t}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index"),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}maybeLog(t){}};var sn=class extends Ys{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"MM",120:"DA",121:" M",122:"M ",123:"MM"};this.noticeLength=999999;this.fs=new Hf(this.app.vault,this.plugin)}getRepo(){return{fs:this.fs,dir:this.plugin.settings.basePath,gitdir:this.plugin.settings.gitDir||void 0,onAuth:()=>{var r,n;return{username:(r=this.plugin.localStorage.getUsername())!=null?r:void 0,password:(n=this.plugin.localStorage.getPassword())!=null?n:void 0}},onAuthFailure:async()=>{new Sa.Notice("Authentication failed. Please try with different credentials");let r=await new $e(this.plugin,{placeholder:"Specify your username"}).openAndGetResult();if(r){let n=await new $e(this.plugin,{placeholder:"Specify your password/personal access token"}).openAndGetResult();if(n)return this.plugin.localStorage.setUsername(r),this.plugin.localStorage.setPassword(n),{username:r,password:n}}return{cancel:!0}},http:{async request({url:r,method:n,headers:i,body:a}){let s;a&&(s=(await nj(a)).buffer);let o=await(0,Sa.requestUrl)({url:r,method:n,headers:i,body:s,throw:!1});return{url:r,method:n,headers:o.headers,body:[new Uint8Array(o.arrayBuffer)],statusCode:o.status,statusMessage:o.status.toString()}}}}}async wrapFS(r){try{let n=await r;return await this.fs.saveAndClear(),n}catch(n){throw await this.fs.saveAndClear(),n}}async status(){let r,n=window.setTimeout(()=>{r=new Sa.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{this.plugin.setPluginState({gitAction:1});let i=(await this.wrapFS(ie.statusMatrix({...this.getRepo()}))).map(l=>this.getFileStatusResult(l)),a=i.filter(l=>l.workingDir!==" "),s=i.filter(l=>l.index!==" "&&l.index!=="U"),o=[];return window.clearTimeout(n),r==null||r.hide(),{all:i,changed:a,staged:s,conflicted:o}}catch(i){throw window.clearTimeout(n),r==null||r.hide(),this.plugin.displayError(i),i}}async commitAll({message:r,status:n,unstagedFiles:i}){try{return await this.checkAuthorInfo(),await this.stageAll({status:n,unstagedFiles:i}),this.commit({message:r})}catch(a){throw this.plugin.displayError(a),a}}async commit({message:r}){try{await this.checkAuthorInfo(),this.plugin.setPluginState({gitAction:4});let n=await this.formatCommitMessage(r),i=this.plugin.localStorage.getConflict(),a;if(i){let s=await this.branchInfo();a=[s.current,s.tracking]}await this.wrapFS(ie.commit({...this.getRepo(),message:n,parent:a})),this.plugin.localStorage.setConflict(!1);return}catch(n){throw this.plugin.displayError(n),n}}async stage(r,n){let i=this.getRelativeRepoPath(r,n),a;n?a=r:a=this.getRelativeVaultPath(r);try{this.plugin.setPluginState({gitAction:3}),await this.app.vault.adapter.exists(a)?await this.wrapFS(ie.add({...this.getRepo(),filepath:i})):await this.wrapFS(ie.remove({...this.getRepo(),filepath:i}))}catch(s){throw this.plugin.displayError(s),s}}async stageAll({dir:r,status:n,unstagedFiles:i}){try{if(n)await Promise.all(n.changed.map(a=>a.workingDir!=="D"?this.wrapFS(ie.add({...this.getRepo(),filepath:a.path})):ie.remove({...this.getRepo(),filepath:a.path})));else{let a=i!=null?i:await this.getUnstagedFiles(r!=null?r:".");await Promise.all(a.map(({path:s,deleted:o})=>o?ie.remove({...this.getRepo(),filepath:s}):this.wrapFS(ie.add({...this.getRepo(),filepath:s}))))}}catch(a){throw this.plugin.displayError(a),a}}async unstage(r,n){try{this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.wrapFS(ie.resetIndex({...this.getRepo(),filepath:r}))}catch(i){throw this.plugin.displayError(i),i}}async unstageAll({dir:r,status:n}){try{let i;n?i=n.staged.map(a=>a.path):i=(await this.getStagedFiles(r!=null?r:".")).map(({path:s})=>s),await this.wrapFS(Promise.all(i.map(a=>ie.resetIndex({...this.getRepo(),filepath:a}))))}catch(i){throw this.plugin.displayError(i),i}}async discard(r){try{this.plugin.setPluginState({gitAction:3}),await this.wrapFS(ie.checkout({...this.getRepo(),filepaths:[r],force:!0}))}catch(n){throw this.plugin.displayError(n),n}}async discardAll({dir:r,status:n}){let i=[];n?r!=null?i=n.changed.filter(a=>a.path.startsWith(r)).map(a=>a.path):i=n.changed.map(a=>a.path):i=(await this.getUnstagedFiles(r)).map(({path:a})=>a);try{await this.wrapFS(ie.checkout({...this.getRepo(),filepaths:i,force:!0}))}catch(a){throw this.plugin.displayError(a),a}}getProgressText(r,n){let i=`${r} progress:`;return n.phase&&(i=`${i} ${n.phase}:`),n.loaded&&(i=`${i} ${n.loaded}`,n.total&&(i=`${i} of ${n.total}`)),i}resolveRef(r){return this.wrapFS(ie.resolveRef({...this.getRepo(),ref:r}))}async pull(){let r=this.showNotice("Initializing pull");try{this.plugin.setPluginState({gitAction:2});let n=await this.resolveRef("HEAD");await this.fetch();let i=await this.branchInfo();await this.checkAuthorInfo(),(await this.wrapFS(ie.merge({...this.getRepo(),ours:i.current,theirs:i.tracking,abortOnConflict:!1}))).alreadyMerged||await this.wrapFS(ie.checkout({...this.getRepo(),ref:i.current,onProgress:l=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Checkout",l))},remote:i.remote})),r==null||r.hide();let s=await this.resolveRef("HEAD"),o=await this.getFileChangesCount(n,s);return this.showNotice("Finished pull",!1),o.map(l=>({path:l.path,workingDir:"P",index:"P",vaultPath:this.getRelativeVaultPath(l.path)}))}catch(n){throw r==null||r.hide(),n instanceof yl.MergeConflictError&&await this.plugin.handleConflict(n.data.filepaths.map(i=>this.getRelativeVaultPath(i))),this.plugin.displayError(n),n}}async push(){if(!await this.canPush())return 0;let r=this.showNotice("Initializing push");try{this.plugin.setPluginState({gitAction:1});let n=await this.branchInfo(),i=n.tracking,a=n.current,s=(await this.getFileChangesCount(a,i)).length;return this.plugin.setPluginState({gitAction:5}),await this.wrapFS(ie.push({...this.getRepo(),onProgress:o=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Pushing",o))}})),r==null||r.hide(),s}catch(n){throw r==null||r.hide(),this.plugin.displayError(n),n}}async getUnpushedCommits(){let r=await this.branchInfo(),n=r.tracking,i=r.current;if(n==null||i==null)return 0;let a=await this.resolveRef(i),s=await this.resolveRef(n);return(await this.getFileChangesCount(a,s)).length}async canPush(){let r=await this.branchInfo(),n=r.tracking,i=r.current,a=await this.resolveRef(i),s=await this.resolveRef(n);return a!=s}async checkRequirements(){return await this.plugin.app.vault.adapter.exists(`${this.getRepo().dir}/.git/HEAD`)?"valid":"missing-repo"}async branchInfo(){var r,n;try{let i=await ie.currentBranch(this.getRepo())||"",a=await ie.listBranches(this.getRepo()),s=(r=await this.getConfig(`branch.${i}.remote`))!=null?r:"origin",o=(n=await this.getConfig(`branch.${i}.merge`))==null?void 0:n.split("refs/heads")[1],l=o?s+o:void 0;return{current:i,tracking:l,branches:a,remote:s}}catch(i){throw this.plugin.displayError(i),i}}async getCurrentRemote(){var i;let r=await ie.currentBranch(this.getRepo())||"";return(i=await this.getConfig(`branch.${r}.remote`))!=null?i:"origin"}async checkout(r,n){try{return this.wrapFS(ie.checkout({...this.getRepo(),ref:r,force:!!n,remote:n}))}catch(i){throw this.plugin.displayError(i),i}}async createBranch(r){try{await this.wrapFS(ie.branch({...this.getRepo(),ref:r,checkout:!0}))}catch(n){throw this.plugin.displayError(n),n}}async deleteBranch(r){try{await this.wrapFS(ie.deleteBranch({...this.getRepo(),ref:r}))}catch(n){throw this.plugin.displayError(n),n}}branchIsMerged(r){return Promise.resolve(!0)}async init(){try{await this.wrapFS(ie.init(this.getRepo()))}catch(r){throw this.plugin.displayError(r),r}}async clone(r,n,i){let a=this.showNotice("Initializing clone");try{await this.wrapFS(ie.clone({...this.getRepo(),dir:n,url:r,depth:i,onProgress:s=>{a!==void 0&&(a.noticeEl.innerText=this.getProgressText("Cloning",s))}})),a==null||a.hide()}catch(s){throw a==null||a.hide(),this.plugin.displayError(s),s}}async setConfig(r,n){try{return this.wrapFS(ie.setConfig({...this.getRepo(),path:r,value:n}))}catch(i){throw this.plugin.displayError(i),i}}async getConfig(r){try{return this.wrapFS(ie.getConfig({...this.getRepo(),path:r}))}catch(n){throw this.plugin.displayError(n),n}}async fetch(r){let n=this.showNotice("Initializing fetch");try{let i={...this.getRepo(),onProgress:a=>{n!==void 0&&(n.noticeEl.innerText=this.getProgressText("Fetching",a))},remote:r!=null?r:await this.getCurrentRemote()};await this.wrapFS(ie.fetch(i)),n==null||n.hide()}catch(i){throw this.plugin.displayError(i),n==null||n.hide(),i}}async setRemote(r,n){try{await this.wrapFS(ie.addRemote({...this.getRepo(),remote:r,url:n,force:!0}))}catch(i){throw this.plugin.displayError(i),i}}async getRemoteBranches(r){let n=[];return n.push(...await this.wrapFS(ie.listBranches({...this.getRepo(),remote:r}))),n.remove("HEAD"),n=n.map(i=>`${r}/${i}`),n}async getRemotes(){return(await this.wrapFS(ie.listRemotes({...this.getRepo()}))).map(r=>r.remote)}async removeRemote(r){await this.wrapFS(ie.deleteRemote({...this.getRepo(),remote:r}))}async getRemoteUrl(r){var n;return(n=(await this.wrapFS(ie.listRemotes({...this.getRepo()}))).filter(i=>i.remote==r)[0])==null?void 0:n.url}async log(r,n=!0,i,a){let s=await this.wrapFS(ie.log({...this.getRepo(),depth:i,ref:a}));return Promise.all(s.map(async o=>{let l=o.commit.message.split(` +`});return e?r.pop():r.push(r.pop().slice(0,-1)),r}var re=Ot(gg()),rs=require("obsidian");m();var ma=require("obsidian"),Xd=class{constructor(e,r){this.plugin=r;this.promises={};this.adapter=e.adapter,this.vault=e,this.lastBasePath=this.plugin.settings.basePath,this.promises.readFile=this.readFile.bind(this),this.promises.writeFile=this.writeFile.bind(this),this.promises.readdir=this.readdir.bind(this),this.promises.mkdir=this.mkdir.bind(this),this.promises.rmdir=this.rmdir.bind(this),this.promises.stat=this.stat.bind(this),this.promises.unlink=this.unlink.bind(this),this.promises.lstat=this.lstat.bind(this),this.promises.readlink=this.readlink.bind(this),this.promises.symlink=this.symlink.bind(this)}async readFile(e,r){var n;if(this.maybeLog("Read: "+e+JSON.stringify(r)),r=="utf8"||r.encoding=="utf8"){let i=this.vault.getAbstractFileByPath(e);return i instanceof ma.TFile?(this.maybeLog("Reuse"),this.vault.read(i)):this.adapter.read(e)}else{if(e.endsWith(this.gitDir+"/index"))return this.plugin.settings.basePath!=this.lastBasePath?(this.clearIndex(),this.lastBasePath=this.plugin.settings.basePath,this.adapter.readBinary(e)):(n=this.index)!=null?n:this.adapter.readBinary(e);let i=this.vault.getAbstractFileByPath(e);return i instanceof ma.TFile?(this.maybeLog("Reuse"),this.vault.readBinary(i)):this.adapter.readBinary(e)}}async writeFile(e,r){if(this.maybeLog("Write: "+e),typeof r=="string"){let n=this.vault.getAbstractFileByPath(e);return n instanceof ma.TFile?this.vault.modify(n,r):this.adapter.write(e,r)}else if(e.endsWith(this.gitDir+"/index"))this.index=r,this.indexmtime=Date.now();else{let n=this.vault.getAbstractFileByPath(e);return n instanceof ma.TFile?this.vault.modifyBinary(n,r):this.adapter.writeBinary(e,r)}}async readdir(e){e==="."&&(e="/");let r=await this.adapter.list(e),n=[...r.files,...r.folders],i;return e!=="/"?i=n.map(a=>(0,ma.normalizePath)(a.substring(e.length))):i=n,i}async mkdir(e){return this.adapter.mkdir(e)}async rmdir(e,r){var n,i;return this.adapter.rmdir(e,(i=(n=r==null?void 0:r.options)==null?void 0:n.recursive)!=null?i:!1)}async stat(e){if(e.endsWith(this.gitDir+"/index")){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.byteLength,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let n=await this.adapter.stat(e);if(n==null)throw{code:"ENOENT"};return this.indexctime=n.ctime,this.indexmtime=n.mtime,{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}e==="."&&(e="/");let r=this.vault.getAbstractFileByPath(e);if(this.maybeLog("Stat: "+e),r instanceof ma.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let n=await this.adapter.stat(e);if(n)return{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:n.type==="folder"?"directory":n.type,isFile:()=>n.type==="file",isDirectory:()=>n.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(e){return this.adapter.remove(e)}async lstat(e){return this.stat(e)}async readlink(e){throw new Error(`readlink of (${e}) is not implemented.`)}async symlink(e){throw new Error(`symlink of (${e}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index"),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}maybeLog(e){}};var wn=class extends Fo{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"MM",120:"DA",121:" M",122:"M ",123:"MM"};this.noticeLength=999999;this.fs=new Xd(this.app.vault,this.plugin)}getRepo(){return{fs:this.fs,dir:this.plugin.settings.basePath,gitdir:this.plugin.settings.gitDir||void 0,onAuth:()=>{var r,n;return{username:(r=this.plugin.localStorage.getUsername())!=null?r:void 0,password:(n=this.plugin.localStorage.getPassword())!=null?n:void 0}},onAuthFailure:async()=>{new rs.Notice("Authentication failed. Please try with different credentials");let r=await new ze(this.plugin,{placeholder:"Specify your username"}).openAndGetResult();if(r){let n=await new ze(this.plugin,{placeholder:"Specify your password/personal access token"}).openAndGetResult();if(n)return this.plugin.localStorage.setUsername(r),this.plugin.localStorage.setPassword(n),{username:r,password:n}}return{cancel:!0}},http:{async request({url:r,method:n,headers:i,body:a}){let s;a&&(s=await iU(a));let o=await(0,rs.requestUrl)({url:r,method:n,headers:i,body:s,throw:!1});return{url:r,method:n,headers:o.headers,body:nU(o.arrayBuffer),statusCode:o.status,statusMessage:o.status.toString()}}}}}async wrapFS(r){try{let n=await r;return await this.fs.saveAndClear(),n}catch(n){throw await this.fs.saveAndClear(),n}}async status(r){let n,i=window.setTimeout(()=>{n=new rs.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{this.plugin.setPluginState({gitAction:1});let a={...this.getRepo()};(r==null?void 0:r.path)!=null&&(a.filepaths=[`${r.path}/`]);let s=(await this.wrapFS(re.default.statusMatrix(a))).map(f=>this.getFileStatusResult(f)),o=[],l=[],c=[];for(let f of s)f.workingDir!==" "&&o.push(f),f.index!==" "&&f.index!=="U"&&l.push(f),(f.index!=" "||f.workingDir!=" ")&&c.push(f);let u=[];return window.clearTimeout(i),n==null||n.hide(),{all:c,changed:o,staged:l,conflicted:u}}catch(a){throw window.clearTimeout(i),n==null||n.hide(),this.plugin.displayError(a),a}}async commitAll({message:r,status:n,unstagedFiles:i}){try{return await this.checkAuthorInfo(),await this.stageAll({status:n,unstagedFiles:i}),this.commit({message:r})}catch(a){throw this.plugin.displayError(a),a}}async commit({message:r}){try{await this.checkAuthorInfo(),this.plugin.setPluginState({gitAction:4});let n=await this.formatCommitMessage(r),i=this.plugin.localStorage.getConflict(),a;if(i){let s=await this.branchInfo();a=[s.current,s.tracking]}await this.wrapFS(re.default.commit({...this.getRepo(),message:n,parent:a})),this.plugin.localStorage.setConflict(!1);return}catch(n){throw this.plugin.displayError(n),n}}async stage(r,n){let i=this.getRelativeRepoPath(r,n),a;n?a=r:a=this.getRelativeVaultPath(r);try{this.plugin.setPluginState({gitAction:3}),await this.app.vault.adapter.exists(a)?await this.wrapFS(re.default.add({...this.getRepo(),filepath:i})):await this.wrapFS(re.default.remove({...this.getRepo(),filepath:i}))}catch(s){throw this.plugin.displayError(s),s}}async stageAll({dir:r,status:n,unstagedFiles:i}){try{if(n)await Promise.all(n.changed.map(a=>a.workingDir!=="D"?this.wrapFS(re.default.add({...this.getRepo(),filepath:a.path})):re.default.remove({...this.getRepo(),filepath:a.path})));else{let a=i!=null?i:await this.getUnstagedFiles(r!=null?r:".");await Promise.all(a.map(({path:s,type:o})=>o=="D"?re.default.remove({...this.getRepo(),filepath:s}):this.wrapFS(re.default.add({...this.getRepo(),filepath:s}))))}}catch(a){throw this.plugin.displayError(a),a}}async unstage(r,n){try{this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.wrapFS(re.default.resetIndex({...this.getRepo(),filepath:r}))}catch(i){throw this.plugin.displayError(i),i}}async unstageAll({dir:r,status:n}){try{let i;n?i=n.staged.map(a=>a.path):i=(await this.getStagedFiles(r!=null?r:".")).map(({path:s})=>s),await this.wrapFS(Promise.all(i.map(a=>re.default.resetIndex({...this.getRepo(),filepath:a}))))}catch(i){throw this.plugin.displayError(i),i}}async discard(r){try{this.plugin.setPluginState({gitAction:3}),await this.wrapFS(re.default.checkout({...this.getRepo(),filepaths:[r],force:!0}))}catch(n){throw this.plugin.displayError(n),n}}async discardAll({dir:r,status:n}){let i=[];n?r!=null?i=n.changed.filter(a=>a.workingDir!="U"&&a.path.startsWith(r)).map(a=>a.path):i=n.changed.filter(a=>a.workingDir!="U").map(a=>a.path):i=(await this.getUnstagedFiles(r)).filter(a=>a.type!="A").map(({path:a})=>a);try{await this.wrapFS(re.default.checkout({...this.getRepo(),filepaths:i,force:!0}))}catch(a){throw this.plugin.displayError(a),a}}async getUntrackedPaths(r){let n=[];if(r.status)for(let i of r.status.changed)i.index=="U"&&i.workingDir==="U"&&i.path.startsWith(r.path!=null?`${r.path}/`:"")&&n.push(i.path);else{let i=await this.status({path:r==null?void 0:r.path});for(let a of i.changed)a.index==="U"&&a.workingDir==="U"&&n.push(a.path)}return n}getProgressText(r,n){let i=`${r} progress:`;return n.phase&&(i=`${i} ${n.phase}:`),n.loaded&&(i=`${i} ${n.loaded}`,n.total&&(i=`${i} of ${n.total}`)),i}resolveRef(r){return this.wrapFS(re.default.resolveRef({...this.getRepo(),ref:r}))}async pull(){let r=this.showNotice("Initializing pull");try{this.plugin.setPluginState({gitAction:2});let n=await this.resolveRef("HEAD");await this.fetch();let i=await this.branchInfo();await this.checkAuthorInfo(),(await this.wrapFS(re.default.merge({...this.getRepo(),ours:i.current,theirs:i.tracking,abortOnConflict:!1}))).alreadyMerged||await this.wrapFS(re.default.checkout({...this.getRepo(),ref:i.current,onProgress:l=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Checkout",l))},remote:i.remote})),r==null||r.hide();let s=await this.resolveRef("HEAD"),o=await this.getFileChangesCount(n,s);return this.showNotice("Finished pull",!1),o.map(l=>({path:l.path,workingDir:"P",index:"P",vaultPath:this.getRelativeVaultPath(l.path)}))}catch(n){throw r==null||r.hide(),n instanceof re.Errors.MergeConflictError&&await this.plugin.handleConflict(n.data.filepaths.map(i=>this.getRelativeVaultPath(i))),this.plugin.displayError(n),n}}async push(){if(!await this.canPush())return 0;let r=this.showNotice("Initializing push");try{this.plugin.setPluginState({gitAction:1});let n=await this.branchInfo(),i=n.tracking,a=n.current,s=(await this.getFileChangesCount(a,i)).length;this.plugin.setPluginState({gitAction:5});let o=await this.getCurrentRemote();return await this.wrapFS(re.default.push({...this.getRepo(),remote:o,onProgress:l=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Pushing",l))}})),r==null||r.hide(),s}catch(n){throw r==null||r.hide(),this.plugin.displayError(n),n}}async getUnpushedCommits(){let r=await this.branchInfo(),n=r.tracking,i=r.current;if(n==null||i==null)return 0;let a=await this.resolveRef(i),s=await this.resolveRef(n);return(await this.getFileChangesCount(a,s)).length}async canPush(){let r=await this.branchInfo(),n=r.tracking,i=r.current,a=await this.resolveRef(i),s=await this.resolveRef(n);return a!=s}async checkRequirements(){return await this.plugin.app.vault.adapter.exists(`${this.getRepo().dir}/.git/HEAD`)?"valid":"missing-repo"}async branchInfo(){var r,n;try{let i=await re.default.currentBranch(this.getRepo())||"",a=await re.default.listBranches(this.getRepo()),s=(r=await this.getConfig(`branch.${i}.remote`))!=null?r:"origin",o=(n=await this.getConfig(`branch.${i}.merge`))==null?void 0:n.split("refs/heads")[1],l=o?s+o:void 0;return{current:i,tracking:l,branches:a,remote:s}}catch(i){throw this.plugin.displayError(i),i}}async getCurrentRemote(){var i;let r=await re.default.currentBranch(this.getRepo())||"";return(i=await this.getConfig(`branch.${r}.remote`))!=null?i:"origin"}async checkout(r,n){try{return this.wrapFS(re.default.checkout({...this.getRepo(),ref:r,force:!!n,remote:n}))}catch(i){throw this.plugin.displayError(i),i}}async createBranch(r){try{await this.wrapFS(re.default.branch({...this.getRepo(),ref:r,checkout:!0}))}catch(n){throw this.plugin.displayError(n),n}}async deleteBranch(r){try{await this.wrapFS(re.default.deleteBranch({...this.getRepo(),ref:r}))}catch(n){throw this.plugin.displayError(n),n}}branchIsMerged(r){return Promise.resolve(!0)}async init(){try{await this.wrapFS(re.default.init(this.getRepo()))}catch(r){throw this.plugin.displayError(r),r}}async clone(r,n,i){let a=this.showNotice("Initializing clone");try{await this.wrapFS(re.default.clone({...this.getRepo(),dir:n,url:r,depth:i,onProgress:s=>{a!==void 0&&(a.noticeEl.innerText=this.getProgressText("Cloning",s))}})),a==null||a.hide()}catch(s){throw a==null||a.hide(),this.plugin.displayError(s),s}}async setConfig(r,n){try{return this.wrapFS(re.default.setConfig({...this.getRepo(),path:r,value:n}))}catch(i){throw this.plugin.displayError(i),i}}async getConfig(r){try{return this.wrapFS(re.default.getConfig({...this.getRepo(),path:r}))}catch(n){throw this.plugin.displayError(n),n}}async fetch(r){let n=this.showNotice("Initializing fetch");try{let i={...this.getRepo(),onProgress:a=>{n!==void 0&&(n.noticeEl.innerText=this.getProgressText("Fetching",a))},remote:r!=null?r:await this.getCurrentRemote()};await this.wrapFS(re.default.fetch(i)),n==null||n.hide()}catch(i){throw this.plugin.displayError(i),n==null||n.hide(),i}}async setRemote(r,n){try{await this.wrapFS(re.default.addRemote({...this.getRepo(),remote:r,url:n,force:!0}))}catch(i){throw this.plugin.displayError(i),i}}async getRemoteBranches(r){let n=[];return n.push(...await this.wrapFS(re.default.listBranches({...this.getRepo(),remote:r}))),n.remove("HEAD"),n=n.map(i=>`${r}/${i}`),n}async getRemotes(){return(await this.wrapFS(re.default.listRemotes({...this.getRepo()}))).map(r=>r.remote)}async removeRemote(r){await this.wrapFS(re.default.deleteRemote({...this.getRepo(),remote:r}))}async getRemoteUrl(r){var n;return(n=(await this.wrapFS(re.default.listRemotes({...this.getRepo()}))).filter(i=>i.remote==r)[0])==null?void 0:n.url}async log(r,n=!0,i,a){let s=await this.wrapFS(re.default.log({...this.getRepo(),depth:i,ref:a}));return Promise.all(s.map(async o=>{let l=o.commit.message.split(` `);return{message:l[0],author:{name:o.commit.author.name,email:o.commit.author.email},body:l.slice(1).join(` -`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(c=>({path:c.path,status:c.type,vaultPath:this.getRelativeVaultPath(c.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}async updateUpstreamBranch(r){let[n,i]=Fi(r),a=await this.branchInfo();await this.wrapFS(ie.push({...this.getRepo(),remote:n,remoteRef:i})),await this.setConfig(`branch.${a.current}.merge`,`refs/heads/${i}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,n){return this.walkDifference({walkers:[ie.TREE({ref:r}),ie.TREE({ref:n})]})}async walkDifference({walkers:r,dir:n}){return await this.wrapFS(ie.walk({...this.getRepo(),trees:r,map:async function(a,[s,o]){if(!Gg(a,n))return null;if(await(s==null?void 0:s.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let l=await(s==null?void 0:s.oid()),c=await(o==null?void 0:o.oid()),u="equal";if(l!==c&&(u="M"),l===void 0&&(u="A"),c===void 0&&(u="D"),l===void 0&&c===void 0&&(console.log("Something weird happened:"),console.log(s),console.log(o)),u!=="equal")return{path:a,type:u}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[ie.TREE({ref:"HEAD"}),ie.STAGE()],dir:r})).map(i=>({vaultPath:this.getRelativeVaultPath(i.path),path:i.path}))}async getUnstagedFiles(r="."){let n,i=window.setTimeout(()=>{n=new Sa.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let a=this.getRepo(),s=await this.wrapFS(ie.walk({...a,trees:[ie.WORKDIR(),ie.STAGE()],map:async function(o,[l,c]){if(!c&&l&&await ie.isIgnored({...a,filepath:o})||!Gg(o,r))return null;let[u,f]=await Promise.all([l&&l.type(),c&&c.type()]),d=[u,f].includes("blob");if((u==="tree"||u==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await c.oid():void 0,p;return u==="blob"&&f!=="blob"?p="42":u==="blob"&&(p=await l.oid()),p?p!==h?{path:o,deleted:!1}:null:{path:o,deleted:!0}}}));return window.clearTimeout(i),n==null||n.hide(),s}catch(a){throw window.clearTimeout(i),n==null||n.hide(),this.plugin.displayError(a),a}}async getDiffString(r,n=!1,i){let a=this.getRelativeVaultPath(r),s=async(c,[u])=>{if(r==c){let f=await u.oid();return(await ie.readBlob({...this.getRepo(),oid:f})).blob}};if(i){let c=await _l({...this.getRepo(),filepath:r,oid:i}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h}),u=await ie.readCommit({...this.getRepo(),oid:i}),f=await _l({...this.getRepo(),filepath:r,oid:u.commit.parent.first()}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h});return jf(a,f!=null?f:"",c!=null?c:"")}let o=(await ie.walk({...this.getRepo(),trees:[ie.STAGE()],map:s})).first(),l=new TextDecoder().decode(o);if(n){let c=await this.resolveRef("HEAD").then(f=>_l({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof ie.Errors.NotFoundError))throw f});return jf(a,c!=null?c:"",l)}else{let c;return await this.app.vault.adapter.exists(a)?c=await this.app.vault.adapter.read(a):c="",jf(a,l,c)}}async getLastCommitTime(){let r=this.getRepo(),n=await this.resolveRef("HEAD"),a=(await ie.readCommit({...r,oid:n})).commit.committer.timestamp;return new Date(a*1e3)}getFileStatusResult(r){let n=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:n[0]=="?"?"U":n[0],workingDir:n[1]=="?"?"U":n[1],path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),n=await this.getConfig("user.email");if(!r||!n)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,n=!0){if(!this.plugin.settings.disablePopups)return new Sa.Notice(r,n?this.noticeLength:void 0)}};function ej(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function tj(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:ej(e)}async function rj(e,t){let r=tj(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function nj(e){let t=0,r=[];await rj(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}var ij="https://momentjs.com/docs/#/parsing/string-format/",aj="https://publish.obsidian.md/git-doc/Line+Authoring",Uf=class extends U.PluginSettingTab{constructor(r,n){super(r,n);this.plugin=n;this.lineAuthorColorSettings=new Map}get settings(){return this.plugin.settings}display(){let{containerEl:r}=this,n=this.plugin,i;n.settings.differentIntervalCommitAndPush?i="commit":i="commit-and-sync";let a=n.gitReady;r.empty(),a||(r.createEl("p",{text:"Git is not ready. When all settings are correct you can configure commit-sync, etc."}),r.createEl("br"));let s;if(a){new U.Setting(r).setName("Automatic").setHeading(),new U.Setting(r).setName("Split timers for automatic commit and sync").setDesc("Enable to use one interval for commit and another for sync.").addToggle(u=>u.setValue(n.settings.differentIntervalCommitAndPush).onChange(async f=>{n.settings.differentIntervalCommitAndPush=f,await n.saveSettings(),n.automaticsManager.reload("commit","push"),this.refreshDisplayWithDelay()})),new U.Setting(r).setName(`Auto ${i} interval (minutes)`).setDesc(`${n.settings.differentIntervalCommitAndPush?"Commit":"Commit and sync"} changes every X minutes. Set to 0 (default) to disable. (See below setting for further configuration!)`).addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoSaveInterval"}),u.setPlaceholder(String(je.autoSaveInterval)),u.onChange(async f=>{f!==""?n.settings.autoSaveInterval=Number(f):n.settings.autoSaveInterval=je.autoSaveInterval,await n.saveSettings(),n.automaticsManager.reload("commit")})}),s=new U.Setting(r).setName(`Auto ${i} after stopping file edits`).setDesc(`Requires the ${i} interval not to be 0. - If turned on, do auto ${i} every ${yT(n.settings.autoSaveInterval)} after stopping file edits. - This also prevents auto ${i} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(u=>u.setValue(n.settings.autoBackupAfterFileChange).onChange(async f=>{n.settings.autoBackupAfterFileChange=f,this.refreshDisplayWithDelay(),await n.saveSettings(),n.automaticsManager.reload("commit")})),this.mayDisableSetting(s,n.settings.setLastSaveToLastCommit),s=new U.Setting(r).setName(`Auto ${i} after latest commit`).setDesc(`If turned on, sets last auto ${i} timestamp to the latest commit timestamp. This reduces the frequency of auto ${i} when doing manual commits.`).addToggle(u=>u.setValue(n.settings.setLastSaveToLastCommit).onChange(async f=>{n.settings.setLastSaveToLastCommit=f,await n.saveSettings(),n.automaticsManager.reload("commit"),this.refreshDisplayWithDelay()})),this.mayDisableSetting(s,n.settings.autoBackupAfterFileChange),s=new U.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoPushInterval"}),u.setPlaceholder(String(je.autoPushInterval)),u.onChange(async f=>{f!==""?n.settings.autoPushInterval=Number(f):n.settings.autoPushInterval=je.autoPushInterval,await n.saveSettings(),n.automaticsManager.reload("push")})}),this.mayDisableSetting(s,!n.settings.differentIntervalCommitAndPush),new U.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoPullInterval"}),u.setPlaceholder(String(je.autoPullInterval)),u.onChange(async f=>{f!==""?n.settings.autoPullInterval=Number(f):n.settings.autoPullInterval=je.autoPullInterval,await n.saveSettings(),n.automaticsManager.reload("pull")})}),new U.Setting(r).setName(`Specify custom commit message on auto ${i}`).setDesc("You will get a pop up to specify your message.").addToggle(u=>u.setValue(n.settings.customMessageOnAutoBackup).onChange(async f=>{n.settings.customMessageOnAutoBackup=f,await n.saveSettings(),this.refreshDisplayWithDelay()})),s=new U.Setting(r).setName(`Commit message on auto ${i}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>{u.setPlaceholder(je.autoCommitMessage).onChange(async f=>{f===""?n.settings.autoCommitMessage=je.autoCommitMessage:n.settings.autoCommitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"autoCommitMessage"})}),this.mayDisableSetting(s,n.settings.customMessageOnAutoBackup),new U.Setting(r).setName("Commit message").setHeading(),new U.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>{u.setPlaceholder(je.commitMessage).onChange(async f=>{f===""?n.settings.commitMessage=je.commitMessage:n.settings.commitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"commitMessage"})}),new U.Setting(r).setName("Commit message script").setDesc("A script that is run using 'sh -c' to generate the commit message. May be used to generate commit messages using AI tools. Available placeholders: {{hostname}}, {{date}}.").addText(u=>{u.onChange(async f=>{f===""?n.settings.commitMessageScript=je.commitMessageScript:n.settings.commitMessageScript=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"commitMessageScript"})});let c=new U.Setting(r).setName("{{date}} placeholder format").addMomentFormat(u=>u.setDefaultFormat(n.settings.commitDateFormat).setValue(n.settings.commitDateFormat).onChange(async f=>{n.settings.commitDateFormat=f,await n.saveSettings()}));c.descEl.innerHTML=` - Specify custom date format. E.g. "${xm}. See Moment.js for more formats.`,new U.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText(u=>{var f;return u.setValue((f=n.localStorage.getHostname())!=null?f:"").onChange(d=>{n.localStorage.setHostname(d)})}),new U.Setting(r).setName("Preview commit message").addButton(u=>u.setButtonText("Preview").onClick(async()=>{let f=await n.gitManager.formatCommitMessage(n.settings.commitMessage);new U.Notice(`${f}`)})),new U.Setting(r).setName("List filenames affected by commit in the commit body").addToggle(u=>u.setValue(n.settings.listChangedFilesInMessageBody).onChange(async f=>{n.settings.listChangedFilesInMessageBody=f,await n.saveSettings()})),new U.Setting(r).setName("Pull").setHeading(),n.gitManager instanceof Ee&&new U.Setting(r).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(u=>{let f={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};u.addOptions(f),u.setValue(n.settings.syncMethod),u.onChange(async d=>{n.settings.syncMethod=d,await n.saveSettings()})}),new U.Setting(r).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(u=>u.setValue(n.settings.autoPullOnBoot).onChange(async f=>{n.settings.autoPullOnBoot=f,await n.saveSettings()})),new U.Setting(r).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),s=new U.Setting(r).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${n.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(u=>u.setValue(!n.settings.disablePush).onChange(async f=>{n.settings.disablePush=!f,this.refreshDisplayWithDelay(),await n.saveSettings()})),new U.Setting(r).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${n.settings.disablePush?"":"and push "}only.`).addToggle(u=>u.setValue(n.settings.pullBeforePush).onChange(async f=>{n.settings.pullBeforePush=f,this.refreshDisplayWithDelay(),await n.saveSettings()})),n.gitManager instanceof Ee&&(new U.Setting(r).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new U.Setting(r).setName("History view").setHeading(),new U.Setting(r).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(c=>{let u={hide:"Hide",full:"Full",initials:"Initials"};c.addOptions(u),c.setValue(n.settings.authorInHistoryView),c.onChange(async f=>{n.settings.authorInHistoryView=f,await n.saveSettings(),await n.refresh()})}),new U.Setting(r).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(c=>c.setValue(n.settings.dateInHistoryView).onChange(async u=>{n.settings.dateInHistoryView=u,await n.saveSettings(),await n.refresh()})),new U.Setting(r).setName("Source control view").setHeading(),new U.Setting(r).setName("Automatically refresh source control view on file changes").setDesc("On slower machines this may cause lags. If so, just disable this option.").addToggle(c=>c.setValue(n.settings.refreshSourceControl).onChange(async u=>{n.settings.refreshSourceControl=u,await n.saveSettings()})),new U.Setting(r).setName("Source control view refresh interval").setDesc("Milliseconds to wait after file change before refreshing the Source Control View.").addText(c=>{c.inputEl.type="number",this.setNonDefaultValue({text:c,settingsProperty:"refreshSourceControlTimer"}),c.setPlaceholder(String(je.refreshSourceControlTimer)),c.onChange(async f=>{f!==""&&Number.isInteger(Number(f))?n.settings.refreshSourceControlTimer=Math.max(Number(f),500):n.settings.refreshSourceControlTimer=je.refreshSourceControlTimer,await n.saveSettings(),n.setRefreshDebouncer()})}),new U.Setting(r).setName("Miscellaneous").setHeading(),n.gitManager instanceof Ee&&new U.Setting(r).setName("Diff view style").setDesc('Set the style for the diff view. Note that the actual diff in "Split" mode is not generated by Git, but the editor itself instead so it may differ from the diff generated by Git. One advantage of this is that you can edit the text in that view.').addDropdown(c=>{let u={split:"Split",git_unified:"Unified"};c.addOptions(u),c.setValue(n.settings.diffStyle),c.onChange(async f=>{n.settings.diffStyle=f,await n.saveSettings()})}),new U.Setting(r).setName("Disable informative notifications").setDesc("Disable informative notifications for git operations to minimize distraction (refer to status bar for updates).").addToggle(c=>c.setValue(n.settings.disablePopups).onChange(async u=>{n.settings.disablePopups=u,this.refreshDisplayWithDelay(),await n.saveSettings()})),new U.Setting(r).setName("Disable error notifications").setDesc("Disable errror notifications of any kind to minimize distraction (refer to status bar for updates).").addToggle(c=>c.setValue(!n.settings.showErrorNotices).onChange(async u=>{n.settings.showErrorNotices=!u,await n.saveSettings()})),n.settings.disablePopups||new U.Setting(r).setName("Hide notifications for no changes").setDesc("Don't show notifications when there are no changes to commit or push.").addToggle(c=>c.setValue(n.settings.disablePopupsForNoChanges).onChange(async u=>{n.settings.disablePopupsForNoChanges=u,await n.saveSettings()})),new U.Setting(r).setName("Show status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(c=>c.setValue(n.settings.showStatusBar).onChange(async u=>{n.settings.showStatusBar=u,await n.saveSettings()})),new U.Setting(r).setName("File menu integration").setDesc('Add "Stage", "Unstage" and "Add to .gitignore" actions to the file menu.').addToggle(c=>c.setValue(n.settings.showFileMenu).onChange(async u=>{n.settings.showFileMenu=u,await n.saveSettings()})),new U.Setting(r).setName("Show branch status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(c=>c.setValue(n.settings.showBranchStatusBar).onChange(async u=>{n.settings.showBranchStatusBar=u,await n.saveSettings()})),new U.Setting(r).setName("Show the count of modified files in the status bar").addToggle(c=>c.setValue(n.settings.changedFilesInStatusBar).onChange(async u=>{n.settings.changedFilesInStatusBar=u,await n.saveSettings()})),n.gitManager instanceof sn?new U.Setting(r).setName("Authentication/commit author").setHeading():new U.Setting(r).setName("Commit author").setHeading(),n.gitManager instanceof sn&&new U.Setting(r).setName("Username on your git server. E.g. your username on GitHub").addText(c=>{var u;c.setValue((u=n.localStorage.getUsername())!=null?u:""),c.onChange(f=>{n.localStorage.setUsername(f)})}),n.gitManager instanceof sn&&new U.Setting(r).setName("Password/Personal access token").setDesc("Type in your password. You won't be able to see it again.").addText(c=>{c.inputEl.autocapitalize="off",c.inputEl.autocomplete="off",c.inputEl.spellcheck=!1,c.onChange(u=>{n.localStorage.setPassword(u)})}),n.gitReady&&new U.Setting(r).setName("Author name for commit").addText(async c=>{var u;c.setValue((u=await n.gitManager.getConfig("user.name"))!=null?u:""),c.onChange(async f=>{await n.gitManager.setConfig("user.name",f==""?void 0:f)})}),n.gitReady&&new U.Setting(r).setName("Author email for commit").addText(async c=>{var u;c.setValue((u=await n.gitManager.getConfig("user.email"))!=null?u:""),c.onChange(async f=>{await n.gitManager.setConfig("user.email",f==""?void 0:f)})}),new U.Setting(r).setName("Advanced").setDesc("These settings usually don't need to be changed, but may be requried for special setups.").setHeading(),n.gitManager instanceof Ee&&(new U.Setting(r).setName("Update submodules").setDesc('"Commit-and-sync" and "pull" takes care of submodules. Missing features: Conflicted files, count of pulled/pushed/committed files. Tracking branch needs to be set for each submodule.').addToggle(c=>c.setValue(n.settings.updateSubmodules).onChange(async u=>{n.settings.updateSubmodules=u,await n.saveSettings()})),n.settings.updateSubmodules&&new U.Setting(r).setName("Submodule recurse checkout/switch").setDesc("Whenever a checkout happens on the root repository, recurse the checkout on the submodules (if the branches exist).").addToggle(c=>c.setValue(n.settings.submoduleRecurseCheckout).onChange(async u=>{n.settings.submoduleRecurseCheckout=u,await n.saveSettings()}))),n.gitManager instanceof Ee&&new U.Setting(r).setName("Custom Git binary path").addText(c=>{var u;c.setValue((u=n.localStorage.getGitPath())!=null?u:""),c.setPlaceholder("git"),c.onChange(f=>{n.localStorage.setGitPath(f),n.gitManager.updateGitPath(f||"git").catch(d=>n.displayError(d))})}),n.gitManager instanceof Ee&&new U.Setting(r).setName("Additional environment variables").setDesc("Use each line for a new environment variable in the format KEY=VALUE .").addTextArea(c=>{c.setPlaceholder("GIT_DIR=/path/to/git/dir"),c.setValue(n.localStorage.getEnvVars().join(` +`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(c=>({path:c.path,status:c.type,vaultPath:this.getRelativeVaultPath(c.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}async updateUpstreamBranch(r){let[n,i]=ki(r),a=await this.branchInfo();await this.wrapFS(re.default.push({...this.getRepo(),remote:n,remoteRef:i})),await this.setConfig(`branch.${a.current}.merge`,`refs/heads/${i}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,n){return this.walkDifference({walkers:[re.default.TREE({ref:r}),re.default.TREE({ref:n})]})}async walkDifference({walkers:r,dir:n}){return await this.wrapFS(re.default.walk({...this.getRepo(),trees:r,map:async function(a,[s,o]){if(!pv(a,n))return null;if(await(s==null?void 0:s.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let l=await(s==null?void 0:s.oid()),c=await(o==null?void 0:o.oid()),u="equal";if(l!==c&&(u="M"),l===void 0&&(u="A"),c===void 0&&(u="D"),l===void 0&&c===void 0&&(console.log("Something weird happened:"),console.log(s),console.log(o)),u!=="equal")return{path:a,type:u}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[re.default.TREE({ref:"HEAD"}),re.default.STAGE()],dir:r})).map(i=>({vaultPath:this.getRelativeVaultPath(i.path),path:i.path}))}async getUnstagedFiles(r="."){let n,i=window.setTimeout(()=>{n=new rs.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let a=this.getRepo(),s=await this.wrapFS(re.default.walk({...a,trees:[re.default.WORKDIR(),re.default.STAGE()],map:async function(o,[l,c]){if(!c&&l&&await re.default.isIgnored({...a,filepath:o})||!pv(o,r))return null;let[u,f]=await Promise.all([l&&l.type(),c&&c.type()]),d=[u,f].includes("blob");if((u==="tree"||u==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await c.oid():void 0,p;return u==="blob"&&f!=="blob"?p="42":u==="blob"&&(p=await l.oid()),p?h?p!==h?{path:o,type:"M"}:null:{path:o,type:"A"}:{path:o,type:"D"}}}));return window.clearTimeout(i),n==null||n.hide(),s}catch(a){throw window.clearTimeout(i),n==null||n.hide(),this.plugin.displayError(a),a}}async getDiffString(r,n=!1,i){let a=this.getRelativeVaultPath(r),s=async(c,[u])=>{if(r==c){let f=await u.oid();return(await re.default.readBlob({...this.getRepo(),oid:f})).blob}};if(i){let c=await(0,re.readBlob)({...this.getRepo(),filepath:r,oid:i}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof re.default.Errors.NotFoundError))throw h}),u=await re.default.readCommit({...this.getRepo(),oid:i}),f=await(0,re.readBlob)({...this.getRepo(),filepath:r,oid:u.commit.parent.first()}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof re.default.Errors.NotFoundError))throw h});return Yd(a,f!=null?f:"",c!=null?c:"")}let o=(await re.default.walk({...this.getRepo(),trees:[re.default.STAGE()],map:s})).first(),l=new TextDecoder().decode(o);if(n){let c=await this.resolveRef("HEAD").then(f=>(0,re.readBlob)({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof re.default.Errors.NotFoundError))throw f});return Yd(a,c!=null?c:"",l)}else{let c;return await this.app.vault.adapter.exists(a)?c=await this.app.vault.adapter.read(a):c="",Yd(a,l,c)}}async getLastCommitTime(){let r=this.getRepo(),n=await this.resolveRef("HEAD"),a=(await re.default.readCommit({...r,oid:n})).commit.committer.timestamp;return new Date(a*1e3)}getFileStatusResult(r){let n=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:n[0]=="?"?"U":n[0],workingDir:n[1]=="?"?"U":n[1],path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),n=await this.getConfig("user.email");if(!r||!n)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,n=!0){if(!this.plugin.settings.disablePopups)return new rs.Notice(r,n?this.noticeLength:void 0)}};async function*nU(t){yield new Uint8Array(t)}async function iU(t){let e=new ReadableStream({async start(n){for await(let i of t)n.enqueue(i);n.close()}});return await new Response(e).arrayBuffer()}var aU="https://momentjs.com/docs/#/parsing/string-format/",sU="https://publish.obsidian.md/git-doc/Line+Authoring",Kd=class extends z.PluginSettingTab{constructor(r,n){super(r,n);this.plugin=n;this.lineAuthorColorSettings=new Map}get settings(){return this.plugin.settings}display(){let{containerEl:r}=this,n=this.plugin,i;n.settings.differentIntervalCommitAndPush?i="commit":i="commit-and-sync";let a=n.gitReady;r.empty(),a||(r.createEl("p",{text:"Git is not ready. When all settings are correct you can configure commit-sync, etc."}),r.createEl("br"));let s;if(a){new z.Setting(r).setName("Automatic").setHeading(),new z.Setting(r).setName("Split timers for automatic commit and sync").setDesc("Enable to use one interval for commit and another for sync.").addToggle(u=>u.setValue(n.settings.differentIntervalCommitAndPush).onChange(async f=>{n.settings.differentIntervalCommitAndPush=f,await n.saveSettings(),n.automaticsManager.reload("commit","push"),this.refreshDisplayWithDelay()})),new z.Setting(r).setName(`Auto ${i} interval (minutes)`).setDesc(`${n.settings.differentIntervalCommitAndPush?"Commit":"Commit and sync"} changes every X minutes. Set to 0 (default) to disable. (See below setting for further configuration!)`).addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoSaveInterval"}),u.setPlaceholder(String(Xe.autoSaveInterval)),u.onChange(async f=>{f!==""?n.settings.autoSaveInterval=Number(f):n.settings.autoSaveInterval=Xe.autoSaveInterval,await n.saveSettings(),n.automaticsManager.reload("commit")})}),s=new z.Setting(r).setName(`Auto ${i} after stopping file edits`).setDesc(`Requires the ${i} interval not to be 0. + If turned on, do auto ${i} every ${c3(n.settings.autoSaveInterval)} after stopping file edits. + This also prevents auto ${i} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(u=>u.setValue(n.settings.autoBackupAfterFileChange).onChange(async f=>{n.settings.autoBackupAfterFileChange=f,this.refreshDisplayWithDelay(),await n.saveSettings(),n.automaticsManager.reload("commit")})),this.mayDisableSetting(s,n.settings.setLastSaveToLastCommit),s=new z.Setting(r).setName(`Auto ${i} after latest commit`).setDesc(`If turned on, sets last auto ${i} timestamp to the latest commit timestamp. This reduces the frequency of auto ${i} when doing manual commits.`).addToggle(u=>u.setValue(n.settings.setLastSaveToLastCommit).onChange(async f=>{n.settings.setLastSaveToLastCommit=f,await n.saveSettings(),n.automaticsManager.reload("commit"),this.refreshDisplayWithDelay()})),this.mayDisableSetting(s,n.settings.autoBackupAfterFileChange),s=new z.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoPushInterval"}),u.setPlaceholder(String(Xe.autoPushInterval)),u.onChange(async f=>{f!==""?n.settings.autoPushInterval=Number(f):n.settings.autoPushInterval=Xe.autoPushInterval,await n.saveSettings(),n.automaticsManager.reload("push")})}),this.mayDisableSetting(s,!n.settings.differentIntervalCommitAndPush),new z.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoPullInterval"}),u.setPlaceholder(String(Xe.autoPullInterval)),u.onChange(async f=>{f!==""?n.settings.autoPullInterval=Number(f):n.settings.autoPullInterval=Xe.autoPullInterval,await n.saveSettings(),n.automaticsManager.reload("pull")})}),new z.Setting(r).setName(`Auto ${i} only staged files`).setDesc(`If turned on, only staged files are committed on ${i}. If turned off, all changed files are committed.`).addToggle(u=>u.setValue(n.settings.autoCommitOnlyStaged).onChange(async f=>{n.settings.autoCommitOnlyStaged=f,await n.saveSettings()})),new z.Setting(r).setName(`Specify custom commit message on auto ${i}`).setDesc("You will get a pop up to specify your message.").addToggle(u=>u.setValue(n.settings.customMessageOnAutoBackup).onChange(async f=>{n.settings.customMessageOnAutoBackup=f,await n.saveSettings(),this.refreshDisplayWithDelay()})),s=new z.Setting(r).setName(`Commit message on auto ${i}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>{u.setPlaceholder(Xe.autoCommitMessage).onChange(async f=>{f===""?n.settings.autoCommitMessage=Xe.autoCommitMessage:n.settings.autoCommitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"autoCommitMessage"})}),this.mayDisableSetting(s,n.settings.customMessageOnAutoBackup),new z.Setting(r).setName("Commit message").setHeading(),new z.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>{u.setPlaceholder(Xe.commitMessage).onChange(async f=>{f===""?n.settings.commitMessage=Xe.commitMessage:n.settings.commitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"commitMessage"})}),new z.Setting(r).setName("Commit message script").setDesc("A script that is run using 'sh -c' to generate the commit message. May be used to generate commit messages using AI tools. Available placeholders: {{hostname}}, {{date}}.").addText(u=>{u.onChange(async f=>{f===""?n.settings.commitMessageScript=Xe.commitMessageScript:n.settings.commitMessageScript=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"commitMessageScript"})});let c=new z.Setting(r).setName("{{date}} placeholder format").addMomentFormat(u=>u.setDefaultFormat(n.settings.commitDateFormat).setValue(n.settings.commitDateFormat).onChange(async f=>{n.settings.commitDateFormat=f,await n.saveSettings()}));c.descEl.innerHTML=` + Specify custom date format. E.g. "${l0}. See Moment.js for more formats.`,new z.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText(u=>{var f;return u.setValue((f=n.localStorage.getHostname())!=null?f:"").onChange(d=>{n.localStorage.setHostname(d)})}),new z.Setting(r).setName("Preview commit message").addButton(u=>u.setButtonText("Preview").onClick(async()=>{let f=await n.gitManager.formatCommitMessage(n.settings.commitMessage);new z.Notice(`${f}`)})),new z.Setting(r).setName("List filenames affected by commit in the commit body").addToggle(u=>u.setValue(n.settings.listChangedFilesInMessageBody).onChange(async f=>{n.settings.listChangedFilesInMessageBody=f,await n.saveSettings()})),new z.Setting(r).setName("Pull").setHeading(),n.gitManager instanceof Ce&&new z.Setting(r).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(u=>{let f={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};u.addOptions(f),u.setValue(n.settings.syncMethod),u.onChange(async d=>{n.settings.syncMethod=d,await n.saveSettings()})}),new z.Setting(r).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(u=>u.setValue(n.settings.autoPullOnBoot).onChange(async f=>{n.settings.autoPullOnBoot=f,await n.saveSettings()})),new z.Setting(r).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),s=new z.Setting(r).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${n.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(u=>u.setValue(!n.settings.disablePush).onChange(async f=>{n.settings.disablePush=!f,this.refreshDisplayWithDelay(),await n.saveSettings()})),new z.Setting(r).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${n.settings.disablePush?"":"and push "}only.`).addToggle(u=>u.setValue(n.settings.pullBeforePush).onChange(async f=>{n.settings.pullBeforePush=f,this.refreshDisplayWithDelay(),await n.saveSettings()})),n.gitManager instanceof Ce&&(new z.Setting(r).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new z.Setting(r).setName("History view").setHeading(),new z.Setting(r).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(c=>{let u={hide:"Hide",full:"Full",initials:"Initials"};c.addOptions(u),c.setValue(n.settings.authorInHistoryView),c.onChange(async f=>{n.settings.authorInHistoryView=f,await n.saveSettings(),await n.refresh()})}),new z.Setting(r).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(c=>c.setValue(n.settings.dateInHistoryView).onChange(async u=>{n.settings.dateInHistoryView=u,await n.saveSettings(),await n.refresh()})),new z.Setting(r).setName("Source control view").setHeading(),new z.Setting(r).setName("Automatically refresh source control view on file changes").setDesc("On slower machines this may cause lags. If so, just disable this option.").addToggle(c=>c.setValue(n.settings.refreshSourceControl).onChange(async u=>{n.settings.refreshSourceControl=u,await n.saveSettings()})),new z.Setting(r).setName("Source control view refresh interval").setDesc("Milliseconds to wait after file change before refreshing the Source Control View.").addText(c=>{c.inputEl.type="number",this.setNonDefaultValue({text:c,settingsProperty:"refreshSourceControlTimer"}),c.setPlaceholder(String(Xe.refreshSourceControlTimer)),c.onChange(async f=>{f!==""&&Number.isInteger(Number(f))?n.settings.refreshSourceControlTimer=Math.max(Number(f),500):n.settings.refreshSourceControlTimer=Xe.refreshSourceControlTimer,await n.saveSettings(),n.setRefreshDebouncer()})}),new z.Setting(r).setName("Miscellaneous").setHeading(),n.gitManager instanceof Ce&&new z.Setting(r).setName("Diff view style").setDesc('Set the style for the diff view. Note that the actual diff in "Split" mode is not generated by Git, but the editor itself instead so it may differ from the diff generated by Git. One advantage of this is that you can edit the text in that view.').addDropdown(c=>{let u={split:"Split",git_unified:"Unified"};c.addOptions(u),c.setValue(n.settings.diffStyle),c.onChange(async f=>{n.settings.diffStyle=f,await n.saveSettings()})}),new z.Setting(r).setName("Disable informative notifications").setDesc("Disable informative notifications for git operations to minimize distraction (refer to status bar for updates).").addToggle(c=>c.setValue(n.settings.disablePopups).onChange(async u=>{n.settings.disablePopups=u,this.refreshDisplayWithDelay(),await n.saveSettings()})),new z.Setting(r).setName("Disable error notifications").setDesc("Disable error notifications of any kind to minimize distraction (refer to status bar for updates).").addToggle(c=>c.setValue(!n.settings.showErrorNotices).onChange(async u=>{n.settings.showErrorNotices=!u,await n.saveSettings()})),n.settings.disablePopups||new z.Setting(r).setName("Hide notifications for no changes").setDesc("Don't show notifications when there are no changes to commit or push.").addToggle(c=>c.setValue(n.settings.disablePopupsForNoChanges).onChange(async u=>{n.settings.disablePopupsForNoChanges=u,await n.saveSettings()})),new z.Setting(r).setName("Show status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(c=>c.setValue(n.settings.showStatusBar).onChange(async u=>{n.settings.showStatusBar=u,await n.saveSettings()})),new z.Setting(r).setName("File menu integration").setDesc('Add "Stage", "Unstage" and "Add to .gitignore" actions to the file menu.').addToggle(c=>c.setValue(n.settings.showFileMenu).onChange(async u=>{n.settings.showFileMenu=u,await n.saveSettings()})),new z.Setting(r).setName("Show branch status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(c=>c.setValue(n.settings.showBranchStatusBar).onChange(async u=>{n.settings.showBranchStatusBar=u,await n.saveSettings()})),new z.Setting(r).setName("Show the count of modified files in the status bar").addToggle(c=>c.setValue(n.settings.changedFilesInStatusBar).onChange(async u=>{n.settings.changedFilesInStatusBar=u,await n.saveSettings()})),n.gitManager instanceof wn?new z.Setting(r).setName("Authentication/commit author").setHeading():new z.Setting(r).setName("Commit author").setHeading(),n.gitManager instanceof wn&&new z.Setting(r).setName("Username on your git server. E.g. your username on GitHub").addText(c=>{var u;c.setValue((u=n.localStorage.getUsername())!=null?u:""),c.onChange(f=>{n.localStorage.setUsername(f)})}),n.gitManager instanceof wn&&new z.Setting(r).setName("Password/Personal access token").setDesc("Type in your password. You won't be able to see it again.").addText(c=>{c.inputEl.autocapitalize="off",c.inputEl.autocomplete="off",c.inputEl.spellcheck=!1,c.onChange(u=>{n.localStorage.setPassword(u)})}),n.gitReady&&new z.Setting(r).setName("Author name for commit").addText(async c=>{var u;c.setValue((u=await n.gitManager.getConfig("user.name"))!=null?u:""),c.onChange(async f=>{await n.gitManager.setConfig("user.name",f==""?void 0:f)})}),n.gitReady&&new z.Setting(r).setName("Author email for commit").addText(async c=>{var u;c.setValue((u=await n.gitManager.getConfig("user.email"))!=null?u:""),c.onChange(async f=>{await n.gitManager.setConfig("user.email",f==""?void 0:f)})}),new z.Setting(r).setName("Advanced").setDesc("These settings usually don't need to be changed, but may be required for special setups.").setHeading(),n.gitManager instanceof Ce&&(new z.Setting(r).setName("Update submodules").setDesc('"Commit-and-sync" and "pull" takes care of submodules. Missing features: Conflicted files, count of pulled/pushed/committed files. Tracking branch needs to be set for each submodule.').addToggle(c=>c.setValue(n.settings.updateSubmodules).onChange(async u=>{n.settings.updateSubmodules=u,await n.saveSettings()})),n.settings.updateSubmodules&&new z.Setting(r).setName("Submodule recurse checkout/switch").setDesc("Whenever a checkout happens on the root repository, recurse the checkout on the submodules (if the branches exist).").addToggle(c=>c.setValue(n.settings.submoduleRecurseCheckout).onChange(async u=>{n.settings.submoduleRecurseCheckout=u,await n.saveSettings()}))),n.gitManager instanceof Ce&&new z.Setting(r).setName("Custom Git binary path").addText(c=>{var u;c.setValue((u=n.localStorage.getGitPath())!=null?u:""),c.setPlaceholder("git"),c.onChange(f=>{n.localStorage.setGitPath(f),n.gitManager.updateGitPath(f||"git").catch(d=>n.displayError(d))})}),n.gitManager instanceof Ce&&new z.Setting(r).setName("Additional environment variables").setDesc("Use each line for a new environment variable in the format KEY=VALUE .").addTextArea(c=>{c.setPlaceholder("GIT_DIR=/path/to/git/dir"),c.setValue(n.localStorage.getEnvVars().join(` `)),c.onChange(u=>{n.localStorage.setEnvVars(u.split(` -`))})}),n.gitManager instanceof Ee&&new U.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(c=>{c.setValue(n.localStorage.getPATHPaths().join(` +`))})}),n.gitManager instanceof Ce&&new z.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(c=>{c.setValue(n.localStorage.getPATHPaths().join(` `)),c.onChange(u=>{n.localStorage.setPATHPaths(u.split(` -`))})}),n.gitManager instanceof Ee&&new U.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(c=>{c.setButtonText("Reload"),c.setCta(),c.onClick(async()=>{await n.gitManager.setGitInstance()})}),new U.Setting(r).setName("Custom base path (Git repository path)").setDesc(` +`))})}),n.gitManager instanceof Ce&&new z.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(c=>{c.setButtonText("Reload"),c.setCta(),c.onClick(async()=>{await n.gitManager.setGitInstance()})}),new z.Setting(r).setName("Custom base path (Git repository path)").setDesc(` Sets the relative path to the vault from which the Git binary should be executed. Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows. - `).addText(c=>{c.setValue(n.settings.basePath),c.setPlaceholder("directory/directory-with-git-repo"),c.onChange(async u=>{n.settings.basePath=u,await n.saveSettings(),n.gitManager.updateBasePath(u||"").catch(f=>n.displayError(f))})}),new U.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(c=>{c.setValue(n.settings.gitDir),c.setPlaceholder(".git"),c.onChange(async u=>{n.settings.gitDir=u,await n.saveSettings()})}),new U.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(c=>c.setValue(n.localStorage.getPluginDisabled()).onChange(u=>{n.localStorage.setPluginDisabled(u),u?n.unloadPlugin():n.init({fromReload:!0}).catch(f=>n.displayError(f)),new U.Notice("Obsidian must be restarted for the changes to take affect.")})),new U.Setting(r).setName("Support").setHeading(),new U.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(c=>{c.buttonEl.outerHTML="Buy Me a Coffee at ko-fi.com"});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let l=o.createEl("button");if(l.setText("Copy Debug Information"),l.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new U.Notice("Debug information copied to clipboard. May contain sensitive information!")},U.Platform.isDesktopApp){let c=r.createDiv();c.setAttr("align","center"),c.setText(`Debugging and logging: -You can always see the logs of this and every other plugin by opening the console with`);let u=r.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),U.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,n){n&&(r.setDisabled(n),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.lineAuthoringFeature.activateFeature():this.plugin.lineAuthoringFeature.deactivateFeature()}async lineAuthorSettingHandler(r,n){this.settings.lineAuthor[r]=n,await this.plugin.saveSettings(),this.plugin.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new U.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.innerHTML=` - Feature guide and quick examples
- The commit hash, author name and authoring date can all be individually toggled.
Hide everything, to only show the age-colored sidebar.`,r.addToggle(n=>n.setValue(this.settings.lineAuthor.show).onChange(i=>{this.configureLineAuthorShowStatus(i),this.refreshDisplayWithDelay()})),this.settings.lineAuthor.show){let n=new U.Setting(this.containerEl).setName("Follow movement and copies across files and commits").setDesc("").addDropdown(a=>{a.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),a.setValue(this.settings.lineAuthor.followMovement),a.onChange(s=>this.lineAuthorSettingHandler("followMovement",s))});if(n.descEl.innerHTML=` + `).addText(c=>{c.setValue(n.settings.basePath),c.setPlaceholder("directory/directory-with-git-repo"),c.onChange(async u=>{n.settings.basePath=u,await n.saveSettings(),n.gitManager.updateBasePath(u||"").catch(f=>n.displayError(f))})}),new z.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(c=>{c.setValue(n.settings.gitDir),c.setPlaceholder(".git"),c.onChange(async u=>{n.settings.gitDir=u,await n.saveSettings()})}),new z.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(c=>c.setValue(n.localStorage.getPluginDisabled()).onChange(u=>{n.localStorage.setPluginDisabled(u),u?n.unloadPlugin():n.init({fromReload:!0}).catch(f=>n.displayError(f)),new z.Notice("Obsidian must be restarted for the changes to take affect.")})),new z.Setting(r).setName("Support").setHeading(),new z.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(c=>{c.buttonEl.outerHTML="Buy Me a Coffee at ko-fi.com"});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let l=o.createEl("button");if(l.setText("Copy Debug Information"),l.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new z.Notice("Debug information copied to clipboard. May contain sensitive information!")},z.Platform.isDesktopApp){let c=r.createDiv();c.setAttr("align","center"),c.setText(`Debugging and logging: +You can always see the logs of this and every other plugin by opening the console with`);let u=r.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),z.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,n){n&&(r.setDisabled(n),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.lineAuthoringFeature.activateFeature():this.plugin.lineAuthoringFeature.deactivateFeature()}async lineAuthorSettingHandler(r,n){this.settings.lineAuthor[r]=n,await this.plugin.saveSettings(),this.plugin.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new z.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.innerHTML=` + Feature guide and quick examples
+ The commit hash, author name and authoring date can all be individually toggled.
Hide everything, to only show the age-colored sidebar.`,r.addToggle(n=>n.setValue(this.settings.lineAuthor.show).onChange(i=>{this.configureLineAuthorShowStatus(i),this.refreshDisplayWithDelay()})),this.settings.lineAuthor.show){let n=new z.Setting(this.containerEl).setName("Follow movement and copies across files and commits").setDesc("").addDropdown(a=>{a.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),a.setValue(this.settings.lineAuthor.followMovement),a.onChange(s=>this.lineAuthorSettingHandler("followMovement",s))});if(n.descEl.innerHTML=` By default (deactivated), each line only shows the newest commit where it was changed.
With same commit, cut-copy-paste-ing of text is followed within the same commit and the original commit of authoring will be shown. @@ -173,15 +176,15 @@ You can always see the logs of this and every other plugin by opening the consol With all commits, cut-copy-paste-ing text inbetween multiple commits will be detected.
It uses git-blame and - for matches (at least ${Gu} characters) within the same (or all) commit(s), the originating commit's information is shown.`,new U.Setting(this.containerEl).setName("Show commit hash").addToggle(a=>{a.setValue(this.settings.lineAuthor.showCommitHash),a.onChange(s=>this.lineAuthorSettingHandler("showCommitHash",s))}),new U.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(a=>{let s={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};a.addOptions(s),a.setValue(this.settings.lineAuthor.authorDisplay),a.onChange(async o=>this.lineAuthorSettingHandler("authorDisplay",o))}),new U.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(a=>{let s={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeFormatOptions),a.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",o),this.refreshDisplayWithDelay()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let a=new U.Setting(this.containerEl);a.setName("Custom authoring date format").addText(s=>{s.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),s.setPlaceholder("YYYY-MM-DD HH:mm"),s.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",o),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(o)})}),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(this.settings.lineAuthor.dateTimeFormatCustomString)}new U.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(a=>{let s={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeTimezone),a.onChange(async o=>this.lineAuthorSettingHandler("dateTimeTimezone",o))}).descEl.innerHTML=` + for matches (at least ${dd} characters) within the same (or all) commit(s), the originating commit's information is shown.`,new z.Setting(this.containerEl).setName("Show commit hash").addToggle(a=>{a.setValue(this.settings.lineAuthor.showCommitHash),a.onChange(s=>this.lineAuthorSettingHandler("showCommitHash",s))}),new z.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(a=>{let s={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};a.addOptions(s),a.setValue(this.settings.lineAuthor.authorDisplay),a.onChange(async o=>this.lineAuthorSettingHandler("authorDisplay",o))}),new z.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(a=>{let s={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeFormatOptions),a.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",o),this.refreshDisplayWithDelay()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let a=new z.Setting(this.containerEl);a.setName("Custom authoring date format").addText(s=>{s.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),s.setPlaceholder("YYYY-MM-DD HH:mm"),s.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",o),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(o)})}),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(this.settings.lineAuthor.dateTimeFormatCustomString)}new z.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(a=>{let s={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeTimezone),a.onChange(async o=>this.lineAuthorSettingHandler("dateTimeTimezone",o))}).descEl.innerHTML=` The time-zone in which the authoring date should be shown. Either your local time-zone (default), the author's time-zone during commit creation or UTC\xB100:00. - `;let i=new U.Setting(this.containerEl).setName("Oldest age in coloring");i.descEl.innerHTML=this.previewOldestAgeDescriptionHtml(this.settings.lineAuthor.coloringMaxAge)[0],i.addText(a=>{a.setPlaceholder("1y"),a.setValue(this.settings.lineAuthor.coloringMaxAge),a.onChange(async s=>{let[o,l]=this.previewOldestAgeDescriptionHtml(s);i.descEl.innerHTML=o,l&&(await this.lineAuthorSettingHandler("coloringMaxAge",s),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest"),new U.Setting(this.containerEl).setName("Text color").addText(a=>{a.setValue(this.settings.lineAuthor.textColorCss),a.onChange(async s=>{await this.lineAuthorSettingHandler("textColorCss",s)})}).descEl.innerHTML=` + `;let i=new z.Setting(this.containerEl).setName("Oldest age in coloring");i.descEl.innerHTML=this.previewOldestAgeDescriptionHtml(this.settings.lineAuthor.coloringMaxAge)[0],i.addText(a=>{a.setPlaceholder("1y"),a.setValue(this.settings.lineAuthor.coloringMaxAge),a.onChange(async s=>{let[o,l]=this.previewOldestAgeDescriptionHtml(s);i.descEl.innerHTML=o,l&&(await this.lineAuthorSettingHandler("coloringMaxAge",s),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest"),new z.Setting(this.containerEl).setName("Text color").addText(a=>{a.setValue(this.settings.lineAuthor.textColorCss),a.onChange(async s=>{await this.lineAuthorSettingHandler("textColorCss",s)})}).descEl.innerHTML=` The CSS color of the gutter text.
- It is higly recommended to use + It is highly recommended to use CSS variables defined by themes @@ -192,7 +195,7 @@ You can always see the logs of this and every other plugin by opening the consol See: List of available CSS variables in Obsidian - `,new U.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(a=>{a.setValue(this.settings.lineAuthor.ignoreWhitespace),a.onChange(s=>this.lineAuthorSettingHandler("ignoreWhitespace",s))}).descEl.innerHTML=` + `,new z.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(a=>{a.setValue(this.settings.lineAuthor.ignoreWhitespace),a.onChange(s=>this.lineAuthorSettingHandler("ignoreWhitespace",s))}).descEl.innerHTML=` Whitespace and newlines are interpreted as part of the document and in changes by default (hence not ignored). @@ -203,107 +206,107 @@ You can always see the logs of this and every other plugin by opening the consol If you don't care about purely-whitespace changes (e.g. list nesting / quote indentation changes), then activating this will provide more meaningful change detection. - `}}createColorSetting(r){let n=new U.Setting(this.containerEl).setName("").addText(i=>{let a=a0(r,this.settings.lineAuthor),s=a0(r,je.lineAuthor);i.setPlaceholder(zg(s)),i.setValue(zg(a)),i.onChange(async o=>{let l=dT(o);if(l!==void 0){let c=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(c,l)}this.refreshColorSettingsDesc(r,l)})});this.lineAuthorColorSettings.set(r,n),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,a0(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let n=this.lineAuthorColorSettings.get(r);if(n){let i=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";n.nameEl.innerText=`Color for ${i} commits`}}refreshColorSettingsDesc(r,n){let i=this.lineAuthorColorSettings.get(r);i&&(i.descEl.innerHTML=this.colorSettingPreviewDescHtml(r,this.settings.lineAuthor,n!==void 0))}colorSettingPreviewDescHtml(r,n,i){let a=i?s0(r,n):"rgba(127,127,127,0.3)",s=U.moment.unix(U.moment.now()/1e3).format("YYYY-MM-DD"),o=i?`abcdef Author Name ${s}`:"invalid color";return`Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and + `}}createColorSetting(r){let n=new z.Setting(this.containerEl).setName("").addText(i=>{let a=Rv(r,this.settings.lineAuthor),s=Rv(r,Xe.lineAuthor);i.setPlaceholder(mv(s)),i.setValue(mv(a)),i.onChange(async o=>{let l=n3(o);if(l!==void 0){let c=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(c,l)}this.refreshColorSettingsDesc(r,l)})});this.lineAuthorColorSettings.set(r,n),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,Rv(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let n=this.lineAuthorColorSettings.get(r);if(n){let i=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";n.nameEl.innerText=`Color for ${i} commits`}}refreshColorSettingsDesc(r,n){let i=this.lineAuthorColorSettings.get(r);i&&(i.descEl.innerHTML=this.colorSettingPreviewDescHtml(r,this.settings.lineAuthor,n!==void 0))}colorSettingPreviewDescHtml(r,n,i){let a=i?Mv(r,n):"rgba(127,127,127,0.3)",s=z.moment.unix(z.moment.now()/1e3).format("YYYY-MM-DD"),o=i?`abcdef Author Name ${s}`:"invalid color";return`Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and named colors (e.g. 'black', 'purple'). Color preview: ${`
${o}
`}`}previewCustomDateTimeDescriptionHtml(r){let n=(0,U.moment)().format(r);return`
Format string to display the authoring date.
Currently: ${n}`}previewOldestAgeDescriptionHtml(r){let n=Gf(r);return[`The oldest age in the line author coloring. Everything older will have the same color. -
Smallest valid age is "1d". Currently: ${n!==void 0?`${n.asDays()} days`:"invalid!"}`,n]}setNonDefaultValue({settingsProperty:r,text:n}){let i=this.plugin.settings[r];je[r]!==i&&n.setValue(String(i))}refreshDisplayWithDelay(r=80){setTimeout(()=>this.display(),r)}};function a0(e,t){return e==="oldest"?t.colorOld:t.colorNew}function Gf(e){let t=U.moment.duration("P"+e.toUpperCase());return t.isValid()&&t.asDays()&&t.asDays()>=1?t:void 0}function FT(e,t,r){if(!(e===void 0||t===void 0||r===void 0))return`head${e}-obj${t}-path${r}`}var $T=zf.Annotation.define();function LT(e,t,r){return r.update({annotations:$T.of({key:e,la:t,lineOffsetsFromUnsavedChanges:new Map})})}function sj(e){return e.annotation($T)}var Zs=zf.StateField.define({create:e=>{},update:(e,t)=>{var r;return(r=sj(t))!=null?r:oj(t,e)},compare:(e,t)=>(e==null?void 0:e.key)===(t==null?void 0:t.key)});function Vf(e){var a;let t=IT.sha256.create();if(!e)return t;let{la:r,key:n,lineOffsetsFromUnsavedChanges:i}=e;t.update(r==="untracked"?"t":"f"),t.update(n);for(let[s,o]of(a=i.entries())!=null?a:[])t.update([s,o]);return t}var Nr={get:void 0,save:void 0};function DT(e,t){Nr.get=e,Nr.save=t}function Wf(e){var t,r;return(r=(t=Gf(e.coloringMaxAge))==null?void 0:t.asDays())!=null?r:Gf(je.lineAuthor.coloringMaxAge).asDays()}function oj(e,t){if(t)return e.changes.empty||e.changes.iterChanges((r,n,i,a)=>{var p;let s=e.startState.doc,{newDoc:o}=e,l=s.lineAt(r).number,c=s.lineAt(n).number,u=o.lineAt(i).number,f=o.lineAt(a).number,d=c-l+1,h=f-u+1;for(let m=u;m<=f;m++){let v=(p=t.lineOffsetsFromUnsavedChanges.get(m))!=null?p:0,y=f===m,b=h-d;y&&(v+=b),t.lineOffsetsFromUnsavedChanges.set(m,v)}}),t}var o0=class{constructor(t){this.state=t;this.subscribeMe()}notifyLineAuthoring(t,r){if(this.view===void 0){console.warn(`Git: View is not defined for editor cache key. Unforeseen situation. id: ${t}`);return}let n=this.view.state,i=LT(t,r,n);this.view.dispatch(i)}updateToNewState(t){let r=this.lastSeenPath&&this.filepath!=this.lastSeenPath;return this.state=t,r&&(this.unsubscribeMe(this.lastSeenPath),this.subscribeMe()),this}removeIfStale(){this.view.destroyed&&this.unsubscribeMe(this.lastSeenPath)}subscribeMe(){this.filepath!==void 0&&(Xs.ifFilepathDefinedTransformSubscribers(this.filepath,t=>t.add(this)),this.lastSeenPath=this.filepath)}unsubscribeMe(t){Xs.ifFilepathDefinedTransformSubscribers(t,r=>r.delete(this))}get filepath(){var t,r;return(r=(t=this.state.field(qf.editorInfoField))==null?void 0:t.file)==null?void 0:r.path}get view(){return this.state.field(qf.editorEditorField)}},BT=NT.StateField.define({create:e=>new o0(e),update:(e,t)=>e.updateToNewState(t.state),compare:(e,t)=>e===t});g();function jT(){Ks=void 0,l0=[],Yf=0,Zf.clear(),Kf.clear(),Js.clear()}var Ks,Xf=()=>Ks;function HT(e,t){var i;let r=t.length;if(r<((i=Ks==null?void 0:Ks.length)!=null?i:0))return;Ks={gutter:e,length:r,text:t};let n=Nr.get();r!==n.gutterSpacingFallbackLength&&(n.gutterSpacingFallbackLength=r,Nr.save(n))}var l0=[],lj=15,Yf=0;function UT(e){l0[Yf]=e,Yf=(Yf+1)%lj}function GT(){return pT(l0)}var Zf=new Map,Kf=new Map,Js=new Set;g();var rC=require("@codemirror/state"),nC=require("@codemirror/view");g();var d0=require("@codemirror/view"),JT=Ve(Zg()),ed=require("obsidian");g();g();var Jf={x:-10,y:-10};function zT(){Jf.x===-10&&window.addEventListener("mousedown",e=>{Jf.x=e.clientX,Jf.y=e.clientY})}function VT(){for(let e of Js)if(cj(e,Jf))return e}function cj(e,t){let{x:r,y:n,width:i,height:a}=e.getBoundingClientRect();return r<=t.x&&t.x<=r+i&&n<=t.y&&t.y<=n+a}g();var Kl={};var WT="data-commit";function qT(e,t,r){if(t.hasFocus())return;let n=VT();if(!n)return;let i=fj(n);i&&(!i.isZeroCommit&&!i.isWaitingGutter&&uj(i,e),c0("showCommitHash",e),c0("authorDisplay",e),c0("dateTimeFormatOptions",e))}function uj(e,t){t.addItem(r=>r.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-author-copy").onClick(n=>navigator.clipboard.writeText(e.hash)))}function c0(e,t){var l,c;let r,n,i=Kl.plugin.settings.lineAuthor,a=i[e],s=typeof a=="boolean"?a:a!=="hide",o=je.lineAuthor[e];if(e==="showCommitHash")r="Show commit hash",n=a;else if(e==="authorDisplay"){let u=(l=i.lastShownAuthorDisplay)!=null?l:o;r="Show author "+(s?a:u),n=s?"hide":u}else if(e==="dateTimeFormatOptions"){let u=(c=i.lastShownDateTimeFormatOptions)!=null?c:o;r="Show "+(s?a:u),r+=r.contains("date")?"":" date",n=s?"hide":u}else Ii(e);t.addItem(u=>u.setTitle(r).setSection("obs-git-line-author-configure").setChecked(s).onClick(f=>{var d,h;return(h=(d=Kl.plugin)==null?void 0:d.settingsTab)==null?void 0:h.lineAuthorSettingHandler(e,n)}))}function YT(e,t,r){r.setAttr(WT,JSON.stringify({hash:e.hash,isZeroCommit:e.isZeroCommit,isWaitingGutter:t}))}function fj(e){let t=e.getAttr(WT);return t?JSON.parse(t):void 0}g();function s0(e,t){return e==="oldest"?Qf(0,!1,t).color:Qf(void 0,!0,t).color}function Qf(e,t,r){let n=Wf(r),i=Date.now()/1e3,a=e!=null?e:0,o=(t?0:i-a)/60/60/24,l=Math.pow(Math.clamp(o/n,0,1),1/2.3),c=dj(),u=r.colorNew,f=r.colorOld,d=c?.4:1,h=u0(u.r,f.r,l)*d,p=u0(u.g,f.g,l)*d,m=u0(u.b,f.b,l)*d;return{color:`rgba(${h},${p},${m},${c?.75:.25})`,daysSinceCommit:o}}function u0(e,t,r){return e+(t-e)*r}function dj(){var e;return((e=window.app)==null?void 0:e.getTheme())==="obsidian"}function XT(e){document.body.style.setProperty("--obs-git-gutter-text",e.textColorCss)}g();function ZT(e,t,r){let n;for(let i=t;i<=r;i++){let a=e.hashPerLine[i],s=e.commits.get(a);(!n||s.isZeroCommit||hj(s,n))&&(n=s)}return n}function hj(e,t){var i,a,s,o;let r=(a=(i=e.author)==null?void 0:i.epochSeconds)!=null?a:0,n=(o=(s=t.author)==null?void 0:s.epochSeconds)!=null?o:0;return r>n}var KT="-",pj="+",mj=3,gj="*",vj=/\S/g,yj="%",Qs=class e extends d0.GutterMarker{constructor(r){super();this.text=r}eq(r){return r instanceof e&&this.text===r.text}toDOM(){return document.createTextNode(this.text)}destroy(r){r&&(document.body.contains(r)||r.remove())}},f0=class extends d0.GutterMarker{constructor(r,n,i,a,s,o){super();this.lineAuthoring=r;this.startLine=n;this.endLine=i;this.key=a;this.settings=s;this.options=o;this.point=!1;this.elementClass="obs-git-blame-gutter"}eq(r){return this.key===(r==null?void 0:r.key)&&this.startLine===(r==null?void 0:r.startLine)&&this.endLine===(r==null?void 0:r.endLine)&&(this==null?void 0:this.options)===(r==null?void 0:r.options)}toDOM(){var r;return this.precomputedDomProvider=(r=this.precomputedDomProvider)!=null?r:this.computeDom(),this.precomputedDomProvider()}destroy(r){r&&(document.body.contains(r)||(Js.delete(r),r.remove()))}computeDom(){let r=ZT(this.lineAuthoring,this.startLine,this.endLine),n=r.isZeroCommit?"":this.renderNonZeroCommit(r);return!r.isZeroCommit&&this.options!=="waiting-for-result"?HT(this,n):n=this.adaptTextForFakeCommit(r,n,this.options),this.createHtmlNode(r,n,this.options==="waiting-for-result")}createHtmlNode(r,n,i){var c;let a=window.createDiv();a.innerText=n;let{color:s,daysSinceCommit:o}=Qf((c=r==null?void 0:r.author)==null?void 0:c.epochSeconds,r==null?void 0:r.isZeroCommit,this.settings);a.style.backgroundColor=s,YT(r,i,a);function l(){let u=a.cloneNode(!0);return Js.add(u),i||UT(o),u}return l}renderNonZeroCommit(r){let n=this.settings.showCommitHash?this.renderHash(r):"",i=this.settings.authorDisplay==="hide"?"":`${this.renderAuthorName(r,this.settings.authorDisplay)}`,a=this.settings.dateTimeFormatOptions==="hide"?"":`${this.renderAuthoringDate(r,this.settings.dateTimeFormatOptions,this.settings.dateTimeFormatCustomString,this.settings.dateTimeTimezone)}`;return[n,i,a].filter(o=>o.length>=1).join(" ")}renderHash(r){return r.hash.substring(0,6)}renderAuthorName(r,n){var o,l,c,u;let i=(l=(o=r==null?void 0:r.author)==null?void 0:o.name)!=null?l:"",a=i.split(" ").filter(f=>f.length>=1),s;switch(n){case"initials":s=a.map(f=>f[0].toUpperCase()).join("");break;case"first name":s=(c=a.first())!=null?c:KT;break;case"last name":s=(u=a.last())!=null?u:KT;break;case"full":s=i;break;default:return Ii(n)}return mT(r==null?void 0:r.author,r==null?void 0:r.committer)||(s=s+gj),s}renderAuthoringDate(r,n,i,a){var c;let s="?";if(((c=r==null?void 0:r.author)==null?void 0:c.epochSeconds)===void 0)return s;let o;switch(n){case"date":o=Uu;break;case"datetime":o=_m;break;case"custom":o=i;break;case"natural language":o=u=>{let f=u.diff((0,ed.moment)());return ed.moment.duration(f).humanize(!0)};break;default:return Ii(n)}let l=ed.moment.unix(r.author.epochSeconds);switch(a){case"viewer-local":break;case"author-local":l=l.utcOffset(r.author.tz),typeof o=="string"&&(o+=" Z");break;case"utc0000":l=l.utc(),typeof o=="string"&&(o+="[Z]");break;default:return Ii(a)}return typeof o=="string"?l.format(o):o(l)}adaptTextForFakeCommit(r,n,i){var l,c,u,f;let a=(c=(l=Xf())==null?void 0:l.text)!=null?c:n,s=i!=="waiting-for-result"&&r.isZeroCommit?pj:yj;n=a.replace(vj,s);let o=(f=(u=Nr.get())==null?void 0:u.gutterSpacingFallbackLength)!=null?f:n.length;if(n=gT(n,o,s),i!=="waiting-for-result"&&r.isZeroCommit){let d=Math.min(o,mj);n=vT(n,o-d)}return n}};function Ea(e,t,r,n,i,a){let s=JT.sha256.create();s.update(Object.values(i).join(",")),s.update(`s${t}-e${r}-k${n}-o${a}`);let o=s.hex(),l=Zf.get(o);if(l)return l;let c=new f0(e,t,r,n,i,a);return Zf.set(o,c),c}g();var QT=require("obsidian");function h0(){var t,r;let e=(r=(t=Nr.get())==null?void 0:t.gutterSpacingFallbackLength)!=null?r:je.lineAuthor.gutterSpacingFallbackLength;return new Qs(Array(e).fill("-").join(""))}function p0(e){let{lineAuthoring:t,ageForInitialRender:r}=wj(e);return Ea(t,1,1,"initialGutter"+r,e,"waiting-for-result")}function wj(e){var a;let t=(a=GT())!=null?a:Wf(e)*.25,r=(0,QT.moment)().add(-t,"days"),n={name:"",epochSeconds:hT(r),tz:"+0000"},i={hash:"waiting-for-result",author:n,committer:n,isZeroCommit:!1};return{lineAuthoring:{hashPerLine:[void 0,"waiting-for-result"],commits:new Map([["waiting-for-result",i]])},ageForInitialRender:t}}g();function eC(e,t){return Ea({hashPerLine:[void 0,"000000"],commits:new Map([["000000",ET]])},1,1,e,t)}var m0=new Qs(""),iC=(0,nC.gutter)({class:"line-author-gutter-container",markers(e){let t=e.state.field(Zs,!1);return bj(e,t)},lineMarkerChange(e){let t=Vf(e.state.field(Zs));return Vf(e.startState.field(Zs))!==t},renderEmptyElements:!0,initialSpacer:e=>(tC(e),h0()),updateSpacer:(e,t)=>{var r,n;return tC(t.view),(n=(r=Xf())==null?void 0:r.gutter)!=null?n:h0()}});function bj(e,t){let r=Vf(t),n=e.state.doc,i=new Map;for(let u=1;u<=n.lines;u++){let f=n.line(u).from,d=e.lineBlockAt(f).to;i.set(u,[f,d]),r.update([f,d,0])}let a=Nr.get();r.update("s"+Object.values(Nr).join(","));let s=r.hex(),o=Kf.get(s);if(o)return o;let{result:l,allowCache:c}=_j(n,i,a,t);return c&&Kf.set(s,l),l}function _j(e,t,r,n){let i=!0,a=e.lines,s=[];function o(f,d,h){return s.push(h.range(f,d))}let l=xj(a,n),c=e.length===0,u=e.iterLines(a,a+1).next().value==="";for(let f=1;f<=a;f++){let[d,h]=t.get(f),p=e.lineAt(h).number;if(c){o(d,h,m0);continue}if(f===a&&u){o(d,h,m0);continue}if(n===void 0){o(d,h,p0(r)),i=!1;continue}let{key:m,la:v}=n;if(v==="untracked"){o(d,h,eC(v,r));continue}let y=v.hashPerLine.length-1,b=l[f],x=l[p];if(x&&x>y&&o(d,h,m0),b!==void 0&&Vg(1,b,y)&&x!==void 0&&Vg(1,x,y)){o(d,h,Ea(v,b,x,m,r));continue}if(y<1){o(d,h,p0(r)),i=!1;continue}let E=Math.clamp(b!=null?b:f,1,y),_=Math.clamp(x!=null?x:p,1,y);o(d,h,Ea(v,E,_,m+"computing",r,"waiting-for-result"))}return{result:rC.RangeSet.of(s,!0),allowCache:i}}function xj(e,t){if(!(t!=null&&t.lineOffsetsFromUnsavedChanges))return Array.from(new Array(e+1),i=>i);let r=[void 0],n=0;for(let i=1;i<=e;i++){let a=t.lineOffsetsFromUnsavedChanges.get(i);n+=a!=null?a:0,r[i]=a===void 0?i-n:void 0}return r}function tC(e){e.dom.querySelectorAll(".cm-gutters").forEach(r=>{r!=null&&r.style&&(r.style.marginLeft||(r.style.marginLeft="unset"))})}var td=class{constructor(t){this.plugin=t;this.lineAuthorings=new Map}async trackChanged(t){return this.trackChangedHelper(t).catch(r=>(console.warn("Git: Error in trackChanged."+r),Promise.reject(r)))}async trackChangedHelper(t){if(t){if(t.path===void 0){console.warn("Git: Attempted to track change of undefined filepath. Unforeseen situation.");return}return this.computeLineAuthorInfo(t.path)}}destroy(){this.lineAuthorings.clear(),Xs.clear(),jT()}async computeLineAuthorInfo(t){let r=this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform().gitManager,n=await r.submoduleAwareHeadRevisonInContainingDirectory(t),i=await r.hashObject(t),a=FT(n,i,t);if(a!==void 0){if(!this.lineAuthorings.has(a)){let s=await r.blame(t,this.plugin.settings.lineAuthor.followMovement,this.plugin.settings.lineAuthor.ignoreWhitespace);this.lineAuthorings.set(a,s)}this.notifyComputationResultToSubscribers(t,a)}}notifyComputationResultToSubscribers(t,r){Xs.ifFilepathDefinedTransformSubscribers(t,n=>n.forEach(i=>i.notifyLineAuthoring(r,this.lineAuthorings.get(r))))}},sC=aC.Prec.high([BT,Zs,iC]);var rd=class{constructor(t){this.plg=t;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=t=>{if(!this.lineAuthorInfoProvider){console.warn("Git: undefined lineAuthorInfoProvider. Unexpected situation.");return}let r=t==null?void 0:t.view;!(r instanceof Aa.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.lineAuthorInfoProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions),DT(()=>this.plg.settings.lineAuthor,t=>{this.plg.settings.lineAuthor=t,this.plg.saveSettings()})}conditionallyActivateBySettings(){this.plg.settings.lineAuthor.show&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;XT(this.plg.settings.lineAuthor),this.lineAuthorInfoProvider=new td(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),console.log(this.plg.manifest.name+": Enabled line authoring.")}catch(t){console.warn("Git: Error while loading line authoring feature.",t),this.deactivateFeature()}}deactivateFeature(){var t;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(t=this.lineAuthorInfoProvider)==null||t.destroy(),this.lineAuthorInfoProvider=void 0,console.log(this.plg.manifest.name+": Disabled line authoring.")}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&Aa.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof Ee?this.plg.gitManager:void 0}}refreshLineAuthorViews(){this.plg.settings.lineAuthor.show&&(this.deactivateFeature(),this.activateFeature())}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(sC),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let t of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(t);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.gutterContextMenuEvent=this.createGutterContextMenuHandler(),this.fileOpenEvent=this.createFileOpenEvent(),this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileModificationEvent=this.createVaultFileModificationHandler(),this.refreshOnCssChangeEvent=this.createCssRefreshHandler(),this.fileRenameEvent=this.createFileRenameEvent(),zT(),this.plg.registerEvent(this.gutterContextMenuEvent),this.plg.registerEvent(this.refreshOnCssChangeEvent),this.plg.registerEvent(this.fileOpenEvent),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileModificationEvent),this.plg.registerEvent(this.fileRenameEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.workspace.offref(this.fileOpenEvent),this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent),this.plg.app.workspace.offref(this.gutterContextMenuEvent)}createFileOpenEvent(){return this.plg.app.workspace.on("file-open",t=>{var r;return void((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(t).catch(console.error))})}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(t,r)=>{var n;return t instanceof Aa.TFile&&((n=this.lineAuthorInfoProvider)==null?void 0:n.trackChanged(t))})}createVaultFileModificationHandler(){return this.plg.app.vault.on("modify",t=>{var r;return t instanceof Aa.TFile&&((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(t))})}createCssRefreshHandler(){return this.plg.app.workspace.on("css-change",()=>this.refreshLineAuthorViews())}createGutterContextMenuHandler(){return this.plg.app.workspace.on("editor-menu",qT)}};g();var nd=class{constructor(t){this.plugin=t;this.tasks=[]}addTask(t,r){this.tasks.push({task:t,onFinished:r!=null?r:()=>{}}),this.tasks.length===1&&this.handleTask()}handleTask(){if(this.tasks.length>0){let t=this.tasks[0];t.task().then(r=>{t.onFinished(r),this.tasks.shift(),this.handleTask()},r=>{this.plugin.displayError(r),t.onFinished(void 0),this.tasks.shift(),this.handleTask()})}}clear(){this.tasks=[]}};g();var Br=require("obsidian");var id=class{constructor(t,r){this.statusBarEl=t;this.plugin=r;this.messages=[];this.base="obsidian-git-statusbar-";this.statusBarEl.setAttribute("data-tooltip-position","top"),r.registerEvent(r.app.workspace.on("obsidian-git:refreshed",()=>{this.refreshCommitTimestamp().catch(console.error)}))}displayMessage(t,r){this.messages.push({message:`Git: ${t.slice(0,100)}`,timeout:r}),this.display()}display(){this.messages.length>0&&!this.currentMessage?(this.currentMessage=this.messages.shift(),this.statusBarEl.addClass(this.base+"message"),this.statusBarEl.ariaLabel="",this.statusBarEl.setText(this.currentMessage.message),this.lastMessageTimestamp=Date.now()):this.currentMessage?Date.now()-this.lastMessageTimestamp>=this.currentMessage.timeout&&(this.currentMessage=null,this.lastMessageTimestamp=null):this.displayState()}displayState(){switch((this.statusBarEl.getText().length>3||!this.statusBarEl.hasChildNodes())&&(this.statusBarEl.empty(),this.conflictEl=this.statusBarEl.createDiv(),this.conflictEl.setAttribute("data-tooltip-position","top"),this.conflictEl.style.float="left",this.iconEl=this.statusBarEl.createDiv(),this.iconEl.style.float="left",this.textEl=this.statusBarEl.createDiv(),this.textEl.style.float="right",this.textEl.style.marginLeft="5px"),this.plugin.localStorage.getConflict()?((0,Br.setIcon)(this.conflictEl,"alert-circle"),this.conflictEl.ariaLabel="You have merge conflicts. Resolve them and commit afterwards.",this.conflictEl.style.marginRight="5px",this.conflictEl.addClass(this.base+"conflict")):(this.conflictEl.empty(),this.conflictEl.style.marginRight=""),this.plugin.state.gitAction){case 0:this.displayFromNow();break;case 1:this.statusBarEl.ariaLabel="Checking repository status...",(0,Br.setIcon)(this.iconEl,"refresh-cw"),this.statusBarEl.addClass(this.base+"status");break;case 3:this.statusBarEl.ariaLabel="Adding files...",(0,Br.setIcon)(this.iconEl,"archive"),this.statusBarEl.addClass(this.base+"add");break;case 4:this.statusBarEl.ariaLabel="Committing changes...",(0,Br.setIcon)(this.iconEl,"git-commit"),this.statusBarEl.addClass(this.base+"commit");break;case 5:this.statusBarEl.ariaLabel="Pushing changes...",(0,Br.setIcon)(this.iconEl,"upload"),this.statusBarEl.addClass(this.base+"push");break;case 2:this.statusBarEl.ariaLabel="Pulling changes...",(0,Br.setIcon)(this.iconEl,"download"),this.statusBarEl.addClass(this.base+"pull");break;default:this.statusBarEl.ariaLabel="Failed on initialization!",(0,Br.setIcon)(this.iconEl,"alert-triangle"),this.statusBarEl.addClass(this.base+"failed-init");break}}displayFromNow(){var n;let t=this.lastCommitTimestamp,r=this.plugin.state.offlineMode;if(t){let i=(0,Br.moment)(t).fromNow();this.statusBarEl.ariaLabel=`${r?"Offline: ":""}Last Commit: ${i}`,(n=this.unPushedCommits)!=null&&n&&(this.statusBarEl.ariaLabel+=` -(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Br.setIcon)(this.iconEl,"globe"):(0,Br.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus&&this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};g();var sd=require("obsidian"),ad=class extends sd.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let n=(0,sd.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${n}: ${r}`,`${r}: ${n}`]}renderSuggestion(r,n){n.innerText=r}onChooseSuggestion(r,n){this.resolve&&this.resolve(r)}};g();var oC=require("obsidian"),Jl=class{constructor(t){this.plugin=t}saveLastAuto(t,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(t.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(t.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(t.toString())}loadLastAuto(){var t,r,n;return{backup:new Date((t=this.plugin.localStorage.getLastAutoBackup())!=null?t:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((n=this.plugin.localStorage.getLastAutoPush())!=null?n:"")}}async init(){await this.setUpAutoCommitAndSync();let t=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=this.diff(this.plugin.settings.autoPushInterval,t.push);this.startAutoPush(r)}if(this.plugin.settings.autoPullInterval>0){let r=this.diff(this.plugin.settings.autoPullInterval,t.pull);this.startAutoPull(r)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...t){t.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),t.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),t.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let t=await this.plugin.gitManager.getLastCommitTime();t&&this.saveLastAuto(t,"backup")}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let t=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=this.diff(this.plugin.settings.autoSaveInterval,t.backup);this.startAutoCommitAndSync(r)}}}startAutoCommitAndSync(t){let r=(t!=null?t:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?t===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,oC.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(async()=>{if(this.plugin.settings.setLastSaveToLastCommit){let t=await this.plugin.gitManager.getLastCommitTime();if(t){this.saveLastAuto(t,"backup");let r=this.diff(this.plugin.settings.autoSaveInterval,t);if(r>0)return this.startAutoCommitAndSync(r),!1}}return this.plugin.settings.differentIntervalCommitAndPush?await this.plugin.commit({fromAuto:!0}):await this.plugin.commitAndSync({fromAutoBackup:!0}),!0},t=>{t!==!1&&(this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync())})}startAutoPull(t){let r=(t!=null?t:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>this.doAutoPull(),r)}doAutoPull(){this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote(),()=>{this.saveLastAuto(new Date,"pull"),this.startAutoPull()})}startAutoPush(t){let r=(t!=null?t:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>this.doAutoPush(),r)}doAutoPush(){this.plugin.promiseQueue.addTask(()=>this.plugin.push(),()=>{this.saveLastAuto(new Date,"push"),this.startAutoPush()})}clearAutoCommitAndSync(){var r;let t=!1;return this.timeoutIDCommitAndSync&&(window.clearTimeout(this.timeoutIDCommitAndSync),this.timeoutIDCommitAndSync=void 0,t=!0),this.plugin.autoCommitDebouncer&&((r=this.plugin.autoCommitDebouncer)==null||r.cancel(),this.plugin.autoCommitDebouncer=void 0,t=!0),t}clearAutoPull(){return this.timeoutIDPull?(window.clearTimeout(this.timeoutIDPull),this.timeoutIDPull=void 0,!0):!1}clearAutoPush(){return this.timeoutIDPush?(window.clearTimeout(this.timeoutIDPush),this.timeoutIDPush=void 0,!0):!1}diff(t,r){let i=t-Math.round((new Date().getTime()-r.getTime())/1e3/60);return Math.max(0,i)}};g();var ka=require("obsidian");g();var Ql=require("obsidian");async function lC(e,t,r){let n=await uC(t,r);if(n.result==="failure"){new Ql.Notice(n.reason);return}let{isGitHub:i,branch:a,repo:s,user:o,filePath:l}=n;if(i){let c=e.getCursor("from").line+1,u=e.getCursor("to").line+1;c===u?window.open(`https://github.com/${o}/${s}/blob/${a}/${l}?plain=1#L${c}`):window.open(`https://github.com/${o}/${s}/blob/${a}/${l}?plain=1#L${c}-L${u}`)}else new Ql.Notice("It seems like you are not using GitHub")}async function cC(e,t){let r=await uC(e,t);if(r.result==="failure"){new Ql.Notice(r.reason);return}let{isGitHub:n,branch:i,repo:a,user:s,filePath:o}=r;n?window.open(`https://github.com/${s}/${a}/commits/${i}/${o}`):new Ql.Notice("It seems like you are not using GitHub")}async function uC(e,t){let r=await t.branchInfo(),n=r.tracking,i=r.current,a,s=t.getRelativeRepoPath(e.path);if(t instanceof Ee){let l=await t.getSubmoduleOfFile(t.getRelativeRepoPath(e.path));if(l){s=l.relativeFilepath;let c=await t.git.cwd({path:l.submodule,root:!1}).status();if(n=c.tracking||void 0,i=c.current||void 0,n){let u=n.substring(0,n.indexOf("/")),f=await t.git.cwd({path:l.submodule,root:!1}).getConfig(`remote.${u}.url`,"local");if(f.value!=null)a=f.value;else return{result:"failure",reason:"Failed to get remote url of submodule"}}}}if(n==null)return{result:"failure",reason:"Remote branch is not configured"};if(i==null)return{result:"failure",reason:"Failed to get current branch name"};if(a==null){let l=n.substring(0,n.indexOf("/"));if(a=await t.getConfig(`remote.${l}.url`),a==null)return{result:"failure",reason:"Failed to get remote url"}}let o=a.match(/(?:^https:\/\/github\.com\/(.+)\/(.+?)(?:\.git)?$)|(?:^[a-zA-Z]+@github\.com:(.+)\/(.+?)(?:\.git)?$)/);if(o==null)return{result:"failure",reason:"Could not parse remote url"};{let[l,c,u,f,d]=o;return{result:"success",isGitHub:!!l,repo:u||d,user:c||f,branch:i,filePath:s}}}g();var fC=require("obsidian"),od=class extends fC.FuzzySuggestModal{constructor(t,r){super(t.app),this.plugin=t,this.changedFiles=r,this.setPlaceholder("Not supported files will be opened by default app!")}getItems(){return this.changedFiles}getItemText(t){if(t.index=="U"&&t.workingDir=="U")return`Untracked | ${t.vaultPath}`;let r="",n="";return t.workingDir!=" "&&(r=`Working Dir: ${t.workingDir} `),t.index!=" "&&(n=`Index: ${t.index}`),`${r}${n} | ${t.vaultPath}`}onChooseItem(t,r){this.plugin.app.metadataCache.getFirstLinkpathDest(t.vaultPath,"")==null?this.app.openWithDefaultApp(t.vaultPath):this.plugin.app.workspace.openLinkText(t.vaultPath,"/")}};g();var dC=require("obsidian"),ld=class extends dC.Modal{constructor(r,n){super(r);this.content=n;this.resolve=null}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText("Edit .gitignore");let i=r.createDiv(),a=i.createEl("textarea",{text:this.content,cls:["obsidian-git-textarea"],attr:{rows:10,cols:30,wrap:"off"}});i.createEl("button",{cls:["mod-cta","obsidian-git-center-button"],text:"Save"}).addEventListener("click",()=>{this.resolve(a.value),this.close()})}onClose(){let{contentEl:r}=this;r.empty(),this.resolve&&this.resolve(void 0)}};function hC(e){let t=e.app;e.addCommand({id:"edit-gitignore",name:"Edit .gitignore",callback:async()=>{let r=e.gitManager.getRelativeVaultPath(".gitignore");await t.vault.adapter.exists(r)||await t.vault.adapter.write(r,"");let n=await t.vault.adapter.read(r),a=await new ld(t,n).openAndGetReslt();a!==void 0&&(await t.vault.adapter.write(r,a),await e.refresh())}}),e.addCommand({id:"open-git-view",name:"Open source control view",callback:async()=>{var i;let r=t.workspace.getLeavesOfType(kt.type),n;r.length===0?(n=(i=t.workspace.getRightLeaf(!1))!=null?i:t.workspace.getLeaf(),await n.setViewState({type:kt.type})):n=r.first(),await t.workspace.revealLeaf(n),t.workspace.trigger("obsidian-git:refresh")}}),e.addCommand({id:"open-history-view",name:"Open history view",callback:async()=>{var i;let r=t.workspace.getLeavesOfType(Lr.type),n;r.length===0?(n=(i=t.workspace.getRightLeaf(!1))!=null?i:t.workspace.getLeaf(),await n.setViewState({type:Lr.type})):n=r.first(),await t.workspace.revealLeaf(n),t.workspace.trigger("obsidian-git:refresh")}}),e.addCommand({id:"open-diff-view",name:"Open diff view",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;{let i=e.gitManager.getRelativeRepoPath(n.path,!0);e.tools.openDiff({aFile:i,aRef:""})}}}),e.addCommand({id:"view-file-on-github",name:"Open file on GitHub",editorCallback:(r,{file:n})=>{if(n)return lC(r,n,e.gitManager)}}),e.addCommand({id:"view-history-on-github",name:"Open file history on GitHub",editorCallback:(r,{file:n})=>{if(n)return cC(n,e.gitManager)}}),e.addCommand({id:"pull",name:"Pull",callback:()=>e.promiseQueue.addTask(()=>e.pullChangesFromRemote())}),e.addCommand({id:"fetch",name:"Fetch",callback:()=>e.promiseQueue.addTask(()=>e.fetch())}),e.addCommand({id:"switch-to-remote-branch",name:"Switch to remote branch",callback:()=>e.promiseQueue.addTask(()=>e.switchRemoteBranch())}),e.addCommand({id:"add-to-gitignore",name:"Add file to .gitignore",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.addFileToGitignore(n.path,n instanceof ka.TFolder).catch(i=>e.displayError(i))}}),e.addCommand({id:"push",name:"Commit-and-sync",callback:()=>e.promiseQueue.addTask(()=>e.commitAndSync({fromAutoBackup:!1}))}),e.addCommand({id:"backup-and-close",name:"Commit-and-sync and then close Obsidian",callback:()=>e.promiseQueue.addTask(async()=>{await e.commitAndSync({fromAutoBackup:!1}),window.close()})}),e.addCommand({id:"commit-push-specified-message",name:"Commit-and-sync with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commitAndSync({fromAutoBackup:!1,requestCustomMessage:!0}))}),e.addCommand({id:"commit",name:"Commit all changes",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1}))}),e.addCommand({id:"commit-specified-message",name:"Commit all changes with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0}))}),e.addCommand({id:"commit-staged",name:"Commit",callback:()=>e.promiseQueue.addTask(async()=>{let n=(await e.updateCachedStatus()).staged.length>0;return e.commit({fromAuto:!1,requestCustomMessage:!1,onlyStaged:n})})}),ka.Platform.isDesktopApp&&e.addCommand({id:"commit-amend-staged-specified-message",name:"Amend staged",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0,amend:!0}))}),e.addCommand({id:"commit-staged-specified-message",name:"Commit staged with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0}))}),e.addCommand({id:"push2",name:"Push",callback:()=>e.promiseQueue.addTask(()=>e.push())}),e.addCommand({id:"stage-current-file",name:"Stage current file",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.promiseQueue.addTask(()=>e.stageFile(n))}}),e.addCommand({id:"unstage-current-file",name:"Unstage current file",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.promiseQueue.addTask(()=>e.unstageFile(n))}}),e.addCommand({id:"edit-remotes",name:"Edit remotes",callback:()=>e.editRemotes().catch(r=>e.displayError(r))}),e.addCommand({id:"remove-remote",name:"Remove remote",callback:()=>e.removeRemote().catch(r=>e.displayError(r))}),e.addCommand({id:"set-upstream-branch",name:"Set upstream branch",callback:()=>e.setUpstreamBranch().catch(r=>e.displayError(r))}),e.addCommand({id:"delete-repo",name:"CAUTION: Delete repository",callback:async()=>{await t.vault.adapter.exists(`${e.settings.basePath}/.git`)?await new $e(e,{options:["NO","YES"],placeholder:"Do you really want to delete the repository (.git directory)? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&(await t.vault.adapter.rmdir(`${e.settings.basePath}/.git`,!0),new ka.Notice("Successfully deleted repository. Reloading plugin..."),e.unloadPlugin(),await e.init({fromReload:!0})):new ka.Notice("No repository found")}}),e.addCommand({id:"init-repo",name:"Initialize a new repo",callback:()=>e.createNewRepo().catch(r=>e.displayError(r))}),e.addCommand({id:"clone-repo",name:"Clone an existing remote repo",callback:()=>e.cloneNewRepo().catch(r=>e.displayError(r))}),e.addCommand({id:"list-changed-files",name:"List changed files",callback:async()=>{if(await e.isAllInitialized())try{let r=await e.updateCachedStatus();if(r.changed.length+r.staged.length>500){e.displayError("Too many changes to display");return}new od(e,r.all).open()}catch(r){e.displayError(r)}}}),e.addCommand({id:"switch-branch",name:"Switch branch",callback:()=>{e.switchBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"create-branch",name:"Create new branch",callback:()=>{e.createBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"delete-branch",name:"Delete branch",callback:()=>{e.deleteBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"discard-all",name:"CAUTION: Discard all changes",callback:async()=>{if(!await e.isAllInitialized())return!1;await new $e(e,{options:["NO","YES"],placeholder:"Do you want to discard all changes to tracked files? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&e.promiseQueue.addTask(()=>e.discardAll())}}),e.addCommand({id:"raw-command",name:"Raw command",checkCallback:r=>{let n=e.gitManager;if(r)return n instanceof Ee;e.tools.runRawCommand().catch(i=>e.displayError(i))}}),e.addCommand({id:"toggle-line-author-info",name:"Toggle line author information",callback:()=>{var r;return(r=e.settingsTab)==null?void 0:r.configureLineAuthorShowStatus(!e.settings.lineAuthor.show)}})}g();var cd=class{constructor(t){this.plugin=t;this.prefix=this.plugin.manifest.id+":",this.app=t.app}migrate(){let t=["password","hostname","conflict","lastAutoPull","lastAutoBackup","lastAutoPush","gitPath","pluginDisabled"];for(let r of t){let n=localStorage.getItem(this.prefix+r);this.app.loadLocalStorage(this.prefix+r)==null&&n!=null&&n!=null&&(this.app.saveLocalStorage(this.prefix+r,n),localStorage.removeItem(this.prefix+r))}}getPassword(){return this.app.loadLocalStorage(this.prefix+"password")}setPassword(t){return this.app.saveLocalStorage(this.prefix+"password",t)}getUsername(){return this.app.loadLocalStorage(this.prefix+"username")}setUsername(t){return this.app.saveLocalStorage(this.prefix+"username",t)}getHostname(){return this.app.loadLocalStorage(this.prefix+"hostname")}setHostname(t){return this.app.saveLocalStorage(this.prefix+"hostname",t)}getConflict(){return this.app.loadLocalStorage(this.prefix+"conflict")=="true"}setConflict(t){return this.app.saveLocalStorage(this.prefix+"conflict",`${t}`)}getLastAutoPull(){return this.app.loadLocalStorage(this.prefix+"lastAutoPull")}setLastAutoPull(t){return this.app.saveLocalStorage(this.prefix+"lastAutoPull",t)}getLastAutoBackup(){return this.app.loadLocalStorage(this.prefix+"lastAutoBackup")}setLastAutoBackup(t){return this.app.saveLocalStorage(this.prefix+"lastAutoBackup",t)}getLastAutoPush(){return this.app.loadLocalStorage(this.prefix+"lastAutoPush")}setLastAutoPush(t){return this.app.saveLocalStorage(this.prefix+"lastAutoPush",t)}getGitPath(){return this.app.loadLocalStorage(this.prefix+"gitPath")}setGitPath(t){return this.app.saveLocalStorage(this.prefix+"gitPath",t)}getPATHPaths(){var t,r;return(r=(t=this.app.loadLocalStorage(this.prefix+"PATHPaths"))==null?void 0:t.split(":"))!=null?r:[]}setPATHPaths(t){return this.app.saveLocalStorage(this.prefix+"PATHPaths",t.join(":"))}getEnvVars(){var t;return JSON.parse((t=this.app.loadLocalStorage(this.prefix+"envVars"))!=null?t:"[]")}setEnvVars(t){return this.app.saveLocalStorage(this.prefix+"envVars",JSON.stringify(t))}getPluginDisabled(){return this.app.loadLocalStorage(this.prefix+"pluginDisabled")=="true"}setPluginDisabled(t){return this.app.saveLocalStorage(this.prefix+"pluginDisabled",`${t}`)}};g();var eo=require("obsidian");var ec=class{constructor(t){this.plugin=t}async hasTooBigFiles(t){let r=await this.plugin.gitManager.branchInfo(),n=r.tracking?Fi(r.tracking)[0]:null;if(!n)return!1;let i=await this.plugin.gitManager.getRemoteUrl(n);if(i!=null&&i.includes("github.com")){let a=[],s=this.plugin.gitManager;for(let o of t){let l=this.plugin.app.vault.getAbstractFileByPath(o.vaultPath),c=!1;if(l instanceof eo.TFile)l.stat.size>=1e8&&(c=!0);else{let u=await this.plugin.app.vault.adapter.stat(o.vaultPath);u&&u.size>=1e8&&(c=!0)}if(c){let u=!1;s instanceof Ee&&(u=await s.isFileTrackedByLFS(o.path)),u||a.push(o)}}if(a.length>0)return this.plugin.displayError(`Aborted commit, because the following files are too big: + >${o}`}`}previewCustomDateTimeDescriptionHtml(r){let n=(0,z.moment)().format(r);return`Format string to display the authoring date.
Currently: ${n}`}previewOldestAgeDescriptionHtml(r){let n=Zd(r);return[`The oldest age in the line author coloring. Everything older will have the same color. +
Smallest valid age is "1d". Currently: ${n!==void 0?`${n.asDays()} days`:"invalid!"}`,n]}setNonDefaultValue({settingsProperty:r,text:n}){let i=this.plugin.settings[r];Xe[r]!==i&&n.setValue(JSON.stringify(i))}refreshDisplayWithDelay(r=80){setTimeout(()=>this.display(),r)}};function Rv(t,e){return t==="oldest"?e.colorOld:e.colorNew}function Zd(t){let e=z.moment.duration("P"+t.toUpperCase());return e.isValid()&&e.asDays()&&e.asDays()>=1?e:void 0}function C3(t,e,r){if(!(t===void 0||e===void 0||r===void 0))return`head${t}-obj${e}-path${r}`}var P3=Jd.Annotation.define();function R3(t,e,r){return r.update({annotations:P3.of({key:t,la:e,lineOffsetsFromUnsavedChanges:new Map})})}function oU(t){return t.annotation(P3)}var Lo=Jd.StateField.define({create:t=>{},update:(t,e)=>{var r;return(r=oU(e))!=null?r:lU(e,t)},compare:(t,e)=>(t==null?void 0:t.key)===(e==null?void 0:e.key)});function Qd(t){var a;let e=T3.sha256.create();if(!t)return e;let{la:r,key:n,lineOffsetsFromUnsavedChanges:i}=t;e.update(r==="untracked"?"t":"f"),e.update(n);for(let[s,o]of(a=i.entries())!=null?a:[])e.update([s,o]);return e}var Qr={get:void 0,save:void 0};function M3(t,e){Qr.get=t,Qr.save=e}function eh(t){var e,r;return(r=(e=Zd(t.coloringMaxAge))==null?void 0:e.asDays())!=null?r:Zd(Xe.lineAuthor.coloringMaxAge).asDays()}function lU(t,e){if(e)return t.changes.empty||t.changes.iterChanges((r,n,i,a)=>{var p;let s=t.startState.doc,{newDoc:o}=t,l=s.lineAt(r).number,c=s.lineAt(n).number,u=o.lineAt(i).number,f=o.lineAt(a).number,d=c-l+1,h=f-u+1;for(let g=u;g<=f;g++){let v=(p=e.lineOffsetsFromUnsavedChanges.get(g))!=null?p:0,y=f===g,b=h-d;y&&(v+=b),e.lineOffsetsFromUnsavedChanges.set(g,v)}}),e}var Ov=class{constructor(e){this.state=e;this.subscribeMe()}notifyLineAuthoring(e,r){if(this.view===void 0){console.warn(`Git: View is not defined for editor cache key. Unforeseen situation. id: ${e}`);return}let n=this.view.state,i=R3(e,r,n);this.view.dispatch(i)}updateToNewState(e){let r=this.lastSeenPath&&this.filepath!=this.lastSeenPath;return this.state=e,r&&(this.unsubscribeMe(this.lastSeenPath),this.subscribeMe()),this}removeIfStale(){this.view.destroyed&&this.unsubscribeMe(this.lastSeenPath)}subscribeMe(){this.filepath!==void 0&&(Do.ifFilepathDefinedTransformSubscribers(this.filepath,e=>e.add(this)),this.lastSeenPath=this.filepath)}unsubscribeMe(e){Do.ifFilepathDefinedTransformSubscribers(e,r=>r.delete(this))}get filepath(){var e,r;return(r=(e=this.state.field(th.editorInfoField))==null?void 0:e.file)==null?void 0:r.path}get view(){return this.state.field(th.editorEditorField)}},I3=O3.StateField.define({create:t=>new Ov(t),update:(t,e)=>t.updateToNewState(e.state),compare:(t,e)=>t===e});m();function $3(){jo=void 0,Iv=[],rh=0,ih.clear(),ah.clear(),No.clear()}var jo,nh=()=>jo;function F3(t,e){var i;let r=e.length;if(r<((i=jo==null?void 0:jo.length)!=null?i:0))return;jo={gutter:t,length:r,text:e};let n=Qr.get();r!==n.gutterSpacingFallbackLength&&(n.gutterSpacingFallbackLength=r,Qr.save(n))}var Iv=[],cU=15,rh=0;function D3(t){Iv[rh]=t,rh=(rh+1)%cU}function L3(){return a3(Iv)}var ih=new Map,ah=new Map,No=new Set;m();var K3=require("@codemirror/state"),Z3=require("@codemirror/view");m();var Lv=require("@codemirror/view"),W3=Ot(_v()),lh=require("obsidian");m();m();var sh={x:-10,y:-10};function j3(){sh.x===-10&&window.addEventListener("mousedown",t=>{sh.x=t.clientX,sh.y=t.clientY})}function N3(){for(let t of No)if(uU(t,sh))return t}function uU(t,e){let{x:r,y:n,width:i,height:a}=t.getBoundingClientRect();return r<=e.x&&e.x<=r+i&&n<=e.y&&e.y<=n+a}m();var Nc={};var B3="data-commit";function H3(t,e,r){if(e.hasFocus())return;let n=N3();if(!n)return;let i=dU(n);i&&(!i.isZeroCommit&&!i.isWaitingGutter&&fU(i,t),$v("showCommitHash",t),$v("authorDisplay",t),$v("dateTimeFormatOptions",t))}function fU(t,e){e.addItem(r=>r.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-author-copy").onClick(n=>navigator.clipboard.writeText(t.hash)))}function $v(t,e){var l,c;let r,n,i=Nc.plugin.settings.lineAuthor,a=i[t],s=typeof a=="boolean"?a:a!=="hide",o=Xe.lineAuthor[t];if(t==="showCommitHash")r="Show commit hash",n=a;else if(t==="authorDisplay"){let u=(l=i.lastShownAuthorDisplay)!=null?l:o;r="Show author "+(s?a:u),n=s?"hide":u}else if(t==="dateTimeFormatOptions"){let u=(c=i.lastShownDateTimeFormatOptions)!=null?c:o;r="Show "+(s?a:u),r+=r.contains("date")?"":" date",n=s?"hide":u}else pa(t);e.addItem(u=>u.setTitle(r).setSection("obs-git-line-author-configure").setChecked(s).onClick(f=>{var d,h;return(h=(d=Nc.plugin)==null?void 0:d.settingsTab)==null?void 0:h.lineAuthorSettingHandler(t,n)}))}function U3(t,e,r){r.setAttr(B3,JSON.stringify({hash:t.hash,isZeroCommit:t.isZeroCommit,isWaitingGutter:e}))}function dU(t){let e=t.getAttr(B3);return e?JSON.parse(e):void 0}m();function Mv(t,e){return t==="oldest"?oh(0,!1,e).color:oh(void 0,!0,e).color}function oh(t,e,r){let n=eh(r),i=Date.now()/1e3,a=t!=null?t:0,o=(e?0:i-a)/60/60/24,l=Math.pow(Math.clamp(o/n,0,1),1/2.3),c=hU(),u=r.colorNew,f=r.colorOld,d=c?.4:1,h=Fv(u.r,f.r,l)*d,p=Fv(u.g,f.g,l)*d,g=Fv(u.b,f.b,l)*d;return{color:`rgba(${h},${p},${g},${c?.75:.25})`,daysSinceCommit:o}}function Fv(t,e,r){return t+(e-t)*r}function hU(){var t;return((t=window.app)==null?void 0:t.getTheme())==="obsidian"}function G3(t){document.body.style.setProperty("--obs-git-gutter-text",t.textColorCss)}m();function z3(t,e,r){let n;for(let i=e;i<=r;i++){let a=t.hashPerLine[i],s=t.commits.get(a);(!n||s.isZeroCommit||pU(s,n))&&(n=s)}return n}function pU(t,e){var i,a,s,o;let r=(a=(i=t.author)==null?void 0:i.epochSeconds)!=null?a:0,n=(o=(s=e.author)==null?void 0:s.epochSeconds)!=null?o:0;return r>n}var V3="-",mU="+",gU=3,vU="*",yU=/\S/g,wU="%",Bo=class t extends Lv.GutterMarker{constructor(r){super();this.text=r}eq(r){return r instanceof t&&this.text===r.text}toDOM(){return document.createTextNode(this.text)}destroy(r){r&&(document.body.contains(r)||r.remove())}},Dv=class extends Lv.GutterMarker{constructor(r,n,i,a,s,o){super();this.lineAuthoring=r;this.startLine=n;this.endLine=i;this.key=a;this.settings=s;this.options=o;this.point=!1;this.elementClass="obs-git-blame-gutter"}eq(r){return this.key===(r==null?void 0:r.key)&&this.startLine===(r==null?void 0:r.startLine)&&this.endLine===(r==null?void 0:r.endLine)&&(this==null?void 0:this.options)===(r==null?void 0:r.options)}toDOM(){var r;return this.precomputedDomProvider=(r=this.precomputedDomProvider)!=null?r:this.computeDom(),this.precomputedDomProvider()}destroy(r){r&&(document.body.contains(r)||(No.delete(r),r.remove()))}computeDom(){let r=z3(this.lineAuthoring,this.startLine,this.endLine),n=r.isZeroCommit?"":this.renderNonZeroCommit(r);return!r.isZeroCommit&&this.options!=="waiting-for-result"?F3(this,n):n=this.adaptTextForFakeCommit(r,n,this.options),this.createHtmlNode(r,n,this.options==="waiting-for-result")}createHtmlNode(r,n,i){var c;let a=window.createDiv();a.innerText=n;let{color:s,daysSinceCommit:o}=oh((c=r==null?void 0:r.author)==null?void 0:c.epochSeconds,r==null?void 0:r.isZeroCommit,this.settings);a.style.backgroundColor=s,U3(r,i,a);function l(){let u=a.cloneNode(!0);return No.add(u),i||D3(o),u}return l}renderNonZeroCommit(r){let n=this.settings.showCommitHash?this.renderHash(r):"",i=this.settings.authorDisplay==="hide"?"":`${this.renderAuthorName(r,this.settings.authorDisplay)}`,a=this.settings.dateTimeFormatOptions==="hide"?"":`${this.renderAuthoringDate(r,this.settings.dateTimeFormatOptions,this.settings.dateTimeFormatCustomString,this.settings.dateTimeTimezone)}`;return[n,i,a].filter(o=>o.length>=1).join(" ")}renderHash(r){return r.hash.substring(0,6)}renderAuthorName(r,n){var o,l,c,u;let i=(l=(o=r==null?void 0:r.author)==null?void 0:o.name)!=null?l:"",a=i.split(" ").filter(f=>f.length>=1),s;switch(n){case"initials":s=a.map(f=>f[0].toUpperCase()).join("");break;case"first name":s=(c=a.first())!=null?c:V3;break;case"last name":s=(u=a.last())!=null?u:V3;break;case"full":s=i;break;default:return pa(n)}return s3(r==null?void 0:r.author,r==null?void 0:r.committer)||(s=s+vU),s}renderAuthoringDate(r,n,i,a){var c;let s="?";if(((c=r==null?void 0:r.author)==null?void 0:c.epochSeconds)===void 0)return s;let o;switch(n){case"date":o=fd;break;case"datetime":o=o0;break;case"custom":o=i;break;case"natural language":o=u=>{let f=u.diff((0,lh.moment)());return lh.moment.duration(f).humanize(!0)};break;default:return pa(n)}let l=lh.moment.unix(r.author.epochSeconds);switch(a){case"viewer-local":break;case"author-local":l=l.utcOffset(r.author.tz),typeof o=="string"&&(o+=" Z");break;case"utc0000":l=l.utc(),typeof o=="string"&&(o+="[Z]");break;default:return pa(a)}return typeof o=="string"?l.format(o):o(l)}adaptTextForFakeCommit(r,n,i){var l,c,u,f;let a=(c=(l=nh())==null?void 0:l.text)!=null?c:n,s=i!=="waiting-for-result"&&r.isZeroCommit?mU:wU;n=a.replace(yU,s);let o=(f=(u=Qr.get())==null?void 0:u.gutterSpacingFallbackLength)!=null?f:n.length;if(n=o3(n,o,s),i!=="waiting-for-result"&&r.isZeroCommit){let d=Math.min(o,gU);n=l3(n,o-d)}return n}};function ns(t,e,r,n,i,a){let s=W3.sha256.create();s.update(JSON.stringify(i)),s.update(`s${e}-e${r}-k${n}-o${a}`);let o=s.hex(),l=ih.get(o);if(l)return l;let c=new Dv(t,e,r,n,i,a);return ih.set(o,c),c}m();var q3=require("obsidian");function jv(){var e,r;let t=(r=(e=Qr.get())==null?void 0:e.gutterSpacingFallbackLength)!=null?r:Xe.lineAuthor.gutterSpacingFallbackLength;return new Bo(Array(t).fill("-").join(""))}function Nv(t){let{lineAuthoring:e,ageForInitialRender:r}=bU(t);return ns(e,1,1,"initialGutter"+r,t,"waiting-for-result")}function bU(t){var a;let e=(a=L3())!=null?a:eh(t)*.25,r=(0,q3.moment)().add(-e,"days"),n={name:"",epochSeconds:i3(r),tz:"+0000"},i={hash:"waiting-for-result",author:n,committer:n,isZeroCommit:!1};return{lineAuthoring:{hashPerLine:[void 0,"waiting-for-result"],commits:new Map([["waiting-for-result",i]])},ageForInitialRender:e}}m();function Y3(t,e){return ns({hashPerLine:[void 0,"000000"],commits:new Map([["000000",m3]])},1,1,t,e)}var Bv=new Bo(""),J3=(0,Z3.gutter)({class:"line-author-gutter-container",markers(t){let e=t.state.field(Lo,!1);return _U(t,e)},lineMarkerChange(t){let e=Qd(t.state.field(Lo));return Qd(t.startState.field(Lo))!==e},renderEmptyElements:!0,initialSpacer:t=>(X3(t),jv()),updateSpacer:(t,e)=>{var r,n;return X3(e.view),(n=(r=nh())==null?void 0:r.gutter)!=null?n:jv()}});function _U(t,e){let r=Qd(e),n=t.state.doc,i=new Map;for(let u=1;u<=n.lines;u++){let f=n.line(u).from,d=t.lineBlockAt(f).to;i.set(u,[f,d]),r.update([f,d,0])}let a=Qr.get();r.update("s"+Object.values(Qr).join(","));let s=r.hex(),o=ah.get(s);if(o)return o;let{result:l,allowCache:c}=xU(n,i,a,e);return c&&ah.set(s,l),l}function xU(t,e,r,n){let i=!0,a=t.lines,s=[];function o(f,d,h){return s.push(h.range(f,d))}let l=SU(a,n),c=t.length===0,u=t.iterLines(a,a+1).next().value==="";for(let f=1;f<=a;f++){let[d,h]=e.get(f),p=t.lineAt(h).number;if(c){o(d,h,Bv);continue}if(f===a&&u){o(d,h,Bv);continue}if(n===void 0){o(d,h,Nv(r)),i=!1;continue}let{key:g,la:v}=n;if(v==="untracked"){o(d,h,Y3(v,r));continue}let y=v.hashPerLine.length-1,b=l[f],E=l[p];if(E&&E>y&&o(d,h,Bv),b!==void 0&&gv(1,b,y)&&E!==void 0&&gv(1,E,y)){o(d,h,ns(v,b,E,g,r));continue}if(y<1){o(d,h,Nv(r)),i=!1;continue}let S=Math.clamp(b!=null?b:f,1,y),A=Math.clamp(E!=null?E:p,1,y);o(d,h,ns(v,S,A,g+"computing",r,"waiting-for-result"))}return{result:K3.RangeSet.of(s,!0),allowCache:i}}function SU(t,e){if(!(e!=null&&e.lineOffsetsFromUnsavedChanges))return Array.from(new Array(t+1),i=>i);let r=[void 0],n=0;for(let i=1;i<=t;i++){let a=e.lineOffsetsFromUnsavedChanges.get(i);n+=a!=null?a:0,r[i]=a===void 0?i-n:void 0}return r}function X3(t){t.dom.querySelectorAll(".cm-gutters").forEach(r=>{r!=null&&r.style&&(r.style.marginLeft||(r.style.marginLeft="unset"))})}var ch=class{constructor(e){this.plugin=e;this.lineAuthorings=new Map}async trackChanged(e){return this.trackChangedHelper(e).catch(r=>(console.warn("Git: Error in trackChanged."+r),Promise.reject(r)))}async trackChangedHelper(e){if(e){if(e.path===void 0){console.warn("Git: Attempted to track change of undefined filepath. Unforeseen situation.");return}return this.computeLineAuthorInfo(e.path)}}destroy(){this.lineAuthorings.clear(),Do.clear(),$3()}async computeLineAuthorInfo(e){let r=this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform().gitManager,n=await r.submoduleAwareHeadRevisonInContainingDirectory(e),i=await r.hashObject(e),a=C3(n,i,e);if(a!==void 0){if(!this.lineAuthorings.has(a)){let s=await r.blame(e,this.plugin.settings.lineAuthor.followMovement,this.plugin.settings.lineAuthor.ignoreWhitespace);this.lineAuthorings.set(a,s)}this.notifyComputationResultToSubscribers(e,a)}}notifyComputationResultToSubscribers(e,r){Do.ifFilepathDefinedTransformSubscribers(e,n=>n.forEach(i=>i.notifyLineAuthoring(r,this.lineAuthorings.get(r))))}},eM=Q3.Prec.high([I3,Lo,J3]);var uh=class{constructor(e){this.plg=e;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=e=>{if(!this.lineAuthorInfoProvider){console.warn("Git: undefined lineAuthorInfoProvider. Unexpected situation.");return}let r=e==null?void 0:e.view;!(r instanceof is.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.lineAuthorInfoProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions),M3(()=>this.plg.settings.lineAuthor,e=>{this.plg.settings.lineAuthor=e,this.plg.saveSettings()})}conditionallyActivateBySettings(){this.plg.settings.lineAuthor.show&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;G3(this.plg.settings.lineAuthor),this.lineAuthorInfoProvider=new ch(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),console.log(this.plg.manifest.name+": Enabled line authoring.")}catch(e){console.warn("Git: Error while loading line authoring feature.",e),this.deactivateFeature()}}deactivateFeature(){var e;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(e=this.lineAuthorInfoProvider)==null||e.destroy(),this.lineAuthorInfoProvider=void 0,console.log(this.plg.manifest.name+": Disabled line authoring.")}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&is.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof Ce?this.plg.gitManager:void 0}}refreshLineAuthorViews(){this.plg.settings.lineAuthor.show&&(this.deactivateFeature(),this.activateFeature())}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(eM),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let e of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(e);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.gutterContextMenuEvent=this.createGutterContextMenuHandler(),this.fileOpenEvent=this.createFileOpenEvent(),this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileModificationEvent=this.createVaultFileModificationHandler(),this.refreshOnCssChangeEvent=this.createCssRefreshHandler(),this.fileRenameEvent=this.createFileRenameEvent(),j3(),this.plg.registerEvent(this.gutterContextMenuEvent),this.plg.registerEvent(this.refreshOnCssChangeEvent),this.plg.registerEvent(this.fileOpenEvent),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileModificationEvent),this.plg.registerEvent(this.fileRenameEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.workspace.offref(this.fileOpenEvent),this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent),this.plg.app.workspace.offref(this.gutterContextMenuEvent)}createFileOpenEvent(){return this.plg.app.workspace.on("file-open",e=>{var r;return void((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(e).catch(console.error))})}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(e,r)=>{var n;return e instanceof is.TFile&&((n=this.lineAuthorInfoProvider)==null?void 0:n.trackChanged(e))})}createVaultFileModificationHandler(){return this.plg.app.vault.on("modify",e=>{var r;return e instanceof is.TFile&&((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(e))})}createCssRefreshHandler(){return this.plg.app.workspace.on("css-change",()=>this.refreshLineAuthorViews())}createGutterContextMenuHandler(){return this.plg.app.workspace.on("editor-menu",H3)}};m();var fh=class{constructor(e){this.plugin=e;this.tasks=[]}addTask(e,r){this.tasks.push({task:e,onFinished:r!=null?r:()=>{}}),this.tasks.length===1&&this.handleTask()}handleTask(){if(this.tasks.length>0){let e=this.tasks[0];e.task().then(r=>{e.onFinished(r),this.tasks.shift(),this.handleTask()},r=>{this.plugin.displayError(r),e.onFinished(void 0),this.tasks.shift(),this.handleTask()})}}clear(){this.tasks=[]}};m();var Fr=require("obsidian");var dh=class{constructor(e,r){this.statusBarEl=e;this.plugin=r;this.messages=[];this.base="obsidian-git-statusbar-";this.statusBarEl.setAttribute("data-tooltip-position","top"),r.registerEvent(r.app.workspace.on("obsidian-git:refreshed",()=>{this.refreshCommitTimestamp().catch(console.error)}))}displayMessage(e,r){this.messages.push({message:`Git: ${e.slice(0,100)}`,timeout:r}),this.display()}display(){this.messages.length>0&&!this.currentMessage?(this.currentMessage=this.messages.shift(),this.statusBarEl.addClass(this.base+"message"),this.statusBarEl.ariaLabel="",this.statusBarEl.setText(this.currentMessage.message),this.lastMessageTimestamp=Date.now()):this.currentMessage?Date.now()-this.lastMessageTimestamp>=this.currentMessage.timeout&&(this.currentMessage=null,this.lastMessageTimestamp=null):this.displayState()}displayState(){switch((this.statusBarEl.getText().length>3||!this.statusBarEl.hasChildNodes())&&(this.statusBarEl.empty(),this.conflictEl=this.statusBarEl.createDiv(),this.conflictEl.setAttribute("data-tooltip-position","top"),this.conflictEl.style.float="left",this.pausedEl=this.statusBarEl.createDiv(),this.pausedEl.setAttribute("data-tooltip-position","top"),this.pausedEl.style.float="left",this.iconEl=this.statusBarEl.createDiv(),this.iconEl.style.float="left",this.textEl=this.statusBarEl.createDiv(),this.textEl.style.float="right",this.textEl.style.marginLeft="5px"),this.plugin.localStorage.getConflict()?((0,Fr.setIcon)(this.conflictEl,"alert-circle"),this.conflictEl.ariaLabel="You have merge conflicts. Resolve them and commit afterwards.",this.conflictEl.style.marginRight="5px",this.conflictEl.addClass(this.base+"conflict")):(this.conflictEl.empty(),this.conflictEl.style.marginRight=""),this.plugin.localStorage.getPausedAutomatics()?((0,Fr.setIcon)(this.pausedEl,"pause-circle"),this.pausedEl.ariaLabel="Automatic routines are currently paused.",this.pausedEl.style.marginRight="5px",this.pausedEl.addClass(this.base+"paused")):(this.pausedEl.empty(),this.pausedEl.style.marginRight=""),this.plugin.state.gitAction){case 0:this.displayFromNow();break;case 1:this.statusBarEl.ariaLabel="Checking repository status...",(0,Fr.setIcon)(this.iconEl,"refresh-cw"),this.statusBarEl.addClass(this.base+"status");break;case 3:this.statusBarEl.ariaLabel="Adding files...",(0,Fr.setIcon)(this.iconEl,"archive"),this.statusBarEl.addClass(this.base+"add");break;case 4:this.statusBarEl.ariaLabel="Committing changes...",(0,Fr.setIcon)(this.iconEl,"git-commit"),this.statusBarEl.addClass(this.base+"commit");break;case 5:this.statusBarEl.ariaLabel="Pushing changes...",(0,Fr.setIcon)(this.iconEl,"upload"),this.statusBarEl.addClass(this.base+"push");break;case 2:this.statusBarEl.ariaLabel="Pulling changes...",(0,Fr.setIcon)(this.iconEl,"download"),this.statusBarEl.addClass(this.base+"pull");break;default:this.statusBarEl.ariaLabel="Failed on initialization!",(0,Fr.setIcon)(this.iconEl,"alert-triangle"),this.statusBarEl.addClass(this.base+"failed-init");break}}displayFromNow(){var n;let e=this.lastCommitTimestamp,r=this.plugin.state.offlineMode;if(e){let i=(0,Fr.moment)(e).fromNow();this.statusBarEl.ariaLabel=`${r?"Offline: ":""}Last Commit: ${i}`,(n=this.unPushedCommits)!=null&&n&&(this.statusBarEl.ariaLabel+=` +(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Fr.setIcon)(this.iconEl,"globe"):(0,Fr.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus&&this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};m();var ph=require("obsidian"),hh=class extends ph.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let n=(0,ph.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${n}: ${r}`,`${r}: ${n}`]}renderSuggestion(r,n){n.innerText=r}onChooseSuggestion(r,n){this.resolve&&this.resolve(r)}};m();var tM=require("obsidian"),Bc=class{constructor(e){this.plugin=e}saveLastAuto(e,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(e.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(e.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(e.toString())}loadLastAuto(){var e,r,n;return{backup:new Date((e=this.plugin.localStorage.getLastAutoBackup())!=null?e:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((n=this.plugin.localStorage.getLastAutoPush())!=null?n:"")}}async init(){await this.setUpAutoCommitAndSync();let e=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=this.diff(this.plugin.settings.autoPushInterval,e.push);this.startAutoPush(r)}if(this.plugin.settings.autoPullInterval>0){let r=this.diff(this.plugin.settings.autoPullInterval,e.pull);this.startAutoPull(r)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...e){this.plugin.localStorage.getPausedAutomatics()||(e.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),e.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),e.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval)))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let e=await this.plugin.gitManager.getLastCommitTime();e&&this.saveLastAuto(e,"backup")}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let e=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=this.diff(this.plugin.settings.autoSaveInterval,e.backup);this.startAutoCommitAndSync(r)}}}startAutoCommitAndSync(e){let r=(e!=null?e:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?e===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,tM.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(async()=>{if(this.plugin.settings.setLastSaveToLastCommit){let r=await this.plugin.gitManager.getLastCommitTime();if(r){this.saveLastAuto(r,"backup");let n=this.diff(this.plugin.settings.autoSaveInterval,r);if(n>0)return this.startAutoCommitAndSync(n),!1}}let e=this.plugin.settings.autoCommitOnlyStaged;return this.plugin.settings.differentIntervalCommitAndPush?await this.plugin.commit({fromAuto:!0,onlyStaged:e}):await this.plugin.commitAndSync({fromAutoBackup:!0,onlyStaged:e}),!0},e=>{e!==!1&&(this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync())})}startAutoPull(e){let r=(e!=null?e:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>this.doAutoPull(),r)}doAutoPull(){this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote(),()=>{this.saveLastAuto(new Date,"pull"),this.startAutoPull()})}startAutoPush(e){let r=(e!=null?e:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>this.doAutoPush(),r)}doAutoPush(){this.plugin.promiseQueue.addTask(()=>this.plugin.push(),()=>{this.saveLastAuto(new Date,"push"),this.startAutoPush()})}clearAutoCommitAndSync(){var r;let e=!1;return this.timeoutIDCommitAndSync&&(window.clearTimeout(this.timeoutIDCommitAndSync),this.timeoutIDCommitAndSync=void 0,e=!0),this.plugin.autoCommitDebouncer&&((r=this.plugin.autoCommitDebouncer)==null||r.cancel(),this.plugin.autoCommitDebouncer=void 0,e=!0),e}clearAutoPull(){return this.timeoutIDPull?(window.clearTimeout(this.timeoutIDPull),this.timeoutIDPull=void 0,!0):!1}clearAutoPush(){return this.timeoutIDPush?(window.clearTimeout(this.timeoutIDPush),this.timeoutIDPush=void 0,!0):!1}diff(e,r){let i=e-Math.round((new Date().getTime()-r.getTime())/1e3/60);return Math.max(0,i)}};m();var bn=require("obsidian");m();var Hc=require("obsidian");async function rM(t,e,r){let n=await iM(e,r);if(n.result==="failure"){new Hc.Notice(n.reason);return}let{isGitHub:i,branch:a,repo:s,user:o,filePath:l}=n;if(i){let c=t.getCursor("from").line+1,u=t.getCursor("to").line+1;c===u?window.open(`https://github.com/${o}/${s}/blob/${a}/${l}?plain=1#L${c}`):window.open(`https://github.com/${o}/${s}/blob/${a}/${l}?plain=1#L${c}-L${u}`)}else new Hc.Notice("It seems like you are not using GitHub")}async function nM(t,e){let r=await iM(t,e);if(r.result==="failure"){new Hc.Notice(r.reason);return}let{isGitHub:n,branch:i,repo:a,user:s,filePath:o}=r;n?window.open(`https://github.com/${s}/${a}/commits/${i}/${o}`):new Hc.Notice("It seems like you are not using GitHub")}async function iM(t,e){let r=await e.branchInfo(),n=r.tracking,i=r.current,a,s=e.getRelativeRepoPath(t.path);if(e instanceof Ce){let l=await e.getSubmoduleOfFile(e.getRelativeRepoPath(t.path));if(l){s=l.relativeFilepath;let c=await e.git.cwd({path:l.submodule,root:!1}).status();if(n=c.tracking||void 0,i=c.current||void 0,n){let u=n.substring(0,n.indexOf("/")),f=await e.git.cwd({path:l.submodule,root:!1}).getConfig(`remote.${u}.url`,"local");if(f.value!=null)a=f.value;else return{result:"failure",reason:"Failed to get remote url of submodule"}}}}if(n==null)return{result:"failure",reason:"Remote branch is not configured"};if(i==null)return{result:"failure",reason:"Failed to get current branch name"};if(a==null){let l=n.substring(0,n.indexOf("/"));if(a=await e.getConfig(`remote.${l}.url`),a==null)return{result:"failure",reason:"Failed to get remote url"}}let o=a.match(/(?:^https:\/\/github\.com\/(.+)\/(.+?)(?:\.git)?$)|(?:^[a-zA-Z]+@github\.com:(.+)\/(.+?)(?:\.git)?$)/);if(o==null)return{result:"failure",reason:"Could not parse remote url"};{let[l,c,u,f,d]=o;return{result:"success",isGitHub:!!l,repo:u||d,user:c||f,branch:i,filePath:s}}}m();var aM=require("obsidian"),mh=class extends aM.FuzzySuggestModal{constructor(e,r){super(e.app),this.plugin=e,this.changedFiles=r,this.setPlaceholder("Not supported files will be opened by default app!")}getItems(){return this.changedFiles}getItemText(e){if(e.index=="U"&&e.workingDir=="U")return`Untracked | ${e.vaultPath}`;let r="",n="";return e.workingDir!=" "&&(r=`Working Dir: ${e.workingDir} `),e.index!=" "&&(n=`Index: ${e.index}`),`${r}${n} | ${e.vaultPath}`}onChooseItem(e,r){this.plugin.app.metadataCache.getFirstLinkpathDest(e.vaultPath,"")==null?this.app.openWithDefaultApp(e.vaultPath):this.plugin.app.workspace.openLinkText(e.vaultPath,"/")}};m();var sM=require("obsidian"),gh=class extends sM.Modal{constructor(r,n){super(r);this.content=n;this.resolve=null}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText("Edit .gitignore");let i=r.createDiv(),a=i.createEl("textarea",{text:this.content,cls:["obsidian-git-textarea"],attr:{rows:10,cols:30,wrap:"off"}});i.createEl("button",{cls:["mod-cta","obsidian-git-center-button"],text:"Save"}).addEventListener("click",()=>{this.resolve(a.value),this.close()})}onClose(){let{contentEl:r}=this;r.empty(),this.resolve&&this.resolve(void 0)}};function oM(t){let e=t.app;t.addCommand({id:"edit-gitignore",name:"Edit .gitignore",callback:async()=>{let r=t.gitManager.getRelativeVaultPath(".gitignore");await e.vault.adapter.exists(r)||await e.vault.adapter.write(r,"");let n=await e.vault.adapter.read(r),a=await new gh(e,n).openAndGetReslt();a!==void 0&&(await e.vault.adapter.write(r,a),await t.refresh())}}),t.addCommand({id:"open-git-view",name:"Open source control view",callback:async()=>{var i;let r=e.workspace.getLeavesOfType(Ft.type),n;r.length===0?(n=(i=e.workspace.getRightLeaf(!1))!=null?i:e.workspace.getLeaf(),await n.setViewState({type:Ft.type})):n=r.first(),await e.workspace.revealLeaf(n),e.workspace.trigger("obsidian-git:refresh")}}),t.addCommand({id:"open-history-view",name:"Open history view",callback:async()=>{var i;let r=e.workspace.getLeavesOfType(Zr.type),n;r.length===0?(n=(i=e.workspace.getRightLeaf(!1))!=null?i:e.workspace.getLeaf(),await n.setViewState({type:Zr.type})):n=r.first(),await e.workspace.revealLeaf(n),e.workspace.trigger("obsidian-git:refresh")}}),t.addCommand({id:"open-diff-view",name:"Open diff view",checkCallback:r=>{let n=e.workspace.getActiveFile();if(r)return n!==null;{let i=t.gitManager.getRelativeRepoPath(n.path,!0);t.tools.openDiff({aFile:i,aRef:""})}}}),t.addCommand({id:"view-file-on-github",name:"Open file on GitHub",editorCallback:(r,{file:n})=>{if(n)return rM(r,n,t.gitManager)}}),t.addCommand({id:"view-history-on-github",name:"Open file history on GitHub",editorCallback:(r,{file:n})=>{if(n)return nM(n,t.gitManager)}}),t.addCommand({id:"pull",name:"Pull",callback:()=>t.promiseQueue.addTask(()=>t.pullChangesFromRemote())}),t.addCommand({id:"fetch",name:"Fetch",callback:()=>t.promiseQueue.addTask(()=>t.fetch())}),t.addCommand({id:"switch-to-remote-branch",name:"Switch to remote branch",callback:()=>t.promiseQueue.addTask(()=>t.switchRemoteBranch())}),t.addCommand({id:"add-to-gitignore",name:"Add file to .gitignore",checkCallback:r=>{let n=e.workspace.getActiveFile();if(r)return n!==null;t.addFileToGitignore(n.path,n instanceof bn.TFolder).catch(i=>t.displayError(i))}}),t.addCommand({id:"push",name:"Commit-and-sync",callback:()=>t.promiseQueue.addTask(()=>t.commitAndSync({fromAutoBackup:!1}))}),t.addCommand({id:"backup-and-close",name:"Commit-and-sync and then close Obsidian",callback:()=>t.promiseQueue.addTask(async()=>{await t.commitAndSync({fromAutoBackup:!1}),window.close()})}),t.addCommand({id:"commit-push-specified-message",name:"Commit-and-sync with specific message",callback:()=>t.promiseQueue.addTask(()=>t.commitAndSync({fromAutoBackup:!1,requestCustomMessage:!0}))}),t.addCommand({id:"commit",name:"Commit all changes",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1}))}),t.addCommand({id:"commit-specified-message",name:"Commit all changes with specific message",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0}))}),t.addCommand({id:"commit-smart",name:"Commit",callback:()=>t.promiseQueue.addTask(async()=>{let n=(await t.updateCachedStatus()).staged.length>0;return t.commit({fromAuto:!1,requestCustomMessage:!1,onlyStaged:n})})}),t.addCommand({id:"commit-staged",name:"Commit staged",checkCallback:function(r){if(r)return!1;t.promiseQueue.addTask(async()=>t.commit({fromAuto:!1,requestCustomMessage:!1}))}}),bn.Platform.isDesktopApp&&t.addCommand({id:"commit-amend-staged-specified-message",name:"Amend staged",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0,amend:!0}))}),t.addCommand({id:"commit-smart-specified-message",name:"Commit with specific message",callback:()=>t.promiseQueue.addTask(async()=>{let n=(await t.updateCachedStatus()).staged.length>0;return t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:n})})}),t.addCommand({id:"commit-staged-specified-message",name:"Commit staged with specific message",checkCallback:function(r){return r?!1:t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0}))}}),t.addCommand({id:"push2",name:"Push",callback:()=>t.promiseQueue.addTask(()=>t.push())}),t.addCommand({id:"stage-current-file",name:"Stage current file",checkCallback:r=>{let n=e.workspace.getActiveFile();if(r)return n!==null;t.promiseQueue.addTask(()=>t.stageFile(n))}}),t.addCommand({id:"unstage-current-file",name:"Unstage current file",checkCallback:r=>{let n=e.workspace.getActiveFile();if(r)return n!==null;t.promiseQueue.addTask(()=>t.unstageFile(n))}}),t.addCommand({id:"edit-remotes",name:"Edit remotes",callback:()=>t.editRemotes().catch(r=>t.displayError(r))}),t.addCommand({id:"remove-remote",name:"Remove remote",callback:()=>t.removeRemote().catch(r=>t.displayError(r))}),t.addCommand({id:"set-upstream-branch",name:"Set upstream branch",callback:()=>t.setUpstreamBranch().catch(r=>t.displayError(r))}),t.addCommand({id:"delete-repo",name:"CAUTION: Delete repository",callback:async()=>{await e.vault.adapter.exists(`${t.settings.basePath}/.git`)?await new ze(t,{options:["NO","YES"],placeholder:"Do you really want to delete the repository (.git directory)? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&(await e.vault.adapter.rmdir(`${t.settings.basePath}/.git`,!0),new bn.Notice("Successfully deleted repository. Reloading plugin..."),t.unloadPlugin(),await t.init({fromReload:!0})):new bn.Notice("No repository found")}}),t.addCommand({id:"init-repo",name:"Initialize a new repo",callback:()=>t.createNewRepo().catch(r=>t.displayError(r))}),t.addCommand({id:"clone-repo",name:"Clone an existing remote repo",callback:()=>t.cloneNewRepo().catch(r=>t.displayError(r))}),t.addCommand({id:"list-changed-files",name:"List changed files",callback:async()=>{if(await t.isAllInitialized())try{let r=await t.updateCachedStatus();if(r.changed.length+r.staged.length>500){t.displayError("Too many changes to display");return}new mh(t,r.all).open()}catch(r){t.displayError(r)}}}),t.addCommand({id:"switch-branch",name:"Switch branch",callback:()=>{t.switchBranch().catch(r=>t.displayError(r))}}),t.addCommand({id:"create-branch",name:"Create new branch",callback:()=>{t.createBranch().catch(r=>t.displayError(r))}}),t.addCommand({id:"delete-branch",name:"Delete branch",callback:()=>{t.deleteBranch().catch(r=>t.displayError(r))}}),t.addCommand({id:"discard-all",name:"CAUTION: Discard all changes",callback:async()=>{let r=await t.discardAll();switch(r){case"discard":new bn.Notice("Discarded all changes in tracked files.");break;case"delete":new bn.Notice("Discarded all files.");break;case!1:break;default:Ud(r)}}}),t.addCommand({id:"pause-automatic-routines",name:"Pause/Resume automatic routines",callback:()=>{let r=!t.localStorage.getPausedAutomatics();t.localStorage.setPausedAutomatics(r),r?(t.automaticsManager.unload(),new bn.Notice("Paused automatic routines.")):(t.automaticsManager.reload("commit","push","pull"),new bn.Notice("Resumed automatic routines."))}}),t.addCommand({id:"raw-command",name:"Raw command",checkCallback:r=>{let n=t.gitManager;if(r)return n instanceof Ce;t.tools.runRawCommand().catch(i=>t.displayError(i))}}),t.addCommand({id:"toggle-line-author-info",name:"Toggle line author information",callback:()=>{var r;return(r=t.settingsTab)==null?void 0:r.configureLineAuthorShowStatus(!t.settings.lineAuthor.show)}})}m();var vh=class{constructor(e){this.plugin=e;this.prefix=this.plugin.manifest.id+":",this.app=e.app}migrate(){let e=["password","hostname","conflict","lastAutoPull","lastAutoBackup","lastAutoPush","gitPath","pluginDisabled"];for(let r of e){let n=localStorage.getItem(this.prefix+r);this.app.loadLocalStorage(this.prefix+r)==null&&n!=null&&n!=null&&(this.app.saveLocalStorage(this.prefix+r,n),localStorage.removeItem(this.prefix+r))}}getPassword(){return this.app.loadLocalStorage(this.prefix+"password")}setPassword(e){return this.app.saveLocalStorage(this.prefix+"password",e)}getUsername(){return this.app.loadLocalStorage(this.prefix+"username")}setUsername(e){return this.app.saveLocalStorage(this.prefix+"username",e)}getHostname(){return this.app.loadLocalStorage(this.prefix+"hostname")}setHostname(e){return this.app.saveLocalStorage(this.prefix+"hostname",e)}getConflict(){return this.app.loadLocalStorage(this.prefix+"conflict")=="true"}setConflict(e){return this.app.saveLocalStorage(this.prefix+"conflict",`${e}`)}getLastAutoPull(){return this.app.loadLocalStorage(this.prefix+"lastAutoPull")}setLastAutoPull(e){return this.app.saveLocalStorage(this.prefix+"lastAutoPull",e)}getLastAutoBackup(){return this.app.loadLocalStorage(this.prefix+"lastAutoBackup")}setLastAutoBackup(e){return this.app.saveLocalStorage(this.prefix+"lastAutoBackup",e)}getLastAutoPush(){return this.app.loadLocalStorage(this.prefix+"lastAutoPush")}setLastAutoPush(e){return this.app.saveLocalStorage(this.prefix+"lastAutoPush",e)}getGitPath(){return this.app.loadLocalStorage(this.prefix+"gitPath")}setGitPath(e){return this.app.saveLocalStorage(this.prefix+"gitPath",e)}getPATHPaths(){var e,r;return(r=(e=this.app.loadLocalStorage(this.prefix+"PATHPaths"))==null?void 0:e.split(":"))!=null?r:[]}setPATHPaths(e){return this.app.saveLocalStorage(this.prefix+"PATHPaths",e.join(":"))}getEnvVars(){var e;return JSON.parse((e=this.app.loadLocalStorage(this.prefix+"envVars"))!=null?e:"[]")}setEnvVars(e){return this.app.saveLocalStorage(this.prefix+"envVars",JSON.stringify(e))}getPluginDisabled(){return this.app.loadLocalStorage(this.prefix+"pluginDisabled")=="true"}setPluginDisabled(e){return this.app.saveLocalStorage(this.prefix+"pluginDisabled",`${e}`)}getPausedAutomatics(){return this.app.loadLocalStorage(this.prefix+"pausedAutomatics")=="true"}setPausedAutomatics(e){return this.app.saveLocalStorage(this.prefix+"pausedAutomatics",`${e}`)}};m();var Ho=require("obsidian");var Uc=class{constructor(e){this.plugin=e}async hasTooBigFiles(e){let r=await this.plugin.gitManager.branchInfo(),n=r.tracking?ki(r.tracking)[0]:null;if(!n)return!1;let i=await this.plugin.gitManager.getRemoteUrl(n);if(i!=null&&i.includes("github.com")){let a=[],s=this.plugin.gitManager;for(let o of e){let l=this.plugin.app.vault.getAbstractFileByPath(o.vaultPath),c=!1;if(l instanceof Ho.TFile)l.stat.size>=1e8&&(c=!0);else{let u=await this.plugin.app.vault.adapter.stat(o.vaultPath);u&&u.size>=1e8&&(c=!0)}if(c){let u=!1;s instanceof Ce&&(u=await s.isFileTrackedByLFS(o.path)),u||a.push(o)}}if(a.length>0)return this.plugin.displayError(`Aborted commit, because the following files are too big: - ${a.map(o=>o.vaultPath).join(` - `)} -Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(t){t!==void 0&&await this.plugin.app.vault.adapter.write(Fs,t);let r=!1;this.plugin.app.workspace.iterateAllLeaves(n=>{n.getDisplayText()!=""&&Fs.startsWith(n.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(Fs,"/",!0)}openDiff({aFile:t,bFile:r,aRef:n,bRef:i,event:a}){var l,c;let s=this.plugin.settings.diffStyle;eo.Platform.isMobileApp&&(s="git_unified");let o={aFile:t,bFile:r!=null?r:t,aRef:n,bRef:i};s=="split"?(l=nn(this.plugin.app,a))==null||l.setViewState({type:ki.type,active:!0,state:o}):s=="git_unified"&&((c=nn(this.plugin.app,a))==null||c.setViewState({type:Ti.type,active:!0,state:o}))}async runRawCommand(){let t=this.plugin.gitManager;if(!(t instanceof Ee))return;let n=await new $e(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();n!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let i=new eo.Notice(`Running '${n}'...`,999999);try{let a=await t.rawCommand(n);a?(i.setMessage(a),window.setTimeout(()=>i.hide(),5e3)):i.hide()}catch(a){throw i.hide(),a}})}};g();g();g();g();var He;(function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"})(He||(He={}));var pC={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},mC={LINES:"lines",WORDS:"words",NONE:"none"},gC={WORD:"word",CHAR:"char"},Ta;(function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"})(Ta||(Ta={}));g();var Sj=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],Ej=RegExp("["+Sj.join("\\")+"]","g");function vC(e){return e.replace(Ej,"\\$&")}function g0(e){return e&&e.replace(/\\/g,"/")}function yC(e){let t,r,n,i=0;for(t=0,n=e.length;t1?r[r.length-1]:t}function bC(e,t){return t.reduce((r,n)=>r||e.startsWith(n),!1)}var _C=["a/","b/","i/","w/","c/","o/"];function Li(e,t,r){let n=r!==void 0?[..._C,r]:_C,i=t?new RegExp(`^${vC(t)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,a=""]=i.exec(e)||[],s=n.find(l=>a.indexOf(l)===0);return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function Aj(e,t){return Li(e,"---",t)}function kj(e,t){return Li(e,"+++",t)}function xC(e,t={}){let r=[],n=null,i=null,a=null,s=null,o=null,l=null,c=null,u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,m=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,b=/^copy to "?(.+)"?/,x=/^rename from "?(.+)"?/,E=/^rename to "?(.+)"?/,_=/^similarity index (\d+)%/,k=/^dissimilarity index (\d+)%/,w=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,A=/^Binary files (.*) and (.*) differ/,S=/^GIT binary patch/,T=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,P=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,I=/^new file mode (\d{6})/,N=/^deleted file mode (\d{6}),(\d{6})/,L=e.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,` +Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(e){e!==void 0&&await this.plugin.app.vault.adapter.write(To,e);let r=!1;this.plugin.app.workspace.iterateAllLeaves(n=>{n.getDisplayText()!=""&&To.startsWith(n.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(To,"/",!0)}openDiff({aFile:e,bFile:r,aRef:n,bRef:i,event:a}){var l,c;let s=this.plugin.settings.diffStyle;Ho.Platform.isMobileApp&&(s="git_unified");let o={aFile:e,bFile:r!=null?r:e,aRef:n,bRef:i};s=="split"?(l=vn(this.plugin.app,a))==null||l.setViewState({type:ca.type,active:!0,state:o}):s=="git_unified"&&((c=vn(this.plugin.app,a))==null||c.setViewState({type:ua.type,active:!0,state:o}))}async runRawCommand(){let e=this.plugin.gitManager;if(!(e instanceof Ce))return;let n=await new ze(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();n!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let i=new Ho.Notice(`Running '${n}'...`,999999);try{let a=await e.rawCommand(n);a?(i.setMessage(a),window.setTimeout(()=>i.hide(),5e3)):i.hide()}catch(a){throw i.hide(),a}})}};m();m();m();m();var Ke;(function(t){t.INSERT="insert",t.DELETE="delete",t.CONTEXT="context"})(Ke||(Ke={}));var lM={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},cM={LINES:"lines",WORDS:"words",NONE:"none"},uM={WORD:"word",CHAR:"char"},as;(function(t){t.AUTO="auto",t.DARK="dark",t.LIGHT="light"})(as||(as={}));m();var EU=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],AU=RegExp("["+EU.join("\\")+"]","g");function fM(t){return t.replace(AU,"\\$&")}function Hv(t){return t&&t.replace(/\\/g,"/")}function dM(t){let e,r,n,i=0;for(e=0,n=t.length;e1?r[r.length-1]:e}function pM(t,e){return e.reduce((r,n)=>r||t.startsWith(n),!1)}var mM=["a/","b/","i/","w/","c/","o/"];function ga(t,e,r){let n=r!==void 0?[...mM,r]:mM,i=e?new RegExp(`^${fM(e)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,a=""]=i.exec(t)||[],s=n.find(l=>a.indexOf(l)===0);return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function kU(t,e){return ga(t,"---",e)}function TU(t,e){return ga(t,"+++",e)}function gM(t,e={}){let r=[],n=null,i=null,a=null,s=null,o=null,l=null,c=null,u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,g=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,b=/^copy to "?(.+)"?/,E=/^rename from "?(.+)"?/,S=/^rename to "?(.+)"?/,A=/^similarity index (\d+)%/,k=/^dissimilarity index (\d+)%/,w=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,x=/^Binary files (.*) and (.*) differ/,_=/^GIT binary patch/,T=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,C=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,I=/^new file mode (\d{6})/,L=/^deleted file mode (\d{6}),(\d{6})/,F=t.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,` `).split(` -`);function ee(){i!==null&&n!==null&&(n.blocks.push(i),i=null)}function fe(){n!==null&&(!n.oldName&&l!==null&&(n.oldName=l),!n.newName&&c!==null&&(n.newName=c),n.newName&&(r.push(n),n=null)),l=null,c=null}function J(){ee(),fe(),n={blocks:[],deletedLines:0,addedLines:0}}function Q(z){ee();let Y;n!==null&&((Y=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(z))?(n.isCombined=!1,a=parseInt(Y[1],10),o=parseInt(Y[2],10)):(Y=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(z))?(n.isCombined=!0,a=parseInt(Y[1],10),s=parseInt(Y[2],10),o=parseInt(Y[3],10)):(z.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),a=0,o=0,n.isCombined=!1)),i={lines:[],oldStartLine:a,oldStartLine2:s,newStartLine:o,header:z}}function Pe(z){if(n===null||i===null||a===null||o===null)return;let Y={content:z},O=n.isCombined?["+ "," +","++"]:["+"],he=n.isCombined?["- "," -","--"]:["-"];bC(z,O)?(n.addedLines++,Y.type=He.INSERT,Y.oldNumber=void 0,Y.newNumber=o++):bC(z,he)?(n.deletedLines++,Y.type=He.DELETE,Y.oldNumber=a++,Y.newNumber=void 0):(Y.type=He.CONTEXT,Y.oldNumber=a++,Y.newNumber=o++),i.lines.push(Y)}function ge(z,Y){let O=Y;for(;O{if(!z||z.startsWith("*"))return;let O,he=L[Y-1],ze=L[Y+1],gt=L[Y+2];if(z.startsWith("diff --git")||z.startsWith("diff --combined")){if(J(),(O=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(z))&&(l=Li(O[1],void 0,t.dstPrefix),c=Li(O[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isGitDiff=!0;return}if(z.startsWith("Binary files")&&!(n!=null&&n.isGitDiff)){if(J(),(O=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(z))&&(l=Li(O[1],void 0,t.dstPrefix),c=Li(O[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isBinary=!0;return}if((!n||!n.isGitDiff&&n&&z.startsWith(u)&&ze.startsWith(f)&>.startsWith(d))&&J(),n!=null&&n.isTooBig)return;if(n&&(typeof t.diffMaxChanges=="number"&&n.addedLines+n.deletedLines>t.diffMaxChanges||typeof t.diffMaxLineLength=="number"&&z.length>t.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;let ct=typeof t.diffTooBigMessage=="function"?t.diffTooBigMessage(r.length):"Diff too big to be displayed";Q(ct);return}if(z.startsWith(u)&&ze.startsWith(f)||z.startsWith(f)&&he.startsWith(u)){if(n&&!n.oldName&&z.startsWith("--- ")&&(O=Aj(z,t.srcPrefix))){n.oldName=O,n.language=wC(n.oldName,n.language);return}if(n&&!n.newName&&z.startsWith("+++ ")&&(O=kj(z,t.dstPrefix))){n.newName=O,n.language=wC(n.newName,n.language);return}}if(n&&(z.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i)){Q(z);return}if(i&&(z.startsWith("+")||z.startsWith("-")||z.startsWith(" "))){Pe(z);return}let Re=!ge(z,Y);if(n===null)throw new Error("Where is my file !!!");(O=h.exec(z))?n.oldMode=O[1]:(O=p.exec(z))?n.newMode=O[1]:(O=m.exec(z))?(n.deletedFileMode=O[1],n.isDeleted=!0):(O=v.exec(z))?(n.newFileMode=O[1],n.isNew=!0):(O=y.exec(z))?(Re&&(n.oldName=O[1]),n.isCopy=!0):(O=b.exec(z))?(Re&&(n.newName=O[1]),n.isCopy=!0):(O=x.exec(z))?(Re&&(n.oldName=O[1]),n.isRename=!0):(O=E.exec(z))?(Re&&(n.newName=O[1]),n.isRename=!0):(O=A.exec(z))?(n.isBinary=!0,n.oldName=Li(O[1],void 0,t.srcPrefix),n.newName=Li(O[2],void 0,t.dstPrefix),Q("Binary file")):S.test(z)?(n.isBinary=!0,Q(z)):(O=_.exec(z))?n.unchangedPercentage=parseInt(O[1],10):(O=k.exec(z))?n.changedPercentage=parseInt(O[1],10):(O=w.exec(z))?(n.checksumBefore=O[1],n.checksumAfter=O[2],O[3]&&(n.mode=O[3])):(O=T.exec(z))?(n.checksumBefore=[O[2],O[3]],n.checksumAfter=O[1]):(O=P.exec(z))?(n.oldMode=[O[2],O[3]],n.newMode=O[1]):(O=I.exec(z))?(n.newFileMode=O[1],n.isNew=!0):(O=N.exec(z))&&(n.deletedFileMode=O[1],n.isDeleted=!0)}),ee(),fe(),r}g();g();g();function Qn(){}Qn.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var a=this;function s(m){return i?(setTimeout(function(){i(void 0,m)},0),!0):m}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var o=r.length,l=t.length,c=1,u=o+l;n.maxEditLength&&(u=Math.min(u,n.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=o&&d+1>=l)return s([{value:this.join(r),count:r.length}]);function h(){for(var m=-1*c;m<=c;m+=2){var v=void 0,y=f[m-1],b=f[m+1],x=(b?b.newPos:0)-m;y&&(f[m-1]=void 0);var E=y&&y.newPos+1=o&&x+1>=l)return s(Cj(a,v.components,r,t,a.useLongestToken));f[m]=v}c++}if(i)(function m(){setTimeout(function(){if(c>u)return i();h()||m()},0)})();else for(;c<=u;){var p=h();if(p)return p}},pushComponent:function(t,r,n){var i=t[t.length-1];i&&i.added===r&&i.removed===n?t[t.length-1]={count:i.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,i){for(var a=r.length,s=n.length,o=t.newPos,l=o-i,c=0;o+1h.length?m:h}),c.value=e.join(u)}else c.value=e.join(r.slice(o,o+c.count));o+=c.count,c.added||(l+=c.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function Pj(e){return{newPos:e.newPos,components:e.components.slice(0)}}var Rj=new Qn;function AC(e,t,r){return Rj.diff(e,t,r)}var SC=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,EC=/\S/,w0=new Qn;w0.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!EC.test(e)&&!EC.test(t)};w0.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r{let n=e(t).trim(),i=e(r).trim();return $j(n,i)/(n.length+i.length)}}function ro(e){function t(n,i,a=new Map){let s=1/0,o;for(let l=0;l0||o.indexB>0)&&(x=v.concat(x)),(n.length>d||i.length>h)&&(x=x.concat(b)),x}return r}var Tt={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},Ca={matching:mC.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:gC.WORD,colorScheme:Ta.LIGHT},Pn="/",CC=to(e=>e.value),Lj=ro(CC);function _0(e){return e.indexOf("dev/null")!==-1}function Dj(e){return e.replace(/(]*>((.|\n)*?)<\/ins>)/g,"")}function Nj(e){return e.replace(/(]*>((.|\n)*?)<\/del>)/g,"")}function no(e){switch(e){case He.CONTEXT:return Tt.CONTEXT;case He.INSERT:return Tt.INSERTS;case He.DELETE:return Tt.DELETES}}function io(e){switch(e){case Ta.DARK:return"d2h-dark-color-scheme";case Ta.AUTO:return"d2h-auto-color-scheme";case Ta.LIGHT:default:return"d2h-light-color-scheme"}}function Bj(e){return e?2:1}function Di(e){return e.slice(0).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function jr(e,t,r=!0){let n=Bj(t);return{prefix:e.substring(0,n),content:r?Di(e.substring(n)):e.substring(n)}}function Pa(e){let t=g0(e.oldName),r=g0(e.newName);if(t!==r&&!_0(t)&&!_0(r)){let n=[],i=[],a=t.split(Pn),s=r.split(Pn),o=a.length,l=s.length,c=0,u=o-1,f=l-1;for(;cc&&f>c&&a[u]===s[f];)i.unshift(s[f]),u-=1,f-=1;let d=n.join(Pn),h=i.join(Pn),p=a.slice(c,u+1).join(Pn),m=s.slice(c,f+1).join(Pn);return d.length&&h.length?d+Pn+"{"+p+" \u2192 "+m+"}"+Pn+h:d.length?d+Pn+"{"+p+" \u2192 "+m+"}":h.length?"{"+p+" \u2192 "+m+"}"+Pn+h:t+" \u2192 "+r}else return _0(r)?t:r}function ao(e){return`d2h-${yC(Pa(e)).toString().slice(-6)}`}function so(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function fd(e,t,r,n={}){let{matching:i,maxLineLengthHighlight:a,matchWordsThreshold:s,diffStyle:o}=Object.assign(Object.assign({},Ca),n),l=jr(e,r,!1),c=jr(t,r,!1);if(l.content.length>a||c.content.length>a)return{oldLine:{prefix:l.prefix,content:Di(l.content)},newLine:{prefix:c.prefix,content:Di(c.content)}};let u=o==="char"?AC(l.content,c.content):kC(l.content,c.content),f=[];if(o==="word"&&i==="words"){let h=u.filter(v=>v.removed),p=u.filter(v=>v.added);Lj(p,h).forEach(v=>{v[0].length===1&&v[1].length===1&&CC(v[0][0],v[1][0]){let m=p.added?"ins":p.removed?"del":null,v=f.indexOf(p)>-1?' class="d2h-change"':"",y=Di(p.value);return m!==null?`${h}<${m}${v}>${y}`:`${h}${y}`},"");return{oldLine:{prefix:l.prefix,content:Dj(d)},newLine:{prefix:c.prefix,content:Nj(d)}}}var PC="file-summary",jj="icon",Hj={colorScheme:Ca.colorScheme},dd=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},Hj),r)}render(t){let r=t.map(n=>this.hoganUtils.render(PC,"line",{fileHtmlId:ao(n),oldName:n.oldName,newName:n.newName,fileName:Pa(n),deletedLines:"-"+n.deletedLines,addedLines:"+"+n.addedLines},{fileIcon:this.hoganUtils.template(jj,so(n))})).join(` -`);return this.hoganUtils.render(PC,"wrapper",{colorScheme:io(this.config.colorScheme),filesNumber:t.length,files:r})}};g();var S0=Object.assign(Object.assign({},Ca),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),rc="generic",RC="line-by-line",Uj="icon",Gj="tag",nc=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},S0),r)}render(t){let r=t.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(` -`);return this.hoganUtils.render(rc,"wrapper",{colorScheme:io(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(RC,"file-diff"),i=this.hoganUtils.template(rc,"file-path"),a=this.hoganUtils.template(Uj,"file"),s=this.hoganUtils.template(Gj,so(t));return n.render({file:t,fileHtmlId:ao(t),diffs:r,filePath:i.render({fileDiffName:Pa(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return this.hoganUtils.render(rc,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Tt})}generateFileHtml(t){let r=ro(to(n=>jr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i=this.hoganUtils.render(rc,"block-header",{CSSLineClass:Tt,blockHeader:t.isTooBig?n.header:Di(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(t,t.isCombined,l,c);i+=u,i+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=jr(l.content,t.isCombined);i+=this.generateSingleLineHtml(t,{type:Tt.CONTEXT,prefix:c,content:u,oldNumber:l.oldNumber,newNumber:l.newNumber})});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(t,t.isCombined,s,o);i+=l,i+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).join(` -`)}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a0)&&(r.push([[],n,i]),n=[],i=[]),s.type===He.CONTEXT?r.push([[s],[],[]]):s.type===He.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===He.INSERT&&n.length>0?i.push(s):s.type===He.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(` -`);return this.hoganUtils.render(ic,"wrapper",{colorScheme:io(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(zj,"file-diff"),i=this.hoganUtils.template(ic,"file-path"),a=this.hoganUtils.template(Vj,"file"),s=this.hoganUtils.template(Wj,so(t));return n.render({file:t,fileHtmlId:ao(t),diffs:r,filePath:i.render({fileDiffName:Pa(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(ic,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Tt})}}generateFileHtml(t){let r=ro(to(n=>jr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i={left:this.makeHeaderHtml(n.header,t),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(t.isCombined,l,c);i.left+=u,i.right+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=jr(l.content,t.isCombined),{left:f,right:d}=this.generateLineHtml({type:Tt.CONTEXT,prefix:c,content:u,number:l.oldNumber},{type:Tt.CONTEXT,prefix:c,content:u,number:l.newNumber});i.left+=f,i.right+=d});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(t.isCombined,s,o);i.left+=l,i.right+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).reduce((n,i)=>({left:n.left+i.left,right:n.right+i.right}),{left:"",right:""})}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a0)&&(r.push([[],n,i]),n=[],i=[]),s.type===He.CONTEXT?r.push([[s],[],[]]):s.type===He.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===He.INSERT&&n.length>0?i.push(s):s.type===He.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i'),n.b(` +`);function J(){i!==null&&n!==null&&(n.blocks.push(i),i=null)}function de(){n!==null&&(!n.oldName&&l!==null&&(n.oldName=l),!n.newName&&c!==null&&(n.newName=c),n.newName&&(r.push(n),n=null)),l=null,c=null}function le(){J(),de(),n={blocks:[],deletedLines:0,addedLines:0}}function ce(N){J();let q;n!==null&&((q=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(N))?(n.isCombined=!1,a=parseInt(q[1],10),o=parseInt(q[2],10)):(q=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(N))?(n.isCombined=!0,a=parseInt(q[1],10),s=parseInt(q[2],10),o=parseInt(q[3],10)):(N.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),a=0,o=0,n.isCombined=!1)),i={lines:[],oldStartLine:a,oldStartLine2:s,newStartLine:o,header:N}}function Te(N){if(n===null||i===null||a===null||o===null)return;let q={content:N},B=n.isCombined?["+ "," +","++"]:["+"],Fe=n.isCombined?["- "," -","--"]:["-"];pM(N,B)?(n.addedLines++,q.type=Ke.INSERT,q.oldNumber=void 0,q.newNumber=o++):pM(N,Fe)?(n.deletedLines++,q.type=Ke.DELETE,q.oldNumber=a++,q.newNumber=void 0):(q.type=Ke.CONTEXT,q.oldNumber=a++,q.newNumber=o++),i.lines.push(q)}function ne(N,q){let B=q;for(;B{if(!N||N.startsWith("*"))return;let B,Fe=F[q-1],lr=F[q+1],Ut=F[q+2];if(N.startsWith("diff --git")||N.startsWith("diff --combined")){if(le(),(B=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(N))&&(l=ga(B[1],void 0,e.dstPrefix),c=ga(B[2],void 0,e.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isGitDiff=!0;return}if(N.startsWith("Binary files")&&!(n!=null&&n.isGitDiff)){if(le(),(B=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(N))&&(l=ga(B[1],void 0,e.dstPrefix),c=ga(B[2],void 0,e.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isBinary=!0;return}if((!n||!n.isGitDiff&&n&&N.startsWith(u)&&lr.startsWith(f)&&Ut.startsWith(d))&&le(),n!=null&&n.isTooBig)return;if(n&&(typeof e.diffMaxChanges=="number"&&n.addedLines+n.deletedLines>e.diffMaxChanges||typeof e.diffMaxLineLength=="number"&&N.length>e.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;let Oe=typeof e.diffTooBigMessage=="function"?e.diffTooBigMessage(r.length):"Diff too big to be displayed";ce(Oe);return}if(N.startsWith(u)&&lr.startsWith(f)||N.startsWith(f)&&Fe.startsWith(u)){if(n&&!n.oldName&&N.startsWith("--- ")&&(B=kU(N,e.srcPrefix))){n.oldName=B,n.language=hM(n.oldName,n.language);return}if(n&&!n.newName&&N.startsWith("+++ ")&&(B=TU(N,e.dstPrefix))){n.newName=B,n.language=hM(n.newName,n.language);return}}if(n&&(N.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i)){ce(N);return}if(i&&(N.startsWith("+")||N.startsWith("-")||N.startsWith(" "))){Te(N);return}let X=!ne(N,q);if(n===null)throw new Error("Where is my file !!!");(B=h.exec(N))?n.oldMode=B[1]:(B=p.exec(N))?n.newMode=B[1]:(B=g.exec(N))?(n.deletedFileMode=B[1],n.isDeleted=!0):(B=v.exec(N))?(n.newFileMode=B[1],n.isNew=!0):(B=y.exec(N))?(X&&(n.oldName=B[1]),n.isCopy=!0):(B=b.exec(N))?(X&&(n.newName=B[1]),n.isCopy=!0):(B=E.exec(N))?(X&&(n.oldName=B[1]),n.isRename=!0):(B=S.exec(N))?(X&&(n.newName=B[1]),n.isRename=!0):(B=x.exec(N))?(n.isBinary=!0,n.oldName=ga(B[1],void 0,e.srcPrefix),n.newName=ga(B[2],void 0,e.dstPrefix),ce("Binary file")):_.test(N)?(n.isBinary=!0,ce(N)):(B=A.exec(N))?n.unchangedPercentage=parseInt(B[1],10):(B=k.exec(N))?n.changedPercentage=parseInt(B[1],10):(B=w.exec(N))?(n.checksumBefore=B[1],n.checksumAfter=B[2],B[3]&&(n.mode=B[3])):(B=T.exec(N))?(n.checksumBefore=[B[2],B[3]],n.checksumAfter=B[1]):(B=C.exec(N))?(n.oldMode=[B[2],B[3]],n.newMode=B[1]):(B=I.exec(N))?(n.newFileMode=B[1],n.isNew=!0):(B=L.exec(N))&&(n.deletedFileMode=B[1],n.isDeleted=!0)}),J(),de(),r}m();m();m();function PU(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let r=[],n;for(n=0;n<=e.length;n++)r[n]=[n];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(n=1;n<=e.length;n++)for(i=1;i<=t.length;i++)e.charAt(n-1)===t.charAt(i-1)?r[n][i]=r[n-1][i-1]:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[e.length][t.length]}function Uo(t){return(e,r)=>{let n=t(e).trim(),i=t(r).trim();return PU(n,i)/(n.length+i.length)}}function Go(t){function e(n,i,a=new Map){let s=1/0,o;for(let l=0;l0||o.indexB>0)&&(E=v.concat(E)),(n.length>d||i.length>h)&&(E=E.concat(b)),E}return r}var Dt={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},ss={matching:cM.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:uM.WORD,colorScheme:as.LIGHT},Zn="/",vM=Uo(t=>t.value),RU=Go(vM);function Gv(t){return t.indexOf("dev/null")!==-1}function MU(t){return t.replace(/(]*>((.|\n)*?)<\/ins>)/g,"")}function OU(t){return t.replace(/(]*>((.|\n)*?)<\/del>)/g,"")}function zo(t){switch(t){case Ke.CONTEXT:return Dt.CONTEXT;case Ke.INSERT:return Dt.INSERTS;case Ke.DELETE:return Dt.DELETES}}function Vo(t){switch(t){case as.DARK:return"d2h-dark-color-scheme";case as.AUTO:return"d2h-auto-color-scheme";case as.LIGHT:default:return"d2h-light-color-scheme"}}function IU(t){return t?2:1}function va(t){return t.slice(0).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function en(t,e,r=!0){let n=IU(e);return{prefix:t.substring(0,n),content:r?va(t.substring(n)):t.substring(n)}}function os(t){let e=Hv(t.oldName),r=Hv(t.newName);if(e!==r&&!Gv(e)&&!Gv(r)){let n=[],i=[],a=e.split(Zn),s=r.split(Zn),o=a.length,l=s.length,c=0,u=o-1,f=l-1;for(;cc&&f>c&&a[u]===s[f];)i.unshift(s[f]),u-=1,f-=1;let d=n.join(Zn),h=i.join(Zn),p=a.slice(c,u+1).join(Zn),g=s.slice(c,f+1).join(Zn);return d.length&&h.length?d+Zn+"{"+p+" \u2192 "+g+"}"+Zn+h:d.length?d+Zn+"{"+p+" \u2192 "+g+"}":h.length?"{"+p+" \u2192 "+g+"}"+Zn+h:e+" \u2192 "+r}else return Gv(r)?e:r}function Wo(t){return`d2h-${dM(os(t)).toString().slice(-6)}`}function qo(t){let e="file-changed";return t.isRename||t.isCopy?e="file-renamed":t.isNew?e="file-added":t.isDeleted?e="file-deleted":t.newName!==t.oldName&&(e="file-renamed"),e}function wh(t,e,r,n={}){let{matching:i,maxLineLengthHighlight:a,matchWordsThreshold:s,diffStyle:o}=Object.assign(Object.assign({},ss),n),l=en(t,r,!1),c=en(e,r,!1);if(l.content.length>a||c.content.length>a)return{oldLine:{prefix:l.prefix,content:va(l.content)},newLine:{prefix:c.prefix,content:va(c.content)}};let u=o==="char"?E3(l.content,c.content):k3(l.content,c.content),f=[];if(o==="word"&&i==="words"){let h=u.filter(v=>v.removed),p=u.filter(v=>v.added);RU(p,h).forEach(v=>{v[0].length===1&&v[1].length===1&&vM(v[0][0],v[1][0]){let g=p.added?"ins":p.removed?"del":null,v=f.indexOf(p)>-1?' class="d2h-change"':"",y=va(p.value);return g!==null?`${h}<${g}${v}>${y}`:`${h}${y}`},"");return{oldLine:{prefix:l.prefix,content:MU(d)},newLine:{prefix:c.prefix,content:OU(d)}}}var yM="file-summary",$U="icon",FU={colorScheme:ss.colorScheme},bh=class{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},FU),r)}render(e){let r=e.map(n=>this.hoganUtils.render(yM,"line",{fileHtmlId:Wo(n),oldName:n.oldName,newName:n.newName,fileName:os(n),deletedLines:"-"+n.deletedLines,addedLines:"+"+n.addedLines},{fileIcon:this.hoganUtils.template($U,qo(n))})).join(` +`);return this.hoganUtils.render(yM,"wrapper",{colorScheme:Vo(this.config.colorScheme),filesNumber:e.length,files:r})}};m();var Vv=Object.assign(Object.assign({},ss),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Gc="generic",wM="line-by-line",DU="icon",LU="tag",zc=class{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Vv),r)}render(e){let r=e.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(` +`);return this.hoganUtils.render(Gc,"wrapper",{colorScheme:Vo(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";let n=this.hoganUtils.template(wM,"file-diff"),i=this.hoganUtils.template(Gc,"file-path"),a=this.hoganUtils.template(DU,"file"),s=this.hoganUtils.template(LU,qo(e));return n.render({file:e,fileHtmlId:Wo(e),diffs:r,filePath:i.render({fileDiffName:os(e)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return this.hoganUtils.render(Gc,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Dt})}generateFileHtml(e){let r=Go(Uo(n=>en(n.content,e.isCombined).content));return e.blocks.map(n=>{let i=this.hoganUtils.render(Gc,"block-header",{CSSLineClass:Dt,blockHeader:e.isTooBig?n.header:va(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(e,e.isCombined,l,c);i+=u,i+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=en(l.content,e.isCombined);i+=this.generateSingleLineHtml(e,{type:Dt.CONTEXT,prefix:c,content:u,oldNumber:l.oldNumber,newNumber:l.newNumber})});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(e,e.isCombined,s,o);i+=l,i+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).join(` +`)}applyLineGroupping(e){let r=[],n=[],i=[];for(let a=0;a0)&&(r.push([[],n,i]),n=[],i=[]),s.type===Ke.CONTEXT?r.push([[s],[],[]]):s.type===Ke.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===Ke.INSERT&&n.length>0?i.push(s):s.type===Ke.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(e,r,n){let i=e.length*r.length,a=yh(e.concat(r).map(o=>o.content.length));return i{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(` +`);return this.hoganUtils.render(Vc,"wrapper",{colorScheme:Vo(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";let n=this.hoganUtils.template(jU,"file-diff"),i=this.hoganUtils.template(Vc,"file-path"),a=this.hoganUtils.template(NU,"file"),s=this.hoganUtils.template(BU,qo(e));return n.render({file:e,fileHtmlId:Wo(e),diffs:r,filePath:i.render({fileDiffName:os(e)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(Vc,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Dt})}}generateFileHtml(e){let r=Go(Uo(n=>en(n.content,e.isCombined).content));return e.blocks.map(n=>{let i={left:this.makeHeaderHtml(n.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(e.isCombined,l,c);i.left+=u,i.right+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=en(l.content,e.isCombined),{left:f,right:d}=this.generateLineHtml({type:Dt.CONTEXT,prefix:c,content:u,number:l.oldNumber},{type:Dt.CONTEXT,prefix:c,content:u,number:l.newNumber});i.left+=f,i.right+=d});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(e.isCombined,s,o);i.left+=l,i.right+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).reduce((n,i)=>({left:n.left+i.left,right:n.right+i.right}),{left:"",right:""})}applyLineGroupping(e){let r=[],n=[],i=[];for(let a=0;a0)&&(r.push([[],n,i]),n=[],i=[]),s.type===Ke.CONTEXT?r.push([[s],[],[]]):s.type===Ke.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===Ke.INSERT&&n.length>0?i.push(s):s.type===Ke.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(e,r,n){let i=e.length*r.length,a=yh(e.concat(r).map(o=>o.content.length));return i'),n.b(` `+r),n.b(' '),n.b(` -`+r),n.b(n.rp("'),n.b(n.v(n.f("fileName",e,t,0))),n.b(""),n.b(` +`+r),n.b(n.rp("'),n.b(n.v(n.f("fileName",t,e,0))),n.b(""),n.b(` `+r),n.b(' '),n.b(` -`+r),n.b(' '),n.b(n.v(n.f("addedLines",e,t,0))),n.b(""),n.b(` -`+r),n.b(' '),n.b(n.v(n.f("deletedLines",e,t,0))),n.b(""),n.b(` +`+r),n.b(' '),n.b(n.v(n.f("addedLines",t,e,0))),n.b(""),n.b(` +`+r),n.b(' '),n.b(n.v(n.f("deletedLines",t,e,0))),n.b(""),n.b(` `+r),n.b(" "),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{"'),n.b(` +`+r),n.b(""),n.fl()},partials:{"'),n.b(` `+r),n.b('
'),n.b(` -`+r),n.b(' Files changed ('),n.b(n.v(n.f("filesNumber",e,t,0))),n.b(")"),n.b(` +`+r),n.b(' Files changed ('),n.b(n.v(n.f("filesNumber",t,e,0))),n.b(")"),n.b(` `+r),n.b(' hide'),n.b(` `+r),n.b(' show'),n.b(` `+r),n.b("
"),n.b(` `+r),n.b('
    '),n.b(` -`+r),n.b(" "),n.b(n.t(n.f("files",e,t,0))),n.b(` +`+r),n.b(" "),n.b(n.t(n.f("files",t,e,0))),n.b(` `+r),n.b("
"),n.b(` -`+r),n.b(""),n.fl()},partials:{},subs:{}});st["generic-block-header"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(""),n.b(` -`+r),n.b(' '),n.b(` -`+r),n.b(' '),n.b(` -`+r),n.b('
'),n.s(n.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(s.t(s.f("blockHeader",i,a,0)))}),e.pop()),n.s(n.f("blockHeader",e,t,1),e,t,1,0,0,"")||n.b(" "),n.b("
"),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});dt["generic-block-header"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b(""),n.b(` +`+r),n.b(' '),n.b(` +`+r),n.b(' '),n.b(` +`+r),n.b('
'),n.s(n.f("blockHeader",t,e,1),t,e,0,156,173,"{{ }}")&&(n.rs(t,e,function(i,a,s){s.b(s.t(s.f("blockHeader",i,a,0)))}),t.pop()),n.s(n.f("blockHeader",t,e,1),t,e,1,0,0,"")||n.b(" "),n.b("
"),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{},subs:{}});st["generic-empty-diff"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(""),n.b(` -`+r),n.b(' '),n.b(` -`+r),n.b('
'),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});dt["generic-empty-diff"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b(""),n.b(` +`+r),n.b(' '),n.b(` +`+r),n.b('
'),n.b(` `+r),n.b(" File without changes"),n.b(` `+r),n.b("
"),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{},subs:{}});st["generic-file-path"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(''),n.b(` -`+r),n.b(n.rp("'),n.b(n.v(n.f("fileDiffName",e,t,0))),n.b(""),n.b(` -`+r),n.b(n.rp(""),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});dt["generic-file-path"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b(''),n.b(` +`+r),n.b(n.rp("'),n.b(n.v(n.f("fileDiffName",t,e,0))),n.b(""),n.b(` +`+r),n.b(n.rp(""),n.b(` `+r),n.b('"),n.fl()},partials:{""),n.b(` -`+r),n.b(' '),n.b(` -`+r),n.b(" "),n.b(n.t(n.f("lineNumber",e,t,0))),n.b(` +`+r),n.b(""),n.fl()},partials:{""),n.b(` +`+r),n.b(' '),n.b(` +`+r),n.b(" "),n.b(n.t(n.f("lineNumber",t,e,0))),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(' '),n.b(` -`+r),n.b('
'),n.b(` -`+r),n.s(n.f("prefix",e,t,1),e,t,0,162,238,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(' '),s.b(s.t(s.f("prefix",i,a,0))),s.b(""),s.b(` -`+r)}),e.pop()),n.s(n.f("prefix",e,t,1),e,t,1,0,0,"")||(n.b('  '),n.b(` -`+r)),n.s(n.f("content",e,t,1),e,t,0,371,445,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(' '),s.b(s.t(s.f("content",i,a,0))),s.b(""),s.b(` -`+r)}),e.pop()),n.s(n.f("content",e,t,1),e,t,1,0,0,"")||(n.b('
'),n.b(` +`+r),n.b(' '),n.b(` +`+r),n.b('
'),n.b(` +`+r),n.s(n.f("prefix",t,e,1),t,e,0,162,238,"{{ }}")&&(n.rs(t,e,function(i,a,s){s.b(' '),s.b(s.t(s.f("prefix",i,a,0))),s.b(""),s.b(` +`+r)}),t.pop()),n.s(n.f("prefix",t,e,1),t,e,1,0,0,"")||(n.b('  '),n.b(` +`+r)),n.s(n.f("content",t,e,1),t,e,0,371,445,"{{ }}")&&(n.rs(t,e,function(i,a,s){s.b(' '),s.b(s.t(s.f("content",i,a,0))),s.b(""),s.b(` +`+r)}),t.pop()),n.s(n.f("content",t,e,1),t,e,1,0,0,"")||(n.b('
'),n.b(` `+r)),n.b("
"),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{},subs:{}});st["generic-wrapper"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` -`+r),n.b(" "),n.b(n.t(n.f("content",e,t,0))),n.b(` -`+r),n.b("
"),n.fl()},partials:{},subs:{}});st["icon-file-added"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` +`+r),n.b(" "),n.b(n.t(n.f("content",t,e,0))),n.b(` +`+r),n.b("
"),n.fl()},partials:{},subs:{}});dt["icon-file-added"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('"),n.fl()},partials:{},subs:{}});st["icon-file-changed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});dt["line-by-line-file-diff"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` `+r),n.b('
'),n.b(` -`+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b(` +`+r),n.b(" "),n.b(n.t(n.f("filePath",t,e,0))),n.b(` `+r),n.b("
"),n.b(` `+r),n.b('
'),n.b(` `+r),n.b('
'),n.b(` `+r),n.b(' '),n.b(` `+r),n.b(' '),n.b(` -`+r),n.b(" "),n.b(n.t(n.f("diffs",e,t,0))),n.b(` +`+r),n.b(" "),n.b(n.t(n.f("diffs",t,e,0))),n.b(` `+r),n.b(" "),n.b(` `+r),n.b("
"),n.b(` `+r),n.b("
"),n.b(` `+r),n.b("
"),n.b(` -`+r),n.b("
"),n.fl()},partials:{},subs:{}});st["line-by-line-numbers"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(n.v(n.f("oldNumber",e,t,0))),n.b("
"),n.b(` -`+r),n.b('
'),n.b(n.v(n.f("newNumber",e,t,0))),n.b("
"),n.fl()},partials:{},subs:{}});st["side-by-side-file-diff"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` +`+r),n.b("
"),n.fl()},partials:{},subs:{}});dt["line-by-line-numbers"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(n.v(n.f("oldNumber",t,e,0))),n.b("
"),n.b(` +`+r),n.b('
'),n.b(n.v(n.f("newNumber",t,e,0))),n.b("
"),n.fl()},partials:{},subs:{}});dt["side-by-side-file-diff"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` `+r),n.b('
'),n.b(` -`+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b(` +`+r),n.b(" "),n.b(n.t(n.f("filePath",t,e,0))),n.b(` `+r),n.b("
"),n.b(` `+r),n.b('
'),n.b(` `+r),n.b('
'),n.b(` `+r),n.b('
'),n.b(` `+r),n.b(' '),n.b(` `+r),n.b(' '),n.b(` -`+r),n.b(" "),n.b(n.t(n.d("diffs.left",e,t,0))),n.b(` +`+r),n.b(" "),n.b(n.t(n.d("diffs.left",t,e,0))),n.b(` `+r),n.b(" "),n.b(` `+r),n.b("
"),n.b(` `+r),n.b("
"),n.b(` @@ -312,61 +315,66 @@ Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(t) `+r),n.b('
'),n.b(` `+r),n.b(' '),n.b(` `+r),n.b(' '),n.b(` -`+r),n.b(" "),n.b(n.t(n.d("diffs.right",e,t,0))),n.b(` +`+r),n.b(" "),n.b(n.t(n.d("diffs.right",t,e,0))),n.b(` `+r),n.b(" "),n.b(` `+r),n.b("
"),n.b(` `+r),n.b("
"),n.b(` `+r),n.b("
"),n.b(` `+r),n.b("
"),n.b(` -`+r),n.b("
"),n.fl()},partials:{},subs:{}});st["tag-file-added"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('ADDED'),n.fl()},partials:{},subs:{}});st["tag-file-changed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('CHANGED'),n.fl()},partials:{},subs:{}});st["tag-file-deleted"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('DELETED'),n.fl()},partials:{},subs:{}});st["tag-file-renamed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('RENAMED'),n.fl()},partials:{},subs:{}});var sc=class{constructor({compiledTemplates:t={},rawTemplates:r={}}){let n=Object.entries(r).reduce((i,[a,s])=>{let o=C0.compile(s,{asString:!1});return Object.assign(Object.assign({},i),{[a]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},st),t),n)}static compile(t){return C0.compile(t,{asString:!1})}render(t,r,n,i,a){let s=this.templateKey(t,r);try{return this.preCompiledTemplates[s].render(n,i,a)}catch(o){throw new Error(`Could not find template to render '${s}'`)}}template(t,r){return this.preCompiledTemplates[this.templateKey(t,r)]}templateKey(t,r){return`${t}-${r}`}};var Yj=Object.assign(Object.assign(Object.assign({},S0),E0),{outputFormat:pC.LINE_BY_LINE,drawFileList:!0});function FC(e,t={}){let r=Object.assign(Object.assign({},Yj),t),n=typeof e=="string"?xC(e,r):e,i=new sc(r),{colorScheme:a}=r,s={colorScheme:a},o=r.drawFileList?new dd(i,s).render(n):"",l=r.outputFormat==="side-by-side"?new ac(i,r).render(n):new nc(i,r).render(n);return o+l}var pd=require("obsidian");var Ra=class extends pd.ItemView{constructor(r,n){super(r);this.plugin=n;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return Ti.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return Ti.name}getIcon(){return Ti.icon}async setState(r,n){this.state=r,pd.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let n=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let i=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!n){if(this.plugin.gitManager instanceof Ee&&await this.plugin.gitManager.isTracked(this.state.bFile))n=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(` +`+r),n.b("
"),n.fl()},partials:{},subs:{}});dt["tag-file-added"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('ADDED'),n.fl()},partials:{},subs:{}});dt["tag-file-changed"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('CHANGED'),n.fl()},partials:{},subs:{}});dt["tag-file-deleted"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('DELETED'),n.fl()},partials:{},subs:{}});dt["tag-file-renamed"]=new ht.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('RENAMED'),n.fl()},partials:{},subs:{}});var qc=class{constructor({compiledTemplates:e={},rawTemplates:r={}}){let n=Object.entries(r).reduce((i,[a,s])=>{let o=Kv.compile(s,{asString:!1});return Object.assign(Object.assign({},i),{[a]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},dt),e),n)}static compile(e){return Kv.compile(e,{asString:!1})}render(e,r,n,i,a){let s=this.templateKey(e,r);try{return this.preCompiledTemplates[s].render(n,i,a)}catch(o){throw new Error(`Could not find template to render '${s}'`)}}template(e,r){return this.preCompiledTemplates[this.templateKey(e,r)]}templateKey(e,r){return`${e}-${r}`}};var UU=Object.assign(Object.assign(Object.assign({},Vv),Wv),{outputFormat:lM.LINE_BY_LINE,drawFileList:!0});function SM(t,e={}){let r=Object.assign(Object.assign({},UU),e),n=typeof t=="string"?gM(t,r):t,i=new qc(r),{colorScheme:a}=r,s={colorScheme:a},o=r.drawFileList?new bh(i,s).render(n):"",l=r.outputFormat==="side-by-side"?new Wc(i,r).render(n):new zc(i,r).render(n);return o+l}var xh=require("obsidian");var ls=class extends xh.ItemView{constructor(r,n){super(r);this.plugin=n;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return ua.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return ua.name}getIcon(){return ua.icon}async setState(r,n){this.state=r,xh.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let n=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let i=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!n){if(this.plugin.gitManager instanceof Ce&&await this.plugin.gitManager.isTracked(this.state.bFile))n=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(` `);else if(await this.app.vault.adapter.exists(i)){let a=await this.app.vault.adapter.read(i);n=[...`--- /dev/null +++ ${this.state.bFile} @@ -0,0 +1,${a.split(` `).length} @@`.split(` `),...a.split(` `).map(o=>`+${o}`)].join(` -`)}}if(n){let a=this.parser.parseFromString(FC(n),"text/html").querySelector(".d2h-file-diff");this.contentEl.append(a)}else{let a=this.contentEl.createDiv({cls:"obsidian-git-center"});a.createSpan({text:"\u26A0\uFE0F",attr:{style:"font-size: 2em"}}),a.createEl("br"),a.createSpan({text:"File not found: "+this.state.bFile})}}finally{this.gettingDiff=!1}}}};g();var ho=require("obsidian");var po=require("@codemirror/commands");g();var Me=require("@codemirror/view"),Ae=require("@codemirror/state");g();var P0="\u037C",$C=typeof Symbol=="undefined"?"__"+P0:Symbol.for(P0),R0=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),LC=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{},md=class{constructor(t,r){this.rules=[];let{finish:n}=r||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function a(s,o,l,c){let u=[],f=/^@(\w+)\b/.exec(s[0]),d=f&&f[1]=="keyframes";if(f&&o==null)return l.push(s[0]+";");for(let h in o){let p=o[h];if(/&/.test(h))a(h.split(/,\s*/).map(m=>s.map(v=>m.replace(/&/,v))).reduce((m,v)=>m.concat(v)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");a(i(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||d)&&l.push((n&&!f&&!c?s.map(n):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in t)a(i(s),t[s],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let t=LC[$C]||1;return LC[$C]=t+1,P0+t.toString(36)}static mount(t,r,n){let i=t[R0],a=n&&n.nonce;i?a&&i.setNonce(a):i=new M0(t,a),i.mount(Array.isArray(r)?r:[r],t)}},DC=new Map,M0=class{constructor(t,r){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let a=DC.get(n);if(a)return t[R0]=a;this.sheet=new i.CSSStyleSheet,DC.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],t[R0]=this}mount(t,r){let n=this.sheet,i=0,a=0;for(let s=0;s-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,o),n)for(let c=0;cc){let f=e.slice(t,r).indexOf(n.slice(i,a));if(f>-1)return[new ft(t,t+f,i,i),new ft(t+f+c,r,a,a)]}else if(c>l){let f=n.slice(i,a).indexOf(e.slice(t,r));if(f>-1)return[new ft(t,t,i,i+f),new ft(r,r,i+f+l,a)]}if(l==1||c==1)return[new ft(t,r,i,a)];let u=n3(e,t,r,n,i,a);if(u){let[f,d,h]=u;return Oa(e,t,f,n,i,d).concat(Oa(e,f+h,r,n,d+h,a))}return Zj(e,t,r,n,i,a)}var oc=1e9;function Zj(e,t,r,n,i,a){let s=r-t,o=a-i;if(oc<1e9&&Math.min(s,o)>oc*16)return Math.min(s,o)>oc*64?[new ft(t,r,i,a)]:NC(e,t,r,n,i,a);let l=Math.ceil((s+o)/2);O0.reset(l),I0.reset(l);let c=(h,p)=>e.charCodeAt(t+h)==n.charCodeAt(i+p),u=(h,p)=>e.charCodeAt(r-h-1)==n.charCodeAt(a-p-1),f=(s-o)%2!=0?I0:null,d=f?null:O0;for(let h=0;hoc)return NC(e,t,r,n,i,a);let p=O0.advance(h,s,o,l,f,!1,c)||I0.advance(h,s,o,l,d,!0,u);if(p)return Kj(e,t,r,t+p[0],n,i,a,i+p[1])}return[new ft(t,r,i,a)]}var bd=class{constructor(){this.vec=[]}reset(t){this.len=t<<1;for(let r=0;rr)this.end+=2;else if(f>n)this.start+=2;else if(a){let d=i+(r-n)-l;if(d>=0&&d=r-u)return[h,i+h-d]}else{let h=r-a.vec[d];if(u>=h)return[u,f]}}}return null}},O0=new bd,I0=new bd;function Kj(e,t,r,n,i,a,s,o){let l=!1;return!co(e,n)&&++n==r&&(l=!0),!co(i,o)&&++o==s&&(l=!0),l?[new ft(t,r,a,s)]:Oa(e,t,n,i,a,o).concat(Oa(e,n,r,i,o,s))}function r3(e,t){let r=1,n=Math.min(e,t);for(;rr||u>a||e.slice(o,c)!=n.slice(l,u)){if(s==1)return o-t-(co(e,o)?0:1);s=s>>1}else{if(c==r||u==a)return c-t;o=c,l=u}}}function B0(e,t,r,n,i,a){if(t==r||i==a||e.charCodeAt(r-1)!=n.charCodeAt(a-1))return 0;let s=r3(r-t,a-i);for(let o=r,l=a;;){let c=o-s,u=l-s;if(c>1}else{if(c==t||u==i)return r-c;o=c,l=u}}}function F0(e,t,r,n,i,a,s,o){let l=n.slice(i,a),c=null;for(;;){if(c||s=r)break;let d=e.slice(u,f),h=-1;for(;(h=l.indexOf(d,h+1))!=-1;){let p=N0(e,f,r,n,i+h+d.length,a),m=B0(e,t,u,n,i,i+h),v=d.length+p+m;(!c||c[2]>1}}function n3(e,t,r,n,i,a){let s=r-t,o=a-i;if(si.fromA-t&&n.toB>i.fromB-t&&(e[r-1]=new ft(n.fromA,i.toA,n.fromB,i.toB),e.splice(r--,1))}}function Jj(e,t,r){for(;;){i3(r,1);let n=!1;for(let i=0;i3||o>3){let l=i==e.length-1?t.length:e[i+1].fromA,c=a.fromA-n,u=l-a.toA,f=jC(t,a.fromA,Math.min(c,5)),d=BC(t,a.toA,Math.min(u,5)),h=a.fromA-f,p=d-a.toA;if(!s||!o){let m=Math.max(s,o),[v,y,b]=s?[t,a.fromA,a.toA]:[r,a.fromB,a.toB];h&&p&&(m>h&&t.slice(f,a.fromA)==v.slice(b-h,b)?(a=e[i]=new ft(f,f+s,a.fromB-h,a.toB-h),f=a.fromA,d=BC(t,a.toA,Math.min(l-a.toA,5))):m>p&&t.slice(a.toA,d)==v.slice(y,y+p)&&(a=e[i]=new ft(d-s,d,a.fromB+p,a.toB+p),d=a.toA,f=jC(t,a.fromA,Math.min(a.fromA-n,5))),h=a.fromA-f,p=d-a.toA)}if(h||p)a=e[i]=new ft(a.fromA-h,a.toA+p,a.fromB-h,a.toB+p);else if(s){if(!o){let m=UC(t,a.fromA,a.toA),v,y=m<0?-1:HC(t,a.toA,a.fromA);m>-1&&(v=m-a.fromA)<=u&&t.slice(a.fromA,m)==t.slice(a.toA,a.toA+v)?a=e[i]=a.offset(v):y>-1&&(v=a.toA-y)<=c&&t.slice(a.fromA-v,a.fromA)==t.slice(y,a.toA)&&(a=e[i]=a.offset(-v))}}else{let m=UC(r,a.fromB,a.toB),v,y=m<0?-1:HC(r,a.toB,a.fromB);m>-1&&(v=m-a.fromB)<=u&&r.slice(a.fromB,m)==r.slice(a.toB,a.toB+v)?a=e[i]=a.offset(v):y>-1&&(v=a.toB-y)<=c&&r.slice(a.fromB-v,a.fromB)==r.slice(y,a.toB)&&(a=e[i]=a.offset(-v))}n=a.toA}}return i3(e,3),e}var Ma;try{Ma=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch(e){}function a3(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function s3(e,t){if(t==e.length)return 0;let r=e.charCodeAt(t);return r<192?a3(r)?1:0:Ma?!l3(r)||t==e.length-1?Ma.test(String.fromCharCode(r))?1:0:Ma.test(e.slice(t,t+2))?2:0:0}function o3(e,t){if(!t)return 0;let r=e.charCodeAt(t-1);return r<192?a3(r)?1:0:Ma?!c3(r)||t==1?Ma.test(String.fromCharCode(r))?1:0:Ma.test(e.slice(t-2,t))?2:0:0}function BC(e,t,r){if(t==e.length||!o3(e,t))return t;for(let n=t,i=t+r;;){let a=s3(e,n);if(!a)return n;if(n+=a,n>i)return t}}function jC(e,t,r){if(!t||!s3(e,t))return t;for(let n=t,i=t-r;;){let a=o3(e,n);if(!a)return n;if(n-=a,ne>=55296&&e<=56319,c3=e=>e>=56320&&e<=57343;function co(e,t){return!t||t==e.length||!l3(e.charCodeAt(t-1))||!c3(e.charCodeAt(t))}function e7(e,t,r){var n;return oc=((n=r==null?void 0:r.scanLimit)!==null&&n!==void 0?n:1e9)>>1,Jj(e,t,Oa(e,0,e.length,t,0,t.length))}function u3(e,t,r){return Qj(e7(e,t,r),e,t)}var Rn=Ae.Facet.define({combine:e=>e[0]}),$0=Ae.StateEffect.define(),uo=Ae.StateField.define({create(e){return null},update(e,t){for(let r of t.effects)r.is($0)&&(e=r.value);return e}});var lo=class e{constructor(t,r,n,i,a){this.changes=t,this.fromA=r,this.toA=n,this.fromB=i,this.toB=a}offset(t,r){return t||r?new e(this.changes,this.fromA+t,this.toA+t,this.fromB+r,this.toB+r):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(t,r,n){return f3(u3(t.toString(),r.toString(),n),t,r,0,0)}static updateA(t,r,n,i,a){return qC(WC(t,i,!0,n.length),t,r,n,a)}static updateB(t,r,n,i,a){return qC(WC(t,i,!1,r.length),t,r,n,a)}};function GC(e,t,r,n){let i=r.lineAt(e),a=n.lineAt(t);return i.to==e&&a.to==t&&eu+1&&m>f+1)break;d.push(h.offset(-l+n,-c+i)),[u,f]=zC(h.toA+n,h.toB+i,t,r),s++}a.push(new lo(d,l,Math.max(l,u),c,Math.max(c,f)))}return a}var gd=1e3;function VC(e,t,r,n){let i=0,a=e.length;for(;;){if(i==a){let u=0,f=0;i&&({toA:u,toB:f}=e[i-1]);let d=t-(r?u:f);return[u+d,f+d]}let s=i+a>>1,o=e[s],[l,c]=r?[o.fromA,o.toA]:[o.fromB,o.toB];if(l>t)a=s;else if(c<=t)i=s+1;else return n?[o.fromA,o.fromB]:[o.toA,o.toB]}}function WC(e,t,r,n){let i=[];return t.iterChangedRanges((a,s,o,l)=>{let c=0,u=r?t.length:n,f=0,d=r?n:t.length;a>gd&&([c,f]=VC(e,a-gd,r,!0)),s=c?i[i.length-1]={fromA:p.fromA,fromB:p.fromB,toA:u,toB:d,diffA:p.diffA+m,diffB:p.diffB+v}:i.push({fromA:c,toA:u,fromB:f,toB:d,diffA:m,diffB:v})}),i}function qC(e,t,r,n,i){if(!e.length)return t;let a=[];for(let s=0,o=0,l=0,c=0;;s++){let u=s==e.length?null:e[s],f=u?u.fromA+o:r.length,d=u?u.fromB+l:n.length;for(;cf||v.toB+l>d)break;a.push(v.offset(o,l)),c++}if(!u)break;let h=u.toA+o+u.diffA,p=u.toB+l+u.diffB,m=u3(r.sliceString(f,h),n.sliceString(d,p),i);for(let v of f3(m,r,n,f,d))a.push(v);for(o+=u.diffA,l+=u.diffB;ch&&v.fromB+l>p)break;c++}}return a}var t7={scanLimit:500},d3=Me.ViewPlugin.fromClass(class{constructor(e){({deco:this.deco,gutter:this.gutter}=ZC(e))}update(e){(e.docChanged||e.viewportChanged||r7(e.startState,e.state)||n7(e.startState,e.state))&&({deco:this.deco,gutter:this.gutter}=ZC(e.view))}},{decorations:e=>e.deco}),vd=Ae.Prec.low((0,Me.gutter)({class:"cm-changeGutter",markers:e=>{var t;return((t=e.plugin(d3))===null||t===void 0?void 0:t.gutter)||Ae.RangeSet.empty}}));function r7(e,t){return e.field(uo,!1)!=t.field(uo,!1)}function n7(e,t){return e.facet(Rn)!=t.facet(Rn)}var YC=Me.Decoration.line({class:"cm-changedLine"}),i7=Me.Decoration.mark({class:"cm-changedText"}),a7=Me.Decoration.mark({tagName:"ins",class:"cm-insertedLine"}),s7=Me.Decoration.mark({tagName:"del",class:"cm-deletedLine"}),XC=new class extends Me.GutterMarker{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function o7(e,t,r,n,i,a){let s=r?e.fromA:e.fromB,o=r?e.toA:e.toB,l=0;if(s!=o){i.add(s,s,YC),i.add(s,o,r?s7:a7),a&&a.add(s,s,XC);for(let c=t.iterRange(s,o-1),u=s;!c.next().done;){if(c.lineBreak){u++,i.add(u,u,YC),a&&a.add(u,u,XC);continue}let f=u+c.value.length;if(n)for(;l=c)break;(a?u.toA:u.toB)>l&&o7(u,e.state.doc,a,n,s,o)}return{deco:s.finish(),gutter:o&&o.finish()}}var oo=class extends Me.WidgetType{constructor(t){super(),this.height=t}eq(t){return this.height==t.height}toDOM(){let t=document.createElement("div");return t.className="cm-mergeSpacer",t.style.height=this.height+"px",t}updateDOM(t){return t.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},_d=Ae.StateEffect.define({map:(e,t)=>e.map(t)}),lc=Ae.StateField.define({create:()=>Me.Decoration.none,update:(e,t)=>{for(let r of t.effects)if(r.is(_d))return r.value;return e.map(t.changes)},provide:e=>Me.EditorView.decorations.from(e)}),yd=.01;function KC(e,t){if(e.size!=t.size)return!1;let r=e.iter(),n=t.iter();for(;r.value;){if(r.from!=n.from||Math.abs(r.value.spec.widget.height-n.value.spec.widget.height)>1)return!1;r.next(),n.next()}return!0}function l7(e,t,r){let n=new Ae.RangeSetBuilder,i=new Ae.RangeSetBuilder,a=e.state.field(lc).iter(),s=t.state.field(lc).iter(),o=0,l=0,c=0,u=0,f=e.viewport,d=t.viewport;for(let v=0;;v++){let y=vyd&&(u+=k,i.add(l,l,Me.Decoration.widget({widget:new oo(k),block:!0,side:-1})))}if(b>o+1e3&&of.from&&ld.from){let E=Math.min(f.from-o,d.from-l);o+=E,l+=E,v--}else if(y)o=y.toA,l=y.toB;else break;for(;a.value&&a.fromyd&&i.add(t.state.doc.length,t.state.doc.length,Me.Decoration.widget({widget:new oo(h),block:!0,side:1}));let p=n.finish(),m=i.finish();KC(p,e.state.field(lc))||e.dispatch({effects:_d.of(p)}),KC(m,t.state.field(lc))||t.dispatch({effects:_d.of(m)})}var L0=Ae.StateEffect.define({map:(e,t)=>t.mapPos(e)}),D0=class extends Me.WidgetType{constructor(t){super(),this.lines=t}eq(t){return this.lines==t.lines}toDOM(t){let r=document.createElement("div");return r.className="cm-collapsedLines",r.textContent=t.state.phrase("$ unchanged lines",this.lines),r.addEventListener("click",n=>{let i=t.posAtDOM(n.target);t.dispatch({effects:L0.of(i)});let{side:a,sibling:s}=t.state.facet(Rn);s&&s().dispatch({effects:L0.of(c7(i,t.state.field(uo),a=="a"))})}),r}ignoreEvent(t){return t instanceof MouseEvent}get estimatedHeight(){return 27}};function c7(e,t,r){let n=0,i=0;for(let a=0;;a++){let s=a=e)return i+(e-n);[n,i]=r?[s.toA,s.toB]:[s.toB,s.toA]}}var u7=Ae.StateField.define({create(e){return Me.Decoration.none},update(e,t){e=e.map(t.changes);for(let r of t.effects)r.is(L0)&&(e=e.update({filter:n=>n!=r.value}));return e},provide:e=>Me.EditorView.decorations.from(e)});function JC({margin:e=3,minSize:t=4}){return u7.init(r=>f7(r,e,t))}function f7(e,t,r){let n=new Ae.RangeSetBuilder,i=e.facet(Rn).side=="a",a=e.field(uo),s=1;for(let o=0;;o++){let l=o=r&&n.add(e.doc.line(c).from,e.doc.line(u).to,Me.Decoration.replace({widget:new D0(f),block:!0})),!l)break;s=e.doc.lineAt(Math.min(e.doc.length,i?l.toA:l.toB)).number}return n.finish()}var d7=Me.EditorView.styleModule.of(new md({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),h7=Me.EditorView.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb2266, #22bb2266) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff8866, #88ff8866) bottom/100% 2px no-repeat"},".cm-insertedLine, .cm-deletedLine":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"\u299A"',marginInlineEnd:"7px"},"&:after":{content:'"\u299A"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"}}),QC=new Ae.Compartment,wd=new Ae.Compartment,xd=class{constructor(t){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=t.diffConfig||t7;let r=[Ae.Prec.low(d3),h7,d7,lc,Me.EditorView.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(d=>d.effects.some(h=>h.is(_d)))&&this.measure()})],n=[Rn.of({side:"a",sibling:()=>this.b,highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1})];t.gutter!==!1&&n.push(vd);let i=Ae.EditorState.create({doc:t.a.doc,selection:t.a.selection,extensions:[t.a.extensions||[],Me.EditorView.editorAttributes.of({class:"cm-merge-a"}),wd.of(n),r]}),a=[Rn.of({side:"b",sibling:()=>this.a,highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1})];t.gutter!==!1&&a.push(vd);let s=Ae.EditorState.create({doc:t.b.doc,selection:t.b.selection,extensions:[t.b.extensions||[],Me.EditorView.editorAttributes.of({class:"cm-merge-b"}),wd.of(a),r]});this.chunks=lo.build(i.doc,s.doc,this.diffConf);let o=[uo.init(()=>this.chunks),QC.of(t.collapseUnchanged?JC(t.collapseUnchanged):[])];i=i.update({effects:Ae.StateEffect.appendConfig.of(o)}).state,s=s.update({effects:Ae.StateEffect.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let l=t.orientation||"a-b",c=document.createElement("div");c.className="cm-mergeViewEditor";let u=document.createElement("div");u.className="cm-mergeViewEditor",this.editorDOM.appendChild(l=="a-b"?c:u),this.editorDOM.appendChild(l=="a-b"?u:c),this.a=new Me.EditorView({state:i,parent:c,root:t.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new Me.EditorView({state:s,parent:u,root:t.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!t.revertControls,t.revertControls=="b-to-a",t.renderRevertControl),t.parent&&t.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(t,r){if(t.some(n=>n.docChanged)){let n=t[t.length-1],i=t.reduce((s,o)=>s.compose(o.changes),Ae.ChangeSet.empty(t[0].startState.doc.length));this.chunks=r==this.a?lo.updateA(this.chunks,n.newDoc,this.b.state.doc,i,this.diffConf):lo.updateB(this.chunks,this.a.state.doc,n.newDoc,i,this.diffConf),r.update([...t,n.state.update({effects:$0.of(this.chunks)})]);let a=r==this.a?this.b:this.a;a.update([a.state.update({effects:$0.of(this.chunks)})]),this.scheduleMeasure()}else r.update(t)}reconfigure(t){if("diffConfig"in t&&(this.diffConf=t.diffConfig),"orientation"in t){let a=t.orientation!="b-a";if(a!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(a?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(a?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in t||"renderRevertControl"in t){let a=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in t&&(a=!!t.revertControls,s=t.revertControls=="b-to-a"),"renderRevertControl"in t&&(o=t.renderRevertControl),this.setupRevertControls(a,s,o)}let r="highlightChanges"in t,n="gutter"in t,i="collapseUnchanged"in t;if(r||n||i){let a=[],s=[];if(r||n){let o=this.a.state.facet(Rn),l=n?t.gutter!==!1:o.markGutter,c=r?t.highlightChanges!==!1:o.highlightChanges;a.push(wd.reconfigure([Rn.of({side:"a",sibling:()=>this.b,highlightChanges:c,markGutter:l}),l?vd:[]])),s.push(wd.reconfigure([Rn.of({side:"b",sibling:()=>this.a,highlightChanges:c,markGutter:l}),l?vd:[]]))}if(i){let o=QC.reconfigure(t.collapseUnchanged?JC(t.collapseUnchanged):[]);a.push(o),s.push(o)}this.a.dispatch({effects:a}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(t,r,n){this.revertToA=r,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=n,!t&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):t&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let t=this.dom.ownerDocument.defaultView||window;this.measuring=t.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){l7(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let t=this.revertDOM,r=t.firstChild,n=this.a.viewport,i=this.b.viewport;for(let a=0;an.to||s.fromB>i.to)break;if(s.fromA-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function e3(e){let t=e.nextSibling;return e.remove(),t}var Sd=require("@codemirror/search"),fo=require("@codemirror/state"),Hr=require("@codemirror/view");var Ia=class extends ho.ItemView{constructor(r,n){super(r);this.plugin=n;this.refreshing=!1;this.ignoreNextModification=!1;this.navigation=!0,this.registerEvent(this.app.workspace.on("obsidian-git:status-changed",()=>{this.mergeView?this.updateRefEditors().catch(console.error):this.createMergeView().catch(console.error)})),this.intervalRef=window.setInterval(()=>{this.mergeView&&this.updateRefEditors().catch(console.error)},30*1e3),this.registerEvent(this.app.vault.on("modify",i=>{this.state.bRef==null&&i.path===this.state.bFile&&(this.ignoreNextModification?this.ignoreNextModification=!1:this.updateModifiableEditor().catch(console.error))})),this.registerEvent(this.app.vault.on("delete",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("create",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("rename",(i,a)=>{this.state.bRef==null&&(i.path===this.state.bFile||a===this.state.bFile)&&this.createMergeView().catch(console.error)})),this.fileSaveDebouncer=(0,ho.debounce)(i=>{let a=this.state.bFile;a&&(this.ignoreNextModification=!0,this.plugin.app.vault.adapter.write(a,i).catch(s=>this.plugin.displayError(s)))},1e3,!1)}getViewType(){return ki.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return ki.name}getIcon(){return ki.icon}async setState(r,n){this.state=r,ho.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await super.setState(r,n),await this.createMergeView()}getState(){return this.state}onClose(){return window.clearInterval(this.intervalRef),super.onClose()}async onOpen(){return await this.createMergeView(),super.onOpen()}async gitShow(r,n){try{return await this.plugin.gitManager.show(r,n,!1)}catch(i){if(i instanceof wr&&(i.message.includes("does not exist")||i.message.includes("unknown revision or path")||i.message.includes("exists on disk, but not in")||i.message.includes("fatal: bad object")))return i.message.includes("fatal: bad object")&&this.plugin.displayError(i.message),"";throw i}}async bShouldBeEditable(){if(this.state.bRef!=null)return!1;let r=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);return await this.app.vault.adapter.exists(r)}async updateModifiableEditor(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.b;this.refreshing=!0;let n=await this.app.vault.adapter.read(this.state.bFile);if(n!=r.state.doc.toString()){let i=r.state.update({changes:{from:0,to:r.state.doc.length,insert:n},annotations:[fo.Transaction.remote.of(!0)]});r.dispatch(i)}this.refreshing=!1}async updateRefEditors(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.a,n=this.mergeView.b;this.refreshing=!0;let i=await this.gitShow(this.state.aRef,this.state.aFile),a;if(this.state.bRef!=null&&(a=await this.gitShow(this.state.bRef,this.state.bFile)),i!=r.state.doc.toString()){let s=r.state.update({changes:{from:0,to:r.state.doc.length,insert:i}});r.dispatch(s)}if(a!=null&&a!=n.state.doc.toString()){let s=n.state.update({changes:{from:0,to:n.state.doc.length,insert:a}});n.dispatch(s)}this.refreshing=!1}async createMergeView(){var r,n,i;if((r=this.state)!=null&&r.aFile&&((n=this.state)!=null&&n.bFile)&&!this.refreshing&&this.plugin.gitManager){this.refreshing=!0,(i=this.mergeView)==null||i.destroy();let a=this.containerEl.children[1];a.empty(),this.contentEl.addClass("git-split-diff-view"),this.bIsEditable=await this.bShouldBeEditable();let s=await this.gitShow(this.state.aRef,this.state.aFile),o;if(this.state.bRef!=null)o=await this.gitShow(this.state.bRef,this.state.bFile);else{let p=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);await this.app.vault.adapter.exists(p)?o=await this.app.vault.adapter.read(p):o=""}let l=[(0,Hr.lineNumbers)(),(0,Sd.highlightSelectionMatches)(),(0,Hr.drawSelection)(),Hr.keymap.of([...po.standardKeymap,po.indentWithTab]),(0,po.history)(),(0,Sd.search)(),Hr.EditorView.lineWrapping],c=this,u=Hr.ViewPlugin.define(p=>({update(m){if(m.docChanged&&!m.transactions.some(v=>v.annotation(fo.Transaction.remote))){let v=p.state.doc.toString();c.fileSaveDebouncer(v)}}})),f={doc:s,extensions:[...l,Hr.EditorView.editable.of(!1),fo.EditorState.readOnly.of(!0)]},d=[...l];this.bIsEditable?d.push(u):d.push(Hr.EditorView.editable.of(!1),fo.EditorState.readOnly.of(!0));let h={doc:o,extensions:d};a.addClasses(["cm-s-obsidian","mod-cm6","markdown-source-view","cm-content"]),this.mergeView=new xd({b:h,a:f,collapseUnchanged:{minSize:6,margin:4},diffConfig:{scanLimit:this.bIsEditable?1e3:1e4},parent:a}),this.refreshing=!1}}};g();var PP=require("obsidian");g();g();g();var h3="5";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(h3);g();g();var mo="[",Fa="[!",$a="]",Ni={};var dt=Symbol(),Yt=Symbol("filename"),p3=Symbol("hmr");g();g();var p7=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory"];var OZ=[...p7,"formNoValidate","isMap","noModule","playsInline","readOnly","value","inert","volume","defaultValue","defaultChecked","srcObject"];var m7=["touchstart","touchmove"];function m3(e){return m7.includes(e)}g();g();g();var Ed=!0;g();var G=!1;g();var on=Array.isArray,cc=Array.from,j0=Object.keys,It=Object.defineProperty,Ur=Object.getOwnPropertyDescriptor,H0=Object.getOwnPropertyDescriptors,U0=Object.prototype,g3=Array.prototype,La=Object.getPrototypeOf;function G0(e){return typeof e=="function"}var xr=()=>{};function Ad(e){for(var t=0;ts.map(v=>g.replace(/&/,v))).reduce((g,v)=>g.concat(v)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");a(i(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(u.length||d)&&l.push((n&&!f&&!c?s.map(n):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in e)a(i(s),e[s],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=AM[EM]||1;return AM[EM]=e+1,Zv+e.toString(36)}static mount(e,r,n){let i=e[Jv],a=n&&n.nonce;i?a&&i.setNonce(a):i=new Qv(e,a),i.mount(Array.isArray(r)?r:[r],e)}},kM=new Map,Qv=class{constructor(e,r){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let a=kM.get(n);if(a)return e[Jv]=a;this.sheet=new i.CSSStyleSheet,kM.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],e[Jv]=this}mount(e,r){let n=this.sheet,i=0,a=0;for(let s=0;s-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,o),n)for(let c=0;cc){let f=t.slice(e,r).indexOf(n.slice(i,a));if(f>-1)return[new pt(e,e+f,i,i),new pt(e+f+c,r,a,a)]}else if(c>l){let f=n.slice(i,a).indexOf(t.slice(e,r));if(f>-1)return[new pt(e,e,i,i+f),new pt(r,r,i+f+l,a)]}if(l==1||c==1)return[new pt(e,r,i,a)];let u=WM(t,e,r,n,i,a);if(u){let[f,d,h]=u;return us(t,e,f,n,i,d).concat(us(t,f+h,r,n,d+h,a))}return zU(t,e,r,n,i,a)}var Yc=1e9,Xc=0,s1=!1;function zU(t,e,r,n,i,a){let s=r-e,o=a-i;if(Yc<1e9&&Math.min(s,o)>Yc*16||Xc>0&&Date.now()>Xc)return Math.min(s,o)>Yc*64?[new pt(e,r,i,a)]:TM(t,e,r,n,i,a);let l=Math.ceil((s+o)/2);e1.reset(l),t1.reset(l);let c=(h,p)=>t.charCodeAt(e+h)==n.charCodeAt(i+p),u=(h,p)=>t.charCodeAt(r-h-1)==n.charCodeAt(a-p-1),f=(s-o)%2!=0?t1:null,d=f?null:e1;for(let h=0;hYc||Xc>0&&!(h&63)&&Date.now()>Xc)return TM(t,e,r,n,i,a);let p=e1.advance(h,s,o,l,f,!1,c)||t1.advance(h,s,o,l,d,!0,u);if(p)return VU(t,e,r,e+p[0],n,i,a,i+p[1])}return[new pt(e,r,i,a)]}var Ch=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let r=0;rr)this.end+=2;else if(f>n)this.start+=2;else if(a){let d=i+(r-n)-l;if(d>=0&&d=r-u)return[h,i+h-d]}else{let h=r-a.vec[d];if(u>=h)return[u,f]}}}return null}},e1=new Ch,t1=new Ch;function VU(t,e,r,n,i,a,s,o){let l=!1;return!Ko(t,n)&&++n==r&&(l=!0),!Ko(i,o)&&++o==s&&(l=!0),l?[new pt(e,r,a,s)]:us(t,e,n,i,a,o).concat(us(t,n,r,i,o,s))}function VM(t,e){let r=1,n=Math.min(t,e);for(;rr||u>a||t.slice(o,c)!=n.slice(l,u)){if(s==1)return o-e-(Ko(t,o)?0:1);s=s>>1}else{if(c==r||u==a)return c-e;o=c,l=u}}}function l1(t,e,r,n,i,a){if(e==r||i==a||t.charCodeAt(r-1)!=n.charCodeAt(a-1))return 0;let s=VM(r-e,a-i);for(let o=r,l=a;;){let c=o-s,u=l-s;if(c>1}else{if(c==e||u==i)return r-c;o=c,l=u}}}function r1(t,e,r,n,i,a,s,o){let l=n.slice(i,a),c=null;for(;;){if(c||s=r)break;let d=t.slice(u,f),h=-1;for(;(h=l.indexOf(d,h+1))!=-1;){let p=o1(t,f,r,n,i+h+d.length,a),g=l1(t,e,u,n,i,i+h),v=d.length+p+g;(!c||c[2]>1}}function WM(t,e,r,n,i,a){let s=r-e,o=a-i;if(si.fromA-e&&n.toB>i.fromB-e&&(t[r-1]=new pt(n.fromA,i.toA,n.fromB,i.toB),t.splice(r--,1))}}function WU(t,e,r){for(;;){qM(r,1);let n=!1;for(let i=0;i3||o>3){let l=i==t.length-1?e.length:t[i+1].fromA,c=a.fromA-n,u=l-a.toA,f=PM(e,a.fromA,c),d=CM(e,a.toA,u),h=a.fromA-f,p=d-a.toA;if((!s||!o)&&h&&p){let g=Math.max(s,o),[v,y,b]=s?[e,a.fromA,a.toA]:[r,a.fromB,a.toB];g>h&&e.slice(f,a.fromA)==v.slice(b-h,b)?(a=t[i]=new pt(f,f+s,a.fromB-h,a.toB-h),f=a.fromA,d=CM(e,a.toA,l-a.toA)):g>p&&e.slice(a.toA,d)==v.slice(y,y+p)&&(a=t[i]=new pt(d-s,d,a.fromB+p,a.toB+p),d=a.toA,f=PM(e,a.fromA,a.fromA-n)),h=a.fromA-f,p=d-a.toA}if(h||p)a=t[i]=new pt(a.fromA-h,a.toA+p,a.fromB-h,a.toB+p);else if(s){if(!o){let g=MM(e,a.fromA,a.toA),v,y=g<0?-1:RM(e,a.toA,a.fromA);g>-1&&(v=g-a.fromA)<=u&&e.slice(a.fromA,g)==e.slice(a.toA,a.toA+v)?a=t[i]=a.offset(v):y>-1&&(v=a.toA-y)<=c&&e.slice(a.fromA-v,a.fromA)==e.slice(y,a.toA)&&(a=t[i]=a.offset(-v))}}else{let g=MM(r,a.fromB,a.toB),v,y=g<0?-1:RM(r,a.toB,a.fromB);g>-1&&(v=g-a.fromB)<=u&&r.slice(a.fromB,g)==r.slice(a.toB,a.toB+v)?a=t[i]=a.offset(v):y>-1&&(v=a.toB-y)<=c&&r.slice(a.fromB-v,a.fromB)==r.slice(y,a.toB)&&(a=t[i]=a.offset(-v))}}n=a.toA}return qM(t,3),t}var cs;try{cs=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch(t){}function YM(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function XM(t,e){if(e==t.length)return 0;let r=t.charCodeAt(e);return r<192?YM(r)?1:0:cs?!JM(r)||e==t.length-1?cs.test(String.fromCharCode(r))?1:0:cs.test(t.slice(e,e+2))?2:0:0}function KM(t,e){if(!e)return 0;let r=t.charCodeAt(e-1);return r<192?YM(r)?1:0:cs?!QM(r)||e==1?cs.test(String.fromCharCode(r))?1:0:cs.test(t.slice(e-2,e))?2:0:0}var ZM=8;function CM(t,e,r){if(e==t.length||!KM(t,e))return e;for(let n=e,i=e+r,a=0;ai)return n;n+=s}return e}function PM(t,e,r){if(!e||!XM(t,e))return e;for(let n=e,i=e-r,a=0;at>=55296&&t<=56319,QM=t=>t>=56320&&t<=57343;function Ko(t,e){return!e||e==t.length||!JM(t.charCodeAt(e-1))||!QM(t.charCodeAt(e))}function YU(t,e,r){var n;return Yc=((n=r==null?void 0:r.scanLimit)!==null&&n!==void 0?n:1e9)>>1,Xc=r!=null&&r.timeout?Date.now()+r.timeout:0,s1=!1,WU(t,e,us(t,0,t.length,e,0,e.length))}function eO(){return!s1}function tO(t,e,r){return qU(YU(t,e,r),t,e)}var Jn=ke.Facet.define({combine:t=>t[0]}),n1=ke.StateEffect.define(),XU=ke.Facet.define(),Zo=ke.StateField.define({create(t){return null},update(t,e){for(let r of e.effects)r.is(n1)&&(t=r.value);for(let r of e.state.facet(XU))t=r(t,e);return t}});var Xo=class t{constructor(e,r,n,i,a,s=!0){this.changes=e,this.fromA=r,this.toA=n,this.fromB=i,this.toB=a,this.precise=s}offset(e,r){return e||r?new t(this.changes,this.fromA+e,this.toA+e,this.fromB+r,this.toB+r,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,r,n){let i=tO(e.toString(),r.toString(),n);return rO(i,e,r,0,0,eO())}static updateA(e,r,n,i,a){return DM(FM(e,i,!0,n.length),e,r,n,a)}static updateB(e,r,n,i,a){return DM(FM(e,i,!1,r.length),e,r,n,a)}};function OM(t,e,r,n){let i=r.lineAt(t),a=n.lineAt(e);return i.to==t&&a.to==e&&tf+1&&v>d+1)break;h.push(p.offset(-c+n,-u+i)),[f,d]=IM(p.toA+n,p.toB+i,e,r),o++}s.push(new Xo(h,c,Math.max(c,f),u,Math.max(u,d),a))}return s}var Eh=1e3;function $M(t,e,r,n){let i=0,a=t.length;for(;;){if(i==a){let u=0,f=0;i&&({toA:u,toB:f}=t[i-1]);let d=e-(r?u:f);return[u+d,f+d]}let s=i+a>>1,o=t[s],[l,c]=r?[o.fromA,o.toA]:[o.fromB,o.toB];if(l>e)a=s;else if(c<=e)i=s+1;else return n?[o.fromA,o.fromB]:[o.toA,o.toB]}}function FM(t,e,r,n){let i=[];return e.iterChangedRanges((a,s,o,l)=>{let c=0,u=r?e.length:n,f=0,d=r?n:e.length;a>Eh&&([c,f]=$M(t,a-Eh,r,!0)),s=c?i[i.length-1]={fromA:p.fromA,fromB:p.fromB,toA:u,toB:d,diffA:p.diffA+g,diffB:p.diffB+v}:i.push({fromA:c,toA:u,fromB:f,toB:d,diffA:g,diffB:v})}),i}function DM(t,e,r,n,i){if(!t.length)return e;let a=[];for(let s=0,o=0,l=0,c=0;;s++){let u=s==t.length?null:t[s],f=u?u.fromA+o:r.length,d=u?u.fromB+l:n.length;for(;cf||v.toB+l>d)break;a.push(v.offset(o,l)),c++}if(!u)break;let h=u.toA+o+u.diffA,p=u.toB+l+u.diffB,g=tO(r.sliceString(f,h),n.sliceString(d,p),i);for(let v of rO(g,r,n,f,d,eO()))a.push(v);for(o+=u.diffA,l+=u.diffB;ch&&v.fromB+l>p)break;c++}}return a}var KU={scanLimit:500},nO=Ie.ViewPlugin.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=NM(t))}update(t){(t.docChanged||t.viewportChanged||ZU(t.startState,t.state)||JU(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=NM(t.view))}},{decorations:t=>t.deco}),Ah=ke.Prec.low((0,Ie.gutter)({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(nO))===null||e===void 0?void 0:e.gutter)||ke.RangeSet.empty}}));function ZU(t,e){return t.field(Zo,!1)!=e.field(Zo,!1)}function JU(t,e){return t.facet(Jn)!=e.facet(Jn)}var LM=Ie.Decoration.line({class:"cm-changedLine"}),QU=Ie.Decoration.mark({class:"cm-changedText"}),eG=Ie.Decoration.mark({tagName:"ins",class:"cm-insertedLine"}),tG=Ie.Decoration.mark({tagName:"del",class:"cm-deletedLine"}),jM=new class extends Ie.GutterMarker{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function rG(t,e,r,n,i,a){let s=r?t.fromA:t.fromB,o=r?t.toA:t.toB,l=0;if(s!=o){i.add(s,s,LM),i.add(s,o,r?tG:eG),a&&a.add(s,s,jM);for(let c=e.iterRange(s,o-1),u=s;!c.next().done;){if(c.lineBreak){u++,i.add(u,u,LM),a&&a.add(u,u,jM);continue}let f=u+c.value.length;if(n)for(;l=u)break;(s?f.toA:f.toB)>c&&(!a||!a(t.state,f,o,l))&&rG(f,t.state.doc,s,n,o,l)}return{deco:o.finish(),gutter:l&&l.finish()}}var Yo=class extends Ie.WidgetType{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},Ph=ke.StateEffect.define({map:(t,e)=>t.map(e)}),Kc=ke.StateField.define({create:()=>Ie.Decoration.none,update:(t,e)=>{for(let r of e.effects)if(r.is(Ph))return r.value;return t.map(e.changes)},provide:t=>Ie.EditorView.decorations.from(t)}),kh=.01;function BM(t,e){if(t.size!=e.size)return!1;let r=t.iter(),n=e.iter();for(;r.value;){if(r.from!=n.from||Math.abs(r.value.spec.widget.height-n.value.spec.widget.height)>1)return!1;r.next(),n.next()}return!0}function nG(t,e,r){let n=new ke.RangeSetBuilder,i=new ke.RangeSetBuilder,a=t.state.field(Kc).iter(),s=e.state.field(Kc).iter(),o=0,l=0,c=0,u=0,f=t.viewport,d=e.viewport;for(let v=0;;v++){let y=vkh&&(u+=k,i.add(l,l,Ie.Decoration.widget({widget:new Yo(k),block:!0,side:-1})))}if(b>o+1e3&&of.from&&ld.from){let S=Math.min(f.from-o,d.from-l);o+=S,l+=S,v--}else if(y)o=y.toA,l=y.toB;else break;for(;a.value&&a.fromkh&&i.add(e.state.doc.length,e.state.doc.length,Ie.Decoration.widget({widget:new Yo(h),block:!0,side:1}));let p=n.finish(),g=i.finish();BM(p,t.state.field(Kc))||t.dispatch({effects:Ph.of(p)}),BM(g,e.state.field(Kc))||e.dispatch({effects:Ph.of(g)})}var i1=ke.StateEffect.define({map:(t,e)=>e.mapPos(t)}),a1=class extends Ie.WidgetType{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let r=document.createElement("div");return r.className="cm-collapsedLines",r.textContent=e.state.phrase("$ unchanged lines",this.lines),r.addEventListener("click",n=>{let i=e.posAtDOM(n.target);e.dispatch({effects:i1.of(i)});let{side:a,sibling:s}=e.state.facet(Jn);s&&s().dispatch({effects:i1.of(iG(i,e.state.field(Zo),a=="a"))})}),r}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}};function iG(t,e,r){let n=0,i=0;for(let a=0;;a++){let s=a=t)return i+(t-n);[n,i]=r?[s.toA,s.toB]:[s.toB,s.toA]}}var aG=ke.StateField.define({create(t){return Ie.Decoration.none},update(t,e){t=t.map(e.changes);for(let r of e.effects)r.is(i1)&&(t=t.update({filter:n=>n!=r.value}));return t},provide:t=>Ie.EditorView.decorations.from(t)});function HM({margin:t=3,minSize:e=4}){return aG.init(r=>sG(r,t,e))}function sG(t,e,r){let n=new ke.RangeSetBuilder,i=t.facet(Jn).side=="a",a=t.field(Zo),s=1;for(let o=0;;o++){let l=o=r&&n.add(t.doc.line(c).from,t.doc.line(u).to,Ie.Decoration.replace({widget:new a1(f),block:!0})),!l)break;s=t.doc.lineAt(Math.min(t.doc.length,i?l.toA:l.toB)).number}return n.finish()}var oG=Ie.EditorView.styleModule.of(new Sh({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),lG=Ie.EditorView.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"\u299A"',marginInlineEnd:"7px"},"&:after":{content:'"\u299A"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),UM=new ke.Compartment,Th=new ke.Compartment,Rh=class{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||KU;let r=[ke.Prec.low(nO),lG,oG,Kc,Ie.EditorView.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(d=>d.effects.some(h=>h.is(Ph)))&&this.measure()})],n=[Jn.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&n.push(Ah);let i=ke.EditorState.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],Ie.EditorView.editorAttributes.of({class:"cm-merge-a"}),Th.of(n),r]}),a=[Jn.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&a.push(Ah);let s=ke.EditorState.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],Ie.EditorView.editorAttributes.of({class:"cm-merge-b"}),Th.of(a),r]});this.chunks=Xo.build(i.doc,s.doc,this.diffConf);let o=[Zo.init(()=>this.chunks),UM.of(e.collapseUnchanged?HM(e.collapseUnchanged):[])];i=i.update({effects:ke.StateEffect.appendConfig.of(o)}).state,s=s.update({effects:ke.StateEffect.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let l=e.orientation||"a-b",c=document.createElement("div");c.className="cm-mergeViewEditor";let u=document.createElement("div");u.className="cm-mergeViewEditor",this.editorDOM.appendChild(l=="a-b"?c:u),this.editorDOM.appendChild(l=="a-b"?u:c),this.a=new Ie.EditorView({state:i,parent:c,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new Ie.EditorView({state:s,parent:u,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,r){if(e.some(n=>n.docChanged)){let n=e[e.length-1],i=e.reduce((s,o)=>s.compose(o.changes),ke.ChangeSet.empty(e[0].startState.doc.length));this.chunks=r==this.a?Xo.updateA(this.chunks,n.newDoc,this.b.state.doc,i,this.diffConf):Xo.updateB(this.chunks,this.a.state.doc,n.newDoc,i,this.diffConf),r.update([...e,n.state.update({effects:n1.of(this.chunks)})]);let a=r==this.a?this.b:this.a;a.update([a.state.update({effects:n1.of(this.chunks)})]),this.scheduleMeasure()}else r.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let a=e.orientation!="b-a";if(a!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(a?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(a?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let a=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in e&&(a=!!e.revertControls,s=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(a,s,o)}let r="highlightChanges"in e,n="gutter"in e,i="collapseUnchanged"in e;if(r||n||i){let a=[],s=[];if(r||n){let o=this.a.state.facet(Jn),l=n?e.gutter!==!1:o.markGutter,c=r?e.highlightChanges!==!1:o.highlightChanges;a.push(Th.reconfigure([Jn.of({side:"a",sibling:()=>this.b,highlightChanges:c,markGutter:l}),l?Ah:[]])),s.push(Th.reconfigure([Jn.of({side:"b",sibling:()=>this.a,highlightChanges:c,markGutter:l}),l?Ah:[]]))}if(i){let o=UM.reconfigure(e.collapseUnchanged?HM(e.collapseUnchanged):[]);a.push(o),s.push(o)}this.a.dispatch({effects:a}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(e,r,n){this.revertToA=r,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=n,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){nG(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,r=e.firstChild,n=this.a.viewport,i=this.b.viewport;for(let a=0;an.to||s.fromB>i.to)break;if(s.fromA-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function GM(t){let e=t.nextSibling;return t.remove(),e}var Mh=require("@codemirror/search"),Jo=require("@codemirror/state"),tn=require("@codemirror/view");var fs=class extends Qo.ItemView{constructor(r,n){super(r);this.plugin=n;this.refreshing=!1;this.ignoreNextModification=!1;this.navigation=!0,this.registerEvent(this.app.workspace.on("obsidian-git:status-changed",()=>{this.mergeView?this.updateRefEditors().catch(console.error):this.createMergeView().catch(console.error)})),this.intervalRef=window.setInterval(()=>{this.mergeView&&this.updateRefEditors().catch(console.error)},30*1e3),this.registerEvent(this.app.vault.on("modify",i=>{this.state.bRef==null&&i.path===this.state.bFile&&(this.ignoreNextModification?this.ignoreNextModification=!1:this.updateModifiableEditor().catch(console.error))})),this.registerEvent(this.app.vault.on("delete",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("create",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("rename",(i,a)=>{this.state.bRef==null&&(i.path===this.state.bFile||a===this.state.bFile)&&this.createMergeView().catch(console.error)})),this.fileSaveDebouncer=(0,Qo.debounce)(i=>{let a=this.state.bFile;a&&(this.ignoreNextModification=!0,this.plugin.app.vault.adapter.write(a,i).catch(s=>this.plugin.displayError(s)))},1e3,!1)}getViewType(){return ca.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return ca.name}getIcon(){return ca.icon}async setState(r,n){this.state=r,Qo.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await super.setState(r,n),await this.createMergeView()}getState(){return this.state}onClose(){return window.clearInterval(this.intervalRef),super.onClose()}async onOpen(){return await this.createMergeView(),super.onOpen()}async gitShow(r,n){try{return await this.plugin.gitManager.show(r,n,!1)}catch(i){if(i instanceof Ir&&(i.message.includes("does not exist")||i.message.includes("unknown revision or path")||i.message.includes("exists on disk, but not in")||i.message.includes("fatal: bad object")))return i.message.includes("fatal: bad object")&&this.plugin.displayError(i.message),"";throw i}}async bShouldBeEditable(){if(this.state.bRef!=null)return!1;let r=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);return await this.app.vault.adapter.exists(r)}async updateModifiableEditor(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.b;this.refreshing=!0;let n=await this.app.vault.adapter.read(this.state.bFile);if(n!=r.state.doc.toString()){let i=r.state.update({changes:{from:0,to:r.state.doc.length,insert:n},annotations:[Jo.Transaction.remote.of(!0)]});r.dispatch(i)}this.refreshing=!1}async updateRefEditors(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.a,n=this.mergeView.b;this.refreshing=!0;let i=await this.gitShow(this.state.aRef,this.state.aFile),a;if(this.state.bRef!=null&&(a=await this.gitShow(this.state.bRef,this.state.bFile)),i!=r.state.doc.toString()){let s=r.state.update({changes:{from:0,to:r.state.doc.length,insert:i}});r.dispatch(s)}if(a!=null&&a!=n.state.doc.toString()){let s=n.state.update({changes:{from:0,to:n.state.doc.length,insert:a}});n.dispatch(s)}this.refreshing=!1}async createMergeView(){var r,n,i;if((r=this.state)!=null&&r.aFile&&((n=this.state)!=null&&n.bFile)&&!this.refreshing&&this.plugin.gitManager){this.refreshing=!0,(i=this.mergeView)==null||i.destroy();let a=this.containerEl.children[1];a.empty(),this.contentEl.addClass("git-split-diff-view"),this.bIsEditable=await this.bShouldBeEditable();let s=await this.gitShow(this.state.aRef,this.state.aFile),o;if(this.state.bRef!=null)o=await this.gitShow(this.state.bRef,this.state.bFile);else{let p=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);await this.app.vault.adapter.exists(p)?o=await this.app.vault.adapter.read(p):o=""}let l=[(0,tn.lineNumbers)(),(0,Mh.highlightSelectionMatches)(),(0,tn.drawSelection)(),tn.keymap.of([...el.standardKeymap,el.indentWithTab]),(0,el.history)(),(0,Mh.search)(),tn.EditorView.lineWrapping],c=this,u=tn.ViewPlugin.define(p=>({update(g){if(g.docChanged&&!g.transactions.some(v=>v.annotation(Jo.Transaction.remote))){let v=p.state.doc.toString();c.fileSaveDebouncer(v)}}})),f={doc:s,extensions:[...l,tn.EditorView.editable.of(!1),Jo.EditorState.readOnly.of(!0)]},d=[...l];this.bIsEditable?d.push(u):d.push(tn.EditorView.editable.of(!1),Jo.EditorState.readOnly.of(!0));let h={doc:o,extensions:d};a.addClasses(["cm-s-obsidian","mod-cm6","markdown-source-view","cm-content"]),this.mergeView=new Rh({b:h,a:f,collapseUnchanged:{minSize:6,margin:4},diffConfig:{scanLimit:this.bIsEditable?1e3:1e4},parent:a}),this.refreshing=!1}}};m();var C5=require("obsidian");m();m();m();var iO="5";var aO,sO,oO;typeof window!="undefined"&&((oO=(sO=(aO=window.__svelte)!=null?aO:window.__svelte={}).v)!=null?oO:sO.v=new Set).add(iO);m();m();m();var tl="[",ya="[!",ds="]",Ci={};var We=Symbol(),rn=Symbol("filename"),lO=Symbol("hmr"),cO="http://www.w3.org/1999/xhtml";m();m();m();m();var Oh=!0;m();var D=!1;m();var nn=Array.isArray,uO=Array.prototype.indexOf,Zc=Array.from,c1=Object.keys,Wt=Object.defineProperty,br=Object.getOwnPropertyDescriptor,u1=Object.getOwnPropertyDescriptors,f1=Object.prototype,fO=Array.prototype,rl=Object.getPrototypeOf,d1=Object.isExtensible;function h1(t){return typeof t=="function"}var ir=()=>{};function Jc(t){for(var e=0;e{t=n,e=i});return{promise:r,resolve:t,reject:e}}m();m();var _r=Symbol("$state"),Qc=Symbol("legacy props"),hO=Symbol(""),Ih=Symbol("proxy path"),nl=new class extends Error{constructor(){super(...arguments);vt(this,"name","StaleReactionError");vt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var eu=3,an=8;m();m();function pO(){if(D){let t=new Error("await_outside_boundary\nCannot await outside a `` with a `pending` snippet\nhttps://svelte.dev/e/await_outside_boundary");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/await_outside_boundary")}function tu(t){if(D){let e=new Error(`lifecycle_outside_component +\`${t}(...)\` can only be used during component initialisation +https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function mO(){if(D){let t=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function p1(){if(D){let t=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function gO(){if(D){let t=new Error(`derived_references_self A derived value cannot reference itself recursively -https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function w3(e){if(G){let t=new Error(`effect_in_teardown -\`${e}\` cannot be used inside an effect cleanup function -https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function b3(){if(G){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function _3(e){if(G){let t=new Error(`effect_orphan -\`${e}\` can only be used inside an effect (e.g. during component initialisation) -https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function x3(){if(G){let e=new Error(`effect_update_depth_exceeded -Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops -https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function S3(){if(G){let e=new Error(`hydration_failed +https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function vO(t){if(D){let e=new Error(`effect_in_teardown +\`${t}\` cannot be used inside an effect cleanup function +https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function yO(){if(D){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function wO(t){if(D){let e=new Error(`effect_orphan +\`${t}\` can only be used inside an effect (e.g. during component initialisation) +https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function bO(){if(D){let t=new Error(`effect_update_depth_exceeded +Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state +https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function _O(){if(D){let t=new Error("flush_sync_in_effect\nCannot use `flushSync` inside an effect\nhttps://svelte.dev/e/flush_sync_in_effect");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/flush_sync_in_effect")}function xO(){if(D){let t=new Error(`hydration_failed Failed to hydrate the application -https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function E3(e){if(G){let t=new Error(`props_invalid_value -Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value -https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function A3(e){if(G){let t=new Error(`rune_outside_svelte -The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files -https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function k3(){if(G){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function T3(){if(G){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function C3(){if(G){let e=new Error("state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state\nhttps://svelte.dev/e/state_unsafe_local_read");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function P3(){if(G){let e=new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}g();var ei=!1,ti=!1;g();g();g();var uc=null;function ri(e){let t=Error(),r=t.stack;if(r){let n=r.split(` -`),i=[` -`];for(let a=0;a0)){let n=Array.from(Na);var r=ii;vo(!0);try{for(let i of n)i.f&1024&&Zt(i,4096),Hi(i)&&ja(i)}finally{vo(r)}Na.clear()}return t}function M3(e,t){var r=e.reactions;if(r!==null)for(var n=ji(),i=r.length,a=0;an.line)return a.component}}return null}var x7=Symbol("ADD_OWNER");function Z0(e,t){if(t.owners!==null)for(;e;){if(e.owners===null){t.owners=null;break}for(let r of e.owners)t.owners.add(r);e=e.parent}}function D3(e,t){return e.owners===null?!0:e.owners.has(t)||e.parent!==null&&D3(e.parent,t)}function N3(e){var t,r;return(r=(t=e==null?void 0:e.owners)==null?void 0:t.values().next().value)!=null?r:N3(e.parent)}var S7=!1;function B3(e){if(S7)return;let t=L3();if(t&&!D3(e,t)){let r=N3(e);r[Yt]!==t[Yt]?X0(t[Yt],r[Yt]):X0()}}function xe(e,t=null,r){var c,u;var n=null;if(G&&ti&&(n=ri("CreatedAt")),typeof e!="object"||e===null||Sr in e)return e;let i=La(e);if(i!==U0&&i!==g3)return e;var a=new Map,s=on(e),o=ht(0);s&&a.set("length",ht(e.length,n));var l;if(G)if(l={parent:t,owners:null},r){let f=(u=(c=r.v)==null?void 0:c[Da])==null?void 0:u.owners;l.owners=f?new Set(f):null}else l.owners=t===null?pe!==null?new Set([pe.function]):null:new Set;return new Proxy(e,{defineProperty(f,d,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&k3();var p=a.get(d);return p===void 0?(p=ht(h.value,n),a.set(d,p)):re(p,xe(h.value,l)),!0},deleteProperty(f,d){var h=a.get(d);if(h===void 0)d in f&&a.set(d,ht(dt,n));else{if(s&&typeof d=="string"){var p=a.get("length"),m=Number(d);Number.isInteger(m)&&m=_.v&&re(_,k+1)}j3(o)}return!0},ownKeys(f){R(o);var d=Reflect.ownKeys(f).filter(m=>{var v=a.get(m);return v===void 0||v.v!==dt});for(var[h,p]of a)p.v!==dt&&!(h in f)&&d.push(h);return d},setPrototypeOf(){T3()}})}function j3(e,t=1){re(e,e.v+t)}function Md(e){return e!==null&&typeof e=="object"&&Sr in e?e[Sr]:e}function H3(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,s){let o=r.call(this,a,s);if(o===-1){for(let l=s!=null?s:0;l{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var K0,U3,G3,z3;function Od(){if(K0===void 0){K0=window,U3=document;var e=Element.prototype,t=Node.prototype;G3=Ur(t,"firstChild").get,z3=Ur(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0,G&&(e.__svelte_meta=null,H3())}}function qr(e=""){return document.createTextNode(e)}function Pt(e){return G3.call(e)}function $t(e){return z3.call(e)}function j(e,t){if(!ae)return Pt(e);var r=Pt(ue);if(r===null)r=ue.appendChild(qr());else if(t&&r.nodeType!==3){var n=qr();return r==null||r.before(n),tt(n),n}return tt(r),r}function cr(e,t){var i,a;if(!ae){var r=Pt(e);return r instanceof Comment&&r.data===""?$t(r):r}if(t&&((i=ue)==null?void 0:i.nodeType)!==3){var n=qr();return(a=ue)==null||a.before(n),tt(n),n}return ue}function Z(e,t=1,r=!1){let n=ae?ue:e;for(var i;t--;)i=n,n=$t(n);if(!ae)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var s=qr();return n===null?i==null||i.after(s):n.before(s),tt(s),s}return tt(n),n}function So(e){e.textContent=""}g();function Xe(e){var i;var t=2050;te===null?t|=256:te.f|=1048576;var r=de!==null&&de.f&2?de:null;let n={children:null,ctx:pe,deps:null,equals:Td,f:t,fn:e,reactions:null,v:null,version:0,parent:r!=null?r:te};return G&&ti&&(n.created=ri("CreatedAt")),r!==null&&((i=r.children)!=null?i:r.children=[]).push(n),n}function tv(e){let t=Xe(e);return t.equals=go,t}function Q0(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r{Lt(t)}}function q3(e){let t=Ua(64,e,!0);return(r={})=>new Promise(n=>{r.outro?un(t,()=>{Lt(t),n(void 0)}):(Lt(t),n(void 0))})}function Er(e){return Ua(4,e,!1)}function lr(e){return Ua(8,e,!0)}function ke(e){return G&&It(e,"name",{value:"{expression}"}),ur(e)}function ur(e,t=0){return Ua(24|t,e,!0)}function Nt(e,t=!0){return Ua(40,e,!0,t)}function lv(e){var t=e.teardown;if(t!==null){let r=$d,n=de;iv(!0),Rt(null);try{t.call(null)}finally{iv(r),Rt(n)}}}function cv(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r{Lt(e),t&&t()})}function dv(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Fd(e,t,r){if(!(e.f&8192)){if(e.f^=8192,e.transitions!==null)for(let s of e.transitions)(s.is_global||r)&&t.push(s);for(var n=e.first;n!==null;){var i=n.next,a=(n.f&65536)!==0||(n.f&32)!==0;Fd(n,t,a?r:!1),n=i}}}function zi(e){X3(e,!0)}function X3(e,t){if(e.f&8192){Hi(e)&&ja(e),e.f^=8192;for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;X3(r,i?t:!1),r=n}if(e.transitions!==null)for(let a of e.transitions)(a.is_global||t)&&a.in()}}g();var Ld=!1,K3=!1,hv=[],Z3=[];function J3(){Ld=!1;let e=hv.slice();hv=[],Ad(e)}function k7(){K3=!1;let e=Z3.slice();Z3=[],Ad(e)}function fr(e){Ld||(Ld=!0,queueMicrotask(J3)),hv.push(e)}function Q3(){Ld&&J3(),K3&&k7()}g();function mc(e){if(G){let t=new Error(`lifecycle_outside_component -\`${e}(...)\` can only be used during component initialisation -https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var aP=0,P7=1,eP=new WeakSet,Dd=!1,Nd=aP,gc=!1,Ao=null,ii=!1,$d=!1;function vo(e){ii=e}function iv(e){$d=e}var Ga=[],ko=0,vc=[],de=null;function Rt(e){de=e}var te=null;function ot(e){te=e}var ln=null;function O3(e){ln=e}var Ct=null,Ar=0,ni=null;function I3(e){ni=e}var sP=1,ai=!1,fc=null;var pe=null;var Wr=null;function Cd(){return++sP}function ji(){return!ei||pe!==null&&pe.l===null}function Hi(e){var s,o,l,c;var t=e.f;if(t&2048)return!0;if(t&4096){var r=e.deps,n=(t&256)!==0;if(r!==null){var i;if(t&512){for(i=0;ie.version)return!0}}(!n||te!==null&&!ai)&&Zt(e,1024)}return!1}function tP(e,t){for(var r=t;r!==null;){if(r.f&128)try{r.fn(e);return}catch(n){r.f^=128}r=r.parent}throw Dd=!1,e}function rP(e){return(e.f&16384)===0&&(e.parent===null||(e.parent.f&128)===0)}function To(e,t,r,n){var u,f;if(Dd){if(r===null&&(Dd=!1),rP(t))throw e;return}if(r!==null&&(Dd=!0),!G||n===null||!(e instanceof Error)||eP.has(e)){tP(e,t);return}eP.add(e);let i=[],a=(u=t.fn)==null?void 0:u.name;a&&i.push(a);let s=n;for(;s!==null;){if(G){var o=(f=s.function)==null?void 0:f[Yt];if(o){let d=o.split("/").pop();i.push(d)}}s=s.p}let l=/Firefox/.test(navigator.userAgent)?" ":" ";It(e,"message",{value:e.message+` -${i.map(d=>` -${l}in ${d}`).join("")} -`}),It(e,"component_stack",{value:i});let c=e.stack;if(c){let d=c.split(` -`),h=[];for(let p=0;p0)for(u.length=Ar+Ct.length,f=0;fe.fn)),vc=[]}function oP(){if(ko>1e3){ko=0;try{x3()}catch(e){if(G&&It(e,"stack",{value:""}),Ao!==null)if(G)try{To(e,Ao,null,null)}catch(t){throw nP(),t}else To(e,Ao,null,null);else throw G&&nP(),e}}ko++}function lP(e){var t=e.length;if(t!==0){oP();var r=ii;ii=!0;try{for(var n=0;n1001)return;let e=Ga;Ga=[],lP(e),gc||(ko=0,Ao=null,G&&(vc=[]))}function wo(e){Nd===aP&&(gc||(gc=!0,queueMicrotask(O7))),Ao=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024))return;t.f^=1024}}Ga.push(t)}function cP(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,a=(i&32)!==0,s=a&&(i&1024)!==0,o=r.next;if(!s&&!(i&8192))if(i&8){if(a)r.f^=1024;else try{Hi(r)&&ja(r)}catch(f){To(f,r,null,r.ctx)}var l=r.first;if(l!==null){r=l;continue}}else i&4&&n.push(r);if(o===null){let f=r.parent;for(;f!==null;){if(e===f)break e;var c=f.next;if(c!==null){r=c;continue e}f=f.parent}}r=o}for(var u=0;u0||i.length>0)&&Co(),ko=0,Ao=null,G&&(vc=[]),n}finally{Nd=t,Ga=r}}function R(e){var f,d;var t=e.f,r=(t&2)!==0;if(r&&t&16384){var n=rv(e);return pc(e),n}if(fc!==null&&fc.add(e),de!==null){ln!==null&&ln.includes(e)&&C3();var i=de.deps;Ct===null&&i!==null&&i[Ar]===e?Ar++:Ct===null?Ct=[e]:Ct.push(e),ni!==null&&te!==null&&te.f&1024&&!(te.f&32)&&ni.includes(e)&&(Zt(te,2048),wo(te))}else if(r&&e.deps===null)for(var a=e,s=a.parent,o=a;s!==null;)if(s.f&2){var l=s;o=l,s=l.parent}else{var c=s;(f=c.deriveds)!=null&&f.includes(o)||((d=c.deriveds)!=null?d:c.deriveds=[]).push(o);break}if(r&&(a=e,Hi(a)&&nv(a)),G&&ti&&uc!==null&&de!==null&&uc.reaction===de){if(e.debug)e.debug();else if(e.created){var u=uc.entries.get(e);u===void 0&&(u={read:[]},uc.entries.set(e,u)),u.read.push(ri("TracedAt"))}}return e.v}function Ue(e){let t=de;try{return de=null,e()}finally{de=t}}var I7=-7169;function Zt(e,t){e.f=e.f&I7|t}function Ze(e,t=!1,r){pe={p:pe,c:null,e:null,m:!1,s:e,x:null,l:null},ei&&!t&&(pe.l={s:null,u:null,r1:[],r2:ht(!1)}),G&&(pe.function=r,Wr=r)}function Ke(e){var s,o;let t=pe;if(t!==null){e!==void 0&&(t.x=e);let l=t.e;if(l!==null){var r=te,n=de;t.e=null;try{for(var i=0;i{if(r!==void 0)return r;A3(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}g();var uP=new Map;function fP(e,t){var r=uP.get(e);r||(r=new Set,uP.set(e,r)),r.add(t)}g();g();g();g();g();g();function pv(e){ae&&Pt(e)!==null&&So(e)}var dP=!1;function mv(){dP||(dP=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(let r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Hd(e){var t=de,r=te;Rt(null),ot(null);try{return e()}finally{Rt(t),ot(r)}}function gv(e,t,r,n=r){e.addEventListener(t,()=>Hd(r));let i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),mv()}var vv=new Set,Ud=new Set;function hP(e,t,r,n){function i(a){if(n.capture||Po.call(t,a),!a.cancelBubble)return Hd(()=>r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?fr(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function kr(e,t,r,n,i){var a={capture:n,passive:i},s=hP(e,t,r,a);(t===document.body||t===window||t===document)&&Xr(()=>{t.removeEventListener(e,s,a)})}function mt(e){for(var t=0;t{throw x});throw d}}finally{e.__root=t,delete e.currentTarget,Rt(u),ot(f)}}}g();var $7;function pP(){$7=void 0}g();g();function Gd(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function In(e,t){var r=te;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function se(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("");return()=>{if(ae)return In(ue,null),ue;i===void 0&&(i=Gd(a?e:""+e),r||(i=Pt(i)));var s=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Pt(s),l=s.lastChild;In(o,l)}else In(s,s);return s}}function si(){if(ae)return In(ue,null),ue;var e=document.createDocumentFragment(),t=document.createComment(""),r=qr();return e.append(t,r),In(t,r),e}function ne(e,t){if(ae){te.nodes_end=ue,Ft();return}e!==null&&e.before(t)}var zd=!0;function Oe(e,t){var n;var r=t==null?"":typeof t=="object"?t+"":t;r!==((n=e.__t)!=null?n:e.__t=e.nodeValue)&&(e.__t=r,e.nodeValue=r==null?"":r+"")}function Vi(e,t){return mP(e,t)}function wv(e,t){var s;Od(),t.intro=(s=t.intro)!=null?s:!1;let r=t.target,n=ae,i=ue;try{for(var a=Pt(r);a&&(a.nodeType!==8||a.data!==mo);)a=$t(a);if(!a)throw Ni;or(!0),tt(a),Ft();let o=mP(e,{...t,anchor:a});if(ue===null||ue.nodeType!==8||ue.data!==$a)throw bo(),Ni;return or(!1),o}catch(o){if(o===Ni)return t.recover===!1&&S3(),Od(),So(r),or(!1),Vi(e,t);throw o}finally{or(n),tt(i),pP()}}var Ro=new Map;function mP(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:s=!0}){Od();var o=new Set,l=f=>{for(var d=0;d{var f=r!=null?r:t.appendChild(qr());return Nt(()=>{if(a){Ze({});var d=pe;d.c=a}i&&(n.$$events=i),ae&&In(f,null),zd=s,c=e(f,n)||{},zd=!0,ae&&(te.nodes_end=ue),a&&Ke()}),()=>{var p;for(var d of o){t.removeEventListener(d,Po);var h=Ro.get(d);--h===0?(document.removeEventListener(d,Po),Ro.delete(d)):Ro.set(d,h)}Ud.delete(l),f!==r&&((p=f.parentNode)==null||p.removeChild(f))}});return yv.set(c,u),c}var yv=new WeakMap;function oi(e,t){let r=yv.get(e);return r?(yv.delete(e),r(t)):(G&&$3(),Promise.resolve())}g();g();g();g();function ye(e,t,r=!1){ae&&Ft();var n=e,i=null,a=null,s=dt,o=r?65536:0,l=!1;let c=(f,d=!0)=>{l=!0,u(d,f)},u=(f,d)=>{if(s===(s=f))return;let h=!1;if(ae){let p=n.data===Fa;!!s===p&&(n=xo(),tt(n),or(!1),h=!0)}s?(i?zi(i):d&&(i=Nt(()=>d(n))),a&&un(a,()=>{a=null})):(a?zi(a):d&&(a=Nt(()=>d(n))),i&&un(i,()=>{i=null})),h&&or(!0)};ur(()=>{l=!1,t(c),l||u(null,null)},o),ae&&(n=ue)}g();g();g();var yc=null;function Tr(e,t){return t}function G7(e,t,r,n){for(var i=[],a=t.length,s=0;s0&&i.length===0&&r!==null;if(o){var l=r.parentNode;So(l),l.append(r),n.clear(),Wi(e,t[0].prev,t[a-1].next)}dv(i,()=>{for(var c=0;c{var d=r(),h=on(d)?d:d==null?[]:cc(d),p=h.length;if(f&&p===0)return;f=p===0;let m=!1;if(ae){var v=s.data===Fa;v!==(p===0)&&(s=xo(),tt(s),or(!1),m=!0)}if(ae){for(var y=null,b,x=0;x0&&tt(xo())}if(!ae){var k=de;z7(h,o,s,i,t,(k.f&8192)!==0,n,r)}a!==null&&(p===0?u?zi(u):u=Nt(()=>a(s)):u!==null&&un(u,()=>{u=null})),m&&or(!0),r()}),ae&&(s=ue)}function z7(e,t,r,n,i,a,s,o){var ee,fe,J,Q;var l=(i&8)!==0,c=(i&3)!==0,u=e.length,f=t.items,d=t.first,h=d,p,m=null,v,y=[],b=[],x,E,_,k;if(l)for(k=0;k0){var L=i&4&&u===0?r:null;if(l){for(k=0;k{var Pe;if(v!==void 0)for(_ of v)(Pe=_.a)==null||Pe.apply()}),te.first=t.first&&t.first.e,te.last=m&&m.e}function V7(e,t,r,n){n&1&&yo(e.v,t),n&2?yo(e.i,r):e.i=r}function yP(e,t,r,n,i,a,s,o,l,c){var u=yc,f=(l&1)!==0,d=(l&16)===0,h=f?d?Bi(i):ht(i):i,p=l&2?ht(s):s;G&&f&&(h.debug=()=>{var v=typeof p=="number"?s:p.v;c()[v]});var m={i:p,v:h,k:a,a:null,e:null,prev:r,next:n};yc=m;try{return m.e=Nt(()=>o(e,h,p),ae),m.e.prev=r&&r.e,m.e.next=n&&n.e,r===null?t.first=m:(r.next=m,r.e.next=m.e),n!==null&&(n.prev=m,n.e.prev=m.e),m}finally{yc=u}}function gP(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==n;){var s=$t(a);i.before(a),a=s}}function Wi(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}g();g();g();g();g();g();function wt(e,t){fr(()=>{var i;var r=e.getRootNode(),n=r.host?r:(i=r.head)!=null?i:r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){let a=document.createElement("style");a.id=t.hash,a.textContent=t.code,n.appendChild(a),G&&fP(t.hash,a)}})}g();g();g();g();g();function me(e,t,r,n){var a;var i=(a=e.__attributes)!=null?a:e.__attributes={};if(ae&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||Z7(e,t,r!=null?r:"");return}i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[v3]=r),r==null?e.removeAttribute(t):typeof r!="string"&&X7(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var bP=new Map;function X7(e){var t=bP.get(e.nodeName);if(t)return t;bP.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=H0(n);for(var a in r)r[a].set&&t.push(a);n=La(n)}return t}function Z7(e,t,r){var n;G&&(t==="srcset"&&K7(e,r)||xv((n=e.getAttribute(t))!=null?n:"",r)||F3(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function xv(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function _P(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function K7(e,t){var r=_P(e.srcset),n=_P(t);return n.length===r.length&&n.every(([i,a],s)=>a===r[s][1]&&(xv(r[s][0],i)||xv(i,r[s][0])))}g();function lt(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}g();g();g();g();var J7=Ed?()=>performance.now():()=>Date.now(),fn={tick:e=>(Ed?requestAnimationFrame:xr)(e),now:()=>J7(),tasks:new Set};function xP(){let e=fn.now();fn.tasks.forEach(t=>{t.c(e)||(fn.tasks.delete(t),t.f())}),fn.tasks.size!==0&&fn.tick(xP)}function SP(e){let t;return fn.tasks.size===0&&fn.tick(xP),{promise:new Promise(r=>{fn.tasks.add(t={c:e,f:r})}),abort(){fn.tasks.delete(t)}}}function Vd(e,t){e.dispatchEvent(new CustomEvent(t))}function r9(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;let t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function EP(e){let t={},r=e.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let s=r9(i.trim());t[s]=a.trim()}return t}var n9=e=>e;function dn(e,t,r,n){var b;var i=(e&1)!==0,a=(e&2)!==0,s=i&&a,o=(e&4)!==0,l=s?"both":i?"in":"out",c,u=t.inert,f,d;function h(){var _;var x=de,E=te;Rt(null),ot(null);try{return c!=null?c:c=r()(t,(_=n==null?void 0:n())!=null?_:{},{direction:l})}finally{Rt(x),ot(E)}}var p={is_global:o,in(){var x;if(t.inert=u,!i){d==null||d.abort(),(x=d==null?void 0:d.reset)==null||x.call(d);return}a||f==null||f.abort(),Vd(t,"introstart"),f=Sv(t,h(),d,1,()=>{Vd(t,"introend"),f==null||f.abort(),f=c=void 0})},out(x){if(!a){x==null||x(),c=void 0;return}t.inert=!0,Vd(t,"outrostart"),d=Sv(t,h(),f,0,()=>{Vd(t,"outroend"),x==null||x()})},stop:()=>{f==null||f.abort(),d==null||d.abort()}},m=te;if(((b=m.transitions)!=null?b:m.transitions=[]).push(p),i&&zd){var v=o;if(!v){for(var y=m.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||(y.f&32768)!==0}v&&Er(()=>{Ue(()=>p.in())})}}function Sv(e,t,r,n,i){var a=n===1;if(G0(t)){var s,o=!1;return fr(()=>{if(!o){var v=t({direction:a?"in":"out"});s=Sv(e,v,r,n,i)}}),{abort:()=>{o=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(t!=null&&t.duration))return i(),{abort:xr,deactivate:xr,reset:xr,t:()=>n};let{delay:l=0,css:c,tick:u,easing:f=n9}=t;var d=[];if(a&&r===void 0&&(u&&u(0,1),c)){var h=EP(c(0,1));d.push(h,h)}var p=()=>1-n,m=e.animate(d,{duration:l});return m.onfinish=()=>{var A;var v=(A=r==null?void 0:r.t())!=null?A:1-n;r==null||r.abort();var y=n-v,b=t.duration*Math.abs(y),x=[];if(b>0){if(c)for(var E=Math.ceil(b/16.666666666666668),_=0;_<=E;_+=1){var k=v+y*f(_/E),w=c(k,1-k);x.push(EP(w))}p=()=>{var S=m.currentTime;return v+y*f(S/b)},u&&SP(()=>{if(m.playState!=="running")return!1;var S=p();return u(S,1-S),!0})}m=e.animate(x,{duration:b,fill:"forwards"}),m.onfinish=()=>{p=()=>n,u==null||u(n,1-n),i()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=xr)},deactivate:()=>{i=xr},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>p()}}g();g();function kv(e,t,r=t){var n=ji();gv(e,"input",i=>{G&&e.type==="checkbox"&&V0();var a=i?e.defaultValue:e.value;if(a=Ev(e)?Av(a):a,r(a),n&&a!==(a=t())){var s=e.selectionStart,o=e.selectionEnd;e.value=a!=null?a:"",o!==null&&(e.selectionStart=s,e.selectionEnd=Math.min(o,e.value.length))}}),(ae&&e.defaultValue!==e.value||Ue(t)==null&&e.value)&&r(Ev(e)?Av(e.value):e.value),lr(()=>{G&&e.type==="checkbox"&&V0();var i=t();Ev(e)&&i===Av(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i!=null?i:"")})}function Ev(e){var t=e.type;return t==="number"||t==="range"}function Av(e){return e===""?null:+e}g();g();g();g();g();g();function AP(e,t){return e===t||(e==null?void 0:e[Sr])===t}function Ge(e={},t,r,n){return Er(()=>{var i,a;return lr(()=>{i=a,a=(n==null?void 0:n())||[],Ue(()=>{e!==r(...a)&&(t(e,...a),i&&AP(r(...i),e)&&t(null,...i))})}),()=>{fr(()=>{a&&AP(r(...a),e)&&t(null,...a)})}}),e}g();g();g();g();g();g();g();g();g();function Tv(e){pe===null&&mc("onMount"),ei&&pe.l!==null?u9(pe).m.push(e):Dt(()=>{let t=Ue(e);if(typeof t=="function")return t})}function kP(e){pe===null&&mc("onDestroy"),Tv(()=>()=>Ue(e))}function u9(e){var r;var t=e.l;return(r=t.u)!=null?r:t.u={a:[],b:[],m:[]}}var qd=!1;function Cv(e){var t=qd;try{return qd=!1,[e(),qd]}finally{qd=t}}function TP(e){for(var t=te,r=te;t!==null&&!(t.f&96);)t=t.parent;try{return ot(t),e()}finally{ot(r)}}function Fn(e,t,r,n){var w,A;var i=(r&1)!==0,a=!ei||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,l=!1,c;s?[c,l]=Cv(()=>e[t]):c=e[t];var u=Sr in e||kd in e,f=(A=(w=Ur(e,t))==null?void 0:w.set)!=null?A:u&&s&&t in e?S=>e[t]=S:void 0,d=n,h=!0,p=!1,m=()=>(p=!0,h&&(h=!1,o?d=Ue(n):d=n),d);c===void 0&&n!==void 0&&(f&&a&&E3(t),c=m(),f&&f(c));var v;if(a)v=()=>{var S=e[t];return S===void 0?m():(h=!0,p=!1,S)};else{var y=TP(()=>(i?Xe:tv)(()=>e[t]));y.f|=131072,v=()=>{var S=R(y);return S!==void 0&&(d=void 0),S===void 0?d:S}}if(!(r&4))return v;if(f){var b=e.$$legacy;return function(S,T){return arguments.length>0?((!a||!T||b||l)&&f(T?v():S),S):v()}}var x=!1,E=!1,_=Bi(c),k=TP(()=>Xe(()=>{var S=v(),T=R(_);return x?(x=!1,E=!0,T):(E=!1,_.v=S)}));return i||(k.equals=go),function(S,T){if(fc!==null&&(x=E,v(),R(_)),arguments.length>0){let P=T?R(k):a&&s?xe(S):S;return k.equals(P)||(x=!0,re(_,P),p&&d!==void 0&&(d=P),Ue(()=>R(k))),S}return R(k)}}g();g();g();g();function CP(e){return new Pv(e)}var li,Zr,Pv=class{constructor(t){Cc(this,li);Cc(this,Zr);var a,s;var r=new Map,n=(o,l)=>{var c=Bi(l);return r.set(o,c),c};let i=new Proxy({...t.props||{},$$events:{}},{get(o,l){var c;return R((c=r.get(l))!=null?c:n(l,Reflect.get(o,l)))},has(o,l){var c;return l===kd?!0:(R((c=r.get(l))!=null?c:n(l,Reflect.get(o,l))),Reflect.has(o,l))},set(o,l,c){var u;return re((u=r.get(l))!=null?u:n(l,c),c),Reflect.set(o,l,c)}});Pc(this,Zr,(t.hydrate?wv:Vi)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:(a=t.intro)!=null?a:!1,recover:t.recover})),(!((s=t==null?void 0:t.props)!=null&&s.$$host)||t.sync===!1)&&Co(),Pc(this,li,i.$$events);for(let o of Object.keys(Ht(this,Zr)))o==="$set"||o==="$destroy"||o==="$on"||It(this,o,{get(){return Ht(this,Zr)[o]},set(l){Ht(this,Zr)[o]=l},enumerable:!0});Ht(this,Zr).$set=o=>{Object.assign(i,o)},Ht(this,Zr).$destroy=()=>{oi(Ht(this,Zr))}}$set(t){Ht(this,Zr).$set(t)}$on(t,r){Ht(this,li)[t]=Ht(this,li)[t]||[];let n=(...i)=>r.call(this,...i);return Ht(this,li)[t].push(n),()=>{Ht(this,li)[t]=Ht(this,li)[t].filter(i=>i!==n)}}$destroy(){Ht(this,Zr).$destroy()}};li=new WeakMap,Zr=new WeakMap;var S9;typeof HTMLElement=="function"&&(S9=class extends HTMLElement{constructor(t,r,n){super();Pr(this,"$$ctor");Pr(this,"$$s");Pr(this,"$$c");Pr(this,"$$cn",!1);Pr(this,"$$d",{});Pr(this,"$$r",!1);Pr(this,"$$p_d",{});Pr(this,"$$l",{});Pr(this,"$$l_u",new Map);Pr(this,"$$me");this.$$ctor=t,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return a=>{let s=document.createElement("slot");i!=="default"&&(s.name=i),ne(a,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=E9(this);for(let i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(let i of this.attributes){let a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Rv(a,i.value,this.$$p_d,"toProp"))}for(let i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=CP({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ov(()=>{lr(()=>{var i;this.$$r=!0;for(let a of j0(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];let s=Rv(a,this.$$d[a],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,s)}this.$$r=!1})});for(let i in this.$$l)for(let a of this.$$l[i]){let s=this.$$c.$on(i,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Rv(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return j0(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Rv(e,t,r,n){var a;let i=(a=r[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function E9(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}g();g();g();function wc(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(f){s(f)}}function l(u){try{c(n.throw(u))}catch(f){s(f)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}var Iv=require("obsidian");g();var Mv=require("obsidian");g();function k9(e){let t=e-1;return t*t*t+1}function Ln(e,{delay:t=0,duration:r=400,easing:n=k9,axis:i="y"}={}){let a=getComputedStyle(e),s=+a.opacity,o=i==="y"?"height":"width",l=parseFloat(a[o]),c=i==="y"?["top","bottom"]:["left","right"],u=c.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),h=parseFloat(a[`margin${u[0]}`]),p=parseFloat(a[`margin${u[1]}`]),m=parseFloat(a[`border${u[0]}Width`]),v=parseFloat(a[`border${u[1]}Width`]);return{delay:t,duration:r,easing:n,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*s};${o}: ${y*l}px;padding-${c[0]}: ${y*f}px;padding-${c[1]}: ${y*d}px;margin-${c[0]}: ${y*h}px;margin-${c[1]}: ${y*p}px;border-${c[0]}-width: ${y*m}px;border-${c[1]}-width: ${y*v}px;`}}g();var Yd=require("obsidian");var T9=se('
'),C9=se('
'),P9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function bc(e,t){Ze(t,!0),wt(e,P9);let r=xe([]),n=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");Dt(()=>{for(let y of r)y&&(0,Yd.setIcon)(y,y.getAttr("data-icon"))});function i(y){y.stopPropagation(),Ws(t.diff.path)?a(y):s(y)}function a(y){var b;y.stopPropagation();let x=t.view.app.vault.getAbstractFileByPath(t.diff.vaultPath);x instanceof Yd.TFile&&((b=nn(t.view.app,y))===null||b===void 0||b.openFile(x).catch(E=>t.view.plugin.displayError(E)))}function s(y){var b;t.view.plugin.tools.openDiff({event:y,aFile:(b=t.diff.fromPath)!==null&&b!==void 0?b:t.diff.path,aRef:`${t.diff.hash}^`,bFile:t.diff.path,bRef:t.diff.hash})}var o=C9();o.__click=i;var l=j(o),c=j(l),u=j(c,!0);ke(()=>Oe(u,Cn(t.diff.vaultPath))),B(c);var f=Z(c,2),d=j(f),h=j(d);{var p=y=>{var b=T9();b.__click=a,Ge(b,x=>r[0]=x,()=>r==null?void 0:r[0]),kr("auxclick",b,a),ne(y,b)};ye(h,y=>{qs(t.diff.vaultPath,t.view.app)&&y(p)})}B(d);var m=Z(d,2),v=j(m,!0);B(m),B(f),B(l),B(o),ke(()=>{me(l,"data-path",t.diff.vaultPath),me(l,"data-tooltip-position",R(n)),me(l,"aria-label",t.diff.vaultPath),me(m,"data-type",t.diff.status),Oe(v,t.diff.status)}),kr("auxclick",o,y=>{y.stopPropagation(),y.button==2?Tn(t.view.app,y,t.diff.vaultPath,t.view.leaf,"git-history"):i(y)}),ne(e,o),Ke()}mt(["click"]);g();var R9=se("
"),M9=(e,t,r)=>t(R(r)),O9=se(''),I9=se(''),F9=se('
'),$9={hash:"svelte-1lnl15d",code:"main.svelte-1lnl15d .nav-folder-title-content:where(.svelte-1lnl15d) {display:flex;align-items:center;}"};function _c(e,t){Ze(t,!0),wt(e,$9);let r=Fn(t,"topLevel",3,!1),n=xe({}),i=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function a(o){n[o.title]=!n[o.title]}var s=F9();Cr(s,21,()=>t.hierarchy.children,Tr,(o,l)=>{var c=si(),u=cr(c);{var f=h=>{var p=R9(),m=j(p);bc(m,{get diff(){return R(l).data},get view(){return t.view}}),B(p),ne(h,p)},d=h=>{var p=I9(),m=j(p);m.__click=[M9,a,l];var v=Z(j(m),2),y=Z(v,2),b=j(y,!0);B(y),B(m);var x=Z(m,2);{var E=_=>{var k=O9(),w=j(k);_c(w,{get hierarchy(){return R(l)},get plugin(){return t.plugin},get view(){return t.view}}),B(k),dn(3,k,()=>Ln,()=>({duration:150})),ne(_,k)};ye(x,_=>{n[R(l).title]||_(E)})}B(p),ke(()=>{lt(p,"is-collapsed",n[R(l).title]),me(m,"data-tooltip-position",R(i)),me(m,"aria-label",R(l).vaultPath),lt(v,"is-collapsed",n[R(l).title]),Oe(b,R(l).title)}),ne(h,p)};ye(u,h=>{R(l).data?h(f):h(d,!1)})}ne(o,c)}),B(s),ke(()=>lt(s,"topLevel",r())),ne(e,s),Ke()}mt(["click"]);var L9=(e,t)=>re(t,!R(t)),D9=se('
'),N9=se('
'),B9=se('
'),j9=se(''),H9=se('
'),U9={hash:"svelte-45h",code:""};function Ov(e,t){Ze(t,!0),wt(e,U9);let r=Xe(()=>({title:"",path:"",vaultPath:"",children:t.plugin.gitManager.getTreeStructure(t.log.diff.files)})),n=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left"),i=pt(!0);function a(_){let k=_.author.name;if(t.plugin.settings.authorInHistoryView=="full")return k;if(t.plugin.settings.authorInHistoryView=="initials")return k.split(" ").filter(A=>A.length>0).map(A=>A[0].toUpperCase()).join("")}var s=H9(),o=j(s),l=j(o);ke(()=>{var _;return me(l,"aria-label",`${t.log.refs.length>0?t.log.refs.join(", ")+` -`:""}${(_=t.log.author)==null?void 0:_.name} -${(0,Mv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat)} -${t.log.message}`)}),l.__click=[L9,i];var c=j(l),u=Z(c,2),f=j(u);{var d=_=>{var k=D9(),w=j(k,!0);ke(()=>Oe(w,t.log.refs.join(", "))),B(k),ne(_,k)};ye(f,_=>{t.log.refs.length>0&&_(d)})}var h=Z(f,2);{var p=_=>{var k=N9(),w=j(k,!0);ke(()=>Oe(w,a(t.log))),B(k),ne(_,k)};ye(h,_=>{var k;t.plugin.settings.authorInHistoryView!="hide"&&((k=t.log.author)!=null&&k.name)&&_(p)})}var m=Z(h,2);{var v=_=>{var k=B9(),w=j(k,!0);ke(()=>Oe(w,(0,Mv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat))),B(k),ne(_,k)};ye(m,_=>{t.plugin.settings.dateInHistoryView&&_(v)})}var y=Z(m,2),b=j(y,!0);B(y),B(u),B(l);var x=Z(l,2);{var E=_=>{var k=j9(),w=j(k);{var A=T=>{_c(T,{get hierarchy(){return R(r)},get plugin(){return t.plugin},get view(){return t.view},topLevel:!0})},S=T=>{var P=si(),I=cr(P);Cr(I,17,()=>t.log.diff.files,Tr,(N,L)=>{bc(N,{get view(){return t.view},get diff(){return R(L)}})}),ne(T,P)};ye(w,T=>{t.showTree?T(A):T(S,!1)})}B(k),dn(3,k,()=>Ln,()=>({duration:150})),ne(_,k)};ye(x,_=>{R(i)||_(E)})}B(o),B(s),ke(()=>{lt(o,"is-collapsed",R(i)),me(l,"data-tooltip-position",R(n)),lt(c,"is-collapsed",R(i)),Oe(b,t.log.message)}),ne(e,s),Ke()}mt(["click"]);function G9(e,t){t().catch(console.error)}var z9=(e,t,r,n)=>{re(t,!R(t)),(0,Iv.setIcon)(r[0],R(t)?"list":"folder"),n(n().settings.treeStructure=R(t),!0),n().saveSettings()},V9=se(''),W9=se('
'),q9={hash:"svelte-45h",code:""};function Fv(e,t){Ze(t,!0),wt(e,q9);let r=Fn(t,"plugin",15),n=pt(!1),i=xe([]),a=pt(void 0),s=pt(xe(r().settings.treeStructure)),o,l;Dt(()=>{l&&l.empty()}),o=t.view.app.workspace.on("obsidian-git:head-change",()=>void c().catch(console.error)),Dt(()=>{i.forEach(x=>(0,Iv.setIcon)(x,x.getAttr("data-icon")))}),kP(()=>{t.view.app.workspace.offref(o)}),Tv(()=>{let x=new IntersectionObserver(_=>{_[0].isIntersecting&&!R(n)&&u().catch(console.error)}),E=document.querySelector("#sentinel");return E&&x.observe(E),()=>{x.disconnect()}}),c().catch(console.error);function c(){return wc(this,void 0,void 0,function*(){var x;if(!r().gitReady){re(a,void 0);return}re(n,!0);let E=r().gitManager instanceof Ee,_;((x=R(a)===null||R(a)===void 0?void 0:R(a).length)!==null&&x!==void 0?x:0)==0?_=E?50:10:_=R(a).length,re(a,xe(yield r().gitManager.log(void 0,!1,_))),re(n,!1)})}function u(){return wc(this,void 0,void 0,function*(){var x;if(!r().gitReady||R(a)===void 0)return;re(n,!0);let _=r().gitManager instanceof Ee?50:10,k=yield r().gitManager.log(void 0,!1,_,(x=R(a).last())===null||x===void 0?void 0:x.hash);R(a).push(...k.slice(1)),re(n,!1)})}var f=W9(),d=j(f),h=j(d),p=j(h);p.__click=[z9,s,i,r],Ge(p,x=>i[0]=x,()=>i==null?void 0:i[0]);var m=Z(p,2);m.__click=[G9,c],Ge(m,x=>i[1]=x,()=>i==null?void 0:i[1]),B(h),B(d);var v=Z(d,2),y=j(v);{var b=x=>{var E=V9();Cr(E,21,()=>R(a),Tr,(_,k)=>{Ov(_,{get view(){return t.view},get showTree(){return R(s)},get log(){return R(k)},get plugin(){return r()}})}),B(E),ne(x,E)};ye(y,x=>{R(a)&&x(b)})}_o(4),B(v),B(f),ke(()=>{me(p,"data-icon",R(s)?"list":"folder"),lt(m,"loading",R(n))}),ne(e,f),Ke()}mt(["click"]);var xc=class extends PP.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return Lr.type}getDisplayText(){return Lr.name}getIcon(){return Lr.icon}onClose(){return this._view&&oi(this._view),super.onClose()}reload(){this._view&&oi(this._view),this._view=Vi(Fv,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var RP=require("obsidian"),Xd=class extends RP.FuzzySuggestModal{constructor(r,n){super(r.app);this.branches=n;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,n){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};g();var LP=require("obsidian");g();var qa=require("obsidian");g();var MP=require("obsidian"),qi=class extends MP.Modal{constructor(r,n,i){super(r);this.deletion=n;this.filename=i;this.resolve=null}myOpen(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText(`${this.deletion?"Delete":"Discard"} this file?`),r.createEl("p").setText(`Do you really want to ${this.deletion?"delete":"discard the changes of"} "${this.filename}"`);let i=r.createDiv({cls:"modal-button-container"}),a=i.createEl("button",{cls:"mod-warning",text:this.deletion?"Delete":"Discard"});a.addEventListener("click",()=>{this.resolve&&this.resolve(!0),this.close()}),a.addEventListener("keypress",()=>{this.resolve&&this.resolve(!0),this.close()});let s=i.createEl("button",{text:"Cancel"});s.addEventListener("click",()=>(this.resolve&&this.resolve(!1),this.close())),s.addEventListener("keypress",()=>(this.resolve&&this.resolve(!1),this.close()))}onClose(){let{contentEl:r}=this;r.empty()}};g();var Zd=require("obsidian");g();g();var Y9=Ve(OP()),Yi=require("obsidian");function za(e,t,r){let n=e.target;app.workspace.trigger("hover-link",{event:e,source:t.getViewType(),hoverParent:t,targetEl:n,linktext:r})}function X9(e,t){t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)&&za(e,t.view,t.change.vaultPath)}function Z9(e,t){e.stopPropagation(),t.manager.stage(t.change.path,!1).catch(r=>t.view.plugin.displayError(r)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function K9(e,t){e.stopPropagation();let r=t.change.workingDir=="U";new qi(t.view.app,r,t.change.vaultPath).myOpen().then(n=>{if(n===!0)return r?t.view.app.vault.adapter.remove(t.change.vaultPath).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")}):t.manager.discard(t.change.path).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})},n=>t.view.plugin.displayError(n))}var J9=se('
'),Q9=se('
'),eH={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function Ec(e,t){Ze(t,!0),wt(e,eH);let r=xe([]),n=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");Dt(()=>{for(let x of r)x&&(0,Zd.setIcon)(x,x.getAttr("data-icon"))});function i(x){x.stopPropagation(),Ws(t.change.path)?a(x):s(x)}function a(x){var E;x.stopPropagation();let _=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);_ instanceof Zd.TFile&&((E=nn(t.view.app,x))===null||E===void 0||E.openFile(_).catch(k=>t.view.plugin.displayError(k)))}function s(x){x.stopPropagation(),t.view.plugin.tools.openDiff({aFile:t.change.path,aRef:"",event:x})}var o=Q9();o.__mouseover=[X9,t],o.__click=i;var l=j(o),c=j(l),u=j(c,!0);ke(()=>Oe(u,Cn(t.change.vaultPath))),B(c);var f=Z(c,2),d=j(f),h=j(d);{var p=x=>{var E=J9();E.__click=a,Ge(E,_=>r[0]=_,()=>r==null?void 0:r[0]),kr("auxclick",E,a),ne(x,E)};ye(h,x=>{qs(t.change.vaultPath,t.view.app)&&x(p)})}var m=Z(h,2);m.__click=[K9,t],Ge(m,x=>r[1]=x,()=>r==null?void 0:r[1]);var v=Z(m,2);v.__click=[Z9,t],Ge(v,x=>r[2]=x,()=>r==null?void 0:r[2]),B(d);var y=Z(d,2),b=j(y,!0);B(y),B(f),B(l),B(o),ke(()=>{me(l,"data-path",t.change.vaultPath),me(l,"data-tooltip-position",R(n)),me(l,"aria-label",t.change.vaultPath),me(y,"data-type",t.change.workingDir),Oe(b,t.change.workingDir)}),kr("auxclick",o,x=>{x.stopPropagation(),x.button==2?Tn(t.view.app,x,t.change.vaultPath,t.view.leaf,"git-source-control"):i(x)}),ne(e,o),Ke()}mt(["mouseover","click"]);g();var IP=require("obsidian");function tH(e,t){t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)&&za(e,t.view,t.change.vaultPath)}var rH=se('
'),nH={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function Ac(e,t){Ze(t,!0),wt(e,nH);let r=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function n(f){var d;f.stopPropagation();let h=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);h instanceof IP.TFile&&((d=nn(t.view.app,f))===null||d===void 0||d.openFile(h).catch(p=>t.view.plugin.displayError(p)))}var i=rH();i.__mouseover=[tH,t],i.__click=n;var a=j(i),s=j(a),o=j(s,!0);ke(()=>Oe(o,Cn(t.change.vaultPath))),B(s);var l=Z(s,2),c=j(l),u=j(c,!0);B(c),B(l),B(a),B(i),ke(()=>{me(a,"data-path",t.change.vaultPath),me(a,"data-tooltip-position",R(r)),me(a,"aria-label",t.change.vaultPath),me(c,"data-type",t.change.workingDir),Oe(u,t.change.workingDir)}),kr("auxclick",i,f=>{f.stopPropagation(),f.button==2?Tn(t.view.app,f,t.change.vaultPath,t.view.leaf,"git-source-control"):n(f)}),ne(e,i),Ke()}mt(["mouseover","click"]);g();var Kd=require("obsidian");function iH(e,t){t.view.app.vault.getFileByPath(t.change.vaultPath)&&za(e,t.view,t.change.vaultPath)}function aH(e,t){e.stopPropagation(),t.manager.unstage(t.change.path,!1).catch(r=>t.view.plugin.displayError(r)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}var sH=se('
'),oH=se('
'),lH={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function kc(e,t){Ze(t,!0),wt(e,lH);let r=xe([]),n=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");Dt(()=>{for(let b of r)b&&(0,Kd.setIcon)(b,b.getAttr("data-icon"))});function i(b){b.stopPropagation(),Ws(t.change.path)?a(b):s(b)}function a(b){var x;b.stopPropagation();let E=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);E instanceof Kd.TFile&&((x=nn(t.view.app,b))===null||x===void 0||x.openFile(E).catch(_=>t.view.plugin.displayError(_)))}function s(b){b.stopPropagation(),t.view.plugin.tools.openDiff({aFile:t.change.path,aRef:"HEAD",bRef:"",event:b})}var o=oH();o.__mouseover=[iH,t],o.__click=i;var l=j(o),c=j(l),u=j(c,!0);ke(()=>Oe(u,Cn(t.change.vaultPath))),B(c);var f=Z(c,2),d=j(f),h=j(d);{var p=b=>{var x=sH();x.__click=a,Ge(x,E=>r[0]=E,()=>r==null?void 0:r[0]),ne(b,x)};ye(h,b=>{qs(t.change.vaultPath,t.view.app)&&b(p)})}var m=Z(h,2);m.__click=[aH,t],Ge(m,b=>r[1]=b,()=>r==null?void 0:r[1]),B(d);var v=Z(d,2),y=j(v,!0);B(v),B(f),B(l),B(o),ke(()=>{me(l,"data-path",t.change.vaultPath),me(l,"data-tooltip-position",R(n)),me(l,"aria-label",t.change.vaultPath),me(v,"data-type",t.change.index),Oe(y,t.change.index)}),kr("auxclick",o,b=>{b.stopPropagation(),b.button==2?Tn(t.view.app,b,t.change.vaultPath,t.view.leaf,"git-source-control"):i(b)}),ne(e,o),Ke()}mt(["mouseover","click"]);g();g();var cH=se(''),uH=se("
");function Va(e,t){Ze(t,!0);var r=uH(),n=j(r);{var i=a=>{var s=cH(),o=j(s),l=j(o),c=j(l,!0);B(l),B(o),B(s),ke(()=>{me(o,"aria-label","And "+(t.files.length-500)+" more files"),Oe(c,"And "+(t.files.length-500)+" more files")}),ne(a,s)};ye(n,a=>{t.files.length>500&&a(i)})}B(r),ne(e,r),Ke()}var dH=se("
"),hH=(e,t,r)=>t(R(r)),pH=(e,t,r)=>t(e,R(r).path),mH=se('
'),gH=(e,t,r)=>t(e,R(r)),vH=(e,t,r)=>t(e,R(r).path),yH=se('
',1),wH=se(''),bH=se(''),_H=se('
'),xH={hash:"svelte-hup5mn",code:"main.svelte-hup5mn .nav-folder-title:where(.svelte-hup5mn) {align-items:center;}"};function Wa(e,t){Ze(t,!0),wt(e,xH);var r,n;let i=Fn(t,"topLevel",3,!1),a=xe({});for(let p of t.hierarchy.children)a[p.title]=((n=(r=p.children)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>100;let s=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function o(p,m){p.stopPropagation(),t.plugin.gitManager.stageAll({dir:m}).catch(v=>t.plugin.displayError(v)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function l(p,m){p.stopPropagation(),t.plugin.gitManager.unstageAll({dir:m}).catch(v=>t.plugin.displayError(v)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function c(p,m){p.stopPropagation(),new qi(t.view.app,!1,m.vaultPath).myOpen().then(v=>{if(v===!0)return t.plugin.gitManager.discardAll({dir:m.path,status:t.plugin.cachedStatus}).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})},v=>t.plugin.displayError(v))}function u(p){a[p.title]=!a[p.title]}var f=_H(),d=j(f);Cr(d,17,()=>Wl(t.hierarchy.children,500),Tr,(p,m)=>{var v=si(),y=cr(v);{var b=E=>{var _=dH(),k=j(_);{var w=S=>{kc(S,{get change(){return R(m).data},get manager(){return t.plugin.gitManager},get view(){return t.view}})},A=S=>{var T=si(),P=cr(T);{var I=L=>{Ec(L,{get change(){return R(m).data},get manager(){return t.plugin.gitManager},get view(){return t.view}})},N=L=>{var ee=si(),fe=cr(ee);{var J=Q=>{Ac(Q,{get change(){return R(m).data},get view(){return t.view}})};ye(fe,Q=>{t.fileType==2&&Q(J)},!0)}ne(L,ee)};ye(P,L=>{t.fileType==1?L(I):L(N,!1)},!0)}ne(S,T)};ye(k,S=>{t.fileType==0?S(w):S(A,!1)})}B(_),ne(E,_)},x=E=>{var _=bH();_.__click=[hH,u,m];var k=j(_),w=Z(j(k),2),A=Z(w,2),S=j(A,!0);B(A);var T=Z(A,2),P=j(T),I=j(P);{var N=J=>{var Q=mH();Q.__click=[pH,l,m],ne(J,Q)},L=J=>{var Q=yH(),Pe=cr(Q);Pe.__click=[gH,c,m];var ge=Z(Pe,2);ge.__click=[vH,o,m],ne(J,Q)};ye(I,J=>{t.fileType==0?J(N):J(L,!1)})}_o(2),B(P),B(T),B(k);var ee=Z(k,2);{var fe=J=>{var Q=wH(),Pe=j(Q);Wa(Pe,{get hierarchy(){return R(m)},get plugin(){return t.plugin},get view(){return t.view},get fileType(){return t.fileType}}),B(Q),dn(3,Q,()=>Ln,()=>({duration:150})),ne(J,Q)};ye(ee,J=>{a[R(m).title]||J(fe)})}B(_),ke(()=>{lt(_,"is-collapsed",a[R(m).title]),me(k,"data-tooltip-position",R(s)),me(k,"aria-label",R(m).vaultPath),lt(w,"is-collapsed",a[R(m).title]),Oe(S,R(m).title)}),kr("auxclick",_,J=>Tn(t.view.app,J,R(m).vaultPath,t.view.leaf,"git-source-control")),ne(E,_)};ye(y,E=>{R(m).data?E(b):E(x,!1)})}ne(p,v)});var h=Z(d,2);Va(h,{get files(){return t.hierarchy.children}}),B(f),ke(()=>lt(f,"topLevel",i())),ne(e,f),Ke()}mt(["click"]);function SH(e,t,r,n,i,a){if(re(t,!0),R(r)){let s=R(r).staged.length>0;n().promiseQueue.addTask(()=>n().commit({fromAuto:!1,commitMessage:R(i),onlyStaged:s}).then(()=>re(i,xe(n().settings.commitMessage))).finally(a))}}function FP(e,t,r,n,i){re(t,!0),r().promiseQueue.addTask(()=>r().gitManager.stageAll({status:R(n)}).finally(i))}function $P(e,t,r,n,i){re(t,!0),r().promiseQueue.addTask(()=>r().gitManager.unstageAll({status:R(n)}).finally(i))}function EH(e,t,r,n){re(t,!0),r().promiseQueue.addTask(()=>r().push().finally(n))}function AH(e,t,r,n){re(t,!0),r().promiseQueue.addTask(()=>r().pullChangesFromRemote().finally(n))}function kH(e,t,r){e.stopPropagation(),new qi(t().app,!1,r().gitManager.getRelativeVaultPath("/")).myOpen().then(n=>{n===!0&&r().promiseQueue.addTask(()=>r().gitManager.discardAll({status:r().cachedStatus}).finally(()=>{t().app.workspace.trigger("obsidian-git:refresh")}))},console.error)}var TH=(e,t,r,n)=>{re(t,!R(t)),(0,qa.setIcon)(r[6],R(t)?"list":"folder"),n().settings.treeStructure=R(t),n().saveSettings()},CH=(e,t)=>re(t,""),PH=se('
'),RH=(e,t)=>re(t,!R(t)),MH=se(" ",1),OH=se(''),IH=(e,t)=>re(t,!R(t)),FH=se(" ",1),$H=se(''),LH=(e,t)=>re(t,!R(t)),DH=se(" ",1),NH=se(''),BH=se(''),jH=se(''),HH=se('
'),UH={hash:"svelte-11adhly",code:`.commit-msg-input.svelte-11adhly {width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field);}.git-commit-msg.svelte-11adhly {position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto;}main.svelte-11adhly .git-tools:where(.svelte-11adhly) .files-count:where(.svelte-11adhly) {padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center;}.nav-folder-title.svelte-11adhly {align-items:center;}.git-commit-msg-clear-button.svelte-11adhly {position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out;}.git-commit-msg-clear-button.svelte-11adhly:after {content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;mask-image:url("data:image/svg+xml,");mask-repeat:no-repeat;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat;}`};function Lv(e,t){Ze(t,!0),wt(e,UH);let r=Fn(t,"plugin",7),n=Fn(t,"view",7),i=pt(!1),a=pt(void 0),s=pt(xe([])),o=pt(xe(r().settings.commitMessage)),l=xe([]),c=pt(void 0),u=pt(void 0),f=pt(void 0),d=pt(!0),h=pt(!0),p=pt(!0),m=pt(0),v=pt(xe(r().settings.treeStructure));n().registerEvent(n().app.workspace.on("obsidian-git:loading-status",()=>re(i,!0))),n().registerEvent(n().app.workspace.on("obsidian-git:status-changed",()=>void b().catch(console.error))),n().plugin.cachedStatus==null?n().plugin.refresh().catch(console.error):b().catch(console.error),Dt(()=>{l.forEach(O=>(0,qa.setIcon)(O,O.getAttr("data-icon")))}),Dt(()=>{l.forEach(O=>{var he,ze;!O||O.id!="push"||(qa.Platform.isMobile?(O.removeClass("button-border"),R(m)>0&&O.addClass("button-border")):((he=O.firstElementChild)===null||he===void 0||he.removeAttribute("color"),R(m)>0&&((ze=O.firstElementChild)===null||ze===void 0||ze.setAttr("color","var(--text-accent)"))))})}),n().scope=new qa.Scope(r().app.scope),n().scope.register(["Ctrl"],"Enter",O=>y());function y(){if(re(i,!0),R(a)){let O=R(a).staged.length>0;r().promiseQueue.addTask(()=>r().commitAndSync({fromAutoBackup:!1,commitMessage:R(o),onlyStaged:O}).then(()=>{re(o,xe(r().settings.commitMessage))}).finally(x))}}function b(){return wc(this,void 0,void 0,function*(){if(!r().gitReady){re(a,void 0);return}if(re(m,xe(yield r().gitManager.getUnpushedCommits())),re(a,xe(r().cachedStatus)),re(i,!1),r().lastPulledFiles&&r().lastPulledFiles!=R(s)&&(re(s,xe(r().lastPulledFiles)),re(f,xe({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(s))}))),R(a)){let O=(he,ze)=>he.vaultPath.split("/").last().localeCompare(Cn(ze.vaultPath));R(a).changed.sort(O),R(a).staged.sort(O),re(c,xe({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(a).changed)})),re(u,xe({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(a).staged)}))}else re(c,void 0),re(u,void 0)})}function x(){n().app.workspace.trigger("obsidian-git:refresh")}let E=Xe(()=>(R(o).match(/\n/g)||[]).length+1||1);var _=HH(),k=j(_),w=j(k),A=j(w);A.__click=y,Ge(A,O=>l[0]=O,()=>l==null?void 0:l[0]);var S=Z(A,2);S.__click=[SH,i,a,r,o,x],Ge(S,O=>l[1]=O,()=>l==null?void 0:l[1]);var T=Z(S,2);T.__click=[FP,i,r,a,x],Ge(T,O=>l[2]=O,()=>l==null?void 0:l[2]);var P=Z(T,2);P.__click=[$P,i,r,a,x],Ge(P,O=>l[3]=O,()=>l==null?void 0:l[3]);var I=Z(P,2);I.__click=[EH,i,r,x],Ge(I,O=>l[4]=O,()=>l==null?void 0:l[4]);var N=Z(I,2);N.__click=[AH,i,r,x],Ge(N,O=>l[5]=O,()=>l==null?void 0:l[5]);var L=Z(N,2);L.__click=[TH,v,l,r],Ge(L,O=>l[6]=O,()=>l==null?void 0:l[6]);var ee=Z(L,2);ee.__click=x,Ge(ee,O=>l[7]=O,()=>l==null?void 0:l[7]),B(w),B(k);var fe=Z(k,2),J=j(fe);pv(J);var Q=Z(J,2);{var Pe=O=>{var he=PH();he.__click=[CH,o],me(he,"aria-label","Clear"),ne(O,he)};ye(Q,O=>{R(o)&&O(Pe)})}B(fe);var ge=Z(fe,2),z=j(ge);{var Y=O=>{var he=jH(),ze=j(he),gt=j(ze);gt.__click=[RH,h];var Re=j(gt),ct=Z(Re,4),rt=j(ct),Et=j(rt);Et.__click=[$P,i,r,a,x],Ge(Et,Bt=>l[8]=Bt,()=>l==null?void 0:l[8]),B(rt);var Ie=Z(rt,2),H=j(Ie,!0);B(Ie),B(ct),B(gt);var Je=Z(gt,2);{var D=Bt=>{var Kt=OH(),ci=j(Kt);{var Ya=jt=>{Wa(jt,{get hierarchy(){return R(u)},get plugin(){return r()},get view(){return n()},get fileType(){return 0},topLevel:!0})},Mo=jt=>{var Zi=MH(),Dn=cr(Zi);Cr(Dn,17,()=>Wl(R(a).staged,500),Tr,(Oo,Io)=>{kc(Oo,{get change(){return R(Io)},get view(){return n()},get manager(){return r().gitManager}})});var ui=Z(Dn,2);Va(ui,{get files(){return R(a).staged}}),ne(jt,Zi)};ye(ci,jt=>{R(v)?jt(Ya):jt(Mo,!1)})}B(Kt),dn(3,Kt,()=>Ln,()=>({duration:150})),ne(Bt,Kt)};ye(Je,Bt=>{R(h)&&Bt(D)})}B(ze);var q=Z(ze,2),ve=j(q);ve.__click=[IH,d];var Ne=j(ve),bt=Z(Ne,4),Xi=j(bt),Dv=j(Xi);Dv.__click=[kH,n,r];var Nv=Z(Dv,2);Nv.__click=[FP,i,r,a,x],Ge(Nv,Bt=>l[9]=Bt,()=>l==null?void 0:l[9]),B(Xi);var Bv=Z(Xi,2),NP=j(Bv,!0);B(Bv),B(bt),B(ve);var BP=Z(ve,2);{var jP=Bt=>{var Kt=$H(),ci=j(Kt);{var Ya=jt=>{Wa(jt,{get hierarchy(){return R(c)},get plugin(){return r()},get view(){return n()},get fileType(){return 1},topLevel:!0})},Mo=jt=>{var Zi=FH(),Dn=cr(Zi);Cr(Dn,17,()=>Wl(R(a).changed,500),Tr,(Oo,Io)=>{Ec(Oo,{get change(){return R(Io)},get view(){return n()},get manager(){return r().gitManager}})});var ui=Z(Dn,2);Va(ui,{get files(){return R(a).changed}}),ne(jt,Zi)};ye(ci,jt=>{R(v)?jt(Ya):jt(Mo,!1)})}B(Kt),dn(3,Kt,()=>Ln,()=>({duration:150})),ne(Bt,Kt)};ye(BP,Bt=>{R(d)&&Bt(jP)})}B(q);var HP=Z(q,2);{var UP=Bt=>{var Kt=BH(),ci=j(Kt);ci.__click=[LH,p];var Ya=Z(j(ci),4),Mo=j(Ya,!0);B(Ya),B(ci);var jt=Z(ci,2);{var Zi=Dn=>{var ui=NH(),Oo=j(ui);{var Io=Xa=>{Wa(Xa,{get hierarchy(){return R(f)},get plugin(){return r()},get view(){return n()},get fileType(){return 2},topLevel:!0})},GP=Xa=>{var jv=DH(),Hv=cr(jv);Cr(Hv,17,()=>R(s),Tr,(VP,WP)=>{Ac(VP,{get change(){return R(WP)},get view(){return n()}})});var zP=Z(Hv,2);Va(zP,{get files(){return R(s)}}),ne(Xa,jv)};ye(Oo,Xa=>{R(v)?Xa(Io):Xa(GP,!1)})}B(ui),dn(3,ui,()=>Ln,()=>({duration:150})),ne(Dn,ui)};ye(jt,Dn=>{R(p)&&Dn(Zi)})}B(Kt),ke(()=>{lt(Kt,"is-collapsed",!R(p)),Oe(Mo,R(s).length)}),ne(Bt,Kt)};ye(HP,Bt=>{R(s).length>0&&R(f)&&Bt(UP)})}B(he),ke(()=>{lt(ze,"is-collapsed",!R(h)),lt(Re,"is-collapsed",!R(h)),Oe(H,R(a).staged.length),lt(q,"is-collapsed",!R(d)),lt(Ne,"is-collapsed",!R(d)),Oe(NP,R(a).changed.length)}),ne(O,he)};ye(z,O=>{R(a)&&R(u)&&R(c)&&O(Y)})}B(ge),B(_),ke(()=>{me(_,"data-type",kt.type),me(L,"data-icon",R(v)?"list":"folder"),lt(ee,"loading",R(i)),me(J,"rows",R(E))}),kv(J,()=>R(o),O=>re(o,O)),ne(e,_),Ke()}mt(["click"]);var Tc=class extends LP.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return kt.type}getDisplayText(){return kt.name}getIcon(){return kt.icon}onClose(){return this._view&&oi(this._view),super.onClose()}reload(){this._view&&oi(this._view),this._view=Vi(Lv,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var Jd=class{constructor(t,r){this.statusBarEl=t;this.plugin=r;this.statusBarEl.addClass("mod-clickable"),this.statusBarEl.onClickEvent(n=>{this.plugin.switchBranch().catch(i=>r.displayError(i))})}async display(){if(this.plugin.gitReady){let t=await this.plugin.gitManager.branchInfo();t.current!=null?this.statusBarEl.setText(t.current):this.statusBarEl.empty()}else this.statusBarEl.empty()}remove(){this.statusBarEl.remove()}};var Qd=class extends we.Plugin{constructor(){super(...arguments);this.automaticsManager=new Jl(this);this.tools=new ec(this);this.localStorage=new cd(this);this.state={gitAction:0,offlineMode:!1};this.gitReady=!1;this.promiseQueue=new nd(this);this.intervalsToClear=[];this.lineAuthoringFeature=new rd(this)}setPluginState(r){var n;this.state=Object.assign(this.state,r),(n=this.statusBar)==null||n.display()}async updateCachedStatus(){var r,n;return this.app.workspace.trigger("obsidian-git:loading-status"),this.cachedStatus=await this.gitManager.status(),this.cachedStatus.conflicted.length>0?(this.localStorage.setConflict(!0),await((r=this.branchBar)==null?void 0:r.display())):(this.localStorage.setConflict(!1),await((n=this.branchBar)==null?void 0:n.display())),this.app.workspace.trigger("obsidian-git:status-changed",this.cachedStatus),this.cachedStatus}async refresh(){if(!this.gitReady)return;let r=this.app.workspace.getLeavesOfType(kt.type),n=this.app.workspace.getLeavesOfType(Lr.type);(this.settings.changedFilesInStatusBar||r.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)})||n.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)}))&&await this.updateCachedStatus().catch(i=>this.displayError(i)),this.app.workspace.trigger("obsidian-git:refreshed")}refreshUpdatedHead(){this.lineAuthoringFeature.refreshLineAuthorViews()}async onload(){console.log("loading "+this.manifest.name+" plugin: v"+this.manifest.version),Kl.plugin=this,this.localStorage.migrate(),await this.loadSettings(),await this.migrateSettings(),this.settingsTab=new Uf(this.app,this),this.addSettingTab(this.settingsTab),this.localStorage.getPluginDisabled()||(this.registerStuff(),this.app.workspace.onLayoutReady(()=>this.init({fromReload:!1}).catch(r=>this.displayError(r))))}onExternalSettingsChange(){this.reloadSettings().catch(r=>this.displayError(r))}async reloadSettings(){let r=JSON.stringify(this.settings);await this.loadSettings();let n=JSON.stringify(this.settings);r!==n&&(this.log("Reloading settings"),this.unloadPlugin(),await this.init({fromReload:!0}),this.app.workspace.getLeavesOfType(kt.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}),this.app.workspace.getLeavesOfType(Lr.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}))}registerStuff(){this.registerEvent(this.app.workspace.on("obsidian-git:refresh",()=>{this.refresh().catch(r=>this.displayError(r))})),this.registerEvent(this.app.workspace.on("obsidian-git:head-change",()=>{this.refreshUpdatedHead()})),this.registerEvent(this.app.workspace.on("file-menu",(r,n,i)=>{this.handleFileMenu(r,n,i,"file-manu")})),this.registerEvent(this.app.workspace.on("obsidian-git:menu",(r,n,i)=>{this.handleFileMenu(r,n,i,"obsidian-git:menu")})),this.registerEvent(this.app.workspace.on("active-leaf-change",r=>{this.onActiveLeafChange(r)})),this.registerEvent(this.app.vault.on("modify",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("delete",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("create",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("rename",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerView(kt.type,r=>new Tc(r,this)),this.registerView(Lr.type,r=>new xc(r,this)),this.registerView(Ti.type,r=>new Ra(r,this)),this.registerView(ki.type,r=>new Ia(r,this)),this.addRibbonIcon("git-pull-request","Open Git source control",async()=>{var i;let r=this.app.workspace.getLeavesOfType(kt.type),n;r.length===0?(n=(i=this.app.workspace.getRightLeaf(!1))!=null?i:this.app.workspace.getLeaf(),await n.setViewState({type:kt.type})):n=r.first(),await this.app.workspace.revealLeaf(n)}),this.registerHoverLinkSource(kt.type,{display:"Git View",defaultMod:!0}),this.lineAuthoringFeature.onLoadPlugin(),this.setRefreshDebouncer(),hC(this)}setRefreshDebouncer(){var r;(r=this.debRefresh)==null||r.cancel(),this.debRefresh=(0,we.debounce)(()=>{this.settings.refreshSourceControl&&this.refresh().catch(console.error)},this.settings.refreshSourceControlTimer,!0)}async addFileToGitignore(r,n){let i=this.gitManager.getRelativeRepoPath(r,!0),a=wT({isFolder:n,gitRelativePath:i});return await this.app.vault.adapter.append(this.gitManager.getRelativeVaultPath(".gitignore"),` -`+a),this.refresh()}handleFileMenu(r,n,i,a){if(!this.gitReady||!this.settings.showFileMenu||!n)return;let s;if(typeof n=="string"?s=n:s=n.path,i=="file-explorer-context-menu"&&(r.addItem(o=>{o.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof we.TFile?await this.gitManager.stage(n.path,!0):await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Staged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof we.TFile?await this.gitManager.unstage(n.path,!0):await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Unstaged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(l=>{this.addFileToGitignore(s,n instanceof we.TFolder).catch(c=>this.displayError(c))})})),i=="git-source-control"){r.addItem(l=>{l.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(c=>{this.addFileToGitignore(s,n instanceof we.TFolder).catch(u=>this.displayError(u))})});let o=this.app.vault.adapter;a==="obsidian-git:menu"&&o instanceof we.FileSystemAdapter&&(r.addItem(l=>{l.setTitle("Open in default app").setIcon("arrow-up-right").setSection("action").onClick(c=>{this.app.openWithDefaultApp(s)})}),r.addItem(l=>{l.setTitle("Show in system explorer").setIcon("arrow-up-right").setSection("action").onClick(c=>{window.electron.shell.showItemInFolder(DP.join(o.getBasePath(),s))})}))}}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,n;this.gitReady=!1,this.lineAuthoringFeature.deactivateFeature(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(n=this.statusBar)==null||n.remove(),this.statusBar=void 0,this.branchBar=void 0,this.gitManager.unload(),this.promiseQueue.clear();for(let i of this.intervalsToClear)window.clearInterval(i);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=Tx(je,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return we.Platform.isDesktopApp}async init({fromReload:r=!1}){var n;if(this.settings.showStatusBar&&!this.statusBar){let i=this.addStatusBarItem();this.statusBar=new id(i,this),this.intervalsToClear.push(window.setInterval(()=>{var a;return(a=this.statusBar)==null?void 0:a.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new Ee(this),await this.gitManager.setGitInstance()):this.gitManager=new sn(this);let i=await this.gitManager.checkRequirements();switch(i){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new we.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,this.setPluginState({gitAction:0}),we.Platform.isDesktop&&this.settings.showBranchStatusBar&&!this.branchBar){let a=this.addStatusBarItem();this.branchBar=new Jd(a,this),this.intervalsToClear.push(window.setInterval(()=>{var s;return void((s=this.branchBar)==null?void 0:s.display().catch(console.error))},6e4))}await((n=this.branchBar)==null?void 0:n.display()),this.lineAuthoringFeature.conditionallyActivateBySettings(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),await this.automaticsManager.init();break;default:this.log("Something weird happened. The 'checkRequirements' result is "+i)}}catch(i){this.displayError(i),console.error(i)}}async createNewRepo(){try{await this.gitManager.init(),new we.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let n=await new $e(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(n){let i="Vault Root",a=await new $e(this,{options:this.gitManager instanceof sn?[i]:[],placeholder:"Enter directory for clone. It needs to be empty or not existent.",allowEmpty:this.gitManager instanceof sn}).openAndGetResult();if(a==null)return;if(a===i&&(a="."),a=(0,we.normalizePath)(a),a==="/"&&(a="."),a==="."){let f=await new $e(this,{options:["NO","YES"],placeholder:`Does your remote repo contain a ${this.app.vault.configDir} directory at the root?`,onlySelection:!0}).openAndGetResult();if(f===void 0){new we.Notice("Aborted clone");return}else if(f==="YES"){let d="DELETE ALL YOUR LOCAL CONFIG AND PLUGINS";if(await new $e(this,{options:["Abort clone",d],placeholder:`To avoid conflicts, the local ${this.app.vault.configDir} directory needs to be deleted.`,onlySelection:!0}).openAndGetResult()===d)await this.app.vault.adapter.rmdir(this.app.vault.configDir,!0);else{new we.Notice("Aborted clone");return}}}let s=await new $e(this,{placeholder:"Specify depth of clone. Leave empty for full clone.",allowEmpty:!0}).openAndGetResult(),o;if(s!==""&&(o=parseInt(s),isNaN(o))){new we.Notice("Invalid depth. Aborting clone.");return}new we.Notice(`Cloning new repo into "${a}"`);let l=this.settings.basePath,c=a&&a!==".";c&&(this.settings.basePath=a);try{await this.gitManager.clone(Wg(n),a,o),new we.Notice("Cloned new repo."),new we.Notice("Please restart Obsidian"),c&&await this.saveSettings()}catch(u){this.displayError(u),this.settings.basePath=l,await this.saveSettings()}}}async isAllInitialized(){return this.gitReady||await this.init({fromReload:!0}),this.gitReady}async pullChangesFromRemote(){if(!await this.isAllInitialized())return;let r=await this.pull();if(r!==!1){if(r||this.displayMessage("Pull: Everything is up-to-date"),this.gitManager instanceof Ee){let n=await this.updateCachedStatus();n.conflicted.length>0&&(this.displayError(`You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted))}this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0})}}async commitAndSync({fromAutoBackup:r,requestCustomMessage:n=!1,commitMessage:i,onlyStaged:a=!1}){!await this.isAllInitialized()||(this.settings.syncMethod=="reset"&&this.settings.pullBeforePush&&await this.pull(),!await this.commit({fromAuto:r,requestCustomMessage:n,commitMessage:i,onlyStaged:a}))||(this.settings.syncMethod!="reset"&&this.settings.pullBeforePush&&await this.pull(),this.settings.disablePush||(await this.remotesAreSet()&&await this.gitManager.canPush()?await this.push():this.displayMessage("No commits to push")),this.setPluginState({gitAction:0}))}async commit({fromAuto:r,requestCustomMessage:n=!1,onlyStaged:i=!1,commitMessage:a,amend:s=!1}){if(!await this.isAllInitialized())return!1;try{let o=this.localStorage.getConflict(),l,c,u;if(this.gitManager instanceof Ee){if(await this.mayDeleteConflictFile(),c=await this.updateCachedStatus(),c.conflicted.length==0&&(o=!1),r&&c.conflicted.length>0)return this.displayError(`Did not commit, because you have conflicts in ${c.conflicted.length} ${c.conflicted.length==1?"file":"files"}. Please resolve them and commit per command.`),await this.handleConflict(c.conflicted),!1;l=[...c.changed,...c.staged]}else{if(r&&o)return this.displayError("Did not commit, because you have conflicts. Please resolve them and commit per command."),!1;if(o)await this.mayDeleteConflictFile(),c=await this.updateCachedStatus(),l=[...c.changed,...c.staged];else{let f=this.gitManager;i?l=await f.getStagedFiles():(u=await f.getUnstagedFiles(),l=u.map(({path:d})=>({vaultPath:this.gitManager.getRelativeVaultPath(d),path:d})))}}if(await this.tools.hasTooBigFiles(l))return this.setPluginState({gitAction:0}),!1;if(l.length!==0||o){let f=a!=null?a:a=r?this.settings.autoCommitMessage:this.settings.commitMessage;if(r&&this.settings.customMessageOnAutoBackup||n){!this.settings.disablePopups&&r&&new we.Notice("Auto backup: Please enter a custom commit message. Leave empty to abort");let p=await new ad(this).openAndGetResult();if(p!=null&&p!=""&&p!="...")f=p;else return this.setPluginState({gitAction:0}),!1}else if(this.gitManager instanceof Ee&&this.settings.commitMessageScript){let p=this.settings.commitMessageScript,m=this.localStorage.getHostname()||"",v=p.replace("{{hostname}}",m);v=v.replace("{{date}}",(0,we.moment)().format(this.settings.commitDateFormat));let y=await ql("sh",["-c",v],{cwd:this.gitManager.absoluteRepoPath});y.code!=0?this.displayError(y.stderr):y.stdout.trim().length==0?this.displayMessage("Stdout from commit message script is empty. Using default message."):f=y.stdout}let d;i?d=await this.gitManager.commit({message:f,amend:s}):d=await this.gitManager.commitAll({message:f,status:c,unstagedFiles:u,amend:s}),this.gitManager instanceof Ee&&await this.updateCachedStatus();let h=!1;d===void 0&&(h=!0,d=l.length),this.displayMessage(`Committed${h?" approx.":""} ${d} ${d==1?"file":"files"}`)}else this.displayMessage("No changes to commit");return this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(o){return this.displayError(o),!1}}async push(){if(!await this.isAllInitialized()||!await this.remotesAreSet())return!1;let r=this.localStorage.getConflict();try{this.gitManager instanceof Ee&&await this.mayDeleteConflictFile();let n;if(this.gitManager instanceof Ee&&(n=await this.updateCachedStatus()).conflicted.length>0)return this.displayError(`Cannot push. You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted),!1;if(this.gitManager instanceof sn&&r)return this.displayError("Cannot push. You have conflicts"),!1;this.log("Pushing....");let i=await this.gitManager.push();return i!==void 0&&(i>0?this.displayMessage(`Pushed ${i} ${i==1?"file":"files"} to remote`):this.displayMessage("No commits to push")),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(n){return n instanceof $s?this.handleNoNetworkError(n):this.displayError(n),!1}}async pull(){if(!await this.remotesAreSet())return!1;try{this.log("Pulling....");let r=await this.gitManager.pull()||[];return this.setPluginState({offlineMode:!1}),r.length>0&&(this.displayMessage(`Pulled ${r.length} ${r.length==1?"file":"files"} from remote`),this.lastPulledFiles=r),r.length}catch(r){return this.displayError(r),!1}}async fetch(){if(await this.remotesAreSet())try{await this.gitManager.fetch(),this.displayMessage("Fetched from remote"),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh")}catch(r){this.displayError(r)}}async mayDeleteConflictFile(){let r=this.app.vault.getAbstractFileByPath(Fs);r&&(this.app.workspace.iterateAllLeaves(n=>{var i;n.view instanceof we.MarkdownView&&((i=n.view.file)==null?void 0:i.path)==r.path&&n.detach()}),await this.app.vault.delete(r))}async stageFile(r){return await this.isAllInitialized()?(await this.gitManager.stage(r.path,!0),this.displayMessage(`Staged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async unstageFile(r){return await this.isAllInitialized()?(await this.gitManager.unstage(r.path,!0),this.displayMessage(`Unstaged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async switchBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo(),n=await new Xd(this,r.branches).openAndGetReslt();if(n!=null)return await this.gitManager.checkout(n),this.displayMessage(`Switched to ${n}`),this.app.workspace.trigger("obsidian-git:refresh"),await((i=this.branchBar)==null?void 0:i.display()),n}async switchRemoteBranch(){var a;if(!await this.isAllInitialized())return;let r=await this.selectRemoteBranch()||"",[n,i]=Fi(r);if(i!=null&&n!=null)return await this.gitManager.checkout(i,n),this.displayMessage(`Switched to ${r}`),await((a=this.branchBar)==null?void 0:a.display()),r}async createBranch(){var n;if(!await this.isAllInitialized())return;let r=await new $e(this,{placeholder:"Create new branch"}).openAndGetResult();if(r!=null)return await this.gitManager.createBranch(r),this.displayMessage(`Created new branch ${r}`),await((n=this.branchBar)==null?void 0:n.display()),r}async deleteBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo();r.current&&r.branches.remove(r.current);let n=await new $e(this,{options:r.branches,placeholder:"Delete branch",onlySelection:!0}).openAndGetResult();if(n!=null){let a=!1;if(!await this.gitManager.branchIsMerged(n)){let o=await new $e(this,{options:["YES","NO"],placeholder:"This branch isn't merged into HEAD. Force delete?",onlySelection:!0}).openAndGetResult();if(o!=="YES")return;a=o==="YES"}return await this.gitManager.deleteBranch(n,a),this.displayMessage(`Deleted branch ${n}`),await((i=this.branchBar)==null?void 0:i.display()),n}}async remotesAreSet(){return this.settings.updateSubmodules||(await this.gitManager.branchInfo()).tracking?!0:(new we.Notice("No upstream branch is set. Please select one."),await this.setUpstreamBranch())}async setUpstreamBranch(){let r=await this.selectRemoteBranch();return r==null?(this.displayError("Aborted. No upstream-branch is set!",1e4),this.setPluginState({gitAction:0}),!1):(await this.gitManager.updateUpstreamBranch(r),this.displayMessage(`Set upstream branch to ${r}`),this.setPluginState({gitAction:0}),!0)}async discardAll(){await this.gitManager.discardAll({status:this.cachedStatus}),new we.Notice("All local changes have been discarded. New files remain untouched."),this.app.workspace.trigger("obsidian-git:refresh")}async handleConflict(r){this.localStorage.setConflict(!0);let n;r!==void 0&&(n=["# Conflicts","Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push`","(This file will automatically be deleted before commit)","[[#Additional Instructions]] available below file list","",...r.map(i=>{let a=this.app.vault.getAbstractFileByPath(i);return a instanceof we.TFile?`- [[${this.app.metadataCache.fileToLinktext(a,"/")}]]`:`- Not a file: ${i}`}),` +https://svelte.dev/e/lifecycle_double_unmount`,hs,ps):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function $h(t){D?console.warn(`%c[svelte] state_proxy_equality_mismatch +%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results +https://svelte.dev/e/state_proxy_equality_mismatch`,hs,ps):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function OO(t){D?console.warn(`%c[svelte] transition_slide_display +%cThe \`slide\` transition does not work correctly for elements with \`display: ${t}\` +https://svelte.dev/e/transition_slide_display`,hs,ps):console.warn("https://svelte.dev/e/transition_slide_display")}var se=!1;function Yt(t){se=t}var ge;function et(t){if(t===null)throw ms(),Ci;return ge=t}function Xt(){return et(jt(ge))}function H(t){if(se){if(jt(ge)!==null)throw ms(),Ci;ge=t}}function il(t=1){if(se){for(var e=t,r=ge;e--;)r=jt(r);ge=r}}function gs(){for(var t=0,e=ge;;){if(e.nodeType===an){var r=e.data;if(r===ds){if(t===0)return e;t-=1}else(r===tl||r===ya)&&(t+=1)}var n=jt(e);e.remove(),e=n}}function Fh(t){if(!t||t.nodeType!==an)throw ms(),Ci;return t.data}m();m();m();m();function Dh(t){return t===this.v}function Lh(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function jh(t){return!Lh(t,this.v)}m();var _n=!1,Pi=!1,Qn=!1;m();m();m();var ru=null;function ei(t){let e=Error(),r=e.stack;if(!r)return null;let n=r.split(` +`),i=[` +`];for(let a=0;a"}`,a=e.ctx;a!==null;)i+=` +${n}in ${(o=a.function)==null?void 0:o[rn].split("/").pop()}`,a=a.p;return{message:t.message+` +${i} +`,stack:(l=t.stack)==null?void 0:l.split(` +`).filter(c=>!c.includes("svelte/src/internal")).join(` +`)}}}function FO(t){let e=v1.get(t);e&&(Wt(t,"message",{value:e.message}),Wt(t,"stack",{value:e.stack}))}m();var au=[],w1=[];function DO(){var t=au;au=[],Jc(t)}function fG(){var t=w1;w1=[],Jc(t)}function Lr(t){au.length===0&&queueMicrotask(DO),au.push(t)}function LO(){au.length>0&&DO(),w1.length>0&&fG()}m();var sne=589952;function Uh(){for(var t=ee.b;t!==null&&!t.has_pending_snippet();)t=t.parent;return t===null&&pO(),t}m();m();var Ii=null;function S1(t){Ii=t}var ou=new Set;function vs(t){var e=2050,r=oe!==null&&oe.f&2?oe:null;ee===null||r!==null&&r.f&256?e|=256:ee.f|=524288;let n={ctx:ye,deps:null,effects:null,equals:Dh,f:e,fn:t,reactions:null,rv:0,v:We,wv:0,parent:r!=null?r:ee,ac:null};return D&&Qn&&(n.created=ei("CreatedAt")),n}function E1(t,e){let r=ee;r===null&&mO();var n=r.b,i=void 0,a=jr(We),s=null,o=!oe;return jO(()=>{var h;D&&(Ii=ee);try{var l=t()}catch(p){l=Promise.reject(p)}D&&(Ii=null);var c=()=>l;i=(h=s==null?void 0:s.then(c,c))!=null?h:Promise.resolve(l),s=i;var u=xe,f=n.pending;o&&(n.update_pending_count(1),f||u.increment());let d=(p,g=void 0)=>{s=null,Ii=null,f||u.activate(),g?g!==nl&&(a.f|=8388608,ri(a,g)):(a.f&8388608&&(a.f^=8388608),ri(a,p),D&&e!==void 0&&(ou.add(a),setTimeout(()=>{ou.has(a)&&(PO(a.label,e),ou.delete(a))}))),o&&(n.update_pending_count(-1),f||u.decrement()),Vh()};if(i.then(d,p=>d(null,p||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),D&&(a.f|=4194304),new Promise(l=>{function c(u){function f(){u===i?l(a):c(i)}u.then(f,f)}c(i)})}function Ct(t){let e=vs(t);return Wh(e),e}function ys(t){let e=vs(t);return e.equals=jh,e}function Gh(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;rE1(l))).then(l=>{i==null||i.activate(),s();try{r([...t.map(n),...l])}catch(c){a.f&16384||al(c,a)}i==null||i.deactivate(),Vh()}).catch(l=>{o.error(l)})}function hG(){var t=ee,e=oe,r=ye;return function(){Nt(t),kt(e),ba(r),D&&S1(null)}}function Vh(){Nt(null),kt(null),ba(null),D&&S1(null)}var uu=new Set,xe=null,fu=null,_a=null,b1=new Set,Kh=[];function BO(){let t=Kh.shift();Kh.length>0&&queueMicrotask(BO),t()}var _s=[],Qh=null,k1=!1,Yh=!1,ol,ll,xa,du,hu,bs,cl,Sa,Ea,ul,pu,mu,An,HO,Xh,T1,Zh=class Zh{constructor(){yt(this,An);vt(this,"current",new Map);yt(this,ol,new Map);yt(this,ll,new Set);yt(this,xa,0);yt(this,du,null);yt(this,hu,!1);yt(this,bs,[]);yt(this,cl,[]);yt(this,Sa,[]);yt(this,Ea,[]);yt(this,ul,[]);yt(this,pu,[]);yt(this,mu,[]);vt(this,"skipped_effects",new Set)}process(e){var a;_s=[],fu=null;var r=null;if(uu.size>1){r=new Map,_a=new Map;for(let[s,o]of this.current)r.set(s,{v:s.v,wv:s.wv}),s.v=o;for(let s of uu)if(s!==this)for(let[o,l]of ue(s,ol))r.has(o)||(r.set(o,{v:o.v,wv:o.wv}),o.v=l)}for(let s of e)di(this,An,HO).call(this,s);if(ue(this,bs).length===0&&ue(this,xa)===0){di(this,An,T1).call(this);var n=ue(this,Sa),i=ue(this,Ea);It(this,Sa,[]),It(this,Ea,[]),It(this,ul,[]),fu=xe,xe=null,NO(n),NO(i),xe===null?xe=this:uu.delete(this),(a=ue(this,du))==null||a.resolve()}else di(this,An,Xh).call(this,ue(this,Sa)),di(this,An,Xh).call(this,ue(this,Ea)),di(this,An,Xh).call(this,ue(this,ul));if(r){for(let[s,{v:o,wv:l}]of r)s.wv<=l&&(s.v=o);_a=null}for(let s of ue(this,bs))Fi(s);for(let s of ue(this,cl))Fi(s);It(this,bs,[]),It(this,cl,[])}capture(e,r){ue(this,ol).has(e)||ue(this,ol).set(e,r),this.current.set(e,e.v)}activate(){xe=this}deactivate(){xe=null,fu=null;for(let e of b1)if(b1.delete(e),e(),xe!==null)break}neuter(){It(this,hu,!0)}flush(){_s.length>0?C1():di(this,An,T1).call(this),xe===this&&(ue(this,xa)===0&&uu.delete(this),this.deactivate())}increment(){It(this,xa,ue(this,xa)+1)}decrement(){if(It(this,xa,ue(this,xa)-1),ue(this,xa)===0){for(let e of ue(this,pu))mt(e,2048),ii(e);for(let e of ue(this,mu))mt(e,4096),ii(e);It(this,Sa,[]),It(this,Ea,[]),this.flush()}else this.deactivate()}add_callback(e){ue(this,ll).add(e)}settled(){var e;return((e=ue(this,du))!=null?e:It(this,du,dO())).promise}static ensure(){if(xe===null){let e=xe=new Zh;uu.add(xe),Yh||Zh.enqueue(()=>{xe===e&&e.flush()})}return xe}static enqueue(e){Kh.length===0&&queueMicrotask(BO),Kh.unshift(e)}};ol=new WeakMap,ll=new WeakMap,xa=new WeakMap,du=new WeakMap,hu=new WeakMap,bs=new WeakMap,cl=new WeakMap,Sa=new WeakMap,Ea=new WeakMap,ul=new WeakMap,pu=new WeakMap,mu=new WeakMap,An=new WeakSet,HO=function(e){var u;e.f^=1024;for(var r=e.first;r!==null;){var n=r.f,i=(n&96)!==0,a=i&&(n&1024)!==0,s=a||(n&8192)!==0||this.skipped_effects.has(r);if(!s&&r.fn!==null){if(i)r.f^=1024;else if(!(n&1024))if(n&4)ue(this,Ea).push(r);else if(_n&&n&8)ue(this,Sa).push(r);else if(n&4194304){var o=(u=r.b)!=null&&u.pending?ue(this,cl):ue(this,bs);o.push(r)}else Aa(r)&&(r.f&16&&ue(this,ul).push(r),Fi(r));var l=r.first;if(l!==null){r=l;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)r=c.next,c=c.parent}},Xh=function(e){for(let r of e)(r.f&2048?ue(this,pu):ue(this,mu)).push(r),mt(r,1024);e.length=0},T1=function(){if(!ue(this,hu))for(let e of ue(this,ll))e();ue(this,ll).clear()};var ti=Zh;function fl(t){_n&&ee!==null&&_O();var e=Yh;Yh=!0;try{var r;for(t&&(C1(),r=t());;){if(LO(),_s.length===0&&(xe==null||xe.flush(),_s.length===0))return Qh=null,r;C1()}}finally{Yh=e}}function C1(){var a;var t=xs;k1=!0;try{var e=0;for(P1(!0);_s.length>0;){var r=ti.ensure();if(e++>1e3){if(D){var n=new Map;for(let s of r.current.keys())for(let[o,l]of(a=s.updated)!=null?a:[]){var i=n.get(o);i||(i={error:l.error,count:0},n.set(o,i)),i.count+=l.count}for(let s of n.values())console.error(s.error)}pG()}r.process(_s),Di.clear()}}finally{k1=!1,P1(t),Qh=null}}function pG(){try{bO()}catch(t){D&&Wt(t,"stack",{value:""}),al(t,Qh)}}function NO(t){var e=t.length;if(e!==0){for(var r=0;ri&&n.f&1048576)break}}for(;r0&&!O1&&I1()}return e}function I1(){O1=!1;let t=Array.from(ws);for(let e of t)e.f&1024&&mt(e,4096),Aa(e)&&Fi(e);ws.clear()}function su(t){ie(t,t.v+1)}function GO(t,e){var r=t.reactions;if(r!==null)for(var n=on(),i=r.length,a=0;a{if(ka===s)return u();var f=oe,d=ka;kt(null),$1(s);var h=u();return kt(f),$1(d),h};n&&(r.set("length",Pe(t.length,a)),D&&(t=vG(t)));var l="";function c(u){l=u,sn(i,`${l} version`);for(let[f,d]of r)sn(d,Es(l,f))}return new Proxy(t,{defineProperty(u,f,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&AO();var h=r.get(f);return h===void 0?h=o(()=>{var p=Pe(d.value,a);return r.set(f,p),D&&typeof f=="string"&&sn(p,Es(l,f)),p}):ie(h,d.value,!0),!0},deleteProperty(u,f){var d=r.get(f);if(d===void 0){if(f in u){let h=o(()=>Pe(We,a));r.set(f,h),su(i),D&&sn(h,Es(l,f))}}else ie(d,We),su(i);return!0},get(u,f,d){var v;if(f===_r)return t;if(D&&f===Ih)return c;var h=r.get(f),p=f in u;if(h===void 0&&(!p||(v=br(u,f))!=null&&v.writable)&&(h=o(()=>{var y=Ne(p?u[f]:We),b=Pe(y,a);return D&&sn(b,Es(l,f)),b}),r.set(f,h)),h!==void 0){var g=R(h);return g===We?void 0:g}return Reflect.get(u,f,d)},getOwnPropertyDescriptor(u,f){var d=Reflect.getOwnPropertyDescriptor(u,f);if(d&&"value"in d){var h=r.get(f);h&&(d.value=R(h))}else if(d===void 0){var p=r.get(f),g=p==null?void 0:p.v;if(p!==void 0&&g!==We)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return d},has(u,f){var g;if(f===_r)return!0;var d=r.get(f),h=d!==void 0&&d.v!==We||Reflect.has(u,f);if(d!==void 0||ee!==null&&(!h||(g=br(u,f))!=null&&g.writable)){d===void 0&&(d=o(()=>{var v=h?Ne(u[f]):We,y=Pe(v,a);return D&&sn(y,Es(l,f)),y}),r.set(f,d));var p=R(d);if(p===We)return!1}return h},set(u,f,d,h){var k;var p=r.get(f),g=f in u;if(n&&f==="length")for(var v=d;vPe(We,a)),r.set(v+"",y),D&&sn(y,Es(l,v)))}if(p===void 0)(!g||(k=br(u,f))!=null&&k.writable)&&(p=o(()=>Pe(void 0,a)),ie(p,Ne(d)),r.set(f,p),D&&sn(p,Es(l,f)));else{g=p.v!==We;var b=o(()=>Ne(d));ie(p,b)}var E=Reflect.getOwnPropertyDescriptor(u,f);if(E!=null&&E.set&&E.set.call(h,d),!g){if(n&&typeof f=="string"){var S=r.get("length"),A=Number(f);Number.isInteger(A)&&A>=S.v&&ie(S,A+1)}su(i)}return!0},ownKeys(u){R(i);var f=Reflect.ownKeys(u).filter(p=>{var g=r.get(p);return g===void 0||g.v!==We});for(var[d,h]of r)h.v!==We&&!(d in u)&&f.push(d);return f},setPrototypeOf(){kO()}})}function Es(t,e){var r;return typeof e=="symbol"?`${t}[Symbol(${(r=e.description)!=null?r:""})]`:mG.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function ep(t){try{if(t!==null&&typeof t=="object"&&_r in t)return t[_r]}catch(e){}return t}var gG=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function vG(t){return new Proxy(t,{get(e,r,n){var i=Reflect.get(e,r,n);return gG.has(r)?function(...a){UO();var s=i.apply(this,a);return I1(),s}:i}})}function VO(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:r,lastIndexOf:n,includes:i}=t;t.indexOf=function(a,s){let o=r.call(this,a,s);if(o===-1){for(let l=s!=null?s:0;l{t.indexOf=r,t.lastIndexOf=n,t.includes=i}}var F1,WO,iu,qO,YO;function tp(){if(F1===void 0){F1=window,WO=document,iu=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;qO=br(e,"firstChild").get,YO=br(e,"nextSibling").get,d1(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),d1(r)&&(r.__t=void 0),D&&(t.__svelte_meta=null,VO())}}function Bt(t=""){return document.createTextNode(t)}function Ht(t){return qO.call(t)}function jt(t){return YO.call(t)}function G(t,e){if(!se)return Ht(t);var r=Ht(ge);if(r===null)r=ge.appendChild(Bt());else if(e&&r.nodeType!==eu){var n=Bt();return r==null||r.before(n),et(n),n}return et(r),r}function Ar(t,e){var i,a;if(!se){var r=Ht(t);return r instanceof Comment&&r.data===""?jt(r):r}if(e&&((i=ge)==null?void 0:i.nodeType)!==eu){var n=Bt();return(a=ge)==null||a.before(n),et(n),n}return ge}function te(t,e=1,r=!1){let n=se?ge:t;for(var i;e--;)i=n,n=jt(n);if(!se)return n;if(r&&(n==null?void 0:n.nodeType)!==eu){var a=Bt();return n===null?i==null||i.after(a):n.before(a),et(a),a}return et(n),n}function dl(t){t.textContent=""}function hl(){if(!_n)return!1;var t=ee.f;return(t&32768)!==0}function KO(t){ee===null&&oe===null&&wO(t),oe!==null&&oe.f&256&&ee===null&&yO(),Sn&&vO(t)}function yG(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function si(t,e,r,n=!0){var l;var i=ee;if(D)for(;i!==null&&i.f&131072;)i=i.parent;i!==null&&i.f&8192&&(t|=8192);var a={ctx:ye,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(D&&(a.component_function=xn),r)try{Fi(a),a.f|=32768}catch(c){throw At(a),c}else e!==null&&ii(a);var s=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&524288)===0;if(!s&&n&&(i!==null&&yG(a,i),oe!==null&&oe.f&2&&!(t&64))){var o=oe;((l=o.effects)!=null?l:o.effects=[]).push(a)}return a}function Hr(t){let e=si(8,null,!1);return mt(e,1024),e.teardown=t,e}function Zt(t){var i;KO("$effect"),D&&Wt(t,"name",{value:"$effect"});var e=ee.f,r=!oe&&(e&32)!==0&&(e&32768)===0;if(r){var n=ye;((i=n.e)!=null?i:n.e=[]).push(t)}else return g1(t)}function g1(t){return si(1048580,t,!1)}function L1(t){ti.ensure();let e=si(64,t,!0);return()=>{At(e)}}function ZO(t){ti.ensure();let e=si(64,t,!0);return(r={})=>new Promise(n=>{r.outro?ni(e,()=>{At(e),n(void 0)}):(At(e),n(void 0))})}function kr(t){return si(4,t,!1)}function jO(t){return si(4718592,t,!0)}function Kt(t,e=0){return si(8|e,t,!0)}function $e(t,e=[],r=[]){qh(e,r,n=>{si(8,()=>t(...n.map(R)),!0)})}function xr(t,e=0){var r=si(16|e,t,!0);return D&&(r.dev_stack=Mi),r}function Et(t,e=!0){return si(32,t,!0,e)}function j1(t){var e=t.teardown;if(e!==null){let r=Sn,n=oe;D1(!0),kt(null);try{e.call(null)}finally{D1(r),kt(n)}}}function N1(t,e=!1){var i;var r=t.first;for(t.first=t.last=null;r!==null;){(i=r.ac)==null||i.abort(nl);var n=r.next;r.f&64?r.parent=null:At(r,e),r=n}}function JO(t){for(var e=t.first;e!==null;){var r=e.next;e.f&32||At(e),e=r}}function At(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes_start!==null&&t.nodes_end!==null&&(QO(t.nodes_start,t.nodes_end),r=!0),N1(t,e&&!r),yu(t,0),mt(t,16384);var n=t.transitions;if(n!==null)for(let a of n)a.stop();j1(t);var i=t.parent;i!==null&&i.first!==null&&M1(t),D&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function QO(t,e){for(;t!==null;){var r=t===e?null:jt(t);t.remove(),t=r}}function M1(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function ni(t,e){var r=[];rp(t,r,!0),B1(r,()=>{At(t),e&&e()})}function B1(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function rp(t,e,r){if(!(t.f&8192)){if(t.f^=8192,t.transitions!==null)for(let s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var i=n.next,a=(n.f&65536)!==0||(n.f&32)!==0;rp(n,e,a?r:!1),n=i}}}function As(t){e5(t,!0)}function e5(t,e){if(t.f&8192){t.f^=8192,t.f&1024||(mt(t,2048),ii(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;e5(r,i?e:!1),r=n}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}m();var t5=null;var xs=!1;function P1(t){xs=t}var Sn=!1;function D1(t){Sn=t}var oe=null,Sr=!1;function kt(t){oe=t}var ee=null;function Nt(t){ee=t}var Er=null;function Wh(t){oe!==null&&(!_n||oe.f&2)&&(Er===null?Er=[t]:Er.push(t))}var or=null,Ur=0,Br=null;function zO(t){Br=t}var r5=1,wu=0,ka=wu;function $1(t){ka=t}var $i=!1;function cu(){return++r5}function Aa(t){var f,d;var e=t.f;if(e&2048)return!0;if(e&4096){var r=t.deps,n=(e&256)!==0;if(r!==null){var i,a,s=(e&512)!==0,o=n&&ee!==null&&!$i,l=r.length;if((s||o)&&(ee===null||!(ee.f&16384))){var c=t,u=c.parent;for(i=0;it.wv)return!0}(!n||ee!==null&&!$i)&&mt(t,1024)}return!1}function n5(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!_n&&(Er!=null&&Er.includes(t))))for(var i=0;i0)for(d.length=Ur+or.length,h=0;h{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(let r of t.target.elements)(e=r.__on_r)==null||e.call(r)})},{capture:!0}))}function ks(t){var e=oe,r=ee;kt(null),Nt(null);try{return t()}finally{kt(e),Nt(r)}}function G1(t,e,r,n=r){t.addEventListener(e,()=>ks(r));let i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),U1()}var z1=new Set,ap=new Set;function s5(t,e,r,n={}){function i(a){if(n.capture||pl.call(e,a),!a.cancelBubble)return ks(()=>r==null?void 0:r.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Lr(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function Gr(t,e,r,n,i){var a={capture:n,passive:i},s=s5(t,e,r,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Hr(()=>{e.removeEventListener(t,s,a)})}function gt(t){for(var e=0;e{throw E});throw d}}finally{t.__root=e,delete t.currentTarget,kt(u),Nt(f)}}}m();var _G;function o5(){_G=void 0}m();m();function sp(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("",""),e.content}function oi(t,e){var r=ee;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function fe(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,a=!t.startsWith("");return()=>{if(se)return oi(ge,null),ge;i===void 0&&(i=sp(a?t:""+t),r||(i=Ht(i)));var s=n||iu?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Ht(s),l=s.lastChild;oi(o,l)}else oi(s,s);return s}}function Li(){if(se)return oi(ge,null),ge;var t=document.createDocumentFragment(),e=document.createComment(""),r=Bt();return t.append(e,r),oi(e,r),t}function ae(t,e){if(se){ee.nodes_end=ge,Xt();return}t!==null&&t.before(e)}m();var AG=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var Xae=[...AG,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var kG=["touchstart","touchmove"];function c5(t){return kG.includes(t)}var TG=["$state","$state.raw","$derived","$derived.by"],Kae=[...TG,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];var op=!0;function Be(t,e){var n;var r=e==null?"":typeof e=="object"?e+"":e;r!==((n=t.__t)!=null?n:t.__t=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Ta(t,e){return u5(t,e)}function W1(t,e){var s;tp(),e.intro=(s=e.intro)!=null?s:!1;let r=e.target,n=se,i=ge;try{for(var a=Ht(r);a&&(a.nodeType!==an||a.data!==tl);)a=jt(a);if(!a)throw Ci;Yt(!0),et(a),Xt();let o=u5(t,{...e,anchor:a});if(ge===null||ge.nodeType!==an||ge.data!==ds)throw ms(),Ci;return Yt(!1),o}catch(o){if(o===Ci)return e.recover===!1&&xO(),tp(),dl(r),Yt(!1),Ta(t,e);throw o}finally{Yt(n),et(i),o5()}}var ml=new Map;function u5(t,{target:e,anchor:r,props:n={},events:i,context:a,intro:s=!0}){tp();var o=new Set,l=f=>{for(var d=0;d{var f=r!=null?r:e.appendChild(Bt());return Et(()=>{if(a){tt({});var d=ye;d.c=a}i&&(n.$$events=i),se&&oi(f,null),op=s,c=t(f,n)||{},op=!0,se&&(ee.nodes_end=ge),a&&rt()}),()=>{var p;for(var d of o){e.removeEventListener(d,pl);var h=ml.get(d);--h===0?(document.removeEventListener(d,pl),ml.delete(d)):ml.set(d,h)}ap.delete(l),f!==r&&((p=f.parentNode)==null||p.removeChild(f))}});return V1.set(c,u),c}var V1=new WeakMap;function ji(t,e){let r=V1.get(t);return r?(V1.delete(t),r(e)):(D&&MO(),Promise.resolve())}m();m();if(D){let t=function(e){if(!(e in globalThis)){let r;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(r!==void 0)return r;EO(e)},set:n=>{r=n}})}};t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}function q1(t){ye===null&&tu("onMount"),Pi&&ye.l!==null?MG(ye).m.push(t):Zt(()=>{let e=Ue(t);if(typeof e=="function")return e})}function d5(t){ye===null&&tu("onDestroy"),q1(()=>()=>Ue(t))}function MG(t){var r;var e=t.l;return(r=e.u)!=null?r:e.u={a:[],b:[],m:[]}}m();m();var p5=new Map;function m5(t,e){var r=p5.get(t);r||(r=new Set,p5.set(t,r)),r.add(e)}m();m();m();m();m();m();m();m();m();function be(t,e,r=!1){se&&Xt();var n=t,i=null,a=null,s=We,o=r?65536:0,l=!1;let c=(h,p=!0)=>{l=!0,d(p,h)};var u=null;function f(){u!==null&&(u.lastChild.remove(),n.before(u),u=null);var h=s?i:a,p=s?a:i;h&&As(h),p&&ni(p,()=>{s?a=null:i=null})}let d=(h,p)=>{if(s===(s=h))return;let g=!1;if(se){let A=Fh(n)===ya;!!s===A&&(n=gs(),et(n),Yt(!1),g=!0)}var v=hl(),y=n;if(v&&(u=document.createDocumentFragment(),u.append(y=Bt())),s?i!=null||(i=p&&Et(()=>p(y))):a!=null||(a=p&&Et(()=>p(y))),v){var b=xe,E=s?i:a,S=s?a:i;E&&b.skipped_effects.delete(E),S&&b.skipped_effects.add(S),b.add_callback(f)}else f();g&&Yt(!0)};xr(()=>{l=!1,e(c),l||d(null,null)},o),se&&(n=ge)}m();m();m();var bu=null;function zr(t,e){return e}function DG(t,e,r){for(var n=t.items,i=[],a=e.length,s=0;s0&&i.length===0&&r!==null;if(o){var l=r.parentNode;dl(l),l.append(r),n.clear(),li(t,e[0].prev,e[a-1].next)}B1(i,()=>{for(var c=0;c{var y=r();return nn(y)?y:y==null?[]:Zc(y)}),p,g;function v(){LG(g,p,o,d,s,i,e,n,r),a!==null&&(p.length===0?u?As(u):u=Et(()=>a(s)):u!==null&&ni(u,()=>{u=null}))}xr(()=>{var I;g!=null||(g=ee),p=R(h);var y=p.length;if(f&&y===0)return;f=y===0;let b=!1;if(se){var E=Fh(s)===ya;E!==(y===0)&&(s=gs(),et(s),Yt(!1),b=!0)}if(se){for(var S=null,A,k=0;k0&&et(gs())}if(se)y===0&&a&&(u=Et(()=>a(s)));else if(hl()){var _=new Set,T=xe;for(k=0;k0){var le=s&4&&f===0?i:null;if(c){for(w=0;w{var B;if(y!==void 0)for(k of y)(B=k.a)==null||B.apply()}),t.first=r.first&&r.first.e,t.last=v&&v.e;for(var ce of n.values())At(ce.e);n.clear()}function v5(t,e,r,n){n&1&&ri(t.v,e),n&2?ri(t.i,r):t.i=r}function X1(t,e,r,n,i,a,s,o,l,c,u){var f=bu,d=(l&1)!==0,h=(l&16)===0,p=d?h?Ss(i,!1,!1):jr(i):i,g=l&2?jr(s):s;D&&d&&(p.trace=()=>{var b=typeof g=="number"?s:g.v;c()[b]});var v={i:g,v:p,k:a,a:null,e:null,prev:r,next:n};bu=v;try{if(t===null){var y=document.createDocumentFragment();y.append(t=Bt())}return v.e=Et(()=>o(t,p,g,c),se),v.e.prev=r&&r.e,v.e.next=n&&n.e,r===null?u||(e.first=v):(r.next=v,r.e.next=v.e),n!==null&&(n.prev=v,n.e.prev=v.e),v}finally{bu=f}}function Y1(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,i=e?e.e.nodes_start:r,a=t.e.nodes_start;a!==null&&a!==n;){var s=jt(a);i.before(a),a=s}}function li(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}m();m();m();m();m();function Tn(t,e){kr(()=>{var i;var r=t.getRootNode(),n=r.host?r:(i=r.head)!=null?i:r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){let a=document.createElement("style");a.id=e.hash,a.textContent=e.code,n.appendChild(a),D&&m5(e.hash,a)}})}m();m();m();m();m();m();var w5=[...` +\r\f\xA0\v\uFEFF`];function b5(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var a=i.length,s=0;(s=n.indexOf(i,s))>=0;){var o=s+a;(s===0||w5.includes(n[s-1]))&&(o===n.length||w5.includes(n[o]))?n=(s===0?"":n.substring(0,s))+n.substring(o+1):s=o}}return n===""?null:n}m();function ot(t,e,r,n,i,a){var s=t.__className;if(se||s!==r||s===void 0){var o=b5(r,n,a);(!se||o!==t.getAttribute("class"))&&(o==null?t.removeAttribute("class"):e?t.className=o:t.setAttribute("class",o)),t.__className=r}else if(a&&i!==a)for(var l in a){var c=!!a[l];(i==null||c!==!!i[l])&&t.classList.toggle(l,c)}return a}m();m();var VG=Symbol("class"),WG=Symbol("style"),qG=Symbol("is custom element"),YG=Symbol("is html");function ve(t,e,r,n){var i=XG(t);if(se&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){n||ZG(t,e,r!=null?r:"");return}i[e]!==(i[e]=r)&&(e==="loading"&&(t[hO]=r),r==null?t.removeAttribute(e):typeof r!="string"&&KG(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function XG(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[qG]:t.nodeName.includes("-"),[YG]:t.namespaceURI===cO}}var _5=new Map;function KG(t){var e=_5.get(t.nodeName);if(e)return e;_5.set(t.nodeName,e=[]);for(var r,n=t,i=Element.prototype;i!==n;){r=u1(n);for(var a in r)r[a].set&&e.push(a);n=rl(n)}return e}function ZG(t,e,r){var n;D&&(e==="srcset"&&JG(t,r)||K1((n=t.getAttribute(e))!=null?n:"",r)||RO(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(r)))}function K1(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function x5(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function JG(t,e){var r=x5(t.srcset),n=x5(e);return n.length===r.length&&n.every(([i,a],s)=>a===r[s][1]&&(K1(r[s][0],i)||K1(i,r[s][0])))}m();m();m();var QG=Oh?()=>performance.now():()=>Date.now(),Cn={tick:t=>(Oh?requestAnimationFrame:ir)(t),now:()=>QG(),tasks:new Set};function S5(){let t=Cn.now();Cn.tasks.forEach(e=>{e.c(t)||(Cn.tasks.delete(e),e.f())}),Cn.tasks.size!==0&&Cn.tick(S5)}function E5(t){let e;return Cn.tasks.size===0&&Cn.tick(S5),{promise:new Promise(r=>{Cn.tasks.add(e={c:t,f:r})}),abort(){Cn.tasks.delete(e)}}}function up(t,e){ks(()=>{t.dispatchEvent(new CustomEvent(e))})}function nz(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function A5(t){let e={},r=t.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let s=nz(i.trim());e[s]=a.trim()}return e}var iz=t=>t;function Pn(t,e,r,n){var E;var i=(t&1)!==0,a=(t&2)!==0,s=i&&a,o=(t&4)!==0,l=s?"both":i?"in":"out",c,u=e.inert,f=e.style.overflow,d,h;function p(){return ks(()=>{var S;return c!=null?c:c=r()(e,(S=n==null?void 0:n())!=null?S:{},{direction:l})})}var g={is_global:o,in(){var S;if(e.inert=u,!i){h==null||h.abort(),(S=h==null?void 0:h.reset)==null||S.call(h);return}a||d==null||d.abort(),up(e,"introstart"),d=Z1(e,p(),h,1,()=>{up(e,"introend"),d==null||d.abort(),d=c=void 0,e.style.overflow=f})},out(S){if(!a){S==null||S(),c=void 0;return}e.inert=!0,up(e,"outrostart"),h=Z1(e,p(),d,0,()=>{up(e,"outroend"),S==null||S()})},stop:()=>{d==null||d.abort(),h==null||h.abort()}},v=ee;if(((E=v.transitions)!=null?E:v.transitions=[]).push(g),i&&op){var y=o;if(!y){for(var b=v.parent;b&&b.f&65536;)for(;(b=b.parent)&&!(b.f&16););y=!b||(b.f&32768)!==0}y&&kr(()=>{Ue(()=>g.in())})}}function Z1(t,e,r,n,i){var a=n===1;if(h1(e)){var s,o=!1;return Lr(()=>{if(!o){var v=e({direction:a?"in":"out"});s=Z1(t,v,r,n,i)}}),{abort:()=>{o=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(e!=null&&e.duration))return i(),{abort:ir,deactivate:ir,reset:ir,t:()=>n};let{delay:l=0,css:c,tick:u,easing:f=iz}=e;var d=[];if(a&&r===void 0&&(u&&u(0,1),c)){var h=A5(c(0,1));d.push(h,h)}var p=()=>1-n,g=t.animate(d,{duration:l,fill:"forwards"});return g.onfinish=()=>{var _;g.cancel();var v=(_=r==null?void 0:r.t())!=null?_:1-n;r==null||r.abort();var y=n-v,b=e.duration*Math.abs(y),E=[];if(b>0){var S=!1;if(c)for(var A=Math.ceil(b/16.666666666666668),k=0;k<=A;k+=1){var w=v+y*f(k/A),x=A5(c(w,1-w));E.push(x),S||(S=x.overflow==="hidden")}S&&(t.style.overflow="hidden"),p=()=>{var T=g.currentTime;return v+y*f(T/b)},u&&E5(()=>{if(g.playState!=="running")return!1;var T=p();return u(T,1-T),!0})}g=t.animate(E,{duration:b,fill:"forwards"}),g.onfinish=()=>{p=()=>n,u==null||u(n,1-n),i()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=ir)},deactivate:()=>{i=ir},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>p()}}m();m();function ey(t,e,r=e){var n=on(),i=new WeakSet;G1(t,"input",a=>{D&&t.type==="checkbox"&&p1();var s=a?t.defaultValue:t.value;if(s=J1(t)?Q1(s):s,r(s),xe!==null&&i.add(xe),n&&s!==(s=e())){var o=t.selectionStart,l=t.selectionEnd;t.value=s!=null?s:"",l!==null&&(t.selectionStart=o,t.selectionEnd=Math.min(l,t.value.length))}}),(se&&t.defaultValue!==t.value||Ue(e)==null&&t.value)&&(r(J1(t)?Q1(t.value):t.value),xe!==null&&i.add(xe)),Kt(()=>{var o;D&&t.type==="checkbox"&&p1();var a=e();if(t===document.activeElement){var s=(o=fu)!=null?o:xe;if(i.has(s))return}J1(t)&&a===Q1(t.value)||t.type==="date"&&!a&&!t.value||a!==t.value&&(t.value=a!=null?a:"")})}function J1(t){var e=t.type;return e==="number"||e==="range"}function Q1(t){return t===""?null:+t}m();m();m();m();m();function k5(t,e){return t===e||(t==null?void 0:t[_r])===e}function Ze(t={},e,r,n){return kr(()=>{var i,a;return Kt(()=>{i=a,a=(n==null?void 0:n())||[],Ue(()=>{t!==r(...a)&&(e(t,...a),i&&k5(r(...i),t)&&e(null,...i))})}),()=>{Lr(()=>{a&&k5(r(...a),t)&&e(null,...a)})}}),t}m();m();m();m();m();m();m();m();m();var dp=!1,Yde=Symbol();function ry(t){var e=dp;try{return dp=!1,[t(),dp]}finally{dp=e}}function cn(t,e,r,n){var E,S;var i=!Pi||(r&2)!==0,a=(r&8)!==0,s=(r&16)!==0,o=n,l=!0,c=()=>(l&&(l=!1,o=s?Ue(n):n),o),u;if(a){var f=_r in t||Qc in t;u=(S=(E=br(t,e))==null?void 0:E.set)!=null?S:f&&e in t?A=>t[e]=A:void 0}var d,h=!1;a?[d,h]=ry(()=>t[e]):d=t[e],d===void 0&&n!==void 0&&(d=c(),u&&(i&&SO(e),u(d)));var p;if(i?p=()=>{var A=t[e];return A===void 0?c():(l=!0,A)}:p=()=>{var A=t[e];return A!==void 0&&(o=void 0),A===void 0?o:A},i&&!(r&4))return p;if(u){var g=t.$$legacy;return function(A,k){return arguments.length>0?((!i||!k||g||h)&&u(k?p():A),A):p()}}var v=!1,y=(r&1?vs:ys)(()=>(v=!1,p()));D&&(y.label=e),a&&R(y);var b=ee;return function(A,k){if(arguments.length>0){let w=k?R(y):i&&a?Ne(A):A;return ie(y,w),v=!0,o!==void 0&&(o=w),A}return Sn&&v||b.f&16384?y.v:R(y)}}m();m();m();function T5(t){return new ny(t)}var Ni,un,ny=class{constructor(e){yt(this,Ni);yt(this,un);var a,s;var r=new Map,n=(o,l)=>{var c=Ss(l,!1,!1);return r.set(o,c),c};let i=new Proxy({...e.props||{},$$events:{}},{get(o,l){var c;return R((c=r.get(l))!=null?c:n(l,Reflect.get(o,l)))},has(o,l){var c;return l===Qc?!0:(R((c=r.get(l))!=null?c:n(l,Reflect.get(o,l))),Reflect.has(o,l))},set(o,l,c){var u;return ie((u=r.get(l))!=null?u:n(l,c),c),Reflect.set(o,l,c)}});It(this,un,(e.hydrate?W1:Ta)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),!_n&&(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&fl(),It(this,Ni,i.$$events);for(let o of Object.keys(ue(this,un)))o==="$set"||o==="$destroy"||o==="$on"||Wt(this,o,{get(){return ue(this,un)[o]},set(l){ue(this,un)[o]=l},enumerable:!0});ue(this,un).$set=o=>{Object.assign(i,o)},ue(this,un).$destroy=()=>{ji(ue(this,un))}}$set(e){ue(this,un).$set(e)}$on(e,r){ue(this,Ni)[e]=ue(this,Ni)[e]||[];let n=(...i)=>r.call(this,...i);return ue(this,Ni)[e].push(n),()=>{ue(this,Ni)[e]=ue(this,Ni)[e].filter(i=>i!==n)}}$destroy(){ue(this,un).$destroy()}};Ni=new WeakMap,un=new WeakMap;var yz;typeof HTMLElement=="function"&&(yz=class extends HTMLElement{constructor(e,r,n){super();vt(this,"$$ctor");vt(this,"$$s");vt(this,"$$c");vt(this,"$$cn",!1);vt(this,"$$d",{});vt(this,"$$r",!1);vt(this,"$$p_d",{});vt(this,"$$l",{});vt(this,"$$l_u",new Map);vt(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){let i=this.$$c.$on(e,r);this.$$l_u.set(r,i)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){let i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return a=>{let s=document.createElement("slot");i!=="default"&&(s.name=i),ae(a,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=wz(this);for(let i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=e(i),r.default=!0):r[i]=e(i));for(let i of this.attributes){let a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=iy(a,i.value,this.$$p_d,"toProp"))}for(let i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=T5({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=L1(()=>{Kt(()=>{var i;this.$$r=!0;for(let a of c1(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];let s=iy(a,this.$$d[a],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,s)}this.$$r=!1})});for(let i in this.$$l)for(let a of this.$$l[i]){let s=this.$$c.$on(i,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(e,r,n){var i;this.$$r||(e=this.$$g_p(e),this.$$d[e]=iy(e,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return c1(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function iy(t,e,r,n){var a;let i=(a=r[t])==null?void 0:a.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function wz(t){let e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}m();m();function Ts(t,e,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(f){s(f)}}function l(u){try{c(n.throw(u))}catch(f){s(f)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(t,e||[])).next())})}var ly=require("obsidian");m();var sy=require("obsidian");m();function bz(t){let e=t-1;return e*e*e+1}var ay=!1;function ui(t,{delay:e=0,duration:r=400,easing:n=bz,axis:i="y"}={}){let a=getComputedStyle(t);D&&!ay&&/(contents|inline|table)/.test(a.display)&&(ay=!0,Promise.resolve().then(()=>ay=!1),OO(a.display));let s=+a.opacity,o=i==="y"?"height":"width",l=parseFloat(a[o]),c=i==="y"?["top","bottom"]:["left","right"],u=c.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),h=parseFloat(a[`margin${u[0]}`]),p=parseFloat(a[`margin${u[1]}`]),g=parseFloat(a[`border${u[0]}Width`]),v=parseFloat(a[`border${u[1]}Width`]);return{delay:e,duration:r,easing:n,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*s};${o}: ${y*l}px;padding-${c[0]}: ${y*f}px;padding-${c[1]}: ${y*d}px;margin-${c[0]}: ${y*h}px;margin-${c[1]}: ${y*p}px;border-${c[0]}-width: ${y*g}px;border-${c[1]}-width: ${y*v}px;min-${o}: 0`}}m();var hp=require("obsidian");var _z=fe('
'),xz=fe('
'),Sz={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function _u(t,e){tt(e,!0),Tn(t,Sz);let r=Ne([]),n=Ct(()=>e.view.leaf.getRoot().side=="left"?"right":"left");Zt(()=>{for(let y of r)y&&(0,hp.setIcon)(y,y.getAttr("data-icon"))});function i(y){y.stopPropagation(),Io(e.diff.path)?a(y):s(y)}function a(y){var b;y.stopPropagation();let E=e.view.app.vault.getAbstractFileByPath(e.diff.vaultPath);E instanceof hp.TFile&&((b=vn(e.view.app,y))===null||b===void 0||b.openFile(E).catch(S=>e.view.plugin.displayError(S)))}function s(y){var b;e.view.plugin.tools.openDiff({event:y,aFile:(b=e.diff.fromPath)!==null&&b!==void 0?b:e.diff.path,aRef:`${e.diff.hash}^`,bFile:e.diff.path,bRef:e.diff.hash})}var o=xz();o.__click=i;var l=G(o),c=G(l),u=G(c,!0);H(c);var f=te(c,2),d=G(f),h=G(d);{var p=y=>{var b=_z();b.__click=a,Ze(b,E=>r[0]=E,()=>r==null?void 0:r[0]),Gr("auxclick",b,a),ae(y,b)};be(h,y=>{$o(e.diff.vaultPath,e.view.app)&&y(p)})}H(d);var g=te(d,2),v=G(g,!0);H(g),H(f),H(l),H(o),$e(y=>{ve(l,"data-path",e.diff.vaultPath),ve(l,"data-tooltip-position",R(n)),ve(l,"aria-label",e.diff.vaultPath),Be(u,y),ve(g,"data-type",e.diff.status),Be(v,e.diff.status)},[()=>Kn(e.diff.vaultPath)]),Gr("auxclick",o,y=>{y.stopPropagation(),y.button==2?Xn(e.view.app,y,e.diff.vaultPath,e.view.leaf,"git-history"):i(y)}),ae(t,o),rt()}gt(["click"]);m();var Ez=fe("
"),Az=(t,e,r)=>e(t,R(r)),kz=fe(''),Tz=fe('
'),Cz=fe("
"),Pz={hash:"svelte-1lnl15d",code:"main.svelte-1lnl15d .nav-folder-title-content:where(.svelte-1lnl15d) {display:flex;align-items:center;}"};function xu(t,e){tt(e,!0),Tn(t,Pz);let r=cn(e,"topLevel",3,!1),n=cn(e,"closed",15),i=Ct(()=>e.view.leaf.getRoot().side=="left"?"right":"left");function a(l,c){l.stopPropagation(),n(n()[c.path]=!n()[c.path],!0)}var s=Cz();let o;Vr(s,21,()=>e.hierarchy.children,zr,(l,c)=>{var u=Li(),f=Ar(u);{var d=p=>{var g=Ez(),v=G(g);_u(v,{get diff(){return R(c).data},get view(){return e.view}}),H(g),ae(p,g)},h=p=>{var g=Tz();let v;var y=G(g);y.__click=[Az,a,c];var b=te(G(y),2);let E;var S=te(b,2),A=G(S,!0);H(S),H(y);var k=te(y,2);{var w=x=>{var _=kz(),T=G(_);xu(T,{get hierarchy(){return R(c)},get plugin(){return e.plugin},get view(){return e.view},get closed(){return n()},set closed(C){n(C)}}),H(_),Pn(3,_,()=>ui,()=>({duration:150})),ae(x,_)};be(k,x=>{n()[R(c).path]||x(w)})}H(g),$e((x,_)=>{v=ot(g,1,"tree-item nav-folder",null,v,x),ve(y,"data-tooltip-position",R(i)),ve(y,"aria-label",R(c).vaultPath),E=ot(b,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,E,_),Be(A,R(c).title)},[()=>({"is-collapsed":n()[R(c).path]}),()=>({"is-collapsed":n()[R(c).path]})]),ae(p,g)};be(f,p=>{R(c).data?p(d):p(h,!1)})}ae(l,u)}),H(s),$e(l=>o=ot(s,1,"svelte-1lnl15d",null,o,l),[()=>({topLevel:r()})]),ae(t,s),rt()}gt(["click"]);var Rz=(t,e)=>ie(e,!R(e)),Mz=fe('
'),Oz=fe('
'),Iz=fe('
'),$z=fe(''),Fz=fe('
'),Dz={hash:"svelte-45h",code:""};function oy(t,e){tt(e,!0),Tn(t,Dz);let r=Ct(()=>({title:"",path:"",vaultPath:"",children:e.plugin.gitManager.getTreeStructure(e.log.diff.files)})),n=Ct(()=>e.view.leaf.getRoot().side=="left"?"right":"left"),i=Pe(!0),a=Pe(Ne({}));function s(x){let _=x.author.name;if(e.plugin.settings.authorInHistoryView=="full")return _;if(e.plugin.settings.authorInHistoryView=="initials")return _.split(" ").filter(C=>C.length>0).map(C=>C[0].toUpperCase()).join("")}var o=Fz(),l=G(o);let c;var u=G(l);u.__click=[Rz,i];var f=G(u);let d;var h=te(f,2),p=G(h);{var g=x=>{var _=Mz(),T=G(_,!0);H(_),$e(C=>Be(T,C),[()=>e.log.refs.join(", ")]),ae(x,_)};be(p,x=>{e.log.refs.length>0&&x(g)})}var v=te(p,2);{var y=x=>{var _=Oz(),T=G(_,!0);H(_),$e(C=>Be(T,C),[()=>s(e.log)]),ae(x,_)};be(v,x=>{var _;e.plugin.settings.authorInHistoryView!="hide"&&((_=e.log.author)!=null&&_.name)&&x(y)})}var b=te(v,2);{var E=x=>{var _=Iz(),T=G(_,!0);H(_),$e(C=>Be(T,C),[()=>(0,sy.moment)(e.log.date).format(e.plugin.settings.commitDateFormat)]),ae(x,_)};be(b,x=>{e.plugin.settings.dateInHistoryView&&x(E)})}var S=te(b,2),A=G(S,!0);H(S),H(h),H(u);var k=te(u,2);{var w=x=>{var _=$z(),T=G(_);{var C=L=>{xu(L,{get hierarchy(){return R(r)},get plugin(){return e.plugin},get view(){return e.view},topLevel:!0,get closed(){return R(a)},set closed(F){ie(a,F,!0)}})},I=L=>{var F=Li(),J=Ar(F);Vr(J,17,()=>e.log.diff.files,zr,(de,le)=>{_u(de,{get view(){return e.view},get diff(){return R(le)}})}),ae(L,F)};be(T,L=>{e.showTree?L(C):L(I,!1)})}H(_),Pn(3,_,()=>ui,()=>({duration:150})),ae(x,_)};be(k,x=>{R(i)||x(w)})}H(l),H(o),$e((x,_,T)=>{c=ot(l,1,"tree-item nav-folder",null,c,x),ve(u,"aria-label",_),ve(u,"data-tooltip-position",R(n)),d=ot(f,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,d,T),Be(A,e.log.message)},[()=>({"is-collapsed":R(i)}),()=>{var x;return`${e.log.refs.length>0?e.log.refs.join(", ")+` +`:""}${(x=e.log.author)==null?void 0:x.name} +${(0,sy.moment)(e.log.date).format(e.plugin.settings.commitDateFormat)} +${e.log.message}`},()=>({"is-collapsed":R(i)})]),ae(t,o),rt()}gt(["click"]);function Lz(t,e){e().catch(console.error)}var jz=(t,e,r,n)=>{ie(e,!R(e)),(0,ly.setIcon)(r[0],R(e)?"list":"folder"),n(n().settings.treeStructure=R(e),!0),n().saveSettings()},Nz=fe(''),Bz=fe('
'),Hz={hash:"svelte-45h",code:""};function cy(t,e){tt(e,!0),Tn(t,Hz);let r=cn(e,"plugin",15),n=Pe(!1),i=Ne([]),a=Pe(void 0),s=Pe(Ne(r().settings.treeStructure)),o,l;Zt(()=>{l&&l.empty()}),o=e.view.app.workspace.on("obsidian-git:head-change",()=>void c().catch(console.error)),Zt(()=>{i.forEach(S=>(0,ly.setIcon)(S,S.getAttr("data-icon")))}),d5(()=>{e.view.app.workspace.offref(o)}),q1(()=>{let S=new IntersectionObserver(k=>{k[0].isIntersecting&&!R(n)&&u().catch(console.error)}),A=document.querySelector("#sentinel");return A&&S.observe(A),()=>{S.disconnect()}}),c().catch(console.error);function c(){return Ts(this,void 0,void 0,function*(){var S;if(!r().gitReady){ie(a,void 0);return}ie(n,!0);let A=r().gitManager instanceof Ce,k;((S=R(a)===null||R(a)===void 0?void 0:R(a).length)!==null&&S!==void 0?S:0)==0?k=A?50:10:k=R(a).length,ie(a,yield r().gitManager.log(void 0,!1,k),!0),ie(n,!1)})}function u(){return Ts(this,void 0,void 0,function*(){var S;if(!r().gitReady||R(a)===void 0)return;ie(n,!0);let k=r().gitManager instanceof Ce?50:10,w=yield r().gitManager.log(void 0,!1,k,(S=R(a).last())===null||S===void 0?void 0:S.hash);R(a).push(...w.slice(1)),ie(n,!1)})}var f=Bz(),d=G(f),h=G(d),p=G(h);p.__click=[jz,s,i,r],Ze(p,S=>i[0]=S,()=>i==null?void 0:i[0]);var g=te(p,2);let v;g.__click=[Lz,c],Ze(g,S=>i[1]=S,()=>i==null?void 0:i[1]),H(h),H(d);var y=te(d,2),b=G(y);{var E=S=>{var A=Nz();Vr(A,21,()=>R(a),zr,(k,w)=>{oy(k,{get view(){return e.view},get showTree(){return R(s)},get log(){return R(w)},get plugin(){return r()}})}),H(A),ae(S,A)};be(b,S=>{R(a)&&S(E)})}il(4),H(y),H(f),$e(S=>{ve(p,"data-icon",R(s)?"list":"folder"),v=ot(g,1,"clickable-icon nav-action-button",null,v,S)},[()=>({loading:R(n)})]),ae(t,f),rt()}gt(["click"]);var Su=class extends C5.ItemView{constructor(e,r){super(e),this.plugin=r,this.hoverPopover=null}getViewType(){return Zr.type}getDisplayText(){return Zr.name}getIcon(){return Zr.icon}onClose(){return this._view&&ji(this._view),super.onClose()}reload(){this._view&&ji(this._view),this._view=Ta(cy,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};m();var P5=require("obsidian"),pp=class extends P5.FuzzySuggestModal{constructor(r,n){super(r.app);this.branches=n;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,n){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};m();var F5=require("obsidian");m();var Ms=require("obsidian");m();var Au=require("obsidian");m();m();var Uz=Ot(R5()),Ca=require("obsidian");function Cs(t,e,r){let n=t.target;app.workspace.trigger("hover-link",{event:t,source:e.getViewType(),hoverParent:e,targetEl:n,linktext:r})}m();var M5=require("obsidian");var gl=class extends M5.Modal{constructor({app:r,path:n,filesToDeleteCount:i,filesToDiscardCount:a}){super(r);this.resolve=null;this.path=n,this.deleteCount=i,this.discardCount=a}openAndGetResult(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let r=this.deleteCount+this.discardCount,{contentEl:n,titleEl:i}=this,a="";this.path!=""&&(r>1?a=`files in "${this.path}"`:a=`"${this.path}"`),i.setText(`${this.discardCount==0?"Delete":"Discard"} ${a}`),this.deleteCount>0&&n.createEl("p").setText(`Are you sure you want to DELETE the ${Ic(this.deleteCount,"untracked file")}? They are deleted according to your Obsidian trash settting.`),this.discardCount>0&&n.createEl("p").setText(`Are you sure you want to discard ALL changes in ${Ic(this.discardCount,"tracked file")}?`);let s=n.createDiv({cls:"modal-button-container"});if(this.deleteCount>0){let l=s.createEl("button",{cls:"mod-warning",text:`${this.discardCount>0?"Discard":"Delete"} all ${Ic(r,"file")}`});l.addEventListener("click",()=>{this.resolve&&this.resolve("delete"),this.close()}),l.addEventListener("keypress",()=>{this.resolve&&this.resolve("delete"),this.close()})}if(this.discardCount>0){let l=s.createEl("button",{cls:"mod-warning",text:`Discard all ${Ic(this.discardCount,"tracked file")}`});l.addEventListener("click",()=>{this.resolve&&this.resolve("discard"),this.close()}),l.addEventListener("keypress",()=>{this.resolve&&this.resolve("discard"),this.close()})}let o=s.createEl("button",{text:"Cancel"});o.addEventListener("click",()=>(this.resolve&&this.resolve(!1),this.close())),o.addEventListener("keypress",()=>(this.resolve&&this.resolve(!1),this.close()))}onClose(){let{contentEl:r}=this;r.empty()}};function Gz(t,e){e.view.app.vault.getAbstractFileByPath(e.change.vaultPath)&&Cs(t,e.view,e.change.vaultPath)}function zz(t,e){t.stopPropagation(),e.manager.stage(e.change.path,!1).catch(r=>e.view.plugin.displayError(r)).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")})}function Vz(t,e){t.stopPropagation();let r=e.change.workingDir=="U";new gl({app:e.view.app,filesToDeleteCount:r?1:0,filesToDiscardCount:r?0:1,path:e.change.vaultPath}).openAndGetResult().then(n=>Ts(this,void 0,void 0,function*(){if(n=="delete"){let i=e.view.app.vault.getAbstractFileByPath(e.change.vaultPath);i instanceof Au.TFile?yield e.view.app.fileManager.trashFile(i):yield e.view.app.vault.adapter.remove(e.change.vaultPath)}else n=="discard"&&(yield e.manager.discard(e.change.path).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")}));e.view.app.workspace.trigger("obsidian-git:refresh")}),n=>e.view.plugin.displayError(n))}var Wz=fe('
'),qz=fe('
');function ku(t,e){tt(e,!0);let r=Ne([]),n=Ct(()=>e.view.leaf.getRoot().side=="left"?"right":"left");Zt(()=>{for(let E of r)E&&(0,Au.setIcon)(E,E.getAttr("data-icon"))});function i(E){E.stopPropagation(),Io(e.change.path)?a(E):s(E)}function a(E){var S;E.stopPropagation();let A=e.view.app.vault.getAbstractFileByPath(e.change.vaultPath);A instanceof Au.TFile&&((S=vn(e.view.app,E))===null||S===void 0||S.openFile(A).catch(k=>e.view.plugin.displayError(k)))}function s(E){E.stopPropagation(),e.view.plugin.tools.openDiff({aFile:e.change.path,aRef:"",event:E})}var o=qz();o.__mouseover=[Gz,e],o.__click=i;var l=G(o),c=G(l),u=G(c,!0);H(c);var f=te(c,2),d=G(f),h=G(d);{var p=E=>{var S=Wz();S.__click=a,Ze(S,A=>r[0]=A,()=>r==null?void 0:r[0]),Gr("auxclick",S,a),ae(E,S)};be(h,E=>{$o(e.change.vaultPath,e.view.app)&&E(p)})}var g=te(h,2);g.__click=[Vz,e],Ze(g,E=>r[1]=E,()=>r==null?void 0:r[1]);var v=te(g,2);v.__click=[zz,e],Ze(v,E=>r[2]=E,()=>r==null?void 0:r[2]),H(d);var y=te(d,2),b=G(y,!0);H(y),H(f),H(l),H(o),$e(E=>{ve(l,"data-path",e.change.vaultPath),ve(l,"data-tooltip-position",R(n)),ve(l,"aria-label",e.change.vaultPath),Be(u,E),ve(y,"data-type",e.change.workingDir),Be(b,e.change.workingDir)},[()=>Kn(e.change.vaultPath)]),Gr("auxclick",o,E=>{E.stopPropagation(),E.button==2?Xn(e.view.app,E,e.change.vaultPath,e.view.leaf,"git-source-control"):i(E)}),ae(t,o),rt()}gt(["mouseover","click"]);m();var O5=require("obsidian");function Yz(t,e){e.view.app.vault.getAbstractFileByPath(e.change.vaultPath)&&Cs(t,e.view,e.change.vaultPath)}var Xz=fe('
');function Tu(t,e){tt(e,!0);let r=Ct(()=>e.view.leaf.getRoot().side=="left"?"right":"left");function n(f){var d;f.stopPropagation();let h=e.view.app.vault.getAbstractFileByPath(e.change.vaultPath);h instanceof O5.TFile&&((d=vn(e.view.app,f))===null||d===void 0||d.openFile(h).catch(p=>e.view.plugin.displayError(p)))}var i=Xz();i.__mouseover=[Yz,e],i.__click=n;var a=G(i),s=G(a),o=G(s,!0);H(s);var l=te(s,2),c=G(l),u=G(c,!0);H(c),H(l),H(a),H(i),$e(f=>{ve(a,"data-path",e.change.vaultPath),ve(a,"data-tooltip-position",R(r)),ve(a,"aria-label",e.change.vaultPath),Be(o,f),ve(c,"data-type",e.change.workingDir),Be(u,e.change.workingDir)},[()=>Kn(e.change.vaultPath)]),Gr("auxclick",i,f=>{f.stopPropagation(),f.button==2?Xn(e.view.app,f,e.change.vaultPath,e.view.leaf,"git-source-control"):n(f)}),ae(t,i),rt()}gt(["mouseover","click"]);m();var mp=require("obsidian");function Kz(t,e){e.view.app.vault.getFileByPath(e.change.vaultPath)&&Cs(t,e.view,e.change.vaultPath)}function Zz(t,e){t.stopPropagation(),e.manager.unstage(e.change.path,!1).catch(r=>e.view.plugin.displayError(r)).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")})}var Jz=fe('
'),Qz=fe('
');function Cu(t,e){tt(e,!0);let r=Ne([]),n=Ct(()=>e.view.leaf.getRoot().side=="left"?"right":"left");Zt(()=>{for(let b of r)b&&(0,mp.setIcon)(b,b.getAttr("data-icon"))});function i(b){b.stopPropagation(),Io(e.change.path)?a(b):s(b)}function a(b){var E;b.stopPropagation();let S=e.view.app.vault.getAbstractFileByPath(e.change.vaultPath);S instanceof mp.TFile&&((E=vn(e.view.app,b))===null||E===void 0||E.openFile(S).catch(A=>e.view.plugin.displayError(A)))}function s(b){var E;b.stopPropagation(),e.view.plugin.tools.openDiff({aFile:(E=e.change.from)!==null&&E!==void 0?E:e.change.path,bFile:e.change.path,aRef:"HEAD",bRef:"",event:b})}var o=Qz();o.__mouseover=[Kz,e],o.__click=i;var l=G(o),c=G(l),u=G(c,!0);H(c);var f=te(c,2),d=G(f),h=G(d);{var p=b=>{var E=Jz();E.__click=a,Ze(E,S=>r[0]=S,()=>r==null?void 0:r[0]),ae(b,E)};be(h,b=>{$o(e.change.vaultPath,e.view.app)&&b(p)})}var g=te(h,2);g.__click=[Zz,e],Ze(g,b=>r[1]=b,()=>r==null?void 0:r[1]),H(d);var v=te(d,2),y=G(v,!0);H(v),H(f),H(l),H(o),$e(b=>{ve(l,"data-path",e.change.vaultPath),ve(l,"data-tooltip-position",R(n)),ve(l,"aria-label",e.change.vaultPath),Be(u,b),ve(v,"data-type",e.change.index),Be(y,e.change.index)},[()=>Kn(e.change.vaultPath)]),Gr("auxclick",o,b=>{b.stopPropagation(),b.button==2?Xn(e.view.app,b,e.change.vaultPath,e.view.leaf,"git-source-control"):i(b)}),ae(t,o),rt()}gt(["mouseover","click"]);m();m();var eV=fe(''),tV=fe("
");function Ps(t,e){tt(e,!0);var r=tV(),n=G(r);{var i=a=>{var s=eV(),o=G(s),l=G(o),c=G(l,!0);H(l),H(o),H(s),$e(()=>{ve(o,"aria-label","And "+(e.files.length-500)+" more files"),Be(c,"And "+(e.files.length-500)+" more files")}),ae(a,s)};be(n,a=>{e.files.length>500&&a(i)})}H(r),ae(t,r),rt()}var nV=fe("
"),iV=(t,e,r)=>e(t,R(r)),aV=(t,e,r)=>e(t,R(r).path),sV=fe('
'),oV=(t,e,r)=>e(t,R(r)),lV=(t,e,r)=>e(t,R(r).path),cV=fe('
',1),uV=fe(''),fV=fe('
'),dV=fe("
");function Rs(t,e){tt(e,!0);var r,n;let i=cn(e,"topLevel",3,!1),a=cn(e,"closed",15);for(let g of e.hierarchy.children)((n=(r=g.children)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>100&&a(a()[g.title]=!0,!0);let s=Ct(()=>e.view.leaf.getRoot().side=="left"?"right":"left");function o(g,v){g.stopPropagation(),e.plugin.gitManager.stageAll({dir:v}).catch(y=>e.plugin.displayError(y)).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")})}function l(g,v){g.stopPropagation(),e.plugin.gitManager.unstageAll({dir:v}).catch(y=>e.plugin.displayError(y)).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")})}function c(g,v){g.stopPropagation(),e.plugin.discardAll(v.vaultPath)}function u(g,v){g.stopPropagation(),a(a()[v.path]=!a()[v.path],!0)}var f=dV();let d;var h=G(f);Vr(h,17,()=>$c(e.hierarchy.children,500),zr,(g,v)=>{var y=Li(),b=Ar(y);{var E=A=>{var k=nV(),w=G(k);{var x=T=>{Cu(T,{get change(){return R(v).data},get manager(){return e.plugin.gitManager},get view(){return e.view}})},_=T=>{var C=Li(),I=Ar(C);{var L=J=>{ku(J,{get change(){return R(v).data},get manager(){return e.plugin.gitManager},get view(){return e.view}})},F=J=>{var de=Li(),le=Ar(de);{var ce=Te=>{Tu(Te,{get change(){return R(v).data},get view(){return e.view}})};be(le,Te=>{e.fileType==2&&Te(ce)},!0)}ae(J,de)};be(I,J=>{e.fileType==1?J(L):J(F,!1)},!0)}ae(T,C)};be(w,T=>{e.fileType==0?T(x):T(_,!1)})}H(k),ae(A,k)},S=A=>{var k=fV();k.__click=[iV,u,v];let w;var x=G(k),_=te(G(x),2);let T;var C=te(_,2),I=G(C,!0);H(C);var L=te(C,2),F=G(L),J=G(F);{var de=ne=>{var N=sV();N.__click=[aV,l,v],ae(ne,N)},le=ne=>{var N=cV(),q=Ar(N);q.__click=[oV,c,v];var B=te(q,2);B.__click=[lV,o,v],ae(ne,N)};be(J,ne=>{e.fileType==0?ne(de):ne(le,!1)})}il(2),H(F),H(L),H(x);var ce=te(x,2);{var Te=ne=>{var N=uV(),q=G(N);Rs(q,{get hierarchy(){return R(v)},get plugin(){return e.plugin},get view(){return e.view},get fileType(){return e.fileType},get closed(){return a()},set closed(B){a(B)}}),H(N),Pn(3,N,()=>ui,()=>({duration:150})),ae(ne,N)};be(ce,ne=>{a()[R(v).path]||ne(Te)})}H(k),$e((ne,N)=>{w=ot(k,1,"tree-item nav-folder",null,w,ne),ve(x,"data-tooltip-position",R(s)),ve(x,"aria-label",R(v).vaultPath),T=ot(_,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,T,N),Be(I,R(v).title)},[()=>({"is-collapsed":a()[R(v).path]}),()=>({"is-collapsed":a()[R(v).path]})]),Gr("auxclick",k,ne=>Xn(e.view.app,ne,R(v).vaultPath,e.view.leaf,"git-source-control")),ae(A,k)};be(b,A=>{R(v).data?A(E):A(S,!1)})}ae(g,y)});var p=te(h,2);Ps(p,{get files(){return e.hierarchy.children}}),H(f),$e(g=>d=ot(f,1,"",null,d,g),[()=>({topLevel:i()})]),ae(t,f),rt()}gt(["click"]);function hV(t,e,r,n,i,a){if(ie(e,!0),R(r)){let s=R(r).staged.length>0;n().promiseQueue.addTask(()=>n().commit({fromAuto:!1,commitMessage:R(i),onlyStaged:s}).then(()=>ie(i,n().settings.commitMessage,!0)).finally(a))}}function I5(t,e,r,n,i){ie(e,!0),r().promiseQueue.addTask(()=>r().gitManager.stageAll({status:R(n)}).finally(i))}function $5(t,e,r,n,i){ie(e,!0),r().promiseQueue.addTask(()=>r().gitManager.unstageAll({status:R(n)}).finally(i))}function pV(t,e,r,n){ie(e,!0),r().promiseQueue.addTask(()=>r().push().finally(n))}function mV(t,e,r,n){ie(e,!0),r().promiseQueue.addTask(()=>r().pullChangesFromRemote().finally(n))}function gV(t,e){t.stopPropagation(),e().discardAll()}var vV=(t,e,r,n)=>{ie(e,!R(e)),(0,Ms.setIcon)(r[6],R(e)?"list":"folder"),n().settings.treeStructure=R(e),n().saveSettings()},yV=(t,e)=>ie(e,""),wV=fe('
'),bV=(t,e)=>ie(e,!R(e)),_V=fe(" ",1),xV=fe(''),SV=(t,e)=>ie(e,!R(e)),EV=fe(" ",1),AV=fe(''),kV=(t,e)=>ie(e,!R(e)),TV=fe(" ",1),CV=fe(''),PV=fe('
'),RV=fe(''),MV=fe('
'),OV={hash:"svelte-11adhly",code:`.commit-msg-input.svelte-11adhly {width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field);}.git-commit-msg.svelte-11adhly {position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto;}main.svelte-11adhly .git-tools:where(.svelte-11adhly) .files-count:where(.svelte-11adhly) {padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center;}.nav-folder-title.svelte-11adhly {align-items:center;}.git-commit-msg-clear-button.svelte-11adhly {position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out;}.git-commit-msg-clear-button.svelte-11adhly:after {content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;mask-image:url("data:image/svg+xml,");mask-repeat:no-repeat;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat;}`};function fy(t,e){tt(e,!0),Tn(t,OV);let r=cn(e,"plugin",7),n=cn(e,"view",7),i=Pe(!1),a=Pe(void 0),s=Pe(Ne([])),o=Pe(Ne(r().settings.commitMessage)),l=Ne([]),c=Pe(void 0),u=Pe(void 0),f=Pe(void 0),d=Pe(!0),h=Pe(!0),p=Pe(!0),g=Pe(0),v=Pe(Ne({})),y=Pe(Ne({})),b=Pe(Ne({})),E=Pe(Ne(r().settings.treeStructure));n().registerEvent(n().app.workspace.on("obsidian-git:loading-status",()=>ie(i,!0))),n().registerEvent(n().app.workspace.on("obsidian-git:status-changed",()=>void A().catch(console.error))),n().plugin.cachedStatus==null?n().plugin.refresh().catch(console.error):A().catch(console.error),Zt(()=>{l.forEach(X=>(0,Ms.setIcon)(X,X.getAttr("data-icon")))}),Zt(()=>{l.forEach(X=>{var Oe,De;!X||X.id!="push"||(Ms.Platform.isMobile?(X.removeClass("button-border"),R(g)>0&&X.addClass("button-border")):((Oe=X.firstElementChild)===null||Oe===void 0||Oe.removeAttribute("color"),R(g)>0&&((De=X.firstElementChild)===null||De===void 0||De.setAttr("color","var(--text-accent)"))))})}),n().scope=new Ms.Scope(r().app.scope),n().scope.register(["Ctrl"],"Enter",X=>S());function S(){if(ie(i,!0),R(a)){let X=R(a).staged.length>0;r().promiseQueue.addTask(()=>r().commitAndSync({fromAutoBackup:!1,commitMessage:R(o),onlyStaged:X}).then(()=>{ie(o,r().settings.commitMessage,!0)}).finally(k))}}function A(){return Ts(this,void 0,void 0,function*(){if(!r().gitReady){ie(a,void 0);return}if(ie(g,yield r().gitManager.getUnpushedCommits(),!0),ie(a,r().cachedStatus,!0),ie(i,!1),r().lastPulledFiles&&r().lastPulledFiles!=R(s)&&(ie(s,r().lastPulledFiles,!0),ie(f,{title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(s))},!0)),R(a)){let X=(Oe,De)=>Oe.vaultPath.split("/").last().localeCompare(Kn(De.vaultPath));R(a).changed.sort(X),R(a).staged.sort(X),ie(c,{title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(a).changed)},!0),ie(u,{title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(a).staged)},!0)}else ie(c,void 0),ie(u,void 0)})}function k(){n().app.workspace.trigger("obsidian-git:refresh")}let w=Ct(()=>(R(o).match(/\n/g)||[]).length+1||1);var x=MV(),_=G(x),T=G(_),C=G(T);C.__click=S,Ze(C,X=>l[0]=X,()=>l==null?void 0:l[0]);var I=te(C,2);I.__click=[hV,i,a,r,o,k],Ze(I,X=>l[1]=X,()=>l==null?void 0:l[1]);var L=te(I,2);L.__click=[I5,i,r,a,k],Ze(L,X=>l[2]=X,()=>l==null?void 0:l[2]);var F=te(L,2);F.__click=[$5,i,r,a,k],Ze(F,X=>l[3]=X,()=>l==null?void 0:l[3]);var J=te(F,2);J.__click=[pV,i,r,k],Ze(J,X=>l[4]=X,()=>l==null?void 0:l[4]);var de=te(J,2);de.__click=[mV,i,r,k],Ze(de,X=>l[5]=X,()=>l==null?void 0:l[5]);var le=te(de,2);le.__click=[vV,E,l,r],Ze(le,X=>l[6]=X,()=>l==null?void 0:l[6]);var ce=te(le,2);let Te;ce.__click=k,Ze(ce,X=>l[7]=X,()=>l==null?void 0:l[7]),H(T),H(_);var ne=te(_,2),N=G(ne);H1(N);var q=te(N,2);{var B=X=>{var Oe=wV();Oe.__click=[yV,o],ve(Oe,"aria-label","Clear"),ae(X,Oe)};be(q,X=>{R(o)&&X(B)})}H(ne);var Fe=te(ne,2),lr=G(Fe);{var Ut=X=>{var Oe=RV(),De=G(Oe);let Pt;var Le=G(De);Le.__click=[bV,h];var U=G(Le);let Je;var j=te(U,4),Z=G(j),Se=G(Z);Se.__click=[$5,i,r,a,k],Ze(Se,Mt=>l[8]=Mt,()=>l==null?void 0:l[8]),H(Z);var qe=te(Z,2),Rt=G(qe,!0);H(qe),H(j),H(Le);var vl=te(Le,2);{var j5=Mt=>{var Gt=xV(),Bi=G(Gt);{var Rn=Jt=>{Rs(Jt,{get hierarchy(){return R(u)},get plugin(){return r()},get view(){return n()},get fileType(){return 0},topLevel:!0,get closed(){return R(v)},set closed(fn){ie(v,fn,!0)}})},Os=Jt=>{var fn=_V(),Pa=Ar(fn);Vr(Pa,17,()=>$c(R(a).staged,500),zr,(Hi,yl)=>{Cu(Hi,{get change(){return R(yl)},get view(){return n()},get manager(){return r().gitManager}})});var fi=te(Pa,2);Ps(fi,{get files(){return R(a).staged}}),ae(Jt,fn)};be(Bi,Jt=>{R(E)?Jt(Rn):Jt(Os,!1)})}H(Gt),Pn(3,Gt,()=>ui,()=>({duration:150})),ae(Mt,Gt)};be(vl,Mt=>{R(h)&&Mt(j5)})}H(De);var Ru=te(De,2);let dy;var Mu=G(Ru);Mu.__click=[SV,d];var hy=G(Mu);let py;var my=te(hy,4),yp=G(my),gy=G(yp);gy.__click=[gV,r];var vy=te(gy,2);vy.__click=[I5,i,r,a,k],Ze(vy,Mt=>l[9]=Mt,()=>l==null?void 0:l[9]),H(yp);var yy=te(yp,2),N5=G(yy,!0);H(yy),H(my),H(Mu);var B5=te(Mu,2);{var H5=Mt=>{var Gt=AV(),Bi=G(Gt);{var Rn=Jt=>{Rs(Jt,{get hierarchy(){return R(c)},get plugin(){return r()},get view(){return n()},get fileType(){return 1},topLevel:!0,get closed(){return R(y)},set closed(fn){ie(y,fn,!0)}})},Os=Jt=>{var fn=EV(),Pa=Ar(fn);Vr(Pa,17,()=>$c(R(a).changed,500),zr,(Hi,yl)=>{ku(Hi,{get change(){return R(yl)},get view(){return n()},get manager(){return r().gitManager}})});var fi=te(Pa,2);Ps(fi,{get files(){return R(a).changed}}),ae(Jt,fn)};be(Bi,Jt=>{R(E)?Jt(Rn):Jt(Os,!1)})}H(Gt),Pn(3,Gt,()=>ui,()=>({duration:150})),ae(Mt,Gt)};be(B5,Mt=>{R(d)&&Mt(H5)})}H(Ru);var U5=te(Ru,2);{var G5=Mt=>{var Gt=PV();let Bi;var Rn=G(Gt);Rn.__click=[kV,p];var Os=te(G(Rn),4),Jt=G(Os,!0);H(Os),H(Rn);var fn=te(Rn,2);{var Pa=fi=>{var Hi=CV(),yl=G(Hi);{var z5=Is=>{Rs(Is,{get hierarchy(){return R(f)},get plugin(){return r()},get view(){return n()},get fileType(){return 2},topLevel:!0,get closed(){return R(b)},set closed(Ou){ie(b,Ou,!0)}})},V5=Is=>{var Ou=TV(),wy=Ar(Ou);Vr(wy,17,()=>R(s),zr,(q5,Y5)=>{Tu(q5,{get change(){return R(Y5)},get view(){return n()}})});var W5=te(wy,2);Ps(W5,{get files(){return R(s)}}),ae(Is,Ou)};be(yl,Is=>{R(E)?Is(z5):Is(V5,!1)})}H(Hi),Pn(3,Hi,()=>ui,()=>({duration:150})),ae(fi,Hi)};be(fn,fi=>{R(p)&&fi(Pa)})}H(Gt),$e(fi=>{Bi=ot(Gt,1,"pulled nav-folder",null,Bi,fi),Be(Jt,R(s).length)},[()=>({"is-collapsed":!R(p)})]),ae(Mt,Gt)};be(U5,Mt=>{R(s).length>0&&R(f)&&Mt(G5)})}H(Oe),$e((Mt,Gt,Bi,Rn)=>{Pt=ot(De,1,"staged tree-item nav-folder",null,Pt,Mt),Je=ot(U,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,Je,Gt),Be(Rt,R(a).staged.length),dy=ot(Ru,1,"changes tree-item nav-folder",null,dy,Bi),py=ot(hy,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,py,Rn),Be(N5,R(a).changed.length)},[()=>({"is-collapsed":!R(h)}),()=>({"is-collapsed":!R(h)}),()=>({"is-collapsed":!R(d)}),()=>({"is-collapsed":!R(d)})]),ae(X,Oe)};be(lr,X=>{R(a)&&R(u)&&R(c)&&X(Ut)})}H(Fe),H(x),$e(X=>{ve(x,"data-type",Ft.type),ve(le,"data-icon",R(E)?"list":"folder"),Te=ot(ce,1,"clickable-icon nav-action-button",null,Te,X),ve(N,"rows",R(w))},[()=>({loading:R(i)})]),ey(N,()=>R(o),X=>ie(o,X)),ae(t,x),rt()}gt(["click"]);var Pu=class extends F5.ItemView{constructor(e,r){super(e),this.plugin=r,this.hoverPopover=null}getViewType(){return Ft.type}getDisplayText(){return Ft.name}getIcon(){return Ft.icon}onClose(){return this._view&&ji(this._view),super.onClose()}reload(){this._view&&ji(this._view),this._view=Ta(fy,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};m();var gp=class{constructor(e,r){this.statusBarEl=e;this.plugin=r;this.statusBarEl.addClass("mod-clickable"),this.statusBarEl.onClickEvent(n=>{this.plugin.switchBranch().catch(i=>r.displayError(i))})}async display(){if(this.plugin.gitReady){let e=await this.plugin.gitManager.branchInfo();e.current!=null?this.statusBarEl.setText(e.current):this.statusBarEl.empty()}else this.statusBarEl.empty()}remove(){this.statusBarEl.remove()}};var vp=class extends _e.Plugin{constructor(){super(...arguments);this.automaticsManager=new Bc(this);this.tools=new Uc(this);this.localStorage=new vh(this);this.state={gitAction:0,offlineMode:!1};this.gitReady=!1;this.promiseQueue=new fh(this);this.intervalsToClear=[];this.lineAuthoringFeature=new uh(this)}setPluginState(r){var n;this.state=Object.assign(this.state,r),(n=this.statusBar)==null||n.display()}async updateCachedStatus(){var r,n;return this.app.workspace.trigger("obsidian-git:loading-status"),this.cachedStatus=await this.gitManager.status(),this.cachedStatus.conflicted.length>0?(this.localStorage.setConflict(!0),await((r=this.branchBar)==null?void 0:r.display())):(this.localStorage.setConflict(!1),await((n=this.branchBar)==null?void 0:n.display())),this.app.workspace.trigger("obsidian-git:status-changed",this.cachedStatus),this.cachedStatus}async refresh(){if(!this.gitReady)return;let r=this.app.workspace.getLeavesOfType(Ft.type),n=this.app.workspace.getLeavesOfType(Zr.type);(this.settings.changedFilesInStatusBar||r.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)})||n.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)}))&&await this.updateCachedStatus().catch(i=>this.displayError(i)),this.app.workspace.trigger("obsidian-git:refreshed")}refreshUpdatedHead(){this.lineAuthoringFeature.refreshLineAuthorViews()}async onload(){console.log("loading "+this.manifest.name+" plugin: v"+this.manifest.version),Nc.plugin=this,this.localStorage.migrate(),await this.loadSettings(),await this.migrateSettings(),this.settingsTab=new Kd(this.app,this),this.addSettingTab(this.settingsTab),this.localStorage.getPluginDisabled()||(this.registerStuff(),this.app.workspace.onLayoutReady(()=>this.init({fromReload:!1}).catch(r=>this.displayError(r))))}onExternalSettingsChange(){this.reloadSettings().catch(r=>this.displayError(r))}async reloadSettings(){let r=JSON.stringify(this.settings);await this.loadSettings();let n=JSON.stringify(this.settings);r!==n&&(this.log("Reloading settings"),this.unloadPlugin(),await this.init({fromReload:!0}),this.app.workspace.getLeavesOfType(Ft.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}),this.app.workspace.getLeavesOfType(Zr.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}))}registerStuff(){this.registerEvent(this.app.workspace.on("obsidian-git:refresh",()=>{this.refresh().catch(r=>this.displayError(r))})),this.registerEvent(this.app.workspace.on("obsidian-git:head-change",()=>{this.refreshUpdatedHead()})),this.registerEvent(this.app.workspace.on("file-menu",(r,n,i)=>{this.handleFileMenu(r,n,i,"file-manu")})),this.registerEvent(this.app.workspace.on("obsidian-git:menu",(r,n,i)=>{this.handleFileMenu(r,n,i,"obsidian-git:menu")})),this.registerEvent(this.app.workspace.on("active-leaf-change",r=>{this.onActiveLeafChange(r)})),this.registerEvent(this.app.vault.on("modify",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("delete",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("create",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("rename",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerView(Ft.type,r=>new Pu(r,this)),this.registerView(Zr.type,r=>new Su(r,this)),this.registerView(ua.type,r=>new ls(r,this)),this.registerView(ca.type,r=>new fs(r,this)),this.addRibbonIcon("git-pull-request","Open Git source control",async()=>{var i;let r=this.app.workspace.getLeavesOfType(Ft.type),n;r.length===0?(n=(i=this.app.workspace.getRightLeaf(!1))!=null?i:this.app.workspace.getLeaf(),await n.setViewState({type:Ft.type})):n=r.first(),await this.app.workspace.revealLeaf(n)}),this.registerHoverLinkSource(Ft.type,{display:"Git View",defaultMod:!0}),this.lineAuthoringFeature.onLoadPlugin(),this.setRefreshDebouncer(),oM(this)}setRefreshDebouncer(){var r;(r=this.debRefresh)==null||r.cancel(),this.debRefresh=(0,_e.debounce)(()=>{this.settings.refreshSourceControl&&this.refresh().catch(console.error)},this.settings.refreshSourceControlTimer,!0)}async addFileToGitignore(r,n){let i=this.gitManager.getRelativeRepoPath(r,!0),a=u3({isFolder:n,gitRelativePath:i});return await this.app.vault.adapter.append(this.gitManager.getRelativeVaultPath(".gitignore"),` +`+a),this.refresh()}handleFileMenu(r,n,i,a){if(!this.gitReady||!this.settings.showFileMenu||!n)return;let s;if(typeof n=="string"?s=n:s=n.path,i=="file-explorer-context-menu"&&(r.addItem(o=>{o.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof _e.TFile?await this.gitManager.stage(n.path,!0):await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Staged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof _e.TFile?await this.gitManager.unstage(n.path,!0):await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Unstaged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(l=>{this.addFileToGitignore(s,n instanceof _e.TFolder).catch(c=>this.displayError(c))})})),i=="git-source-control"){r.addItem(l=>{l.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(c=>{this.addFileToGitignore(s,n instanceof _e.TFolder).catch(u=>this.displayError(u))})});let o=this.app.vault.adapter;a==="obsidian-git:menu"&&o instanceof _e.FileSystemAdapter&&(r.addItem(l=>{l.setTitle("Open in default app").setIcon("arrow-up-right").setSection("action").onClick(c=>{this.app.openWithDefaultApp(s)})}),r.addItem(l=>{l.setTitle("Show in system explorer").setIcon("arrow-up-right").setSection("action").onClick(c=>{window.electron.shell.showItemInFolder(L5.join(o.getBasePath(),s))})}))}}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,n;this.gitReady=!1,this.lineAuthoringFeature.deactivateFeature(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(n=this.statusBar)==null||n.remove(),this.statusBar=void 0,this.branchBar=void 0,this.gitManager.unload(),this.promiseQueue.clear();for(let i of this.intervalsToClear)window.clearInterval(i);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=gT(Xe,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return _e.Platform.isDesktopApp}async init({fromReload:r=!1}){var n;if(this.settings.showStatusBar&&!this.statusBar){let i=this.addStatusBarItem();this.statusBar=new dh(i,this),this.intervalsToClear.push(window.setInterval(()=>{var a;return(a=this.statusBar)==null?void 0:a.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new Ce(this),await this.gitManager.setGitInstance()):this.gitManager=new wn(this);let i=await this.gitManager.checkRequirements(),a=this.localStorage.getPausedAutomatics();switch(i){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new _e.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,this.setPluginState({gitAction:0}),_e.Platform.isDesktop&&this.settings.showBranchStatusBar&&!this.branchBar){let s=this.addStatusBarItem();this.branchBar=new gp(s,this),this.intervalsToClear.push(window.setInterval(()=>{var o;return void((o=this.branchBar)==null?void 0:o.display().catch(console.error))},6e4))}await((n=this.branchBar)==null?void 0:n.display()),this.lineAuthoringFeature.conditionallyActivateBySettings(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&!a&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),a||await this.automaticsManager.init(),a&&new _e.Notice("Automatic routines are currently paused.");break;default:this.log("Something weird happened. The 'checkRequirements' result is "+i)}}catch(i){this.displayError(i),console.error(i)}}async createNewRepo(){try{await this.gitManager.init(),new _e.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let n=await new ze(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(n){let i="Vault Root",a=await new ze(this,{options:this.gitManager instanceof wn?[i]:[],placeholder:"Enter directory for clone. It needs to be empty or not existent.",allowEmpty:this.gitManager instanceof wn}).openAndGetResult();if(a==null)return;if(a===i&&(a="."),a=(0,_e.normalizePath)(a),a==="/"&&(a="."),a==="."){let f=await new ze(this,{options:["NO","YES"],placeholder:`Does your remote repo contain a ${this.app.vault.configDir} directory at the root?`,onlySelection:!0}).openAndGetResult();if(f===void 0){new _e.Notice("Aborted clone");return}else if(f==="YES"){let d="DELETE ALL YOUR LOCAL CONFIG AND PLUGINS";if(await new ze(this,{options:["Abort clone",d],placeholder:`To avoid conflicts, the local ${this.app.vault.configDir} directory needs to be deleted.`,onlySelection:!0}).openAndGetResult()===d)await this.app.vault.adapter.rmdir(this.app.vault.configDir,!0);else{new _e.Notice("Aborted clone");return}}}let s=await new ze(this,{placeholder:"Specify depth of clone. Leave empty for full clone.",allowEmpty:!0}).openAndGetResult(),o;if(s!==""&&(o=parseInt(s),isNaN(o))){new _e.Notice("Invalid depth. Aborting clone.");return}new _e.Notice(`Cloning new repo into "${a}"`);let l=this.settings.basePath,c=a&&a!==".";c&&(this.settings.basePath=a);try{await this.gitManager.clone(vv(n),a,o),new _e.Notice("Cloned new repo."),new _e.Notice("Please restart Obsidian"),c&&await this.saveSettings()}catch(u){this.displayError(u),this.settings.basePath=l,await this.saveSettings()}}}async isAllInitialized(){return this.gitReady||await this.init({fromReload:!0}),this.gitReady}async pullChangesFromRemote(){if(!await this.isAllInitialized())return;let r=await this.pull();if(r!==!1){if(r||this.displayMessage("Pull: Everything is up-to-date"),this.gitManager instanceof Ce){let n=await this.updateCachedStatus();n.conflicted.length>0&&(this.displayError(`You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted))}this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0})}}async commitAndSync({fromAutoBackup:r,requestCustomMessage:n=!1,commitMessage:i,onlyStaged:a=!1}){!await this.isAllInitialized()||(this.settings.syncMethod=="reset"&&this.settings.pullBeforePush&&await this.pull(),!await this.commit({fromAuto:r,requestCustomMessage:n,commitMessage:i,onlyStaged:a}))||(this.settings.syncMethod!="reset"&&this.settings.pullBeforePush&&await this.pull(),this.settings.disablePush||(await this.remotesAreSet()&&await this.gitManager.canPush()?await this.push():this.displayMessage("No commits to push")),this.setPluginState({gitAction:0}))}async commit({fromAuto:r,requestCustomMessage:n=!1,onlyStaged:i=!1,commitMessage:a,amend:s=!1}){if(!await this.isAllInitialized())return!1;try{let o=this.localStorage.getConflict(),l,c,u;if(this.gitManager instanceof Ce){if(await this.mayDeleteConflictFile(),c=await this.updateCachedStatus(),c.conflicted.length==0&&(o=!1),r&&c.conflicted.length>0)return this.displayError(`Did not commit, because you have conflicts in ${c.conflicted.length} ${c.conflicted.length==1?"file":"files"}. Please resolve them and commit per command.`),await this.handleConflict(c.conflicted),!1;l=[...c.changed,...c.staged]}else{if(r&&o)return this.displayError("Did not commit, because you have conflicts. Please resolve them and commit per command."),!1;if(o)await this.mayDeleteConflictFile(),c=await this.updateCachedStatus(),l=[...c.changed,...c.staged];else{let f=this.gitManager;i?l=await f.getStagedFiles():(u=await f.getUnstagedFiles(),l=u.map(({path:d})=>({vaultPath:this.gitManager.getRelativeVaultPath(d),path:d})))}}if(await this.tools.hasTooBigFiles(l))return this.setPluginState({gitAction:0}),!1;if(l.length!==0||o){let f=a!=null?a:a=r?this.settings.autoCommitMessage:this.settings.commitMessage;if(r&&this.settings.customMessageOnAutoBackup||n){!this.settings.disablePopups&&r&&new _e.Notice("Auto backup: Please enter a custom commit message. Leave empty to abort");let p=await new hh(this).openAndGetResult();if(p!=null&&p!=""&&p!="...")f=p;else return this.setPluginState({gitAction:0}),!1}else if(this.gitManager instanceof Ce&&this.settings.commitMessageScript){let p=this.settings.commitMessageScript,g=this.localStorage.getHostname()||"",v=p.replace("{{hostname}}",g);v=v.replace("{{date}}",(0,_e.moment)().format(this.settings.commitDateFormat));let y=await Fc("sh",["-c",v],{cwd:this.gitManager.absoluteRepoPath});y.code!=0?this.displayError(y.stderr):y.stdout.trim().length==0?this.displayMessage("Stdout from commit message script is empty. Using default message."):f=y.stdout}let d;i?d=await this.gitManager.commit({message:f,amend:s}):d=await this.gitManager.commitAll({message:f,status:c,unstagedFiles:u,amend:s}),this.gitManager instanceof Ce&&await this.updateCachedStatus();let h=!1;d===void 0&&(h=!0,d=l.length),this.displayMessage(`Committed${h?" approx.":""} ${d} ${d==1?"file":"files"}`)}else this.displayMessage("No changes to commit");return this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(o){return this.displayError(o),!1}}async push(){if(!await this.isAllInitialized()||!await this.remotesAreSet())return!1;let r=this.localStorage.getConflict();try{this.gitManager instanceof Ce&&await this.mayDeleteConflictFile();let n;if(this.gitManager instanceof Ce&&(n=await this.updateCachedStatus()).conflicted.length>0)return this.displayError(`Cannot push. You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted),!1;if(this.gitManager instanceof wn&&r)return this.displayError("Cannot push. You have conflicts"),!1;this.log("Pushing....");let i=await this.gitManager.push();return i!==void 0&&(i>0?this.displayMessage(`Pushed ${i} ${i==1?"file":"files"} to remote`):this.displayMessage("No commits to push")),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(n){return n instanceof Co?this.handleNoNetworkError(n):this.displayError(n),!1}}async pull(){if(!await this.remotesAreSet())return!1;try{this.log("Pulling....");let r=await this.gitManager.pull()||[];return this.setPluginState({offlineMode:!1}),r.length>0&&(this.displayMessage(`Pulled ${r.length} ${r.length==1?"file":"files"} from remote`),this.lastPulledFiles=r),r.length}catch(r){return this.displayError(r),!1}}async fetch(){if(await this.remotesAreSet())try{await this.gitManager.fetch(),this.displayMessage("Fetched from remote"),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh")}catch(r){this.displayError(r)}}async mayDeleteConflictFile(){let r=this.app.vault.getAbstractFileByPath(To);r&&(this.app.workspace.iterateAllLeaves(n=>{var i;n.view instanceof _e.MarkdownView&&((i=n.view.file)==null?void 0:i.path)==r.path&&n.detach()}),await this.app.vault.delete(r))}async stageFile(r){return await this.isAllInitialized()?(await this.gitManager.stage(r.path,!0),this.displayMessage(`Staged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async unstageFile(r){return await this.isAllInitialized()?(await this.gitManager.unstage(r.path,!0),this.displayMessage(`Unstaged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async switchBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo(),n=await new pp(this,r.branches).openAndGetReslt();if(n!=null)return await this.gitManager.checkout(n),this.displayMessage(`Switched to ${n}`),this.app.workspace.trigger("obsidian-git:refresh"),await((i=this.branchBar)==null?void 0:i.display()),n}async switchRemoteBranch(){var a;if(!await this.isAllInitialized())return;let r=await this.selectRemoteBranch()||"",[n,i]=ki(r);if(i!=null&&n!=null)return await this.gitManager.checkout(i,n),this.displayMessage(`Switched to ${r}`),await((a=this.branchBar)==null?void 0:a.display()),r}async createBranch(){var n;if(!await this.isAllInitialized())return;let r=await new ze(this,{placeholder:"Create new branch"}).openAndGetResult();if(r!=null)return await this.gitManager.createBranch(r),this.displayMessage(`Created new branch ${r}`),await((n=this.branchBar)==null?void 0:n.display()),r}async deleteBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo();r.current&&r.branches.remove(r.current);let n=await new ze(this,{options:r.branches,placeholder:"Delete branch",onlySelection:!0}).openAndGetResult();if(n!=null){let a=!1;if(!await this.gitManager.branchIsMerged(n)){let o=await new ze(this,{options:["YES","NO"],placeholder:"This branch isn't merged into HEAD. Force delete?",onlySelection:!0}).openAndGetResult();if(o!=="YES")return;a=o==="YES"}return await this.gitManager.deleteBranch(n,a),this.displayMessage(`Deleted branch ${n}`),await((i=this.branchBar)==null?void 0:i.display()),n}}async remotesAreSet(){return this.settings.updateSubmodules||(await this.gitManager.branchInfo()).tracking?!0:(new _e.Notice("No upstream branch is set. Please select one."),await this.setUpstreamBranch())}async setUpstreamBranch(){let r=await this.selectRemoteBranch();return r==null?(this.displayError("Aborted. No upstream-branch is set!",1e4),this.setPluginState({gitAction:0}),!1):(await this.gitManager.updateUpstreamBranch(r),this.displayMessage(`Set upstream branch to ${r}`),this.setPluginState({gitAction:0}),!0)}async discardAll(r){if(!await this.isAllInitialized())return!1;let n=await this.gitManager.status({path:r}),i=0,a=0;for(let o of n.changed)o.workingDir=="U"?i++:a++;if(i+a==0)return!1;let s=await new gl({app:this.app,filesToDeleteCount:i,filesToDiscardCount:a,path:r!=null?r:""}).openAndGetResult();switch(s){case!1:return s;case"discard":await this.gitManager.discardAll({dir:r,status:this.cachedStatus});break;case"delete":{await this.gitManager.discardAll({dir:r,status:this.cachedStatus});let o=await this.gitManager.getUntrackedPaths({path:r,status:this.cachedStatus});for(let l of o){let c=this.gitManager.getRelativeVaultPath(l),u=this.app.vault.getAbstractFileByPath(c);u?await this.app.fileManager.trashFile(u):l.endsWith("/")?await this.app.vault.adapter.rmdir(c,!0):await this.app.vault.adapter.remove(c)}break}default:Ud(s)}return this.app.workspace.trigger("obsidian-git:refresh"),s}async handleConflict(r){this.localStorage.setConflict(!0);let n;r!==void 0&&(n=["# Conflicts","Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push`","(This file will automatically be deleted before commit)","[[#Additional Instructions]] available below file list","",...r.map(i=>{let a=this.app.vault.getAbstractFileByPath(i);return a instanceof _e.TFile?`- [[${this.app.metadataCache.fileToLinktext(a,"/")}]]`:`- Not a file: ${i}`}),` # Additional Instructions I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text. @@ -377,7 +385,7 @@ I strongly recommend to use "Source mode" for viewing the conflicted files. For File changes in remote repository >>>>>>> origin/main \`\`\``]),await this.tools.writeAndOpenFile(n==null?void 0:n.join(` -`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new $e(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(i){let a=await this.gitManager.getRemoteUrl(i),o=await new $e(this,{initialValue:a}).openAndGetResult();if(o)return await this.gitManager.setRemote(i,Wg(o)),i}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),n;r.length===0&&(n=await this.editRemotes(),n==null&&(r=await this.gitManager.getRemotes()));let i=new $e(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),a=n!=null?n:await i.openAndGetResult();if(a){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(a);let s=await this.gitManager.getRemoteBranches(a);return await new $e(this,{options:s,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult()}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new $e(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();i&&await this.gitManager.removeRemote(i)}onActiveLeafChange(r){var s,o;let n=r==null?void 0:r.view;if(!(n!=null&&n.getState().file)&&!(n instanceof Ra||n instanceof Ia))return;let i=this.app.workspace.getLeavesOfType(kt.type).first(),a=this.app.workspace.getLeavesOfType(Lr.type).first();if((s=i==null?void 0:i.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||s.removeClass("is-active"),(o=a==null?void 0:a.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof Ra||(r==null?void 0:r.view)instanceof Ia){let l=r.view.state.bFile;this.lastDiffViewState=r.view.getState();let c;i&&r.view.state.aRef=="HEAD"?c=i.view.containerEl.querySelector(`div.staged div.nav-file-title[data-path='${l}']`):i&&r.view.state.aRef==""?c=i.view.containerEl.querySelector(`div.changes div.nav-file-title[data-path='${l}']`):a&&(c=a.view.containerEl.querySelector(`div.nav-file-title[data-path='${l}']`)),c==null||c.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({gitAction:0,offlineMode:!0})}displayMessage(r,n=4*1e3){var i;(i=this.statusBar)==null||i.displayMessage(r.toLowerCase(),n),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new we.Notice(r,5*1e3),this.log(r)}displayError(r,n=10*1e3){var a;if(r instanceof yl.UserCanceledError){new we.Notice("Aborted");return}let i;r instanceof Error?i=r:i=new Error(String(r)),this.setPluginState({gitAction:0}),this.settings.showErrorNotices&&new we.Notice(i.message,n),console.error(`${this.manifest.id}:`,i.stack),(a=this.statusBar)==null||a.displayMessage(i.message.toLowerCase(),n)}log(...r){console.log(`${this.manifest.id}:`,...r)}}; +`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new ze(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(i){let a=await this.gitManager.getRemoteUrl(i),o=await new ze(this,{initialValue:a}).openAndGetResult();if(o)return await this.gitManager.setRemote(i,vv(o)),i}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),n;r.length===0&&(n=await this.editRemotes(),n==null&&(r=await this.gitManager.getRemotes()));let i=new ze(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),a=n!=null?n:await i.openAndGetResult();if(a){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(a);let s=await this.gitManager.getRemoteBranches(a),l=await new ze(this,{options:s,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult();return l.startsWith(a+"/")?l:`${a}/${l}`}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new ze(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();i&&await this.gitManager.removeRemote(i)}onActiveLeafChange(r){var s,o;let n=r==null?void 0:r.view;if(!(n!=null&&n.getState().file)&&!(n instanceof ls||n instanceof fs))return;let i=this.app.workspace.getLeavesOfType(Ft.type).first(),a=this.app.workspace.getLeavesOfType(Zr.type).first();if((s=i==null?void 0:i.view.containerEl.querySelector("div.tree-item-self.is-active"))==null||s.removeClass("is-active"),(o=a==null?void 0:a.view.containerEl.querySelector("div.tree-item-self.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof ls||(r==null?void 0:r.view)instanceof fs){let l=r.view.state.bFile;this.lastDiffViewState=r.view.getState();let c;i&&r.view.state.aRef=="HEAD"?c=i.view.containerEl.querySelector(`div.staged div.tree-item-self[data-path='${l}']`):i&&r.view.state.aRef==""?c=i.view.containerEl.querySelector(`div.changes div.tree-item-self[data-path='${l}']`):a&&(c=a.view.containerEl.querySelector(`div.tree-item-self[data-path='${l}']`)),c==null||c.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({gitAction:0,offlineMode:!0})}displayMessage(r,n=4*1e3){var i;(i=this.statusBar)==null||i.displayMessage(r.toLowerCase(),n),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new _e.Notice(r,5*1e3),this.log(r)}displayError(r,n=10*1e3){var a;if(r instanceof D5.Errors.UserCanceledError){new _e.Notice("Aborted");return}let i;r instanceof Error?i=r:i=new Error(String(r)),this.setPluginState({gitAction:0}),this.settings.showErrorNotices&&new _e.Notice(i.message,n),console.error(`${this.manifest.id}:`,i.stack),(a=this.statusBar)==null||a.displayMessage(i.message.toLowerCase(),n)}log(...r){console.log(`${this.manifest.id}:`,...r)}}; /*! Bundled license information: ieee754/index.js: diff --git a/.obsidian/plugins/obsidian-git/manifest.json b/.obsidian/plugins/obsidian-git/manifest.json index 0a8423d..ce557ad 100644 --- a/.obsidian/plugins/obsidian-git/manifest.json +++ b/.obsidian/plugins/obsidian-git/manifest.json @@ -6,5 +6,5 @@ "description": "Integrate Git version control with automatic backup and other advanced features.", "isDesktopOnly": false, "fundingUrl": "https://ko-fi.com/vinzent", - "version": "2.34.0" + "version": "2.35.0" } diff --git a/.obsidian/plugins/obsidian-git/styles.css b/.obsidian/plugins/obsidian-git/styles.css index 9c490e7..98e9099 100644 --- a/.obsidian/plugins/obsidian-git/styles.css +++ b/.obsidian/plugins/obsidian-git/styles.css @@ -55,6 +55,15 @@ .tooltip.mod-right { overflow-wrap: break-word; } + +/* Limits the scrollbar to the view body */ +.git-view { + display: flex; + flex-direction: column; + position: relative; + height: 100%; +} + .git-tools { display: flex; margin-left: auto; @@ -81,6 +90,21 @@ height: auto; } +.workspace-leaf-content[data-type="git-view"] .tree-item-self, +.workspace-leaf-content[data-type="git-history-view"] .tree-item-self { + align-items: center; +} + +.workspace-leaf-content[data-type="git-view"] + .tree-item-self:hover + .clickable-icon, +.workspace-leaf-content[data-type="git-history-view"] + .tree-item-self:hover + .clickable-icon { + color: var(--icon-color-hover); +} + +/* Highlight an item as active if it's diff is currently opened */ .is-active .git-tools .buttons > * { color: var(--nav-item-color-active); } @@ -575,14 +599,6 @@ background-color: #22bb2230; } -/* Limits the scrollbar to the view body */ -.git-view { - display: flex; - flex-direction: column; - position: relative; - height: 100%; -} - .git-obscure-prompt[git-is-obscured="true"] #git-show-password:after { -webkit-mask-image: url('data:image/svg+xml,'); } diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index fa0d000..75c4143 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -137,8 +137,8 @@ "state": { "type": "VIEW_TYPE_LONGFORM_EXPLORER", "state": {}, - "icon": "lucide-file", - "title": "Plugin no longer active" + "icon": "lucide-ghost", + "title": "VIEW_TYPE_LONGFORM_EXPLORER" } } ] @@ -227,6 +227,7 @@ }, "left-ribbon": { "hiddenItems": { + "bases:Create new base": false, "switcher:Open quick switcher": false, "graph:Open graph view": false, "canvas:Create new canvas": false,