/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin (https://github.com/phibr0/obsidian-commander) */ var Oe=Object.defineProperty,Hn=Object.defineProperties,Rn=Object.getOwnPropertyDescriptor,Fn=Object.getOwnPropertyDescriptors,On=Object.getOwnPropertyNames,Fe=Object.getOwnPropertySymbols;var ht=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable;var Jt=(e,o,t)=>o in e?Oe(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,Ve=(e,o)=>{for(var t in o||(o={}))ht.call(o,t)&&Jt(e,t,o[t]);if(Fe)for(var t of Fe(o))$t.call(o,t)&&Jt(e,t,o[t]);return e},Yt=(e,o)=>Hn(e,Fn(o));var Kt=(e,o)=>{var t={};for(var n in e)ht.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Fe)for(var n of Fe(e))o.indexOf(n)<0&&$t.call(e,n)&&(t[n]=e[n]);return t};var Vn=(e,o)=>{for(var t in o)Oe(e,t,{get:o[t],enumerable:!0})},zn=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of On(o))!ht.call(e,a)&&a!==t&&Oe(e,a,{get:()=>o[a],enumerable:!(n=Rn(o,a))||n.enumerable});return e};var Wn=e=>zn(Oe({},"__esModule",{value:!0}),e);var Va={};Vn(Va,{default:()=>dt});module.exports=Wn(Va);var ze=require("obsidian");var bt=require("obsidian");var Gt={};var Qt={};var eo={};var to={"Open Commander Settings":"Commander Einstellungen \xF6ffnen","Open Macro Builder":"Makro Baukasten \xF6ffnen","Change Icon":"Symbol ver\xE4ndern",Rename:"Umbenennen",Delete:"L\xF6schen","Add command":"Befehl hinzuf\xFCgen","Add new":"Neuen Befehl hinzuf\xFCgen","This Command seems to have been removed. {{command_name}}":"Dieser Befehl wurde entfernt. {{command_name}}","Choose a Command to add":"W\xE4hle einen Befehl zum hinzuf\xFCgen","to navigate":"zum navigieren","to choose an icon":"um ein symbol auszuw\xE4hlen","to cancel":"zum abbrechen","Use a custom name":"Nutze einen benutzerdefinierten Namen","Choose a custom Name for your new Command":"W\xE4hle einen benutzerdefinierten Namen f\xFCr deinen neuen Befehl","to save":"zum speichern","Choose a Icon for your new Command":"W\xE4hle ein Symbol f\xFCr deinen neuen Befehl","to choose a custom icon":"um ein benutzerdefiniertes Symbol auszuw\xE4hlen","Remove Command":"Befehl entfernen","Double click to rename":"Zum umbenennen doppelklicken","This device":"Dieses Ger\xE4t","Added by {{plugin_name}}.":"Hinzugef\xFCgt von {{plugin_name}}.","Warning: This is a checked Command, meaning it might not run under every circumstance.":"Warnung: Dieser Befehl wird nur unter bestimmten Vorraussetzungen ausgef\xFChrt.","Move down":"Nach unten","Move up":"Nach oben","Change Mode (Currently: {{current_mode}})":"Modus ver\xE4ndern (Momentan: {{current_mode}})","Are you sure you want to delete the Command?":"Bist du dir sicher, dass du diesen Befehl entfernen m\xF6chtest?","Remove and don't ask again":"Entfernen und Auswahl speichern",Remove:"Entfernen",Cancel:"Abbrechen","Always ask before removing?":"Immer fragen, bevor ein Befehl gel\xF6scht wird?","Always show a Popup to confirm deletion of a Command.":"Zeige immer ein Popup um L\xF6schen zu best\xE4tigen.",'Show "Add Command" Button':'Zeige "Befehl hinzuf\xFCgen" Knopf','Show the "Add Command" Button in every Menu. Requires restart.':'Zeige den "Befehl hinzuf\xFCgen" Knopf in jedem Men\xFC. Erfordert neustart.',"Please restart Obsidian for these changes to take effect.":"Bitte starte Obsidian neu, damit diese \xC4nderungen in Kraft treten.","Enable debugging":"Aktiviere debugging","Enable console output.":"Aktiviere Konsolen-Output (F\xFCr Entwickler)",General:"Allgemein","Editor Menu":"Editor-Men\xFC","File Menu":"Datei-Men\xFC","Left Ribbon":"Band","Right Ribbon":"Rechtes Band",Titlebar:"Titelleiste",Statusbar:"Statusleiste","Page Header":"Kopfzeile","Support development":"Entwicklung unterst\xFCtzen","No commands here!":"Keine Befehle da!","Would you like to add one now?":"M\xF6chtest du jetzt einen hinzuf\xFCgen?","Hide Commands":"Befehle verstecken","Choose new":"W\xE4hle neu","Hide Commands of other Plugins":"Hide Commands of other Plugins",Icon:"Symbol",Name:"Name","Custom Name":"Benutzerdefinierter Name","Add command to all devices":"F\xFCge Befehl allen Ger\xE4ten hinzu","Add command only to mobile devices":"F\xFCge Befehl nur Mobilen Ger\xE4ten hinzu","Add command only to desktop devices":"F\xFCge Befehl nur Desktop Ger\xE4ten hinzu","Add command only to this device":"F\xFCge Befehl nur diesem Ger\xE4t hinzu",Done:"Fertig","By Johnny\u2728 and phibr0":"Von Johnny\u2728 und phibr0","Leave feedback":"Feedback geben",Donate:"Spenden","Share feedback, issues, and ideas with our feedback form.":"Teile Feedback, Probleme und Ideen mit unserem Feedback Formular!","Consider donating to support development.":"Spende um die Entwicklung zu unterst\xFCtzen.",Save:"Speichern","This Command is not available on this device.":"Dieser Befehl ist auf diesem Ger\xE4t nicht verf\xFCgbar.",Show:"Anzeigen",Hide:"Verstecken","Hide other Commands":"Andere Befehle verstecken","Double click to enter custom value":"Doppelklicken um eigenen Wert einzutragen","Choose custom spacing for Command Buttons":"W\xE4hle den Abstand zwischen Befehlen","Change the spacing between commands. You can set different values on mobile and desktop.":"Ver\xE4ndert den Abstand zwischen Befehlen.",Warning:"Achtung","As of Obsidian 0.16.0 you need to explicitly enable the View Header.":'Ab Obsidian Version 0.16.0 m\xFCssen Sie den "View Header" explizit aktivieren. Anschlie\xDFend muss Obsidian neugestartet werden.',"Open Appearance Settings":"\xD6ffne Darstellungs-Einstellungen",Explorer:"Explorer"};var vt={"Open Commander Settings":"Open Commander Settings","Open Macro Builder":"Open Macro Builder","Change Icon":"Change Icon",Rename:"Rename",Delete:"Delete","Add command":"Add command","Add new":"Add new command","This Command seems to have been removed. {{command_name}}":"This Command seems to have been removed. {{command_name}}","Choose a Command to add":"Choose a Command to add","to navigate":"to navigate","to choose an icon":"to choose an icon","to cancel":"to cancel","Use a custom name":"Use a custom name","Choose a custom Name for your new Command":"Choose a custom Name for your new Command","to save":"to save","Choose a Icon for your new Command":"Choose a Icon for your new Command","to choose a custom icon":"to choose a custom icon","Remove Command":"Remove Command","Double click to rename":"Double click to rename","This device":"This device","Added by {{plugin_name}}.":"Added by {{plugin_name}}.","Warning: This is a checked Command, meaning it might not run under every circumstance.":"Warning: This is a checked Command, meaning it might not run under every circumstance.","Move down":"Move down","Move up":"Move up","Change Mode (Currently: {{current_mode}})":"Change Mode (Currently: {{current_mode}})","Are you sure you want to delete the Command?":"Are you sure you want to delete the Command?","Remove and don't ask again":"Remove and don't ask again",Remove:"Remove",Cancel:"Cancel","Always ask before removing?":"Always ask before removing?","Always show a Popup to confirm deletion of a Command.":"Always show a Popup to confirm deletion of a Command.",'Show "Add Command" Button':'Show "Add Command" Button','Show the "Add Command" Button in every Menu. Requires restart.':'Show the "Add Command" Button in every Menu. Requires restart.',"Please restart Obsidian for these changes to take effect.":"Please restart Obsidian for these changes to take effect.","Enable debugging":"Enable debugging","Enable console output.":"Enable console output.",General:"General","Editor Menu":"Editor Menu","File Menu":"File Menu","Left Ribbon":"Ribbon","Right Ribbon":"Right Ribbon",Titlebar:"Titlebar",Statusbar:"Status Bar","Page Header":"Tab Bar","Support development":"Support development","No commands here!":"No commands here!","Would you like to add one now?":"Would you like to add one now?","Hide Commands":"Hide Commands","Choose new":"Choose new","Hide Commands of other Plugins":"Hide Commands of other Plugins",Icon:"Icon",Name:"Name","Custom Name":"Custom Name","Add command to all devices":"Add command to all devices","Add command only to mobile devices":"Add command only to mobile devices","Add command only to desktop devices":"Add command only to desktop devices","Add command only to this device":"Add command only to this device",Done:"Done","By Johnny\u2728 and phibr0":"By Johnny\u2728 and phibr0","Leave feedback":"Leave feedback",Donate:"Donate","Share feedback, issues, and ideas with our feedback form.":"Share feedback, issues, and ideas with our feedback form.","Consider donating to support development.":"Consider donating to support development.",Save:"Save","This Command is not available on this device.":"This Command is not available on this device.",Show:"Show",Hide:"Hide","Hide other Commands":"Hide other Commands","Double click to enter custom value":"Double click to enter custom value","Choose custom spacing for Command Buttons":"Choose custom spacing for Command Buttons","Change the spacing between commands. You can set different values on mobile and desktop.":"Change the spacing between commands.",Warning:"Warning","As of Obsidian 0.16.0 you need to explicitly enable the View Header.":"As of Obsidian 0.16.0 you need to explicitly enable the Tab Title Bar. Once enabled, you might need to restart Obsidian.","Open Appearance Settings":"Open Appearance Settings",Explorer:"Explorer"};var oo={};var no={};var ao={"Open Commander Settings":"Ouvrir les param\xE8tres de Commander","Open Macro Builder":"Ouvrir le constructeur de Macro","Change Icon":"Changer l'ic\xF4ne",Rename:"Renommer",Delete:"Supprimer","Add command":"Ajouter une commande","Add new":"Ajouter une nouvelle commande","This Command seems to have been removed. {{command_name}}":"Cette commande semble avoir \xE9t\xE9 supprim\xE9e. {{command_name}}","Choose a Command to add":"Choisissez une commande \xE0 ajouter","to navigate":"pour naviguer","to choose an icon":"pour choisir une ic\xF4ne","to cancel":"pour annuler","Use a custom name":"Utiliser un nom personnalis\xE9","Choose a custom Name for your new Command":"Choisissez un nom personnalis\xE9 pour votre nouvelle commande","to save":"pour enregistrer","Choose a Icon for your new Command":"Choisissez une ic\xF4ne pour votre nouvelle commande","to choose a custom icon":"pour choisir une ic\xF4ne personnalis\xE9e","Remove Command":"Supprimer la commande","Double click to rename":"Double-cliquez pour renommer","This device":"Cet appareil","Added by {{plugin_name}}.":"Ajout\xE9 par {{plugin_name}}.","Warning: This is a checked Command, meaning it might not run under every circumstance.":"Attention : Cette commande est coch\xE9e, ce qui signifie qu'elle pourrait ne pas fonctionner dans toutes les situations.","Move down":"Descendre","Move up":"Monter","Change Mode (Currently: {{current_mode}})":"Changer de mode (Actuellement : {{current_mode}})","Are you sure you want to delete the Command?":"\xCAtes-vous s\xFBr de vouloir supprimer la commande ?","Remove and don't ask again":"Supprimer et ne plus demander",Remove:"Supprimer",Cancel:"Annuler","Always ask before removing?":"Toujours demander avant de supprimer ?","Always show a Popup to confirm deletion of a Command.":"Toujours afficher une fen\xEAtre contextuelle pour confirmer la suppression d'une commande.",'Show "Add Command" Button':'Afficher le bouton "Ajouter une commande"','Show the "Add Command" Button in every Menu. Requires restart.':'Afficher le bouton "Ajouter une commande" dans chaque menu. N\xE9cessite un red\xE9marrage.',"Please restart Obsidian for these changes to take effect.":"Veuillez red\xE9marrer Obsidian pour que ces modifications prennent effet.","Enable debugging":"Activer le d\xE9bogage","Enable console output.":"Activer la sortie console.",General:"G\xE9n\xE9ral","Editor Menu":"Menu \xE9diteur","File Menu":"Menu fichier","Left Ribbon":"Ruban gauche","Right Ribbon":"Ruban droit",Titlebar:"Barre de titre",Statusbar:"Barre d'\xE9tat","Page Header":"En-t\xEAte de page","Support development":"Soutenir le d\xE9veloppement","No commands here!":"Aucune commande ici !","Would you like to add one now?":"Voulez-vous en ajouter une maintenant ?","Hide Commands":"Masquer les commandes","Choose new":"Choisir nouveau","Hide Commands of other Plugins":"Masquer les commandes d'autres plugins",Icon:"Ic\xF4ne",Name:"Nom","Custom Name":"Nom personnalis\xE9","Add command to all devices":"Ajouter la commande \xE0 tous les appareils","Add command only to mobile devices":"Ajouter la commande uniquement sur les appareils mobiles","Add command only to desktop devices":"Ajouter la commande uniquement sur les ordinateurs de bureau","Add command only to this device":"Ajouter la commande uniquement sur cet appareil",Done:"Termin\xE9","By Johnny\u2728 and phibr0":"Par Johnny\u2728 et phibr0","Leave feedback":"Laisser un commentaire",Donate:"Faire un don","Share feedback, issues, and ideas with our feedback form.":"Partagez vos commentaires, probl\xE8mes et id\xE9es avec notre formulaire de retour d'information.","Consider donating to support development.":"Envisagez de faire un don pour soutenir le d\xE9veloppement.",Save:"Enregistrer","This Command is not available on this device.":"Cette commande n'est pas disponible sur cet appareil.",Show:"Afficher",Hide:"Masquer","Hide other Commands":"Masquer les autres commandes","Double click to enter custom value":"Double-cliquez pour entrer une valeur personnalis\xE9e","Choose custom spacing for Command Buttons":"Choisissez un espacement personnalis\xE9 pour les boutons de commande","Change the spacing between commands.":"Modifier l'espacement entre les commandes.",Warning:"Avertissement","As of Obsidian 0.16.0 you need to explicitly enable the Tab Title Bar. Once enabled, you might need to restart Obsidian.":"\xC0 partir d'Obsidian 0.16.0, vous devez activer explicitement la barre de titre des onglets. Une fois activ\xE9e, il se peut que vous deviez red\xE9marrer Obsidian.","Open Appearance Settings":"Ouvrir les param\xE8tres d'apparence",Explorer:"Explorateur"};var io={};var ro={};var so={};var co={};var lo={};var mo={"Open Commander Settings":"Open Commander Instellingen","Open Macro Builder":"Open Macro Bouwer","Change Icon":"Verander Icoon",Rename:"Hernoem",Delete:"Verwijder","Add command":"Voeg commando toe","Add new":"Voeg nieuw commando toe","This Command seems to have been removed. {{command_name}}":"Het lijkt er op dat dit commando is verwijderd. {{command_name}}","Choose a Command to add":"Kies een commando om toe te voegen","to navigate":"naar navigatie","to choose an icon":"naar kies een icoon","to cancel":"naar annuleren","Use a custom name":"Gebruik een aangepaste naam","Choose a custom Name for your new Command":"Kies een aangepaste naam voor je nieuwe commando","to save":"naar opslaan","Choose a Icon for your new Command":"Kies een icoon voor je nieuwe commando","to choose a custom icon":"to choose a custom icon","Remove Command":"Verwijder commando","Double click to rename":"Dubbel klik om te hernoemen","This device":"Dit apparaat","Added by {{plugin_name}}.":"Toegevoegd door {{plugin_name}}.","Warning: This is a checked Command, meaning it might not run under every circumstance.":"Waarschuwing: Dit is een aangevinkte opdracht, wat betekent dat deze mogelijk niet onder alle omstandigheden wordt uitgevoerd.","Move down":"Naar beneden","Move up":"Naar boven","Change Mode (Currently: {{current_mode}})":"Verander modus (Currently: {{current_mode}})","Are you sure you want to delete the Command?":"Weet je zeker dat je dit commando wilt verwijderen??","Remove and don't ask again":"Verwijder en vraag niet opnieuw",Remove:"Verwijder",Cancel:"Annuleer","Always ask before removing?":"Altijd vragen voor verwijderen?","Always show a Popup to confirm deletion of a Command.":"Laat altijd een venster zien om het verwijderen van een commando te bevestigen.",'Show "Add Command" Button':'Laat "Voeg Commando toe" knop zien','Show the "Add Command" Button in every Menu. Requires restart.':'Laat de "Voeg Commenado toe" knop zien in elk menu. Vereist herstart.',"Please restart Obsidian for these changes to take effect.":"Start Obsidian a.u.b. opnieuw op om deze wijzigingen toe te passen.","Enable debugging":"Activeer debugging","Enable console output.":"Activeer console output.",General:"Algemeen","Editor Menu":"Editor Menu","File Menu":"Bestand Menu","Left Ribbon":"Linkse Lint","Right Ribbon":"Rechtse Lint",Titlebar:"Titelbalk",Statusbar:"Statusbalk","Page Header":"Pagina Kop","Support development":"Steun ontwikkeling","No commands here!":"Geen commando's hier!","Would you like to add one now?":"Zou je er \xE9\xE9n willen toevoegen?","Hide Commands":"Verberg Commando's","Choose new":"Kies nieuw","Hide Commands of other Plugins":"Verberg Commando's van andere Plugins",Icon:"Icoon",Name:"Naam","Custom Name":"Aangepaste naam","Add command to all devices":"Voeg commando toe aan alle apparaten","Add command only to mobile devices":"Voeg commando toe aan alleen mobiele apparaten","Add command only to desktop devices":"Voeg commando toe aan alleen dekstop apparaten","Add command only to this device":"Voed commando toe aan alleen dit apparaat",Done:"Klaar","By Johnny\u2728 and phibr0":"Door Johnny\u2728 en phibr0","Leave feedback":"Laat feedback achter",Donate:"Doneer","Share feedback, issues, and ideas with our feedback form.":"Deel feedback, problemen en idee\xEBn met ons feedback formulier.","Consider donating to support development.":"Overweeg te doneren om ontwikkeling te steunen.",Save:"Opslaan","This Command is not available on this device.":"Dit Commando is niet beschikbaar op dit apparaat.",Show:"Laat zien",Hide:"Verberg","Hide other Commands":"Verberg andere Commando's","Double click to enter custom value":"Dubbel klik om een aangepaste waarde in te vullen","Choose custom spacing for Command Buttons":"Kies aangepaste regelafstand voor Commando Knoppen","Change the spacing between commands. You can set different values on mobile and desktop.":"Verander regelafstand tussen Commando's. Dit kan verschillen tussen mobiel en dekstop.",Warning:"Waarschuwing","As of Obsidian 0.16.0 you need to explicitly enable the View Header.":"Sinds Obsidian 0.16.0 moet je de kop expliciet inschakelen. Wanneer ingeschakeld moet je mogelijk Obsidian herstarten.","Open Appearance Settings":"Open Weergave Instellingen",Explorer:"Verkenner"};var uo={};var po={};var fo={};var ho={};var vo={};var go={};var bo={};var Co={"Open Commander Settings":"\u6253\u5F00 Commander \u8BBE\u7F6E","Open Macro Builder":"\u6253\u5F00\u5B8F\u6307\u4EE4\u751F\u6210\u5668","Change Icon":"\u66F4\u6362\u56FE\u6807",Rename:"\u91CD\u547D\u540D",Delete:"\u5220\u9664","Add command":"\u6DFB\u52A0\u547D\u4EE4","Add new":"\u6DFB\u52A0\u65B0\u547D\u4EE4","This Command seems to have been removed. {{command_name}}":"\u8BE5\u547D\u4EE4\u4F3C\u4E4E\u5DF2\u88AB\u79FB\u9664\u3002{{command_name}}","Choose a Command to add":"\u9009\u62E9\u4E00\u4E2A\u547D\u4EE4\u5E76\u6DFB\u52A0","to navigate":"\u5BFC\u822A","to choose an icon":"\u9009\u4E2D\u4E00\u4E2A\u56FE\u6807","to cancel":"\u53D6\u6D88","Use a custom name":"\u4F7F\u7528\u4E00\u4E2A\u81EA\u5B9A\u4E49\u540D\u79F0","Choose a custom Name for your new Command":"\u4E3A\u4F60\u7684\u65B0\u547D\u4EE4\u9009\u62E9\u4E00\u4E2A\u81EA\u5B9A\u4E49\u540D\u79F0","to save":"\u4FDD\u5B58","Choose a Icon for your new Command":"\u4E3A\u4F60\u7684\u65B0\u547D\u4EE4\u9009\u62E9\u4E00\u4E2A\u56FE\u6807","to choose a custom icon":"\u9009\u62E9\u4E00\u4E2A\u81EA\u5B9A\u4E49\u56FE\u6807","Remove Command":"\u79FB\u9664\u547D\u4EE4","Double click to rename":"\u53CC\u51FB\u4EE5\u91CD\u547D\u540D","This device":"\u8BE5\u8BBE\u5907","Added by {{plugin_name}}.":"\u7531{{plugin_name}}\u6DFB\u52A0\u3002","Warning: This is a checked Command, meaning it might not run under every circumstance.":"\u8B66\u544A\uFF1A\u8FD9\u662F\u4E00\u4E2A\u53D7\u68C0\u7684\u547D\u4EE4\uFF0C\u8FD9\u610F\u5473\u7740\u5B83\u672A\u5FC5\u80FD\u5728\u6240\u4EE5\u73AF\u5883\u4E0B\u8FD0\u884C\u3002","Move down":"\u5411\u4E0B\u79FB\u52A8","Move up":"\u5411\u4E0A\u79FB\u52A8","Change Mode (Currently: {{current_mode}})":"\u5207\u6362\u6A21\u5F0F\uFF08\u5F53\u524D\uFF1A{{current_mode}}\uFF09","Are you sure you want to delete the Command?":"\u662F\u5426\u786E\u8BA4\u79FB\u9664\u8BE5\u547D\u4EE4\uFF1F","Remove and don't ask again":"\u79FB\u9664\u4E14\u4E0D\u8981\u518D\u8BE2\u95EE",Remove:"\u79FB\u9664",Cancel:"\u53D6\u6D88","Always ask before removing?":"\u5728\u79FB\u9664\u524D\u603B\u662F\u8BE2\u95EE\uFF1F","Always show a Popup to confirm deletion of a Command.":"\u5728\u786E\u8BA4\u79FB\u9664\u547D\u4EE4\u524D\u603B\u662F\u5F39\u7A97\u3002",'Show "Add Command" Button':"\u663E\u793A\u201C\u6DFB\u52A0\u547D\u4EE4\u201D\u6309\u94AE",'Show the "Add Command" Button in every Menu. Requires restart.':"\u5728\u6BCF\u4E2A\u83DC\u5355\u90FD\u5C55\u793A\u201C\u6DFB\u52A0\u547D\u4EE4\u201D\u6309\u94AE\u3002\u9700\u8981\u91CD\u542F\u3002","Please restart Obsidian for these changes to take effect.":"\u8BF7\u91CD\u542F Obsidian \u4EE5\u4F7F\u8FD9\u4E9B\u66F4\u6539\u751F\u6548\u3002","Enable debugging":"\u542F\u7528\u9664\u9519","Enable console output.":"\u542F\u7528\u63A7\u5236\u53F0\u8F93\u51FA\u3002",General:"\u901A\u7528","Editor Menu":"\u7F16\u8F91\u5668\u83DC\u5355","File Menu":"\u6587\u4EF6\u83DC\u5355","Left Ribbon":"\u5DE6\u4FA7\u8FB9\u680F","Right Ribbon":"\u53F3\u4FA7\u8FB9\u680F",Titlebar:"\u6807\u9898\u680F",Statusbar:"\u72B6\u6001\u680F","Page Header":"\u9875\u9996","Support development":"\u652F\u6301\u5F00\u53D1","No commands here!":"\u8FD9\u91CC\u6CA1\u6709\u547D\u4EE4\uFF01","Would you like to add one now?":"\u4F60\u73B0\u5728\u60F3\u8981\u52A0\u4E00\u4E2A\u5417\uFF1F","Hide Commands":"\u9690\u85CF\u547D\u4EE4","Choose new":"\u9009\u62E9\u65B0\u7684","Hide Commands of other Plugins":"\u9690\u85CF\u5176\u4ED6\u63D2\u4EF6\u7684\u547D\u4EE4",Icon:"\u56FE\u6807",Name:"\u540D\u79F0","Custom Name":"\u81EA\u5B9A\u4E49\u540D\u79F0","Add command to all devices":"\u5411\u6240\u6709\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to mobile devices":"\u53EA\u5411\u79FB\u52A8\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to desktop devices":"\u53EA\u5411\u684C\u9762\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to this device":"\u53EA\u5411\u5F53\u524D\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4",Done:"\u5B8C\u6210","By Johnny\u2728 and phibr0":"\u7531 Johnny\u2728 \u548C phibr0 \u5F00\u53D1","Leave feedback":"\u7559\u4E0B\u53CD\u9988",Donate:"\u6350\u8D60","Share feedback, issues, and ideas with our feedback form.":"\u4EE5\u6211\u4EEC\u7684\u53CD\u9988\u8868\uFF0C\u5206\u4EAB\u53CD\u9988\u3001\u8BAE\u9898\u6216\u8005\u4F60\u7684\u60F3\u6CD5\u3002","Consider donating to support development.":"\u8003\u8651\u6350\u8D60\u4EE5\u652F\u6301\u5F00\u53D1\u3002",Save:"\u4FDD\u5B58","This Command is not available on this device.":"\u8FD9\u4E00\u547D\u4EE4\u5728\u5F53\u524D\u8BBE\u5907\u4E0D\u53EF\u7528\u3002",Show:"\u663E\u793A",Hide:"\u9690\u85CF","Hide other Commands":"\u9690\u85CF\u5176\u4F59\u547D\u4EE4","Double click to enter custom value":"\u53CC\u51FB\u4EE5\u6DFB\u52A0\u81EA\u5B9A\u4E49\u503C","Choose custom spacing for Command Buttons":"\u4E3A\u547D\u4EE4\u6309\u94AE\u9009\u62E9\u81EA\u5B9A\u4E49\u95F4\u8DDD","Change the spacing between commands. You can set different values on mobile and desktop.":"\u6539\u53D8\u547D\u4EE4\u4E4B\u95F4\u7684\u95F4\u8DDD\u3002\u4F60\u53EF\u4EE5\u4E3A\u79FB\u52A8\u548C\u684C\u9762\u8BBE\u5907\u8BBE\u7F6E\u4E0D\u540C\u7684\u503C\u3002"};var _o={};var ua={ar:Gt,cs:Qt,da:eo,de:to,en:vt,"en-gb":oo,es:no,fr:ao,hi:io,id:ro,it:so,ja:co,ko:lo,nl:mo,nn:uo,pl:po,pt:fo,"pt-br":ho,ro:vo,ru:go,tr:bo,"zh-cn":Co,"zh-tw":_o},gt=ua[bt.moment.locale()];function u(e){return gt||console.error("Error: dictionary locale not found",bt.moment.locale()),gt&>[e]||vt[e]}var ne=class extends ze.FuzzySuggestModal{constructor(t){super(app);this.plugin=t,this.commands=Object.values(app.commands.commands),this.setPlaceholder(u("Choose a Command to add")),this.setInstructions([{command:"\u2191\u2193",purpose:u("to navigate")},{command:"\u21B5",purpose:u("to choose an icon")},{command:"esc",purpose:u("to cancel")}])}async awaitSelection(){return this.open(),new Promise((t,n)=>{this.onChooseItem=a=>t(a),this.onClose=()=>window.setTimeout(()=>n("No Command selected"),0)})}renderSuggestion(t,n){if(n.addClass("mod-complex"),n.createDiv({cls:"suggestion-content"}).createDiv({cls:"suggestion-title"}).setText(t.item.name),t.item.icon){let i=n.createDiv({cls:"suggestion-aux"});(0,ze.setIcon)(i.createSpan({cls:"suggestion-flair"}),t.item.icon)}}getItems(){return this.commands}getItemText(t){return t.name}onChooseItem(t,n){}};var yo={confirmDeletion:!0,showAddCommand:!0,debug:!1,editorMenu:[],fileMenu:[],leftRibbon:[],rightRibbon:[],titleBar:[],statusBar:[],pageHeader:[],macros:[],explorer:[],hide:{statusbar:[],leftRibbon:[]},spacing:8,advancedToolbar:{rowHeight:48,rowCount:1,spacing:0,buttonWidth:48,columnLayout:!1,mappedIcons:[],tooltips:!1,heightOffset:0}},wo=["activity","airplay","alarm-check","alarm-clock-off","alarm-clock","alarm-minus","alarm-plus","album","alert-circle","alert-octagon","alert-triangle","align-center-horizontal","align-center-vertical","align-center","align-end-horizontal","align-end-vertical","align-horizontal-distribute-center","align-horizontal-distribute-end","align-horizontal-distribute-start","align-horizontal-justify-center","align-horizontal-justify-end","align-horizontal-justify-start","align-horizontal-space-around","align-horizontal-space-between","align-justify","align-left","align-right","align-start-horizontal","align-start-vertical","align-vertical-distribute-center","align-vertical-distribute-end","align-vertical-distribute-start","align-vertical-justify-center","align-vertical-justify-end","align-vertical-justify-start","align-vertical-space-around","align-vertical-space-between","anchor","aperture","archive","arrow-big-down","arrow-big-left","arrow-big-right","arrow-big-up","arrow-down-circle","arrow-down-left","arrow-down-right","arrow-down","arrow-left-circle","arrow-left-right","arrow-left","arrow-right-circle","arrow-right","arrow-up-circle","arrow-up-left","arrow-up-right","arrow-up","asterisk","at-sign","award","axe","banknote","bar-chart-2","bar-chart","baseline","battery-charging","battery-full","battery-low","battery-medium","battery","beaker","bell-minus","bell-off","bell-plus","bell-ring","bell","bike","binary","bitcoin","bluetooth-connected","bluetooth-off","bluetooth-searching","bluetooth","bold","book-open","book","bookmark-minus","bookmark-plus","bookmark","bot","box-select","box","briefcase","brush","bug","building-2","building","bus","calculator","calendar","camera-off","camera","car","carrot","cast","check-circle-2","check-circle","check-square","check","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","chevrons-down-up","chevrons-down","chevrons-left","chevrons-right","chevrons-up-down","chevrons-up","chrome","circle-slashed","circle","clipboard-check","clipboard-copy","clipboard-list","clipboard-x","clipboard","clock-1","clock-10","clock-11","clock-12","clock-2","clock-3","clock-4","clock-5","clock-6","clock-7","clock-8","clock-9","lucide-clock","cloud-drizzle","cloud-fog","cloud-hail","cloud-lightning","cloud-moon","cloud-off","cloud-rain-wind","cloud-rain","cloud-snow","cloud-sun","lucide-cloud","cloudy","clover","code-2","code","codepen","codesandbox","coffee","coins","columns","command","compass","contact","contrast","cookie","copy","copyleft","copyright","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","lucide-cross","crosshair","crown","currency","database","delete","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","disc","divide-circle","divide-square","divide","dollar-sign","download-cloud","download","dribbble","droplet","droplets","drumstick","edit-2","edit-3","edit","egg","equal-not","equal","eraser","euro","expand","external-link","eye-off","eye","facebook","fast-forward","feather","figma","file-check-2","file-check","file-code","file-digit","file-input","file-minus-2","file-minus","file-output","file-plus-2","file-plus","file-search","file-text","file-x-2","file-x","file","files","film","filter","flag-off","flag-triangle-left","flag-triangle-right","flag","flame","flashlight-off","flashlight","flask-conical","flask-round","folder-minus","folder-open","folder-plus","lucide-folder","form-input","forward","frame","framer","frown","function-square","gamepad-2","gamepad","gauge","gavel","gem","ghost","gift","git-branch-plus","git-branch","git-commit","git-fork","git-merge","git-pull-request","github","gitlab","glasses","globe-2","globe","grab","graduation-cap","grid","grip-horizontal","grip-vertical","hammer","hand-metal","hand","hard-drive","hard-hat","hash","haze","headphones","heart","help-circle","hexagon","highlighter","history","home","image-minus","image-off","image-plus","image","import","inbox","indent","indian-rupee","infinity","lucide-info","inspect","instagram","italic","japanese-yen","key","keyboard","landmark","lucide-languages","laptop-2","laptop","lasso-select","lasso","layers","layout-dashboard","layout-grid","layout-list","layout-template","layout","library","life-buoy","lightbulb-off","lightbulb","link-2-off","link-2","lucide-link","linkedin","list-checks","list-minus","list-ordered","list-plus","list-x","list","loader-2","loader","locate-fixed","locate-off","locate","lock","log-in","log-out","mail","map-pin","map","maximize-2","maximize","megaphone","meh","menu","message-circle","message-square","mic-off","mic","minimize-2","minimize","minus-circle","minus-square","minus","monitor-off","monitor-speaker","monitor","moon","more-horizontal","more-vertical","mountain-snow","mountain","mouse-pointer-2","mouse-pointer-click","mouse-pointer","mouse","move-diagonal-2","move-diagonal","move-horizontal","move-vertical","move","music","navigation-2","navigation","network","octagon","option","outdent","package-check","package-minus","package-plus","package-search","package-x","package","palette","palmtree","paperclip","pause-circle","pause-octagon","pause","pen-tool","lucide-pencil","percent","person-standing","phone-call","phone-forwarded","phone-incoming","phone-missed","phone-off","phone-outgoing","phone","pie-chart","piggy-bank","lucide-pin","pipette","plane","play-circle","play","plug-zap","plus-circle","plus-square","plus","pocket","podcast","pointer","pound-sterling","power-off","power","printer","qr-code","quote","radio-receiver","radio","redo","refresh-ccw","refresh-cw","regex","repeat-1","repeat","reply-all","reply","rewind","rocket","rocking-chair","rotate-ccw","rotate-cw","rss","ruler","russian-ruble","save","scale","scan-line","scan","scissors","screen-share-off","screen-share","lucide-search","send","separator-horizontal","separator-vertical","server-crash","server-off","server","settings-2","settings","share-2","share","sheet","shield-alert","shield-check","shield-close","shield-off","shield","shirt","shopping-bag","shopping-cart","shovel","shrink","shuffle","sidebar-close","sidebar-open","sidebar","sigma","signal-high","signal-low","signal-medium","signal-zero","signal","skip-back","skip-forward","skull","slack","slash","sliders","smartphone-charging","smartphone","smile","snowflake","sort-asc","sort-desc","speaker","sprout","square","star-half","lucide-star","stop-circle","stretch-horizontal","stretch-vertical","strikethrough","subscript","sun","sunrise","sunset","superscript","swiss-franc","switch-camera","table","tablet","tag","target","tent","terminal-square","terminal","text-cursor-input","text-cursor","thermometer-snowflake","thermometer-sun","thermometer","thumbs-down","thumbs-up","ticket","timer-off","timer-reset","timer","toggle-left","toggle-right","tornado","trash-2","lucide-trash","trello","trending-down","trending-up","triangle","truck","tv-2","tv","twitch","twitter","type","umbrella","underline","undo","unlink-2","unlink","unlock","upload-cloud","upload","user-check","user-minus","user-plus","user-x","user","users","verified","vibrate","video-off","video","view","voicemail","volume-1","volume-2","volume-x","volume","wallet","wand","watch","waves","webcam","wifi-off","wifi","wind","wrap-text","wrench","x-circle","x-octagon","x-square","x","youtube","zap-off","zap","zoom-in","zoom-out","search-large"];var We=require("obsidian");var R=class extends We.FuzzySuggestModal{constructor(t){super(app);this.plugin=t,this.setPlaceholder(u("Choose a Icon for your new Command")),this.setInstructions([{command:"\u2191\u2193",purpose:u("to navigate")},{command:"\u21B5",purpose:u("to choose a custom icon")},{command:"esc",purpose:u("to cancel")}])}async awaitSelection(){return this.open(),new Promise((t,n)=>{this.onChooseItem=a=>t(a),this.onClose=()=>window.setTimeout(()=>n("No Icon selected"),0)})}renderSuggestion(t,n){n.addClass("mod-complex"),n.createDiv({cls:"suggestion-content"}).createDiv({cls:"suggestion-title"}).setText(t.item.replace(/-/g," ").replace(/(^\w{1})|(\s+\w{1})/g,c=>c.toUpperCase()));let i=n.createDiv({cls:"suggestion-aux"});(0,We.setIcon)(i.createSpan({cls:"suggestion-flair"}),t.item)}getItems(){return wo}getItemText(t){return t}onChooseItem(t,n){}};var et=require("obsidian");var ko=require("obsidian");var j=class extends ko.SuggestModal{constructor(t){super(app);this.defaultName=t;this.setPlaceholder(u("Use a custom name")),this.resultContainerEl.style.display="none",this.setInstructions([{command:"",purpose:u("Choose a custom Name for your new Command")},{command:"\u21B5",purpose:u("to save")},{command:"esc",purpose:u("to cancel")}])}onOpen(){var a;super.onOpen(),this.inputEl.value=this.defaultName;let t=createDiv({cls:"cmdr-name-input-wrapper"});(a=this.inputEl.parentNode)==null||a.insertBefore(t,this.inputEl),t.appendChild(this.inputEl),t.parentElement.style.display="block";let n=createEl("button",{text:u("Save"),cls:"mod-cta"});n.onclick=i=>this.selectSuggestion(this.inputEl.value,i),t.appendChild(n)}async awaitSelection(){return this.open(),new Promise((t,n)=>{this.onChooseSuggestion=a=>t(a),this.onClose=()=>window.setTimeout(()=>n("No Name selected"),0)})}getSuggestions(t){return[t]}renderSuggestion(t,n){}onChooseSuggestion(t,n){}};var Xe,_,Io,pa,_e,Mo,Po,je={},To=[],fa=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ae(e,o){for(var t in o)e[t]=o[t];return e}function Lo(e){var o=e.parentNode;o&&o.removeChild(e)}function r(e,o,t){var n,a,i,c={};for(i in o)i=="key"?n=o[i]:i=="ref"?a=o[i]:c[i]=o[i];if(arguments.length>2&&(c.children=arguments.length>3?Xe.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)c[i]===void 0&&(c[i]=e.defaultProps[i]);return Ue(e,c,n,a,null)}function Ue(e,o,t,n,a){var i={type:e,props:o,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a==null?++Io:a};return a==null&&_.vnode!=null&&_.vnode(i),i}function I(e){return e.children}function K(e,o){this.props=e,this.context=o}function ye(e,o){if(o==null)return e.__?ye(e.__,e.__.__k.indexOf(e)+1):null;for(var t;o0?Ue(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)!=null){if(f.__=t,f.__b=t.__b+1,(C=T[s])===null||C&&f.key==C.key&&f.type===C.type)T[s]=void 0;else for(g=0;g=t.__.length&&t.__.push({__V:$e}),t.__[e]}function D(e){return Ke=1,Xo(Jo,e)}function Xo(e,o,t){var n=Ge(ke++,2);if(n.t=e,!n.__c&&(n.__=[t?t(o):Jo(void 0,o),function(i){var c=n.__N?n.__N[0]:n.__[0],d=n.t(c,i);c!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=F,!F.u)){F.u=!0;var a=F.shouldComponentUpdate;F.shouldComponentUpdate=function(i,c,d){if(!n.__c.__H)return!0;var m=n.__c.__H.__.filter(function(s){return s.__c});if(m.every(function(s){return!s.__N}))return!a||a.call(this,i,c,d);var h=!1;return m.forEach(function(s){if(s.__N){var g=s.__[0];s.__=s.__N,s.__N=void 0,g!==s.__[0]&&(h=!0)}}),!(!h&&n.__c.props===i)&&(!a||a.call(this,i,c,d))}}return n.__N||n.__}function O(e,o){var t=Ge(ke++,3);!_.__s&&Mt(t.__H,o)&&(t.__=e,t.i=o,F.__H.__h.push(t))}function kt(e,o){var t=Ge(ke++,4);!_.__s&&Mt(t.__H,o)&&(t.__=e,t.i=o,F.__h.push(t))}function G(e){return Ke=5,Qe(function(){return{current:e}},[])}function Qe(e,o){var t=Ge(ke++,7);return Mt(t.__H,o)?(t.__V=e(),t.i=o,t.__h=e,t.__V):t.__}function ba(){for(var e;e=Zo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ye),e.__H.__h.forEach(wt),e.__H.__h=[]}catch(o){e.__H.__h=[],_.__e(o,e.__v)}}_.__b=function(e){F=null,Vo&&Vo(e)},_.__r=function(e){zo&&zo(e),ke=0;var o=(F=e.__c).__H;o&&(yt===F?(o.__h=[],F.__h=[],o.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=$e,t.__N=t.i=void 0})):(o.__h.forEach(Ye),o.__h.forEach(wt),o.__h=[])),yt=F},_.diffed=function(e){Wo&&Wo(e);var o=e.__c;o&&o.__H&&(o.__H.__h.length&&(Zo.push(o)!==1&&Oo===_.requestAnimationFrame||((Oo=_.requestAnimationFrame)||Ca)(ba)),o.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==$e&&(t.__=t.__V),t.i=void 0,t.__V=$e})),yt=F=null},_.__c=function(e,o){o.some(function(t){try{t.__h.forEach(Ye),t.__h=t.__h.filter(function(n){return!n.__||wt(n)})}catch(n){o.some(function(a){a.__h&&(a.__h=[])}),o=[],_.__e(n,t.__v)}}),Uo&&Uo(e,o)},_.unmount=function(e){jo&&jo(e);var o,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{Ye(n)}catch(a){o=a}}),t.__H=void 0,o&&_.__e(o,t.__v))};var qo=typeof requestAnimationFrame=="function";function Ca(e){var o,t=function(){clearTimeout(n),qo&&cancelAnimationFrame(o),setTimeout(e)},n=setTimeout(t,100);qo&&(o=requestAnimationFrame(t))}function Ye(e){var o=F,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),F=o}function wt(e){var o=F;e.__c=e.__(),F=o}function Mt(e,o){return!e||e.length!==o.length||o.some(function(t,n){return t!==e[n]})}function Jo(e,o){return typeof o=="function"?o(e):o}var Et={};(function e(o,t,n,a){var i=!!(o.Worker&&o.Blob&&o.Promise&&o.OffscreenCanvas&&o.OffscreenCanvasRenderingContext2D&&o.HTMLCanvasElement&&o.HTMLCanvasElement.prototype.transferControlToOffscreen&&o.URL&&o.URL.createObjectURL);function c(){}function d(p){var l=t.exports.Promise,S=l!==void 0?l:o.Promise;return typeof S=="function"?new S(p):(p(c,c),null)}var m=function(){var p=Math.floor(16.666666666666668),l,S,M={},L=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(l=function(P){var E=Math.random();return M[E]=requestAnimationFrame(function x(B){L===B||L+p-1{(0,et.setIcon)(i.current,e)},[e,o]),r("div",Ve({ref:i},t))}function J(e){let{isMobile:o,appId:t}=app;return e==="any"||e===t||e==="mobile"&&o||e==="desktop"&&!o}function Me(e){var t,n;let o="";for(let a of(t=e.hide.leftRibbon)!=null?t:[])o+=`div.side-dock-ribbon-action[aria-label="${a}"] {display: none !important; content-visibility: hidden;}`;for(let a of e.hide.statusbar)o+=`div.status-bar-item.plugin-${a} {display: none !important; content-visibility: hidden;}`;(n=document.head.querySelector("style#cmdr"))==null||n.remove(),o&&document.head.appendChild(createEl("style",{attr:{id:"cmdr"},text:o,type:"text/css"}))}async function xt({target:e}){let o=activeDocument.createElement("canvas");activeDocument.body.appendChild(o),o.style.position="fixed",o.style.width="100vw",o.style.height="100vh",o.style.top="0px",o.style.left="0px",o.style["pointer-events"]="none",o.style["z-index"]="100";let t=$o.create(o,{resize:!0,useWorker:!0}),n=e.getBoundingClientRect();await t({particleCount:et.Platform.isDesktop?160:80,startVelocity:55,spread:75,angle:90,drift:-1,ticks:250,origin:{x:(n.x+n.width/2)/activeWindow.innerWidth,y:(n.y+n.height/2)/activeWindow.innerHeight}}),o.remove()}function tt(e){activeDocument.body.style.setProperty("--cmdr-spacing",`${e}px`)}function Ee(e){let o=Object.keys(app.commands.commands).filter(n=>n.startsWith("cmdr:macro-"));for(let n of o)app.commands.removeCommand(n);let t=e.settings.macros;for(let[n,a]of Object.entries(t))e.addCommand({id:`macro-${n}`,name:a.name,callback:()=>{e.executeMacro(parseInt(n))}})}function oe(e){var n,a;let{classList:o,style:t}=document.body;t.setProperty("--at-button-height",((n=e.rowHeight)!=null?n:48)+"px"),t.setProperty("--at-button-width",((a=e.buttonWidth)!=null?a:48)+"px"),t.setProperty("--at-row-count",e.rowCount.toString()),t.setProperty("--at-spacing",e.spacing+"px"),t.setProperty("--at-offset",e.heightOffset+"px"),o.toggle("AT-multirow",e.rowCount>1),o.toggle("AT-row",!e.columnLayout),o.toggle("AT-column",e.columnLayout),o.toggle("AT-no-toolbar",e.rowCount===0)}function Yo(){let{classList:e,style:o}=document.body;o.removeProperty("--at-button-height"),o.removeProperty("--at-button-width"),o.removeProperty("--at-row-count"),o.removeProperty("--at-spacing"),o.removeProperty("--at-offset"),e.remove("AT-multirow"),e.remove("AT-row"),e.remove("AT-column"),e.remove("AT-no-toolbar"),e.remove("advanced-toolbar")}function ot(e){e.mappedIcons.forEach(o=>{let t=app.commands.commands[o.commandID];t?t.icon=o.iconID:e.mappedIcons.remove(o)})}var Sn=require("obsidian");var xe=require("obsidian");var Go=require("obsidian");function Ko({modal:e}){return r(I,null,r("p",null,u("Are you sure you want to delete the Command?")),r("div",{className:"modal-button-container"},r("button",{className:"mod-warning",onClick:async()=>{e.plugin.settings.confirmDeletion=!1,e.plugin.saveSettings(),e.remove=!0,e.close()}},u("Remove and don't ask again")),r("button",{className:"mod-warning",onClick:()=>{e.remove=!0,e.close()}},u("Remove")),r("button",{onClick:()=>{e.remove=!1,e.close()}},u("Cancel"))))}var V=class extends Go.Modal{constructor(t){super(app);this.plugin=t}async onOpen(){this.titleEl.innerText=u("Remove Command"),this.containerEl.style.zIndex="99",this.reactComponent=r(Ko,{modal:this}),W(this.reactComponent,this.contentEl)}async didChooseRemove(){return this.open(),new Promise(t=>{this.onClose=()=>{var n;return t((n=this.remove)!=null?n:!1)}})}onClose(){W(null,this.contentEl)}};var Z=class{constructor(o,t){this.plugin=o,this.pairs=t}};var ve=class extends Z{constructor(t,n){super(t,n);this.actions=new Map;this.init(),this.plugin.register(()=>this.actions.forEach((a,i)=>this.removeAction(i)))}getFileExplorers(){return app.workspace.getLeavesOfType("file-explorer")}init(){app.workspace.onLayoutReady(()=>{for(let t of this.pairs)J(t.mode)&&(app.workspace.onLayoutReady(()=>{this.getFileExplorers().forEach(a=>{this.addAction(t,a)})}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.getFileExplorers().forEach(a=>{this.addAction(t,a)})})))})}reorder(){this.actions.forEach((t,n)=>this.removeAction(n,!0)),this.init()}async addCommand(t){this.pairs.push(t),app.workspace.onLayoutReady(()=>{this.getFileExplorers().forEach(a=>{this.addAction(t,a)})}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.getFileExplorers().forEach(a=>{this.addAction(t,a)})})),await this.plugin.saveSettings()}async removeCommand(t){this.pairs.remove(t),this.removeAction(t),await this.plugin.saveSettings()}buttonExists(t,n){return[...t.view.containerEl.querySelectorAll("div.nav-buttons-container > .cmdr.clickable-icon")].some(a=>a.getAttribute("data-cmdr")===n.icon+n.name)}addAction(t,n){var m,h,s,g,C;if(this.buttonExists(n,t))return;let a=createDiv({cls:"cmdr clickable-icon",attr:{"aria-label-position":"top","aria-label":t.name,"data-cmdr":t.icon+t.name}});this.actions.set(t,a),a.style.color=t.color==="#000000"||t.color===void 0?"inherit":t.color;let i=!1,c=()=>{a.empty(),(0,xe.setIcon)(a,t.icon),a.onclick=()=>app.commands.executeCommandById(t.id)},d=()=>{a.empty(),(0,xe.setIcon)(a,"trash"),a.onclick=async()=>{(!this.plugin.settings.confirmDeletion||await new V(this.plugin).didChooseRemove())&&this.removeCommand(t)}};a.addEventListener("mouseleave",()=>{c(),i=!1}),a.addEventListener("mousemove",f=>{f.preventDefault(),f.stopImmediatePropagation(),f.shiftKey&&(i||d(),i=!0)}),a.addEventListener("contextmenu",f=>{f.stopImmediatePropagation(),new xe.Menu().addItem(b=>{b.setTitle(u("Add command")).setIcon("command").onClick(async()=>{let y=await q(this.plugin);this.addCommand(y)})}).addSeparator().addItem(b=>{b.setTitle(u("Change Icon")).setIcon("box").onClick(async()=>{let y=await new R(this.plugin).awaitSelection();y&&y!==t.icon&&(t.icon=y,await this.plugin.saveSettings(),this.reorder())})}).addItem(b=>{b.setTitle(u("Rename")).setIcon("text-cursor-input").onClick(async()=>{let y=await new j(t.name).awaitSelection();y&&y!==t.name&&(t.name=y,await this.plugin.saveSettings(),this.reorder())})}).addItem(b=>{b.dom.addClass("is-warning"),b.setTitle(u("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new V(this.plugin).didChooseRemove())&&this.removeCommand(t)})}).showAtMouseEvent(f)}),c(),(C=(g=(s=(h=(m=n.view)==null?void 0:m.containerEl)==null?void 0:h.querySelector)==null?void 0:s.call(h,"div.nav-buttons-container"))==null?void 0:g.appendChild)==null||C.call(g,a)}removeAction(t,n=!1){let a=this.actions.get(t);if(!!a){if(n){a.remove(),this.actions.delete(t);return}a.addClass("cmdr-ribbon-removing"),a.addEventListener("transitionend",async()=>{a.remove(),this.actions.delete(t)})}}};var se=require("obsidian");var nt=class extends Z{async addCommand(o){this.pairs.push(o),await this.plugin.saveSettings()}async removeCommand(o){this.pairs.remove(o),await this.plugin.saveSettings()}reorder(){}addRemovableCommand(o,t,n,a,i){return c=>{var f;c.dom.addClass("cmdr"),c.dom.style.color=t.color==="#000000"||t.color===void 0?"inherit":t.color,c.setSection("cmdr"),c.dom.style.display="flex";let d=createDiv({cls:"cmdr-menu-more-options"}),m=null;d.addEventListener("click",b=>{b.preventDefault(),b.stopImmediatePropagation(),m?(m.hide(),m=null):m=new se.Menu().addItem(y=>{y.setTitle(u("Change Icon")).setIcon("box").onClick(async()=>{let v=await new R(n).awaitSelection();v&&v!==t.icon&&(t.icon=v,await n.saveSettings())})}).addItem(y=>{y.setTitle(u("Rename")).setIcon("text-cursor-input").onClick(async()=>{let v=await new j(t.name).awaitSelection();v&&v!==t.name&&(t.name=v,await n.saveSettings())})}).addItem(y=>{y.dom.addClass("is-warning"),y.setTitle(u("Delete")).setIcon("lucide-trash").onClick(async()=>{(!n.settings.confirmDeletion||await new V(n).didChooseRemove())&&C()})}).showAtMouseEvent(b)}),(0,se.setIcon)(d,"more-vertical"),c.dom.append(d),c.setTitle((f=t.name)!=null?f:o.name).setIcon(t.icon).onClick(()=>app.commands.executeCommandById(t.id));let h=!1,s=()=>{d.style.display="none"},g=()=>{d.style.display="block"},C=async()=>{c.dom.addClass("cmdr-removing"),a.registerDomEvent(c.dom,"transitionend",()=>{c.dom.remove()}),i.remove(t),await n.saveSettings()};a.registerDomEvent(c.dom,"mousemove",b=>{b.preventDefault(),b.stopImmediatePropagation(),h||g(),h=!0}),a.registerDomEvent(c.dom,"mouseleave",()=>{s(),h=!1}),s()}}addCommandAddButton(o,t,n){o.settings.showAddCommand&&t.addItem(a=>{a.setTitle(u("Add command")).setIcon("plus-circle").setSection("cmdr").onClick(async()=>{try{let i=await q(o);n.push(i),await o.saveSettings()}catch(i){console.log(i)}})})}},Se=class extends nt{applyEditorMenuCommands(o){return async(t,n,a)=>{this.addCommandAddButton(o,t,o.settings.editorMenu);for(let i of o.settings.editorMenu){let c=Q(i.id);!c||!J(i.mode)||c.checkCallback&&!c.checkCallback(!0)||c.editorCheckCallback&&!c.editorCheckCallback(!0,n,a)||t.addItem(this.addRemovableCommand.call(this,c,i,o,t,o.settings.editorMenu))}}}},Ie=class extends nt{applyFileMenuCommands(o){return async(t,n,a,i)=>{this.addCommandAddButton(o,t,o.settings.fileMenu);for(let c of o.settings.fileMenu){let d=Q(c.id);if(!!d&&!(d.checkCallback&&!d.checkCallback(!0))){if(d.editorCallback){if(!((i==null?void 0:i.view)instanceof se.MarkdownView))continue}else if(d.editorCheckCallback)if((i==null?void 0:i.view)instanceof se.MarkdownView){if(!d.editorCheckCallback(!0,i.view.editor,i.view))continue}else continue;t.addItem(this.addRemovableCommand.call(this,d,c,o,t,o.settings.fileMenu))}}}}};var ce=require("obsidian");var ge=class extends Z{constructor(t,n){super(t,n);this.buttons=new WeakMap;this.init()}addPageHeaderButton(t,n){let{id:a,icon:i,name:c}=n,{view:d}=t;if(!(d instanceof ce.ItemView))return;let m=this.buttonsFor(t,!0);if(!m||m.has(a))return;let h=d.addAction(i,c,()=>{app.workspace.setActiveLeaf(t,{focus:!0}),app.commands.executeCommandById(a)});m.set(a,h),h.addClasses(["cmdr-page-header",a]),h.style.color=n.color==="#000000"||n.color===void 0?"inherit":n.color,h.addEventListener("contextmenu",s=>{s.stopImmediatePropagation(),new ce.Menu().addItem(g=>{g.setTitle(u("Add command")).setIcon("command").onClick(async()=>{let C=await q(this.plugin);this.addCommand(C)})}).addSeparator().addItem(g=>{g.setTitle(u("Change Icon")).setIcon("box").onClick(async()=>{let C=await new R(this.plugin).awaitSelection();C&&C!==n.icon&&(n.icon=C,await this.plugin.saveSettings(),this.reorder())})}).addItem(g=>{g.setTitle(u("Rename")).setIcon("text-cursor-input").onClick(async()=>{let C=await new j(n.name).awaitSelection();C&&C!==n.name&&(n.name=C,await this.plugin.saveSettings(),this.reorder())})}).addItem(g=>{g.dom.addClass("is-warning"),g.setTitle(u("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new V(this.plugin).didChooseRemove())&&this.removeCommand(n)})}).showAtMouseEvent(s)})}init(){this.plugin.register(()=>{this.removeButtonsFromAllLeaves()}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.addButtonsToAllLeaves()})),app.workspace.onLayoutReady(()=>setTimeout(()=>this.addButtonsToAllLeaves(),100))}addAdderButton(t){var c;let{view:n}=t,a="cmdr-adder";if(!(n instanceof ce.ItemView)||(c=this.buttons.get(n))!=null&&c.has(a))return;let i=n.addAction("plus",u("Add new"),async()=>{this.addCommand(await q(this.plugin))});i.addClasses(["cmdr",a]),this.buttons.has(n)||this.buttons.set(n,new Map),this.buttons.get(n).set(a,i)}addButtonsToAllLeaves(t=!1){activeWindow.requestAnimationFrame(()=>app.workspace.iterateAllLeaves(n=>this.addButtonsToLeaf(n,t)))}removeButtonsFromAllLeaves(){activeWindow.requestAnimationFrame(()=>app.workspace.iterateAllLeaves(t=>this.removeButtonsFromLeaf(t)))}buttonsFor(t,n=!1){if(t.view instanceof ce.ItemView)return n&&!this.buttons.has(t.view)&&this.buttons.set(t.view,new Map),this.buttons.get(t.view)}addButtonsToLeaf(t,n=!1){var a;if(t.view instanceof ce.ItemView){if(n)this.removeButtonsFromLeaf(t);else if((a=this.buttonsFor(t))!=null&&a.size)return;for(let i=this.pairs.length-1;i>=0;i--){let c=this.pairs[i];J(c.mode)&&this.addPageHeaderButton(t,c)}this.plugin.settings.showAddCommand&&this.addAdderButton(t)}}removeButtonsFromLeaf(t){let n=this.buttonsFor(t);if(n){for(let a of n.values())a.detach();n==null||n.clear()}}reorder(){this.addButtonsToAllLeaves(!0)}async addCommand(t){this.pairs.push(t),this.addButtonsToAllLeaves(!0),await this.plugin.saveSettings()}async removeCommand(t){this.pairs.remove(t),this.addButtonsToAllLeaves(!0),await this.plugin.saveSettings()}};var le=require("obsidian");var be=class extends Z{constructor(t,n){super(t,n);this.actions=new Map;this.addBtn=createDiv({cls:"cmdr status-bar-item cmdr-adder",attr:{"aria-label-position":"top","aria-label":u("Add new")}});this.init(),this.plugin.register(()=>this.actions.forEach((a,i)=>this.removeAction(i)))}init(){app.workspace.onLayoutReady(()=>{this.container=app.statusBar.containerEl;for(let t of this.pairs)Q(t.id)||this.pairs.remove(t),J(t.mode)&&this.addAction(t);this.plugin.saveSettings(),this.plugin.registerDomEvent(this.container,"contextmenu",t=>{t.target===this.container&&new le.Menu().addItem(n=>{n.setTitle(u("Add command")).setIcon("command").onClick(async()=>{let a=await q(this.plugin);this.addCommand(a)})}).showAtMouseEvent(t)}),this.plugin.register(()=>this.addBtn.remove()),(0,le.setIcon)(this.addBtn,"plus"),this.addBtn.onclick=async()=>{let t=await q(this.plugin);this.addCommand(t),this.reorder()},this.plugin.settings.showAddCommand&&this.container.prepend(this.addBtn)})}reorder(){this.addBtn.remove(),this.actions.forEach((t,n)=>this.removeAction(n,!0)),this.init()}async addCommand(t){this.pairs.push(t),this.addAction(t),await this.plugin.saveSettings()}async removeCommand(t){this.pairs.remove(t),this.removeAction(t),await this.plugin.saveSettings()}addAction(t){let n=createDiv({cls:"cmdr status-bar-item clickable-icon",attr:{"aria-label-position":"top","aria-label":t.name}});this.actions.set(t,n),n.style.color=t.color==="#000000"||t.color===void 0?"inherit":t.color;let a=!1,i=()=>{n.empty(),(0,le.setIcon)(n,t.icon),n.onclick=()=>app.commands.executeCommandById(t.id)},c=()=>{n.empty(),(0,le.setIcon)(n,"trash"),n.onclick=async()=>{(!this.plugin.settings.confirmDeletion||await new V(this.plugin).didChooseRemove())&&this.removeCommand(t)}};n.addEventListener("mouseleave",()=>{i(),a=!1}),n.addEventListener("mousemove",d=>{d.preventDefault(),d.stopImmediatePropagation(),d.shiftKey&&(a||c(),a=!0)}),n.addEventListener("contextmenu",d=>{d.stopImmediatePropagation(),new le.Menu().addItem(m=>{m.setTitle(u("Add command")).setIcon("command").onClick(async()=>{let h=await q(this.plugin);this.addCommand(h)})}).addSeparator().addItem(m=>{m.setTitle(u("Change Icon")).setIcon("box").onClick(async()=>{let h=await new R(this.plugin).awaitSelection();h&&h!==t.icon&&(t.icon=h,await this.plugin.saveSettings(),this.reorder())})}).addItem(m=>{m.setTitle(u("Rename")).setIcon("text-cursor-input").onClick(async()=>{let h=await new j(t.name).awaitSelection();h&&h!==t.name&&(t.name=h,await this.plugin.saveSettings(),this.reorder())})}).addItem(m=>{m.dom.addClass("is-warning"),m.setTitle(u("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new V(this.plugin).didChooseRemove())&&this.removeCommand(t)})}).showAtMouseEvent(d)}),i(),this.container.prepend(n)}removeAction(t,n=!1){let a=this.actions.get(t);if(!!a){if(n){a.remove(),this.actions.delete(t);return}a.addClass("cmdr-ribbon-removing"),a.addEventListener("transitionend",async()=>{a.remove(),this.actions.delete(t)})}}};var Qo=require("obsidian");var ct=require("obsidian");var X=require("obsidian");var Tt=require("obsidian");var en=["https://github.com/jsmorabito","https://github.com/phibr0","https://www.youtube.com/watch?v=dQw4w9WgXcQ"];function St(){let[e,o]=D(0);return r("div",{className:"cmdr-credits"},r("span",{onClick:()=>{o(t=>t+1),location.replace(en[e%en.length])}},u("By Johnny\u2728 and phibr0")))}function ya(e,o){for(var t in o)e[t]=o[t];return e}function Pt(e,o){for(var t in e)if(t!=="__source"&&!(t in o))return!0;for(var n in o)if(n!=="__source"&&e[n]!==o[n])return!0;return!1}function tn(e){this.props=e}function dn(e,o){function t(a){var i=this.props.ref,c=i==a.ref;return!c&&i&&(i.call?i(null):i.current=null),o?!o(this.props,a)||!c:Pt(this.props,a)}function n(a){return this.shouldComponentUpdate=t,r(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(tn.prototype=new K).isPureReactComponent=!0,tn.prototype.shouldComponentUpdate=function(e,o){return Pt(this.props,e)||Pt(this.state,o)};var on=_.__b;_.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),on&&on(e)};var xs=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var wa=_.__e;_.__e=function(e,o,t,n){if(e.then){for(var a,i=o;i=i.__;)if((a=i.__c)&&a.__c)return o.__e==null&&(o.__e=t.__e,o.__k=t.__k),a.__c(e,o)}wa(e,o,t,n)};var nn=_.unmount;function mn(e,o,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=ya({},e)).__c!=null&&(e.__c.__P===t&&(e.__c.__P=o),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return mn(n,o,t)})),e}function un(e,o,t){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return un(n,o,t)}),e.__c&&e.__c.__P===o&&(e.__e&&t.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=t)),e}function It(){this.__u=0,this.t=null,this.__b=null}function pn(e){var o=e.__.__c;return o&&o.__a&&o.__a(e)}function at(){this.u=null,this.o=null}_.unmount=function(e){var o=e.__c;o&&o.__R&&o.__R(),o&&e.__h===!0&&(e.type=null),nn&&nn(e)},(It.prototype=new K).__c=function(e,o){var t=o.__c,n=this;n.t==null&&(n.t=[]),n.t.push(t);var a=pn(n.__v),i=!1,c=function(){i||(i=!0,t.__R=null,a?a(d):d())};t.__R=c;var d=function(){if(!--n.__u){if(n.state.__a){var h=n.state.__a;n.__v.__k[0]=un(h,h.__c.__P,h.__c.__O)}var s;for(n.setState({__a:n.__b=null});s=n.t.pop();)s.forceUpdate()}},m=o.__h===!0;n.__u++||m||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(c,c)},It.prototype.componentWillUnmount=function(){this.t=[]},It.prototype.render=function(e,o){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=mn(this.__b,t,n.__O=n.__P)}this.__b=null}var a=o.__a&&r(I,null,e.fallback);return a&&(a.__h=null),[r(I,null,o.__a?null:e.children),a]};var an=function(e,o,t){if(++t[1]===t[0]&&e.o.delete(o),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]{xt(n),setTimeout(()=>location.replace("https://forms.gle/hPjn61G9bqqFb3256"),Math.random()*800+500)}},r(k,{icon:"message-square",size:20}),u("Leave feedback")),t=r("button",{className:"mod-cta",onClick:n=>{xt(n),setTimeout(()=>location.replace("https://ko-fi.com/phibr0"),Math.random()*800+500)}},r(k,{icon:"coffee",size:20}),u("Support development"));return r("div",{className:"cmdr-about"},Tt.Platform.isMobile&&[r("hr",null),o,t],Tt.Platform.isDesktop&&[r("div",{className:"setting-item mod-toggle",style:{width:"100%",borderTop:"1px solid var(--background-modifier-border)",paddingTop:"18px"}},r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},u("Leave feedback")),r("div",{className:"setting-item-description"},u("Share feedback, issues, and ideas with our feedback form."))),r("div",{className:"setting-item-control"},o)),r("div",{className:"setting-item mod-toggle",style:{width:"100%"}},r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},u("Donate")),r("div",{className:"setting-item-description"},u("Consider donating to support development."))),r("div",{className:"setting-item-control"},t)),r("hr",null)],r(Ce,null),r("b",null,e.name),r(St,null),r("a",{className:"cmdr-version",href:"https://github.com/phibr0/obsidian-commander/releases/tag/"+e.version},e.version))}var z=require("obsidian");function At(e,o){if(e.empty(),new z.Setting(e).setName("Toolbar Row Count").setDesc("Set how many Rows the Mobile Toolbar should have. Set this to 0 to remove the Toolbar.").addSlider(n=>n.setLimits(0,5,1).setValue(o.settings.advancedToolbar.rowCount).setDynamicTooltip().onChange(async a=>{o.settings.advancedToolbar.rowCount=a,await o.saveSettings(),oe(o.settings.advancedToolbar)})),new z.Setting(e).setName("Column Layout").setDesc("Use a column based layout instead of the default row. This makes it easier to arrange the Commands.").addToggle(n=>n.setValue(o.settings.advancedToolbar.columnLayout).onChange(async a=>{o.settings.advancedToolbar.columnLayout=a,await o.saveSettings(),oe(o.settings.advancedToolbar)})),new z.Setting(e).setName("Bottom Offset").setDesc("Offset the Toolbar from the Bottom of the Screen. This is useful if the toolbar is partially obscured by other UI Elements.").addSlider(n=>n.setLimits(0,32,1).setValue(o.settings.advancedToolbar.heightOffset).setDynamicTooltip().onChange(async a=>{o.settings.advancedToolbar.heightOffset=a,await o.saveSettings(),oe(o.settings.advancedToolbar)})),z.Platform.isMobile){let n=document.createDocumentFragment();n.appendChild(createEl("h3",{text:"Custom Icons"})),e.appendChild(n),o.getCommandsWithoutIcons().forEach(a=>{new z.Setting(e).setName(a.name).setDesc(`ID: ${a.id}`).addButton(i=>{var d;let c=i.buttonEl.createDiv({cls:"AT-settings-icon"});if(a.icon)(0,z.setIcon)(c,a.icon);else{let m=(d=o.settings.advancedToolbar.mappedIcons.find(h=>h.commandID===a.id))==null?void 0:d.iconID;m?(0,z.setIcon)(c,m):i.setButtonText("No Icon")}i.onClick(async()=>{let m=await new R(o).awaitSelection(),h=o.settings.advancedToolbar.mappedIcons.find(s=>s.commandID===a.id);h?h.iconID=m:o.settings.advancedToolbar.mappedIcons.push({commandID:a.id,iconID:m}),await o.saveSettings(),ot(o.settings.advancedToolbar),At(e,o)})}).addExtraButton(i=>{i.setIcon("reset").setTooltip("Reset to default - Requires a restart").onClick(async()=>{o.settings.advancedToolbar.mappedIcons=o.settings.advancedToolbar.mappedIcons.filter(c=>c.commandID!==a.id),delete a.icon,delete app.commands.commands[a.id].icon,await o.saveSettings(),At(e,o),new z.Notice("If the default Icon doesn't appear, you might have to restart Obsidian.")})})})}let t=e.appendChild(createEl("div",{cls:"cmdr-sep-con",attr:{style:"margin-top: 64px"}}));t.appendChild(createEl("div",{text:"Advanced Settings",attr:{style:"margin-bottom: 8px; font-weight: bold"}})),new z.Setting(t).setName("Button Height").setDesc("Change the Height of each Button inside the Mobile Toolbar (in px).").addText(n=>{var a,i;return n.setValue((i=(a=o.settings.advancedToolbar.rowHeight)==null?void 0:a.toString())!=null?i:"48").setPlaceholder("48").onChange(async c=>{let d=Number(c),m=isNaN(d);n.inputEl.toggleClass("is-invalid",m),m||(o.settings.advancedToolbar.rowHeight=d,await o.saveSettings(),oe(o.settings.advancedToolbar))})}),new z.Setting(t).setName("Button Width").setDesc("Change the Width of each Button inside the Mobile Toolbar (in px).").addText(n=>{var a,i;return n.setValue((i=(a=o.settings.advancedToolbar.buttonWidth)==null?void 0:a.toString())!=null?i:"48").setPlaceholder("48").onChange(async c=>{let d=Number(c),m=isNaN(d);n.inputEl.toggleClass("is-invalid",m),m||(o.settings.advancedToolbar.buttonWidth=d,await o.saveSettings(),oe(o.settings.advancedToolbar))})}),new z.Setting(t).setName("Toolbar Extra Spacing").setDesc("Some Themes need extra spacing in the toolbar. If your Toolbar doesn't wrap properly, try increasing this value.").addSlider(n=>n.setLimits(0,64,1).setValue(o.settings.advancedToolbar.spacing).setDynamicTooltip().onChange(async a=>{o.settings.advancedToolbar.spacing=a,await o.saveSettings(),oe(o.settings.advancedToolbar)}))}function Nt({plugin:e}){let o=G(null);return O(()=>(o.current&&At(o.current,e),()=>o.current&&o.current.empty()),[]),r(I,null,r("div",{className:"cmdr-sep-con callout","data-callout":"info"},r("span",{className:"cmdr-callout-warning"},r(k,{icon:"alert-circle"})," ","Info"),r("p",{className:"cmdr-warning-description"},"The Toolbar is only available in Obsidian Mobile. ",z.Platform.isMobile&&r(I,null,"To configure which Commands show up in the Toolbar, open the Mobile Settings.")),z.Platform.isMobile&&r("button",{onClick:()=>{app.setting.openTabById("mobile")},className:"mod-cta"},"Open Mobile Settings")),r("div",{ref:o,style:{paddingBottom:"128px"}}))}var me=require("obsidian");var Cn=require("obsidian");var bn=require("obsidian");var it=({initialColor:e,onChange:o})=>{let t=G(null);return O(()=>(t.current&&new bn.ColorComponent(t.current).setValue(e).onChange(o),()=>{var n,a;return(a=(n=t.current)==null?void 0:n.empty)==null?void 0:a.call(n)}),[o,e]),r("div",{ref:t,className:"cmdr-flex cmdr-items-center"})};function Dt({modal:e}){var o;return O(()=>{let t=()=>{this.forceUpdate()};return addEventListener("cmdr-icon-changed",t),()=>removeEventListener("cmdr-icon-changed",t)},[]),r("div",{className:"cmdr-mobile-modify-grid"},r("div",{className:"cmdr-mobile-modify-option",onClick:e.handleNewIcon},r("span",null,u("Icon")),r("span",{className:"cmdr-flex cmdr-gap-1"},r(k,{icon:e.pair.icon,size:20,className:"clickable-icon",style:{marginRight:"0px"}}),r(it,{initialColor:(o=e.pair.color)!=null?o:"#000",onChange:e.handleColorChange}))),r("div",{className:"cmdr-mobile-modify-option"},r("span",null,u("Name")),r("input",{onBlur:({currentTarget:t})=>e.handleRename(t.value),type:"text",placeholder:u("Custom Name"),value:e.pair.name})),r("div",{className:"cmdr-mobile-modify-option"},r("select",{className:"dropdown",value:e.pair.mode,onChange:({currentTarget:t})=>e.handleModeChange(t.value)},r("option",{value:"any"},u("Add command to all devices")),r("option",{value:"mobile"},u("Add command only to mobile devices")),r("option",{value:"desktop"},u("Add command only to desktop devices")),r("option",{value:app.appId},u("Add command only to this device")))),r("div",{className:"modal-button-container"},r("button",{className:"mod-cta",onClick:()=>e.close()},u("Done"))))}var de=class extends Cn.Modal{constructor(t,n,a,i,c){super(app);this.pair=t;this.handleRename=n;this.handleNewIcon=a;this.handleModeChange=i;this.handleColorChange=c}async onOpen(){this.titleEl.innerText=this.pair.name,this.reactComponent=r(Dt,{modal:this}),W(this.reactComponent,this.contentEl)}onClose(){W(null,this.contentEl)}};function Pe({value:e,handleChange:o,ariaLabel:t}){let[n,a]=D(!1),i=G(null),[c,d]=D(0);return O(()=>{var m,h;(m=i==null?void 0:i.current)==null||m.select(),(h=i==null?void 0:i.current)==null||h.focus()}),r("div",{class:"cmdr-editable"},n?r("input",{type:"text",value:e,style:{width:c+25+"px"},onKeyDown:m=>{m.key==="Enter"&&m.target.value.length>0&&(a(!1),o(m))},onBlur:()=>a(!1),ref:i}):r("span",{onDblClick:({target:m})=>{d(m==null?void 0:m.offsetWidth),a(!0)},"aria-label":t},e))}function Bt({pair:e,handleRemove:o,handleDown:t,handleUp:n,handleNewIcon:a,handleRename:i,handleModeChange:c,handleColorChange:d,sortable:m=!0}){var v;let h=Q(e.id);if(!h)return r(I,null,me.Platform.isDesktop&&r("div",{className:"setting-item mod-toggle"},r(k,{icon:"alert-triangle",size:20,className:"cmdr-icon clickable-icon mod-warning"}),r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},e.name),r("div",{className:"setting-item-description"},u("This Command is not available on this device."))),r("div",{className:"setting-item-control"},r("button",{className:"mod-warning",style:"display: flex",onClick:o,"aria-label":u("Delete")},r(k,{icon:"lucide-trash"})))),me.Platform.isMobile&&r("div",{className:"mobile-option-setting-item",onClick:()=>{new me.Notice(u("This Command is not available on this device."))}},r("span",{className:"mobile-option-setting-item-remove-icon",onClick:o},r(k,{icon:"minus-with-circle",size:22,style:{color:"var(--text-error)"}})),r("span",{className:"mobile-option-setting-item-option-icon mod-warning"},r(k,{icon:"alert-triangle",size:22})),r("span",{className:"mobile-option-setting-item-name"},e.name)));let s=h.id.split(":").first(),g=app.plugins.manifests[s],C=!g,f=h.hasOwnProperty("checkCallback")||h.hasOwnProperty("editorCheckCallback"),b=Ha(e.mode),y=e.mode.match(/desktop|mobile|any/)?e.mode[0].toUpperCase()+e.mode.substring(1):u("This device");return r(I,null,me.Platform.isDesktop&&r("div",{className:"setting-item mod-toggle"},r(k,{icon:e.icon,size:20,"aria-label":u("Choose new"),onClick:a,className:"cmdr-icon clickable-icon"}),r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},r(Pe,{ariaLabel:u("Double click to rename"),handleChange:({target:T})=>{i(T==null?void 0:T.value)},value:e.name}),e.name!==h.name&&r("span",{style:"margin-left: .8ex"},"(",h.name,")")),r("div",{className:"setting-item-description"},u("Added by {{plugin_name}}.".replace("{{plugin_name}}",C?"Obsidian":g.name))," ",f?u("Warning: This is a checked Command, meaning it might not run under every circumstance."):"")),r("div",{className:"setting-item-control"},r(it,{initialColor:(v=e.color)!=null?v:"#000",onChange:d}),m&&r(I,null,r(k,{icon:"arrow-down",className:"setting-editor-extra-setting-button clickable-icon",onClick:t,"aria-label":u("Move down")}),r(k,{icon:"arrow-up",className:"setting-editor-extra-setting-button clickable-icon",onClick:n,"aria-label":u("Move up")})),r(k,{icon:b,className:"setting-editor-extra-setting-button clickable-icon",onClick:()=>c(),"aria-label":u("Change Mode (Currently: {{current_mode}})").replace("{{current_mode}}",y)}),r("button",{className:"mod-warning",style:"display: flex",onClick:o,"aria-label":u("Delete")},r(k,{icon:"lucide-trash"})))),me.Platform.isMobile&&r("div",{className:"mobile-option-setting-item"},r("span",{className:"mobile-option-setting-item-remove-icon",onClick:o},r(k,{icon:"minus-with-circle",size:22,style:{color:"var(--text-error)"}})),r("span",{className:"mobile-option-setting-item-option-icon"},r(k,{icon:e.icon,size:22,onClick:()=>{new de(e,i,a,c,d).open()}})),r("span",{className:"mobile-option-setting-item-name",onClick:()=>{new de(e,i,a,c,d).open()}},e.name,e.name!==h.name&&r("span",{className:"cmdr-option-setting-name"},"(",h.name,")")),r("span",{className:"mobile-option-setting-item-option-icon"},m&&r(I,null,r(k,{icon:"arrow-down",className:"clickable-icon",onClick:t}),r(k,{icon:"arrow-up",className:"clickable-icon",onClick:n})),r(k,{icon:"three-horizontal-bars",className:"clickable-icon",onClick:()=>{new de(e,i,a,c,d).open()}}))))}function Ha(e){return e==="mobile"?"smartphone":e==="desktop"?"monitor":e==="any"?"cmdr-all-devices":"airplay"}function Ht(e,o,t){let n=o<0?e.length+o:o;if(n>=0&&n{if(a.mode.match(/desktop|mobile|any/)||a.mode===app.appId)return r(Bt,{sortable:n,key:a.id,pair:a,handleRemove:async()=>{(!o.settings.confirmDeletion||await new V(o).didChooseRemove())&&(await e.removeCommand(a),this.forceUpdate())},handleUp:()=>{Ht(e.pairs,i,i-1),e.reorder(),this.forceUpdate()},handleDown:()=>{Ht(e.pairs,i,i+1),e.reorder(),this.forceUpdate()},handleRename:async c=>{a.name=c,await o.saveSettings(),e.reorder(),this.forceUpdate()},handleNewIcon:async()=>{let c=await new R(o).awaitSelection();c&&c!==a.icon&&(a.icon=c,await o.saveSettings(),e.reorder(),this.forceUpdate()),dispatchEvent(new Event("cmdr-icon-changed"))},handleModeChange:async c=>{let d=["any","desktop","mobile",app.appId],m=d.indexOf(a.mode);m===3&&(m=-1),a.mode=c||d[m+1],await o.saveSettings(),e.reorder(),this.forceUpdate()},handleColorChange:async c=>{a.color=c,await o.saveSettings(),e.reorder()}})})),!e.pairs.some(a=>J(a.mode)||a.mode.match(/mobile|desktop/))&&r("div",{class:"cmdr-commands-empty"},r(Ce,null),r("h3",null,u("No commands here!")),r("span",null,u("Would you like to add one now?"))),_n.Platform.isMobile&&r("hr",null),r("div",{className:"cmdr-add-new-wrapper"},r("button",{className:"mod-cta",onClick:async()=>{let a=await q(o);await e.addCommand(a),e.reorder(),this.forceUpdate()}},u("Add command")))),t)}function rt({title:e,children:o}){let[t,n]=D(!1);return r("div",{className:"cmdr-accordion cmdr-sep-con","aria-expanded":t},r("div",{className:"cmdr-accordion-header cmdr-mb-1",onClick:()=>{n(!t)}},r(k,{className:"cmdr-accordion-chevron clickable-icon",icon:"chevron-down",size:24}),r("span",null,e)),r("div",{className:"cmdr-accordion-content",style:{maxHeight:[o].flat().length*120+"px"}},o))}function Rt({name:e,description:o,children:t,className:n}){return r("div",{className:`setting-item ${n}`},r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},e),r("div",{className:"setting-item-description"},o)),r("div",{className:"setting-item-control"},t))}function Ft(e){let[o,t]=D(e.value);return r(Rt,{name:e.name,description:e.description,className:"mod-toggle"},r("div",{className:`checkbox-container ${o?"is-enabled":""}`,onClick:()=>{t(!o),e.changeHandler(o)}}))}function Ot({name:e,description:o,changeHandler:t,value:n,hideLabel:a,showLabel:i}){let[c,d]=D(n);return r(Rt,{name:e,description:o,className:"mod-toggle"},r(k,{"aria-label":c?i:a,icon:c?"eye-off":"eye",size:20,className:"clickable-icon",onClick:()=>{d(!c),t(c)}}))}function st(e){var n,a,i;let[o,t]=D(e.value);return r(Rt,{description:e.description,name:e.name,className:"cmdr-slider"},r("div",null,r(Pe,{ariaLabel:u("Double click to enter custom value"),value:o.toString(),handleChange:({target:c})=>{let d=Number(c.value);!isNaN(d)&&o!==d&&(t(d),e.changeHandler(d))}}),r("input",{class:"slider",type:"range",min:(n=e.min)!=null?n:"0",max:(a=e.max)!=null?a:"32",step:(i=e.step)!=null?i:"1",value:o,onPointerMove:({target:c})=>{o!==c.value&&(t(c.value),e.changeHandler(c.value))}})))}function yn({plugin:e}){let[o,t]=D([]),n=e.settings.hide.leftRibbon;return O(()=>{t(app.workspace.leftRibbon.items.map(a=>({name:a.title,icon:a.icon})))},[]),r(I,null,r("hr",null),r(rt,{title:u("Hide other Commands")},o.map(a=>r(Ot,{name:a.name,description:"",hideLabel:u("Hide"),showLabel:u("Show"),changeHandler:async i=>{i?n.contains(a.name)&&n.remove(a.name):n.push(a.name),Me(e.settings),await e.saveSettings()},value:n.contains(a.name)}))))}function wn({plugin:e}){let o=e.settings.hide.statusbar,[t,n]=D([]);return O(()=>{let i=[...app.statusBar.containerEl.getElementsByClassName("status-bar-item")].map(c=>[...c.classList].find(d=>d.startsWith("plugin-"))).filter(c=>c).map(c=>c.substring(7));n(i.map(c=>app.plugins.manifests[c]||{id:c,name:c.replace(/-/g," ").replace(/(^\w{1})|(\s+\w{1})/g,d=>d.toUpperCase()),description:"Core Plugin"}))},[]),r(I,null,r("hr",null),r(rt,{title:u("Hide other Commands")},t.map(a=>r(Ot,{name:a.name,description:a.description,value:o.contains(a.id),hideLabel:u("Hide"),showLabel:u("Show"),changeHandler:async i=>{i?o.contains(a.id)&&o.remove(a.id):o.push(a.id),Me(e.settings),await e.saveSettings()}}))))}var En=require("obsidian");var Mn=require("obsidian");function kn({plugin:e,macro:o,onSave:t,onCancel:n}){let[a,i]=D(o.name||"Macro Name"),[c,d]=D(o.icon||"star"),[m,h]=D(o.startup||!1),[s,g]=D(JSON.parse(JSON.stringify(o.macro))||[]),C=this.forceUpdate.bind(this),f=async()=>{let y=await new ne(e).awaitSelection();y&&g([...s,{action:0,commandId:y.id}])},b=async()=>{g([...s,{action:1,delay:250}])};return r("div",null,r("div",{class:"setting-item cmdr-mm-item"},r("div",null,r("span",null,"Name"),r("input",{type:"text",placeholder:"Macro Name",value:a,onChange:y=>i(y.currentTarget.value),width:"100%"})),r("div",null,r("span",null,"Icon"),r("button",{onClick:async()=>d(await new R(e).awaitSelection())},r(k,{icon:c})))),s.map((y,v)=>{switch(y.action){case 0:let T=Q(y.commandId);return r("div",{class:"setting-item cmdr-mm-item"},r("div",null,r("button",{onClick:async()=>{let w=await new ne(e).awaitSelection();g(s.map((H,ee)=>ee===v?Yt(Ve({},H),{commandId:w.id}):H))}},(T==null?void 0:T.name)||"Cannot find Command")),r("div",null,r("div",{class:"cmdr-mm-action-options"},r(k,{class:"clickable-icon",icon:"arrow-down",onClick:()=>{if(v===s.length-1)return;let w=[...s],H=w[v];w[v]=w[v+1],w[v+1]=H,g(w)}}),r(k,{class:"clickable-icon",icon:"arrow-up",onClick:()=>{if(v===0)return;let w=[...s],H=w[v];w[v]=w[v-1],w[v-1]=H,g(w)}}),r(k,{class:"clickable-icon",icon:"cross",onClick:()=>{g(s.filter((w,H)=>H!==v))}}))));case 1:return r("div",{class:"setting-item cmdr-mm-item"},r("div",null,r(st,{name:"Delay",min:0,max:1e4,step:50,description:"Delay in milliseconds",value:y.delay,changeHandler:w=>y.delay=w})),r("div",null,r("div",{class:"cmdr-mm-action-options"},r(k,{class:"clickable-icon",icon:"arrow-down",onClick:()=>{if(v===s.length-1)return;let w=[...s],H=w[v];w[v]=w[v+1],w[v+1]=H,g(w)}}),r(k,{class:"clickable-icon",icon:"arrow-up",onClick:()=>{if(v===0)return;let w=[...s],H=w[v];w[v]=w[v-1],w[v-1]=H,g(w)}}),r(k,{class:"clickable-icon",icon:"cross",onClick:()=>{g(s.filter((w,H)=>H!==v))}}))));case 2:return r("div",null,"Editor: ",y.action);case 3:return r("div",null,"Loop: ",y.times)}}),r("div",{className:"setting-item cmdr-mm-actions cmdr-justify-between"},r("div",{className:"cmdr-flex cmdr-items-center cmdr-justify-self-start"},r("input",{type:"checkbox",id:"checkbox",checked:m,onChange:({target:y})=>{var v;h((v=y==null?void 0:y.checked)!=null?v:!1)}}),r("label",{htmlFor:"checkbox"},"Auto-Run on Startup")),r("div",null,r("button",{onClick:f},"Add Command"),r("button",{onClick:b},"Add Delay"))),r("div",{className:"cmdr-mm-control"},r("button",{class:s.length===0?"disabled":"mod-cta",disabled:s.length===0,onClick:()=>s.length&&t({macro:s,name:a,icon:c,startup:m})},"Save"),r("button",{onClick:n},"Cancel")))}var Te=class extends Mn.Modal{constructor(t,n,a){super(app);this.macro=n,this.plugin=t,this.onSave=a}onOpen(){this.titleEl.setText("Macro Builder"),W(r(kn,{plugin:this.plugin,macro:this.macro,onSave:this.onSave,onCancel:this.close.bind(this)}),this.contentEl)}onClose(){W(null,this.contentEl)}};function Vt({plugin:e,macros:o}){let t=(a,i)=>{let c=m=>{o.splice(i!==void 0?i:o.length,i!==void 0?1:0,m),e.saveSettings(),this.forceUpdate(),Ee(e),d.close()},d=new Te(e,a,c);d.open()},n=a=>{o.splice(a,1),e.saveSettings(),this.forceUpdate(),Ee(e)};return r(I,null,r("div",{className:"cmdr-sep-con"},o.map((a,i)=>r("div",{class:"setting-item mod-toggle"},r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},a.name),r("div",{className:"setting-item-description"},a.macro.length," Actions")),r("div",{className:"setting-item-control"},r("button",{"aria-label":"Edit Macro",onClick:()=>t(a,i)},r(k,{icon:"lucide-pencil"})),r("button",{"aria-label":"Delete",class:"mod-warning",onClick:async()=>{(!e.settings.confirmDeletion||await new V(e).didChooseRemove())&&n(i)}},r(k,{icon:"trash"})))))),!o.length&&r("div",{class:"cmdr-commands-empty"},r(Ce,null),r("h3",null,"No Macros yet!"),r("span",null,u("Would you like to add one now?"))),En.Platform.isMobile&&r("hr",null),r("div",{className:"cmdr-add-new-wrapper"},r("button",{class:"mod-cta",onClick:()=>t({name:"",macro:[],icon:"star"})},"Add Macro")))}function Le({plugin:e,mobileMode:o}){let[t,n]=D(0),[a,i]=D(!0),c=({key:m,shiftKey:h})=>{h&&m==="Tab"?t>0?n((t-1)%d.length):n(d.length-1):m==="Tab"&&n((t+1)%d.length)};O(()=>(addEventListener("keydown",c),()=>removeEventListener("keydown",c)),[t]),X.Platform.isMobile&&O(()=>{let m=document.querySelector(".modal-setting-back-button"),h=m.cloneNode(!0);m.parentNode.replaceChild(h,m),i(!0)},[]),O(()=>{let m=document.querySelector(".modal-setting-back-button");!m||(a?(m.parentElement.lastChild.textContent="Commander",m.onclick=()=>app.setting.closeActiveTab()):(m.parentElement.lastChild.textContent=d[t].name,m.onclick=()=>i(!0)))},[a]);let d=Qe(()=>[{name:u("General"),tab:r(I,null,r(Ft,{name:u("Always ask before removing?"),description:u("Always show a Popup to confirm deletion of a Command."),value:e.settings.confirmDeletion,changeHandler:async m=>{e.settings.confirmDeletion=!m,await e.saveSettings()}}),r(Ft,{value:e.settings.showAddCommand,name:u('Show "Add Command" Button'),description:'Show the "Add Command" Button in every Menu.',changeHandler:async m=>{e.settings.showAddCommand=!m,e.manager.pageHeader.reorder(),await e.saveSettings()}}),r(st,{value:e.settings.spacing,name:u("Choose custom spacing for Command Buttons"),description:u("Change the spacing between commands. You can set different values on mobile and desktop."),changeHandler:async m=>{tt(m),e.settings.spacing=m,await e.saveSettings()}}))},{name:u("Left Ribbon"),tab:r(ie,{manager:e.manager.leftRibbon,plugin:e,sortable:!1},r(yn,{plugin:e}),r("div",{className:"cmdr-sep-con callout","data-callout":"warning"},r("span",{className:"cmdr-callout-warning"},r(k,{icon:"alert-triangle"})," ","Reordering and Sorting"),r("p",{className:"cmdr-warning-description"},"As of Obsidian 1.1.0 you can reorder the Buttons in the left ribbon by dragging. This will replace the old sorting feature.")))},{name:u("Page Header"),tab:r(ie,{manager:e.manager.pageHeader,plugin:e},r("hr",null),r("div",{className:"cmdr-sep-con callout","data-callout":"warning"},r("span",{className:"cmdr-callout-warning"},r(k,{icon:"alert-triangle"})," ",u("Warning")),r("p",{className:"cmdr-warning-description"},u("As of Obsidian 0.16.0 you need to explicitly enable the View Header.")),r("button",{onClick:()=>{app.setting.openTabById("appearance"),setTimeout(()=>{var m,h,s,g;app.setting.activeTab.containerEl.scroll({behavior:"smooth",top:250}),(g=(s=(h=(m=app.setting.activeTab.containerEl.querySelectorAll(".setting-item-heading")[1].nextSibling)==null?void 0:m.nextSibling)==null?void 0:h.nextSibling)==null?void 0:s.addClass)==null||g.call(s,"cmdr-cta")},50)},className:"mod-cta"},u("Open Appearance Settings"))))},{name:u("Statusbar"),tab:r(ie,{manager:e.manager.statusBar,plugin:e},r(wn,{plugin:e}))},{name:u("Editor Menu"),tab:r(ie,{manager:e.manager.editorMenu,plugin:e})},{name:u("File Menu"),tab:r(ie,{manager:e.manager.fileMenu,plugin:e})},{name:u("Explorer"),tab:r(ie,{manager:e.manager.explorerManager,plugin:e},r("hr",null),r("div",{className:"cmdr-sep-con callout","data-callout":"warning"},r("span",{className:"cmdr-callout-warning"},r(k,{icon:"alert-triangle"})," ",u("Warning")),r("p",{className:"cmdr-warning-description"},"When clicking on a Command in the Explorer, the Explorer view will become focused. This might interfere with Commands that are supposed to be executed on an active File/Explorer.")))},{name:X.Platform.isMobile?"Mobile Toolbar":"Toolbar",tab:r(Nt,{plugin:e})},{name:"Macros",tab:r(Vt,{plugin:e,macros:e.settings.macros})}],[]);return r(I,null,X.Platform.isDesktop&&r("div",{className:"cmdr-setting-title"},r("h1",null,e.manifest.name)),(X.Platform.isDesktop||a)&&r(Oa,{tabs:d,activeTab:t,setActiveTab:n,setOpen:i}),r("div",{class:`cmdr-setting-content ${o?"cmdr-mobile":""}`},(X.Platform.isDesktop||!a)&&d[t].tab,(X.Platform.isMobile&&a||X.Platform.isDesktop&&t===0)&&r(Lt,{manifest:e.manifest})))}function Oa({tabs:e,activeTab:o,setActiveTab:t,setOpen:n}){let a=G(null),i=c=>{var d;c.preventDefault(),(d=a.current)==null||d.scrollBy({left:c.deltaY>0?16:-16})};return O(()=>{let c=a.current;if(!(!c||X.Platform.isMobile))return c.addEventListener("wheel",i),()=>c.removeEventListener("wheel",i)},[]),O(()=>{var c;return(c=document.querySelector(".cmdr-tab-active"))==null?void 0:c.scrollIntoView({behavior:"smooth",block:"nearest"})},[o]),r("nav",{class:`cmdr-setting-header ${X.Platform.isMobile?"cmdr-mobile":""}`,ref:a},r("div",{class:`cmdr-setting-tab-group ${X.Platform.isMobile?"vertical-tab-header-group-items":""}`},e.map((c,d)=>r("div",{className:`cmdr-tab ${o===d?"cmdr-tab-active":""} ${X.Platform.isMobile?"vertical-tab-nav-item":""}`,onClick:()=>{t(d),n(!1)}},c.name,X.Platform.isMobile&&r(k,{className:"vertical-tab-nav-item-chevron cmdr-block",icon:"chevron-right",size:24})))),X.Platform.isDesktop&&r("div",{className:"cmdr-fill"}))}var Ae=class extends ct.PluginSettingTab{constructor(t){super(app,t);this.plugin=t}display(){W(r(Le,{plugin:this.plugin,mobileMode:ct.Platform.isMobile}),this.containerEl)}hide(){W(null,this.containerEl)}};var lt=require("obsidian");var Ne=class extends lt.Modal{constructor(t){super(app);this.plugin=t,this.containerEl.addClass("cmdr-setting-modal")}onOpen(){let t=lt.Platform.isMobile;W(r(Le,{plugin:this.plugin,mobileMode:t}),this.contentEl)}onClose(){W(null,this.contentEl)}};var xn=require("obsidian");function zt(){(0,xn.addIcon)("cmdr-all-devices",'')}var De=class extends Z{constructor(t){super(t,t.settings.leftRibbon);this.plugin=t,this.plugin.settings.leftRibbon.forEach(n=>this.addCommand(n,!1)),app.workspace.onLayoutReady(()=>{})}async addCommand(t,n=!0){if(n&&(this.plugin.settings.leftRibbon.push(t),await this.plugin.saveSettings()),J(t.mode)){this.plugin.addRibbonIcon(t.icon,t.name,()=>app.commands.executeCommandById(t.id));let a=app.workspace.leftRibbon.items.find(i=>i.icon===t.icon&&i.name===i.name);a&&(a.buttonEl.style.color=t.color==="#000000"||t.color===void 0?"inherit":t.color),this.plugin.register(()=>this.removeCommand(t,!1))}}async removeCommand(t,n=!0){n&&(this.plugin.settings.leftRibbon.remove(t),await this.plugin.saveSettings());let a=app.workspace.leftRibbon.items.find(i=>i.icon===t.icon&&i.name===i.name);a&&a.buttonEl.remove(),app.workspace.leftRibbon.items.remove(a)}reorder(){this.plugin.settings.leftRibbon.forEach(t=>{this.removeCommand(t,!1),this.addCommand(t,!1)})}};var dt=class extends Sn.Plugin{async executeStartupMacros(){this.settings.macros.forEach((t,n)=>{t.startup&&this.executeMacro(n)})}async executeMacro(t){let n=this.settings.macros[t];if(!n)throw new Error("Macro not found");for(let a of n.macro)switch(a.action){case 0:{await app.commands.executeCommandById(a.commandId);continue}case 1:{await new Promise(i=>setTimeout(i,a.delay));continue}case 2:continue;case 3:{for(let i=0;inew Ne(this).open()}),this.registerEvent(app.workspace.on("editor-menu",this.manager.editorMenu.applyEditorMenuCommands(this))),this.registerEvent(app.workspace.on("file-menu",this.manager.fileMenu.applyFileMenuCommands(this))),app.workspace.onLayoutReady(()=>{Me(this.settings),Ee(this),tt(this.settings.spacing),oe(this.settings.advancedToolbar),ot(this.settings.advancedToolbar),this.executeStartupMacros()})}onunload(){var t;(t=document.head.querySelector("style#cmdr"))==null||t.remove(),Yo()}async loadSettings(){let t=Object.assign({},yo,await this.loadData());this.settings=t}async saveSettings(){await this.saveData(this.settings)}listActiveToolbarCommands(){return this.app.vault.getConfig("mobileToolbarCommands")}getCommands(){let t=[];return this.listActiveToolbarCommands().forEach(n=>{let a=this.app.commands.commands[n];a&&t.push(a)}),t}getCommandsWithoutIcons(t=!0){let n=[];return this.getCommands().forEach(a=>{a&&!a.icon&&n.push(a)}),t&&this.getCommands().forEach(a=>{this.settings.advancedToolbar.mappedIcons.find(i=>i.commandID===a.id)&&n.push(a)}),n}}; /* by phibr0 */