From 04a9803549de2fd16d2a072619f07bfc5fbe0b39 Mon Sep 17 00:00:00 2001 From: grabbit Date: Thu, 27 Jul 2023 22:57:11 +0800 Subject: [PATCH] vault backup: 2023-07-27 22:57:11 --- .obsidian/community-plugins.json | 18 +- .obsidian/plugins/calendar/data.json | 10 + .obsidian/plugins/cmdr/main.js | 9 + .obsidian/plugins/cmdr/manifest.json | 11 + .obsidian/plugins/cmdr/styles.css | 1 + .obsidian/plugins/media-extended/main.js | 43 + .../plugins/media-extended/manifest.json | 10 + .obsidian/plugins/media-extended/styles.css | 1 + .../plugins/notion-like-tables/data.json | 11 + .obsidian/plugins/notion-like-tables/main.js | 57067 ++++++++++++ .../plugins/notion-like-tables/manifest.json | 11 + .../plugins/notion-like-tables/styles.css | 215 + .obsidian/plugins/obsidian-banners/main.js | 29 + .../plugins/obsidian-banners/manifest.json | 10 + .obsidian/plugins/obsidian-banners/styles.css | 1 + .../obsidian-excel-to-markdown-table/main.js | 228 + .../manifest.json | 10 + .../styles.css | 1 + .obsidian/plugins/obsidian-linter/data.json | 19 + .obsidian/plugins/obsidian-projects/data.json | 12 + .obsidian/plugins/obsidian-projects/main.js | 77618 ++++++++++++++++ .../plugins/obsidian-projects/manifest.json | 11 + .../plugins/obsidian-projects/styles.css | 80 + .obsidian/plugins/various-complements/main.js | 7157 ++ .../plugins/various-complements/manifest.json | 10 + .../plugins/various-complements/styles.css | 149 + .obsidian/workspace.json | 37 +- 27 files changed, 142770 insertions(+), 9 deletions(-) create mode 100644 .obsidian/plugins/calendar/data.json create mode 100644 .obsidian/plugins/cmdr/main.js create mode 100644 .obsidian/plugins/cmdr/manifest.json create mode 100644 .obsidian/plugins/cmdr/styles.css create mode 100644 .obsidian/plugins/media-extended/main.js create mode 100644 .obsidian/plugins/media-extended/manifest.json create mode 100644 .obsidian/plugins/media-extended/styles.css create mode 100644 .obsidian/plugins/notion-like-tables/data.json create mode 100644 .obsidian/plugins/notion-like-tables/main.js create mode 100644 .obsidian/plugins/notion-like-tables/manifest.json create mode 100644 .obsidian/plugins/notion-like-tables/styles.css create mode 100644 .obsidian/plugins/obsidian-banners/main.js create mode 100644 .obsidian/plugins/obsidian-banners/manifest.json create mode 100644 .obsidian/plugins/obsidian-banners/styles.css create mode 100644 .obsidian/plugins/obsidian-excel-to-markdown-table/main.js create mode 100644 .obsidian/plugins/obsidian-excel-to-markdown-table/manifest.json create mode 100644 .obsidian/plugins/obsidian-excel-to-markdown-table/styles.css create mode 100644 .obsidian/plugins/obsidian-linter/data.json create mode 100644 .obsidian/plugins/obsidian-projects/data.json create mode 100644 .obsidian/plugins/obsidian-projects/main.js create mode 100644 .obsidian/plugins/obsidian-projects/manifest.json create mode 100644 .obsidian/plugins/obsidian-projects/styles.css create mode 100644 .obsidian/plugins/various-complements/main.js create mode 100644 .obsidian/plugins/various-complements/manifest.json create mode 100644 .obsidian/plugins/various-complements/styles.css diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 02d27b3..3731717 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -8,5 +8,21 @@ "floating-toc", "obsidian-annotator", "obsidian-advanced-slides", - "quickadd" + "quickadd", + "obsidian-banners", + "better-word-count", + "calendar", + "notion-like-tables", + "dataview", + "dbfolder", + "obsidian-emoji-toolbar", + "obsidian-excel-to-markdown-table", + "obsidian-kanban", + "obsidian-linter", + "media-extended", + "obsidian-projects", + "obsidian-tasks-plugin", + "recent-files-obsidian", + "templater-obsidian", + "various-complements" ] \ No newline at end of file diff --git a/.obsidian/plugins/calendar/data.json b/.obsidian/plugins/calendar/data.json new file mode 100644 index 0000000..b03e21d --- /dev/null +++ b/.obsidian/plugins/calendar/data.json @@ -0,0 +1,10 @@ +{ + "shouldConfirmBeforeCreate": true, + "weekStart": "locale", + "wordsPerDot": 250, + "showWeeklyNote": false, + "weeklyNoteFormat": "", + "weeklyNoteTemplate": "", + "weeklyNoteFolder": "", + "localeOverride": "system-default" +} \ No newline at end of file diff --git a/.obsidian/plugins/cmdr/main.js b/.obsidian/plugins/cmdr/main.js new file mode 100644 index 0000000..29b4cc2 --- /dev/null +++ b/.obsidian/plugins/cmdr/main.js @@ -0,0 +1,9 @@ +/* +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 */ diff --git a/.obsidian/plugins/cmdr/manifest.json b/.obsidian/plugins/cmdr/manifest.json new file mode 100644 index 0000000..a12c255 --- /dev/null +++ b/.obsidian/plugins/cmdr/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "cmdr", + "name": "Commander", + "version": "0.5.0", + "minAppVersion": "1.1.0", + "description": "Customize your workspace by adding commands everywhere, create Macros and supercharge your mobile toolbar.", + "author": "jsmorabito & phibr0", + "authorUrl": "https://github.com/phibr0", + "fundingUrl": "https://ko-fi.com/phibr0", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/cmdr/styles.css b/.obsidian/plugins/cmdr/styles.css new file mode 100644 index 0000000..05bc322 --- /dev/null +++ b/.obsidian/plugins/cmdr/styles.css @@ -0,0 +1 @@ +.cmdr{transition:transform .4s 0s}.cmdr.status-bar-item{margin:0}.cmdr-removing{transform:translate(100%);z-index:0}.cmdr-ribbon-removing{transform:scale(0)}.cmdr-setting-title{display:flex;align-items:baseline;justify-content:space-between}.cmdr-setting-title h1{font-weight:900;margin-top:6px;margin-bottom:12px}.cmdr-option-setting-name{margin-left:.8ex}.cmdr-base-component{padding:0 20px;margin-bottom:-18px}.cmdr-menu-more-options{color:var(--text-muted);position:absolute;right:6px;padding-top:2px;transform:scale(.9);transition:all .15s ease}.cmdr-menu-more-options:hover{color:var(--text-primary)}.cmdr-mobile .cmdr-credits{place-content:center}.cmdr-fill{border:2px solid #0000;width:100%}.cmdr-icon{height:20px;align-self:center}.cmdr-setting-modal>.modal{height:60vh;width:80vw}.cmdr-editable{display:inline-block}.cmdr-editable input{padding:0;border:none;height:unset;background-color:initial!important;border-bottom:1px solid var(--interactive-accent);border-radius:0}.cmdr-setting-content{height:calc(100% - 10rem)}.cmdr-setting-content .setting-item:first{border-top:none}.cmdr-commands-empty{display:flex;place-items:center;flex-flow:column;margin:2.5rem 0 1.25rem;place-content:center}.cmdr-commands-empty svg{width:100%}.cmdr-commands-empty h3{margin:8px 0;font-weight:900}.cmdr-sep-con:not(:empty){background-color:var(--background-primary);border:1px solid var(--background-modifier-border);padding:12px;border-radius:12px}.cmdr-sep-con:not(:empty) .setting-item:first-of-type{padding-top:0}.cmdr-sep-con:not(:empty) .setting-item:last-of-type{padding-bottom:0}.cmdr-sep-con:not(:empty) .cmdr-callout-warning{padding:var(--callout-title-padding);display:flex;gap:var(--size-4-1);font-size:var(--callout-title-size);color:rgb(var(--callout-color));line-height:var(--line-height-tight);font-weight:700}.cmdr-sep-con:not(:empty) p.cmdr-warning-description{margin:8px 0}.cmdr-accordion{margin-bottom:16px}.cmdr-accordion .cmdr-accordion-chevron{margin-left:0;margin-right:4px;height:24px}.cmdr-accordion .cmdr-accordion-chevron>svg{transition:all .25s ease}.cmdr-accordion .cmdr-accordion-content{max-height:1000px;transition:all .3s ease-in-out;overflow:hidden;margin-left:14px;padding-left:14px}.cmdr-accordion .cmdr-accordion-content .setting-item{padding-top:12px}.cmdr-accordion[aria-expanded=false] .cmdr-accordion-chevron>svg{transform:rotate(-90deg)}.cmdr-accordion[aria-expanded=false] .cmdr-accordion-content{max-height:0!important;transition:max-height .3s cubic-bezier(0,1,0,1)}.cmdr-accordion .cmdr-accordion-header{display:flex;cursor:var(--cursor)}.cmdr-accordion .cmdr-accordion-header span{font-weight:600;margin-top:0;align-self:end}.cmdr-add-new-wrapper{width:100%;margin-top:12px;margin-bottom:2rem;display:flex;justify-content:center;align-items:center}.cmdr-add-new-wrapper button{margin:0 24px}.cmdr-adder{opacity:0;transition:opacity .12s ease}.cmdr-adder:hover{opacity:1}.cmdr-adder.view-action{order:-1001}.cmdr-page-header{order:-1000}.cmdr-macro-builder .modal{height:80vh;width:95vw;padding:0}.cmdr-macro-builder .modal-close-button{z-index:99}.cmdr-macro-builder .modal-content{margin-top:0}.cmdr-macro-builder .cmdr-macro-icon{display:flex;justify-content:center}.cmdr-macro-builder .cmdr-macro-control{position:absolute;z-index:5;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:3em;top:0}.cmdr-macro-builder .cmdr-macro-control .cmdr-macro-button{background-color:var(--background-secondary-alt);aspect-ratio:1;display:flex;justify-content:center;align-items:center;border-radius:2px;outline:1px solid var(--background-modifier-border);padding:2px}.cmdr-setting-header{margin-bottom:24px;overflow-y:hidden;overflow-x:auto}.cmdr-setting-header .cmdr-setting-tab-group{display:flex;align-items:flex-end;border-bottom:2px solid var(--background-modifier-border)}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group{display:flex;flex-direction:column;align-items:flex-start;border:none}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab{border-left:none!important;border-right:none!important;border-top:none!important;transform:none;transition:color .2s ease;width:100%;display:flex;font-weight:500;justify-content:space-between}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab:first-child{margin-left:0}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab.cmdr-tab-active{transform:none}.cmdr-setting-header .cmdr-tab{padding:6px 8px;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap;border-left:2px solid #0000;border-right:2px solid #0000}.cmdr-setting-header .cmdr-tab:first-child{margin-left:6px}.cmdr-setting-header .cmdr-tab.cmdr-tab-active{transform:translateY(2px);border-radius:2px;border:2px solid var(--background-modifier-border);border-bottom-color:var(--background-primary)}.is-tablet .cmdr-tab{border:none!important;margin-bottom:2px;padding:10px;font-size:1.08em}.is-tablet .cmdr-tab,.is-tablet .cmdr-tab .cmdr-block{display:flex;align-items:center}.cmdr-mobile-modify-grid{padding:22px}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option{display:flex;width:100%;justify-content:space-between;align-items:center;margin-bottom:16px}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option>input{max-width:70%}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option .dropdown{margin:auto}.cmdr-credits{display:flex}.cmdr-credits>span{color:var(--text-muted);font-size:14px}.cmdr-about{display:flex;flex-direction:column;align-items:center;padding-bottom:64px}.cmdr-about hr{width:100%;margin-top:0}.cmdr-about button{display:flex;align-items:center;height:2.6em;font-weight:700;gap:16px;border-radius:6px;margin-bottom:8px}.cmdr-about button:last-of-type{margin-bottom:32px}.cmdr-about .setting-item button{margin:0}.cmdr-about .cmdr-icon-wrapper{display:flex}.cmdr-about .cmdr-icon-wrapper>svg{width:90px;height:90px}.cmdr-about .cmdr-version{text-decoration:none;font-size:12px;color:var(--text-muted)}.cmdr-name-input-wrapper{display:flex;gap:8px;align-items:center}.cmdr-name-input-wrapper button{margin:8px}.cmdr-icon.clickable-icon.mod-warning{cursor:default}.cmdr-hider-title{display:flex;flex-direction:column;align-items:center}.cmdr-hider-title h3{margin-top:0;margin-bottom:8px;font-weight:900}.cmdr-hider-title p{margin-top:0;margin-bottom:26px;width:50%;text-align:center}.setting-item-control .cmdr-editable{width:2em;text-align:center}.setting-item-control .cmdr-editable input,.setting-item-control .cmdr-editable span{width:2em;color:var(--text-normal)}.cmdr-slider .setting-item-control>div{width:100%}.cmdr-slider input.slider{margin-left:4px}.view-action:not(:last-child){margin-right:var(--cmdr-spacing)}.status-bar-item:not(:last-child),.titlebar-button:not(:last-child){margin-right:calc(var(--cmdr-spacing) - 8px)}.side-dock-ribbon-action:not(:last-child){margin-bottom:calc(var(--cmdr-spacing) - 8px)}.cmdr-cta{position:relative}.cmdr-cta:after{content:"";position:absolute;top:-10%;width:104%;left:-2%;height:120%;outline:2px solid var(--color-accent);border-radius:1em;pointer-events:none}.cmdr-mm-item{display:flex;flex-direction:row!important;align-items:center!important;justify-content:space-between;padding:24px 0}.cmdr-mm-item>:first-child{flex-grow:1}.cmdr-mm-item>:last-child{display:flex}.cmdr-mm-item>*{display:flex;flex-direction:column}.cmdr-mm-item>*>span{margin-right:4px;margin-bottom:2px;font-size:12px;color:var(--text-muted);font-weight:700;margin-left:2px}.cmdr-mm-item .cmdr-slider{padding-bottom:0}.cmdr-mm-item .cmdr-slider .cmdr-editable{width:auto;font-size:smaller}.cmdr-mm-item .cmdr-slider .cmdr-editable span{color:var(--text-muted)}.cmdr-mm-actions{width:100%;display:flex;flex-direction:row!important;justify-content:end;gap:8px}.cmdr-mm-actions button{all:unset;cursor:pointer;color:var(--text-accent);padding:6px;border-radius:4px;transition:all .15s ease;text-transform:uppercase;font-weight:700;font-size:small}.cmdr-mm-actions button:hover{color:var(--text-accent-hover);background-color:var(--background-secondary)}.cmdr-mm-actions button:before{content:"+ "}.cmdr-mm-actions button:active{transform:scale(.98)}.cmdr-mm-control{margin-top:24px;width:100%;display:flex;justify-content:center;gap:8px}.cmdr-mm-action-text{opacity:0}.cmdr-mm-action-options{display:flex}.body{--at-button-height:48;--at-row-count:0}.AT-multirow.AT-row .mobile-toolbar-options-container{flex-flow:column wrap}.is-mobile .mobile-toolbar{position:sticky!important;z-index:5;margin-bottom:var(--at-offset)}.AT-always-shown .is-pinned .workspace-drawer-inner{margin-bottom:calc(var(--at-button-height)*var(--at-row-count) + var(--at-spacing))}.AT-multirow.AT-column .mobile-toolbar-options-container{flex-flow:row wrap;overflow-y:auto}.mobile-toolbar-option{height:var(--at-button-height);min-width:var(--at-button-width)}.AT-multirow .mobile-toolbar,.AT-multirow .mobile-toolbar-options-container{height:calc(var(--at-button-height)*var(--at-row-count) + var(--at-spacing))!important}.AT-no-toolbar .mobile-toolbar{display:none}.cmdr-mb-1{margin-bottom:.25rem}.cmdr-block{display:block}.cmdr-flex{display:flex}.cmdr-items-center{align-items:center}.cmdr-justify-between{justify-content:space-between}.cmdr-gap-1{gap:.25rem}.cmdr-justify-self-start{justify-self:start} \ No newline at end of file diff --git a/.obsidian/plugins/media-extended/main.js b/.obsidian/plugins/media-extended/main.js new file mode 100644 index 0000000..fd39c94 --- /dev/null +++ b/.obsidian/plugins/media-extended/main.js @@ -0,0 +1,43 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source visit the plugins github repository +*/ + +var As=Object.create;var Dr=Object.defineProperty,Ms=Object.defineProperties,Rs=Object.getOwnPropertyDescriptor,Cs=Object.getOwnPropertyDescriptors,bs=Object.getOwnPropertyNames,Kn=Object.getOwnPropertySymbols,Is=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable;var Wn=(e,g,r)=>g in e?Dr(e,g,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[g]=r,rr=(e,g)=>{for(var r in g||(g={}))Yn.call(g,r)&&Wn(e,r,g[r]);if(Kn)for(var r of Kn(g))ws.call(g,r)&&Wn(e,r,g[r]);return e},Nr=(e,g)=>Ms(e,Cs(g)),zn=e=>Dr(e,"__esModule",{value:!0});var _o=typeof require!="undefined"?require:e=>{throw new Error('Dynamic require of "'+e+'" is not supported')};var sr=(e,g)=>()=>(g||e((g={exports:{}}).exports,g),g.exports),Ds=(e,g)=>{zn(e);for(var r in g)Dr(e,r,{get:g[r],enumerable:!0})},Ns=(e,g,r)=>{if(g&&typeof g=="object"||typeof g=="function")for(let t of bs(g))!Yn.call(e,t)&&t!=="default"&&Dr(e,t,{get:()=>g[t],enumerable:!(r=Rs(g,t))||r.enumerable});return e},Jt=e=>Ns(zn(Dr(e!=null?As(Is(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var Bt=(e,g,r)=>new Promise((t,p)=>{var i=f=>{try{n(r.next(f))}catch(h){p(h)}},o=f=>{try{n(r.throw(f))}catch(h){p(h)}},n=f=>f.done?t(f.value):Promise.resolve(f.value).then(i,o);n((r=r.apply(e,g)).next())});var Pr=sr(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});function qn(e,g){if(g)return e;throw new Error("Unhandled discriminated union member: "+JSON.stringify(e))}Gr.assertNever=qn;Gr.default=qn});var Kr=sr((Vr,Xn)=>{(function(e,g){typeof Vr=="object"&&typeof Xn!="undefined"?g(Vr):typeof define=="function"&&define.amd?define(["exports"],g):(e=typeof globalThis!="undefined"?globalThis:e||self,g(e["@tinyfe/parseUnit"]={}))})(Vr,function(e){"use strict";let g="(v[h|w|min|max]|p[c|t|x]|[re|e|c|m]m|[l|c]h|%|in|Q|ex)",r=new RegExp(g),t=["auto","revert","unset","inherit","initial","max-content","min-content","fit-content","-webkit-fill-available"];function p(o){return r.test(i(o)[1])}function i(o,n={}){let{onlyValue:f=!1,onlyUnit:h=!1}=n;if(typeof o=="number")return f?o:h?"":[o,""];let m=[0,""];if(t.includes(o))return[o,""];o=String(o);let u=parseFloat(o),_=o.match(/[\d.\-\+]*\s*(.*)/)[1];return m=[u,_],f?u:h?_:m}e.cssUnit=g,e.cssUnitRegex=r,e.default=i,e.isCssValue=p,Object.defineProperty(e,"__esModule",{value:!0})})});var na=sr((ko,ra)=>{"use strict";ra.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,g=>`%${g.charCodeAt(0).toString(16).toUpperCase()}`)});var la=sr((Bo,oa)=>{"use strict";var aa="%[a-f0-9]{2}",ia=new RegExp(aa,"gi"),sa=new RegExp("("+aa+")+","gi");function cn(e,g){try{return decodeURIComponent(e.join(""))}catch(p){}if(e.length===1)return e;g=g||1;var r=e.slice(0,g),t=e.slice(g);return Array.prototype.concat.call([],cn(r),cn(t))}function Ps(e){try{return decodeURIComponent(e)}catch(t){for(var g=e.match(ia),r=1;r{"use strict";ua.exports=(e,g)=>{if(!(typeof e=="string"&&typeof g=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(g==="")return[e];let r=e.indexOf(g);return r===-1?[e]:[e.slice(0,r),e.slice(r+g.length)]}});var ca=sr((Ho,da)=>{"use strict";da.exports=function(e,g){for(var r={},t=Object.keys(e),p=Array.isArray(g),i=0;i{"use strict";var Ls=na(),Fs=la(),ha=fa(),xs=ca(),ks=e=>e==null,hn=Symbol("encodeFragmentIdentifier");function Bs(e){switch(e.arrayFormat){case"index":return g=>(r,t)=>{let p=r.length;return t===void 0||e.skipNull&&t===null||e.skipEmptyString&&t===""?r:t===null?[...r,[tr(g,e),"[",p,"]"].join("")]:[...r,[tr(g,e),"[",tr(p,e),"]=",tr(t,e)].join("")]};case"bracket":return g=>(r,t)=>t===void 0||e.skipNull&&t===null||e.skipEmptyString&&t===""?r:t===null?[...r,[tr(g,e),"[]"].join("")]:[...r,[tr(g,e),"[]=",tr(t,e)].join("")];case"comma":case"separator":case"bracket-separator":{let g=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(t,p)=>p===void 0||e.skipNull&&p===null||e.skipEmptyString&&p===""?t:(p=p===null?"":p,t.length===0?[[tr(r,e),g,tr(p,e)].join("")]:[[t,tr(p,e)].join(e.arrayFormatSeparator)])}default:return g=>(r,t)=>t===void 0||e.skipNull&&t===null||e.skipEmptyString&&t===""?r:t===null?[...r,tr(g,e)]:[...r,[tr(g,e),"=",tr(t,e)].join("")]}}function Us(e){let g;switch(e.arrayFormat){case"index":return(r,t,p)=>{if(g=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!g){p[r]=t;return}p[r]===void 0&&(p[r]={}),p[r][g[1]]=t};case"bracket":return(r,t,p)=>{if(g=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),!g){p[r]=t;return}if(p[r]===void 0){p[r]=[t];return}p[r]=[].concat(p[r],t)};case"comma":case"separator":return(r,t,p)=>{let i=typeof t=="string"&&t.includes(e.arrayFormatSeparator),o=typeof t=="string"&&!i&&Er(t,e).includes(e.arrayFormatSeparator);t=o?Er(t,e):t;let n=i||o?t.split(e.arrayFormatSeparator).map(f=>Er(f,e)):t===null?t:Er(t,e);p[r]=n};case"bracket-separator":return(r,t,p)=>{let i=/(\[\])$/.test(r);if(r=r.replace(/\[\]$/,""),!i){p[r]=t&&Er(t,e);return}let o=t===null?[]:t.split(e.arrayFormatSeparator).map(n=>Er(n,e));if(p[r]===void 0){p[r]=o;return}p[r]=[].concat(p[r],o)};default:return(r,t,p)=>{if(p[r]===void 0){p[r]=t;return}p[r]=[].concat(p[r],t)}}}function ga(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function tr(e,g){return g.encode?g.strict?Ls(e):encodeURIComponent(e):e}function Er(e,g){return g.decode?Fs(e):e}function ma(e){return Array.isArray(e)?e.sort():typeof e=="object"?ma(Object.keys(e)).sort((g,r)=>Number(g)-Number(r)).map(g=>e[g]):e}function pa(e){let g=e.indexOf("#");return g!==-1&&(e=e.slice(0,g)),e}function Hs(e){let g="",r=e.indexOf("#");return r!==-1&&(g=e.slice(r)),g}function va(e){e=pa(e);let g=e.indexOf("?");return g===-1?"":e.slice(g+1)}function ya(e,g){return g.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):g.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function Ea(e,g){g=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},g),ga(g.arrayFormatSeparator);let r=Us(g),t=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return t;for(let p of e.split("&")){if(p==="")continue;let[i,o]=ha(g.decode?p.replace(/\+/g," "):p,"=");o=o===void 0?null:["comma","separator","bracket-separator"].includes(g.arrayFormat)?o:Er(o,g),r(Er(i,g),o,t)}for(let p of Object.keys(t)){let i=t[p];if(typeof i=="object"&&i!==null)for(let o of Object.keys(i))i[o]=ya(i[o],g);else t[p]=ya(i,g)}return g.sort===!1?t:(g.sort===!0?Object.keys(t).sort():Object.keys(t).sort(g.sort)).reduce((p,i)=>{let o=t[i];return Boolean(o)&&typeof o=="object"&&!Array.isArray(o)?p[i]=ma(o):p[i]=o,p},Object.create(null))}or.extract=va;or.parse=Ea;or.stringify=(e,g)=>{if(!e)return"";g=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},g),ga(g.arrayFormatSeparator);let r=o=>g.skipNull&&ks(e[o])||g.skipEmptyString&&e[o]==="",t=Bs(g),p={};for(let o of Object.keys(e))r(o)||(p[o]=e[o]);let i=Object.keys(p);return g.sort!==!1&&i.sort(g.sort),i.map(o=>{let n=e[o];return n===void 0?"":n===null?tr(o,g):Array.isArray(n)?n.length===0&&g.arrayFormat==="bracket-separator"?tr(o,g)+"[]":n.reduce(t(o),[]).join("&"):tr(o,g)+"="+tr(n,g)}).filter(o=>o.length>0).join("&")};or.parseUrl=(e,g)=>{g=Object.assign({decode:!0},g);let[r,t]=ha(e,"#");return Object.assign({url:r.split("?")[0]||"",query:Ea(va(e),g)},g&&g.parseFragmentIdentifier&&t?{fragmentIdentifier:Er(t,g)}:{})};or.stringifyUrl=(e,g)=>{g=Object.assign({encode:!0,strict:!0,[hn]:!0},g);let r=pa(e.url).split("?")[0]||"",t=or.extract(e.url),p=or.parse(t,{sort:!1}),i=Object.assign(p,e.query),o=or.stringify(i,g);o&&(o=`?${o}`);let n=Hs(e.url);return e.fragmentIdentifier&&(n=`#${g[hn]?tr(e.fragmentIdentifier,g):e.fragmentIdentifier}`),`${r}${o}${n}`};or.pick=(e,g,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[hn]:!1},r);let{url:t,query:p,fragmentIdentifier:i}=or.parseUrl(e,r);return or.stringifyUrl({url:t,query:xs(p,g),fragmentIdentifier:i},r)};or.exclude=(e,g,r)=>{let t=Array.isArray(g)?p=>!g.includes(p):(p,i)=>!g(p,i);return or.pick(e,t,r)}});var Ta=sr((Vo,_a)=>{"use strict";_a.exports=function(g,r){if(r=r.split(":")[0],g=+g,!g)return!1;switch(r){case"http":case"ws":return g!==80;case"https":case"wss":return g!==443;case"ftp":return g!==21;case"gopher":return g!==70;case"file":return!1}return g!==0}});var Ma=sr(gn=>{"use strict";var Gs=Object.prototype.hasOwnProperty,Vs;function Sa(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(g){return null}}function Aa(e){try{return encodeURIComponent(e)}catch(g){return null}}function Ks(e){for(var g=/([^=?#&]+)=?([^&]*)/g,r={},t;t=g.exec(e);){var p=Sa(t[1]),i=Sa(t[2]);p===null||i===null||p in r||(r[p]=i)}return r}function Ys(e,g){g=g||"";var r=[],t,p;typeof g!="string"&&(g="?");for(p in e)if(Gs.call(e,p)){if(t=e[p],!t&&(t===null||t===Vs||isNaN(t))&&(t=""),p=Aa(p),t=Aa(t),p===null||t===null)continue;r.push(p+"="+t)}return r.length?g+r.join("&"):""}gn.stringify=Ys;gn.parse=Ks});var Da=sr((Yo,wa)=>{"use strict";var Ra=Ta(),qr=Ma(),Ws=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,zs=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,qs=/^[a-zA-Z]:/,Xs="[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]",js=new RegExp("^"+Xs+"+");function mn(e){return(e||"").toString().replace(js,"")}var pn=[["#","hash"],["?","query"],function(g,r){return _r(r.protocol)?g.replace(/\\/g,"/"):g},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Ca={hash:1,query:1};function ba(e){var g;typeof window!="undefined"?g=window:typeof global!="undefined"?g=global:typeof self!="undefined"?g=self:g={};var r=g.location||{};e=e||r;var t={},p=typeof e,i;if(e.protocol==="blob:")t=new mr(unescape(e.pathname),{});else if(p==="string"){t=new mr(e,{});for(i in Ca)delete t[i]}else if(p==="object"){for(i in e)i in Ca||(t[i]=e[i]);t.slashes===void 0&&(t.slashes=Ws.test(e.href))}return t}function _r(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function Ia(e,g){e=mn(e),g=g||{};var r=zs.exec(e),t=r[1]?r[1].toLowerCase():"",p=!!r[2],i=!!r[3],o=0,n;return p?i?(n=r[2]+r[3]+r[4],o=r[2].length+r[3].length):(n=r[2]+r[4],o=r[2].length):i?(n=r[3]+r[4],o=r[3].length):n=r[4],t==="file:"?o>=2&&(n=n.slice(2)):_r(t)?n=r[4]:t?p&&(n=n.slice(2)):o>=2&&_r(g.protocol)&&(n=r[4]),{protocol:t,slashes:p||_r(t),slashesCount:o,rest:n}}function Qs(e,g){if(e==="")return g;for(var r=(g||"/").split("/").slice(0,-1).concat(e.split("/")),t=r.length,p=r[t-1],i=!1,o=0;t--;)r[t]==="."?r.splice(t,1):r[t]===".."?(r.splice(t,1),o++):o&&(t===0&&(i=!0),r.splice(t,1),o--);return i&&r.unshift(""),(p==="."||p==="..")&&r.push(""),r.join("/")}function mr(e,g,r){if(e=mn(e),!(this instanceof mr))return new mr(e,g,r);var t,p,i,o,n,f,h=pn.slice(),m=typeof g,u=this,_=0;for(m!=="object"&&m!=="string"&&(r=g,g=null),r&&typeof r!="function"&&(r=qr.parse),g=ba(g),p=Ia(e||"",g),t=!p.protocol&&!p.slashes,u.slashes=p.slashes||t&&g.slashes,u.protocol=p.protocol||g.protocol||"",e=p.rest,(p.protocol==="file:"&&(p.slashesCount!==2||qs.test(e))||!p.slashes&&(p.protocol||p.slashesCount<2||!_r(u.protocol)))&&(h[3]=[/(.*)/,"pathname"]);_{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var eo=function(){function e(g,r){for(var t=0;t").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").concat(`\r +\r +`)}},{key:"toTypedArray",value:function(r){var t=[];return r.split("").forEach(function(p){t.push(parseInt(p.charCodeAt(),16))}),Uint8Array.from(t)}}]),e}();window.WebVTTConverter=Na;vn.default=Na});var Ua=sr((An,Mn)=>{typeof navigator=="object"&&function(e,g){typeof An=="object"&&typeof Mn!="undefined"?Mn.exports=g():typeof define=="function"&&define.amd?define("Plyr",g):(e=typeof globalThis!="undefined"?globalThis:e||self).Plyr=g()}(An,function(){"use strict";function e(S,z,F){return z in S?Object.defineProperty(S,z,{value:F,enumerable:!0,configurable:!0,writable:!0}):S[z]=F,S}function g(S,z){for(var F=0;Fz){var F=function(q){var fe="".concat(q).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return fe?Math.max(0,(fe[1]?fe[1].length:0)-(fe[2]?+fe[2]:0)):0}(z);return parseFloat(S.toFixed(F))}return Math.round(S/z)*z}var M=function(){function S(z,F){(function(q,fe){if(!(q instanceof fe))throw new TypeError("Cannot call a class as a function")})(this,S),w(z)?this.element=z:k(z)&&(this.element=document.querySelector(z)),w(this.element)&&N(this.element.rangeTouch)&&(this.config=p({},i,{},F),this.init())}return function(z,F,q){F&&g(z.prototype,F),q&&g(z,q)}(S,[{key:"init",value:function(){S.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){S.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(z){var F=this,q=z?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(fe){F.element[q](fe,function(ge){return F.set(ge)},!1)})}},{key:"get",value:function(z){if(!S.enabled||!H(z))return null;var F,q=z.target,fe=z.changedTouches[0],ge=parseFloat(q.getAttribute("min"))||0,Me=parseFloat(q.getAttribute("max"))||100,ke=parseFloat(q.getAttribute("step"))||1,$e=q.getBoundingClientRect(),gt=100/$e.width*(this.config.thumbWidth/2)/100;return 0>(F=100/$e.width*(fe.clientX-$e.left))?F=0:100F?F-=(100-2*F)*gt:50S!=null?S.constructor:null,D=(S,z)=>Boolean(S&&z&&S instanceof z),v=S=>S==null,T=S=>I(S)===Object,W=S=>I(S)===String,O=S=>I(S)===Function,B=S=>Array.isArray(S),L=S=>D(S,NodeList),K=S=>v(S)||(W(S)||B(S)||L(S))&&!S.length||T(S)&&!Object.keys(S).length;var x=v,U=T,Y=S=>I(S)===Number&&!Number.isNaN(S),oe=W,ue=S=>I(S)===Boolean,re=O,ve=B,ce=L,se=S=>S!==null&&typeof S=="object"&&S.nodeType===1&&typeof S.style=="object"&&typeof S.ownerDocument=="object",J=S=>D(S,Event),ee=S=>D(S,KeyboardEvent),ie=S=>D(S,TextTrack)||!v(S)&&W(S.kind),me=S=>D(S,Promise)&&O(S.then),de=S=>{if(D(S,window.URL))return!0;if(!W(S))return!1;let z=S;S.startsWith("http://")&&S.startsWith("https://")||(z=`http://${S}`);try{return!K(new URL(z).hostname)}catch(F){return!1}},Q=K;let X=(()=>{let S=document.createElement("span"),z={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},F=Object.keys(z).find(q=>S.style[q]!==void 0);return!!oe(F)&&z[F]})();function j(S,z){setTimeout(()=>{try{S.hidden=!0,S.offsetHeight,S.hidden=!1}catch(F){}},z)}let le={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function G(S,z){return z.split(".").reduce((F,q)=>F&&F[q],S)}function c(S={},...z){if(!z.length)return S;let F=z.shift();return U(F)?(Object.keys(F).forEach(q=>{U(F[q])?(Object.keys(S).includes(q)||Object.assign(S,{[q]:{}}),c(S[q],F[q])):Object.assign(S,{[q]:F[q]})}),c(S,...z)):S}function E(S,z){let F=S.length?S:[S];Array.from(F).reverse().forEach((q,fe)=>{let ge=fe>0?z.cloneNode(!0):z,Me=q.parentNode,ke=q.nextSibling;ge.appendChild(q),ke?Me.insertBefore(ge,ke):Me.appendChild(ge)})}function b(S,z){se(S)&&!Q(z)&&Object.entries(z).filter(([,F])=>!x(F)).forEach(([F,q])=>S.setAttribute(F,q))}function l(S,z,F){let q=document.createElement(S);return U(z)&&b(q,z),oe(F)&&(q.innerText=F),q}function d(S,z,F,q){se(z)&&z.appendChild(l(S,F,q))}function y(S){ce(S)||ve(S)?Array.from(S).forEach(y):se(S)&&se(S.parentNode)&&S.parentNode.removeChild(S)}function V(S){if(!se(S))return;let{length:z}=S.childNodes;for(;z>0;)S.removeChild(S.lastChild),z-=1}function te(S,z){return se(z)&&se(z.parentNode)&&se(S)?(z.parentNode.replaceChild(S,z),S):null}function $(S,z){if(!oe(S)||Q(S))return{};let F={},q=c({},z);return S.split(",").forEach(fe=>{let ge=fe.trim(),Me=ge.replace(".",""),ke=ge.replace(/[[\]]/g,"").split("="),[$e]=ke,gt=ke.length>1?ke[1].replace(/["']/g,""):"";switch(ge.charAt(0)){case".":oe(q.class)?F.class=`${q.class} ${Me}`:F.class=Me;break;case"#":F.id=ge.replace("#","");break;case"[":F[$e]=gt}}),c(q,F)}function ae(S,z){if(!se(S))return;let F=z;ue(F)||(F=!S.hidden),S.hidden=F}function ne(S,z,F){if(ce(S))return Array.from(S).map(q=>ne(q,z,F));if(se(S)){let q="toggle";return F!==void 0&&(q=F?"add":"remove"),S.classList[q](z),S.classList.contains(z)}return!1}function Se(S,z){return se(S)&&S.classList.contains(z)}function Ie(S,z){let{prototype:F}=Element;return(F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.msMatchesSelector||function(){return Array.from(document.querySelectorAll(z)).includes(this)}).call(S,z)}function he(S){return this.elements.container.querySelectorAll(S)}function ye(S){return this.elements.container.querySelector(S)}function _e(S=null,z=!1){se(S)&&(S.focus({preventScroll:!0}),z&&ne(S,this.config.classNames.tabFocus))}let pe={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},De={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(S,z,F){let q=le.isIPhone&&F&&De.playsinline,fe=De[S]||z!=="html5";return{api:fe,ui:fe&&De.rangeInput&&(S!=="video"||!le.isIPhone||q)}},pip:!(le.isIPhone||!re(l("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||l("video").disablePictureInPicture)),airplay:re(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(S){if(Q(S))return!1;let[z]=S.split("/"),F=S;if(!this.isHTML5||z!==this.type)return!1;Object.keys(pe).includes(F)&&(F+=`; codecs="${pe[S]}"`);try{return Boolean(F&&this.media.canPlayType(F).replace(/no/,""))}catch(q){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{let S=document.createElement("input");return S.type="range",S.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:X!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},je=(()=>{let S=!1;try{let z=Object.defineProperty({},"passive",{get:()=>(S=!0,null)});window.addEventListener("test",null,z),window.removeEventListener("test",null,z)}catch(z){}return S})();function Fe(S,z,F,q=!1,fe=!0,ge=!1){if(!S||!("addEventListener"in S)||Q(z)||!re(F))return;let Me=z.split(" "),ke=ge;je&&(ke={passive:fe,capture:ge}),Me.forEach($e=>{this&&this.eventListeners&&q&&this.eventListeners.push({element:S,type:$e,callback:F,options:ke}),S[q?"addEventListener":"removeEventListener"]($e,F,ke)})}function Le(S,z="",F,q=!0,fe=!1){Fe.call(this,S,z,F,!0,q,fe)}function Ve(S,z="",F,q=!0,fe=!1){Fe.call(this,S,z,F,!1,q,fe)}function Ge(S,z="",F,q=!0,fe=!1){let ge=(...Me)=>{Ve(S,z,ge,q,fe),F.apply(this,Me)};Fe.call(this,S,z,ge,!0,q,fe)}function we(S,z="",F=!1,q={}){if(!se(S)||Q(z))return;let fe=new CustomEvent(z,{bubbles:F,detail:{...q,plyr:this}});S.dispatchEvent(fe)}function at(){this&&this.eventListeners&&(this.eventListeners.forEach(S=>{let{element:z,type:F,callback:q,options:fe}=S;z.removeEventListener(F,q,fe)}),this.eventListeners=[])}function Re(){return new Promise(S=>this.ready?setTimeout(S,0):Le.call(this,this.elements.container,"ready",S)).then(()=>{})}function Xe(S){me(S)&&S.then(null,()=>{})}function lt(S){return ve(S)?S.filter((z,F)=>S.indexOf(z)===F):S}function ct(S,z){return ve(S)&&S.length?S.reduce((F,q)=>Math.abs(q-z)({...S,[z/F]:[z,F]}),{});function Ct(S){return ve(S)||oe(S)&&S.includes(":")?(ve(S)?S:S.split(":")).map(Number).every(Y):!1}function wt(S){if(!ve(S)||!S.every(Y))return null;let[z,F]=S,q=(ge,Me)=>Me===0?ge:q(Me,ge%Me),fe=q(z,F);return[z/fe,F/fe]}function We(S){let z=q=>Ct(q)?q.split(":").map(Number):null,F=z(S);if(F===null&&(F=z(this.config.ratio)),F===null&&!Q(this.embed)&&ve(this.embed.ratio)&&({ratio:F}=this.embed),F===null&&this.isHTML5){let{videoWidth:q,videoHeight:fe}=this.media;F=[q,fe]}return wt(F)}function He(S){if(!this.isVideo)return{};let{wrapper:z}=this.elements,F=We.call(this,S);if(!ve(F))return{};let[q,fe]=wt(F),ge=100/q*fe;if(tt(`aspect-ratio: ${q}/${fe}`)?z.style.aspectRatio=`${q}/${fe}`:z.style.paddingBottom=`${ge}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){let Me=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),ke=(Me-ge)/(Me/50);this.fullscreen.active?z.style.paddingBottom=null:this.media.style.transform=`translateY(-${ke}%)`}else this.isHTML5&&z.classList.add(this.config.classNames.videoFixedRatio);return{padding:ge,ratio:F}}function ze(S,z,F=.05){let q=S/z,fe=ct(Object.keys(St),q);return Math.abs(fe-q)<=F?St[fe]:[S,z]}let mt={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(S=>{let z=S.getAttribute("type");return!!Q(z)||De.mime.call(this,z)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:mt.getSources.call(this).map(S=>Number(S.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;let S=this;S.options.speed=S.config.speed.options,Q(this.config.ratio)||He.call(S),Object.defineProperty(S.media,"quality",{get(){let z=mt.getSources.call(S).find(F=>F.getAttribute("src")===S.source);return z&&Number(z.getAttribute("size"))},set(z){if(S.quality!==z){if(S.config.quality.forced&&re(S.config.quality.onChange))S.config.quality.onChange(z);else{let F=mt.getSources.call(S).find($e=>Number($e.getAttribute("size"))===z);if(!F)return;let{currentTime:q,paused:fe,preload:ge,readyState:Me,playbackRate:ke}=S.media;S.media.src=F.getAttribute("src"),(ge!=="none"||Me)&&(S.once("loadedmetadata",()=>{S.speed=ke,S.currentTime=q,fe||Xe(S.play())}),S.media.load())}we.call(S,S.media,"qualitychange",!1,{quality:z})}}})},cancelRequests(){this.isHTML5&&(y(mt.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function vt(S,...z){return Q(S)?S:S.toString().replace(/{(\d+)}/g,(F,q)=>z[q].toString())}let pt=(S="",z="",F="")=>S.replace(new RegExp(z.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),F.toString()),Rt=(S="")=>S.toString().replace(/\w\S*/g,z=>z.charAt(0).toUpperCase()+z.substr(1).toLowerCase());function Ce(S=""){let z=S.toString();return z=function(F=""){let q=F.toString();return q=pt(q,"-"," "),q=pt(q,"_"," "),q=Rt(q),pt(q," ","")}(z),z.charAt(0).toLowerCase()+z.slice(1)}function Pe(S){let z=document.createElement("div");return z.appendChild(S),z.innerHTML}let Ye={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Ze={get(S="",z={}){if(Q(S)||Q(z))return"";let F=G(z.i18n,S);if(Q(F))return Object.keys(Ye).includes(S)?Ye[S]:"";let q={"{seektime}":z.seekTime,"{title}":z.title};return Object.entries(q).forEach(([fe,ge])=>{F=pt(F,fe,ge)}),F}};class ut{constructor(z){e(this,"get",F=>{if(!ut.supported||!this.enabled)return null;let q=window.localStorage.getItem(this.key);if(Q(q))return null;let fe=JSON.parse(q);return oe(F)&&F.length?fe[F]:fe}),e(this,"set",F=>{if(!ut.supported||!this.enabled||!U(F))return;let q=this.get();Q(q)&&(q={}),c(q,F),window.localStorage.setItem(this.key,JSON.stringify(q))}),this.enabled=z.config.storage.enabled,this.key=z.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;let z="___test";return window.localStorage.setItem(z,z),window.localStorage.removeItem(z),!0}catch(z){return!1}}}function Ue(S,z="text"){return new Promise((F,q)=>{try{let fe=new XMLHttpRequest;if(!("withCredentials"in fe))return;fe.addEventListener("load",()=>{if(z==="text")try{F(JSON.parse(fe.responseText))}catch(ge){F(fe.responseText)}else F(fe.response)}),fe.addEventListener("error",()=>{throw new Error(fe.status)}),fe.open("GET",S,!0),fe.responseType=z,fe.send()}catch(fe){q(fe)}})}function Je(S,z){if(!oe(S))return;let F=oe(z),q=!1,fe=()=>document.getElementById(z)!==null,ge=(Me,ke)=>{Me.innerHTML=ke,F&&fe()||document.body.insertAdjacentElement("afterbegin",Me)};if(!F||!fe()){let Me=ut.supported,ke=document.createElement("div");if(ke.setAttribute("hidden",""),F&&ke.setAttribute("id",z),Me){let $e=window.localStorage.getItem(`cache-${z}`);if(q=$e!==null,q){let gt=JSON.parse($e);ge(ke,gt.content)}}Ue(S).then($e=>{Q($e)||(Me&&window.localStorage.setItem(`cache-${z}`,JSON.stringify({content:$e})),ge(ke,$e))}).catch(()=>{})}}let ht=S=>Math.trunc(S/60/60%60,10);function Et(S=0,z=!1,F=!1){if(!Y(S))return Et(void 0,z,F);let q=$e=>`0${$e}`.slice(-2),fe=ht(S),ge=(Me=S,Math.trunc(Me/60%60,10));var Me;let ke=($e=>Math.trunc($e%60,10))(S);return fe=z||fe>0?`${fe}:`:"",`${F&&S>0?"-":""}${fe}${q(ge)}:${q(ke)}`}let rt={getIconUrl(){let S=new URL(this.config.iconUrl,window.location).host!==window.location.host||le.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:S}},findElements(){try{return this.elements.controls=ye.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:he.call(this,this.config.selectors.buttons.play),pause:ye.call(this,this.config.selectors.buttons.pause),restart:ye.call(this,this.config.selectors.buttons.restart),rewind:ye.call(this,this.config.selectors.buttons.rewind),fastForward:ye.call(this,this.config.selectors.buttons.fastForward),mute:ye.call(this,this.config.selectors.buttons.mute),pip:ye.call(this,this.config.selectors.buttons.pip),airplay:ye.call(this,this.config.selectors.buttons.airplay),settings:ye.call(this,this.config.selectors.buttons.settings),captions:ye.call(this,this.config.selectors.buttons.captions),fullscreen:ye.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=ye.call(this,this.config.selectors.progress),this.elements.inputs={seek:ye.call(this,this.config.selectors.inputs.seek),volume:ye.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:ye.call(this,this.config.selectors.display.buffer),currentTime:ye.call(this,this.config.selectors.display.currentTime),duration:ye.call(this,this.config.selectors.display.duration)},se(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(S){return this.debug.warn("It looks like there is a problem with your custom controls HTML",S),this.toggleNativeControls(!0),!1}},createIcon(S,z){let F="http://www.w3.org/2000/svg",q=rt.getIconUrl.call(this),fe=`${q.cors?"":q.url}#${this.config.iconPrefix}`,ge=document.createElementNS(F,"svg");b(ge,c(z,{"aria-hidden":"true",focusable:"false"}));let Me=document.createElementNS(F,"use"),ke=`${fe}-${S}`;return"href"in Me&&Me.setAttributeNS("http://www.w3.org/1999/xlink","href",ke),Me.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",ke),ge.appendChild(Me),ge},createLabel(S,z={}){let F=Ze.get(S,this.config);return l("span",{...z,class:[z.class,this.config.classNames.hidden].filter(Boolean).join(" ")},F)},createBadge(S){if(Q(S))return null;let z=l("span",{class:this.config.classNames.menu.value});return z.appendChild(l("span",{class:this.config.classNames.menu.badge},S)),z},createButton(S,z){let F=c({},z),q=Ce(S),fe={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(Me=>{Object.keys(F).includes(Me)&&(fe[Me]=F[Me],delete F[Me])}),fe.element!=="button"||Object.keys(F).includes("type")||(F.type="button"),Object.keys(F).includes("class")?F.class.split(" ").some(Me=>Me===this.config.classNames.control)||c(F,{class:`${F.class} ${this.config.classNames.control}`}):F.class=this.config.classNames.control,S){case"play":fe.toggle=!0,fe.label="play",fe.labelPressed="pause",fe.icon="play",fe.iconPressed="pause";break;case"mute":fe.toggle=!0,fe.label="mute",fe.labelPressed="unmute",fe.icon="volume",fe.iconPressed="muted";break;case"captions":fe.toggle=!0,fe.label="enableCaptions",fe.labelPressed="disableCaptions",fe.icon="captions-off",fe.iconPressed="captions-on";break;case"fullscreen":fe.toggle=!0,fe.label="enterFullscreen",fe.labelPressed="exitFullscreen",fe.icon="enter-fullscreen",fe.iconPressed="exit-fullscreen";break;case"play-large":F.class+=` ${this.config.classNames.control}--overlaid`,q="play",fe.label="play",fe.icon="play";break;default:Q(fe.label)&&(fe.label=q),Q(fe.icon)&&(fe.icon=S)}let ge=l(fe.element);return fe.toggle?(ge.appendChild(rt.createIcon.call(this,fe.iconPressed,{class:"icon--pressed"})),ge.appendChild(rt.createIcon.call(this,fe.icon,{class:"icon--not-pressed"})),ge.appendChild(rt.createLabel.call(this,fe.labelPressed,{class:"label--pressed"})),ge.appendChild(rt.createLabel.call(this,fe.label,{class:"label--not-pressed"}))):(ge.appendChild(rt.createIcon.call(this,fe.icon)),ge.appendChild(rt.createLabel.call(this,fe.label))),c(F,$(this.config.selectors.buttons[q],F)),b(ge,F),q==="play"?(ve(this.elements.buttons[q])||(this.elements.buttons[q]=[]),this.elements.buttons[q].push(ge)):this.elements.buttons[q]=ge,ge},createRange(S,z){let F=l("input",c($(this.config.selectors.inputs[S]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Ze.get(S,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},z));return this.elements.inputs[S]=F,rt.updateRangeFill.call(this,F),M.setup(F),F},createProgress(S,z){let F=l("progress",c($(this.config.selectors.display[S]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},z));if(S!=="volume"){F.appendChild(l("span",null,"0"));let q={played:"played",buffer:"buffered"}[S],fe=q?Ze.get(q,this.config):"";F.innerText=`% ${fe.toLowerCase()}`}return this.elements.display[S]=F,F},createTime(S,z){let F=$(this.config.selectors.display[S],z),q=l("div",c(F,{class:`${F.class?F.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Ze.get(S,this.config)}),"00:00");return this.elements.display[S]=q,q},bindMenuItemShortcuts(S,z){Le.call(this,S,"keydown keyup",F=>{if(![32,38,39,40].includes(F.which)||(F.preventDefault(),F.stopPropagation(),F.type==="keydown"))return;let q=Ie(S,'[role="menuitemradio"]');if(!q&&[32,39].includes(F.which))rt.showMenuPanel.call(this,z,!0);else{let fe;F.which!==32&&(F.which===40||q&&F.which===39?(fe=S.nextElementSibling,se(fe)||(fe=S.parentNode.firstElementChild)):(fe=S.previousElementSibling,se(fe)||(fe=S.parentNode.lastElementChild)),_e.call(this,fe,!0))}},!1),Le.call(this,S,"keyup",F=>{F.which===13&&rt.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:S,list:z,type:F,title:q,badge:fe=null,checked:ge=!1}){let Me=$(this.config.selectors.inputs[F]),ke=l("button",c(Me,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${Me.class?Me.class:""}`.trim(),"aria-checked":ge,value:S})),$e=l("span");$e.innerHTML=q,se(fe)&&$e.appendChild(fe),ke.appendChild($e),Object.defineProperty(ke,"checked",{enumerable:!0,get:()=>ke.getAttribute("aria-checked")==="true",set(gt){gt&&Array.from(ke.parentNode.children).filter(Nt=>Ie(Nt,'[role="menuitemradio"]')).forEach(Nt=>Nt.setAttribute("aria-checked","false")),ke.setAttribute("aria-checked",gt?"true":"false")}}),this.listeners.bind(ke,"click keyup",gt=>{if(!ee(gt)||gt.which===32){switch(gt.preventDefault(),gt.stopPropagation(),ke.checked=!0,F){case"language":this.currentTrack=Number(S);break;case"quality":this.quality=S;break;case"speed":this.speed=parseFloat(S)}rt.showMenuPanel.call(this,"home",ee(gt))}},F,!1),rt.bindMenuItemShortcuts.call(this,ke,F),z.appendChild(ke)},formatTime(S=0,z=!1){return Y(S)?Et(S,ht(this.duration)>0,z):S},updateTimeDisplay(S=null,z=0,F=!1){se(S)&&Y(z)&&(S.innerText=rt.formatTime(z,F))},updateVolume(){this.supported.ui&&(se(this.elements.inputs.volume)&&rt.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),se(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(S,z=0){se(S)&&(S.value=z,rt.updateRangeFill.call(this,S))},updateProgress(S){if(!this.supported.ui||!J(S))return;let z=0,F=(ge,Me)=>{let ke=Y(Me)?Me:0,$e=se(ge)?ge:this.elements.display.buffer;if(se($e)){$e.value=ke;let gt=$e.getElementsByTagName("span")[0];se(gt)&&(gt.childNodes[0].nodeValue=ke)}};if(S)switch(S.type){case"timeupdate":case"seeking":case"seeked":q=this.currentTime,fe=this.duration,z=q===0||fe===0||Number.isNaN(q)||Number.isNaN(fe)?0:(q/fe*100).toFixed(2),S.type==="timeupdate"&&rt.setRange.call(this,this.elements.inputs.seek,z);break;case"playing":case"progress":F(this.elements.display.buffer,100*this.buffered)}var q,fe},updateRangeFill(S){let z=J(S)?S.target:S;if(se(z)&&z.getAttribute("type")==="range"){if(Ie(z,this.config.selectors.inputs.seek)){z.setAttribute("aria-valuenow",this.currentTime);let F=rt.formatTime(this.currentTime),q=rt.formatTime(this.duration),fe=Ze.get("seekLabel",this.config);z.setAttribute("aria-valuetext",fe.replace("{currentTime}",F).replace("{duration}",q))}else if(Ie(z,this.config.selectors.inputs.volume)){let F=100*z.value;z.setAttribute("aria-valuenow",F),z.setAttribute("aria-valuetext",`${F.toFixed(1)}%`)}else z.setAttribute("aria-valuenow",z.value);le.isWebkit&&z.style.setProperty("--value",z.value/z.max*100+"%")}},updateSeekTooltip(S){if(!this.config.tooltips.seek||!se(this.elements.inputs.seek)||!se(this.elements.display.seekTooltip)||this.duration===0)return;let z=`${this.config.classNames.tooltip}--visible`,F=ge=>ne(this.elements.display.seekTooltip,z,ge);if(this.touch)return void F(!1);let q=0,fe=this.elements.progress.getBoundingClientRect();if(J(S))q=100/fe.width*(S.pageX-fe.left);else{if(!Se(this.elements.display.seekTooltip,z))return;q=parseFloat(this.elements.display.seekTooltip.style.left,10)}q<0?q=0:q>100&&(q=100),rt.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*q),this.elements.display.seekTooltip.style.left=`${q}%`,J(S)&&["mouseenter","mouseleave"].includes(S.type)&&F(S.type==="mouseenter")},timeUpdate(S){let z=!se(this.elements.display.duration)&&this.config.invertTime;rt.updateTimeDisplay.call(this,this.elements.display.currentTime,z?this.duration-this.currentTime:this.currentTime,z),S&&S.type==="timeupdate"&&this.media.seeking||rt.updateProgress.call(this,S)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return ae(this.elements.display.currentTime,!0),void ae(this.elements.progress,!0);se(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);let S=se(this.elements.display.duration);!S&&this.config.displayDuration&&this.paused&&rt.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),S&&rt.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),rt.updateSeekTooltip.call(this)},toggleMenuButton(S,z){ae(this.elements.settings.buttons[S],!z)},updateSetting(S,z,F){let q=this.elements.settings.panels[S],fe=null,ge=z;if(S==="captions")fe=this.currentTrack;else{if(fe=Q(F)?this[S]:F,Q(fe)&&(fe=this.config[S].default),!Q(this.options[S])&&!this.options[S].includes(fe))return void this.debug.warn(`Unsupported value of '${fe}' for ${S}`);if(!this.config[S].options.includes(fe))return void this.debug.warn(`Disabled value of '${fe}' for ${S}`)}if(se(ge)||(ge=q&&q.querySelector('[role="menu"]')),!se(ge))return;this.elements.settings.buttons[S].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=rt.getLabel.call(this,S,fe);let Me=ge&&ge.querySelector(`[value="${fe}"]`);se(Me)&&(Me.checked=!0)},getLabel(S,z){switch(S){case"speed":return z===1?Ze.get("normal",this.config):`${z}×`;case"quality":if(Y(z)){let F=Ze.get(`qualityLabel.${z}`,this.config);return F.length?F:`${z}p`}return Rt(z);case"captions":return ft.getLabel.call(this);default:return null}},setQualityMenu(S){if(!se(this.elements.settings.panels.quality))return;let z="quality",F=this.elements.settings.panels.quality.querySelector('[role="menu"]');ve(S)&&(this.options.quality=lt(S).filter(ge=>this.config.quality.options.includes(ge)));let q=!Q(this.options.quality)&&this.options.quality.length>1;if(rt.toggleMenuButton.call(this,z,q),V(F),rt.checkMenu.call(this),!q)return;let fe=ge=>{let Me=Ze.get(`qualityBadge.${ge}`,this.config);return Me.length?rt.createBadge.call(this,Me):null};this.options.quality.sort((ge,Me)=>{let ke=this.config.quality.options;return ke.indexOf(ge)>ke.indexOf(Me)?1:-1}).forEach(ge=>{rt.createMenuItem.call(this,{value:ge,list:F,type:z,title:rt.getLabel.call(this,"quality",ge),badge:fe(ge)})}),rt.updateSetting.call(this,z,F)},setCaptionsMenu(){if(!se(this.elements.settings.panels.captions))return;let S="captions",z=this.elements.settings.panels.captions.querySelector('[role="menu"]'),F=ft.getTracks.call(this),q=Boolean(F.length);if(rt.toggleMenuButton.call(this,S,q),V(z),rt.checkMenu.call(this),!q)return;let fe=F.map((ge,Me)=>({value:Me,checked:this.captions.toggled&&this.currentTrack===Me,title:ft.getLabel.call(this,ge),badge:ge.language&&rt.createBadge.call(this,ge.language.toUpperCase()),list:z,type:"language"}));fe.unshift({value:-1,checked:!this.captions.toggled,title:Ze.get("disabled",this.config),list:z,type:"language"}),fe.forEach(rt.createMenuItem.bind(this)),rt.updateSetting.call(this,S,z)},setSpeedMenu(){if(!se(this.elements.settings.panels.speed))return;let S="speed",z=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(q=>q>=this.minimumSpeed&&q<=this.maximumSpeed);let F=!Q(this.options.speed)&&this.options.speed.length>1;rt.toggleMenuButton.call(this,S,F),V(z),rt.checkMenu.call(this),F&&(this.options.speed.forEach(q=>{rt.createMenuItem.call(this,{value:q,list:z,type:S,title:rt.getLabel.call(this,"speed",q)})}),rt.updateSetting.call(this,S,z))},checkMenu(){let{buttons:S}=this.elements.settings,z=!Q(S)&&Object.values(S).some(F=>!F.hidden);ae(this.elements.settings.menu,!z)},focusFirstMenuItem(S,z=!1){if(this.elements.settings.popup.hidden)return;let F=S;se(F)||(F=Object.values(this.elements.settings.panels).find(fe=>!fe.hidden));let q=F.querySelector('[role^="menuitem"]');_e.call(this,q,z)},toggleMenu(S){let{popup:z}=this.elements.settings,F=this.elements.buttons.settings;if(!se(z)||!se(F))return;let{hidden:q}=z,fe=q;if(ue(S))fe=S;else if(ee(S)&&S.which===27)fe=!1;else if(J(S)){let ge=re(S.composedPath)?S.composedPath()[0]:S.target,Me=z.contains(ge);if(Me||!Me&&S.target!==F&&fe)return}F.setAttribute("aria-expanded",fe),ae(z,!fe),ne(this.elements.container,this.config.classNames.menu.open,fe),fe&&ee(S)?rt.focusFirstMenuItem.call(this,null,!0):fe||q||_e.call(this,F,ee(S))},getMenuSize(S){let z=S.cloneNode(!0);z.style.position="absolute",z.style.opacity=0,z.removeAttribute("hidden"),S.parentNode.appendChild(z);let F=z.scrollWidth,q=z.scrollHeight;return y(z),{width:F,height:q}},showMenuPanel(S="",z=!1){let F=this.elements.container.querySelector(`#plyr-settings-${this.id}-${S}`);if(!se(F))return;let q=F.parentNode,fe=Array.from(q.children).find(ge=>!ge.hidden);if(De.transitions&&!De.reducedMotion){q.style.width=`${fe.scrollWidth}px`,q.style.height=`${fe.scrollHeight}px`;let ge=rt.getMenuSize.call(this,F),Me=ke=>{ke.target===q&&["width","height"].includes(ke.propertyName)&&(q.style.width="",q.style.height="",Ve.call(this,q,X,Me))};Le.call(this,q,X,Me),q.style.width=`${ge.width}px`,q.style.height=`${ge.height}px`}ae(fe,!0),ae(F,!1),rt.focusFirstMenuItem.call(this,F,z)},setDownloadUrl(){let S=this.elements.buttons.download;se(S)&&S.setAttribute("href",this.download)},create(S){let{bindMenuItemShortcuts:z,createButton:F,createProgress:q,createRange:fe,createTime:ge,setQualityMenu:Me,setSpeedMenu:ke,showMenuPanel:$e}=rt;this.elements.controls=null,ve(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(F.call(this,"play-large"));let gt=l("div",$(this.config.selectors.controls.wrapper));this.elements.controls=gt;let Nt={class:"plyr__controls__item"};return lt(ve(this.config.controls)?this.config.controls:[]).forEach(Lt=>{if(Lt==="restart"&>.appendChild(F.call(this,"restart",Nt)),Lt==="rewind"&>.appendChild(F.call(this,"rewind",Nt)),Lt==="play"&>.appendChild(F.call(this,"play",Nt)),Lt==="fast-forward"&>.appendChild(F.call(this,"fast-forward",Nt)),Lt==="progress"){let At=l("div",{class:`${Nt.class} plyr__progress__container`}),Ht=l("div",$(this.config.selectors.progress));if(Ht.appendChild(fe.call(this,"seek",{id:`plyr-seek-${S.id}`})),Ht.appendChild(q.call(this,"buffer")),this.config.tooltips.seek){let xe=l("span",{class:this.config.classNames.tooltip},"00:00");Ht.appendChild(xe),this.elements.display.seekTooltip=xe}this.elements.progress=Ht,At.appendChild(this.elements.progress),gt.appendChild(At)}if(Lt==="current-time"&>.appendChild(ge.call(this,"currentTime",Nt)),Lt==="duration"&>.appendChild(ge.call(this,"duration",Nt)),Lt==="mute"||Lt==="volume"){let{volume:At}=this.elements;if(se(At)&>.contains(At)||(At=l("div",c({},Nt,{class:`${Nt.class} plyr__volume`.trim()})),this.elements.volume=At,gt.appendChild(At)),Lt==="mute"&&At.appendChild(F.call(this,"mute")),Lt==="volume"&&!le.isIos){let Ht={max:1,step:.05,value:this.config.volume};At.appendChild(fe.call(this,"volume",c(Ht,{id:`plyr-volume-${S.id}`})))}}if(Lt==="captions"&>.appendChild(F.call(this,"captions",Nt)),Lt==="settings"&&!Q(this.config.settings)){let At=l("div",c({},Nt,{class:`${Nt.class} plyr__menu`.trim(),hidden:""}));At.appendChild(F.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${S.id}`,"aria-expanded":!1}));let Ht=l("div",{class:"plyr__menu__container",id:`plyr-settings-${S.id}`,hidden:""}),xe=l("div"),et=l("div",{id:`plyr-settings-${S.id}-home`}),Mt=l("div",{role:"menu"});et.appendChild(Mt),xe.appendChild(et),this.elements.settings.panels.home=et,this.config.settings.forEach(nt=>{let It=l("button",c($(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));z.call(this,It,nt),Le.call(this,It,"click",()=>{$e.call(this,nt,!1)});let Ft=l("span",null,Ze.get(nt,this.config)),Wt=l("span",{class:this.config.classNames.menu.value});Wt.innerHTML=S[nt],Ft.appendChild(Wt),It.appendChild(Ft),Mt.appendChild(It);let zt=l("div",{id:`plyr-settings-${S.id}-${nt}`,hidden:""}),qt=l("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});qt.appendChild(l("span",{"aria-hidden":!0},Ze.get(nt,this.config))),qt.appendChild(l("span",{class:this.config.classNames.hidden},Ze.get("menuBack",this.config))),Le.call(this,zt,"keydown",er=>{er.which===37&&(er.preventDefault(),er.stopPropagation(),$e.call(this,"home",!0))},!1),Le.call(this,qt,"click",()=>{$e.call(this,"home",!1)}),zt.appendChild(qt),zt.appendChild(l("div",{role:"menu"})),xe.appendChild(zt),this.elements.settings.buttons[nt]=It,this.elements.settings.panels[nt]=zt}),Ht.appendChild(xe),At.appendChild(Ht),gt.appendChild(At),this.elements.settings.popup=Ht,this.elements.settings.menu=At}if(Lt==="pip"&&De.pip&>.appendChild(F.call(this,"pip",Nt)),Lt==="airplay"&&De.airplay&>.appendChild(F.call(this,"airplay",Nt)),Lt==="download"){let At=c({},Nt,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(At.download="");let{download:Ht}=this.config.urls;!de(Ht)&&this.isEmbed&&c(At,{icon:`logo-${this.provider}`,label:this.provider}),gt.appendChild(F.call(this,"download",At))}Lt==="fullscreen"&>.appendChild(F.call(this,"fullscreen",Nt))}),this.isHTML5&&Me.call(this,mt.getQualityOptions.call(this)),ke.call(this),gt},inject(){if(this.config.loadSprite){let fe=rt.getIconUrl.call(this);fe.cors&&Je(fe.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let S=null;this.elements.controls=null;let z={id:this.id,seektime:this.config.seekTime,title:this.config.title},F=!0;re(this.config.controls)&&(this.config.controls=this.config.controls.call(this,z)),this.config.controls||(this.config.controls=[]),se(this.config.controls)||oe(this.config.controls)?S=this.config.controls:(S=rt.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:ft.getLabel.call(this)}),F=!1);let q;if(F&&oe(this.config.controls)&&(S=(fe=>{let ge=fe;return Object.entries(z).forEach(([Me,ke])=>{ge=pt(ge,`{${Me}}`,ke)}),ge})(S)),oe(this.config.selectors.controls.container)&&(q=document.querySelector(this.config.selectors.controls.container)),se(q)||(q=this.elements.container),q[se(S)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",S),se(this.elements.controls)||rt.findElements.call(this),!Q(this.elements.buttons)){let fe=ge=>{let Me=this.config.classNames.controlPressed;Object.defineProperty(ge,"pressed",{enumerable:!0,get:()=>Se(ge,Me),set(ke=!1){ne(ge,Me,ke)}})};Object.values(this.elements.buttons).filter(Boolean).forEach(ge=>{ve(ge)||ce(ge)?Array.from(ge).filter(Boolean).forEach(fe):fe(ge)})}if(le.isEdge&&j(q),this.config.tooltips.controls){let{classNames:fe,selectors:ge}=this.config,Me=`${ge.controls.wrapper} ${ge.labels} .${fe.hidden}`,ke=he.call(this,Me);Array.from(ke).forEach($e=>{ne($e,this.config.classNames.hidden,!1),ne($e,this.config.classNames.tooltip,!0)})}}};function Dt(S,z=!0){let F=S;if(z){let q=document.createElement("a");q.href=F,F=q.href}try{return new URL(F)}catch(q){return null}}function kt(S){let z=new URLSearchParams;return U(S)&&Object.entries(S).forEach(([F,q])=>{z.set(F,q)}),z}let ft={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!De.textTracks)return void(ve(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&rt.setCaptionsMenu.call(this));var S,z;if(se(this.elements.captions)||(this.elements.captions=l("div",$(this.config.selectors.captions)),S=this.elements.captions,z=this.elements.wrapper,se(S)&&se(z)&&z.parentNode.insertBefore(S,z.nextSibling)),le.isIE&&window.URL){let ge=this.media.querySelectorAll("track");Array.from(ge).forEach(Me=>{let ke=Me.getAttribute("src"),$e=Dt(ke);$e!==null&&$e.hostname!==window.location.href.hostname&&["http:","https:"].includes($e.protocol)&&Ue(ke,"blob").then(gt=>{Me.setAttribute("src",window.URL.createObjectURL(gt))}).catch(()=>{y(Me)})})}let F=lt((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(ge=>ge.split("-")[0])),q=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();q==="auto"&&([q]=F);let fe=this.storage.get("captions");if(ue(fe)||({active:fe}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:fe,language:q,languages:F}),this.isHTML5){let ge=this.config.captions.update?"addtrack removetrack":"removetrack";Le.call(this,this.media.textTracks,ge,ft.update.bind(this))}setTimeout(ft.update.bind(this),0)},update(){let S=ft.getTracks.call(this,!0),{active:z,language:F,meta:q,currentTrackNode:fe}=this.captions,ge=Boolean(S.find(Me=>Me.language===F));this.isHTML5&&this.isVideo&&S.filter(Me=>!q.get(Me)).forEach(Me=>{this.debug.log("Track added",Me),q.set(Me,{default:Me.mode==="showing"}),Me.mode==="showing"&&(Me.mode="hidden"),Le.call(this,Me,"cuechange",()=>ft.updateCues.call(this))}),(ge&&this.language!==F||!S.includes(fe))&&(ft.setLanguage.call(this,F),ft.toggle.call(this,z&&ge)),ne(this.elements.container,this.config.classNames.captions.enabled,!Q(S)),ve(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&rt.setCaptionsMenu.call(this)},toggle(S,z=!0){if(!this.supported.ui)return;let{toggled:F}=this.captions,q=this.config.classNames.captions.active,fe=x(S)?!F:S;if(fe!==F){if(z||(this.captions.active=fe,this.storage.set({captions:fe})),!this.language&&fe&&!z){let ge=ft.getTracks.call(this),Me=ft.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=Me.language,void ft.set.call(this,ge.indexOf(Me))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=fe),ne(this.elements.container,q,fe),this.captions.toggled=fe,rt.updateSetting.call(this,"captions"),we.call(this,this.media,fe?"captionsenabled":"captionsdisabled")}setTimeout(()=>{fe&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(S,z=!0){let F=ft.getTracks.call(this);if(S!==-1)if(Y(S))if(S in F){if(this.captions.currentTrack!==S){this.captions.currentTrack=S;let q=F[S],{language:fe}=q||{};this.captions.currentTrackNode=q,rt.updateSetting.call(this,"captions"),z||(this.captions.language=fe,this.storage.set({language:fe})),this.isVimeo&&this.embed.enableTextTrack(fe),we.call(this,this.media,"languagechange")}ft.toggle.call(this,!0,z),this.isHTML5&&this.isVideo&&ft.updateCues.call(this)}else this.debug.warn("Track not found",S);else this.debug.warn("Invalid caption argument",S);else ft.toggle.call(this,!1,z)},setLanguage(S,z=!0){if(!oe(S))return void this.debug.warn("Invalid language argument",S);let F=S.toLowerCase();this.captions.language=F;let q=ft.getTracks.call(this),fe=ft.findTrack.call(this,[F]);ft.set.call(this,q.indexOf(fe),z)},getTracks(S=!1){return Array.from((this.media||{}).textTracks||[]).filter(z=>!this.isHTML5||S||this.captions.meta.has(z)).filter(z=>["captions","subtitles"].includes(z.kind))},findTrack(S,z=!1){let F=ft.getTracks.call(this),q=Me=>Number((this.captions.meta.get(Me)||{}).default),fe=Array.from(F).sort((Me,ke)=>q(ke)-q(Me)),ge;return S.every(Me=>(ge=fe.find(ke=>ke.language===Me),!ge)),ge||(z?fe[0]:void 0)},getCurrentTrack(){return ft.getTracks.call(this)[this.currentTrack]},getLabel(S){let z=S;return!ie(z)&&De.textTracks&&this.captions.toggled&&(z=ft.getCurrentTrack.call(this)),ie(z)?Q(z.label)?Q(z.language)?Ze.get("enabled",this.config):S.language.toUpperCase():z.label:Ze.get("disabled",this.config)},updateCues(S){if(!this.supported.ui)return;if(!se(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!x(S)&&!Array.isArray(S))return void this.debug.warn("updateCues: Invalid input",S);let z=S;if(!z){let q=ft.getCurrentTrack.call(this);z=Array.from((q||{}).activeCues||[]).map(fe=>fe.getCueAsHTML()).map(Pe)}let F=z.map(q=>q.trim()).join(` +`);if(F!==this.elements.captions.innerHTML){V(this.elements.captions);let q=l("span",$(this.config.selectors.caption));q.innerHTML=F,this.elements.captions.appendChild(q),we.call(this,this.media,"cuechange")}}},Gt={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Kt="picture-in-picture",Vt="inline",Pt={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ee="audio",Z="video",Ae=()=>{};class Te{constructor(z=!1){this.enabled=window.console&&z,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Ae}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Ae}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Ae}}class be{constructor(z){e(this,"onChange",()=>{if(!this.enabled)return;let F=this.player.elements.buttons.fullscreen;se(F)&&(F.pressed=this.active);let q=this.target===this.player.media?this.target:this.player.elements.container;we.call(this.player,q,this.active?"enterfullscreen":"exitfullscreen",!0)}),e(this,"toggleFallback",(F=!1)=>{if(F?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=F?"hidden":"",ne(this.target,this.player.config.classNames.fullscreen.fallback,F),le.isIos){let q=document.head.querySelector('meta[name="viewport"]'),fe="viewport-fit=cover";q||(q=document.createElement("meta"),q.setAttribute("name","viewport"));let ge=oe(q.content)&&q.content.includes(fe);F?(this.cleanupViewport=!ge,ge||(q.content+=`,${fe}`)):this.cleanupViewport&&(q.content=q.content.split(",").filter(Me=>Me.trim()!==fe).join(","))}this.onChange()}),e(this,"trapFocus",F=>{if(le.isIos||!this.active||F.key!=="Tab"||F.keyCode!==9)return;let q=document.activeElement,fe=he.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[ge]=fe,Me=fe[fe.length-1];q!==Me||F.shiftKey?q===ge&&F.shiftKey&&(Me.focus(),F.preventDefault()):(ge.focus(),F.preventDefault())}),e(this,"update",()=>{if(this.enabled){let F;F=this.forceFallback?"Fallback (forced)":be.native?"Native":"Fallback",this.player.debug.log(`${F} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");ne(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}),e(this,"enter",()=>{this.enabled&&(le.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!be.native||this.forceFallback?this.toggleFallback(!0):this.prefix?Q(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),e(this,"exit",()=>{if(this.enabled)if(le.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),Xe(this.player.play());else if(!be.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Q(this.prefix)){let F=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${F}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),e(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=z,this.prefix=be.prefix,this.property=be.property,this.scrollPosition={x:0,y:0},this.forceFallback=z.config.fullscreen.fallback==="force",this.player.elements.fullscreen=z.config.fullscreen.container&&function(F,q){let{prototype:fe}=Element;return(fe.closest||function(){let ge=this;do{if(Ie.matches(ge,q))return ge;ge=ge.parentElement||ge.parentNode}while(ge!==null&&ge.nodeType===1);return null}).call(F,q)}(this.player.elements.container,z.config.fullscreen.container),Le.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Le.call(this.player,this.player.elements.container,"dblclick",F=>{se(this.player.elements.controls)&&this.player.elements.controls.contains(F.target)||this.player.listeners.proxy(F,this.toggle,"fullscreen")}),Le.call(this,this.player.elements.container,"keydown",F=>this.trapFocus(F)),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return be.native&&!this.forceFallback}static get prefix(){if(re(document.exitFullscreen))return"";let z="";return["webkit","moz","ms"].some(F=>!(!re(document[`${F}ExitFullscreen`])&&!re(document[`${F}CancelFullScreen`]))&&(z=F,!0)),z}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get enabled(){return(be.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!be.native||this.forceFallback)return Se(this.target,this.player.config.classNames.fullscreen.fallback);let z=this.prefix?document[`${this.prefix}${this.property}Element`]:document.fullscreenElement;return z&&z.shadowRoot?z===this.target.getRootNode().host:z===this.target}get target(){return le.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}function Oe(S,z=1){return new Promise((F,q)=>{let fe=new Image,ge=()=>{delete fe.onload,delete fe.onerror,(fe.naturalWidth>=z?F:q)(fe)};Object.assign(fe,{onload:ge,onerror:ge,src:S})})}let Qe={addStyleHook(){ne(this.elements.container,this.config.selectors.container.replace(".",""),!0),ne(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(S=!1){S&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Qe.toggleNativeControls.call(this,!0);se(this.elements.controls)||(rt.inject.call(this),this.listeners.controls()),Qe.toggleNativeControls.call(this),this.isHTML5&&ft.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,rt.updateVolume.call(this),rt.timeUpdate.call(this),Qe.checkPlaying.call(this),ne(this.elements.container,this.config.classNames.pip.supported,De.pip&&this.isHTML5&&this.isVideo),ne(this.elements.container,this.config.classNames.airplay.supported,De.airplay&&this.isHTML5),ne(this.elements.container,this.config.classNames.isIos,le.isIos),ne(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{we.call(this,this.media,"ready")},0),Qe.setTitle.call(this),this.poster&&Qe.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&rt.durationUpdate.call(this)},setTitle(){let S=Ze.get("play",this.config);if(oe(this.config.title)&&!Q(this.config.title)&&(S+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(z=>{z.setAttribute("aria-label",S)}),this.isEmbed){let z=ye.call(this,"iframe");if(!se(z))return;let F=Q(this.config.title)?"video":this.config.title,q=Ze.get("frameTitle",this.config);z.setAttribute("title",q.replace("{title}",F))}},togglePoster(S){ne(this.elements.container,this.config.classNames.posterEnabled,S)},setPoster(S,z=!0){return z&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",S),this.elements.poster.removeAttribute("hidden"),Re.call(this).then(()=>Oe(S)).catch(F=>{throw S===this.poster&&Qe.togglePoster.call(this,!1),F}).then(()=>{if(S!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${S}')`,backgroundSize:""}),Qe.togglePoster.call(this,!0),S)))},checkPlaying(S){ne(this.elements.container,this.config.classNames.playing,this.playing),ne(this.elements.container,this.config.classNames.paused,this.paused),ne(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(z=>{Object.assign(z,{pressed:this.playing}),z.setAttribute("aria-label",Ze.get(this.playing?"pause":"play",this.config))}),J(S)&&S.type==="timeupdate"||Qe.toggleControls.call(this)},checkLoading(S){this.loading=["stalled","waiting"].includes(S.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{ne(this.elements.container,this.config.classNames.loading,this.loading),Qe.toggleControls.call(this)},this.loading?250:0)},toggleControls(S){let{controls:z}=this.elements;if(z&&this.config.hideControls){let F=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(S||this.loading||this.paused||z.pressed||z.hover||F))}},migrateStyles(){Object.values({...this.media.style}).filter(S=>!Q(S)&&oe(S)&&S.startsWith("--plyr")).forEach(S=>{this.elements.container.style.setProperty(S,this.media.style.getPropertyValue(S)),this.media.style.removeProperty(S)}),Q(this.media.style)&&this.media.removeAttribute("style")}};class Tt{constructor(z){e(this,"firstTouch",()=>{let{player:F}=this,{elements:q}=F;F.touch=!0,ne(q.container,F.config.classNames.isTouch,!0)}),e(this,"setTabFocus",F=>{let{player:q}=this,{elements:fe}=q;if(clearTimeout(this.focusTimer),F.type==="keydown"&&F.which!==9)return;F.type==="keydown"&&(this.lastKeyDown=F.timeStamp);let ge=F.timeStamp-this.lastKeyDown<=20;(F.type!=="focus"||ge)&&((()=>{let Me=q.config.classNames.tabFocus;ne(he.call(q,`.${Me}`),Me,!1)})(),F.type!=="focusout"&&(this.focusTimer=setTimeout(()=>{let Me=document.activeElement;fe.container.contains(Me)&&ne(document.activeElement,q.config.classNames.tabFocus,!0)},10)))}),e(this,"global",(F=!0)=>{let{player:q}=this;q.config.keyboard.global&&Fe.call(q,window,"keydown keyup",this.handleKey,F,!1),Fe.call(q,document.body,"click",this.toggleMenu,F),Ge.call(q,document.body,"touchstart",this.firstTouch),Fe.call(q,document.body,"keydown focus blur focusout",this.setTabFocus,F,!1,!0)}),e(this,"container",()=>{let{player:F}=this,{config:q,elements:fe,timers:ge}=F;!q.keyboard.global&&q.keyboard.focused&&Le.call(F,fe.container,"keydown keyup",this.handleKey,!1),Le.call(F,fe.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",$e=>{let{controls:gt}=fe;gt&&$e.type==="enterfullscreen"&&(gt.pressed=!1,gt.hover=!1);let Nt=0;["touchstart","touchmove","mousemove"].includes($e.type)&&(Qe.toggleControls.call(F,!0),Nt=F.touch?3e3:2e3),clearTimeout(ge.controls),ge.controls=setTimeout(()=>Qe.toggleControls.call(F,!1),Nt)});let Me=()=>{if(!F.isVimeo||F.config.vimeo.premium)return;let $e=fe.wrapper,{active:gt}=F.fullscreen,[Nt,Lt]=We.call(F),At=tt(`aspect-ratio: ${Nt} / ${Lt}`);if(!gt)return void(At?($e.style.width=null,$e.style.height=null):($e.style.maxWidth=null,$e.style.margin=null));let[Ht,xe]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],et=Ht/xe>Nt/Lt;At?($e.style.width=et?"auto":"100%",$e.style.height=et?"100%":"auto"):($e.style.maxWidth=et?xe/Lt*Nt+"px":null,$e.style.margin=et?"0 auto":null)},ke=()=>{clearTimeout(ge.resized),ge.resized=setTimeout(Me,50)};Le.call(F,fe.container,"enterfullscreen exitfullscreen",$e=>{let{target:gt}=F.fullscreen;gt===fe.container&&(!F.isEmbed&&Q(F.config.ratio)||(Me(),($e.type==="enterfullscreen"?Le:Ve).call(F,window,"resize",ke)))})}),e(this,"media",()=>{let{player:F}=this,{elements:q}=F;if(Le.call(F,F.media,"timeupdate seeking seeked",ge=>rt.timeUpdate.call(F,ge)),Le.call(F,F.media,"durationchange loadeddata loadedmetadata",ge=>rt.durationUpdate.call(F,ge)),Le.call(F,F.media,"ended",()=>{F.isHTML5&&F.isVideo&&F.config.resetOnEnd&&(F.restart(),F.pause())}),Le.call(F,F.media,"progress playing seeking seeked",ge=>rt.updateProgress.call(F,ge)),Le.call(F,F.media,"volumechange",ge=>rt.updateVolume.call(F,ge)),Le.call(F,F.media,"playing play pause ended emptied timeupdate",ge=>Qe.checkPlaying.call(F,ge)),Le.call(F,F.media,"waiting canplay seeked playing",ge=>Qe.checkLoading.call(F,ge)),F.supported.ui&&F.config.clickToPlay&&!F.isAudio){let ge=ye.call(F,`.${F.config.classNames.video}`);if(!se(ge))return;Le.call(F,q.container,"click",Me=>{([q.container,ge].includes(Me.target)||ge.contains(Me.target))&&(F.touch&&F.config.hideControls||(F.ended?(this.proxy(Me,F.restart,"restart"),this.proxy(Me,()=>{Xe(F.play())},"play")):this.proxy(Me,()=>{Xe(F.togglePlay())},"play")))})}F.supported.ui&&F.config.disableContextMenu&&Le.call(F,q.wrapper,"contextmenu",ge=>{ge.preventDefault()},!1),Le.call(F,F.media,"volumechange",()=>{F.storage.set({volume:F.volume,muted:F.muted})}),Le.call(F,F.media,"ratechange",()=>{rt.updateSetting.call(F,"speed"),F.storage.set({speed:F.speed})}),Le.call(F,F.media,"qualitychange",ge=>{rt.updateSetting.call(F,"quality",null,ge.detail.quality)}),Le.call(F,F.media,"ready qualitychange",()=>{rt.setDownloadUrl.call(F)});let fe=F.config.events.concat(["keyup","keydown"]).join(" ");Le.call(F,F.media,fe,ge=>{let{detail:Me={}}=ge;ge.type==="error"&&(Me=F.media.error),we.call(F,q.container,ge.type,!0,Me)})}),e(this,"proxy",(F,q,fe)=>{let{player:ge}=this,Me=ge.config.listeners[fe],ke=!0;re(Me)&&(ke=Me.call(ge,F)),ke!==!1&&re(q)&&q.call(ge,F)}),e(this,"bind",(F,q,fe,ge,Me=!0)=>{let{player:ke}=this,$e=ke.config.listeners[ge],gt=re($e);Le.call(ke,F,q,Nt=>this.proxy(Nt,fe,ge),Me&&!gt)}),e(this,"controls",()=>{let{player:F}=this,{elements:q}=F,fe=le.isIE?"change":"input";if(q.buttons.play&&Array.from(q.buttons.play).forEach(ge=>{this.bind(ge,"click",()=>{Xe(F.togglePlay())},"play")}),this.bind(q.buttons.restart,"click",F.restart,"restart"),this.bind(q.buttons.rewind,"click",()=>{F.lastSeekTime=Date.now(),F.rewind()},"rewind"),this.bind(q.buttons.fastForward,"click",()=>{F.lastSeekTime=Date.now(),F.forward()},"fastForward"),this.bind(q.buttons.mute,"click",()=>{F.muted=!F.muted},"mute"),this.bind(q.buttons.captions,"click",()=>F.toggleCaptions()),this.bind(q.buttons.download,"click",()=>{we.call(F,F.media,"download")},"download"),this.bind(q.buttons.fullscreen,"click",()=>{F.fullscreen.toggle()},"fullscreen"),this.bind(q.buttons.pip,"click",()=>{F.pip="toggle"},"pip"),this.bind(q.buttons.airplay,"click",F.airplay,"airplay"),this.bind(q.buttons.settings,"click",ge=>{ge.stopPropagation(),ge.preventDefault(),rt.toggleMenu.call(F,ge)},null,!1),this.bind(q.buttons.settings,"keyup",ge=>{let Me=ge.which;[13,32].includes(Me)&&(Me!==13?(ge.preventDefault(),ge.stopPropagation(),rt.toggleMenu.call(F,ge)):rt.focusFirstMenuItem.call(F,null,!0))},null,!1),this.bind(q.settings.menu,"keydown",ge=>{ge.which===27&&rt.toggleMenu.call(F,ge)}),this.bind(q.inputs.seek,"mousedown mousemove",ge=>{let Me=q.progress.getBoundingClientRect(),ke=100/Me.width*(ge.pageX-Me.left);ge.currentTarget.setAttribute("seek-value",ke)}),this.bind(q.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",ge=>{let Me=ge.currentTarget,ke=ge.keyCode?ge.keyCode:ge.which,$e="play-on-seeked";if(ee(ge)&&ke!==39&&ke!==37)return;F.lastSeekTime=Date.now();let gt=Me.hasAttribute($e),Nt=["mouseup","touchend","keyup"].includes(ge.type);gt&&Nt?(Me.removeAttribute($e),Xe(F.play())):!Nt&&F.playing&&(Me.setAttribute($e,""),F.pause())}),le.isIos){let ge=he.call(F,'input[type="range"]');Array.from(ge).forEach(Me=>this.bind(Me,fe,ke=>j(ke.target)))}this.bind(q.inputs.seek,fe,ge=>{let Me=ge.currentTarget,ke=Me.getAttribute("seek-value");Q(ke)&&(ke=Me.value),Me.removeAttribute("seek-value"),F.currentTime=ke/Me.max*F.duration},"seek"),this.bind(q.progress,"mouseenter mouseleave mousemove",ge=>rt.updateSeekTooltip.call(F,ge)),this.bind(q.progress,"mousemove touchmove",ge=>{let{previewThumbnails:Me}=F;Me&&Me.loaded&&Me.startMove(ge)}),this.bind(q.progress,"mouseleave touchend click",()=>{let{previewThumbnails:ge}=F;ge&&ge.loaded&&ge.endMove(!1,!0)}),this.bind(q.progress,"mousedown touchstart",ge=>{let{previewThumbnails:Me}=F;Me&&Me.loaded&&Me.startScrubbing(ge)}),this.bind(q.progress,"mouseup touchend",ge=>{let{previewThumbnails:Me}=F;Me&&Me.loaded&&Me.endScrubbing(ge)}),le.isWebkit&&Array.from(he.call(F,'input[type="range"]')).forEach(ge=>{this.bind(ge,"input",Me=>rt.updateRangeFill.call(F,Me.target))}),F.config.toggleInvert&&!se(q.display.duration)&&this.bind(q.display.currentTime,"click",()=>{F.currentTime!==0&&(F.config.invertTime=!F.config.invertTime,rt.timeUpdate.call(F))}),this.bind(q.inputs.volume,fe,ge=>{F.volume=ge.target.value},"volume"),this.bind(q.controls,"mouseenter mouseleave",ge=>{q.controls.hover=!F.touch&&ge.type==="mouseenter"}),q.fullscreen&&Array.from(q.fullscreen.children).filter(ge=>!ge.contains(q.container)).forEach(ge=>{this.bind(ge,"mouseenter mouseleave",Me=>{q.controls.hover=!F.touch&&Me.type==="mouseenter"})}),this.bind(q.controls,"mousedown mouseup touchstart touchend touchcancel",ge=>{q.controls.pressed=["mousedown","touchstart"].includes(ge.type)}),this.bind(q.controls,"focusin",()=>{let{config:ge,timers:Me}=F;ne(q.controls,ge.classNames.noTransition,!0),Qe.toggleControls.call(F,!0),setTimeout(()=>{ne(q.controls,ge.classNames.noTransition,!1)},0);let ke=this.touch?3e3:4e3;clearTimeout(Me.controls),Me.controls=setTimeout(()=>Qe.toggleControls.call(F,!1),ke)}),this.bind(q.inputs.volume,"wheel",ge=>{let Me=ge.webkitDirectionInvertedFromDevice,[ke,$e]=[ge.deltaX,-ge.deltaY].map(Lt=>Me?-Lt:Lt),gt=Math.sign(Math.abs(ke)>Math.abs($e)?ke:$e);F.increaseVolume(gt/50);let{volume:Nt}=F.media;(gt===1&&Nt<1||gt===-1&&Nt>0)&&ge.preventDefault()},"volume",!1)}),this.player=z,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(z){let{player:F}=this,{elements:q}=F,fe=z.keyCode?z.keyCode:z.which,ge=z.type==="keydown",Me=ge&&fe===this.lastKey;if(!(z.altKey||z.ctrlKey||z.metaKey||z.shiftKey)&&!!Y(fe))if(ge){let ke=document.activeElement;if(se(ke)){let{editable:$e}=F.config.selectors,{seek:gt}=q.inputs;if(ke!==gt&&Ie(ke,$e)||z.which===32&&Ie(ke,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(fe)&&(z.preventDefault(),z.stopPropagation()),fe){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:Me||(F.currentTime=F.duration/10*(fe-48));break;case 32:case 75:Me||Xe(F.togglePlay());break;case 38:F.increaseVolume(.1);break;case 40:F.decreaseVolume(.1);break;case 77:Me||(F.muted=!F.muted);break;case 39:F.forward();break;case 37:F.rewind();break;case 70:F.fullscreen.toggle();break;case 67:Me||F.toggleCaptions();break;case 76:F.loop=!F.loop}fe===27&&!F.fullscreen.usingNative&&F.fullscreen.active&&F.fullscreen.toggle(),this.lastKey=fe}else this.lastKey=null}toggleMenu(z){rt.toggleMenu.call(this.player,z)}}typeof globalThis!="undefined"||typeof window!="undefined"||typeof global!="undefined"&&global;var dt=function(S,z){return S(z={exports:{}},z.exports),z.exports}(function(S,z){S.exports=function(){var F=function(){},q={},fe={},ge={};function Me(At,Ht){At=At.push?At:[At];var xe,et,Mt,nt=[],It=At.length,Ft=It;for(xe=function(Wt,zt){zt.length&&nt.push(Wt),--Ft||Ht(nt)};It--;)et=At[It],(Mt=fe[et])?xe(et,Mt):(ge[et]=ge[et]||[]).push(xe)}function ke(At,Ht){if(At){var xe=ge[At];if(fe[At]=Ht,xe)for(;xe.length;)xe[0](At,Ht),xe.splice(0,1)}}function $e(At,Ht){At.call&&(At={success:At}),Ht.length?(At.error||F)(Ht):(At.success||F)(At)}function gt(At,Ht,xe,et){var Mt,nt,It=document,Ft=xe.async,Wt=(xe.numRetries||0)+1,zt=xe.before||F,qt=At.replace(/[\?|#].*$/,""),er=At.replace(/^(css|img)!/,"");et=et||0,/(^css!|\.css$)/.test(qt)?((nt=It.createElement("link")).rel="stylesheet",nt.href=er,(Mt="hideFocus"in nt)&&nt.relList&&(Mt=0,nt.rel="preload",nt.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(qt)?(nt=It.createElement("img")).src=er:((nt=It.createElement("script")).src=At,nt.async=Ft===void 0||Ft),nt.onload=nt.onerror=nt.onbeforeload=function(dr){var cr=dr.type[0];if(Mt)try{nt.sheet.cssText.length||(cr="e")}catch(yr){yr.code!=18&&(cr="e")}if(cr=="e"){if((et+=1){dt(S,{success:z,error:F})})}function bt(S){S&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===S&&(this.media.paused=!S,we.call(this,this.media,S?"play":"pause"))}let Yt={setup(){let S=this;ne(S.elements.wrapper,S.config.classNames.embed,!0),S.options.speed=S.config.speed.options,He.call(S),U(window.Vimeo)?Yt.ready.call(S):st(S.config.urls.vimeo.sdk).then(()=>{Yt.ready.call(S)}).catch(z=>{S.debug.warn("Vimeo SDK (player.js) failed to load",z)})},ready(){let S=this,z=S.config.vimeo,{premium:F,referrerPolicy:q,...fe}=z;F&&Object.assign(fe,{controls:!1,sidedock:!1});let ge=kt({loop:S.config.loop.active,autoplay:S.autoplay,muted:S.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative,...fe}),Me=S.media.getAttribute("src");Q(Me)&&(Me=S.media.getAttribute(S.config.attributes.embed.id));let ke=Q($e=Me)?null:Y(Number($e))?$e:$e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:$e;var $e;let gt=l("iframe"),Nt=vt(S.config.urls.vimeo.iframe,ke,ge);if(gt.setAttribute("src",Nt),gt.setAttribute("allowfullscreen",""),gt.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Q(q)||gt.setAttribute("referrerPolicy",q),F||!z.customControls)gt.setAttribute("data-poster",S.poster),S.media=te(gt,S.media);else{let nt=l("div",{class:S.config.classNames.embedContainer,"data-poster":S.poster});nt.appendChild(gt),S.media=te(nt,S.media)}z.customControls||Ue(vt(S.config.urls.vimeo.api,Nt)).then(nt=>{!Q(nt)&&nt.thumbnail_url&&Qe.setPoster.call(S,nt.thumbnail_url).catch(()=>{})}),S.embed=new window.Vimeo.Player(gt,{autopause:S.config.autopause,muted:S.muted}),S.media.paused=!0,S.media.currentTime=0,S.supported.ui&&S.embed.disableTextTrack(),S.media.play=()=>(bt.call(S,!0),S.embed.play()),S.media.pause=()=>(bt.call(S,!1),S.embed.pause()),S.media.stop=()=>{S.pause(),S.currentTime=0};let{currentTime:Lt}=S.media;Object.defineProperty(S.media,"currentTime",{get:()=>Lt,set(nt){let{embed:It,media:Ft,paused:Wt,volume:zt}=S,qt=Wt&&!It.hasPlayed;Ft.seeking=!0,we.call(S,Ft,"seeking"),Promise.resolve(qt&&It.setVolume(0)).then(()=>It.setCurrentTime(nt)).then(()=>qt&&It.pause()).then(()=>qt&&It.setVolume(zt)).catch(()=>{})}});let At=S.config.speed.selected;Object.defineProperty(S.media,"playbackRate",{get:()=>At,set(nt){S.embed.setPlaybackRate(nt).then(()=>{At=nt,we.call(S,S.media,"ratechange")}).catch(()=>{S.options.speed=[1]})}});let{volume:Ht}=S.config;Object.defineProperty(S.media,"volume",{get:()=>Ht,set(nt){S.embed.setVolume(nt).then(()=>{Ht=nt,we.call(S,S.media,"volumechange")})}});let{muted:xe}=S.config;Object.defineProperty(S.media,"muted",{get:()=>xe,set(nt){let It=!!ue(nt)&&nt;S.embed.setVolume(It?0:S.config.volume).then(()=>{xe=It,we.call(S,S.media,"volumechange")})}});let et,{loop:Mt}=S.config;Object.defineProperty(S.media,"loop",{get:()=>Mt,set(nt){let It=ue(nt)?nt:S.config.loop.active;S.embed.setLoop(It).then(()=>{Mt=It})}}),S.embed.getVideoUrl().then(nt=>{et=nt,rt.setDownloadUrl.call(S)}).catch(nt=>{this.debug.warn(nt)}),Object.defineProperty(S.media,"currentSrc",{get:()=>et}),Object.defineProperty(S.media,"ended",{get:()=>S.currentTime===S.duration}),Promise.all([S.embed.getVideoWidth(),S.embed.getVideoHeight()]).then(nt=>{let[It,Ft]=nt;S.embed.ratio=ze(It,Ft),He.call(this)}),S.embed.setAutopause(S.config.autopause).then(nt=>{S.config.autopause=nt}),S.embed.getVideoTitle().then(nt=>{S.config.title=nt,Qe.setTitle.call(this)}),S.embed.getCurrentTime().then(nt=>{Lt=nt,we.call(S,S.media,"timeupdate")}),S.embed.getDuration().then(nt=>{S.media.duration=nt,we.call(S,S.media,"durationchange")}),S.embed.getTextTracks().then(nt=>{S.media.textTracks=nt,ft.setup.call(S)}),S.embed.on("cuechange",({cues:nt=[]})=>{let It=nt.map(Ft=>function(Wt){let zt=document.createDocumentFragment(),qt=document.createElement("div");return zt.appendChild(qt),qt.innerHTML=Wt,zt.firstChild.innerText}(Ft.text));ft.updateCues.call(S,It)}),S.embed.on("loaded",()=>{S.embed.getPaused().then(nt=>{bt.call(S,!nt),nt||we.call(S,S.media,"playing")}),se(S.embed.element)&&S.supported.ui&&S.embed.element.setAttribute("tabindex",-1)}),S.embed.on("bufferstart",()=>{we.call(S,S.media,"waiting")}),S.embed.on("bufferend",()=>{we.call(S,S.media,"playing")}),S.embed.on("play",()=>{bt.call(S,!0),we.call(S,S.media,"playing")}),S.embed.on("pause",()=>{bt.call(S,!1)}),S.embed.on("timeupdate",nt=>{S.media.seeking=!1,Lt=nt.seconds,we.call(S,S.media,"timeupdate")}),S.embed.on("progress",nt=>{S.media.buffered=nt.percent,we.call(S,S.media,"progress"),parseInt(nt.percent,10)===1&&we.call(S,S.media,"canplaythrough"),S.embed.getDuration().then(It=>{It!==S.media.duration&&(S.media.duration=It,we.call(S,S.media,"durationchange"))})}),S.embed.on("seeked",()=>{S.media.seeking=!1,we.call(S,S.media,"seeked")}),S.embed.on("ended",()=>{S.media.paused=!0,we.call(S,S.media,"ended")}),S.embed.on("error",nt=>{S.media.error=nt,we.call(S,S.media,"error")}),z.customControls&&setTimeout(()=>Qe.build.call(S),0)}};function xt(S){S&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===S&&(this.media.paused=!S,we.call(this,this.media,S?"play":"pause"))}function Qt(S){return S.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}let Xt={setup(){if(ne(this.elements.wrapper,this.config.classNames.embed,!0),U(window.YT)&&re(window.YT.Player))Xt.ready.call(this);else{let S=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{re(S)&&S(),Xt.ready.call(this)},st(this.config.urls.youtube.sdk).catch(z=>{this.debug.warn("YouTube API failed to load",z)})}},getTitle(S){Ue(vt(this.config.urls.youtube.api,S)).then(z=>{if(U(z)){let{title:F,height:q,width:fe}=z;this.config.title=F,Qe.setTitle.call(this),this.embed.ratio=ze(fe,q)}He.call(this)}).catch(()=>{He.call(this)})},ready(){let S=this,z=S.config.youtube,F=S.media&&S.media.getAttribute("id");if(!Q(F)&&F.startsWith("youtube-"))return;let q=S.media.getAttribute("src");Q(q)&&(q=S.media.getAttribute(this.config.attributes.embed.id));let fe=Q(ge=q)?null:ge.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:ge;var ge;let Me=l("div",{id:`${S.provider}-${Math.floor(1e4*Math.random())}`,"data-poster":z.customControls?S.poster:void 0});if(S.media=te(Me,S.media),z.customControls){let ke=$e=>`https://i.ytimg.com/vi/${fe}/${$e}default.jpg`;Oe(ke("maxres"),121).catch(()=>Oe(ke("sd"),121)).catch(()=>Oe(ke("hq"))).then($e=>Qe.setPoster.call(S,$e.src)).then($e=>{$e.includes("maxres")||(S.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}S.embed=new window.YT.Player(S.media,{videoId:fe,host:Qt(z),playerVars:c({},{autoplay:S.config.autoplay?1:0,hl:S.config.hl,controls:S.supported.ui&&z.customControls?0:1,disablekb:1,playsinline:S.config.fullscreen.iosNative?0:1,cc_load_policy:S.captions.active?1:0,cc_lang_pref:S.config.captions.language,widget_referrer:window?window.location.href:null},z),events:{onError(ke){if(!S.media.error){let $e=ke.data,gt={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[$e]||"An unknown error occured";S.media.error={code:$e,message:gt},we.call(S,S.media,"error")}},onPlaybackRateChange(ke){let $e=ke.target;S.media.playbackRate=$e.getPlaybackRate(),we.call(S,S.media,"ratechange")},onReady(ke){if(re(S.media.play))return;let $e=ke.target;Xt.getTitle.call(S,fe),S.media.play=()=>{xt.call(S,!0),$e.playVideo()},S.media.pause=()=>{xt.call(S,!1),$e.pauseVideo()},S.media.stop=()=>{$e.stopVideo()},S.media.duration=$e.getDuration(),S.media.paused=!0,S.media.currentTime=0,Object.defineProperty(S.media,"currentTime",{get:()=>Number($e.getCurrentTime()),set(At){S.paused&&!S.embed.hasPlayed&&S.embed.mute(),S.media.seeking=!0,we.call(S,S.media,"seeking"),$e.seekTo(At)}}),Object.defineProperty(S.media,"playbackRate",{get:()=>$e.getPlaybackRate(),set(At){$e.setPlaybackRate(At)}});let{volume:gt}=S.config;Object.defineProperty(S.media,"volume",{get:()=>gt,set(At){gt=At,$e.setVolume(100*gt),we.call(S,S.media,"volumechange")}});let{muted:Nt}=S.config;Object.defineProperty(S.media,"muted",{get:()=>Nt,set(At){let Ht=ue(At)?At:Nt;Nt=Ht,$e[Ht?"mute":"unMute"](),$e.setVolume(100*gt),we.call(S,S.media,"volumechange")}}),Object.defineProperty(S.media,"currentSrc",{get:()=>$e.getVideoUrl()}),Object.defineProperty(S.media,"ended",{get:()=>S.currentTime===S.duration});let Lt=$e.getAvailablePlaybackRates();S.options.speed=Lt.filter(At=>S.config.speed.options.includes(At)),S.supported.ui&&z.customControls&&S.media.setAttribute("tabindex",-1),we.call(S,S.media,"timeupdate"),we.call(S,S.media,"durationchange"),clearInterval(S.timers.buffering),S.timers.buffering=setInterval(()=>{S.media.buffered=$e.getVideoLoadedFraction(),(S.media.lastBuffered===null||S.media.lastBufferedQe.build.call(S),50)},onStateChange(ke){let $e=ke.target;switch(clearInterval(S.timers.playing),S.media.seeking&&[1,2].includes(ke.data)&&(S.media.seeking=!1,we.call(S,S.media,"seeked")),ke.data){case-1:we.call(S,S.media,"timeupdate"),S.media.buffered=$e.getVideoLoadedFraction(),we.call(S,S.media,"progress");break;case 0:xt.call(S,!1),S.media.loop?($e.stopVideo(),$e.playVideo()):we.call(S,S.media,"ended");break;case 1:z.customControls&&!S.config.autoplay&&S.media.paused&&!S.embed.hasPlayed?S.media.pause():(xt.call(S,!0),we.call(S,S.media,"playing"),S.timers.playing=setInterval(()=>{we.call(S,S.media,"timeupdate")},50),S.media.duration!==$e.getDuration()&&(S.media.duration=$e.getDuration(),we.call(S,S.media,"durationchange")));break;case 2:S.muted||S.embed.unMute(),xt.call(S,!1);break;case 3:we.call(S,S.media,"waiting")}we.call(S,S.elements.container,"statechange",!1,{code:ke.data})}}})}},Ut={setup(){this.media?(ne(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),ne(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&ne(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=l("div",{class:this.config.classNames.video}),E(this.media,this.elements.wrapper),this.elements.poster=l("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?mt.setup.call(this):this.isYouTube?Xt.setup.call(this):this.isVimeo&&Yt.setup.call(this)):this.debug.warn("No media element found!")}};class Zt{constructor(z){e(this,"load",()=>{this.enabled&&(U(window.google)&&U(window.google.ima)?this.ready():st(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),e(this,"ready",()=>{var F;this.enabled||((F=this).manager&&F.manager.destroy(),F.elements.displayContainer&&F.elements.displayContainer.destroy(),F.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),e(this,"setupIMA",()=>{this.elements.container=l("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,F=>this.onAdsManagerLoaded(F),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,F=>this.onAdError(F),!1),this.requestAds()}),e(this,"requestAds",()=>{let{container:F}=this.player.elements;try{let q=new google.ima.AdsRequest;q.adTagUrl=this.tagUrl,q.linearAdSlotWidth=F.offsetWidth,q.linearAdSlotHeight=F.offsetHeight,q.nonLinearAdSlotWidth=F.offsetWidth,q.nonLinearAdSlotHeight=F.offsetHeight,q.forceNonLinearFullSlot=!1,q.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(q)}catch(q){this.onAdError(q)}}),e(this,"pollCountdown",(F=!1)=>{if(!F)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{let q=Et(Math.max(this.manager.getRemainingTime(),0)),fe=`${Ze.get("advertisement",this.player.config)} - ${q}`;this.elements.container.setAttribute("data-badge-text",fe)},100)}),e(this,"onAdsManagerLoaded",F=>{if(!this.enabled)return;let q=new google.ima.AdsRenderingSettings;q.restoreCustomPlaybackStateOnAdBreakComplete=!0,q.enablePreloading=!0,this.manager=F.getAdsManager(this.player,q),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,fe=>this.onAdError(fe)),Object.keys(google.ima.AdEvent.Type).forEach(fe=>{this.manager.addEventListener(google.ima.AdEvent.Type[fe],ge=>this.onAdEvent(ge))}),this.trigger("loaded")}),e(this,"addCuePoints",()=>{Q(this.cuePoints)||this.cuePoints.forEach(F=>{if(F!==0&&F!==-1&&F{let{container:q}=this.player.elements,fe=F.getAd(),ge=F.getAdData();switch((Me=>{we.call(this.player,this.player.media,`ads${Me.replace(/_/g,"").toLowerCase()}`)})(F.type),F.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),fe.isLinear()||(fe.width=q.offsetWidth,fe.height=q.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:ge.adError&&this.player.debug.warn(`Non-fatal ad error: ${ge.adError.getMessage()}`)}}),e(this,"onAdError",F=>{this.cancel(),this.player.debug.warn("Ads error",F)}),e(this,"listeners",()=>{let{container:F}=this.player.elements,q;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{q=this.player.currentTime}),this.player.on("seeked",()=>{let fe=this.player.currentTime;Q(this.cuePoints)||this.cuePoints.forEach((ge,Me)=>{q{this.manager&&this.manager.resize(F.offsetWidth,F.offsetHeight,google.ima.ViewMode.NORMAL)})}),e(this,"play",()=>{let{container:F}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(F.offsetWidth,F.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(q){this.onAdError(q)}}).catch(()=>{})}),e(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Xe(this.player.media.play())}),e(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),e(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),e(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(F=>{this.on("loaded",F),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),e(this,"trigger",(F,...q)=>{let fe=this.events[F];ve(fe)&&fe.forEach(ge=>{re(ge)&&ge.apply(this,q)})}),e(this,"on",(F,q)=>(ve(this.events[F])||(this.events[F]=[]),this.events[F].push(q),this)),e(this,"startSafetyTimer",(F,q)=>{this.player.debug.log(`Safety timer invoked from: ${q}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},F)}),e(this,"clearSafetyTimer",F=>{x(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${F}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=z,this.config=z.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((F,q)=>{this.on("loaded",F),this.on("error",q)}),this.load()}get enabled(){let{config:z}=this;return this.player.isHTML5&&this.player.isVideo&&z.enabled&&(!Q(z.publisherId)||de(z.tagUrl))}get tagUrl(){let{config:z}=this;return de(z.tagUrl)?z.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${kt({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:z.publisherId})}`}}let qe=S=>{let z=[];return S.split(/\r\n\r\n|\n\n|\r\r/).forEach(F=>{let q={};F.split(/\r\n|\n|\r/).forEach(fe=>{if(Y(q.startTime)){if(!Q(fe.trim())&&Q(q.text)){let ge=fe.trim().split("#xywh=");[q.text]=ge,ge[1]&&([q.x,q.y,q.w,q.h]=ge[1].split(","))}}else{let ge=fe.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);ge&&(q.startTime=60*Number(ge[1]||0)*60+60*Number(ge[2])+Number(ge[3])+Number(`0.${ge[4]}`),q.endTime=60*Number(ge[6]||0)*60+60*Number(ge[7])+Number(ge[8])+Number(`0.${ge[9]}`))}}),q.text&&z.push(q)}),z},ot=(S,z)=>{let F={};return S>z.width/z.height?(F.width=z.width,F.height=1/S*z.width):(F.height=z.height,F.width=S*z.height),F};class yt{constructor(z){e(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.loaded=!0)})}),e(this,"getThumbnails",()=>new Promise(F=>{let{src:q}=this.player.config.previewThumbnails;if(Q(q))throw new Error("Missing previewThumbnails.src config attribute");let fe=()=>{this.thumbnails.sort((ge,Me)=>ge.height-Me.height),this.player.debug.log("Preview thumbnails",this.thumbnails),F()};if(re(q))q(ge=>{this.thumbnails=ge,fe()});else{let ge=(oe(q)?[q]:q).map(Me=>this.getThumbnail(Me));Promise.all(ge).then(fe)}})),e(this,"getThumbnail",F=>new Promise(q=>{Ue(F).then(fe=>{let ge={frames:qe(fe),height:null,urlPrefix:""};ge.frames[0].text.startsWith("/")||ge.frames[0].text.startsWith("http://")||ge.frames[0].text.startsWith("https://")||(ge.urlPrefix=F.substring(0,F.lastIndexOf("/")+1));let Me=new Image;Me.onload=()=>{ge.height=Me.naturalHeight,ge.width=Me.naturalWidth,this.thumbnails.push(ge),q()},Me.src=ge.urlPrefix+ge.frames[0].text})})),e(this,"startMove",F=>{if(this.loaded&&J(F)&&["touchmove","mousemove"].includes(F.type)&&this.player.media.duration){if(F.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{let q=this.player.elements.progress.getBoundingClientRect(),fe=100/q.width*(F.pageX-q.left);this.seekTime=this.player.media.duration*(fe/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=F.pageX,this.elements.thumb.time.innerText=Et(this.seekTime)}this.showImageAtCurrentTime()}}),e(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),e(this,"startScrubbing",F=>{(x(F.button)||F.button===!1||F.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),e(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Ge.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),e(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),e(this,"render",()=>{this.elements.thumb.container=l("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=l("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);let F=l("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=l("span",{},"00:00"),F.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(F),se(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=l("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),e(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),e(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();let F=this.thumbnails[0].frames.findIndex(ge=>this.seekTime>=ge.startTime&&this.seekTime<=ge.endTime),q=F>=0,fe=0;this.mouseDown||this.toggleThumbContainer(q),q&&(this.thumbnails.forEach((ge,Me)=>{this.loadedImages.includes(ge.frames[F].text)&&(fe=Me)}),F!==this.showingThumb&&(this.showingThumb=F,this.loadImage(fe)))}),e(this,"loadImage",(F=0)=>{let q=this.showingThumb,fe=this.thumbnails[F],{urlPrefix:ge}=fe,Me=fe.frames[q],ke=fe.frames[q].text,$e=ge+ke;if(this.currentImageElement&&this.currentImageElement.dataset.filename===ke)this.showImage(this.currentImageElement,Me,F,q,ke,!1),this.currentImageElement.dataset.index=q,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);let gt=new Image;gt.src=$e,gt.dataset.index=q,gt.dataset.filename=ke,this.showingThumbFilename=ke,this.player.debug.log(`Loading image: ${$e}`),gt.onload=()=>this.showImage(gt,Me,F,q,ke,!0),this.loadingImage=gt,this.removeOldImages(gt)}}),e(this,"showImage",(F,q,fe,ge,Me,ke=!0)=>{this.player.debug.log(`Showing thumb: ${Me}. num: ${ge}. qual: ${fe}. newimg: ${ke}`),this.setImageSizeAndOffset(F,q),ke&&(this.currentImageContainer.appendChild(F),this.currentImageElement=F,this.loadedImages.includes(Me)||this.loadedImages.push(Me)),this.preloadNearby(ge,!0).then(this.preloadNearby(ge,!1)).then(this.getHigherQuality(fe,F,q,Me))}),e(this,"removeOldImages",F=>{Array.from(this.currentImageContainer.children).forEach(q=>{if(q.tagName.toLowerCase()!=="img")return;let fe=this.usingSprites?500:1e3;if(q.dataset.index!==F.dataset.index&&!q.dataset.deleting){q.dataset.deleting=!0;let{currentImageContainer:ge}=this;setTimeout(()=>{ge.removeChild(q),this.player.debug.log(`Removing thumb: ${q.dataset.filename}`)},fe)}})}),e(this,"preloadNearby",(F,q=!0)=>new Promise(fe=>{setTimeout(()=>{let ge=this.thumbnails[0].frames[F].text;if(this.showingThumbFilename===ge){let Me;Me=q?this.thumbnails[0].frames.slice(F):this.thumbnails[0].frames.slice(0,F).reverse();let ke=!1;Me.forEach($e=>{let gt=$e.text;if(gt!==ge&&!this.loadedImages.includes(gt)){ke=!0,this.player.debug.log(`Preloading thumb filename: ${gt}`);let{urlPrefix:Nt}=this.thumbnails[0],Lt=Nt+gt,At=new Image;At.src=Lt,At.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${gt}`),this.loadedImages.includes(gt)||this.loadedImages.push(gt),fe()}}}),ke||fe()}},300)})),e(this,"getHigherQuality",(F,q,fe,ge)=>{if(F{this.showingThumbFilename===ge&&(this.player.debug.log(`Showing higher quality thumb for: ${ge}`),this.loadImage(F+1))},300)}}),e(this,"toggleThumbContainer",(F=!1,q=!1)=>{let fe=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(fe,F),!F&&q&&(this.showingThumb=null,this.showingThumbFilename=null)}),e(this,"toggleScrubbingContainer",(F=!1)=>{let q=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(q,F),F||(this.showingThumb=null,this.showingThumbFilename=null)}),e(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),e(this,"setThumbContainerSizeAndPos",()=>{if(this.sizeSpecifiedInCSS){if(this.elements.thumb.imageContainer.clientHeight>20&&this.elements.thumb.imageContainer.clientWidth<20){let F=Math.floor(this.elements.thumb.imageContainer.clientHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.width=`${F}px`}else if(this.elements.thumb.imageContainer.clientHeight<20&&this.elements.thumb.imageContainer.clientWidth>20){let F=Math.floor(this.elements.thumb.imageContainer.clientWidth/this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=`${F}px`}}else{let F=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=`${this.thumbContainerHeight}px`,this.elements.thumb.imageContainer.style.width=`${F}px`}this.setThumbContainerPos()}),e(this,"setThumbContainerPos",()=>{let F=this.player.elements.progress.getBoundingClientRect(),q=this.player.elements.container.getBoundingClientRect(),{container:fe}=this.elements.thumb,ge=q.left-F.left+10,Me=q.right-F.left-fe.clientWidth-10,ke=this.mousePosX-F.left-fe.clientWidth/2;keMe&&(ke=Me),fe.style.left=`${ke}px`}),e(this,"setScrubbingContainerSize",()=>{let{width:F,height:q}=ot(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${F}px`,this.elements.scrubbing.container.style.height=`${q}px`}),e(this,"setImageSizeAndOffset",(F,q)=>{if(!this.usingSprites)return;let fe=this.thumbContainerHeight/q.h;F.style.height=F.naturalHeight*fe+"px",F.style.width=F.naturalWidth*fe+"px",F.style.left=`-${q.x*fe}px`,F.style.top=`-${q.y*fe}px`}),this.player=z,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){let{height:z}=ot(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return z}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(z){this.mouseDown?this.currentScrubbingImageElement=z:this.currentThumbnailImageElement=z}}let Ke={insertElements(S,z){oe(z)?d(S,this.media,{src:z}):ve(z)&&z.forEach(F=>{d(S,this.media,F)})},change(S){G(S,"sources.length")?(mt.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],y(this.media),this.media=null,se(this.elements.container)&&this.elements.container.removeAttribute("class");let{sources:z,type:F}=S,[{provider:q=Pt.html5,src:fe}]=z,ge=q==="html5"?F:"div",Me=q==="html5"?{}:{src:fe};Object.assign(this,{provider:q,type:F,supported:De.check(F,q,this.config.playsinline),media:l(ge,Me)}),this.elements.container.appendChild(this.media),ue(S.autoplay)&&(this.config.autoplay=S.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),Q(S.poster)||(this.poster=S.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Qe.addStyleHook.call(this),this.isHTML5&&Ke.insertElements.call(this,"source",z),this.config.title=S.title,Ut.setup.call(this),this.isHTML5&&Object.keys(S).includes("tracks")&&Ke.insertElements.call(this,"track",S.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Qe.build.call(this),this.isHTML5&&this.media.load(),Q(S.previewThumbnails)||(Object.assign(this.config.previewThumbnails,S.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new yt(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class it{constructor(z,F){if(e(this,"play",()=>re(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Xe(this.media.play())),this.media.play()):null),e(this,"pause",()=>this.playing&&re(this.media.pause)?this.media.pause():null),e(this,"togglePlay",ke=>(ue(ke)?ke:!this.playing)?this.play():this.pause()),e(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):re(this.media.stop)&&this.media.stop()}),e(this,"restart",()=>{this.currentTime=0}),e(this,"rewind",ke=>{this.currentTime-=Y(ke)?ke:this.config.seekTime}),e(this,"forward",ke=>{this.currentTime+=Y(ke)?ke:this.config.seekTime}),e(this,"increaseVolume",ke=>{let $e=this.media.muted?0:this.volume;this.volume=$e+(Y(ke)?ke:0)}),e(this,"decreaseVolume",ke=>{this.increaseVolume(-ke)}),e(this,"airplay",()=>{De.airplay&&this.media.webkitShowPlaybackTargetPicker()}),e(this,"toggleControls",ke=>{if(this.supported.ui&&!this.isAudio){let $e=Se(this.elements.container,this.config.classNames.hideControls),gt=ke===void 0?void 0:!ke,Nt=ne(this.elements.container,this.config.classNames.hideControls,gt);if(Nt&&ve(this.config.controls)&&this.config.controls.includes("settings")&&!Q(this.config.settings)&&rt.toggleMenu.call(this,!1),Nt!==$e){let Lt=Nt?"controlshidden":"controlsshown";we.call(this,this.media,Lt)}return!Nt}return!1}),e(this,"on",(ke,$e)=>{Le.call(this,this.elements.container,ke,$e)}),e(this,"once",(ke,$e)=>{Ge.call(this,this.elements.container,ke,$e)}),e(this,"off",(ke,$e)=>{Ve(this.elements.container,ke,$e)}),e(this,"destroy",(ke,$e=!1)=>{if(!this.ready)return;let gt=()=>{document.body.style.overflow="",this.embed=null,$e?(Object.keys(this.elements).length&&(y(this.elements.buttons.play),y(this.elements.captions),y(this.elements.controls),y(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),re(ke)&&ke()):(at.call(this),mt.cancelRequests.call(this),te(this.elements.original,this.elements.container),we.call(this,this.elements.original,"destroyed",!0),re(ke)&&ke.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Qe.toggleNativeControls.call(this,!0),gt()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&re(this.embed.destroy)&&this.embed.destroy(),gt()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(gt),setTimeout(gt,200))}),e(this,"supports",ke=>De.mime.call(this,ke)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=De.touch,this.media=z,oe(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||ce(this.media)||ve(this.media))&&(this.media=this.media[0]),this.config=c({},Gt,it.defaults,F||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(ke){return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Te(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",De),x(this.media)||!se(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!De.check().api)return void this.debug.error("Setup failed: no support");let q=this.media.cloneNode(!0);q.autoplay=!1,this.elements.original=q;let fe=this.media.tagName.toLowerCase(),ge=null,Me=null;switch(fe){case"div":if(ge=this.media.querySelector("iframe"),se(ge)){if(Me=Dt(ge.getAttribute("src")),this.provider=function(ke){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(ke)?Pt.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(ke)?Pt.vimeo:null}(Me.toString()),this.elements.container=this.media,this.media=ge,this.elements.container.className="",Me.search.length){let ke=["1","true"];ke.includes(Me.searchParams.get("autoplay"))&&(this.config.autoplay=!0),ke.includes(Me.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=ke.includes(Me.searchParams.get("playsinline")),this.config.youtube.hl=Me.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Q(this.provider)||!Object.values(Pt).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Z;break;case"video":case"audio":this.type=fe,this.provider=Pt.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=De.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Tt(this),this.storage=new ut(this),this.media.plyr=this,se(this.elements.container)||(this.elements.container=l("div",{tabindex:0}),E(this.media,this.elements.container)),Qe.migrateStyles.call(this),Qe.addStyleHook.call(this),Ut.setup.call(this),this.config.debug&&Le.call(this,this.elements.container,this.config.events.join(" "),ke=>{this.debug.log(`event: ${ke.type}`)}),this.fullscreen=new be(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Qe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Zt(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Xe(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new yt(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Pt.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Pt.youtube}get isVimeo(){return this.provider===Pt.vimeo}get isVideo(){return this.type===Z}get isAudio(){return this.type===Ee}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&this.currentTime===0)}get ended(){return Boolean(this.media.ended)}set currentTime(z){if(!this.duration)return;let F=Y(z)&&z>0;this.media.currentTime=F?Math.min(z,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){let{buffered:z}=this.media;return Y(z)?z:z&&z.length&&this.duration>0?z.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){let z=parseFloat(this.config.duration),F=(this.media||{}).duration,q=Y(F)&&F!==1/0?F:0;return z||q}set volume(z){let F=z;oe(F)&&(F=Number(F)),Y(F)||(F=this.storage.get("volume")),Y(F)||({volume:F}=this.config),F>1&&(F=1),F<0&&(F=0),this.config.volume=F,this.media.volume=F,!Q(z)&&this.muted&&F>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(z){let F=z;ue(F)||(F=this.storage.get("muted")),ue(F)||(F=this.config.muted),this.config.muted=F,this.media.muted=F}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(z){let F=null;Y(z)&&(F=z),Y(F)||(F=this.storage.get("speed")),Y(F)||(F=this.config.speed.selected);let{minimumSpeed:q,maximumSpeed:fe}=this;F=function(ge=0,Me=0,ke=255){return Math.min(Math.max(ge,Me),ke)}(F,q,fe),this.config.speed.selected=F,setTimeout(()=>{this.media.playbackRate=F},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(z){let F=this.config.quality,q=this.options.quality;if(!q.length)return;let fe=[!Q(z)&&Number(z),this.storage.get("quality"),F.selected,F.default].find(Y),ge=!0;if(!q.includes(fe)){let Me=ct(q,fe);this.debug.warn(`Unsupported quality option: ${fe}, using ${Me} instead`),fe=Me,ge=!1}F.selected=fe,this.media.quality=fe,ge&&this.storage.set({quality:fe})}get quality(){return this.media.quality}set loop(z){let F=ue(z)?z:this.config.loop.active;this.config.loop.active=F,this.media.loop=F}get loop(){return Boolean(this.media.loop)}set source(z){Ke.change.call(this,z)}get source(){return this.media.currentSrc}get download(){let{download:z}=this.config.urls;return de(z)?z:this.source}set download(z){de(z)&&(this.config.urls.download=z,rt.setDownloadUrl.call(this))}set poster(z){this.isVideo?Qe.setPoster.call(this,z,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;let z=wt(We.call(this));return ve(z)?z.join(":"):z}set ratio(z){this.isVideo?oe(z)&&Ct(z)?(this.config.ratio=wt(z),He.call(this)):this.debug.error(`Invalid aspect ratio specified (${z})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(z){let F=ue(z)?z:this.config.autoplay;this.config.autoplay=F}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(z){ft.toggle.call(this,z,!1)}set currentTrack(z){ft.set.call(this,z,!1)}get currentTrack(){let{toggled:z,currentTrack:F}=this.captions;return z?F:-1}set language(z){ft.setLanguage.call(this,z,!1)}get language(){return(ft.getCurrentTrack.call(this)||{}).language}set pip(z){if(!De.pip)return;let F=ue(z)?z:!this.pip;re(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(F?Kt:Vt),re(this.media.requestPictureInPicture)&&(!this.pip&&F?this.media.requestPictureInPicture():this.pip&&!F&&document.exitPictureInPicture())}get pip(){return De.pip?Q(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Kt:null}static supported(z,F,q){return De.check(z,F,q)}static loadSprite(z,F){return Je(z,F)}static setup(z,F={}){let q=null;return oe(z)?q=Array.from(document.querySelectorAll(z)):ce(z)?q=Array.from(z):ve(z)&&(q=z.filter(se)),Q(q)?null:q.map(fe=>new it(fe,F))}}var Ne;return it.defaults=(Ne=Gt,JSON.parse(JSON.stringify(Ne))),it})});var Qa=sr((Vl,ja)=>{ja.exports=function e(g,r,t){return r===void 0?function(p,i){return e(g,p,i)}:(t===void 0&&(t="0"),g-=r.toString().length,g>0?new Array(g+(/\./.test(r)?2:1)).join(t)+r:r+"")}});var Pn=sr((Kl,ei)=>{"use strict";ei.exports={fromMs:Ja,fromS:vo,toMs:Za,toS:yo};var Zr=Qa(),Dn=36e5,Nn=6e4,kr=1e3,$a="Time format error";function Ja(e,g="mm:ss"){if(typeof e!="number"||Number.isNaN(e))throw new Error("NaN error");let r=Math.abs(e),t=e<0,p=Math.floor(r/Dn),i=Math.floor(r%Dn/Nn),o=Math.floor(r%Nn/kr),n=Math.floor(r%kr);return Eo({negative:t,hours:p,minutes:i,seconds:o,miliseconds:n},g)}function vo(e,g="mm:ss"){if(typeof e!="number"||Number.isNaN(e))throw new Error("NaN error");let r=e*kr;return Ja(r,g)}function Za(e,g="mm:ss"){let r;if(["mm:ss","mm:ss.sss","hh:mm:ss","hh:mm:ss.sss"].includes(g))r=/^(-)?(?:(\d\d+):)?(\d\d):(\d\d)(\.\d+)?$/;else if(g==="hh:mm")r=/^(-)?(\d\d):(\d\d)(?::(\d\d)(?:(\.\d+))?)?$/;else throw new Error($a);let t=r.exec(e);if(!t)throw new Error;let p=t[1]==="-",i=t[2]|0,o=t[3]|0,n=t[4]|0,f=Math.floor(1e3*t[5]|0);if(o>60||n>60)throw new Error;return(p?-1:1)*(i*Dn+o*Nn+n*kr+f)}function yo(e,g="mm:ss"){let r=Za(e,g);return Math.floor(r/kr)}function Eo(e,g){let r,t,p;switch(g.toLowerCase()){case"hh:mm:ss.sss":r=!0,t=!0,p=!0;break;case"hh:mm:ss":r=!!e.miliseconds,t=!0,p=!0;break;case"hh:mm":r=!!e.miliseconds,t=r||!!e.seconds,p=!0;break;case"mm:ss":r=!!e.miliseconds,t=!0,p=!!e.hours;break;case"mm:ss.sss":r=!0,t=!0,p=!!e.hours;break;default:throw new Error($a)}let i=Zr(2,e.hours),o=Zr(2,e.minutes),n=Zr(2,e.seconds),f=Zr(3,e.miliseconds);return(e.negative?"-":"")+(p?r?`${i}:${o}:${n}.${f}`:t?`${i}:${o}:${n}`:`${i}:${o}`:r?`${o}:${n}.${f}`:`${o}:${n}`)}});Ds(exports,{default:()=>Fn});var oi=Jt(Pr()),li=Jt(require("obsidian"));var Xa=Jt(Kr());var jn=Jt(Kr()),Qn=Jt(require("obsidian"));var Yr=e=>e.hash?e.href.slice(0,-e.hash.length):e.href,Or=(e,g,r)=>{let[t,p]=(0,jn.default)(g);e.style.setProperty("--max-ratio-width",t*r+p)},Wr=(e,g)=>{let{editor:r,app:t}=g,p=r.getCursor("to");r.replaceRange(e,p,p),t.isMobile&&r.setCursor(r.offsetToPos(r.posToOffset(p)+e.length))},$n=e=>new Promise((g,r)=>{if(Qn.Platform.isDesktopApp){let t=require("https").request({hostname:"b23.tv",port:443,path:"/"+e,method:"GET"},p=>p.headers.location?g(p.headers.location):r(new Error("No redirect location found")));t.on("error",p=>r(p)),t.end()}else r(new TypeError("Calling node https in non-electron environment"))});var gr=e=>e.plugins.plugins["mx-bili-plugin"]!==void 0,Jn=e=>{let g=e.plugins.plugins["mx-bili-plugin"];if(gr(e))return g.settings.port;throw new Error("bili plugin not available")},Zn=e=>{let g=e.plugins.plugins["mx-bili-plugin"];if(gr(e))return g.portSetting;throw new Error("bili plugin not available")},ea=e=>{let g=e.plugins.plugins["mx-bili-plugin"];if(gr(e))return g.fetchPoster;throw new Error("bili plugin not available")};var ta=e=>createEl("iframe",{cls:"bili-iframe",attr:{src:e.iframe.toString(),scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:!1,sandbox:"allow-forms allow-presentation allow-same-origin allow-scripts allow-modals"}});var pr=Jt(require("obsidian")),En=Jt(zr()),xa=Jt(Da());var Zs={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"\u0430\u04A7\u0441\u0443\u0430 \u0431\u044B\u0437\u0448\u04D9\u0430"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"\u12A0\u121B\u122D\u129B"},an:{name:"Aragonese",nativeName:"aragon\xE9s"},ar:{name:"Arabic",nativeName:"\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629"},as:{name:"Assamese",nativeName:"\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE"},av:{name:"Avaric",nativeName:"\u0430\u0432\u0430\u0440 \u043C\u0430\u0446\u04C0"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"az\u0259rbaycan dili"},ba:{name:"Bashkir",nativeName:"\u0431\u0430\u0448\u04A1\u043E\u0440\u0442 \u0442\u0435\u043B\u0435"},be:{name:"Belarusian",nativeName:"\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u043C\u043E\u0432\u0430"},bg:{name:"Bulgarian",nativeName:"\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438 \u0435\u0437\u0438\u043A"},bh:{name:"Bihari",nativeName:"\u092D\u094B\u091C\u092A\u0941\u0930\u0940"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"\u09AC\u09BE\u0982\u09B2\u09BE"},bo:{name:"Tibetan",nativeName:"\u0F56\u0F7C\u0F51\u0F0B\u0F61\u0F72\u0F42"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Catal\xE0"},ce:{name:"Chechen",nativeName:"\u043D\u043E\u0445\u0447\u0438\u0439\u043D \u043C\u043E\u0442\u0442"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"\u14C0\u1426\u1403\u152D\u140D\u140F\u1423"},cs:{name:"Czech",nativeName:"\u010De\u0161tina"},cu:{name:"Old Church Slavonic",nativeName:"\u0469\u0437\u044B\u043A\u044A \u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A"},cv:{name:"Chuvash",nativeName:"\u0447\u04D1\u0432\u0430\u0448 \u0447\u04D7\u043B\u0445\u0438"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"Dhivehi"},dz:{name:"Dzongkha",nativeName:"\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41"},ee:{name:"Ewe",nativeName:"E\u028Begbe"},el:{name:"Greek",nativeName:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Espa\xF1ol"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"\u0641\u0627\u0631\u0633\u06CC"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"Vakaviti"},fo:{name:"Faroese",nativeName:"f\xF8royskt"},fr:{name:"French",nativeName:"Fran\xE7ais"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"G\xE0idhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaran\xED",nativeName:"Ava\xF1e'\u1EBD"},gu:{name:"Gujarati",nativeName:"\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"\u0647\u064E\u0648\u064F\u0633\u064E"},he:{name:"Hebrew",nativeName:"\u05E2\u05D1\u05E8\u05D9\u05EA"},hi:{name:"Hindi",nativeName:"\u0939\u093F\u0928\u094D\u0926\u0940"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Krey\xF2l ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"As\u1EE5s\u1EE5 Igbo"},ii:{name:"Nuosu",nativeName:"\uA188\uA320\uA4BF Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"I\xF1upiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"\xCDslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"\u1403\u14C4\u1483\u144E\u1450\u1466"},ja:{name:"Japanese",nativeName:"\u65E5\u672C\u8A9E"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"G\u0129k\u0169y\u0169"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"\u049B\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"\u1781\u17C1\u1798\u179A\u1797\u17B6\u179F\u17B6"},kn:{name:"Kannada",nativeName:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1"},ko:{name:"Korean",nativeName:"\uD55C\uAD6D\uC5B4"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"\u0915\u0936\u094D\u092E\u0940\u0930\u0940"},ku:{name:"Kurdish",nativeName:"Kurd\xEE"},kv:{name:"Komi",nativeName:"\u043A\u043E\u043C\u0438 \u043A\u044B\u0432"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"L\xEBtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Ling\xE1la"},lo:{name:"Lao",nativeName:"\u0E9E\u0EB2\u0EAA\u0EB2"},lt:{name:"Lithuanian",nativeName:"lietuvi\u0173 kalba"},lu:{name:"Luba-Katanga",nativeName:"Tshiluba"},lv:{name:"Latvian",nativeName:"latvie\u0161u valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M\u0327aje\u013C"},mi:{name:"M\u0101ori",nativeName:"te reo M\u0101ori"},mk:{name:"Macedonian",nativeName:"\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438 \u0458\u0430\u0437\u0438\u043A"},ml:{name:"Malayalam",nativeName:"\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02"},mn:{name:"Mongolian",nativeName:"\u041C\u043E\u043D\u0433\u043E\u043B \u0445\u044D\u043B"},mr:{name:"Marathi",nativeName:"\u092E\u0930\u093E\u0920\u0940"},ms:{name:"Malay",nativeName:"Bahasa Malaysia"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"\u1017\u1019\u102C\u1005\u102C"},na:{name:"Nauru",nativeName:"Ekakair\u0169 Naoero"},nb:{name:"Norwegian Bokm\xE5l",nativeName:"Norsk bokm\xE5l"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"\u0928\u0947\u092A\u093E\u0932\u0940"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Din\xE9 bizaad"},ny:{name:"Chichewa",nativeName:"chiChe\u0175a"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"\u140A\u14C2\u1511\u14C8\u142F\u14A7\u140E\u14D0"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"\u0B13\u0B21\u0B3C\u0B3F\u0B06"},os:{name:"Ossetian",nativeName:"\u0438\u0440\u043E\u043D \xE6\u0432\u0437\u0430\u0433"},pa:{name:"Panjabi",nativeName:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"},pi:{name:"P\u0101li",nativeName:"\u092A\u093E\u0934\u093F"},pl:{name:"Polish",nativeName:"j\u0119zyk polski"},ps:{name:"Pashto",nativeName:"\u067E\u069A\u062A\u0648"},pt:{name:"Portuguese",nativeName:"Portugu\xEAs"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Rom\xE2n\u0103"},ru:{name:"Russian",nativeName:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"\u0938\u093F\u0928\u094D\u0927\u0940"},se:{name:"Northern Sami",nativeName:"Davvis\xE1megiella"},sg:{name:"Sango",nativeName:"y\xE2ng\xE2 t\xEE s\xE4ng\xF6"},si:{name:"Sinhala",nativeName:"\u0DC3\u0DD2\u0D82\u0DC4\u0DBD"},sk:{name:"Slovak",nativeName:"sloven\u010Dina"},sl:{name:"Slovenian",nativeName:"slovenski jezik"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"\u0441\u0440\u043F\u0441\u043A\u0438 \u0458\u0435\u0437\u0438\u043A"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"},te:{name:"Telugu",nativeName:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"},tg:{name:"Tajik",nativeName:"\u0442\u043E\u04B7\u0438\u043A\u04E3"},th:{name:"Thai",nativeName:"\u0E44\u0E17\u0E22"},ti:{name:"Tigrinya",nativeName:"\u1275\u130D\u122D\u129B"},tk:{name:"Turkmen",nativeName:"T\xFCrkmen"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"T\xFCrk\xE7e"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"\u0442\u0430\u0442\u0430\u0440 \u0442\u0435\u043B\u0435"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5\u200E"},uk:{name:"Ukrainian",nativeName:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},ur:{name:"Urdu",nativeName:"\u0627\u0631\u062F\u0648"},uz:{name:"Uzbek",nativeName:"\u040E\u0437\u0431\u0435\u043A"},ve:{name:"Venda",nativeName:"Tshiven\u1E13a"},vi:{name:"Vietnamese",nativeName:"Ti\u1EBFng Vi\u1EC7t"},vo:{name:"Volap\xFCk",nativeName:"Volap\xFCk"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9"},yo:{name:"Yoruba",nativeName:"Yor\xF9b\xE1"},za:{name:"Zhuang",nativeName:"Sa\u026F cue\u014B\u0185"},zh:{name:"Chinese",nativeName:"\u4E2D\u6587"},zu:{name:"Zulu",nativeName:"isiZulu"}},Tr=Zs;var fr=class{static getLanguages(g=[]){return g.map(r=>({code:r,name:fr.getName(r),nativeName:fr.getNativeName(r)}))}static getName(g){return fr.validate(g)?Tr[g].name:""}static getAllNames(){return Object.values(Tr).map(g=>g.name)}static getNativeName(g){return fr.validate(g)?Tr[g].nativeName:""}static getAllNativeNames(){return Object.values(Tr).map(g=>g.nativeName)}static getCode(g){return Object.keys(Tr).find(t=>{let p=Tr[t];return p.name.toLowerCase()===g.toLowerCase()||p.nativeName.toLowerCase()===g.toLowerCase()})||""}static getAllCodes(){return Object.keys(Tr)}static validate(g){return Tr.hasOwnProperty(g)}};var Lr=Jt(require("obsidian")),Oa=Jt(Pa()),La=e=>{let{basename:g,parent:r}=e,t=r.children.filter(p=>{if(!(p instanceof Lr.TFile))return!1;let i=p.extension==="srt"||p.extension==="vtt",o=p.basename.startsWith(g);return i&&o});if(t.length>1&&(t=t.filter(p=>{let i=p.basename.slice(g.length);return i.startsWith(".")&&fr.validate(i.substring(1))})),t.length===0)return null;{let p=t.filter(i=>i.extension==="vtt").map(i=>i.basename);for(let i=t.length-1;i>=0;i--){let o=t[i];o.extension===".srt"&&p.includes(o.basename)&&t.splice(i,1)}return console.log("found subtitle(s): %o",t.map(i=>i.name)),t}},ro=(e,g)=>Bt(void 0,null,function*(){let r=yield g.read(e);return new Oa.default(new Blob([r])).getURL()}),no=(e,g)=>Bt(void 0,null,function*(){let r=new Blob([yield g.read(e)],{type:"text/vtt"});return URL.createObjectURL(r)}),Fa=(e,g)=>Bt(void 0,null,function*(){let r=new Map;for(let i of e){let o,n;if(typeof i=="string")if((n=g.getAbstractFileByPath(i))&&n instanceof Lr.TFile)o=n;else{console.warn("no subFile found for path: %s",i);continue}else o=i;o.extension==="srt"?r.set(o,yield ro(o,g)):r.set(o,yield no(o,g))}let t=[],p=[];for(let i of r.keys()){let o=i.basename.split(".").pop(),n=null,f=null;if(r.size>1){if(!o||!fr.validate(o))throw new Error("languageCode unable to parse, problem with getSubtitles()? ");n=fr.getNativeName(o),f=o}let h={kind:"captions",label:n!=null?n:"default",srcLang:f!=null?f:void 0,src:r.get(i)},m=createEl("track",{attr:{kind:"captions",label:n,srclang:f,src:r.get(i)}},u=>{navigator.language.substring(0,2)===o&&u.setAttr("default","")});p.push(m),t.push(h)}return{objUrls:[...r.values()],trackEls:p,tracks:t}}),yn=class extends Lr.MarkdownRenderChild{constructor(g,r,t){super(g);this.objectUrls=t!=null?t:[],this.player=r}unload(){this.objectUrls&&this.objectUrls.forEach(g=>URL.revokeObjectURL(g)),this.player.destroy()}};var $t;(function(t){t[t.youtube=0]="youtube",t[t.bili=1]="bili",t[t.vimeo=2]="vimeo"})($t||($t={}));var Xr=new Map([["audio",["mp3","wav","m4a","ogg","3gp","flac"]],["video",["mp4","ogv"]],["media",["webm"]]]),ao=e=>{let g=/\.[^/]+?$/,r,t;if(e instanceof URL)r=e.pathname,t=(0,En.parse)(e.search);else{let p=(0,xa.default)(e,!1);r=p.pathname,t=(0,En.parse)(p.query)}return g.test(r)?r:r==="/api"&&t.raw==="true"&&typeof t.path=="string"&&g.test(t.path)?t.path:null},_n=e=>{let g=null;if(e instanceof pr.TFile)g=e.extension;else{let t=ao(e);t&&(g=t.split(".").pop())}if(!g)return null;let r=null;for(let[t,p]of Xr)p.includes(g)&&(r=t);return r},nr=e=>Array.isArray(e.subtitles),Sr=e=>!nr(e)&&!ar(e),ar=e=>e.host!==void 0&&e.id!==void 0,vr=(...e)=>Bt(void 0,null,function*(){var p;let[g,r]=e;if(typeof g=="string")try{g=new URL(g)}catch(i){return null}let t=_n(g);if(t){if(g instanceof pr.TFile){r?r.startsWith("#")||(r="#"+r):r="";let o=La(g);return{type:t,filename:g.name,src:g.path,subtitles:o?o.map(n=>n.path):[],hash:r,updateTrackInfo:Tn,getSrcFile:Sn}}let i=(p=decodeURI(g.pathname).split("/").pop())!=null?p:"";return{type:t,filename:decodeURI(i),src:g,hash:g.hash}}else if(g instanceof pr.TFile)return null;switch(g.hostname){case"b23.tv":try{if(!pr.Platform.isDesktopApp)return null;let n=yield $n(g.pathname.split("/")[1]);g=new URL(n)}catch(n){return console.error(n),null}case"www.bilibili.com":if(g.pathname.startsWith("/video")){let n=g.pathname.replace("/video/",""),f;if(/^bv/i.test(n))f=`?bvid=${n}`;else if(/^av/i.test(n))n=n.substring(2),f=`?aid=${n}`;else return console.log(`invaild video id: ${n}`),null;let h=g.searchParams.get("p");return h&&(f+=`&page=${h}`),{host:1,id:n,src:g,iframe:new URL(`https://player.bilibili.com/player.html${f}&high_quality=1&danmaku=0`),hash:g.hash}}else return console.log("bilibili video url not supported or invalid"),null;break;case"youtube.com":case"www.youtube.com":case"youtu.be":if(g.pathname==="/watch"){let n=g.searchParams.get("v");return n?{host:0,id:n,iframe:new URL(`https://www.youtube.com/embed/${n}`),src:g,hash:g.hash}:(console.log(`invalid video id: ${g.toString()}`),null)}else if(g.host==="youtu.be")if(/^\/[^\/]+$/.test(g.pathname)){let n=g.pathname.substring(1);return{host:0,id:n,iframe:new URL(`https://www.youtube.com/embed/${n}`),src:g,hash:g.hash}}else return console.log(`invalid video id: ${g.toString()}`),null;else return console.log("youtube video url not supported or invalid"),null;break;case"vimeo.com":let i=g.pathname,o;if(o=i.match(/^\/(\d+)$/)){let n=o[1];return{host:2,id:n,iframe:new URL(`https://player.vimeo.com/video/${n}`),src:g,hash:g.hash}}else return console.log("vimeo video url not supported or invalid"),null;default:return null}}),Rr=(...e)=>{let[g,r]=e;if(nr(g)){if(!r)throw new Error("vault not provided");let{src:t,hash:p}=g,i=r.getAbstractFileByPath(t);if(i&&i instanceof pr.TFile){let o=r.getResourcePath(i);return new URL(o+p)}else throw new Error("no file found for path: "+t)}else{let{src:t}=g;return t.protocol==="file:"?new URL(t.href.replace(/^file:\/\/\//,"app://local/")):t}},jr=(e,g,r,t)=>Bt(void 0,null,function*(){if(g==="internal"){let p=e instanceof HTMLAnchorElement?e.dataset.href:e.getAttr("src");if(!p)return console.error("no linktext in internal embed: %o, escaping",e),null;let{subpath:i,path:o}=(0,pr.parseLinktext)(p),n=r.metadataCache.getFirstLinkpathDest(o,t.sourcePath);return n?vr(n,i):null}else{let p=e instanceof HTMLAnchorElement?e.href:e.getAttr("src");return p?vr(p):(console.info("fail to get embed src: %o, escaping",e),null)}});function Tn(e){return Bt(this,null,function*(){if(this.subtitles.length>0){let g=yield Fa(this.subtitles,e);return this.trackInfo=g,g}else return null})}function Sn(e){let g=e.getAbstractFileByPath(this.src);if(g&&g instanceof pr.TFile)return g;throw new Error("src file not found for path: "+this.src)}var ka=Jt(Pr());var io='Play',Ba=(e,g,r)=>Bt(void 0,null,function*(){let t=yield so(e),p=createDiv({cls:["placeholder","plyr plyr--full-ui plyr--video"]});return t&&(p.style.backgroundImage=`url("${t}")`),Or(p,g,16/9),p.createEl("button",{cls:"plyr__control plyr__control--overlaid",attr:{type:"button","data-plyr":"play","aria-label":"Play"}},i=>{i.innerHTML=io,i.onClickEvent(()=>Bt(void 0,null,function*(){return p.replaceWith(yield r())}))}),p}),so=e=>Bt(void 0,null,function*(){let{id:g}=e;switch(e.host){case $t.youtube:return`https://i.ytimg.com/vi/${g}/maxresdefault.jpg`;case $t.bili:return null;case $t.vimeo:return yield oo(e.src);default:(0,ka.default)(e.host)}}),oo=e=>Bt(void 0,null,function*(){let g=new URL("https://vimeo.com/api/oembed.json");return typeof e=="string"?g.searchParams.append("url",e):g.searchParams.append("url",e.href),fetch(g.href).then(r=>{if(r.ok)return r.json();throw new Error(r.statusText)}).then(r=>{var t;return(t=r.thumbnail_url)!=null?t:null}).catch(r=>(console.error(r),null))});(function(){function e(g,r,t){function p(n,f){if(!r[n]){if(!g[n]){var h=typeof require=="function"&&require;if(!f&&h)return h(n,!0);if(i)return i(n,!0);var m=new Error("Cannot find module '"+n+"'");throw m.code="MODULE_NOT_FOUND",m}var u=r[n]={exports:{}};g[n][0].call(u.exports,function(_){var C=g[n][1][_];return p(C||_)},u,u.exports,e,g,r,t)}return r[n].exports}for(var i=typeof require=="function"&&require,o=0;o>6),o.push(128|63&f)):f<65536?(o.push(224|f>>12),o.push(128|63&f>>6),o.push(128|63&f)):(o.push(240|f>>18),o.push(128|63&f>>12),o.push(128|63&f>>6),o.push(128|63&f))}return o},t.decode=function(i){for(var o=[],n=0;n>18)),C.push(i.charAt(63&R>>12)),C.push(i.charAt(63&R>>6)),C.push(i.charAt(63&R))}if(u.length-_==2){var R=(u[_]<<16)+(u[_+1]<<8);C.push(i.charAt(63&R>>18)),C.push(i.charAt(63&R>>12)),C.push(i.charAt(63&R>>6)),C.push("=")}else if(u.length-_==1){var R=u[_]<<16;C.push(i.charAt(63&R>>18)),C.push(i.charAt(63&R>>12)),C.push("==")}return C.join("")},n=function(){for(var m=[],u=0;u=W&&console.log(this.time+" ["+v+"] "+T)}},k=function(v){for(var T=[],W=0;Wn&&(C.log("ERROR","Too large cursor position "+this.pos),this.pos=n)},moveCursor:function(v){var T=this.pos+v;if(v>1)for(var W=this.pos+1;W=144&&this.backSpace();var T=i(v);if(this.pos>=n){C.log("ERROR","Cannot insert "+v.toString(16)+" ("+T+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(T,this.currPenState),this.moveCursor(1)},clearFromPos:function(v){var T;for(T=v;T0&&(v?W="["+T.join(" | ")+"]":W=T.join(` +`)),W},getTextAndFormat:function(){return this.rows}};var N=function(v,T){this.chNr=v,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new H,this.nonDisplayedMemory=new H,this.lastOutputScreen=new H,this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};N.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(v){this.outputFilter=v},setPAC:function(v){this.writeScreen.setPAC(v)},setBkgData:function(v){this.writeScreen.setBkgData(v)},setMode:function(v){v!==this.mode&&(this.mode=v,C.log("INFO","MODE="+v),this.mode=="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=v)},insertChars:function(v){for(var T=0;T=46,T.italics)T.foreground="white";else{var W=Math.floor(v/2)-16,O=["white","green","blue","cyan","red","yellow","magenta"];T.foreground=O[W]}C.log("INFO","MIDROW: "+JSON.stringify(T)),this.writeScreen.setPen(T)},outputDataUpdate:function(){var v=C.time;v!==null&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(v,this.displayedMemory),this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=v:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:v),this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))}};var A=function(v,T,W){this.field=v||1,this.outputs=[T,W],this.channels=[new N(1,T),new N(2,W)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};A.prototype={getHandler:function(v){return this.channels[v].getHandler()},setHandler:function(v,T){this.channels[v].setHandler(T)},addData:function(v,T){var W,O,B,L=!1;this.lastTime=v,C.setTime(v);for(var K=0;K=16&&O<=31&&O===this.lastCmdA&&B===this.lastCmdB){this.lastCmdA=null,this.lastCmdB=null,C.log("DEBUG","Repeated command ("+k([O,B])+") is dropped");continue}if(O===0&&B===0){this.dataCounters.padding+=2;continue}else C.log("DATA","["+k([T[K],T[K+1]])+"] -> ("+k([O,B])+")");if(W=this.parseCmd(O,B),W||(W=this.parseMidrow(O,B)),W||(W=this.parsePAC(O,B)),W||(W=this.parseBackgroundAttributes(O,B)),!W&&(L=this.parseChars(O,B),L))if(this.currChNr&&this.currChNr>=0){var x=this.channels[this.currChNr-1];x.insertChars(L)}else C.log("WARNING","No channel found yet. TEXT-MODE?");W?this.dataCounters.cmd+=2:L?this.dataCounters.char+=2:(this.dataCounters.other+=2,C.log("WARNING","Couldn't parse cleaned data "+k([O,B])+" orig: "+k([T[K],T[K+1]])))}},parseCmd:function(v,T){var W=null,O=(v===20||v===21||v===28||v===29)&&32<=T&&T<=47,B=(v===23||v===31)&&33<=T&&T<=35;if(!(O||B))return!1;v===20||v===21||v===23?W=1:W=2;var L=this.channels[W-1];return v===20||v===21||v===28||v===29?T===32?L.cc_RCL():T===33?L.cc_BS():T===34?L.cc_AOF():T===35?L.cc_AON():T===36?L.cc_DER():T===37?L.cc_RU(2):T===38?L.cc_RU(3):T===39?L.cc_RU(4):T===40?L.cc_FON():T===41?L.cc_RDC():T===42?L.cc_TR():T===43?L.cc_RTD():T===44?L.cc_EDM():T===45?L.cc_CR():T===46?L.cc_ENM():T===47&&L.cc_EOC():L.cc_TO(T-32),this.lastCmdA=v,this.lastCmdB=T,this.currChNr=W,!0},parseMidrow:function(v,T){var W=null;if((v===17||v===25)&&32<=T&&T<=47){if(v===17?W=1:W=2,W!==this.currChNr)return C.log("ERROR","Mismatch channel in midrow parsing"),!1;var O=this.channels[W-1];return O.insertChars([32]),O.cc_MIDROW(T),C.log("DEBUG","MIDROW ("+k([v,T])+")"),this.lastCmdA=v,this.lastCmdB=T,!0}return!1},parsePAC:function(v,T){var W=null,O=null,B=(17<=v&&v<=23||25<=v&&v<=31)&&64<=T&&T<=127,L=(v===16||v===24)&&64<=T&&T<=95;if(!(B||L))return!1;W=v<=23?1:2,64<=T&&T<=95?O=W===1?f[v]:m[v]:O=W===1?h[v]:u[v];var K=this.interpretPAC(O,T),x=this.channels[W-1];return x.setPAC(K),this.lastCmdA=v,this.lastCmdB=T,this.currChNr=W,!0},interpretPAC:function(v,T){var W=T,O={color:null,italics:!1,indent:null,underline:!1,row:v};return T>95?W=T-96:W=T-64,O.underline=(W&1)==1,W<=13?O.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(W/2)]:W<=15?(O.italics=!0,O.color="white"):O.indent=Math.floor((W-16)/2)*4,O},parseChars:function(v,T){var W=null,O=null,B=null,L=null;if(v>=25?(W=2,B=v-8):(W=1,B=v),17<=B&&B<=19){var K=T;B===17?K=T+80:B===18?K=T+112:K=T+144,C.log("INFO","Special char '"+i(K)+"' in channel "+W),O=[K],this.lastCmdA=v,this.lastCmdB=T}else 32<=v&&v<=127&&(O=T===0?[v]:[v,T],this.lastCmdA=null,this.lastCmdB=null);if(O){var x=k(O);C.log("DEBUG","Char codes = "+x.join(","))}return O},parseBackgroundAttributes:function(v,T){var W,O,B,L,K=(v===16||v===24)&&32<=T&&T<=47,x=(v===23||v===31)&&45<=T&&T<=47;return K||x?(W={},v===16||v===24?(O=Math.floor((T-32)/2),W.background=_[O],T%2==1&&(W.background=W.background+"_semi")):T===45?W.background="transparent":(W.foreground="black",T===47&&(W.underline=!0)),B=v<24?1:2,L=this.channels[B-1],L.setBkgData(W),this.lastCmdA=v,this.lastCmdB=T,!0):!1},reset:function(){for(var v=0;v/g,">").replace(/"/g,""").replace(/'/g,"'"):x}function _(x){return x.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function C(x,U,Y,oe){for(var ue=0;ue0&&C(p.arrayAccessFormPaths,x,U,Y)&&(x[U]=[x[U]])}function R(x){var U=x.split(/[-T:+Z]/g),Y=new Date(U[0],U[1]-1,U[2]),oe=U[5].split(".");if(Y.setHours(U[3],U[4],oe[0]),oe.length>1&&Y.setMilliseconds(oe[1]),U[6]&&U[7]){var ue=U[6]*60+Number(U[7]),re=/\d\d-\d\d:\d\d$/.test(x)?"-":"+";ue=0+(re=="-"?-1*ue:ue),Y.setMinutes(Y.getMinutes()-ue-Y.getTimezoneOffset())}else x.indexOf("Z",x.length-1)!==-1&&(Y=new Date(Date.UTC(Y.getFullYear(),Y.getMonth(),Y.getDate(),Y.getHours(),Y.getMinutes(),Y.getSeconds(),Y.getMilliseconds())));return Y}function P(x,U,Y){if(p.datetimeAccessFormPaths.length>0){var oe=Y.split(".#")[0];return C(p.datetimeAccessFormPaths,x,U,oe)?R(x):x}else return x}function w(x,U,Y,oe){return U==n.ELEMENT_NODE&&p.xmlElementsFilter.length>0?C(p.xmlElementsFilter,x,Y,oe):!0}function H(x,U){if(x.nodeType==n.DOCUMENT_NODE){for(var Y=new Object,oe=x.childNodes,ue=0;ue1&&Y.__text!=null&&p.skipEmptyTextNodesForObj&&(p.stripWhitespaces&&Y.__text==""||Y.__text.trim()=="")&&delete Y.__text,delete Y.__cnt,p.enableToStringFunc&&(Y.__text!=null||Y.__cdata!=null)&&(Y.toString=function(){return(this.__text!=null?this.__text:"")+(this.__cdata!=null?this.__cdata:"")}),Y}else if(x.nodeType==n.TEXT_NODE||x.nodeType==n.CDATA_SECTION_NODE)return x.nodeValue}function N(x,U,Y,oe){var ue="<"+(x!=null&&x.__prefix!=null?x.__prefix+":":"")+U;if(Y!=null)for(var re=0;re"}function M(x,U){return x.indexOf(U,x.length-U.length)!==-1}function I(x,U){return!!(p.arrayAccessForm=="property"&&M(U.toString(),"_asArray")||U.toString().indexOf(p.attributePrefix)==0||U.toString().indexOf("__")==0||x[U]instanceof Function)}function D(x){var U=0;if(x instanceof Object)for(var Y in x)I(x,Y)||U++;return U}function v(x,U,Y){return p.jsonPropertiesFilter.length==0||Y==""||C(p.jsonPropertiesFilter,x,U,Y)}function T(x){var U=[];if(x instanceof Object)for(var Y in x)Y.toString().indexOf("__")==-1&&Y.toString().indexOf(p.attributePrefix)==0&&U.push(Y);return U}function W(x){var U="";return x.__cdata!=null&&(U+=""),x.__text!=null&&(p.escapeMode?U+=u(x.__text):U+=x.__text),U}function O(x){var U="";return x instanceof Object?U+=W(x):x!=null&&(p.escapeMode?U+=u(x):U+=x),U}function B(x,U){return x===""?U:x+"."+U}function L(x,U,Y,oe){var ue="";if(x.length==0)ue+=N(x,U,Y,!0);else for(var re=0;re0){for(var ue in x)if(!(I(x,ue)||U!=""&&!v(x,ue,B(U,ue)))){var re=x[ue],ve=T(re);if(re==null||re==null)Y+=N(re,ue,ve,!0);else if(re instanceof Object)if(re instanceof Array)Y+=L(re,ue,ve,U);else if(re instanceof Date)Y+=N(re,ue,ve,!1),Y+=re.toISOString(),Y+=A(re,ue);else{var ce=D(re);ce>0||re.__text!=null||re.__cdata!=null?(Y+=N(re,ue,ve,!1),Y+=K(re,B(U,ue)),Y+=A(re,ue)):Y+=N(re,ue,ve,!0)}else Y+=N(re,ue,ve,!1),Y+=O(re),Y+=A(re,ue)}}return Y+=O(x),Y}this.parseXmlString=function(x){var U=window.ActiveXObject||"ActiveXObject"in window;if(x===void 0)return null;var Y;if(window.DOMParser){var oe=new window.DOMParser,ue=null;try{Y=oe.parseFromString(x,"text/xml"),Y.getElementsByTagNameNS("*","parsererror").length>0&&(Y=null)}catch(re){Y=null}}else x.indexOf("")+2)),Y=new ActiveXObject("Microsoft.XMLDOM"),Y.async="false",Y.loadXML(x);return Y},this.asArray=function(x){return x===void 0||x==null?[]:x instanceof Array?x:[x]},this.toXmlDateTime=function(x){return x instanceof Date?x.toISOString():typeof x=="number"?new Date(x).toISOString():null},this.asDateTime=function(x){return typeof x=="string"?R(x):x},this.xml2json=function(x){return H(x)},this.xml_str2json=function(x){var U=this.parseXmlString(x);return U!=null?this.xml2json(U):null},this.json2xml_str=function(x){return K(x,"")},this.json2xml=function(x){var U=this.json2xml_str(x);return this.parseXmlString(U)},this.getVersion=function(){return i}}r.default=t,g.exports=r.default},{}],4:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(k){return k&&k.__esModule?k:{default:k}}var p=e(5),i=e(220),o=e(129),n=t(o),f=e(166),h=t(f),m=e(105),u=t(m),_=e(45),C=t(_);dashjs.Protection=h.default,dashjs.MetricsReporting=n.default,dashjs.MediaPlayerFactory=u.default,dashjs.Debug=C.default,dashjs.supportsMediaSource=i.supportsMediaSource,r.default=dashjs,r.MediaPlayer=p.MediaPlayer,r.Protection=h.default,r.MetricsReporting=n.default,r.MediaPlayerFactory=u.default,r.Debug=C.default,r.supportsMediaSource=i.supportsMediaSource},{"105":105,"129":129,"166":166,"220":220,"45":45,"5":5}],5:[function(e,g,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function p(k){return k&&k.__esModule?k:{default:k}}var i=e(103),o=p(i),n=e(47),f=p(n),h=e(45),m=p(h),u=e(50),_=typeof window!="undefined"&&window||t,C=_.dashjs;C||(C=_.dashjs={}),C.MediaPlayer=o.default,C.FactoryMaker=f.default,C.Debug=m.default,C.Version=(0,u.getVersionString)(),r.default=C,r.MediaPlayer=o.default,r.FactoryMaker=f.default,r.Debug=m.default}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"103":103,"45":45,"47":47,"50":50}],6:[function(e,g,r){"use strict";r.byteLength=m,r.toByteArray=_,r.fromByteArray=R;for(var t=[],p=[],i=typeof Uint8Array!="undefined"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,f=o.length;n0)throw new Error("Invalid string. Length must be a multiple of 4");var H=P.indexOf("=");H===-1&&(H=w);var N=H===w?0:4-H%4;return[H,N]}function m(P){var w=h(P),H=w[0],N=w[1];return(H+N)*3/4-N}function u(P,w,H){return(w+H)*3/4-H}function _(P){for(var w,H=h(P),N=H[0],A=H[1],M=new i(u(P,N,A)),I=0,D=A>0?N-4:N,v=0;v>16&255,M[I++]=w>>8&255,M[I++]=w&255;return A===2&&(w=p[P.charCodeAt(v)]<<2|p[P.charCodeAt(v+1)]>>4,M[I++]=w&255),A===1&&(w=p[P.charCodeAt(v)]<<10|p[P.charCodeAt(v+1)]<<4|p[P.charCodeAt(v+2)]>>2,M[I++]=w>>8&255,M[I++]=w&255),M}function C(P){return t[P>>18&63]+t[P>>12&63]+t[P>>6&63]+t[P&63]}function k(P,w,H){for(var N,A=[],M=w;MD?D:I+M));return N===1?(w=P[H-1],A.push(t[w>>2]+t[w<<4&63]+"==")):N===2&&(w=(P[H-2]<<8)+P[H-1],A.push(t[w>>10]+t[w>>4&63]+t[w<<2&63]+"=")),A.join("")}},{}],7:[function(e,g,r){},{}],8:[function(e,g,r){"use strict";var t=e(6),p=e(13);r.Buffer=f,r.SlowBuffer=H,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,f.TYPED_ARRAY_SUPPORT=o(),!f.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 o(){try{var l=new Uint8Array(1);return l.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},l.foo()===42}catch(d){return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(!!f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(!!f.isBuffer(this))return this.byteOffset}});function n(l){if(l>i)throw new RangeError('The value "'+l+'" is invalid for option "size"');var d=new Uint8Array(l);return d.__proto__=f.prototype,d}function f(l,d,y){if(typeof l=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(l)}return h(l,d,y)}typeof Symbol!="undefined"&&Symbol.species!=null&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192;function h(l,d,y){if(typeof l=="string")return C(l,d);if(ArrayBuffer.isView(l))return k(l);if(l==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(E(l,ArrayBuffer)||l&&E(l.buffer,ArrayBuffer))return R(l,d,y);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var V=l.valueOf&&l.valueOf();if(V!=null&&V!==l)return f.from(V,d,y);var te=P(l);if(te)return te;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return f.from(l[Symbol.toPrimitive]("string"),d,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l)}f.from=function(l,d,y){return h(l,d,y)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array;function m(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function u(l,d,y){return m(l),l<=0?n(l):d!==void 0?typeof y=="string"?n(l).fill(d,y):n(l).fill(d):n(l)}f.alloc=function(l,d,y){return u(l,d,y)};function _(l){return m(l),n(l<0?0:w(l)|0)}f.allocUnsafe=function(l){return _(l)},f.allocUnsafeSlow=function(l){return _(l)};function C(l,d){if((typeof d!="string"||d==="")&&(d="utf8"),!f.isEncoding(d))throw new TypeError("Unknown encoding: "+d);var y=N(l,d)|0,V=n(y),te=V.write(l,d);return te!==y&&(V=V.slice(0,te)),V}function k(l){for(var d=l.length<0?0:w(l.length)|0,y=n(d),V=0;V=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return l|0}function H(l){return+l!=l&&(l=0),f.alloc(+l)}f.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==f.prototype},f.compare=function(d,y){if(E(d,Uint8Array)&&(d=f.from(d,d.offset,d.byteLength)),E(y,Uint8Array)&&(y=f.from(y,y.offset,y.byteLength)),!f.isBuffer(d)||!f.isBuffer(y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===y)return 0;for(var V=d.length,te=y.length,$=0,ae=Math.min(V,te);$2&&arguments[2]===!0;if(!V&&y===0)return 0;for(var te=!1;;)switch(d){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return X(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return G(l).length;default:if(te)return V?-1:X(l).length;d=(""+d).toLowerCase(),te=!0}}f.byteLength=N;function A(l,d,y){var V=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,d>>>=0,y<=d))return"";for(l||(l="utf8");;)switch(l){case"hex":return re(this,d,y);case"utf8":case"utf-8":return x(this,d,y);case"ascii":return oe(this,d,y);case"latin1":case"binary":return ue(this,d,y);case"base64":return K(this,d,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,d,y);default:if(V)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),V=!0}}f.prototype._isBuffer=!0;function M(l,d,y){var V=l[d];l[d]=l[y],l[y]=V}f.prototype.swap16=function(){var d=this.length;if(d%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var y=0;yy&&(d+=" ... "),""},f.prototype.compare=function(d,y,V,te,$){if(E(d,Uint8Array)&&(d=f.from(d,d.offset,d.byteLength)),!f.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(y===void 0&&(y=0),V===void 0&&(V=d?d.length:0),te===void 0&&(te=0),$===void 0&&($=this.length),y<0||V>d.length||te<0||$>this.length)throw new RangeError("out of range index");if(te>=$&&y>=V)return 0;if(te>=$)return-1;if(y>=V)return 1;if(y>>>=0,V>>>=0,te>>>=0,$>>>=0,this===d)return 0;for(var ae=$-te,ne=V-y,Se=Math.min(ae,ne),Ie=this.slice(te,$),he=d.slice(y,V),ye=0;ye2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,b(y)&&(y=te?0:l.length-1),y<0&&(y=l.length+y),y>=l.length){if(te)return-1;y=l.length-1}else if(y<0)if(te)y=0;else return-1;if(typeof d=="string"&&(d=f.from(d,V)),f.isBuffer(d))return d.length===0?-1:D(l,d,y,V,te);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?te?Uint8Array.prototype.indexOf.call(l,d,y):Uint8Array.prototype.lastIndexOf.call(l,d,y):D(l,[d],y,V,te);throw new TypeError("val must be string, number or Buffer")}function D(l,d,y,V,te){var $=1,ae=l.length,ne=d.length;if(V!==void 0&&(V=String(V).toLowerCase(),V==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(l.length<2||d.length<2)return-1;$=2,ae/=2,ne/=2,y/=2}function Se(pe,De){return $===1?pe[De]:pe.readUInt16BE(De*$)}var Ie;if(te){var he=-1;for(Ie=y;Ieae&&(y=ae-ne),Ie=y;Ie>=0;Ie--){for(var ye=!0,_e=0;_ete&&(V=te)):V=te;var $=d.length;V>$/2&&(V=$/2);for(var ae=0;ae>>0,isFinite(V)?(V=V>>>0,te===void 0&&(te="utf8")):(te=V,V=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var $=this.length-y;if((V===void 0||V>$)&&(V=$),d.length>0&&(V<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");for(var ae=!1;;)switch(te){case"hex":return v(this,d,y,V);case"utf8":case"utf-8":return T(this,d,y,V);case"ascii":return W(this,d,y,V);case"latin1":case"binary":return O(this,d,y,V);case"base64":return B(this,d,y,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,d,y,V);default:if(ae)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),ae=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function K(l,d,y){return d===0&&y===l.length?t.fromByteArray(l):t.fromByteArray(l.slice(d,y))}function x(l,d,y){y=Math.min(l.length,y);for(var V=[],te=d;te239?4:$>223?3:$>191?2:1;if(te+ne<=y){var Se,Ie,he,ye;switch(ne){case 1:$<128&&(ae=$);break;case 2:Se=l[te+1],(Se&192)==128&&(ye=($&31)<<6|Se&63,ye>127&&(ae=ye));break;case 3:Se=l[te+1],Ie=l[te+2],(Se&192)==128&&(Ie&192)==128&&(ye=($&15)<<12|(Se&63)<<6|Ie&63,ye>2047&&(ye<55296||ye>57343)&&(ae=ye));break;case 4:Se=l[te+1],Ie=l[te+2],he=l[te+3],(Se&192)==128&&(Ie&192)==128&&(he&192)==128&&(ye=($&15)<<18|(Se&63)<<12|(Ie&63)<<6|he&63,ye>65535&&ye<1114112&&(ae=ye))}}ae===null?(ae=65533,ne=1):ae>65535&&(ae-=65536,V.push(ae>>>10&1023|55296),ae=56320|ae&1023),V.push(ae),te+=ne}return Y(V)}var U=4096;function Y(l){var d=l.length;if(d<=U)return String.fromCharCode.apply(String,l);for(var y="",V=0;VV)&&(y=V);for(var te="",$=d;$V&&(d=V),y<0?(y+=V,y<0&&(y=0)):y>V&&(y=V),yy)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(d,y,V){d=d>>>0,y=y>>>0,V||ce(d,y,this.length);for(var te=this[d],$=1,ae=0;++ae>>0,y=y>>>0,V||ce(d,y,this.length);for(var te=this[d+--y],$=1;y>0&&($*=256);)te+=this[d+--y]*$;return te},f.prototype.readUInt8=function(d,y){return d=d>>>0,y||ce(d,1,this.length),this[d]},f.prototype.readUInt16LE=function(d,y){return d=d>>>0,y||ce(d,2,this.length),this[d]|this[d+1]<<8},f.prototype.readUInt16BE=function(d,y){return d=d>>>0,y||ce(d,2,this.length),this[d]<<8|this[d+1]},f.prototype.readUInt32LE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},f.prototype.readUInt32BE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},f.prototype.readIntLE=function(d,y,V){d=d>>>0,y=y>>>0,V||ce(d,y,this.length);for(var te=this[d],$=1,ae=0;++ae=$&&(te-=Math.pow(2,8*y)),te},f.prototype.readIntBE=function(d,y,V){d=d>>>0,y=y>>>0,V||ce(d,y,this.length);for(var te=y,$=1,ae=this[d+--te];te>0&&($*=256);)ae+=this[d+--te]*$;return $*=128,ae>=$&&(ae-=Math.pow(2,8*y)),ae},f.prototype.readInt8=function(d,y){return d=d>>>0,y||ce(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},f.prototype.readInt16LE=function(d,y){d=d>>>0,y||ce(d,2,this.length);var V=this[d]|this[d+1]<<8;return V&32768?V|4294901760:V},f.prototype.readInt16BE=function(d,y){d=d>>>0,y||ce(d,2,this.length);var V=this[d+1]|this[d]<<8;return V&32768?V|4294901760:V},f.prototype.readInt32LE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},f.prototype.readInt32BE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},f.prototype.readFloatLE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),p.read(this,d,!0,23,4)},f.prototype.readFloatBE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),p.read(this,d,!1,23,4)},f.prototype.readDoubleLE=function(d,y){return d=d>>>0,y||ce(d,8,this.length),p.read(this,d,!0,52,8)},f.prototype.readDoubleBE=function(d,y){return d=d>>>0,y||ce(d,8,this.length),p.read(this,d,!1,52,8)};function se(l,d,y,V,te,$){if(!f.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>te||d<$)throw new RangeError('"value" argument is out of bounds');if(y+V>l.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(d,y,V,te){if(d=+d,y=y>>>0,V=V>>>0,!te){var $=Math.pow(2,8*V)-1;se(this,d,y,V,$,0)}var ae=1,ne=0;for(this[y]=d&255;++ne>>0,V=V>>>0,!te){var $=Math.pow(2,8*V)-1;se(this,d,y,V,$,0)}var ae=V-1,ne=1;for(this[y+ae]=d&255;--ae>=0&&(ne*=256);)this[y+ae]=d/ne&255;return y+V},f.prototype.writeUInt8=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,1,255,0),this[y]=d&255,y+1},f.prototype.writeUInt16LE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,2,65535,0),this[y]=d&255,this[y+1]=d>>>8,y+2},f.prototype.writeUInt16BE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,2,65535,0),this[y]=d>>>8,this[y+1]=d&255,y+2},f.prototype.writeUInt32LE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,4,4294967295,0),this[y+3]=d>>>24,this[y+2]=d>>>16,this[y+1]=d>>>8,this[y]=d&255,y+4},f.prototype.writeUInt32BE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,4,4294967295,0),this[y]=d>>>24,this[y+1]=d>>>16,this[y+2]=d>>>8,this[y+3]=d&255,y+4},f.prototype.writeIntLE=function(d,y,V,te){if(d=+d,y=y>>>0,!te){var $=Math.pow(2,8*V-1);se(this,d,y,V,$-1,-$)}var ae=0,ne=1,Se=0;for(this[y]=d&255;++ae>0)-Se&255;return y+V},f.prototype.writeIntBE=function(d,y,V,te){if(d=+d,y=y>>>0,!te){var $=Math.pow(2,8*V-1);se(this,d,y,V,$-1,-$)}var ae=V-1,ne=1,Se=0;for(this[y+ae]=d&255;--ae>=0&&(ne*=256);)d<0&&Se===0&&this[y+ae+1]!==0&&(Se=1),this[y+ae]=(d/ne>>0)-Se&255;return y+V},f.prototype.writeInt8=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,1,127,-128),d<0&&(d=255+d+1),this[y]=d&255,y+1},f.prototype.writeInt16LE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,2,32767,-32768),this[y]=d&255,this[y+1]=d>>>8,y+2},f.prototype.writeInt16BE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,2,32767,-32768),this[y]=d>>>8,this[y+1]=d&255,y+2},f.prototype.writeInt32LE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,4,2147483647,-2147483648),this[y]=d&255,this[y+1]=d>>>8,this[y+2]=d>>>16,this[y+3]=d>>>24,y+4},f.prototype.writeInt32BE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[y]=d>>>24,this[y+1]=d>>>16,this[y+2]=d>>>8,this[y+3]=d&255,y+4};function J(l,d,y,V,te,$){if(y+V>l.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function ee(l,d,y,V,te){return d=+d,y=y>>>0,te||J(l,d,y,4,34028234663852886e22,-34028234663852886e22),p.write(l,d,y,V,23,4),y+4}f.prototype.writeFloatLE=function(d,y,V){return ee(this,d,y,!0,V)},f.prototype.writeFloatBE=function(d,y,V){return ee(this,d,y,!1,V)};function ie(l,d,y,V,te){return d=+d,y=y>>>0,te||J(l,d,y,8,17976931348623157e292,-17976931348623157e292),p.write(l,d,y,V,52,8),y+8}f.prototype.writeDoubleLE=function(d,y,V){return ie(this,d,y,!0,V)},f.prototype.writeDoubleBE=function(d,y,V){return ie(this,d,y,!1,V)},f.prototype.copy=function(d,y,V,te){if(!f.isBuffer(d))throw new TypeError("argument should be a Buffer");if(V||(V=0),!te&&te!==0&&(te=this.length),y>=d.length&&(y=d.length),y||(y=0),te>0&&te=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),d.length-y=0;--ae)d[ae+y]=this[ae+V];else Uint8Array.prototype.set.call(d,this.subarray(V,te),y);return $},f.prototype.fill=function(d,y,V,te){if(typeof d=="string"){if(typeof y=="string"?(te=y,y=0,V=this.length):typeof V=="string"&&(te=V,V=this.length),te!==void 0&&typeof te!="string")throw new TypeError("encoding must be a string");if(typeof te=="string"&&!f.isEncoding(te))throw new TypeError("Unknown encoding: "+te);if(d.length===1){var $=d.charCodeAt(0);(te==="utf8"&&$<128||te==="latin1")&&(d=$)}}else typeof d=="number"&&(d=d&255);if(y<0||this.length>>0,V=V===void 0?this.length:V>>>0,d||(d=0);var ae;if(typeof d=="number")for(ae=y;ae55295&&y<57344){if(!te){if(y>56319){(d-=3)>-1&&$.push(239,191,189);continue}else if(ae+1===V){(d-=3)>-1&&$.push(239,191,189);continue}te=y;continue}if(y<56320){(d-=3)>-1&&$.push(239,191,189),te=y;continue}y=(te-55296<<10|y-56320)+65536}else te&&(d-=3)>-1&&$.push(239,191,189);if(te=null,y<128){if((d-=1)<0)break;$.push(y)}else if(y<2048){if((d-=2)<0)break;$.push(y>>6|192,y&63|128)}else if(y<65536){if((d-=3)<0)break;$.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((d-=4)<0)break;$.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return $}function j(l){for(var d=[],y=0;y>8,te=y%256,$.push(te),$.push(V);return $}function G(l){return t.toByteArray(de(l))}function c(l,d,y,V){for(var te=0;te=d.length||te>=l.length);++te)d[te+y]=l[te];return te}function E(l,d){return l instanceof d||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===d.name}function b(l){return l!==l}},{"13":13,"6":6}],9:[function(e,g,r){var t={};t.parseBuffer=function(o){return new p(o).parse()},t.addBoxProcessor=function(o,n){typeof o!="string"||typeof n!="function"||(i.prototype._boxProcessors[o]=n)},t.createFile=function(){return new p},t.createBox=function(o,n,f){var h=i.create(o);return n&&n.append(h,f),h},t.createFullBox=function(o,n,f){var h=t.createBox(o,n,f);return h.version=0,h.flags=0,h},t.Utils={},t.Utils.dataViewToString=function(o,n){var f=n||"utf-8";if(typeof TextDecoder!="undefined")return new TextDecoder(f).decode(o);var h=[],m=0;if(f==="utf-8")for(;m>6),n.push(128|63&h)):h<65536?(n.push(224|h>>12),n.push(128|63&h>>6),n.push(128|63&h)):(n.push(240|h>>18),n.push(128|63&h>>12),n.push(128|63&h>>6),n.push(128|63&h))}return n},t.Utils.appendBox=function(o,n,f){if(n._offset=o._cursor.offset,n._root=o._root?o._root:o,n._raw=o._raw,n._parent=o,f!==-1){if(f==null){o.boxes.push(n);return}var h=-1,m;if(typeof f=="number")h=f;else{if(typeof f=="string")m=f;else if(typeof f=="object"&&f.type)m=f.type;else{o.boxes.push(n);return}for(var u=0;u>3,n},i.prototype._readUint=function(o){var n=null,f=this._cursor.offset-this._raw.byteOffset,h,m;switch(o){case 8:n=this._raw.getUint8(f);break;case 16:n=this._raw.getUint16(f);break;case 24:h=this._raw.getUint16(f),m=this._raw.getUint8(f+2),n=(h<<8)+m;break;case 32:n=this._raw.getUint32(f);break;case 64:h=this._raw.getUint32(f),m=this._raw.getUint32(f+4),n=h*Math.pow(2,32)+m;break}return this._cursor.offset+=o>>3,n},i.prototype._readString=function(o){for(var n="",f=0;f0?o:this._raw.byteLength-(this._cursor.offset-this._offset);if(n>0){var f=new Uint8Array(this._raw.buffer,this._cursor.offset,n);return this._cursor.offset+=n,f}else return null},i.prototype._readUTF8String=function(){var o=this._raw.byteLength-(this._cursor.offset-this._offset),n=null;return o>0&&(n=new DataView(this._raw.buffer,this._cursor.offset,o),this._cursor.offset+=o),n&&t.Utils.dataViewToString(n)},i.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength){this._root._incomplete=!0;return}switch(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset+8);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1?this._parseContainerBox():this._data=this._readData())},i.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},i.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset>3}else this.size+=o>>3},i.prototype._writeUint=function(o,n){if(this._rawo){var f=this._cursor.offset-this._rawo.byteOffset,h,m;switch(o){case 8:this._rawo.setUint8(f,n);break;case 16:this._rawo.setUint16(f,n);break;case 24:h=(n&16776960)>>8,m=n&255,this._rawo.setUint16(f,h),this._rawo.setUint8(f+2,m);break;case 32:this._rawo.setUint32(f,n);break;case 64:h=Math.floor(n/Math.pow(2,32)),m=n-h*Math.pow(2,32),this._rawo.setUint32(f,h),this._rawo.setUint32(f+4,m);break}this._cursor.offset+=o>>3}else this.size+=o>>3},i.prototype._writeString=function(o,n){for(var f=0;f>10&31)+96,(this.language>>5&31)+96,(this.language&31)+96)),this._procField("pre_defined","uint",16)},i.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},i.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},i.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},i.prototype._boxProcessors.mp4a=i.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},i.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},i.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},i.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},i.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),this.flags&1&&this._procField("scheme_uri","string",-1)},i.prototype._boxProcessors.sdtp=function(){this._procFullBox();var o=-1;this._parsing&&(o=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",o,"uint",8)},i.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",this.version==1?64:32),this._procField("first_offset","uint",this.version==1?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(o){this._parsing||(o.reference=(o.reference_type&1)<<31,o.reference|=o.referenced_size&2147483647,o.sap=(o.starts_with_SAP&1)<<31,o.sap|=(o.SAP_type&3)<<28,o.sap|=o.SAP_delta_time&268435455),this._procEntryField(o,"reference","uint",32),this._procEntryField(o,"subsegment_duration","uint",32),this._procEntryField(o,"sap","uint",32),this._parsing&&(o.reference_type=o.reference>>31&1,o.referenced_size=o.reference&2147483647,o.starts_with_SAP=o.sap>>31&1,o.SAP_type=o.sap>>28&7,o.SAP_delta_time=o.sap&268435455)})},i.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},i.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(o){this._procEntryField(o,"ranges_count","uint",32),this._procSubEntries(o,"ranges",o.ranges_count,function(n){this._procEntryField(n,"level","uint",8),this._procEntryField(n,"range_size","uint",24)})})},i.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(o){this._procEntryField(o,"sample_delta","uint",32),this._procEntryField(o,"subsample_count","uint",16),this._procSubEntries(o,"subsamples",o.subsample_count,function(n){this._procEntryField(n,"subsample_size","uint",this.version===1?32:16),this._procEntryField(n,"subsample_priority","uint",8),this._procEntryField(n,"discardable","uint",8),this._procEntryField(n,"codec_specific_parameters","uint",32)})})},i.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},i.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},i.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),this.flags&1&&this._procField("base_data_offset","uint",64),this.flags&2&&this._procField("sample_description_offset","uint",32),this.flags&8&&this._procField("default_sample_duration","uint",32),this.flags&16&&this._procField("default_sample_size","uint",32),this.flags&32&&this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(this.length_size_of_traf_num&48)<<4,this.reserved|=(this.length_size_of_trun_num&12)<<2,this.reserved|=this.length_size_of_sample_num&3),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(this.reserved&48)>>4,this.length_size_of_trun_num=(this.reserved&12)>>2,this.length_size_of_sample_num=this.reserved&3),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(o){this._procEntryField(o,"time","uint",this.version===1?64:32),this._procEntryField(o,"moof_offset","uint",this.version===1?64:32),this._procEntryField(o,"traf_number","uint",(this.length_size_of_traf_num+1)*8),this._procEntryField(o,"trun_number","uint",(this.length_size_of_trun_num+1)*8),this._procEntryField(o,"sample_number","uint",(this.length_size_of_sample_num+1)*8)})},i.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},i.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),this.flags&1&&this._procField("data_offset","int",32),this.flags&4&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(o){this.flags&256&&this._procEntryField(o,"sample_duration","uint",32),this.flags&512&&this._procEntryField(o,"sample_size","uint",32),this.flags&1024&&this._procEntryField(o,"sample_flags","uint",32),this.flags&2048&&this._procEntryField(o,"sample_composition_time_offset",this.version===1?"int":"uint",32)})},i.prototype._boxProcessors["url "]=i.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},i.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},i.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},i.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},i.prototype._boxProcessors.vtte=function(){}},{}],10:[function(e,g,r){(function(t){function p(N){return Array.isArray?Array.isArray(N):H(N)==="[object Array]"}r.isArray=p;function i(N){return typeof N=="boolean"}r.isBoolean=i;function o(N){return N===null}r.isNull=o;function n(N){return N==null}r.isNullOrUndefined=n;function f(N){return typeof N=="number"}r.isNumber=f;function h(N){return typeof N=="string"}r.isString=h;function m(N){return typeof N=="symbol"}r.isSymbol=m;function u(N){return N===void 0}r.isUndefined=u;function _(N){return H(N)==="[object RegExp]"}r.isRegExp=_;function C(N){return typeof N=="object"&&N!==null}r.isObject=C;function k(N){return H(N)==="[object Date]"}r.isDate=k;function R(N){return H(N)==="[object Error]"||N instanceof Error}r.isError=R;function P(N){return typeof N=="function"}r.isFunction=P;function w(N){return N===null||typeof N=="boolean"||typeof N=="number"||typeof N=="string"||typeof N=="symbol"||typeof N=="undefined"}r.isPrimitive=w,r.isBuffer=t.isBuffer;function H(N){return Object.prototype.toString.call(N)}}).call(this,{isBuffer:e(22)})},{"22":22}],11:[function(e,g,r){var t=Object.create||v,p=Object.keys||T,i=Function.prototype.bind||W;function o(){(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events"))&&(this._events=t(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}g.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var n=10,f;try{var h={};Object.defineProperty&&Object.defineProperty(h,"x",{value:0}),f=h.x===0}catch(O){f=!1}f?Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(O){if(typeof O!="number"||O<0||O!==O)throw new TypeError('"defaultMaxListeners" must be a positive number');n=O}}):o.defaultMaxListeners=n,o.prototype.setMaxListeners=function(B){if(typeof B!="number"||B<0||isNaN(B))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=B,this};function m(O){return O._maxListeners===void 0?o.defaultMaxListeners:O._maxListeners}o.prototype.getMaxListeners=function(){return m(this)};function u(O,B,L){if(B)O.call(L);else for(var K=O.length,x=I(O,K),U=0;U1&&(L=arguments[1]),L instanceof Error)throw L;var re=new Error('Unhandled "error" event. ('+L+")");throw re.context=L,re;return!1}if(K=oe[B],!K)return!1;var ve=typeof K=="function";switch(x=arguments.length,x){case 1:u(K,ve,this);break;case 2:_(K,ve,this,arguments[1]);break;case 3:C(K,ve,this,arguments[1],arguments[2]);break;case 4:k(K,ve,this,arguments[1],arguments[2],arguments[3]);break;default:for(U=new Array(x-1),Y=1;Y0&&Y.length>x)){Y.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+Y.length+' "'+String(B)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');oe.name="MaxListenersExceededWarning",oe.emitter=O,oe.type=B,oe.count=Y.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",oe.name,oe.message)}return O}o.prototype.addListener=function(B,L){return P(this,B,L,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(B,L){return P(this,B,L,!0)};function w(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var O=new Array(arguments.length),B=0;B=0;Y--)if(K[Y]===L||K[Y].listener===L){oe=K[Y].listener,U=Y;break}if(U<0)return this;U===0?K.shift():M(K,U),K.length===1&&(x[B]=K[0]),x.removeListener&&this.emit("removeListener",B,oe||L)}return this},o.prototype.removeAllListeners=function(B){var L,K,x;if(K=this._events,!K)return this;if(!K.removeListener)return arguments.length===0?(this._events=t(null),this._eventsCount=0):K[B]&&(--this._eventsCount==0?this._events=t(null):delete K[B]),this;if(arguments.length===0){var U=p(K),Y;for(x=0;x=0;x--)this.removeListener(B,L[x]);return this};function N(O,B,L){var K=O._events;if(!K)return[];var x=K[B];return x?typeof x=="function"?L?[x.listener||x]:[x]:L?D(x):I(x,x.length):[]}o.prototype.listeners=function(B){return N(this,B,!0)},o.prototype.rawListeners=function(B){return N(this,B,!1)},o.listenerCount=function(O,B){return typeof O.listenerCount=="function"?O.listenerCount(B):A.call(O,B)},o.prototype.listenerCount=A;function A(O){var B=this._events;if(B){var L=B[O];if(typeof L=="function")return 1;if(L)return L.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function M(O,B){for(var L=B,K=L+1,x=O.length;K>1,C=-7,k=i?n-1:0,R=i?-1:1,P=t[p+k];for(k+=R,f=P&(1<<-C)-1,P>>=-C,C+=m;C>0;f=f*256+t[p+k],k+=R,C-=8);for(h=f&(1<<-C)-1,f>>=-C,C+=o;C>0;h=h*256+t[p+k],k+=R,C-=8);if(f===0)f=1-_;else{if(f===u)return h?NaN:(P?-1:1)*(1/0);h=h+Math.pow(2,o),f=f-_}return(P?-1:1)*h*Math.pow(2,f-o)},r.write=function(t,p,i,o,n,f){var h,m,u,_=f*8-n-1,C=(1<<_)-1,k=C>>1,R=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=o?0:f-1,w=o?1:-1,H=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(m=isNaN(p)?1:0,h=C):(h=Math.floor(Math.log(p)/Math.LN2),p*(u=Math.pow(2,-h))<1&&(h--,u*=2),h+k>=1?p+=R/u:p+=R*Math.pow(2,1-k),p*u>=2&&(h++,u/=2),h+k>=C?(m=0,h=C):h+k>=1?(m=(p*u-1)*Math.pow(2,n),h=h+k):(m=p*Math.pow(2,k-1)*Math.pow(2,n),h=0));n>=8;t[i+P]=m&255,P+=w,m/=256,n-=8);for(h=h<0;t[i+P]=h&255,P+=w,h/=256,_-=8);t[i+P-w]|=H*128}},{}],14:[function(e,g,r){(function(t,p,i,o,n){t.fromXML=function(c,E,b){var l=p.parser(!0,{xmlns:!0}),d=[],y=[],V=[],te=0,$=null;l.onclosetag=function(he){if(d[0]instanceof _)for(var ye in d[0].styles)ie(d[0],d[0].styles[ye],E);else if(d[0]instanceof v||d[0]instanceof T){if(d[0].contents.length>1){var _e=[d[0].contents[0]],pe;for(pe=1;pe0&&b&&"onCloseTag"in b&&b.onCloseTag());V.shift(),y.shift(),d.shift()},l.ontext=function(he){if(d[0]!==void 0)if(d[0]instanceof T||d[0]instanceof v){var ye=new W;ye.initFromText($,d[0],he,V[0],E),d[0].contents.push(ye)}else d[0]instanceof h&&te>0&&b&&"onText"in b&&b.onText(he)},l.onopentag=function(he){var ye=he.attributes["xml:space"];ye?V.unshift(ye.value):V.length===0?V.unshift("default"):V.unshift(V[0]);var _e=he.attributes["xml:lang"];if(_e?y.unshift(_e.value):y.length===0?y.unshift(""):y.unshift(y[0]),he.uri===i.ns_tt)if(he.local==="tt")$!==null&&le(E,"Two elements at ("+this.line+","+this.column+")"),$=new m,$.initFromNode(he,E),d.unshift($);else if(he.local==="head")d[0]instanceof m||le(E,"Parent of element is not at ("+this.line+","+this.column+")"),$.head!==null&&le("Second element at ("+this.line+","+this.column+")"),$.head=new u,d.unshift($.head);else if(he.local==="styling")d[0]instanceof u||le(E,"Parent of element is not at ("+this.line+","+this.column+")"),$.head.styling!==null&&le("Second element at ("+this.line+","+this.column+")"),$.head.styling=new _,d.unshift($.head.styling);else if(he.local==="style"){var pe;d[0]instanceof _?(pe=new C,pe.initFromNode(he,E),pe.id?$.head.styling.styles[pe.id]=pe:j(E,"