PageSourceSearch

https://heymato.com/_next/static/chunks/797d107a.ea7e4e2a7d7c2ed4.js

js heymato.com collected 2026-09-25 03:22:20 UTC 399,372 bytes, 105 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[81929],{501:(e,t,n)=>{let r,a;n.d(t,{A:()=>tL,B:()=>t$,D:()=>ao,E:()=>tP,G:()=>tQ,H:()=>r4,I:()=>nz,J:()=>nL,K:()=>ag,L:()=>nU,M:()=>aN,N:()=>ly,O:()=>lb,Q:()=>tt,R:()=>tn,X:()=>nu,Y:()=>tw,h:()=>tC,m:()=>tS,o:()=>tf,p:()=>tv,s:()=>te,v:()=>tr,z:()=>tl});var i=n(84433),o=n(88639),l=n(66590),s=n(96539),c=n(18660),d=n(37347),u=n(77462),p=n(34802),h=n(39706),g=n(34856),f=n(45685),m=n(34425),b=n(44127),y=n(34293),k=n(36859),x=n(11523),v=n(74074),w=n(74182),S=n(4865),E=n(64988),j=n(15714),A=n(90668),N=n(55965),B=n(70304),R=n(7132),C=n(46034),I=n(59578),T=n(20254),O=n(90073),P=n(88803),_=n(19698),F=n(42161),M=n(80384),D=n(42279),L=n(1510),$=n(55561),z=n(43539),U=n(1107),K=n(12194),q=n(6011),V=n(48840),H=n(15851),G=n(52442),W=n(60682),Y=n(74323),J=n(84899),Z=n(41770),X=n(89587),Q=n(92027),ee=n(3427),et=n(79872);n(37368),n(93279),n(23339),n(8350),n(45856);var en=n(92805),er=n(44996),ea=n(37781);n(33925),n(31690);var ei=n(37611);n(54977),n(33715),n(16216);var eo=n(93321);n(41303),n(30064),n(92946),n(29172),n(1321),n(46676);var el=n(35006),es=n(59775),ec=n(63326);n(55505);var ed=n(39150);n(95336),n(4775),n(78069);var eu=n(89600),ep=n(40126),eh=n(85414),eg=n(86014),ef=n(67185),em=n(93133),eb=n(84882),ey=n(94004),ek=n(74554),ex=n(51633),ev=n(92092),ew=n(75082),eS=n(19036),eE=n(93456),ej=n(73539),eA=n(44696),eN=n(87100),eB=n(29787),eR=n(14226),eC=n(18757),eI=n(28547),eT=n(45709);n(36759),n(18001),n(72818),n(20624),n(9312),n(16549),n(29340);var eO=n(57846),eP=n(32188),e_=n(85709),eF=n(86280),eM=n(91794),eD=n(95479),eL=n(77364),e$=n(78610),ez=n(43296),eU=n(46489),eK=n(82478),eq=n(63224),eV=n(8358),eH=n(43152),eG=n(16924),eW=n(94700),eY=n(95082),eJ=n(43187),eZ=n(78486),eX=n(86069),eQ=n(11043),e0=n(47994),e1=n(82919),e2=n(4579),e3=n(8444),e4=n(28996),e6=n(61147),e9=n(99744),e5=n(75483),e7=n(3844),e8=n(59265);let te={"ar-AE":{add:`يضيف`,basedOn:`مرتكز على`,branchName:`اسم الفرع`,branches:`الفروع`,cancel:`يلغي`,clear:`مسح`,collection:`مجموعة`,collections:`المجموعات`,createPullRequest:`إنشاء طلب سحب`,create:`يخلق`,currentBranch:`الفرع الحالي`,defaultBranch:`الفرع الافتراضي`,dashboard:`لوحة القيادة`,delete:`يمسح`,deleteBranch:`حذف الفرع`,edit:`يحرر`,loading:`جارٍ التحميل`,newBranch:`فرع جديد`,pullRequests:`طلبات السحب`,otherBranches:`الفروع الأخرى`,save:`يحفظ`,search:`بحث`,singletons:`الفردي`,theCurrentlyCheckedOutBranch:`الفرع المعاد حاليا. اختر هذا إذا كنت بحاجة إلى البناء على العمل الحالي من الفرع الحالي.`,singleton:`سينجلتون`,viewPullRequests:`عرض طلبات السحب`,theDefaultBranchInYourRepository:`الفرع الافتراضي في المستودع الخاص بك. اختر هذا لبدء شيء جديد لا يعتمد على فرعك الحالي.`},"cs-CZ":{add:`Přidat`,basedOn:`Na z\xe1kladě`,branchName:`Jm\xe9no pobočky`,cancel:`zrušen\xed`,branches:`Větve`,clear:"Vymazat",collection:`Sb\xedrka`,collections:`Sb\xedrky`,create:`Vytvořit`,currentBranch:`Současn\xe1 pobočka`,createPullRequest:`Vytvořit požadavek na stažen\xed`,dashboard:`Př\xedstrojov\xe1 deska`,defaultBranch:`V\xfdchoz\xed větev`,delete:"Vymazat",deleteBranch:`Smazat větev`,edit:"Uprav
1it",newBranch:`Nov\xe1 pobočka`,loading:`Nač\xedt\xe1n\xed`,otherBranches:`Ostatn\xed pobočky`,pullRequests:`Vyt\xe1hněte požadavky`,save:`Uložit`,singleton:`Jedin\xe1ček`,search:"Hledat",singletons:"Singletons",theCurrentlyCheckedOutBranch:`Aktu\xe1lně odhl\xe1šen\xe1 pobočka. Tuto možnost vyberte, pokud potřebujete nav\xe1zat na st\xe1vaj\xedc\xed pr\xe1ci z aktu\xe1ln\xed pobočky.`,viewPullRequests:`Zobrazit ž\xe1dosti o stažen\xed`,theDefaultBranchInYourRepository:`V\xfdchoz\xed větev ve vašem \xfaložišti. Zvolte tuto možnost, chcete-li zač\xedt s něč\xedm nov\xfdm, co nen\xed z\xe1visl\xe9 na vaš\xed aktu\xe1ln\xed větvi.`},"da-DK":{add:`Tilf\xf8je`,branches:"Grene",branchName:"Afdelingsnavn",cancel:"Afbestille",basedOn:`Baseret p\xe5`,clear:"Ryd",collection:"Kollektion",collections:"Samlinger",create:"skab",createPullRequest:"Opret pull-anmodning",currentBranch:`Nuv\xe6rende filial`,dashboard:"Dashboard",delete:"Slet",deleteBranch:"Slet filial",defaultBranch:"Standard gren",edit:"Redigere",loading:`Indl\xe6ser`,newBranch:"Ny filial",otherBranches:"Andre grene",pullRequests:`Tr\xe6k anmodninger`,save:"Gemme",search:`S\xf8g`,singleton:"Singleton",theCurrentlyCheckedOutBranch:`Den aktuelt tjekkede filial. V\xe6lg dette, hvis du skal bygge videre p\xe5 eksisterende arbejde fra den nuv\xe6rende filial.`,singletons:"Singletoner",theDefaultBranchInYourRepository:`Standardgrenen i dit lager. V\xe6lg dette for at starte p\xe5 noget nyt, der ikke er afh\xe6ngigt af din nuv\xe6rende filial.`,viewPullRequests:"Se pull-anmodninger"},"de-DE":{add:`Hinzuf\xfcgen`,branchName:"Zweigname",branches:"Zweig",basedOn:"Bezogen auf",cancel:"Abbrechen",clear:`L\xf6schen`,collection:"Sammlung",collections:"Sammlungen",create:"Erstellen",createPullRequest:"Pull-Request erstellen",currentBranch:"Aktueller Zweig",dashboard:"Dashboard",defaultBranch:"Standardzweig",delete:`L\xf6schen`,deleteBranch:`Zweig l\xf6schen`,edit:"Bearbeiten",loading:"Wird geladen",newBranch:"Neuer Zweig",pullRequests:"Pull-Requests",otherBranches:"Andere Zweige",save:"Speichern",singleton:"Einzeln",search:"Suchen",singletons:"Einzelne",theCurrentlyCheckedOutBranch:`Der aktuell ausgecheckte Zweig. W\xe4hlen Sie diese Option, wenn Sie auf vorhandener Arbeit aus dem aktuellen Zweig aufbauen m\xfcssen.`,theDefaultBranchInYourRepository:`Der Standard-Branch in Ihrem Repository. W\xe4hlen Sie dies, um etwas Neues zu starten, das nicht von Ihrem aktuellen Zweig abh\xe4ngt.`,viewPullRequests:"Pull-Requests anzeigen"},"el-GR":{add:`Προσθήκη`,basedOn:`Βασισμένο στο`,branches:`Κλαδια δεντρου`,cancel:`Ματαίωση`,branchName:`Όνομα υποκαταστήματος`,clear:`Καθαρισμός`,collections:`Συλλογές`,collection:`Συλλογή`,create:`Δημιουργώ`,createPullRequest:`Δημιουργία αιτήματος έλξης`,currentBranch:`Τρέχον υποκατάστημα`,dashboard:`Ταμπλό`,defaultBranch:`Προεπιλεγμένος κλάδος`,delete:`Διαγράφω`,deleteBranch:`Διαγραφή υποκαταστήματος`,edit:`Επεξεργασία`,loading:`Φόρτωση`,newBranch:`Νέο υποκατάστημα`,otherBranches:`Άλλα υποκαταστήματα`,pullRequests:`Τραβήξτε αιτήματα`,search:`Αναζήτηση`,save:`Αποθηκεύσετε`,singleton:`Μοναδικό χαρτί`,singletons:"Singletons",theCurrentlyCheckedOutBranch:`Το υποκατάστημα που ελέγχεται αυτήν τη στιγμή. Επιλέξτε αυτό εάν χρειάζεται να βασιστείτε σε υπάρχουσες εργασίες από τον τρέχοντα κλάδο.`,theDefaultBranchInYourRepository:`Ο προεπιλεγμένος κλάδος στο αποθετήριο σας. Επιλέξτε αυτό για να ξεκινήσετε κάτι νέο που δεν εξαρτάται από το τρέχον υποκατάστημά σας.`,viewPullRequests:`Προβολή αιτημάτων έλξης`},"en-US":{add:"Add",basedOn:"Based on",branches:"Branches",branchName:"Branch name",clear:"Clear",cancel:"Cancel",collection:"Collection",collections:"Collections",create:"Create",createPullRequest:"Create pull request",currentBranch:"Current branch",defaultBranch:"Default branch",dashboard:"Dashboard",delete:"Delete",deleteBranch:"Delete branch",loading:"Loading",newBranch:`New branch…`,edit:"Edit",otherBranches:"Other branches",pullRequests:"Pull requests",save:"Save",search:"Search",singleton:"Singleton",singletons:"Singletons",theCurrentlyCheckedOutBranch:"The currently checked out branch. Choose this if you need to build on existing work from the current branch.",theDefaultBranchInYourRepository:"The default branch in your repository. Choose this to start something new that's not dependent on your current branch.",viewPullRequests:"View pull requests"},"bg-BG":{add:`Добавете`,basedOn:`Базиран на`,branchName:`Име на клон`,cancel:`Отказ`,clear:`Изчисти`,collection:`колекция`,collections:`Колекции`,branches:`Клонове`,create:`Създавайте`,createPullRequest:`Създайте заявка за изтегляне`,currentBranch:`Текущ клон`,dashboard:`Табло`,deleteBranch:`Изтриване на клон`,delete:`Изтрий`,defaultBranch:`Клон по подразбиране`,edit:`редактиране`,loading:`Зареждане`,otherBranches:`Други клонове`,newBranch:`Нов клон`,pullRequests:`Заявки за изтегляне`,save:`Запазване`,search:`Търсене`,singletons:`Единични`,singleton:`Сингълтън`,theDefaultBranchInYourRepository:`Клонът по подразбиране във вашето хранилище. Изберете това, за да започнете с нещо ново, което не зависи от текущия ви клон.`,viewPullRequests:`Преглед на заявките за изтегляне`,theCurrentlyCheckedOutBranch:`Текущо провереният клон. Изберете това, ако трябва да надграждате върху съществуваща работа от текущия клон.`},"es-ES":{add:"Agregar",branchName:"Nombre de la rama",branches:"Ramas",basedOn:"Basado en",cancel:"Cancelar",clear:"Borrar",collection:`Colecci\xf3n`,createPullRequest:"Crear Pull Request",create:"Crear",collections:"Colecciones",dashboard:"Panel",currentBranch:"Rama actual",delete:"Borrar",defaultBranch:"Rama predeterminada",deleteBranch:"Eliminar rama",loading:"Cargando",edit:"Editar",newBranch:"Nueva rama",otherBranches:"Otras ramas",save:"Guardar",pullRequests:"Pull Requests",search:"Buscar",singletons:"Singletons",theCurrentlyCheckedOutBranch:"La rama actualmente seleccionad
1a. Elige esto si necesitas continuar trabajando sobre el progreso existente de la rama actual.",singleton:"Singleton",theDefaultBranchInYourRepository:"La rama predeterminada en tu repositorio. Elige esto para comenzar algo nuevo que no dependa de tu rama actual.",viewPullRequests:"Ver Pull Requests"},"fi-FI":{add:`Lis\xe4t\xe4`,branchName:"Sivukonttorin nimi",basedOn:"Perustuen",branches:"Oksat",clear:"Kirkas",cancel:`T\xfchista`,collection:"Kokoelma",collections:"Kokoelmat",create:"Luoda",createPullRequest:`Luo vetopyynt\xf6`,currentBranch:"Nykyinen haara",dashboard:"Kojelauta",delete:"Poistaa",deleteBranch:"Poista haara",defaultBranch:"Oletushaara",edit:"Muokata",loading:"Ladataan",newBranch:"Uusi haara",otherBranches:"Muut haarat",save:"Tallentaa",pullRequests:`Ved\xe4 pyynt\xf6j\xe4`,search:"Hae",singleton:"Singleton",singletons:"Singletons",theCurrentlyCheckedOutBranch:`T\xe4ll\xe4 hetkell\xe4 uloskirjautunut sivuliike. Valitse t\xe4m\xe4, jos haluat rakentaa nykyisen haaran olemassa olevaan ty\xf6h\xf6n.`,theDefaultBranchInYourRepository:`Oletushaara arkistossasi. Valitse t\xe4m\xe4 aloittaaksesi jotain uutta, joka ei ole riippuvainen nykyisest\xe4 haarastasi.`,viewPullRequests:`N\xe4yt\xe4 vetopyynn\xf6t`},"fr-FR":{basedOn:`Bas\xe9 sur`,add:"Ajouter",branchName:"Nom de la filiale",branches:"Branches",cancel:"Annuler",clear:"Effacer",collection:"Collection",collections:"Collections",create:`Cr\xe9er`,currentBranch:"Succursale actuelle",createPullRequest:`Cr\xe9er une demande d'extraction`,defaultBranch:`Branche par d\xe9faut`,delete:"Supprimer",deleteBranch:"Supprimer la branche",dashboard:"Tableau de bord",edit:"Modifier",otherBranches:"Autres succursales",loading:"Chargement en cours",newBranch:"Nouvelle branche",pullRequests:"Demandes d'extraction",save:"Sauvegarder",search:"Rechercher",singleton:"Singleton",singletons:"Singletons",theCurrentlyCheckedOutBranch:"La branche actuellement extraite. Choisissez cette option si vous devez vous appuyer sur le travail existant de la branche actuelle.",theDefaultBranchInYourRepository:`La branche par d\xe9faut de votre r\xe9f\xe9rentiel. Choisissez ceci pour commencer quelque chose de nouveau qui ne d\xe9pend pas de votre branche actuelle.`,viewPullRequests:"Afficher les demandes d'extraction"},"hr-HR":{add:"Dodati",basedOn:"Na temelju",branchName:`Naziv podružnice`,cancel:"Otkazati",branches:`Podružnice`,clear:`Izbriši`,collection:"Kolekcija",collections:"Zbirke",create:"Stvoriti",createPullRequest:`Kreirajte zahtjev za povlačenjem`,currentBranch:"Trenutna grana",dashboard:`Nadzorna ploča`,defaultBranch:"Zadana grana",delete:"Izbrisati",edit:"Uredi",deleteBranch:`Izbriši granu`,loading:`Učitavam`,newBranch:"Nova grana",otherBranches:"Ostale grane",pullRequests:`Zahtjevi za povlačenjem`,save:`Uštedjeti`,search:`Traži`,singletons:"Samci",singleton:"samac",theCurrentlyCheckedOutBranch:`Trenutno odjavljena poslovnica. Odaberite ovo ako trebate graditi na postojećem radu iz trenutne grane.`,theDefaultBranchInYourRepository:`Zadana grana u vašem spremištu. Odaberite ovo da započnete nešto novo što ne ovisi o vašoj trenutnoj grani.`,viewPullRequests:`Pregledajte zahtjeve za povlačenjem`},"he-IL":{add:`לְהוֹסִיף`,basedOn:`מבוסס על`,branchName:`שם הסניף`,branches:`ענפים`,clear:`נקי`,collection:`אוסף`,cancel:`לְבַטֵל`,collections:`אוספים`,create:`לִיצוֹר`,currentBranch:`סניף נוכחי`,createPullRequest:`צור בקשת משיכה`,dashboard:`לוּחַ מַחווָנִים`,defaultBranch:`סניף ברירת מחדל`,delete:`לִמְחוֹק`,deleteBranch:`מחק סניף`,edit:`לַעֲרוֹך`,loading:`טוען`,otherBranches:`סניפים אחרים`,newBranch:`סניף חדש`,pullRequests:`משוך בקשות`,search:`חפש`,save:`להציל`,singleton:`קְלָף בּוֹדֵד`,singletons:`רווקים`,theDefaultBranchInYourRepository:`סניף ברירת המחדל במאגר שלך. בחר באפשרות זו כדי להתחיל משהו חדש שאינו תלוי בסניף הנוכחי שלך.`,theCurrentlyCheckedOutBranch:`הסניף שנקבע כעת. בחר באפשרות זו אם אתה צריך לבנות על עבודה קיימת מהסניף הנוכחי.`,viewPullRequests:`הצג בקשות משיכה`},"hu-HU":{add:`Hozz\xe1ad\xe1s`,basedOn:`Alapj\xe1n`,branchName:`Fi\xf3k neve`,branches:`\xc1gak`,cancel:`Megsz\xfcnteti`,clear:`T\xf6rl\xe9s`,collections:`Gyűjtem\xe9nyek`,collection:`Gyűjtem\xe9ny`,create:"Teremt",currentBranch:`Jelenlegi \xe1g`,createPullRequest:`Leh\xedv\xe1si k\xe9relem l\xe9trehoz\xe1sa`,dashboard:`Ir\xe1ny\xedt\xf3pult`,defaultBranch:`Alap\xe9rtelmezett \xe1g`,deleteBranch:`El\xe1gaz\xe1s t\xf6rl\xe9se`,edit:`Szerkeszt\xe9s`,delete:`T\xf6r\xf6l`,newBranch:`\xdaj \xe1g`,loading:`Bet\xf6lt\xe9s folyamatban`,otherBranches:`Egy\xe9b \xe1gak`,pullRequests:`Leh\xedv\xe1si k\xe9r\xe9sek`,save:"Megment",search:`Keres\xe9s`,singleton:"szingli",theCurrentlyCheckedOutBranch:`A jelenleg kivett fi\xf3k. V\xe1lassza ezt, ha az aktu\xe1lis \xe1g megl\xe9vő munk\xe1j\xe1ra kell \xe9p\xedtenie.`,theDefaultBranchInYourRepository:`Az alap\xe9rtelmezett \xe1g az adatt\xe1rban. V\xe1lassza ezt, ha valami \xfajat szeretne ind\xedtani, amely nem f\xfcgg az aktu\xe1lis \xe1gt\xf3l.`,singletons:"Singletons",viewPullRequests:`Leh\xedv\xe1si k\xe9relmek megtekint\xe9se`},"it-IT":{basedOn:"Basato su",add:"Aggiungere",branchName:"Nome ramo",branches:"Rami",cancel:"Annulla",clear:"Cancella",collection:"Collezione",create:"Creare",collections:"Collezioni",createPullRequest:"Crea richiesta pull",dashboard:"Pannello di controllo",currentBranch:"Ramo attuale",defaultBranch:"Ramo predefinito",delete:"Eliminare",edit:"Modificare",deleteBranch:"Elimina ramo",loading:"Caricamento in corso",newBranch:"Nuova filiale",pullRequests:"Richieste pull",otherBranches:"Altri rami",search:"
1Cerca",save:"Salva",singleton:"Singleton",singletons:"Singletons",theCurrentlyCheckedOutBranch:"La filiale attualmente verificata. Scegli questa opzione se devi basarti su un lavoro esistente dal ramo corrente.",theDefaultBranchInYourRepository:"Il ramo predefinito nel tuo repository. Scegli questa opzione per iniziare qualcosa di nuovo che non dipenda dal tuo ramo attuale.",viewPullRequests:"Visualizza le richieste pull"},"ja-JP":{add:`追加`,basedOn:`に基づく`,branchName:`支店名`,branches:`支店`,clear:`クリア`,cancel:`キャンセル`,collection:`コレクション`,collections:`コレクション`,create:`作成`,currentBranch:`現在のブランチ`,createPullRequest:`プルリクエストを作成`,dashboard:`ダッシュボード`,defaultBranch:`デフォルトのブランチ`,delete:`消去`,deleteBranch:`ブランチを削除`,edit:`編集`,newBranch:`新しい支店`,otherBranches:`その他の支店`,loading:`読み込み中`,save:`保存`,pullRequests:`プルリクエスト`,singletons:`シングルトン`,search:`検索`,singleton:`シングルトン`,theCurrentlyCheckedOutBranch:`現在チェックアウトされているブランチ。 現在のブランチの既存の作業に基づいて構築する必要がある場合は、これを選択してください。`,theDefaultBranchInYourRepository:`リポジトリのデフォルト ブランチ。 これを選択して、現在のブランチに依存しない新しい何かを開始します。`,viewPullRequests:`プル リクエストを表示`},"ko-KR":{add:`추가하다`,branchName:`지점명`,basedOn:`기반으로`,branches:`가지`,cancel:`취소`,clear:`지우기`,create:`만들다`,collection:`수집`,collections:`컬렉션`,createPullRequest:`풀 요청 생성`,dashboard:`계기반`,currentBranch:`현재 지점`,delete:`삭제`,defaultBranch:`기본 분기`,edit:`편집하다`,deleteBranch:`분기 삭제`,newBranch:`새 지점`,loading:`로드 중`,save:`구하다`,otherBranches:`기타 지점`,pullRequests:`풀 리퀘스트`,singleton:`하ë
1‚˜ì”© 일어나는 것`,search:`검색`,singletons:`싱글톤`,theCurrentlyCheckedOutBranch:`현재 체크아웃된 브랜치. 현재 브랜치의 기존 작업을 기반으로 빌드해야 하는 경우 이 옵션을 선택하세요.`,theDefaultBranchInYourRepository:`리포지토리의 기본 브랜치입니다. 현재 분기에 의존하지 않는 새로운 것을 시작하려면 이것을 선택하십시오.`,viewPullRequests:`풀 요청 보기`},"et-EE":{add:"Lisama",basedOn:`P\xf5hineb`,branchName:"Filiaali nimi",branches:"Filiaalid",cancel:`T\xfchista`,collections:"Kollektsioonid",clear:"Puhasta",collection:"Kollektsioon",currentBranch:"Praegune filiaal",dashboard:"Armatuurlaud",createPullRequest:`Loo t\xf5mbamistaotlus`,defaultBranch:"Vaikeharu",delete:"Kustuta",deleteBranch:"Kustuta haru",edit:"Muuda",loading:"Laadimine",otherBranches:"Muud oksad",newBranch:"Uus filiaal",pullRequests:`T\xf5mbetaotlused`,save:"Salvesta",search:"Otsi",singletons:`\xdcksikud`,singleton:`\xfcksikud`,theCurrentlyCheckedOutBranch:`Praegu v\xe4lja registreeritud filiaal. Valige see, kui peate kasutama praeguse haru olemasolevaid t\xf6id.`,theDefaultBranchInYourRepository:`Vaikeharu teie hoidlas. Valige see, et alustada midagi uut, mis ei s\xf5ltu teie praegusest harust.`,viewPullRequests:`Vaadake t\xf5mbamistaotlusi`,create:"Loo"},"lv-LV":{basedOn:"Balstoties uz",add:"Pievienot",branchName:`Filiāles nosaukums`,branches:"Nozares",cancel:"Atcelt",collection:"Kolekcija",clear:`NotÄ«rÄ«t`,create:"Izveidot",collections:"Kolekcijas",currentBranch:`PaÅ¡reizējā filiāle`,createPullRequest:`Izveidot izvilkÅ¡anas pieprasÄ«jumu`,dashboard:`Mērinstrumentu panelis`,defaultBranch:`Noklusējuma filiāle`,delete:`Dzēst`,deleteBranch:`Dzēst filiāli`,newBranch:`Jauna filiāle`,edit:`Rediģēt`,loading:`Notiek ielāde`,otherBranches:`Citas filiāles`,pullRequests:`IzvilkÅ¡anas pieprasÄ«jumi`,search:`Meklēt`,save:`Saglabāt`,singleton:"Singleton",singletons:`Vientuļi`,theCurrentlyCheckedOutBranch:`PaÅ¡laik izrakstÄ«tā filiāle. Izvēlieties Å¡o, ja vēlaties izmantot esoÅ¡o darbu no paÅ¡reizējās filiāles.`,viewPullRequests:`SkatÄ«t izvilkÅ¡anas pieprasÄ«jumus`,theDefaultBranchInYourRepository:`Noklusējuma filiāle jÅ«su repozitorijā. Izvēlieties Å¡o, lai sāktu kaut ko jaunu, kas nav atkarÄ«gs no jÅ«su paÅ¡reizējās filiāles.`},"nb-NO":{basedOn:`Basert p\xe5`,add:"Legg til",branchName:"Filialnavn",branches:"Grener",clear:`T\xf8m`,cancel:"Avbryt",collection:"Samling",collections:"Samlinger",createPullRequest:`Opprett pull-foresp\xf8rsel`,dashboard:"Dashbord",create:"Skape",currentBranch:`N\xe5v\xe6rende gren`,defaultBranch:"Standard gren",delete:"Slett",deleteBranch:"Slett filial",loading:"Laster inn",edit:"Redigere",newBranch:"Ny gren",otherBranches:"Andre grener",pullRequests:`Trekk foresp\xf8rsler`,save:"Lagre",singleton:"Singleton",search:`S\xf8k`,singletons:"Singletoner",viewPullRequests:`Se pull-foresp\xf8rsler`,theCurrentlyCheckedOutBranch:`Den utsjekkede grenen. Velg dette hvis du skal bygge p\xe5 eksisterende arbeid fra g
1jeldende gren.`,theDefaultBranchInYourRepository:`Standardgrenen i depotet ditt. Velg dette for \xe5 starte noe nytt som ikke er avhengig av din n\xe5v\xe6rende filial.`},"nl-NL":{add:"Toevoegen",basedOn:"Gebaseerd op",branchName:"Filiaal naam",branches:"Takken",cancel:"Annuleren",collection:"Verzameling",clear:"Helder",collections:"Collecties",create:`Cre\xebren`,createPullRequest:"Pull-aanvraag maken",currentBranch:"Huidige tak",dashboard:"Dashboard",delete:"Verwijderen",defaultBranch:"Standaard filiaal",deleteBranch:"Filiaal verwijderen",loading:"Laden",edit:"Bewerking",newBranch:"Nieuwe tak",otherBranches:"Andere takken",save:"Redden",pullRequests:"Trek verzoeken",search:"Zoeken",singleton:"eenling",singletons:"Eenlingen",theCurrentlyCheckedOutBranch:"Het momenteel uitgecheckte filiaal. Kies dit als u moet voortbouwen op bestaand werk van de huidige branch.",theDefaultBranchInYourRepository:"De standaard branch in uw repository. Kies dit om iets nieuws te starten dat niet afhankelijk is van uw huidige branche.",viewPullRequests:"Bekijk pull-aanvragen"},"pl-PL":{add:"Dodaj",basedOn:"Oparte na",branches:`Gałęzie`,branchName:"Nazwa filii",cancel:"Anuluj",clear:`Wyczyść`,collection:"Kolekcja",collections:"Kolekcje",create:`Utw\xf3rz`,currentBranch:`Obecna gałąź`,createPullRequest:`Utw\xf3rz żądanie ściągnięcia`,dashboard:"Panel",defaultBranch:`Domyślna gałąź`,deleteBranch:`Usuń gałąź`,delete:`Usuń`,edit:"Edytuj",newBranch:`Nowa gałąź`,loading:`Trwa ładowanie`,otherBranches:`Inne gałęzie`,pullRequests:`Żądania ściągnięcia`,save:"Zapisz",search:"Szukaj",singleton:"Singleton",singletons:"Singletony",theCurrentlyCheckedOutBranch:`Aktualnie wyewidencjonowana gałąź. Wybierz tę opcję, jeśli chcesz oprzeć się na istniejącej pracy z bieżącej gałęzi.`,theDefaultBranchInYourRepository:`Domyślna gałąź w twoim repozytorium. Wybierz tę opcję, aby rozpocząć coś nowego, co nie jest zależne od bieżącej gałęzi.`,viewPullRequests:`Wyświetl żądania ściągnięcia`},"pt-BR":{basedOn:"Baseado em",add:"Adicionar",branchName:"Nome da filial",cancel:"Cancelar",clear:"Limpar",branches:"Galhos",collection:`Cole\xe7\xe3o`,collections:`Cole\xe7\xf5es`,create:"Criar",currentBranch:"filial atual",createPullRequest:`Criar solicita\xe7\xe3o pull`,defaultBranch:`ramo padr\xe3o`,dashboard:"Painel",edit:"Editar",delete:"Excluir",deleteBranch:`Excluir ramifica\xe7\xe3o`,newBranch:"Nova filial",loading:"Carregando",otherBranches:"Outros ramos",search:"Pesquisar",pullRequests:`Requisi\xe7\xf5es pull`,save:"Guardar",singleton:"solteiro",singletons:"Solteiros",theCurrentlyCheckedOutBranch:`A ramifica\xe7\xe3o atualmente com check-out. Escolha esta op\xe7\xe3o se precisar criar um trabalho existente na ramifica\xe7\xe3o atual.`,theDefaultBranchInYourRepository:`A ramifica\xe7\xe3o padr\xe3o em seu reposit\xf3rio. Escolha isso para iniciar algo novo que n\xe3o dependa de sua ramifica\xe7\xe3o atual.`,viewPullRequests:`Ver solicita\xe7\xf5es pull`},"pt-PT":{add:"Adicionar",basedOn:"Baseado em",branchName:"Nome da filial",clear:"Limpar",cancel:"Cancelar",branches:"Galhos",collection:`Cole\xe7\xe3o`,createPullRequest:`Criar solicita\xe7\xe3o pull`,collections:`Cole\xe7\xf5es`,create:"Criar",dashboard:"Painel",delete:"Excluir",defaultBranch:`ramo padr\xe3o`,currentBranch:"filial atual",deleteBranch:`Excluir ramifica\xe7\xe3o`,edit:"Editar",newBranch:"Nova filial",loading:"A carregar",otherBranches:"Outros ramos",pullRequests:`Requisi\xe7\xf5es pull`,search:"Procurar",singleton:"solteiro",save:"Guardar",singletons:"Solteiros",theDefaultBranchInYourRepository:`A ramifica\xe7\xe3o padr\xe3o em seu reposit\xf3rio. Escolha isso para iniciar algo novo que n\xe3o dependa de sua ramifica\xe7\xe3o atual.`,theCurrentlyCheckedOutBranch:`A ramifica\xe7\xe3o atualmente com check-out. Escolha esta op\xe7\xe3o se precisar criar um trabalho existente na ramifica\xe7\xe3o atual.`,viewPullRequests:`Ver solicita\xe7\xf5es pull`},"ro-RO":{add:`Adăuga`,basedOn:"Bazat pe",branchName:"Numele sucursalei",branches:"Ramuri",clear:"Golire",cancel:"Anulare",collection:"Colectie",create:"Crea",createPullRequest:`Creați cerere de tragere`,collections:`Colecții`,currentBranch:`Filiala actuală`,defaultBranch:`Ramura implicită`,delete:`Șterge`,dashboard:"Bord",deleteBranch:`Ștergeți ramura`,loading:`Se \xeencarcă`,edit:`Editați`,newBranch:"Filiala noua",otherBranches:"Alte ramuri",save:`Salvați`,pullRequests:`Solicitări de tragere`,search:`Căutare`,singleton:"Singleton",singletons:"Singletons",theDefaultBranchInYourRepository:`Ramura implicită din depozitul dvs. Alegeți acest lucru pentru a \xeencepe ceva nou, care nu depinde de ramura dvs. actuală.`,theCurrentlyCheckedOutBranch:`Sucursala verificată \xeen prezent. Alegeți acest lucru dacă trebuie să vă bazați pe munca existentă din ramura curentă.`,viewPullRequests:`Vizualizați solicitările de extragere`},"ru-RU":{add:`Добавить`,branchName:`Название ветви`,basedOn:`На основе`,branches:`Ветви`,cancel:`Отмена`,clear:`Очистить`,collection:`Коллекция`,collections:`Коллекции`,create:`Создать`,currentBranch:`Текущая ветвь`,createPullRequest:`Создать пул-реквест`,defaultBranch:`Ветвь по умолчанию`,dashboard:`Панель приборов`,delete:`Удалить`,deleteBranch:`Удалить ветвь`,loading:`Загрузка`,edit:`Редактировать`,otherBranches:`Другие ветви`,newBranch:`Новая ветвь`,pullRequests:`Пул-реквесты`,save:`Сохранить`,search:`Поиск`,singleton:`Синглтон`,singletons:`Синглтоны`,theCurrentlyCheckedOutBranch:`Текущая проверенная ветвь. Выберите это, если вам нужно опираться на существующую работу из текущей ветви.`,theDefaultBranchInYourRepository:`Ветвь по умолчанию в вашем репозитории. Выберите это, чтобы начать что-то новое, не зависящее от вашей текущей ветви.`,viewPullRequests:`Посмотреть пул-реквесты`},"sk-SK":{add:`Pridať`,branchName:`Meno pobočky`,branches:`Pobočky`,basedOn:`Založen\xe9 na`,cancel:`Zrušiť`,collection:"Zbierka",clear:`Vymazať`,collections:"zbierky",create:"Vytvorte",createPullRequest:`Vytvorte požiadavku na stiahnutie`,currentBranch:`Aktu\xe1lna pobočka`,dashboard:"Dashboard",defaultBranch:`Predvolen\xe1 vetva`,delete:`Odstr\xe1niť`,deleteBranch:`Odstr\xe1niť vetvu`,edit:`Upraviť`,newBranch:`Nov\xe1 pobočka`,loading:`Nač\xedtava sa`,otherBranches:`Ostatn\xe9 pobočky`,pullRequests:`Vytiahnite žiadosti`,save:`Uložiť`,singleton:"Singleton",singletons:"Singletons",search:`Vyhľad\xe1vať`,theCurrentlyCheckedOutBranch:`Aktu\xe1lne odhl\xe1sen\xe1 pobočka. T\xfato možnosť vyberte, ak potrebujete stavať na existuj\xfacej pr\xe1ci z aktu\xe1lnej pobočky.`,theDefaultBranchInYourRepository:`Predvolen\xe1 vetva vo vašom \xfaložisku. Zvoľte t\xfato možnosť, ak chcete zača
1ť niečo nov\xe9, čo nez\xe1vis\xed od vašej aktu\xe1lnej pobočky.`,viewPullRequests:`Zobraziť požiadavky na stiahnutie`},"sl-SI":{branchName:`Ime podružnice`,add:"Dodaj",basedOn:"Temelji na",cancel:`Prekliči`,branches:`Podružnice`,collection:"Zbirka",clear:"Jasen",collections:"Zbirke",create:"Ustvari",createPullRequest:"Ustvari zahtevo za vleko",currentBranch:"Trenutna veja",dashboard:`Nadzorna plošča`,defaultBranch:"Privzeta veja",delete:`Izbriši`,deleteBranch:`Izbriši vejo`,loading:"Nalaganje",edit:"Uredi",newBranch:`Nova podružnica`,pullRequests:`Zahteve za vlečenje`,otherBranches:"Druge veje",save:"Shrani",search:"Iskanje",singleton:"Singleton",singletons:"Samski",theCurrentlyCheckedOutBranch:`Trenutno odjavljena podružnica. To izberite, če morate graditi na obstoječem delu iz trenutne veje.`,theDefaultBranchInYourRepository:`Privzeta veja v vašem skladišču. Izberite to, da začnete nekaj novega, kar ni odvisno od vaše trenutne veje.`,viewPullRequests:`Oglejte si zahteve za vlečenje`},"sr-SP":{add:`Додати`,basedOn:`На бази`,branchName:`Назив огранка`,branches:`Огранци`,cancel:`Поништити, отказати`,clear:`Izbriši`,collection:`Цоллецтион`,collections:`Збирке`,create:`Креирај`,createPullRequest:`Креирајте захтев за повлачење`,currentBranch:`Тренутна грана`,dashboard:`Командна табла`,defaultBranch:`Подразумевана грана`,delete:`Избриши`,edit:`Уредити`,deleteBranch:`Обриши грану`,loading:`Učitavam`,newBranch:`Нова грана`,pullRequests:`Захтеви за повлачење`,otherBranches:`Остале гране`,save:`сачувати`,search:"Pretraga",singleton:`Синглетон`,singletons:`Синглетонс`,theCurrentlyCheckedOutBranch:`Тренутно одјављена филијала. Изаберите ово ако треба да надоградите постојећи рад из тренутне гране.`,viewPullRequests:`Прегледајте захтеве за повлачењем`,theDefaultBranchInYourRepository:`Подразумевана грана у вашем спремишту. Изаберите ово да започнете нешто ново што не зависи од ваше тренутне гране.`},"sv-SE":{add:`L\xe4gg till`,basedOn:`Baserat p\xe5`,branchName:"Filialens namn",branches:"Grenar",clear:"Rensa",collection:"Samling",cancel:`Поништити, отказати`,create:"Skapa",collections:"Samlingar",createPullRequest:`Skapa pull-f\xf6rfr\xe5gan`,currentBranch:"Nuvarande gren",dashboard:`instrumentbr\xe4da`,delete:"Radera",defaultBranch:"Standardgren",deleteBranch:"Ta bort gren",newBranch:"Ny gren",loading:`L\xe4ser in`,edit:"Redigera",otherBranches:"Andra grenar",save:"Spara",pullRequests:`Dra f\xf6rfr\xe5gningar`,search:`S\xf6k`,singleton:"Singleton",singletons:"Singlar",theCurrentlyCheckedOutBranch:`Den utcheckade filialen. V\xe4lj detta om du beh\xf6ver bygga p\xe5 befintligt arbete fr\xe5n den aktuella grenen.`,theDefaultBranchInYourRepository:`Standardgrenen i ditt arkiv. V\xe4lj detta f\xf6r att starta n\xe5got nytt som inte \xe4r beroende av din nuvarande filial.`,viewPullRequests:`Visa pull-f\xf6rfr\xe5gningar`},"tr-TR":{add:"Avbryt",basedOn:`Dayalı`,branches:`Şubeler`,cancel:"iptal etmek",branchName:`şube adı`,clear:"Temizle",collections:"Koleksiyonlar",collection:"Toplamak",create:"Yaratmak",createPullRequest:`\xc7ekme isteği oluştur`,currentBranch:`Mevcut şube`,dashboard:`G\xf6sterge Paneli`,defaultBranch:`varsayılan dal`,deleteBranch:`Şubeyi sil`,edit:`D\xfczenlemek`,delete:"Silmek",loading:`Y\xfckleniyor`,otherBranches:`Diğer şubeler`,pullRequests:`\xc7ekme istekleri`,search:"Ara",newBranch:"Yeni dal",singleton:"Tekil",save:"Kaydetmek",singletons:"Singleton'lar",viewPullRequests:`\xc7ekme isteklerini g\xf6r\xfcnt\xfcle`,theCurrentlyCheckedOutBranch:`Şu anda kontrol edilen şube. Ge\xe7erli daldaki mevcut işi geliştirmeniz gerekiyorsa bunu se\xe7in.`,theDefaultBranchInYourRepository:`Deponuzdaki varsayılan şube. Mevcut şubenize bağlı olmayan yeni bir şey ba
1şlatmak i\xe7in bunu se\xe7in.`},"zh-CN":{add:`添加`,basedOn:`基于`,branches:`分支机构`,branchName:`分店名称`,cancel:`取消`,collection:`收藏`,clear:`透明`,collections:`收藏品`,create:`创造`,currentBranch:`当前分支`,createPullRequest:`创建拉取请求`,dashboard:`仪表板`,defaultBranch:`默认分支`,delete:`删除`,deleteBranch:`删除分支`,loading:`正在加载`,edit:`编辑`,newBranch:`新分行`,otherBranches:`其他分行`,save:`节省`,pullRequests:`拉取请求`,search:`搜索`,singleton:`单例`,theCurrentlyCheckedOutBranch:`当前签出的分支。 如果您需要在当前分支的现有工作的基础上构建,请选择此项。`,theDefaultBranchInYourRepository:`存储库中的默认分支。 选择此选项可开始一些不依赖于当前分支的新操作。`,singletons:`单例`,viewPullRequests:`查看拉取请求`},"uk-UA":{add:`Додати`,basedOn:`На основі`,branchName:`Назва гілки`,branches:`Гілки`,cancel:`Скасувати`,clear:`Очистити`,collection:`Колекція`,collections:`Колекції`,create:`Створити`,createPullRequest:`Створити запит на злиття змін`,dashboard:`Дашборд`,currentBranch:`Поточна гілка`,defaultBranch:`Типова гілка`,edit:`Редагувати`,deleteBranch:`Видалити гілку`,delete:`Видалити`,loading:`Завантаження`,newBranch:`Нова гілка`,otherBranches:`Інші гілки`,pullRequests:`Запити на злиття`,save:`Зберегти`,search:`Пошук`,singleton:`Одиночка`,singletons:`Одиночки`,theCurrentlyCheckedOutBranch:`Поточна обрана гілка. Виберіть це, якщо вам потрібно продовжити роботу на основі поточної гілки.`,theDefaultBranchInYourRepository:`Типова гілка у вашому репозиторії. Виберіть це, щоб почати щось нове, що не залежить від вашої поточної гілки.`,viewPullRequests:`Перегляд запитів на злиття`},"zh-TW":{branchName:`分店名稱`,basedOn:`基於`,add:`添加`,branches:`分支機構`,cancel:`取消`,clear:`清除`,collections:`收藏品`,collection:`收藏`,create:`創造`,createPullRequest:`創建拉取請求`,currentBranch:`當前分支`,defaultBranch:`默認分支`,dashboard:`儀表板`,delete:`刪除`,deleteBranch:`刪除分支`,loading:`正在載入`,edit:`編輯`,newBranch:`新分行`,otherBranches:`其他分行`,pullRequests:`拉取請求`,save:`節省`,search:`搜尋`,singleton:`單例`,singletons:`單例`,theDefaultBranchInYourRepository:`存儲庫中的默認分支。 選擇此選項可開始一些不依賴於當前分支的新操作。`,theCurrentlyCheckedOutBranch:`當前簽出的分支。 如果您需要在當前分支的現有工作的基礎上構建,請選擇此項。`,viewPullRequests:`查看拉取請求`},"lt-LT":{basedOn:"Remiantis",branchName:"Filialo pavadinimas",add:"Papildyti",branches:"Filialai",clear:"Skaidrus",cancel:`Atšaukti`,collection:"Kolekcija",create:"Sukurti",collections:"Kolekcijos",createPullRequest:`Sukurti ištraukimo užklausą`,currentBranch:"Dabartinis filialas",dashboard:`Prietaisų skydelis`,delete:`Ištrinti`,defaultBranch:`Numatytoji šaka`,loading:`Įkeliama`,edit:"Redaguoti",deleteBranch:`Ištrinti šaką`,newBranch:"Naujas filialas",otherBranches:`Kitos šakos`,pullRequests:`Ištraukti užklausas`,save:"Sutaupyti",search:`Ieškoti`,theCurrentlyCheckedOutBranch:`Šiuo metu išregistruotas filialas. Pasirinkite tai, jei reikia remtis esamu darbu iš dabartinės šakos.`,theDefaultBranchInYourRepository:`Numatytoji šaka jūsų saugykloje. Pasirinkite tai, kad pradėtumėte ką nors naujo, nepriklausančio nuo dabartinės šakos.`,viewPullRequests:`Peržiūrėkite ištraukimo užklausas`,singletons:`Vienišiai`,singleton:"vienvietis"}};function tt(e){return e}function tn(e){return e}function tr(e,t){let{singular:n,plural:r=n+"s",inclusive:a=!0}=t,i=1===e?n:r;return a?`${e} ${i}`:i}(0,s.createContext)({theme:"auto",setTheme:()=>{throw Error("ThemeContext was not initialized.")}}).Provider;let ta=e=>{let{attributes:t,children:n,draggable:r=!1}=e;return(0,H.jsx)("div",{draggable:r,className:V.al,...t,children:n})},ti=()=>(0,H.jsx)(c.cG,{orientation:"vertical",flexShrink:0});Object.entries({light:{icon:ec.Y,label:"Light"},dark:{icon:es.X,label:"Dark"},auto:{icon:el.G,label:"System"}}).map(([e,{icon:t,label:n}])=>({id:e,icon:t,label:n})),(0,q.FN)(u.fi);let to=(0,s.createContext)(12),tl=()=>(0,s.useContext)(to),ts=to.Provider;
1function tc(e,t,n){var r,a;return(null==(r=e.validation)||null==(r=r.length)?void 0:r.min)!==void 0&&t.length<e.validation.length.min?new ty(new V.ar(`Must have at least ${e.validation.length.min} element${1===e.validation.length.min?"":"s"}`),n,e):(null==(a=e.validation)||null==(a=a.length)?void 0:a.max)!==void 0&&t.length>e.validation.length.max?new ty(new V.ar(`Must have at most ${e.validation.length.max} element${1===e.validation.length.max?"":"s"}}`),n,e):void 0}let td=new WeakMap,tu=0;function tp(e){return td.has(e)||td.set(e,Array.from({length:e.length},tg)),td.get(e)}function th(e,t){td.set(e,t)}function tg(){return(tu++).toString()}let tf=function(e){switch(e.kind){case"form":return e.defaultValue();case"child":return"block"===e.options.kind?[{type:"paragraph",children:[{text:""}]}]:null;case"conditional":{let t=e.discriminant.defaultValue();return{discriminant:t,value:tf(e.values[t.toString()])}}case"object":{let t={};for(let n of Object.keys(e.fields))t[n]=tf(e.fields[n]);return t}case"array":return[]}(0,q.xb)(e)};function tm(e,t){switch(e.kind){case"form":return void 0===t?e.defaultValue():t;case"child":return null!=t?t:"block"===e.options.kind?[{type:"paragraph",children:[{text:""}]}]:null;case"conditional":{let n=void 0===t?e.discriminant.defaultValue():t.discriminant;return{discriminant:n,value:tm(e.values[n.toString()],void 0===t?void 0:t.value)}}case"object":{let n={};for(let r of Object.keys(e.fields))n[r]=tm(e.fields[r],void 0===t?void 0:t[r]);return n}case"array":return(null!=t?t:[]).map(t=>tm(e.element,t.value))}(0,q.xb)(e)}function tb(e,t,n){if(void 0===n)return t;switch(e.kind){case"form":case"child":return n;case"conditional":return{discriminant:n.discriminant,value:n.discriminant===t.discriminant?tb(e.values[n.discriminant.toString()],t.value,n.value):tm(e.values[n.discriminant.toString()],n.value)};case"object":{let r={};for(let a of Object.keys(e.fields))r[a]=tb(e.fields[a],t[a],n[a]);return r}case"array":{let r=new Set;
1for(let e of n)if(void 0!==e.key){if(r.has(e.key))throw Error("Array elements must have unique keys");r.add(e.key)}let a=n.map(e=>{if(void 0!==e.key)return e.key;let t=tg();for(;r.has(t);)t=tg();return r.add(t),t}),i=tp(t),o=new Map(t.map((e,t)=>[i[t],e])),l=n.map((t,n)=>{let r=a[n];return o.has(r)?tb(e.element,o.get(r),t.value):tm(e.element,t.value)});return th(l,a),l}}(0,q.xb)(e)}class ty extends Error{constructor(e,t,n){super(`field error at ${t.join(".")}`,{cause:e}),this.path=t,this.schema=n,this.cause=e}}function tk(e){if(null!==e)return e}let tx=Array.isArray;function tv(e,t,n,r,a,i){let o=tk(t);if("form"===e.kind)try{return a(e,o,n,r)}catch(t){throw new ty(t,n,e)}if("child"===e.kind)return null;if("conditional"===e.kind){if(void 0===o)return tf(e);try{if("object"!=typeof o||null===o||tx(o)||o instanceof Date)throw new V.ar("Must be an object");for(let e of Object.keys(o))if("discriminant"!==e&&"value"!==e)throw new V.ar(`Must only contain keys "discriminant" and "value", not "${e}"`)}catch(t){throw new ty(t,n,e)}let t=tv(e.discriminant,o.discriminant,n.concat("discriminant"),r.concat("discriminant"),a,i);return{discriminant:t,value:tv(e.values[t],o.value,n.concat("value"),r.concat("value"),a,i)}}if("object"===e.kind){void 0===o&&(o={});try{if("object"!=typeof o||null===o||tx(o)||o instanceof Date)throw new V.ar("Must be an object");let t=new Set(Object.keys(e.fields));for(let e of Object.keys(o))if(!t.has(e))throw new V.ar(`Key on object value "${e}" is not allowed`)}catch(t){throw new ty(t,n,e)}let t={},l=[];for(let s of Object.keys(e.fields)){let c=o[s];try{let o=tv(e.fields[s],c,n.concat(s),r.concat(s),a,i);t[s]=o}catch(e){l.push(e)}}if(l.length)throw AggregateError(l);return t}if("array"===e.kind){if(void 0===o)return[];try{if(!tx(o))throw new V.ar("Must be an array")}catch(t){throw new ty(t,n,e)}let t=[];try{if(i){let r=tc(e,o,n);void 0!==r&&t.push(r)}return o.map((o,l)=>{try{let t=l.toString();if(e.slugField&&"object"==typeof o&&null!==o&&!tx(o)&&!(o instanceof Date)){let n;if("object"!==e.element.kind)throw Error("slugField on array fields requires the an object field element");let r=e.element.fields[e.slugField];if(!r)throw Error(`slugField "${e.slugField}" does not exist on object field`);if("form"!==r.kind)throw Error(`slugField "${e.slugField}" is not a form field`);if("slug"!==r.formKind)throw Error(`slugField "${e.slugField}" is not a slug field`);try{n=r.parse(tk(o[e.slugField]),void 0)}catch(e){throw AggregateError([e])}t=r.serializeWithSlug(n).slug}return tv(e.element,o,n.concat(l),r.concat(t),a,i)}catch(e){t.push(e)}})}finally{if(t.length)throw AggregateError(t)}}(0,q.xb)(e)}function tw(e){return(function e(t){return t instanceof AggregateError?t.errors.flatMap(e):[t]})(e).map(e=>{if(e instanceof ty){let t=e.path.join(".");return`${t}: ${e.cause instanceof V.ar?e.cause.message:`Unexpected error: ${e.cause}`}`}return`Unexpected error: ${e}`}).join("\n")}function tS(e,t,n){try{return function e(t,n,r,a=[]){switch(t.kind){case"child":return;case"form":try{if(r&&a[a.length-1]===(null==r?void 0:r.field))return void t.validate(n,{slugField:{slugs:r.slugs,glob:r.glob}});t.validate(n,void 0)}catch(e){throw new ty(e,a,t)}return;case"conditional":t.discriminant.validate(n.discriminant),e(t.values[n.discriminant],n.value,void 0,a.concat("value"));return;case"object":{let i=[];for(let[o,l]of Object.entries(t.fields))try{e(l,n[o],o===(null==r?void 0:r.field)?r:void 0,a.concat(o))}catch(e){i.push(e)}if(i.length>0)throw AggregateError(i);return}case"array":{let r;if(void 0!==t.slugField&&"object"===t.element.kind){let e=t.element.fields,{slugField:a}=t;r={slugField:a,slugs:n.map(t=>(0,V.P)({schema:e,slugField:a},t))}}let i=[],o=tc(t,n,a);for(let[l,s]of(void 0!==o&&i.push(o),n.entries()))try{e(t.element,s,void 0===r?void 0:{field:r.slugField,slugs:new Set(r.slugs.filter((e,t)=>l!==t)),glob:"*"},a.concat(l))}catch(e){i.push(e)}if(i.length>0)throw AggregateError(i);return}}}
1(e,t,n),!0}catch(e){return console.warn(Error(`Field validation failed:
2`+tw(e))),!1}}let tE=u.sr.below.tablet;function tj(e){let t,n,r,a,i,l=(0,o.c)(16),{field:s,fieldKey:c,span:d,forceValidation:p,firstFocusable:h,omitFieldAtPath:g}=e,f=`span ${d}`;l[0]!==f?(t=(0,u.AH)({gridColumn:f,[tE]:{gridColumn:"span 12"}}),l[0]=f,l[1]=t):t=l[1];let m=c===h;return l[2]!==p||l[3]!==m||l[4]!==g||l[5]!==s?(n=(0,H.jsx)(aa,{forceValidation:p,autoFocus:m,omitFieldAtPath:g,...s}),l[2]=p,l[3]=m,l[4]=g,l[5]=s,l[6]=n):n=l[6],l[7]!==c||l[8]!==n?(r=(0,H.jsx)(V.as,{part:c,children:n}),l[7]=c,l[8]=n,l[9]=r):r=l[9],l[10]!==t||l[11]!==r?(a=(0,H.jsx)("div",{className:t,children:r}),l[10]=t,l[11]=r,l[12]=a):a=l[12],l[13]!==d||l[14]!==a?(i=(0,H.jsx)(ts,{value:d,children:a}),l[13]=d,l[14]=a,l[15]=i):i=l[15],i}function tA(e){var t;let n,r,a,i,l,u,p,h,g=(0,o.c)(33),{schema:f,autoFocus:m,fields:b,forceValidation:y,omitFieldAtPath:k}=e;(t=f).layout&&((0,q.vA)(t.layout.length===Object.keys(t.fields).length,'A column "span" is required for every field in the layout'),(0,q.vA)(t.layout.every(e=>e>0),"The layout must not contain empty columns"),(0,q.vA)(t.layout.every(e=>e<=12),"Fields may not span more than 12 columns"),(0,q.vA)(t.layout.reduce((e,t)=>e+t,0)%12==0,"The layout must span exactly 12 columns")),g[0]!==m||g[1]!==f?(n=m?function(e){for(let[t,n]of Object.entries(e.fields))if(function e(t){if("array"===t.kind||"conditional"===t.kind||"form"===t.kind)return!0;if("child"===t.kind)return!1;if("object"===t.kind){for(let n of Object.values(t.fields))if(e(n))return!0;return!1}(0,q.xb)(t)}(n))return t}(f):void 0,g[0]=m,g[1]=f,g[2]=n):n=g[2];let x=n;e:{let e;if(!k){r=void 0;break e}g[3]!==k?(e=k.slice(1),g[3]=k,g[4]=e):e=g[4],r=e}let v=r;if(g[5]!==b||g[6]!==f.layout||g[7]!==y||g[8]!==x||g[9]!==k||g[10]!==v){let e;g[12]!==f.layout||g[13]!==y||g[14]!==x||g[15]!==k||g[16]!==v?(e=(e,t)=>{var n,r;let[a,i]=e,o=null!=(n=null==(r=f.layout)?void 0:r[t])?n:12;return(0,H.jsx)(tj,{span:o,field:i,fieldKey:a,forceValidation:y,firstFocusable:x,...(null==k?void 0:k[0])===a?{omitFieldAtPath:v}:{}},a)},g[12]=f.layout,g[13]=y,g[14]=x,g[15]=k,g[16]=v,g[17]=e):e=g[17],a=Object.entries(b).map(e),g[5]=b,g[6]=f.layout,g[7]=y,g[8]=x,g[9]=k,g[10]=v,g[11]=a}else a=g[11];g[18]!==a?(i=(0,H.jsx)(c.xA,{columns:"repeat(12, minmax(auto, 1fr))",columnGap:"medium",rowGap:"xlarge",children:a}),g[18]=a,g[19]=i):i=g[19];let w=i,S=(0,s.useId)();if(!f.label)return w;let E=`${S}-label`,j=`${S}-description`,A=f.description?j:void 0;return g[20]!==E||g[21]!==f.label?(l=(0,H.jsx)(d.EY,{color:"neutralEmphasis",size:"medium",weight:"semibold",id:E,children:f.label}),g[20]=E,g[21]=f.label,g[22]=l):l=g[22],g[23]!==f.description||g[24]!==j?(u=!!f.description&&(0,H.jsx)(d.EY,{id:j,size:"regular",color:"neutralSecondary",children:f.description}),g[23]=f.description,g[24]=j,g[25]=u):u=g[25],g[26]===Symbol.for("react.memo_cache_sentinel")?(p=(0,H.jsx)("div",{}),g[26]=p):p=g[26],g[27]!==E||g[28]!==A||g[29]!==l||g[30]!==u||g[31]!==w?(h=(0,H.jsxs)(c.xA,{role:"group",gap:"medium",marginY:"xlarge","aria-labelledby":E,"aria-describedby":A,children:[l,u,p,w]}),g[27]=E,g[28]=A,g[29]=l,g[30]=u,g[31]=w,g[32]=h):h=g[32],h}function tN(e){let t,n,r,a,i,l,s=(0,o.c)(18),{schema:d,autoFocus:u,discriminant:p,onChange:h,value:g,forceValidation:f,omitFieldAtPath:m}=e,b=d.discriminant;e:{let e;if(!m){t=void 0;break e}s[0]!==m?(e=m.slice(1),s[0]=m,s[1]=e):e=s[1],t=e}let y=t,k=!!u;return s[2]!==b.Input||s[3]!==k||s[4]!==p||s[5]!==h||s[6]!==f?(r=(0,H.jsx)(V.as,{part:"discriminant",children:(0,H.jsx)(b.Input,{autoFocus:k,value:p,onChange:h,forceValidation:f})}),s[2]=b.Input,s[3]=k,s[4]=p,s[5]=h,s[6]=f,s[7]=r):r=s[7],n=r,s[8]!==m||s[9]!==y?(a=(null==m?void 0:m[0])==="value"?{omitFieldAtPath:y}:{},s[8]=m,s[9]=y,s[10]=a):a=s[10],s[11]!==f||s[12]!==g||s[13]!==a?(i=(0,H.jsx)(V.as,{part:"value",children:(0,H.jsx)(aa,{forceValidation:f,...g,...a})}),s[11]=f,s[12]=g,s[13]=a,s[14]=i):i=s[14],s[15]!==n||s[16]!==i?(l=(0,H.jsxs)(c.so,{gap:"xlarge",direction:"column",children:[n,i]}),s[15]=n,s[16]=i,s[17]=l):l=s[17],l}let tB=new WeakMap;function tR(e){let t=tB.get(e._);if(!t)throw Error("expected child field data to exist");return t}
2function tC(e,t,n){let r,a={form:(e,t)=>e=>t(()=>e),array:(e,t)=>({rawOnChange:t,inner:new Map,onChange(n){t(t=>tb(e,t,n))}}),child:(e,t)=>e=>t(()=>e),conditional:(e,t)=>({onChange:(n,r)=>t(t=>tb(e,t,{discriminant:n,value:r})),onChangeForValue:e=>t(t=>({discriminant:t.discriminant,value:e(t.value)}))}),object:(e,t)=>({onChange:n=>{t(t=>tb(e,t,n))},innerOnChanges:Object.fromEntries(Object.keys(e.fields).map(e=>[e,n=>{t(t=>({...t,[e]:n(t[e])}))}]))})},i={form:(e,t,n)=>({value:t,onChange:n,schema:e}),child:(e,t,r,a)=>{var i;let o;return{element:n(a),schema:e,_:(i={value:t,onChange:r},o={},tB.set(o,i),o)}},object(e,t,n,r,a){let i={};for(let r of Object.keys(e.fields))i[r]=a(e.fields[r],t[r],n.innerOnChanges[r],r);return{fields:i,onChange:n.onChange,schema:e}},array(e,t,n,r,a){let i=tp(t),o=new Set(tp(t)),l={elements:t.map((t,r)=>{var l,s;let c=i[r];o.delete(c);let d=(l=n.inner,s=()=>{let r=e=>{n.rawOnChange(t=>{let n=tp(t),r=n.indexOf(c),a=[...t];return a[r]=e(a[r]),th(a,n),a})},i=a(e.element,t,r,c);return{element:i,elementWithKey:{...i,key:c},onChange:r}},l.has(c)||l.set(c,s(c)),l.get(c)),u=a(e.element,t,d.onChange,c);return d.element!==u&&(d.element=u,d.elementWithKey={...u,key:c}),d.elementWithKey}),schema:e,onChange:n.onChange};for(let e of o)n.inner.delete(e);return l},conditional:(e,t,n,r,a)=>({discriminant:t.discriminant,onChange:n.onChange,value:a(e.values[t.discriminant.toString()],t.value,n.onChangeForValue,"value"),schema:e})};function o(e,t,n,r,a){return i[e.kind](e,t,n,r,a)}function l(e,t,n,r){let i=new Map,s=a[e.kind](e,n);return{value:t,inner:i,props:o(e,t,s,r,(e,t,n,a)=>{let o=l(e,t,n,r.concat(a));return i.set(a,o),o.props}),schema:e,cached:s}}return n=>void 0===r?(r=l(e,n,t,[])).props:function e(t,n,r,a,i){if(a.schema!==t)return Object.assign(a,l(t,n,r,i)),a.props;if(a.value===n)return a.props;a.value=n;let s=new Set(a.inner.keys());for(let r of(a.props=o(t,n,a.cached,i,(t,n,r,o)=>{if(s.delete(o),!a.inner.has(o)){let e=l(t,n,r,i.concat(o));return a.inner.set(o,e),e.props}return e(t,n,r,a.inner.get(o),i.concat(o))}),s))a.inner.delete(r);return a.props}(e,n,t,r,[])}let tI={child:e=>tR(e).value,form:e=>e.value,array(e){let t=e.elements.map(e=>tT(e));return th(t,e.elements.map(e=>e.key)),t},conditional:e=>({discriminant:e.discriminant,value:tT(e.value)}),object:e=>Object.fromEntries(Object.entries(e.fields).map(([e,t])=>[e,tT(t)]))};function tT(e){return tI[e.schema.kind](e)}let tO={child:e=>null!=e?e:void 0,form:e=>e,array(e,t){let n=tp(e);return e.map((e,r)=>({key:n[r],value:tP(e,t.element)}))},conditional:(e,t)=>({discriminant:e.discriminant,value:tP(e.value,t.values[e.discriminant.toString()])}),object:(e,t)=>Object.fromEntries(Object.entries(t.fields).map(([t,n])=>[t,tP(e[t],n)]))};function tP(e,t){return tO[t.kind](e,t)}function t_(e,t){return e.schema.kind===t}function tF(e){var t,n;let r,a,i,u,p,h,g,m,b,y,k,x,v,w,S=(0,o.c)(51),E=null!=(t=null==(n=e.schema.validation)||null==(n=n.length)?void 0:n.min)?t:0,j=(0,s.useId)(),A=(0,Z.o)(te),N=tL(e),B=!!N;S[0]!==e.schema.description||S[1]!==e.schema.label||S[2]!==N||S[3]!==B?(r={description:e.schema.description,errorMessage:N,isInvalid:B,label:e.schema.label,labelElementType:"span"},S[0]=e.schema.description,S[1]=e.schema.label,S[2]=N,S[3]=B,S[4]=r):r=S[4];let{descriptionProps:R,errorMessageProps:C,fieldProps:I,labelProps:T}=(0,X.M)(r);S[5]===Symbol.for("react.memo_cache_sentinel")?(a={state:"closed"},S[5]=a):a=S[5];let[O,P]=(0,s.useState)(a),_=E>0;S[6]!==_||S[7]!==T||S[8]!==e.schema.label?(i=(0,H.jsx)(l.dh,{elementType:"span",isRequired:_,supplementRequiredState:!0,...T,children:e.schema.label}),S[6]=_,S[7]=T,S[8]=e.schema.label,S[9]=i):i=S[9],S[10]!==e.schema.description||S[11]!==R?(u=e.schema.description&&(0,H.jsx)(l.ry,{...R,children:e.schema.description}),S[10]=e.schema.description,S[11]=R,S[12]=u):u=S[12],S[13]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{P({state:"new"})},S[13]=p):p=S[13],S[14]!==A?(h=A.format("add"),S[14]=A,S[15]=h):h=S[15],S[16]!==e.autoFocus||S[17]!==h?(g=(0,H.jsx)(f.rA,{autoFocus:e.autoFocus,onPress:p,alignSelf:"start",children:h}),S[16]=e.autoFocus,S[17]=h,S[18]=g):g=S[18],S[19]===Symbol.for("react.memo_cache_sentinel")?(m=e=>{P({state:"edit",index:e})},S[19]=m):m=S[19],S[20]!==e?(b=(0,H.jsx)(t$,{...e,"aria-label":e.schema.label,onOpenItem:m}),S[20]=e,S[21]=b):b=S[21],S[22]!==N||S[23]!==C?(y=N&&(0,H.jsx)(l.ih,{...C,children:N}),S[22]=N,S[23]=C,S[24]=y):y=S[24],S[25]===Symbol.for("react.memo_cache_sentinel")?(k=()=>{P({state:"closed"})},S[25]=k):k=S[25];e:{let t,n,r,a,i;if("child"===e.schema.element.kind){x=void 0;break e}if("new"===O.state){let t,n;S[26]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{P({state:"closed"})},S[26]=t):t=S[26],S[27]!==j||S[28]!==e?(n=(0,H.jsx)(tM,{formId:j,onClose:t,previewProps:e}),S[27]=j,S[28]=e,S[29]=n):n=S[29],x=n;break e}if("edit"!==O.state){x=void 0;break e}S[30]===Symbol.for("react.memo_cache_sentinel")?(t=(0,H.jsx)(d.DZ,{children:"Edit item"}),S[30]=t):t=S[30],S[31]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{P({state:"closed"})},S[31]=n):n=S[31],S[32]!==j||S[33]!==O.index||S[34]!==e?(r=(0,H.jsx)(tD,{formId:j,modalStateIndex:O.index,onClose:n,previewProps:e}),S[32]=j,S[33]=O.index,S[34]=e,S[35]=r):r=S[35],S[36]!==j?(a=(0,H.jsx)(f.e2,{children:(0,H.jsx)(f.$n,{form:j,prominence:"high",type:"submit",children:"Done"})}),S[36]=j,S[37]=a):a=S[37],S[38]!==r||S[39]!==a?(i=(0,H.jsxs)(K.lG,{children:[t,r,a]}),S[38]=r,S[39]=a,S[40]=i):i=S[40],x=i}return S[41]!==x?(v=(0,H.jsx)(K.Uz,{onDismiss:k,children:x}),S[41]=x,S[42]=v):v=S[42],S[43]!==I||S[44]!==i||S[45]!==u||S[46]!==g||S[47]!==b||S[48]!==y||S[49]!==v?
2(w=(0,H.jsxs)(c.Tk,{gap:"medium",role:"group",minWidth:0,...I,children:[i,u,g,b,y,v]}),S[43]=I,S[44]=i,S[45]=u,S[46]=g,S[47]=b,S[48]=y,S[49]=v,S[50]=w):w=S[50],w}function tM(e){let[t,n]=(0,s.useState)(!1),r=(0,Z.o)(te),a=(0,s.useMemo)(()=>{if(void 0===e.previewProps.schema.slugField||"object"!==e.previewProps.schema.element.kind)return;let t=tT(e.previewProps),n=e.previewProps.schema.element.fields,r=e.previewProps.schema.slugField;return{slugs:new Set(t.map(e=>(0,V.P)({schema:n,slugField:r},e))),field:r,glob:"*"}},[e.previewProps]),[i,o]=(0,s.useState)(()=>tf(e.previewProps.schema.element)),l=(0,s.useMemo)(()=>tC(e.previewProps.schema.element,o,()=>void 0),[e.previewProps.schema.element,o])(i);return(0,H.jsxs)(K.lG,{children:[(0,H.jsx)(d.DZ,{children:"Add item"}),(0,H.jsx)(J.UC,{children:(0,H.jsx)(c.Tk,{id:e.formId,elementType:"form",onSubmit:t=>{if(t.target===t.currentTarget){if(t.preventDefault(),!tS(e.previewProps.schema.element,i,void 0))return void n(!0);e.previewProps.onChange([...e.previewProps.elements.map(e=>({key:e.key})),{key:void 0,value:tP(i,e.previewProps.schema.element)}]),e.onClose()}},gap:"xxlarge",children:(0,H.jsx)(ao,{slugField:a,autoFocus:!0,...l,forceValidation:t})})}),(0,H.jsxs)(f.e2,{children:[(0,H.jsx)(f.$n,{onPress:()=>{e.onClose()},children:r.format("cancel")}),(0,H.jsx)(f.$n,{form:e.formId,prominence:"high",type:"submit",children:r.format("add")})]})]})}function tD(e){let t,n,r,a,i,l=(0,o.c)(25);e:{let n,r,a;if(void 0===e.previewProps.schema.slugField||"object"!==e.previewProps.schema.element.kind){t=void 0;break e}let i=e.previewProps;if(l[0]!==i||l[1]!==e.previewProps.schema.element.fields||l[2]!==e.previewProps.schema.slugField||l[3]!==e.modalStateIndex){let t,a,o=tT(i),s=e.previewProps.schema.element.fields;r=e.previewProps.schema.slugField,l[6]!==e.modalStateIndex?(t=(t,n)=>n!==e.modalStateIndex,l[6]=e.modalStateIndex,l[7]=t):t=l[7],l[8]!==s||l[9]!==r?(a=e=>(0,V.P)({schema:s,slugField:r},e),l[8]=s,l[9]=r,l[10]=a):a=l[10],n=new Set(o.filter(t).map(a)),l[0]=i,l[1]=e.previewProps.schema.element.fields,l[2]=e.previewProps.schema.slugField,l[3]=e.modalStateIndex,l[4]=n,l[5]=r}else n=l[4],r=l[5];let o=n;l[11]!==o||l[12]!==r?(a={slugs:o,field:r,glob:"*"},l[11]=o,l[12]=r,l[13]=a):a=l[13],t=a}let s=t,d=e.previewProps.elements[e.modalStateIndex];if(l[14]!==d){let{key:e,...t}=d;n=t,l[14]=d,l[15]=n}else n=l[15];return l[16]!==e?(r=t=>{t.target===t.currentTarget&&(t.preventDefault(),e.onClose())},l[16]=e,l[17]=r):r=l[17],l[18]!==s||l[19]!==n?(a=(0,H.jsx)(ao,{slugField:s,autoFocus:!0,...n}),l[18]=s,l[19]=n,l[20]=a):a=l[20],l[21]!==e.formId||l[22]!==r||l[23]!==a?(i=(0,H.jsx)(J.UC,{children:(0,H.jsx)(c.Tk,{id:e.formId,elementType:"form",onSubmit:r,gap:"xxlarge",children:a})}),l[21]=e.formId,l[22]=r,l[23]=a,l[24]=i):i=l[24],i}function tL(e){var t,n;let r,{elements:a,forceValidation:i,schema:o}=e,l=null==(t=o.validation)||null==(t=t.length)?void 0:t.min,s=null==(n=o.validation)||null==(n=n.length)?void 0:n.max;e:{if(i){if(l&&a.length<l){r=`Must have at least ${tr(l,{singular:"item"})}.`;break e}else if(s&&a.length>s){r=`Must have at most ${tr(s,{singular:"item"})}.`;break e}}r=void 0}return r}function t$(e){let t=(0,s.useMemo)(()=>Math.random().toString(36),[]),{dragAndDropHooks:n}=(0,G.gY)({getItems:e=>[...e].map(e=>({[t]:e=JSON.stringify(e),"text/plain":e})),getAllowedDropOperations:()=>["move","cancel"],async onDrop(n){if("root"!==n.target.type&&"on"!==n.target.dropPosition){let r=[];for(let e of n.items)if("text"===e.kind){let n;e.types.has(t)?(n=JSON.parse(await e.getText(t)),r.push(n)):e.types.has("text/plain")&&(r=(n=await e.getText("text/plain")).split("\n").map(e=>e.replaceAll('"',"")))}((t,n)=>{let r=e.elements.findIndex(e=>e.key===n.key);if(-1===r)return;let a=e.elements.map(e=>({key:e.key})),i="before"===n.dropPosition?r:r+1,o=t.map(e=>a.findIndex(t=>t.key===e));e.onChange((0,G.Cy)(a,o,i))})(r,n.target)}},getDropOperation:e=>"root"===e.type||"on"===e.dropPosition?"cancel":"move"}),r=(0,V.W)(t=>{e.onChange(e.elements.map(e=>({key:e.key})).filter(e=>e.key!==t))}),a=(0,Z.o)(te);return(0,H.jsx)(Y.u,{"aria-label":e["aria-label"],items:e.elements,dragAndDropHooks:n,height:e.elements.length?void 0:"scale.2000",selectionMode:"none",renderEmptyState:tz,onAction:t=>{let n=e.elements.findIndex(e=>e.key===t);-1!==n&&e.onOpenItem(n)},children:t=>{var n,i;let o=(null==(n=(i=e.schema).itemLabel)?void 0:n.call(i,t))||`Item ${e.elements.indexOf(t)+1}`;return(0,H.jsxs)(Y.q,{textValue:o,children:[(0,H.jsx)(d.EY,{children:o}),(0,H.jsxs)(T.k,{placement:"start",children:[(0,H.jsx)(f.rA,{onPress:()=>{r(t.key)},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{children:a.format("delete")})]})]},t.key)}})}function tz(){return(0,H.jsxs)(c.Tk,{gap:"large",alignItems:"center",justifyContent:"center",height:"100%",padding:"regular",children:[(0,H.jsx)(d.EY,{elementType:"h3",align:"center",color:"neutralSecondary",size:"large",weight:"medium",children:"Empty list"}),(0,H.jsx)(d.EY,{align:"center",color:"neutralTertiary",children:"Add the first item to see it here."})]})}let tU=e=>(e=>"ordered-list"===e||"unordered-list"===e)(e.type),tK=s.createContext(null);function tq(){let e=(0,s.useContext)(tK);if(!e)throw Error("ToolbarStateProvider must be used to use useToolbarState");return e}function tV(e){let t=Q.KE.above(e,{match:tU});return t?t[0].type:"none"}let tH=(0,s.createContext)(null);function tG(){let e=(0,s.useContext)(tH);if(!e)throw Error("useDocumentEditorConfig must be used within a DocumentEditorConfigContext.Provider");return e}let tW=({children:e,componentBlocks:t,editorDocumentFeatures:n})=>{let r=(0,ee.Zi)();return(0,H.jsx)(tH.Provider,{value:(0,s.useMemo)(()=>({componentBlocks:t,documentFeatures:n}),[t,n]),children:(0,H.jsx)(tK.Provider,{value:((e,t,n)=>{let r=(0,V.aw)(e,n,t)||{kind:"block",inlineMarks:"inherit",documentFeatures:{dividers:!0,formatting:{alignment:{center:!0,end:!0},blockTypes:{blockquote:!0,code:n.formatting.blockTypes.code},headings:n.formatting.headings,listTypes:{ordered:!0,unordered:!0}
2},layouts:n.layouts,links:!0,images:n.images,tables:!0},softBreaks:!0,componentBlocks:!0},[a]=Q.KE.nodes(e,{match:e=>"code"!==e.type&&(0,V.au)(e)}),i=Q.KE.marks(e)||{},o=Object.fromEntries(V.ax.map(e=>[e,{isDisabled:"inherit"!==r.inlineMarks&&!r.inlineMarks[e]||!a,isSelected:!!i[e]}]));if(e.selection&&Q.Q6.isExpanded(e.selection))for(let t of Q.KE.nodes(e,{match:Q.EY.isText}))for(let e of Object.keys(t[0]))"insertMenu"!==e&&"text"!==e&&e in o&&(o[e].isSelected=!0);let[l]=Q.KE.nodes(e,{match:(0,V.av)("heading")}),[s]=Q.KE.nodes(e,{match:tU}),[c]=Q.KE.nodes(e,{match:(0,V.av)("paragraph","heading")}),d=tV(e);return{marks:o,textStyles:{selected:l?l[0].level:"normal",allowedHeadingLevels:"block"!==r.kind||s?[]:r.documentFeatures.formatting.headings.levels},code:{isSelected:(0,V.ay)(e,"code"),isDisabled:!("block"===r.kind&&r.documentFeatures.formatting.blockTypes.code)},lists:{ordered:{isSelected:(0,V.ay)(e,"ordered-list")&&("none"===d||"ordered-list"===d),isDisabled:!("block"===r.kind&&r.documentFeatures.formatting.listTypes.ordered&&!l)},unordered:{isSelected:(0,V.ay)(e,"unordered-list")&&("none"===d||"unordered-list"===d),isDisabled:!("block"===r.kind&&r.documentFeatures.formatting.listTypes.unordered&&!l)}},alignment:{isDisabled:!c&&!("block"===r.kind&&r.documentFeatures.formatting.alignment),selected:(null==c?void 0:c[0].textAlign)||"start"},blockquote:{isDisabled:!("block"===r.kind&&r.documentFeatures.formatting.blockTypes.blockquote),isSelected:(0,V.ay)(e,"blockquote")},layouts:{isSelected:(0,V.ay)(e,"layout")},links:{isDisabled:!e.selection||Q.Q6.isCollapsed(e.selection)||!r.documentFeatures.links,isSelected:(0,V.ay)(e,"link")},editor:e,dividers:{isDisabled:"inline"===r.kind||!r.documentFeatures.dividers},clearFormatting:{isDisabled:!(Object.values(o).some(e=>e.isSelected)||function(e){let[t]=Q.KE.nodes(e,{match:e=>"heading"===e.type||"code"===e.type||"blockquote"===e.type});return!!t}(e))},editorDocumentFeatures:n}})(r,t,n),children:e})})};globalThis.Prism={manual:!0};var tY=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},a.util.type(t)){case"Object":if(n[i=a.util.objId(t)])return n[i];for(var o in r={},n[i]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case"Array":if(n[i=a.util.objId(t)])return n[i];return r=[],n[i]=r,t.forEach(function(t,a){r[a]=e(t,n)}),r;default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=a.util.clone(a.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||a.languages)[e],o={};for(var l in i)if(i.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);n.hasOwnProperty(l)||(o[l]=i[l])}var c=r[e];return r[e]=o,a.languages.DFS(a.languages,function(t,n){n===c&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,i){i=i||{};var o=a.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],r||l);var s=t[l],c=a.util.type(s);"Object"!==c||i[o(s)]?"Array"!==c||i[o(s)]||(i[o(s)]=!0,e(s,n,l,i)):(i[o(s)]=!0,e(s,n,null,i))}}},plugins:{},highlightAll:function(e,t){a.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),a.hooks.run("before-all-elements-highlight",r);for(var i,o=0;i=r.elements[o++];)a.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=a.util.getLanguage(t),o=a.languages[i];a.util.setLanguage(t,i);var l=t.parentElement;
2l&&"pre"===l.nodeName.toLowerCase()&&a.util.setLanguage(l,i);var s=t.textContent,c={element:t,language:i,grammar:o,code:s};function d(e){c.highlightedCode=e,a.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,a.hooks.run("after-highlight",c),a.hooks.run("complete",c),r&&r.call(c.element)}if(a.hooks.run("before-sanity-check",c),(l=c.element.parentElement)&&"pre"===l.nodeName.toLowerCase()&&!l.hasAttribute("tabindex")&&l.setAttribute("tabindex","0"),!c.code){a.hooks.run("complete",c),r&&r.call(c.element);return}if(a.hooks.run("before-highlight",c),!c.grammar)return void d(a.util.encode(c.code));if(n&&e.Worker){var u=new Worker(a.filename);u.onmessage=function(e){d(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else d(a.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(a.hooks.run("before-tokenize",r),!r.grammar)throw Error('The language "'+r.language+'" has no grammar.');return r.tokens=a.tokenize(r.code,r.grammar),a.hooks.run("after-tokenize",r),i.stringify(a.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var c=new l;return s(c,c.head,e),function e(t,n,r,l,c,d){for(var u in r)if(r.hasOwnProperty(u)&&r[u]){var p=r[u];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(d&&d.cause==u+","+h)return;var g=p[h],f=g.inside,m=!!g.lookbehind,b=!!g.greedy,y=g.alias;if(b&&!g.pattern.global){var k=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,k+"g")}for(var x=g.pattern||g,v=l.next,w=c;v!==n.tail&&(!d||!(w>=d.reach));w+=v.value.length,v=v.next){var S,E=v.value;if(n.length>t.length)return;if(!(E instanceof i)){var j=1;if(b){if(!(S=o(x,w,t,m))||S.index>=t.length)break;var A=S.index,N=S.index+S[0].length,B=w;for(B+=v.value.length;A>=B;)B+=(v=v.next).value.length;if(B-=v.value.length,w=B,v.value instanceof i)continue;for(var R=v;R!==n.tail&&(B<N||"string"==typeof R.value);R=R.next)j++,B+=R.value.length;j--,E=t.slice(w,B),S.index-=w}else if(!(S=o(x,0,E,m)))continue;var A=S.index,C=S[0],I=E.slice(0,A),T=E.slice(A+C.length),O=w+E.length;d&&O>d.reach&&(d.reach=O);var P=v.prev;if(I&&(P=s(n,P,I),w+=I.length),function(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}(n,P,j),v=s(n,P,new i(u,f?a.tokenize(C,f):C,y,C)),T&&s(n,v,T),j>1){var _={cause:u+","+h,reach:O};e(t,n,r,v.prev,w,_),d&&_.reach>d.reach&&(d.reach=_.reach)}}}}}}(e,c,t,c.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(c)},hooks:{all:{},add:function(e,t){var n=a.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=a.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}if(e.Prism=a,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(i.classes,o):i.classes.push(o)),a.hooks.run("wrap",i);var l="";for(var s in i.attributes)l+=" "+s+'="'+(i.attributes[s]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+l+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener&&(a.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,o=n.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),o&&e.close()},!1)),a;var c=a.util.currentScript();function d(){a.manual||a.highlightAll()}if(c&&(a.filename=c.src,c.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var u=document.readyState;"loading"===u||"interactive"===u&&c&&c.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return a}(globalThis);tY.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>
2\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},tY.languages.markup.tag.inside["attr-value"].inside.entity=tY.languages.markup.entity,tY.languages.markup.doctype.inside["internal-subset"].inside=tY.languages.markup,tY.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(tY.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:tY.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:tY.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},tY.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(tY.languages.markup.tag,"addAttribute",{value:function(e,t){tY.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:tY.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),tY.languages.html=tY.languages.markup,tY.languages.mathml=tY.languages.markup,tY.languages.svg=tY.languages.markup,tY.languages.xml=tY.languages.extend("markup",{}),tY.languages.ssml=tY.languages.xml,tY.languages.atom=tY.languages.xml,tY.languages.rss=tY.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(tY),tY.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},tY.languages.javascript=tY.languages.extend("clike",{"class-name":[tY.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source)+"|"+/(?:\d+(?:_\d+)*(?
2:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),tY.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,tY.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:tY.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:tY.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:tY.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:tY.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:tY.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),tY.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:tY.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),tY.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),tY.languages.markup&&(tY.languages.markup.tag.addInlined("script","javascript"),tY.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),tY.languages.js=tY.languages.javascript,function(){if(void 0!==tY&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",r="loaded",a="pre[data-src]:not(["+t+'="'+r+'"]):not(['+t+'="'+n+'"])';tY.hooks.add("before-highlightall",function(e){e.selector+=", "+a}),tY.hooks.add("before-sanity-check",function(i){var o=i.element;if(o.matches(a)){i.code="",o.setAttribute(t,n);var l,s,c,d,u=o.appendChild(document.createElement("CODE"));u.textContent="Loading…";var p=o.getAttribute("data-src"),h=i.language;if("none"===h){var g=(/\.(\w+)$/.exec(p)||[,"none"])[1];h=e[g]||g}tY.util.setLanguage(u,h),tY.util.setLanguage(o,h);var f=tY.plugins.autoloader;f&&f.loadLanguages(h),l=p,s=function(e){o.setAttribute(t,r);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],a=t[3];return r?a?[n,Number(a)]:[n,void 0]:[n,n]}}(o.getAttribute("data-range"));if(n){var a=e.split(/\r\n?|\n/g),i=n[0],l=null==n[1]?a.length:n[1];i<0&&(i+=a.length),i=Math.max(0,Math.min(i-1,a.length)),l<0&&(l+=a.length),l=Math.max(0,Math.min(l,a.length)),e=a.slice(i,l).join("\n"),o.hasAttribute("data-start")||o.setAttribute("data-start",String(i+1))}u.textContent=e,tY.highlightElement(u)},c=function(e){o.setAttribute(t,"failed"),u.textContent=e},(d=new XMLHttpRequest).open("GET",l,!0),d.onreadystatechange=function(){var e;4==d.readyState&&(d.status<400&&d.responseText?s(d.responseText):d.status>=400?c((e=d.status,"✖ Error "+e+" while fetching file: "+d.statusText)):c("✖ Error: File does not exist or is empty"))},d.send(null)}}),tY.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(a),r=0;t=n[r++];)tY.highlightElement(t)}};var i=!1;tY.fileHighlight=function(){i||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),i=!0),tY.plugins.fileHighlight.highlight.apply(this,arguments)}}}(),tY.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}
vendor: 4,467 bytes, line 2
2],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},tY.languages.c=tY.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),tY.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),tY.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},tY.languages.c.string],char:tY.languages.c.char,comment:tY.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:tY.languages.c}}}}),tY.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete tY.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w
2*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(tY),tY.languages.arduino=tY.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),tY.languages.ino=tY.languages.arduino,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_
2CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>
vendor: 5,535 bytes, line 2
2&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,o=0;o<a.length;o++)i[a[o]]=e.languages.bash[a[o]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(tY),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var a="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",o="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",l="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function s(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=s(i),d=RegExp(s(a+" "+i+" "+o+" "+l)),u=s(i+" "+o+" "+l),p=s(a+" "+i+" "+l),h=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),g=r(/\((?:[^()]|<<self>>)*\)/.source,2),f=/@?\b[A-Za-z_]\w*\b/.source,m=t(/<<0>>(?:\s*<<1>>)?/.source,[f,h]),b=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,m]),y=/\[\s*(?:,\s*)*\]/.source,k=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[b,y]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[h,g,y]),v=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),w=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[v,b,y]),S={keyword:d,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,j=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[b]),lookbehind:!0,inside:S},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[f,w]),lookbehind:!0,inside:S},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[f]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,m]),lookbehind:!0,inside:S},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[b]),lookbehind:!0,inside:S},{pattern:n(/(\bwhere\s+)<<0>>/.source,[f]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[k]),lookbehind:!0,inside:S},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[w,p,f]),inside:S}],keyword:d,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[f]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[f]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[g]),lookbehind:!0,alias:"class-name",inside:S},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[w,b]),inside:S,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[w]),lookbehind:!0,inside:S,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[f,h]),inside:{function:n(/^<<0>>/.source,[f]),generic:{pattern:RegExp(h),alias:"class-name",inside:S}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,m,f,w,d.source,g,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[m,g]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:d,"class-name":{pattern:RegExp(w),greedy:!0,inside:S},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var N=j+"|"+E,B=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[N]),R=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[B]),2),C=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[b,R]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>
2)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[C,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[C]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[R]),inside:e.languages.csharp},"class-name":{pattern:RegExp(b),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var T=/:[^}\r\n]+/.source,O=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[B]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[O,T]),_=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[N]),2),F=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[_,T]);function M(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,T]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:M(P,O)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[F]),lookbehind:!0,greedy:!0,inside:M(F,_)}],char:{pattern:RegExp(E),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(tY),tY.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},tY.languages.markup.tag.inside["attr-value"].inside.entity=tY.languages.markup.entity,tY.languages.markup.doctype.inside["internal-subset"].inside=tY.languages.markup,tY.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(tY.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:tY.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:tY.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},tY.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(tY.languages.markup.tag,"addAttribute",{value:function(e,t){tY.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:tY.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),tY.languages.html=tY.languages.markup,tY.languages.mathml=tY.languages.markup,tY.languages.svg=tY.languages.markup,tY.languages.xml=tY.languages.extend("markup",{}),tY.languages.ssml=tY.languages.xml,tY.languages.atom=tY.languages.xml,tY.languages.rss=tY.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]
2*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(tY),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(tY),tY.languages.go=tY.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),tY.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete tY.languages.go["class-name"],tY.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/},function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w
2*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(tY),function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",a=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:a,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(tY),tY.languages.javascript=tY.languages.extend("clike",{"class-name":[tY.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source)+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),tY.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,tY.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}
2/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:tY.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:tY.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:tY.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:tY.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:tY.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),tY.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:tY.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),tY.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),tY.languages.markup&&(tY.languages.markup.tag.addInlined("script","javascript"),tY.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),tY.languages.js=tY.languages.javascript,function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return RegExp(e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return a}),t)}a=i(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(o).join(""):""},l=function(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],i=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===o(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var s=o(a);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(s+=o(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=o(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}a.content&&"string"!=typeof a.content&&l(a.content)}};e.hooks.add("after-tokenize",function(e){("jsx"===e.language||"tsx"===e.language)&&l(e.tokens)})}(tY),tY.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},tY.languages.webmanifest=tY.languages.json,function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?
2:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(tY),tY.languages.less=tY.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),tY.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),tY.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},tY.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ 	]+"+t.source+")?|"+t.source+"(?:[ 	]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),i=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(e,t){return t=(t||"").replace(/m/g,"")+"m",RegExp(/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e}),t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+a+"|"+i+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(i),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(tY),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2}
2)*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){("markdown"===e.language||"md"===e.language)&&function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a=t[n];if("code"!==a.type){e(a.content);continue}var i=a.content[1],o=a.content[3];if(i&&o&&"code-language"===i.type&&"code-block"===o.type&&"string"==typeof i.content){var l=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),s="language-"+(l=(/[a-z][\w-]*/i.exec(l)||[""])[0].toLowerCase());o.alias?"string"==typeof o.alias?o.alias=[o.alias,s]:o.alias.push(s):o.alias=[s]}}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n,r="",a=0,i=t.classes.length;a<i;a++){var c=t.classes[a],d=/language-(.+)/.exec(c);if(d){r=d[1];break}}var u=e.languages[r];if(u){t.content=e.highlight((n=t.content.replace(o,"")).replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){if("#"===(t=t.toLowerCase())[0])return s("x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)));var n=l[t];return n||e}),u,r)}
2else if(r&&"none"!==r&&e.plugins.autoloader){var p="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=p,e.plugins.autoloader.loadLanguages(r,function(){var t=document.getElementById(p);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[r],r))})}}});var o=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(tY),tY.languages.objectivec=tY.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete tY.languages.objectivec["class-name"],tY.languages.objc=tY.languages.objectivec,function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(tY),function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,i){if(n.language===r){var o=n.tokenStack=[];n.code=n.code.replace(a,function(e){if("function"==typeof i&&!i(e))return e;for(var a,l=o.length;-1!==n.code.indexOf(a=t(r,l));)++l;return o[l]=e,a}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,i=Object.keys(n.tokenStack);!function o(l){for(var s=0;s<l.length&&!(a>=i.length);s++){var c=l[s];if("string"==typeof c||c.content&&"string"==typeof c.content){var d=i[a],u=n.tokenStack[d],p="string"==typeof c?c:c.content,h=t(r,d),g=p.indexOf(h);if(g>-1){++a;var f=p.substring(0,g),m=new e.Token(r,e.tokenize(u,n.grammar),"language-"+r,u),b=p.substring(g+h.length),y=[];f&&y.push.apply(y,o([f])),y.push(m),b&&y.push.apply(y,o([b])),"string"==typeof c?l.splice.apply(l,[s,1].concat(y)):c.content=y}}else c.content&&o(c.content)}return l}(n.tokens)}}}})}(tY),function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0}
vendor: 4,534 bytes, line 2
2,/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,a=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:a,punctuation:i};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;
2|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];e.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:a,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}(tY),tY.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},tY.languages.python["string-interpolation"].inside.interpolation.inside.rest=tY.languages.python,tY.languages.py=tY.languages.python,tY.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2}
2)*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(tY),function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"}
2,constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(tY),function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(tY),tY.languages.scss=tY.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),tY.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),tY.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),tY.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),tY.languages.scss.atrule.inside.rest=tY.languages.scss,tY.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPL
2ICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},tY.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ 	]*")+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},tY.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=tY.languages.swift}),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(tY),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(tY),tY.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|
2LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/},tY.languages.vbnet=tY.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/});let tJ=(0,s.createContext)(null);function tZ(){return(0,s.useContext)(tJ)}function tX(e){let t,n=(0,o.c)(2);return n[0]!==e.children?(t=(0,H.jsx)(tJ.Provider,{value:null,children:e.children}),n[0]=e.children,n[1]=t):t=n[1],t}function tQ(e){return e===(0,em.Jf)(e)}let t0=(e,t)=>{if((0,V.ay)(e,"link"))return void Q.gB.unwrapNodes(e,{match:e=>"link"===e.type});let{selection:n}=e;n&&Q.Q6.isCollapsed(n)?Q.gB.insertNodes(e,{type:"link",href:t,children:[{text:t}]}):Q.gB.wrapNodes(e,{type:"link",href:t,children:[{text:""}]},{split:!0})},t1=({attributes:e,children:t,element:n})=>{let r=(0,Z.o)(te),a=(0,ee.RV)(),[i,o]=(0,V.aC)(a,n),l=i.href,u=Q.bP.string(i),[p,h]=(0,s.use
2State)(!1),g=(0,V.aD)()===n;(0,s.useEffect)(()=>{g&&!l&&h(!0)},[l,g]);let m=(0,V.W)(()=>{Q.gB.unwrapNodes(a,{at:ee.rL.findPath(a,n)}),ee.rL.focus(a)});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(V.aE,{element:n,children:[(0,H.jsx)("a",{href:l,...e,children:t}),(0,H.jsx)(V.aF,{placement:"bottom start",children:(0,H.jsxs)(c.so,{gap:"small",padding:"regular",children:[(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>h(!0),children:(0,H.jsx)(b.I,{src:ep.I})}),(0,H.jsx)(T.m,{children:r.format("edit")})]}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{window.open(l,"_blank","noopener,noreferrer")},children:(0,H.jsx)(b.I,{src:eh.X})}),(0,H.jsx)(T.m,{children:(0,H.jsx)(d.EY,{truncate:3,children:l})})]}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:m,children:(0,H.jsx)(b.I,{src:ef.$})}),(0,H.jsx)(T.m,{children:"Unlink"})]})]})})]}),(0,H.jsx)(K.Uz,{onDismiss:()=>{h(!1),(0,V.aG)(a)},children:p&&(0,H.jsx)(t2,{text:u,href:l,onSubmit:({href:e})=>{o({href:e})}})})]})};function t2({onSubmit:e,...t}){let[n,r]=(0,s.useState)(t.href||""),[a,i]=(0,s.useState)(!1),{dismiss:o}=(0,K.Bj)(),l=(0,Z.o)(te),u=a&&!tQ(n);return(0,H.jsx)(K.lG,{size:"small",children:(0,H.jsxs)("form",{style:{display:"contents"},onSubmit:t=>{t.target===t.currentTarget&&(t.preventDefault(),u||(o(),e({href:n})))},children:[(0,H.jsxs)(d.DZ,{children:[t.href?"Edit":"Add"," link"]}),(0,H.jsx)(J.UC,{children:(0,H.jsxs)(c.so,{gap:"large",direction:"column",children:[(0,H.jsx)(eu.A_,{label:"Text",value:t.text,isReadOnly:!0}),(0,H.jsx)(eu.A_,{autoFocus:!0,isRequired:!0,onBlur:()=>i(!0),label:"Link",onChange:r,value:n,errorMessage:u&&"Please provide a valid URL."})]})}),(0,H.jsxs)(f.e2,{children:[(0,H.jsx)(f.$n,{onPress:o,children:l.format("cancel")}),(0,H.jsx)(f.$n,{prominence:"high",type:"submit",children:l.format("save")})]})]})})}let t3=(0,H.jsx)(b.I,{src:eg.w}),t4=(0,H.jsxs)(T.k,{children:[(0,H.jsx)(function(){let{editor:e,links:{isDisabled:t,isSelected:n}}=tq();return(0,s.useMemo)(()=>(0,H.jsx)(f.rA,{prominence:"low",isDisabled:t,isSelected:n,onPress:()=>{t0(e,""),ee.rL.focus(e)},children:t3}),[n,t,e])},{}),(0,H.jsx)(T.m,{children:(0,H.jsx)(d.EY,{children:"Link"})})]}),t6={start:{key:"start",label:"Align Start",icon:(0,H.jsx)(b.I,{src:eE.Q})},center:{key:"center",label:"Align Center",icon:(0,H.jsx)(b.I,{src:eA.I})},end:{key:"end",label:"Align End",icon:(0,H.jsx)(b.I,{src:ej.p})}},t9=({alignment:e})=>{let t=tq(),n=(0,s.useMemo)(()=>[t6.start,...Object.keys(e).map(e=>t6[e])],[e]);return(0,s.useMemo)(()=>(0,H.jsxs)(C.cQ,{children:[(0,H.jsxs)(T.k,{children:[(0,H.jsxs)(f.rA,{prominence:"low",children:[t6[t.alignment.selected].icon,(0,H.jsx)(b.I,{src:k.b})]}),(0,H.jsx)(T.m,{children:(0,H.jsx)(d.EY,{children:"Text Alignment"})})]}),(0,H.jsx)(C.W1,{selectionMode:"single",selectedKeys:[t.alignment.selected],items:n,onAction:e=>{"start"===e?Q.gB.unsetNodes(t.editor,"textAlign",{match:e=>"paragraph"===e.type||"heading"===e.type}):Q.gB.setNodes(t.editor,{textAlign:e},{match:e=>"paragraph"===e.type||"heading"===e.type}),ee.rL.focus(t.editor)},children:e=>(0,H.jsxs)(eb.q,{textValue:e.label,children:[(0,H.jsx)(d.EY,{children:e.label}),e.icon]},e.key)})]}),[n,t.alignment.selected,t.editor])},t5=(0,H.jsxs)(T.k,{children:[(0,H.jsx)(()=>{let{editor:e,blockquote:{isDisabled:t,isSelected:n}}=tq();return(0,s.useMemo)(()=>(0,H.jsx)(f.rA,{prominence:"low",isSelected:n,isDisabled:t,onPress:()=>{(e=>{(0,V.ay)(e,"blockquote")?Q.gB.unwrapNodes(e,{match:e=>"blockquote"===e.type}):Q.gB.wrapNodes(e,{type:"blockquote",children:[]})})(e),ee.rL.focus(e)},children:(0,H.jsx)(b.I,{src:A.G})}),[e,t,n])},{}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Quote"}),(0,H.jsx)(d.ue,{children:">⎵"})]})]}),t7=[{label:"C",value:"c"},{label:"C++",value:"cpp"},{label:"Arduino",value:"arduino"},{label:"Bash",value:"bash"},{label:"C#",value:"csharp"},{label:"CSS",value:"css"},{label:"Diff",value:"diff"},{label:"Go",value:"go"},{label:"INI",value:"ini"},{label:"Java",value:"java"},{label:"JavaScript",value:"javascript"},{label:"JSX",value:"jsx"},{label:"JSON",value:"json"},{label:"Kotlin",value:"kotlin"},{label:"Less",value:"less"},{label:"Lua",value:"lua"},{label:"Makefile",value:"makefile"},{label:"Markdown",value:"markdown"},{label:"Objective-C",value:"objectivec"},{label:"Perl",value:"perl"},{label:"PHP",value:"php"},{label:"Python",value:"python"},{label:"R",value:"r"},{label:"Ruby",value:"ruby"},{label:"Rust",value:"rust"},{label:"Sass",value:"sass"},{label:"SCSS",value:"scss"},{label:"SQL",value:"sql"},{label:"Swift",value:"swift"},{label:"TypeScript",value:"typescript"},{label:"TSX",value:"tsx"},{label:"VB.NET",value:"vbnet"},{label:"YAML",value:"yaml"}],t8=new Map(t7.map(e=>[e.value,e.label])),ne=new Map(t7.map(e=>[e.label,e.value])),nt=new Map(t7.map(e=>[tY.languages[e.value],e.value])),nn=new Map(Object.keys(tY.languages).flatMap(e=>{let t=nt.get(tY.languages[e]);return void 0===t?[]:[[e,t]]})),nr=new Map(t7.map(e=>[e.value,[]]));for(let[e,t]of nn)nr.get(t).push(e);let na=[{label:"Plain text",value:"plain",aliases:[]},...[...nr].map(([e,t])=>({label:t8.get(e),value:e,aliases:t}))],ni=new Map([...nn].map(([e,t])=>[e,t8.get(t)]));
2function no(e){let t=(0,ee.RV)(),[n,r]=(0,s.useState)(()=>tm(e.schema,Object.fromEntries(Object.keys(e.schema.fields).map(t=>[t,e.element[t]])))),[a,i]=(0,s.useState)(!1),o=(0,s.useMemo)(()=>tC(e.schema,r,()=>void 0),[e.schema])(n),{dismiss:l}=(0,K.Bj)(),c=(0,Z.o)(te);return(0,H.jsx)(K.lG,{size:"small",children:(0,H.jsxs)("form",{style:{display:"contents"},onSubmit:r=>{if(r.target===r.currentTarget&&(r.preventDefault(),i(!0),tS(e.schema,n,void 0))){l();let r=ee.rL.findPath(t,e.element);console.log(n),Q.gB.setNodes(t,n,{at:r})}},children:[(0,H.jsxs)(d.DZ,{children:[e.nodeLabel," details"]}),(0,H.jsx)(J.UC,{children:(0,H.jsx)(ao,{forceValidation:a,autoFocus:!0,...o})}),(0,H.jsxs)(f.e2,{children:[(0,H.jsx)(f.$n,{onPress:l,children:c.format("cancel")}),(0,H.jsx)(f.$n,{prominence:"high",type:"submit",children:c.format("save")})]})]})})}function nl(e){let t=(0,Z.o)(te);return(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:e.onPress,children:(0,H.jsx)(b.I,{src:ep.I})}),(0,H.jsx)(T.m,{children:t.format("edit")})]})}function ns(e){let t=(0,ee.RV)();return(0,H.jsx)(K.Uz,{onDismiss:()=>{e.onDismiss(),(0,V.aG)(t)},children:e.isOpen&&(0,H.jsx)(no,{element:e.element,nodeLabel:e.nodeLabel,schema:e.schema})})}let nc=(0,H.jsxs)(T.k,{children:[(0,H.jsx)(function(){let{editor:e,code:{isDisabled:t,isSelected:n}}=tq();return(0,s.useMemo)(()=>(0,H.jsx)(f.rA,{isSelected:n,isDisabled:t,prominence:"low",onPress:()=>{n?Q.gB.unwrapNodes(e,{match:e=>"code"===e.type}):Q.gB.wrapNodes(e,{type:"code",children:[{text:""}]}),ee.rL.focus(e)},children:(0,H.jsx)(b.I,{src:x.N})}),[t,n,e])},{}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Code block"}),(0,H.jsx)(d.ue,{children:"```"})]})]});function nd({attributes:e,children:t,element:n}){var r;let a=(0,ee.RV)(),i=(0,s.useRef)(null),[o,l]=(0,s.useState)(n.language?null!=(r=ni.get(n.language))?r:n.language:"Plain text"),[d,u]=(0,s.useState)(!1),{documentFeatures:p}=tG(),h=p.formatting.blockTypes.code&&Object.keys(p.formatting.blockTypes.code.schema.fields).length?p.formatting.blockTypes.code.schema:void 0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ta,{children:(0,H.jsxs)(V.aE,{element:n,children:[(0,H.jsx)("pre",{spellCheck:"false",ref:i,children:(0,H.jsx)("code",{...e,children:t})}),(0,H.jsx)(V.aF,{children:(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[(0,H.jsx)(ed.G3,{"aria-label":"Language",width:"scale.2000",allowsCustomValue:!0,inputValue:o,onInputChange:l,onBlur:()=>{let e=ee.rL.findPath(a,n),t=nn.get(o);if(void 0!==t)return"plain"===t?void Q.gB.unsetNodes(a,"language",{at:e}):(l(t8.get(t)),void Q.gB.setNodes(a,{language:t},{at:e}));let r=ne.get(o);if(void 0!==r)return"plain"===r?void Q.gB.unsetNodes(a,"language",{at:e}):void Q.gB.setNodes(a,{language:r},{at:e});if(""===o){Q.gB.unsetNodes(a,"language",{at:e}),l("Plain text");return}o!==n.language&&Q.gB.setNodes(a,{language:o},{at:e})},onSelectionChange:e=>{let t=ee.rL.findPath(a,n);if(nn.has(o)&&(e=nn.get(o)),null===e)""===o?Q.gB.unsetNodes(a,"language",{at:t}):Q.gB.setNodes(a,{language:o},{at:t});else if("string"==typeof e){if("plain"===e){Q.gB.unsetNodes(a,"language",{at:t}),l("Plain text");return}Q.gB.setNodes(a,{language:e},{at:t});let n=t8.get(e);n&&l(n)}},selectedKey:n.language?nn.get(n.language):"plain",items:(0,s.useMemo)(()=>"Plain text"===o||ne.has(o)?na:(0,eN.Ht)(na,o,{keys:["label","value","aliases"]}),[o]),children:e=>(0,H.jsx)(eo.q,{children:e.label},e.value)}),(0,H.jsx)(ti,{}),void 0!==h&&(0,H.jsx)(nl,{onPress:()=>u(!0)}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{Q.gB.removeNodes(a,{at:ee.rL.findPath(a,n)})},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})]})})]})}),void 0!==h&&(0,H.jsx)(ns,{element:n,isOpen:d,nodeLabel:"Code block",schema:h,onDismiss:()=>{u(!1)}})]})}function nu(e,t){let n=[...t];for(;n.length;)e=e[n.shift()];return e}function np(e,t,n,r=[]){if("form"===e.kind||"child"===e.kind)return n[e.kind]?n[e.kind](e,t,r):t;if("object"===e.kind){let a=Object.fromEntries(Object.entries(e.fields).map(([e,a])=>[e,np(a,t[e],n,[...r,e])]));return n.object?n[e.kind](e,a,r):a}if("array"===e.kind){let a=t.map((t,a)=>np(e.element,t,n,r.concat(a)));return n.array?n[e.kind](e,a,r):a}if("conditional"===e.kind){let a=np(e.discriminant,t.discriminant,n,r.concat("discriminant")),i=np(e.values[a.toString()],t.value,n,r.concat("value")),o={discriminant:a,value:i};return n.conditional?n[e.kind](e,o,r):o}(0,eB.xb)(e)}let nh=s.createContext({});function ng({path:e}){let t=(0,s.useContext)(nh)[JSON.stringify(e)];return void 0===t?null:t}function nf({componentBlock:e,element:t,onChange:n,children:r,onRemove:a}){let i,o=(0,s.useMemo)(()=>tC({kind:"object",fields:e.schema},e=>n(e,!0),e=>(0,H.jsx)(ng,{path:e})),[n,e])(t.props),l={},c=[];r.forEach(n=>{let r=n.props.children.props.element.propPath;if(void 0===r)i=n;else{var a,o;let i=(0,V.aJ)(r,t.props,e.schema);if((null==i?void 0:i.kind)==="child"&&"block"===i.options.kind&&"modal"===i.options.editIn)return void c.push(n);l[JSON.stringify((a=r,o=t.props,a.map(e=>{var t,n;if("string"==typeof e)return o=null==(n=o)?void 0:n[e],e;if(!Array.isArray(o))return o=void 0,"";let r=tp(o);return o=null==(t=o)?void 0:t[e],r[e]})))]=n}});let d=e.preview;return(0,H.jsxs)(nh.Provider,{value:l,children:[(0,s.useMemo)(()=>(0,H.jsx)(d,{onRemove:a,...o}),[d,a,o]),(0,H.jsxs)("span",{className:(0,u.AH)({caretColor:"transparent","& ::selection":{backgroundColor:"transparent"}
2,overflow:"hidden",width:1,height:1,position:"absolute"}),children:[i,c]})]})}function nm(e){var t;let n=(0,ee.f7)(),r=(0,s.useMemo)(()=>tS({kind:"object",fields:e.componentBlock.schema},e.elementProps,void 0),[e.componentBlock,e.elementProps]),[a,i]=(0,s.useState)(!1),o=(0,s.useCallback)(()=>{i(!1)},[]),l=(0,s.useCallback)(()=>{i(!0)},[]),u=null!=(t=e.componentBlock.toolbar)?t:ny;return(0,H.jsx)(nb,{selected:n,...e.attributes,children:(0,H.jsxs)(c.so,{gap:"medium",direction:"column",children:[(0,H.jsx)(V.aK,{children:(0,H.jsx)(d.EY,{casing:"uppercase",color:"neutralSecondary",weight:"medium",size:"small",children:e.componentBlock.label})}),(0,H.jsxs)(s.Fragment,{children:[e.renderedBlock,(0,H.jsx)(u,{isValid:r,onRemove:e.onRemove,props:e.previewProps,onShowEditMode:l}),(0,H.jsx)(K.Uz,{onDismiss:()=>o(),children:(()=>{if(a)return(0,H.jsxs)(K.lG,{children:[(0,H.jsxs)(d.DZ,{children:["Edit ",e.componentBlock.label]}),(0,H.jsx)(nk,{props:e.previewProps,onClose:o})]})})()})]})]})})}let nb=(0,s.forwardRef)(function({children:e,selected:t,...n},r){return(0,H.jsx)("div",{...n,ref:r,className:(0,u.AH)(V.al,{position:"relative",paddingInlineStart:u.Bk.size.space.xlarge,marginBottom:u.Bk.size.space.xlarge,"::before":{display:"block",content:'" "',backgroundColor:t?u.Bk.color.alias.borderSelected:u.Bk.color.alias.borderIdle,borderRadius:4,width:4,position:"absolute",left:0,top:0,bottom:0,zIndex:1}}),children:e})});function ny({onShowEditMode:e,onRemove:t,isValid:n}){let r=(0,Z.o)(te);return(0,H.jsx)(V.aK,{children:(0,H.jsxs)(c.so,{direction:"column",gap:"medium",children:[(0,H.jsxs)(c.so,{alignItems:"center",gap:"regular",UNSAFE_style:{userSelect:"none"},children:[(0,H.jsx)(f.rA,{onPress:()=>e(),children:r.format("edit")}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:t,children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:r.format("delete")})]})]}),!n&&(0,H.jsx)(l.ih,{children:"Contains invalid fields. Please edit."})]})})}function nk({onClose:e,props:t}){let n=(0,Z.o)(te),r=(0,s.useId)(),[a,i]=(0,s.useState)(!1),[o,l]=(0,s.useState)(()=>tT(t)),d=(0,s.useMemo)(()=>tC(t.schema,l,()=>void 0),[t.schema])(o);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(J.UC,{children:(0,H.jsx)(c.so,{id:r,elementType:"form",onSubmit:n=>{n.target===n.currentTarget&&(n.preventDefault(),tS(t.schema,o,void 0)?(console.log(tP(o,t.schema)),function(e,t){if(t_(t,"child")){let{onChange:n}=tR(t);n(e);return}if(t_(t,"form")||t_(t,"object")||t_(t,"array"))return t.onChange(tP(e,t.schema));if(t_(t,"conditional")){let n=tP(e,t.schema);t.onChange(n.discriminant,n.value);return}(0,q.xb)(t)}(o,t),e()):i(!0))},direction:"column",gap:"xxlarge",children:(0,H.jsx)(ao,{...d,forceValidation:a})})}),(0,H.jsxs)(f.e2,{children:[(0,H.jsx)(f.$n,{onPress:e,children:n.format("cancel")}),(0,H.jsx)(f.$n,{form:r,prominence:"high",type:"submit",children:"Done"})]})]})}function nx(e){var t;let n=null!==e.componentBlock.toolbar,r=null!=(t=e.componentBlock.toolbar)?t:nv;return(0,H.jsx)("div",{...e.attributes,className:V.al,children:n?(0,H.jsxs)(V.aE,{element:e.element,children:[(0,H.jsx)("div",{children:e.renderedBlock}),(0,H.jsx)(V.aF,{children:(0,H.jsx)(r,{onRemove:e.onRemove,props:e.previewProps})})]}):(0,H.jsx)("div",{children:e.renderedBlock})})}function nv({onRemove:e}){return(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{onPress:e,margin:"regular",children:(0,H.jsx)(b.I,{src:eR.I})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})}function nw(e,t){let n=function e(t,n,r){switch(n.kind){case"form":return[];case"child":return[{path:r,options:n.options}];case"conditional":return e(t.value,n.values[t.discriminant],r.concat("value"));case"object":{let a=[];return Object.keys(n.fields).forEach(i=>{a.push(...e(t[i],n.fields[i],r.concat(i)))}),a}case"array":{let a=[];return t.forEach((t,i)=>{a.push(...e(t,n.element,r.concat(i)))}),a}}}(e,{kind:"object",fields:t},[]);return n.length?n:[{path:void 0,options:{kind:"inline",placeholder:""}}]}function nS(e){if(e.selection){let t=Q.KE.above(e,{match:e=>(0,V.au)(e)&&"paragraph"!==e.type});if(t&&("component-block-prop"===t[0].type||"component-inline-prop"===t[0].type))return{isInside:!0,componentBlock:Q.KE.parent(e,t[1]),prop:t}}return{isInside:!1}}let nE=new WeakMap;function nj(e){let t=new Set([e]),n=!1;for(let e of t)if("form"===e.kind);else if("child"===e.kind){if(n)return!1;n=!0}else if("array"===e.kind){if(function(e){let t=new Set([e]);for(let e of t)if("form"===e.kind);else if("child"===e.kind)return!0;else if("array"===e.kind)t.add(e.element);else if("object"===e.kind)for(let n of Object.values(e.fields))t.add(n);else if("conditional"===e.kind)for(let n of Object.values(e.values))t.add(n);else(0,q.xb)(e);return!1}(e.element))return!1}else if("object"===e.kind)for(let n of Object.values(e.fields))t.add(n);else if("conditional"===e.kind)for(let n of Object.values(e.values))t.add(n);else(0,q.xb)(e);return n}function nA(e){return(0,H.jsx)("span",{...e.attributes,children:e.children})}function nN(e,t,n){let r=function(e,t){let n=tf({kind:"object",fields:t.schema});return{type:"component-block",component:e,props:n,children:nw(n,t.schema).map(e=>({type:`component-${e.options.kind}-prop`,propPath:e.path,children:["block"===e.options.kind?{type:"paragraph",children:[{text:""}]}:{text:""}]}))}}(n,t[n]);
2(0,V.aQ)(e,r);let a=Q.KE.above(e,{match:e=>"component-block"===e.type});if(a){let t=Q.KE.start(e,a[1]);Q.gB.setSelection(e,{anchor:t,focus:t})}}let nB=({attributes:e,children:t,element:n})=>{let r=(0,ee.RV)(),[a,i]=(0,V.aC)(r,n),o=tG().componentBlocks[a.component],l=(0,s.useMemo)(()=>{if(!o)return;let e=new Map;for(let t of a.children)"component-block-prop"===t.type&&t.propPath&&e.set(JSON.stringify(t.propPath),t.children);return e.size?np({kind:"object",fields:o.schema},a.props,{child(t,n,r){if("block"===t.options.kind){let t=JSON.stringify(r),n=e.get(t);if(n)return n.map(V.aH)}return n}}):a.props},[o,a]),c=(0,s.useRef)({__elementToGetPath:n,currentElement:a,propsWithChildFields:l});(0,s.useEffect)(()=>{c.current={__elementToGetPath:n,currentElement:a,propsWithChildFields:l}});let d=(0,V.W)(()=>{let e=ee.rL.findPath(r,n);Q.gB.removeNodes(r,{at:e})}),u=(0,s.useCallback)((e,t)=>{let n=c.current.propsWithChildFields;!function(e,t,n,r,a,i,o){Q.KE.withoutNormalizing(e,()=>{let l=new Map,s={kind:"object",fields:t.schema},c=np(s,r,{child(e,t,r){if(!o&&"block"===e.options.kind&&t){try{if(nu(n,r)===t)return null}catch{}l.set(JSON.stringify(r),t.map(V.aH))}return null}});i({props:c});let d=function e(t,n,r,a,i,o){switch(r.kind){case"form":return[];case"child":return[{path:a,prevPath:i,options:r.options}];case"conditional":let l=t.discriminant===n.discriminant;return e(t.value,l?n.value:tf(r.values[t.discriminant]),r.values[t.discriminant],a.concat("value"),l||null==i?void 0:i.concat("value"),l||null==o?void 0:o.concat("value"));case"object":{let l=[];for(let s of Object.keys(r.fields))l.push(...e(t[s],n[s],r.fields[s],a.concat(s),null==i?void 0:i.concat(s),null==o?void 0:o.concat(s)));return l}case"array":{let l=[],s=tp(n),c=tp(t);for(let[d,u]of t.entries()){let t,p=c[d],h=s.indexOf(p);t=-1===h?tf(r.element):n[h],l.push(...e(u,t,r.element,a.concat(d),-1===h||null==i?void 0:i.concat(h),-1===h||null==o?void 0:o.concat(p)))}return l}}}(c,n,s,[],[],[]),u=()=>Q.bP.get(e,a),p=u();if(0===d.length){for(let t of p.children.map((e,t)=>t).reverse())Q.gB.removeNodes(e,{at:[...a,t]});Q.gB.insertNodes(e,{type:"component-inline-prop",propPath:void 0,children:[{text:""}]},{at:[...a,0]});return}let h=new Map;for(let[e,t]of p.children.entries())(0,q.vA)("component-block-prop"===t.type||"component-inline-prop"===t.type),h.set(void 0===t.propPath?void 0:JSON.stringify(t.propPath),e);let g=new Set(d);for(let t of d){if(void 0===t.prevPath)continue;let n=JSON.stringify(t.prevPath),r=h.get(n);if(void 0!==r){let i=p.children[r];(0,q.vA)(void 0!==i.propPath),(0,V.aI)(t.path,i.propPath)||Q.gB.setNodes(e,{propPath:t.path},{at:[...a,r]}),g.delete(t),h.delete(n)}}let f=u().children.length;for(let t of g)Q.gB.insertNodes(e,{type:`component-${t.options.kind}-prop`,propPath:t.path,children:["block"===t.options.kind?{type:"paragraph",children:[{text:""}]}:{text:""}]},{at:[...a,f]}),f++;let m=[];for(let[,t]of h)m.push(Q.KE.pathRef(e,[...a,t]));for(let t of m){let n=t.unref();(0,q.vA)(null!==n),Q.gB.removeNodes(e,{at:n})}let b=new Map;for(let[e,t]of d.entries())b.set(JSON.stringify(t.path),e);t:for(;;){for(let[t,n]of u().children.entries()){(0,q.vA)("component-block-prop"===n.type||"component-inline-prop"===n.type);let r=b.get(JSON.stringify(n.propPath));if((0,q.vA)(void 0!==r),t!==r){Q.gB.moveNodes(e,{at:[...a,t],to:[...a,r]});continue t}}break}for(let[t,n]of l){let r=b.get(t);void 0!==r&&(Q.gB.removeNodes(e,{at:[...a,r]}),Q.gB.insertNodes(e,{type:"component-block-prop",propPath:JSON.parse(t),children:n},{at:[...a,r]}))}})}(r,o,n,e(n),ee.rL.findPath(r,c.current.__elementToGetPath),i,t)},[i,o,r]),p=(0,s.useMemo)(()=>o?tC({kind:"object",fields:o.schema},e=>u(e,!1),()=>void 0):()=>{throw Error("expected component block to exist when called")},[o,u]);if(!o)return(0,H.jsxs)("div",{style:{border:"red 4px solid",padding:8},children:[(0,H.jsx)("pre",{contentEditable:!1,style:{userSelect:"none"},children:`The block "${a.component}" no longer exists.
3
4Props:
5
6${JSON.stringify(a.props,null,2)}
7
8Content:`}),t]});let h=p(l),g=(0,H.jsx)(nf,{children:t,componentBlock:o,element:a,onChange:u,onRemove:d});return o.chromeless?(0,H.jsx)(nx,{element:n,attributes:e,renderedBlock:g,componentBlock:o,onRemove:d,previewProps:h}):(0,H.jsx)(nm,{attributes:e,children:t,componentBlock:o,onRemove:d,previewProps:h,renderedBlock:g,elementProps:a.props})};function nR(e){(0,V.aQ)(e,{type:"divider",children:[{text:""}]}),Q.KE.insertNode(e,{type:"paragraph",children:[{text:""}]})}let nC=(0,H.jsxs)(T.k,{delay:200,children:[(0,H.jsx)(()=>{let{editor:e,dividers:{isDisabled:t}}=tq();return(0,s.useMemo)(()=>(0,H.jsx)(f.rA,{prominence:"low",isDisabled:t,onPress:()=>{nR(e)},children:(0,H.jsx)(b.I,{src:E.c})}),[e,t])},{}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Divider"}),(0,H.jsx)(d.ue,{children:"---"})]})]});function nI({attributes:e,children:t}){let n=(0,ee.f7)();return(0,H.jsxs)("div",{...e,style:{caretColor:"transparent"},children:[(0,H.jsx)("hr",{style:{backgroundColor:n?u.Bk.color.alias.borderSelected:u.Bk.color.alias.borderIdle}}),t]})}let nT=({attributes:e,children:t,element:n})=>{let r=(0,ee.RV)(),a=n.layout,i=tG().documentFeatures.layouts,o=i.findIndex(e=>e.toString()===a.toString());return(0,H.jsx)("div",{className:V.al,...e,children:(0,H.jsxs)(V.aE,{element:n,children:[(0,H.jsx)("div",{className:(0,u.AH)({columnGap:u.Bk.size.space.regular,display:"grid"}),style:{gridTemplateColumns:a.map(e=>`${e}fr`).join(" ")},children:t}),(0,H.jsx)(V.aF,{children:(0,H.jsxs)(c.so,{padding:"regular",gap:"regular",children:[(0,H.jsx)(eb.K,{selectionMode:"single",prominence:"low",density:"compact",onAction:e=>{let t=ee.rL.findPath(r,n),a=i[e];Q.gB.setNodes(r,{type:"layout",layout:a},{at:t}),ee.rL.focus(r)},selectedKeys:-1!==o?[o.toString()]:[],children:i.map((e,t)=>(0,H.jsx)(eb.q,{children:function(e){return(0,H.jsx)("div",{role:"img",className:(0,u.AH)({display:"grid",gridTemplateColumns:e.map(e=>`${e}fr`).join(" "),gap:2,width:16,height:16}),children:e.map((e,t)=>(0,H.jsx)("div",{className:(0,u.AH)({backgroundColor:"currentcolor",borderRadius:1})},t))})}(e)},t))}),(0,H.jsx)(ti,{}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{let e=ee.rL.findPath(r,n);Q.gB.removeNodes(r,{at:e})},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})]})})]})})},nO=({attributes:e,children:t})=>(0,H.jsx)("div",{className:(0,u.AH)({borderColor:u.Bk.color.border.neutral,borderRadius:u.Bk.size.radius.regular,borderStyle:"dashed",borderWidth:u.Bk.size.border.regular,padding:u.Bk.size.space.medium}),...e,children:t}),nP=(e,t)=>
8{(0,V.aQ)(e,[{type:"layout",layout:t,children:[{type:"layout-area",children:[{type:"paragraph",children:[{text:""}]}]}]}]);let n=Q.KE.above(e,{match:e=>"layout"===e.type});n&&Q.gB.select(e,[...n[1],0])},n_=(0,H.jsx)(b.I,{src:eI.Z}),nF=({layouts:e})=>{let{editor:t,layouts:{isSelected:n}}=tq();return(0,s.useMemo)(()=>(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",isSelected:n,onPress:()=>{(0,V.ay)(t,"layout")?Q.gB.unwrapNodes(t,{match:e=>"layout"===e.type}):nP(t,e[0]),ee.rL.focus(t)},children:n_}),(0,H.jsx)(T.m,{children:"Layouts"})]}),[t,n,e])};function nM(e){let{editor:t,lists:n}=tq();return(0,s.useMemo)(()=>{let r=[];n.ordered.isDisabled&&r.push("ordered"),n.unordered.isDisabled&&r.push("unordered");let a=[];return n.ordered.isSelected&&a.push("ordered"),n.unordered.isSelected&&a.push("unordered"),(0,H.jsx)(eb.K,{flexShrink:0,"aria-label":"Lists",selectionMode:"single",buttonLabelBehavior:"hide",density:"compact",prominence:"low",summaryIcon:(0,H.jsx)(b.I,{src:w.G}),selectedKeys:a,disabledKeys:r,onAction:e=>{var n=`${e}-list`;let r=tV(t),a=(0,V.ay)(t,n)&&("none"===r||r===n);Q.KE.withoutNormalizing(t,()=>{Q.gB.unwrapNodes(t,{match:tU,split:!0,mode:a?"all":"lowest"}),a||Q.gB.wrapNodes(t,{type:n,children:[]},{match:e=>"list-item-content"!==e.type&&(0,V.au)(e)})}),ee.rL.focus(t)},children:[e.lists.unordered&&(0,H.jsxs)(eb.q,{textValue:"Bullet List (- )",children:[(0,H.jsx)(b.I,{src:w.G}),(0,H.jsx)(d.EY,{children:"Bullet List"}),(0,H.jsx)(d.ue,{children:"-⎵"})]},"unordered"),e.lists.ordered&&(0,H.jsxs)(eb.q,{textValue:"Numbered List (1.)",children:[(0,H.jsx)(b.I,{src:S.b}),(0,H.jsx)(d.EY,{children:"Numbered List"}),(0,H.jsx)(d.ue,{children:"1.⎵"})]},"ordered")].filter(e=>!1!==e)})},[t,n.ordered.isDisabled,n.ordered.isSelected,n.unordered.isDisabled,n.unordered.isSelected,e.lists.ordered,e.lists.unordered])}function nD(e){return new Promise(t=>{let n=document.createElement("input");n.type="file",n.style.display="none",n.accept=e,n.onchange=()=>{var e;let r=null==(e=n.files)?void 0:e[0];r&&t(r)},document.body.appendChild(n),n.click()})}async function nL(e){let t=await nD(e);if(t)return{content:new Uint8Array(await t.arrayBuffer()),filename:t.name}}function n$(){return nL("image/*")}function nz(e,t){let n,r,a=(0,o.c)(4),[i,l]=(0,s.useState)(null);return a[0]!==e||a[1]!==t?(n=()=>{if(e){let n=URL.createObjectURL(new Blob([e],{type:t}));return l(n),()=>URL.revokeObjectURL(n)}l(null)},r=[t,e],a[0]=e,a[1]=t,a[2]=n,a[3]=r):(n=a[2],r=a[3]),(0,s.useEffect)(n,r),i}function nU(e){var t,n;let r,a,i,d,p,h,g,m,b,y,k=(0,o.c)(36),{value:x}=e;k[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>!0,k[0]=r):r=k[0];let[v,w]=(0,s.useReducer)(r,!1),S=r4(),E=nz(null===x?null:x.data,(null==x?void 0:x.extension)==="svg"?"image/svg+xml":void 0),j=(0,s.useId)(),A=(0,s.useId)(),N=e.description?A:void 0,B=null==(t=e.validation)?void 0:t.isRequired;return k[1]!==j||k[2]!==B||k[3]!==e.label?(a=(0,H.jsx)(l.dh,{id:j,elementType:"span",isRequired:B,children:e.label}),k[1]=j,k[2]=B,k[3]=e.label,k[4]=a):a=k[4],k[5]!==e.description||k[6]!==A?(i=e.description&&(0,H.jsx)(l.ry,{id:A,children:e.description}),k[5]=e.description,k[6]=A,k[7]=i):i=k[7],k[8]!==e?(d=(0,H.jsx)(f.rA,{onPress:async()=>{let t=await n$();if(t){var n;let r=null==(n=t.filename.match(/\.([^.]+$)/))?void 0:n[1];r&&e.onChange({data:t.content,extension:r,filename:e.transformFilename?e.transformFilename(t.filename):t.filename})}},children:"Choose file"}),k[8]=e,k[9]=d):d=k[9],k[10]!==x||k[11]!==e||k[12]!==w?(p=null!==x&&(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{e.onChange(null),w()},children:"Remove"}),k[10]=x,k[11]=e,k[12]=w,k[13]=p):p=k[13],k[14]!==d||k[15]!==p?(h=(0,H.jsxs)(f.e2,{children:[d,p]}),k[14]=d,k[15]=p,k[16]=h):h=k[16],k[17]!==E?(g=E&&(0,H.jsx)(c.az,{alignSelf:"start",backgroundColor:"canvas",borderRadius:"regular",border:"neutral",padding:"regular",children:(0,H.jsx)("img",{src:E,alt:"",style:{display:"block",maxHeight:u.Bk.size.alias.singleLineWidth,maxWidth:"100%"}})}),k[17]=E,k[18]=g):g=k[18],k[19]!==S||k[20]!==x||k[21]!==e?(m=S&&null!==x&&(0,H.jsx)(eu.A_,{label:"Filename",onChange:t=>{e.onChange({...x,filename:t})},value:x.filename}),k[19]=S,k[20]=x,k[21]=e,k[22]=m):m=k[22],k[23]!==e||k[24]!==v||k[25]!==x?(b=(e.forceValidation||v)&&(null==(n=e.validation)?void 0:n.isRequired)&&null===x&&(0,H.jsxs)(l.ih,{children:[e.label," is required"]}),k[23]=e,k[24]=v,k[25]=x,k[26]=b):b=k[26],k[27]!==N||k[28]!==j||k[29]!==a||k[30]!==i||k[31]!==h||k[32]!==g||k[33]!==m||k[34]!==b?(y=(0,H.jsxs)(c.so,{"aria-describedby":N,"aria-labelledby":j,direction:"column",gap:"medium",role:"group",children:[a,i,h,g,m,b]}),k[27]=N,k[28]=j,k[29]=a,k[30]=i,k[31]=h,k[32]=g,k[33]=m,k[34]=b,k[35]=y):y=k[35],y}let nK=({attributes:e,children:t,element:n})=>
8{let[r,a]=(0,s.useState)(!1),[i,o]=(0,s.useState)(),l=(0,Z.o)(te),d=(0,ee.RV)(),[p,h]=(0,V.aC)(d,n),g=nz(p.src.content,p.src.filename.endsWith(".svg")?"image/svg+xml":void 0),m=(0,V.aD)()===n;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ta,{attributes:e,children:[t,(0,H.jsxs)(V.aE,{element:n,children:[(0,H.jsx)("div",{style:{alignItems:"center",display:"flex",flexDirection:"column"},children:(0,H.jsx)(V.aK,{children:(0,H.jsx)("img",{...e,src:g,alt:p.alt,"data-selected":m,onLoad:e=>{let t=e.target;o(t.width/t.height)},className:(0,u.AH)({boxSizing:"border-box",borderRadius:u.Bk.size.radius.regular,display:"block",maxHeight:u.Bk.size.scale[3600],maxWidth:"100%",transition:(0,u.kY)("box-shadow"),"&[data-selected=true]":{boxShadow:`0 0 0 ${u.Bk.size.border.regular} ${u.Bk.color.alias.borderSelected}`}})})})}),(0,H.jsx)(V.aF,{hideArrow:!0,children:(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[(0,H.jsxs)(c.so,{gap:"small",children:[(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>a(!0),children:(0,H.jsx)(b.I,{src:ep.I})}),(0,H.jsx)(T.m,{children:l.format("edit")})]}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:async()=>{let e=await n$();e&&h({src:e})},children:(0,H.jsx)(b.I,{src:eT.H})}),(0,H.jsx)(T.m,{children:"Choose file"})]})]}),(0,H.jsx)(c.cG,{orientation:"vertical"}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{Q.gB.removeNodes(d,{at:ee.rL.findPath(d,n)})},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})]})})]},i)]}),(0,H.jsx)(K.Uz,{onDismiss:()=>{a(!1),(0,V.aG)(d)},children:r&&(0,H.jsx)(nq,{alt:p.alt,title:p.title,filename:p.src.filename,onSubmit:({alt:e,filename:t,title:n})=>{h({alt:e,title:n,src:{content:p.src.content,filename:t}})}})})]})};function nq(e){let{images:t}=tG().documentFeatures;if(!t)throw Error("unexpected image rendered when images are disabled");let n=(0,s.useMemo)(()=>
8(0,V.o)(t.schema),[t]),[r,a]=(0,s.useState)({alt:e.alt,title:e.title}),i=(0,s.useMemo)(()=>tC(n,a,()=>void 0),[n])(r),[o,l]=function(e){let t=e.lastIndexOf(".");return -1===t?[e,""]:[e.substring(0,t),e.substring(t+1)]}(e.filename),[u,p]=(0,s.useState)(!1),[h,g]=(0,s.useState)(o),[m,b]=(0,s.useState)(!1),{dismiss:y}=(0,K.Bj)(),k=(0,Z.o)(te);return(0,H.jsx)(K.lG,{size:"small",children:(0,H.jsxs)("form",{style:{display:"contents"},onSubmit:t=>{t.target===t.currentTarget&&(t.preventDefault(),p(!0),h&&tS(n,r,void 0)&&(y(),e.onSubmit({alt:r.alt,title:r.title,filename:[h,l].join(".")})))},children:[(0,H.jsx)(d.DZ,{children:"Image details"}),(0,H.jsx)(J.UC,{children:(0,H.jsxs)(c.so,{gap:"large",direction:"column",children:[(0,H.jsx)(eu.A_,{label:"File name",onChange:g,onBlur:()=>b(!0),value:h,isRequired:!0,errorMessage:(m||u)&&!h?"Please provide a file name.":void 0,endElement:l?(0,H.jsx)(c.so,{alignItems:"center",justifyContent:"center",paddingEnd:"regular",children:(0,H.jsxs)(d.EY,{color:"neutralTertiary",children:[".",l]})}):null}),(0,H.jsx)(ao,{forceValidation:u,autoFocus:!0,...i})]})}),(0,H.jsxs)(f.e2,{children:[(0,H.jsx)(f.$n,{onPress:y,children:k.format("cancel")}),(0,H.jsx)(f.$n,{prominence:"high",type:"submit",children:k.format("save")})]})]})})}let nV=(0,H.jsx)(b.I,{src:$.F}),nH=(0,H.jsxs)(T.k,{children:[(0,H.jsx)(function(){let e=(0,ee.RV)();return(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(f.rA,{prominence:"low",onPress:async()=>{let t=await n$();t&&Q.gB.insertNodes(e,{type:"image",src:t,alt:"",title:"",children:[{text:""}]})},children:nV})})},{}),(0,H.jsx)(T.m,{children:(0,H.jsx)(d.EY,{children:"Image"})})]});function nG(e,t){return{start:Math.min(e,t),end:Math.max(e,t)}}function nW(e,t){return e?0===t?[0,0]:[1,t-1]:[0,t]}function nY(e){var t,n,r,a;let i=null==(t=Q.KE.above(e,{match:(0,V.av)("table-cell"),at:null==(n=e.selection)?void 0:n.anchor.path}))?void 0:t[1],o=null==(r=Q.KE.above(e,{match:(0,V.av)("table-cell"),at:null==(a=e.selection)?void 0:a.focus.path}))?void 0:r[1],l=Q.KE.above(e,{match:(0,V.av)("table")});if(e.selection&&l&&Q.Hg.isElement(l[0].children[0])&&i&&o&&Q.wA.equals(i.slice(0,-3),o.slice(0,-3))){let[t,n]=Q.KE.edges(e,e.selection);return{tablePath:l[1],table:l[0],singleCell:Q.wA.equals(i,o)?Q.bR.equals(Q.KE.start(e,i),t)&&Q.bR.equals(Q.KE.end(e,i),n)&&!Q.bR.equals(t,n)?"selected":"not-selected":"many",row:nG(i[i.length-2]+i[i.length-3],o[o.length-2]+o[i.length-3]),column:nG(i[i.length-1],o[o.length-1])}}}let nJ=e=>({type:"table-cell",...e?{header:!0}:{},children:[{type:"paragraph",children:[{text:""}]}]});function nZ(e){return Q.EY.isText(e)?{...e}:{...e,children:e.children.map(nZ)}}let nX=e=>{Q.gB.insertNodes(e,{type:"table",children:[{type:"table-head",children:[{type:"table-row",children:[nJ(!0),nJ(!0),nJ(!0)]}]},{type:"table-body",children:[{type:"table-row",children:[nJ(!1),nJ(!1),nJ(!1)]},{type:"table-row",children:[nJ(!1),nJ(!1),nJ(!1)]}]}]})},nQ=(0,s.createContext)(void 0);function n0(e){let t=(0,ee.Zi)(),n=nY(t);if(n){var r,a;return(0,H.jsx)(nQ.Provider,{value:{cells:"not-selected"===n.singleCell?new Set:function(e,t,n){var r;let a=new Set,i="table-head"===e.children[0].type||"table-body"===e.children[0].type?e.children[0]:void 0;if(!i)return a;let o=(null==(r=e.children[1])?void 0:r.type)==="table-body"?e.children[1]:void 0;for(let e=t.start;e<=t.end;e++){let t=o?0===e?i.children[0]:o.children[e-1]:i.children[e];if(Q.Hg.isElement(t))for(let e=n.start;e<=n.end;e++)a.add(t.children[e])}return a}(n.table,n.row,n.column),table:n.table,focus:null==(r=Q.KE.above(t,{match:(0,V.av)("table-cell"),at:null==(a=t.selection)?void 0:a.focus.path}))?void 0:r[0]},children:e.children})}return(0,H.jsx)(nQ.Provider,{value:void 0,children:e.children})}let n1=(0,s.createContext)({top:new Map,left:new Map}),n2=({attributes:e,children:t,element:n})=>{var r;let a=(0,ee.RV)(),i=(0,s.useContext)(nQ),o=(null==i?void 0:i.table)===n?i:void 0,l=(0,s.useMemo)(()=>{let e=n.children[0];if(!Q.Hg.isElement(e)||!Q.Hg.isElement(e.children[0]))return{top:new Map,left:new Map};let t=new Map,r=new Map;for(let[r,a]of e.children[0].children.entries())"table-cell"===a.type&&t.set(a,n.children.every(e=>!!Q.Hg.isElement(e)&&e.children.every(e=>Q.Hg.isElement(e)&&(null==o?void 0:o.cells.has(e.children[r])))));for(let e of n.children)if("table-head"===e.type||"table-body"===e.type)for(let t of e.children)"table-row"===t.type&&"table-cell"===t.children[0].type&&r.set(t.children[0],t.children.every(e=>null==o?void 0:o.cells.has(e)));return{top:t,left:r}},[n,o]);return(0,H.jsx)(n1.Provider,{value:l,children:(0,H.jsx)(nQ.Provider,{value:o,children:(0,H.jsx)(ta,{attributes:e,children:(0,H.jsxs)(V.aE,{element:n,children:[(0,H.jsx)("table",{className:(0,u.AH)({width:"100%",tableLayout:"fixed",position:"relative",borderSpacing:0,"& *::selection":null!=o&&o.cells.size?{backgroundColor:"transparent"}:void 0}),children:t}),(0,H.jsx)(V.aF,{children:(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",isSelected:(null==(r=n.children[0])?void 0:r.type)==="table-head",onPress:()=>{let e=ee.rL.findPath(a,n);Q.KE.withoutNormalizing(a,()=>{if("table-head"===n.children[0].type){Q.gB.moveNodes(a,{at:[...e,0,0],to:[...e,1,0]}),Q.gB.removeNodes(a,{at:[...e,0]});return}Q.gB.insertNodes(a,{type:"table-head",children:[]},{at:[...e,0]}),Q.gB.moveNodes(a,{at:[...e,1,0],to:[...e,0,0]})})},children:(0,H.jsx)(b.I,{src:eD.T})}),(0,H.jsx)(T.m,{children:"Header row"})]}),(0,H.jsx)(ti,{}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{Q.gB.removeNodes(a,{at:ee.rL.findPath(a,n)})},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})]})})]})})})})},n3=({attributes:e,children:t})=>(0,H.jsx)("tbody",{...e,children:t}),n4=({attributes:e,children:t})=>(0,H.jsx)("thead",{...e,children:t}),n6=({attributes:e,children:t,element:n})=>{var r,a;let i=null==(r=(0,s.useContext)(nQ))?void 0:r.table;return(0,H.jsx)(n9.Provider,{value:null!=(a=null==i?void 0:i.children.indexOf(n))?a:-1,children:(0,H.jsx)("tr",{...e,children:t})})}
8,n9=(0,s.createContext)(-1);function n5({attributes:e,children:t,element:n}){let r=(0,ee.RV)(),a=(0,s.useContext)(nQ),i=(0,s.useContext)(n1),o=null==a?void 0:a.cells.has(n),l="calc(100% + 2px)",c=n.header?"th":"td",d=o?u.Bk.color.alias.borderSelected:u.Bk.color.alias.borderIdle;return(0,H.jsxs)(c,{className:(0,u.AH)({borderInlineEnd:`1px solid ${d}`,borderBottom:`1px solid ${d}`,borderTop:i.top.has(n)?`1px solid ${d}`:void 0,borderInlineStart:i.left.has(n)?`1px solid ${d}`:void 0,backgroundColor:null!=a&&a.cells.has(n)?u.Bk.color.alias.backgroundSelected:n.header?u.Bk.color.scale.slate3:void 0,position:"relative",margin:0,padding:u.Bk.size.space.regular,fontWeight:"inherit",boxSizing:"border-box",textAlign:"start",verticalAlign:"top"}),...e,children:[o&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{contentEditable:!1,className:(0,u.AH)({position:"absolute",top:-1,insetInlineStart:-1,background:u.Bk.color.alias.borderSelected,height:l,width:1})}),(0,H.jsx)("div",{contentEditable:!1,className:(0,u.AH)({position:"absolute",top:-1,insetInlineStart:-1,background:u.Bk.color.alias.borderSelected,height:1,width:l})})]}),i.top.has(n)&&(0,H.jsx)(n7,{location:"top",selected:!!i.top.get(n),label:"Select Column",onClick:()=>{let e=ee.rL.findPath(r,n),t=Q.KE.above(r,{match:(0,V.av)("table"),at:e});if(!t)return;let a=t[0].children.length-1,i=t[0].children[a];if("table-body"!==i.type)return;let o=e[e.length-1],l=[...t[1],t[0].children.length-1,i.children.length-1,o];Q.gB.select(r,{anchor:Q.KE.start(r,e),focus:Q.KE.end(r,l)})}}),i.left.has(n)&&(0,H.jsx)(n7,{location:"left",selected:!!i.left.get(n),label:"Select Row",onClick:()=>{let e=ee.rL.findPath(r,n);Q.gB.select(r,{anchor:Q.KE.start(r,Q.wA.parent(e)),focus:Q.KE.end(r,Q.wA.parent(e))})}}),i.left.has(n)&&i.top.has(n)&&(0,H.jsx)(n7,{location:"top-left",selected:!!(i.top.get(n)&&i.left.get(n)),label:"Select Table",onClick:()=>{let e=ee.rL.findPath(r,n),t=Q.KE.above(r,{match:(0,V.av)("table"),at:e});t&&Q.gB.select(r,{anchor:Q.KE.start(r,t[1]),focus:Q.KE.end(r,t[1])})}}),(0,H.jsx)("div",{children:t}),(null==a?void 0:a.focus)===n&&(0,H.jsx)(re,{cell:n,table:a.table})]})}function n7(e){let t=(0,s.useContext)(nQ),n=(0,ee.RV)(),{location:r,selected:a}=e;return(0,H.jsxs)("div",{contentEditable:!1,children:[(0,H.jsx)("button",{tabIndex:-1,type:"button",...(0,u.Pn)({location:r,selected:a}),className:(0,u.AH)({background:u.Bk.color.scale.slate3,border:`1px solid ${u.Bk.color.alias.borderIdle}`,margin:0,padding:0,position:"absolute",":hover":{background:u.Bk.color.scale.slate4},"::before":{content:'""',inset:-1,position:"absolute"},"&[data-location=top]":{top:-9,insetInlineStart:-1,width:"calc(100% + 2px)",height:8},"&[data-location=left]":{top:-1,insetInlineStart:-9,width:8,height:"calc(100% + 2px)"},"&[data-location=top-left]":{top:-9,insetInlineStart:-9,width:8,height:8},"&:not([data-location=top])":{borderInlineEnd:"none"},"&:not([data-location=left])":{borderBottom:"none"},"&[data-selected=true]":{background:u.Bk.color.scale.indigo8,borderColor:u.Bk.color.alias.borderSelected}}),style:{visibility:null!=t&&t.focus?"visible":"hidden"},"aria-label":e.label,onClick:()=>{ee.rL.focus(n),e.onClick()}}),e.selected&&("top"===e.location?(0,H.jsx)("div",{className:(0,u.AH)({position:"absolute",top:-9,insetInlineEnd:-1,background:u.Bk.color.alias.borderSelected,height:8,width:1,zIndex:2})}):(0,H.jsx)("div",{className:(0,u.AH)({position:"absolute",bottom:-1,insetInlineStart:-9,background:u.Bk.color.alias.borderSelected,height:1,width:8,zIndex:2})}))]})}let n8={deleteRow:{label:"Delete row",action:(e,t)=>{let n=t.slice(0,-3),r=Q.bP.get(e,n);if("table"!==r.type)return;let a="table-head"===r.children[0].type,i=Q.wA.parent(t);Q.gB.removeNodes(e,{at:a&&0===i[t.length-3]?Q.wA.parent(i):i})}},deleteColumn:{label:"Delete column",action:(e,t)=>{let n=t[t.length-1],r=t.slice(0,-3),a=Q.bP.get(e,r);"table"===a.type&&Q.KE.withoutNormalizing(e,()=>{for(let[t,i]of a.children.entries())if("table-head"===i.type||"table-body"===i.type)for(let a of i.children.keys())Q.gB.removeNodes(e,{at:[...r,t,a,n]})})}},insertRowBelow:{label:"Insert row below",action:(e,t)=>{let n=Q.bP.get(e,Q.wA.parent(t)),r=t.slice(0,-3),a=Q.bP.get(e,r);if("table-row"!==n.type||"table"!==a.type)return;let i="table-head"===a.children[0].type,o=[...r,+!!i,i&&0===t[t.length-3]?0:t[t.length-2]+1];Q.KE.withoutNormalizing(e,()=>{Q.gB.insertNodes(e,{type:"table-row",children:n.children.map(()=>nJ(!1))},{at:o}),Q.gB.select(e,[...o,t[t.length-1]])})}},insertColumnRight:{label:"Insert column right",action:(e,t)=>{let n=t[t.length-1]+1,r=t.slice(0,-3),a=Q.bP.get(e,r);"table"===a.type&&Q.KE.withoutNormalizing(e,()=>{for(let[t,i]of a.children.entries())if("table-head"===i.type||"table-body"===i.t
8ype)for(let a of i.children.keys())Q.gB.insertNodes(e,nJ("table-head"===i.type),{at:[...r,t,a,n]});Q.gB.select(e,Q.KE.start(e,Q.wA.next(t)))})}}};function re(e){let t=(0,ee.RV)(),n=u.Bk.size.space.small;return(0,H.jsx)("div",{contentEditable:!1,className:(0,u.AH)({top:n,insetInlineEnd:n,position:"absolute"}),children:(0,H.jsxs)(T.k,{children:[(0,H.jsxs)(C.cQ,{align:"end",children:[(0,H.jsx)(f.rA,{prominence:"low",UNSAFE_className:(0,u.AH)({borderRadius:u.Bk.size.radius.small,height:"auto",minWidth:0,padding:0,"&::before":{content:'""',inset:`calc(${n} * -1)`,position:"absolute"}}),children:(0,H.jsx)(b.I,{src:k.b})}),(0,H.jsx)(C.W1,{onAction:n=>{n in n8&&n8[n].action(t,ee.rL.findPath(t,e.cell))},items:Object.entries(n8).map(([e,t])=>({...t,key:e})),children:e=>(0,H.jsx)(C.q7,{children:e.label},e.key)})]}),(0,H.jsx)(T.m,{children:"Options"})]})})}let rt=(0,H.jsxs)(T.k,{children:[(0,H.jsx)(()=>{let{editor:e,blockquote:{isDisabled:t,isSelected:n}}=tq();return(0,s.useMemo)(()=>(0,H.jsx)(f.rA,{prominence:"low",isSelected:n,isDisabled:t,onPress:()=>{nX(e),ee.rL.focus(e)},children:(0,H.jsx)(b.I,{src:R.k})}),[e,t,n])},{}),(0,H.jsx)(T.m,{children:(0,H.jsx)(d.EY,{children:"Table"})})]});function rn({documentFeatures:e,viewState:t}){let n=tG().componentBlocks,r=!1,a=!1;for(let e of Object.values(n))e.toolbarIcon&&(a=!0),e.toolbarIcon||(r=!0);let i=Object.values(e.formatting.inlineMarks).some(e=>e),o=e.formatting.alignment.center||e.formatting.alignment.end,l=e.formatting.listTypes.unordered||e.formatting.listTypes.ordered;return(0,H.jsxs)(ri,{children:[(0,H.jsxs)(ro,{children:[!!e.formatting.headings.levels.length&&(0,H.jsx)(rs,{headingLevels:e.formatting.headings.levels}),i&&(0,H.jsx)(rp,{marks:e.formatting.inlineMarks}),(o||l)&&(0,H.jsxs)(rr,{children:[o&&(0,H.jsx)(t9,{alignment:e.formatting.alignment}),l&&(0,H.jsx)(nM,{lists:e.formatting.listTypes})]}),(e.dividers||e.links||!!e.images||e.formatting.blockTypes.blockquote||e.tables||!!e.layouts.length||e.formatting.blockTypes.code||a)&&(0,H.jsxs)(rr,{children:[e.dividers&&nC,e.links&&t4,e.images&&nH,e.formatting.blockTypes.blockquote&&t5,!!e.layouts.length&&(0,H.jsx)(nF,{layouts:e.layouts}),e.formatting.blockTypes.code&&nc,e.tables&&rt,r&&rc]}),(0,H.jsx)(c.az,{flex:!0})]}),(0,s.useMemo)(()=>t&&(0,H.jsxs)(c.so,{gap:"xsmall",children:[(0,H.jsx)(ti,{}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.$n,{prominence:"low",onPress:()=>{t.toggle()},children:(0,H.jsx)(b.I,{src:t.expanded?ek.M:ey.g})}),(0,H.jsx)(T.m,{children:t.expanded?"Collapse":"Expand"})]})]}),[t]),!!r&&(0,H.jsx)(rd,{})]})}let rr=({children:e})=>(0,H.jsx)(c.so,{gap:"regular",children:e}),ra=({children:e})=>"main"===tZ()?(0,H.jsx)("div",{className:(0,u.AH)({boxSizing:"border-box",display:"flex",paddingInline:u.Bk.size.space.medium,minWidth:0,maxWidth:800,marginInline:"auto",[u.C3.above.mobile]:{paddingInline:u.Bk.size.space.xlarge},[u.C3.above.tablet]:{paddingInline:u.Bk.size.space.xxlarge}}),children:e}):(0,H.jsx)("div",{className:(0,u.AH)({display:"flex"}),children:e}),ri=({children:e})=>{let t=tZ();return(0,H.jsx)(H.Fragment,{children:(0,H.jsx)("div",{"data-layout":t,className:(0,u.AH)({backdropFilter:"blur(8px)",backgroundClip:"padding-box",backgroundColor:`color-mix(in srgb, transparent, ${u.Bk.color.background.canvas} 90%)`,borderBottom:`${u.Bk.size.border.regular} solid color-mix(in srgb, transparent, ${u.Bk.color.foreground.neutral} 10%)`,borderStartEndRadius:u.Bk.size.radius.medium,borderStartStartRadius:u.Bk.size.radius.medium,minWidth:0,position:"sticky",top:0,zIndex:2,'&[data-layout="main"]':{borderRadius:0}}),children:(0,H.jsx)(ra,{children:e})})})},ro=e=>{let t=tZ();return(0,H.jsx)(c.so,{"data-layout":t,paddingY:"regular",paddingX:"medium",gap:"large",flex:!0,minWidth:0,UNSAFE_className:(0,u.AH)({msOverflowStyle:"none",scrollbarWidth:"none",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},'&[data-layout="main"]':{paddingInline:0}}),...e})},rl=new Map([["normal","normal"],["1",1],["2",2],["3",3],["4",4],["5",5],["6",6]]),rs=({headingLevels:e})=>{let{editor:t,textStyles:n}=tq(),r=0===n.allowedHeadingLevels.length,a=(0,s.useMemo)(()=>{let t=[{name:"Paragraph",id:"normal"}];
8return e.forEach(e=>{t.push({name:`Heading ${e}`,id:e.toString()})}),t},[e]),i=n.selected.toString();return(0,s.useMemo)(()=>(0,H.jsx)(I.LC,{flexShrink:0,width:"scale.1700",prominence:"low","aria-label":"Text block",items:a,isDisabled:r,selectedKey:i,onSelectionChange:e=>{let n=rl.get(e);"normal"===n?Q.KE.withoutNormalizing(t,()=>{Q.gB.unsetNodes(t,"level",{match:e=>"heading"===e.type}),Q.gB.setNodes(t,{type:"paragraph"},{match:e=>"heading"===e.type})}):n&&Q.gB.setNodes(t,{type:"heading",level:n},{match:e=>"paragraph"===e.type||"heading"===e.type}),ee.rL.focus(t)},children:e=>(0,H.jsx)(eb.q,{children:e.name},e.id)}),[t,r,a,i])},rc=(0,H.jsx)(function(){let e=(0,ee.RV)(),t=tG().componentBlocks;return Object.entries(t).filter(([,e])=>e.toolbarIcon).map(([n,r])=>(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{nN(e,t,n),ee.rL.focus(e)},children:(0,H.jsx)(b.I,{src:r.toolbarIcon})}),(0,H.jsx)(T.m,{children:r.label})]},n))},{});function rd(){let e=tZ(),t=(0,ee.RV)(),n=tG().componentBlocks;return(0,H.jsxs)(C.cQ,{align:"end",children:[(0,H.jsxs)(T.k,{children:[(0,H.jsxs)(f.rA,{marginY:"regular",marginEnd:"main"===e?void 0:"medium",children:[(0,H.jsx)(b.I,{src:j.W}),(0,H.jsx)(b.I,{src:k.b})]}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Insert"}),(0,H.jsx)(d.ue,{children:"/"})]})]}),(0,H.jsx)(C.W1,{onAction:e=>{nN(t,n,e)},items:Object.entries(n).filter(([,e])=>!e.toolbarIcon),children:([e,t])=>(0,H.jsx)(eb.q,{children:t.label},e)})]})}let ru=[{key:"bold",label:"Bold",icon:y.T,shortcut:"B"},{key:"italic",label:"Italic",icon:v.m,shortcut:"I"},{key:"underline",label:"Underline",icon:eS.W,shortcut:"U"},{key:"strikethrough",label:"Strikethrough",icon:B.t},{key:"code",label:"Code",icon:x.N},{key:"superscript",label:"Superscript",icon:ev.M},{key:"subscript",label:"Subscript",icon:ex.$},{key:"clearFormatting",label:"Clear formatting",icon:N.x}];function rp({marks:e}){let{editor:t,clearFormatting:{isDisabled:n},marks:r}=tq(),a=rh(e),i=rh(Object.keys(r).filter(e=>r[e].isSelected)),o=rh(Object.keys(r).filter(e=>r[e].isDisabled).concat(n?"clearFormatting":[]));return(0,s.useMemo)(()=>{let e=ru.filter(e=>"clearFormatting"===e.key||a[e.key]);return(0,H.jsx)(eb.K,{UNSAFE_className:(0,u.AH)({minWidth:`calc(${u.Bk.size.element.medium} * 4)`}),prominence:"low",density:"compact",buttonLabelBehavior:"hide",overflowMode:"collapse",summaryIcon:(0,H.jsx)(b.I,{src:ew.A}),items:e,selectionMode:"multiple",selectedKeys:i,disabledKeys:o,onAction:e=>{if("clearFormatting"===e)(0,V.aR)(t);else{var n;null!=(n=Q.KE.marks(t))&&n[e]?Q.KE.removeMark(t,e):Q.KE.addMark(t,e,!0)}ee.rL.focus(t)},children:e=>(0,H.jsxs)(eb.q,{textValue:e.label,children:[(0,H.jsx)(d.EY,{children:e.label}),"shortcut"in e&&(0,H.jsx)(d.ue,{meta:!0,children:e.shortcut}),(0,H.jsx)(b.I,{src:e.icon})]},e.key)})},[o,t,a,i])}function rh(e){return(0,s.useMemo)(()=>e,[JSON.stringify(e)])}let rg=({attributes:e,children:t,element:n})=>{let r=`h${n.level}`,a=(0,ee.RV)(),{documentFeatures:i}=tG(),[o,l]=(0,s.useState)(!1);return 0===Object.keys(i.formatting.headings.schema.fields).length?(0,H.jsx)(r,{...e,style:{textAlign:n.textAlign},children:t}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(r,{style:{textAlign:n.textAlign},children:(0,H.jsxs)(V.aE,{element:n,children:[(0,H.jsx)("div",{children:t}),(0,H.jsx)(V.aF,{children:(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[(0,H.jsx)(nl,{onPress:()=>l(!0)}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{Q.gB.removeNodes(a,{at:ee.rL.findPath(a,n)})},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})]})})]})}),(0,H.jsx)(ns,{element:n,schema:i.formatting.headings.schema,isOpen:o,nodeLabel:"Heading",onDismiss:()=>l(!1)})]})},rf=e=>{switch(e.element.type){case"layout":return(0,H.jsx)(nT,{attributes:e.attributes,children:e.children,element:e.element});case"layout-area":return(0,H.jsx)(nO,{...e});case"code":return(0,H.jsx)(nd,{attributes:e.attributes,children:e.children,element:e.element});case"component-block":return(0,H.jsx)(nB,{attributes:e.attributes,children:e.children,element:e.element});case"component-inline-prop":case"component-block-prop":return(0,H.jsx)(nA,{...e});case"heading":return(0,H.jsx)(rg,{attributes:e.attributes,children:e.children,element:e.element});case"link":return(0,H.jsx)(t1,{attributes:e.attributes,children:e.children,element:e.element});case"ordered-list":return(0,H.jsx)("ol",{...e.attributes,children:e.children});case"unordered-list":return(0,H.jsx)("ul",{...e.attributes,children:e.children});case"list-item":return(0,H.jsx)("li",{...e.attributes,children:e.children});case"list-item-content":return(0,H.jsx)("span",{...e.attributes,children:e.children});case"blockquote":return(0,H.jsx)("blockquote",{...e.attributes,children:e.children});case"divider":return(0,H.jsx)(nI,{...e});case"image":return(0,H.jsx)(nK,{attributes:e.attributes,children:e.children,element:e.element});case"table":return(0,H.jsx)(n2,{attributes:e.attributes,children:e.children,element:e.element});case"table-head":return(0,H.jsx)(n4,{attributes:e.attributes,children:e.children,element:e.element});case"table-body":return(0,H.jsx)(n3,{attributes:e.attributes,children:e.children,element:e.element});case"table-row":return(0,H.jsx)(n6,{attributes:e.attributes,children:e.children,element:e.element});case"table-cell":return(0,H.jsx)(n5,{attributes:e.attributes,children:e.children,element:e.element});default:let{textAlign:t}=e.element;return(0,H.jsx)("p",{style:{textAlign:t},...e.attributes,children:e.children})}};function rm(e,t,n){let r=ee.rL.findPath(e,t);Q.gB.delete(e,{at:{focus:Q.KE.start(e,r),anchor:Q.KE.end(e,r)}}),n.insert(e)}function rb({children:e,text:t}){let n=tq(),{editor:r}=n,{componentBlocks:a}=tG(),i=(0,eN.Ht)([...Object.keys(a).map(e=>({label:a[e].label,insert:t=>{nN(t,a,e)}})),...n.textStyles.allowedHeadingLevels.filter(e=>n.editorDocumentFeatures.formatting.headings.levels.includes(e)).map(e=>({label:`Heading ${e}`,insert(t){(0,V.aQ)(t,{type:"heading",level:e,children:[{text:""}]})}})),!n.blockquote.isDisabled&&n.editorDocumentFeatures.formatting.blockTypes.blockquote&&{label:"Blockquote",insert(e){(0,V.aQ)(e,{type:"blockquote",children:[{text:""}]})}},!n.code.isDisabled&&n.editorDocumentFeatures.formatting.blockTypes.code&&{label:"Code block",insert(e){(0,V.aQ)(e,{type:"code",children:[{text:""}]})}},!!n.editorDocumentFeatures.images&&{label:"Image",async insert(e){let t=await n$();t&&(0,V.aQ)(e,{type:"image",src:t,alt:"",title:"",children:[{text:""}]})}},!!n.editorDocumentFeatures.tables&&{label:"Table",insert:nX},!n.dividers.isDisabled&&n.editorDocumentFeatures.dividers&&{label:"Divider",insert(e){(0,V.aQ)(e,{type:"divider",children:[{text:""}]})}},!!n.editorDocumentFeatures.layouts.length&&{label:"Layout",insert(e){nP(e,n.editorDocumentFeatures.layouts[0])}},!n.lists.ordered.isDisabled&&n.editorDocumentFeatures.formatting.listTypes.ordered&&{label:"Numbered List",keywords:["ordered list"],insert(e){(0,V.aQ)(e,{type:"ordered-list",children:[{text:""}]})}},!n.lists.unordered.isDisabled&&n.editorDocumentFeatures.formatting.listTypes.unordered&&{label:"Bullet List",keywords:["unordered list"],insert(e){(0,V.aQ)(e,{type:"unordered-list",children:[{text:""}]})}}].filter(e=>"boolean"!=typeof e),t.text.slice(1),{keys:["label","keywords"]}).map((e,t)=>({...e,index:t})),o=(0,s.useRef)({options:i,text:t});(0,s.useEffect)(()=>{o.current={options:i,text:t}});let l=(0,s.useRef)(e=>{});(0,s.useEffect)(()=>{l.current=e=>{if(!e.defaultPrevented)switch(e.key){case"ArrowDown":o.current.options.length&&(e.preventDefault(),f.selectionManager.setFocused(!0),f.selectionManager.setFocusedKey((Number(f.selectionManager.focusedKey)===o.current.options.length-1?0:Number(f.selectionManager.focusedKey)+1).toString()));return;case"ArrowUp":o.current.options.length&&(e.preventDefault(),f.selectionManager.setFocused(!0),f.selectionManager.setFocusedKey(("0"===f.selectionManager.focusedKey?o.current.options.length-1:Number(f.selectionManager.focusedKey)-1).toString()));return;
8case"Enter":{let t=o.current.options[Number(f.selectionManager.focusedKey)];t&&(rm(r,o.current.text,t),e.preventDefault());return}case"Escape":{let t=ee.rL.findPath(r,o.current.text);Q.gB.unsetNodes(r,"insertMenu",{at:t}),e.preventDefault();return}}}}),(0,s.useEffect)(()=>{let e=ee.rL.toDOMNode(r,r),t=e=>l.current(e);return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[r]);let c=(0,s.useRef)(null),d=(0,ea.T)({isOpen:!0}),{triggerProps:{onPress:p,...h},overlayProps:g}=(0,en.o)({type:"listbox"},d,c),f=(0,e$.p)({items:i,children:e=>(0,H.jsx)(ez.q7,{children:e.label},e.index)});(0,s.useEffect)(()=>{!f.selectionManager.isFocused&&f.collection.size&&(f.selectionManager.setFocused(!0),f.selectionManager.setFocusedKey("0"))},[f]);let m=(0,s.useRef)(null);(0,s.useEffect)(()=>{var e;let t=null==(e=m.current)||null==(e=e.querySelector('[role="listbox"] [role="presentation"]'))?void 0:e.children[f.selectionManager.focusedKey];t&&(0,eL.A)(t,{scrollMode:"if-needed",boundary:m.current,block:"nearest"})},[f.selectionManager.focusedKey]);let b=(0,s.useRef)(null),y=(0,ez.pn)();return(0,H.jsxs)(s.Fragment,{children:[(0,H.jsx)("span",{...h,role:"button",className:(0,u.AH)({color:u.Bk.color.foreground.accent,fontWeight:u.Bk.typography.fontWeight.medium}),ref:c,children:e}),(0,H.jsx)(ei.AM,{width:"alias.singleLineWidth",placement:"bottom start",isNonModal:!0,hideArrow:!0,...g,state:d,triggerRef:c,children:(0,H.jsx)("div",{className:(0,u.AH)({overflow:"scroll",maxHeight:300}),ref:m,children:(0,H.jsx)(ez.TY,{"aria-label":"Insert block",state:f,shouldUseVirtualFocus:!0,layout:y,ref:b,onAction:e=>{rm(r,t,i[e])}})})})]})}let ry=new WeakSet,rk=new WeakSet;function rx(e){var t;let n=function e(t,n){if(Q.EY.isText(t))return t.insertMenu?n:void 0;if(!ry.has(t.children)){for(let[r,a]of t.children.entries()){if(rk.has(a))continue;let t=e(a,[...n,r]);if(t)return t;rk.add(a)}ry.add(t.children)}}(e,[]);return!(!n||null!=(t=Q.KE.marks(e))&&t.insertMenu||e.selection&&Q.wA.equals(e.selection.anchor.path,n)&&Q.wA.equals(e.selection.focus.path,n))&&(Q.gB.unsetNodes(e,"insertMenu",{at:n}),!0)}function rv({placeholder:e,children:t}){let[n,r]=(0,s.useState)(0);return(0,H.jsxs)("span",{className:(0,u.AH)({position:"relative",display:"inline-block",width:n}),children:[(0,H.jsx)("span",{contentEditable:!1,className:(0,u.AH)({position:"absolute",pointerEvents:"none",display:"inline-block",left:0,top:0,maxWidth:"100%",whiteSpace:"nowrap",opacity:"0.5",userSelect:"none",fontStyle:"normal",fontWeight:"normal",textDecoration:"none",textAlign:"left"}),children:(0,H.jsx)("span",{ref:e=>{if(e){let t=e.offsetWidth;t!==n&&r(t)}},children:e})}),t]})}let rw=({leaf:e,text:t,children:n,attributes:r})=>{let{underline:a,strikethrough:i,bold:o,italic:l,code:s,keyboard:c,superscript:d,subscript:u,placeholder:p,insertMenu:h,...g}=e;void 0!==p&&(n=(0,H.jsx)(rv,{placeholder:p,children:n})),h&&(n=(0,H.jsx)(rb,{text:t,children:n})),s&&(n=(0,H.jsx)("code",{children:n})),o&&(n=(0,H.jsx)("strong",{children:n})),i&&(n=(0,H.jsx)("s",{children:n})),l&&(n=(0,H.jsx)("em",{children:n})),c&&(n=(0,H.jsx)("kbd",{children:n})),d&&(n=(0,H.jsx)("sup",{children:n})),u&&(n=(0,H.jsx)("sub",{children:n})),a&&(n=(0,H.jsx)("u",{children:n}));let f=Object.keys(g).filter(e=>e.startsWith("prism_")).map(e=>rE.get(e.replace("prism_","")));if(f.length){let e=f.join(" ");n=(0,H.jsx)("span",{className:e,children:n})}return(0,H.jsx)("span",{...r,children:n})},rS=e=>(0,H.jsx)(rw,{...e}),rE=new Map([{types:["comment","prolog","doctype","cdata"],style:{color:u.Bk.color.foreground.neutralTertiary,fontStyle:"italic"}},{types:["atrule","attr-name","class-name","selector"],style:{color:u.Bk.color.scale.amber11}},{types:["boolean","constant","inserted-sign","entity","inserted","number","regex","symbol","variable"],style:{color:u.Bk.color.scale.green11}},{types:["attr-value","builtin","char","constant","generics","url"],style:{color:u.Bk.color.scale.pink11}},{types:["string"],style:{color:u.Bk.color.scale.indigo9}},{types:["annotation","deleted","deleted-sign","decorator","important","tag"],style:{color:u.Bk.color.scale.red11}},{types:["function","function-variable","operator"],style:{color:u.Bk.color.scale.purple11}},{types:["tag","selector","keyword"],style:{color:u.Bk.color.scale.indigo11}},{types:["punctuation"],style:{color:u.Bk.color.foreground.neutralSecondary}}].flatMap(e=>{let t=(0,u.AH)(e.style);return e.types.map(e=>[e,t])})),rj=/^```(\w+)? ?$/,rA=()=>({type:"paragraph",children:[{text:""}]}),rN=/(^|\s)\[(.+?)\]\((\S+)\)$/;function rB(e,t,n){var r=function(e){let{normalizeNode:t}=e;return e.normalizeNode=n=>{let[r,a]=n;if(Q.KE.isEditor(r)){let t=r.children[r.children.length-1];if((null==t?void 0:t.type)!=="paragraph")return void Q.gB.insertNodes(e,rA(),{at:[...a,r.children.length]})}t(n)},e}(function(e,t,n){let{insertText:r,isInline:a,normalizeNode:i}=n;return n.isInline=e=>"link"===e.type||a(e),e.links&&(n.insertText=a=>{if(r(a),")"!==a||!n.selection)return;let i=Q.KE.start(n,Q.KE.above(n,{match:V.au}
8)[1]),o=Q.KE.string(n,{anchor:n.selection.anchor,focus:i}),l=rN.exec(o);if(!l)return;let s=(0,V.aw)(n,e,t);if((null==s?void 0:s.documentFeatures.links)===!1)return;let[,c,d,u]=l;n.history.undos.push({operations:[],selectionBefore:n.selection});let p=0===l.index?i:(0,V.aS)(n,i,{distance:l.index}),h=(0,V.aS)(n,p,{distance:""===c?1:2}),g=(0,V.aS)(n,h,{distance:d.length});Q.gB.delete(n,{at:{anchor:g,focus:n.selection.anchor}}),Q.gB.delete(n,{at:{anchor:p,focus:h}}),Q.gB.wrapNodes(n,{type:"link",href:u,children:[]},{at:{anchor:n.selection.anchor,focus:p},split:!0});let f=Q.KE.next(n);f&&Q.gB.select(n,f[1])}),n.normalizeNode=([e,t])=>{if("link"===e.type){if(""===Q.bP.string(e))return void Q.gB.unwrapNodes(n,{at:t});for(let[r,a]of e.children.entries())if("link"===a.type)return void Q.gB.unwrapNodes(n,{at:[...t,r]})}if((0,V.aT)(e)){let a=null;for(let[i,o]of e.children.entries()){var r;if("link"===o.type&&o.href===(null==(r=a)?void 0:r.node.href)){let e=[...t,a.index],r=[...t,i],l=[...e,a.node.children.length];for(let e=o.children.length-1;e>=0;e--){let t=[...r,e];Q.gB.moveNodes(n,{at:t,to:l})}Q.gB.removeNodes(n,{at:r});return}Q.EY.isText(o)&&""===o.text||(a=null),"link"===o.type&&(a={index:i,node:o})}}i([e,t])},n}(t,n,function(e){let{insertBreak:t,normalizeNode:n,deleteBackward:r}=e;return e.deleteBackward=t=>{if(e.selection){let t=function(e){if(e.selection){let t=Q.KE.above(e,{match:(0,V.av)("list-item")}),n=Q.KE.above(e,{match:tU});if(t&&n)return{isInside:!0,listItem:t,list:n}}return{isInside:!1}}(e);if(t.isInside&&Q.Q6.isCollapsed(e.selection)&&Q.KE.isStart(e,e.selection.anchor,t.list[1]))return void Q.gB.unwrapNodes(e,{match:tU,split:!0})}r(t)},e.insertBreak=()=>{let[n]=Q.KE.nodes(e,{match:e=>"list-item"===e.type,mode:"lowest"});if(n&&""===Q.bP.string(n[0]))return void Q.gB.unwrapNodes(e,{match:tU,split:!0});t()},e.normalizeNode=t=>{let[r,a]=t;if(Q.Hg.isElement(r)||Q.KE.isEditor(r)){let t=tU(r);for(let[n,o]of Q.bP.children(e,a)){let l=o[o.length-1];if(tU(n)){var i;if((null==(i=r.children[o[o.length-1]+1])?void 0:i.type)===n.type){let t=Q.wA.next(o);(0,V.at)(e,t,[...o,n.children.length]),Q.gB.removeNodes(e,{at:t});return}if(t){let t=r.children[l-1];Q.Hg.isElement(t)?Q.gB.moveNodes(e,{at:o,to:[...Q.wA.previous(o),t.children.length-1]}):Q.gB.unwrapNodes(e,{at:o});return}}if("list-item"===r.type&&"list-item-content"!==n.type&&0===l&&(0,V.au)(n)){if(0!==a[a.length-1]){let t=Q.bP.get(e,Q.wA.previous(a));if(Q.Hg.isElement(t))return void Q.gB.moveNodes(e,{at:a,to:[...Q.wA.previous(a),t.children.length]})}Q.gB.unwrapNodes(e,{at:o});return}if("list-item"===r.type&&"list-item-content"===n.type&&0!==l)return void Q.gB.splitNodes(e,{at:o})}}n(t)},e}(function(e){let{deleteFragment:t,normalizeNode:n,getFragment:r,insertFragment:a,deleteBackward:i}=e;return e.insertFragment=t=>{let n=nY(e);if(!n||1!==t.length||"table"!==t[0].type)return void a(t);let r=t[0].children.flatMap(e=>"table-head"===e.type||"table-body"===e.type?e.children:[]);if(!r.every((0,V.av)("table-row")))return void a(t);let{row:i,column:o,tablePath:l,table:s}=n,c=n.table.children[+(1!==n.table.children.length)];if("table-row"!==r[0].type||"table-body"!==c.type||"table-row"!==c.children[0].type)return void a(t);let d="table-head"===s.children[0].type;"many"!==n.singleCell&&(i={start:i.start,end:Math.min(i.start+r.length-1,c.children.length-1+ +!!d)},o={start:o.start,end:Math.min(o.start+r[0].children.length-1,c.children[0].children.length-1)}),Q.KE.withoutNormalizing(e,()=>{for(let t=i.start;t<=i.end;t++){let n=r[(t-i.start)%r.length];for(let r=o.start;r<=o.end;r++){let a=[...nW(d,t),r],i=Q.bP.get(s,a),c=n.children[(r-o.start)%n.children.length];if("table-cell"!==i.type||"table-cell"!==c.type)continue;let u=[...l,...a];for(let t of[...i.children.keys()].reverse())Q.gB.removeNodes(e,{at:[...u,t]});Q.gB.insertNodes(e,c.children.map(nZ),{at:[...u,0]})}}Q.gB.setSelection(e,{anchor:Q.KE.start(e,[...l,...nW(d,i.start),o.start]),focus:Q.KE.end(e,[...l,...nW(d,i.end),o.end])})})},e.deleteBackward=t=>{if(e.selection&&Q.Q6.isCollapsed(e.selection)&&0===e.selection.anchor.offset){let t=Q.KE.above(e,{match:(0,V.av)("table-cell")});if(t&&"paragraph"===t[0].children[0].type&&void 0===t[0].children[0].children[0].type&&Q.wA.equals(e.selection.anchor.path,[...t[1],0,0]))return}i(t)},e.getFragment=()=>{let t=nY(e);if(t&&"not-selected"!==t.singleCell){var n;let{table:e}=t,a="table-head"===e.children[0].type||"table-body"===e.children[0].type?e.children[0]:void 0;if(!a)return r();let i=(null==(n=e.children[1])?void 0:n.type)==="table-body"?e.children[1]:void 0,o=i||a,l="table-head"===a.type,s=0===t.row.start&&!!i,c=t.column.end-t.column.start+1;return[{type:"table",children:[...s?[{type:"table-head",children:[{type:"table-row",children:Array.from({length:c}).map((e,n)=>a.children[0].children[n+t.column.start])}]}]:[],{type:"table-body",children:Array.from({length:t.row.end-t.row.start+ +!s}).map((e,n)=>({type:"table-row",children:Array.from({length:c}).map((e,r)=>o.children[n+t.row.start-(l&&!s?1:0)].children[r+t.column.start])}))}]}]}return r()},e.deleteFragment=n=>{if(!e.selection||Q.Q6.isCollapsed(e.selection))return void t(n);let r=nY(e);if(!r||"not-selected"===r.singleCell)return void t(n);let a=r.table.children[0];if(!Q.Hg.isElement(a)||!Q.Hg.isElement(a.children[0]))return void t(n);let i=r.table.children.reduce((e,t)=>
8e+("table-head"===t.type||"table-body"===t.type?t.children.length:0),0)-1,{row:o,column:l,tablePath:s}=r,c=0===o.start&&o.end===i,d=0===l.start&&l.end===a.children[0].children.length-1;if(c&&d)return void Q.gB.removeNodes(e,{at:s});let u="table-head"===a.type;if(d)return void Q.KE.withoutNormalizing(e,()=>{for(let t=o.end;t>=o.start;t--){if(u){if(0===t){Q.gB.removeNodes(e,{at:[...s,0]});continue}Q.gB.removeNodes(e,{at:[...s,1,t-1]});continue}Q.gB.removeNodes(e,{at:[...s,0,t]})}});if(c)return void Q.KE.withoutNormalizing(e,()=>{for(let t=l.end;t>=l.start;t--)for(let n=0;n<=i;n++)Q.gB.removeNodes(e,{at:[...s,...nW(u,n),t]});let t=[...s,0,0,l.start],n=Q.KE.start(e,0===l.start?t:Q.wA.previous(t));Q.gB.select(e,n)});let p=Q.KE.start(e,e.selection).path;Q.KE.withoutNormalizing(e,()=>{for(let t=o.start;t<=o.end;t++)for(let n=l.start;n<=l.end;n++){let a=[...nW(u,t),n],i=Q.bP.get(r.table,a);if(!Q.Hg.isElement(i))continue;let o=[...s,...a];for(let t of(Q.gB.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:[...o,0]}),[...i.children.keys()].reverse()))Q.gB.removeNodes(e,{at:[...o,t+1]})}Q.gB.select(e,p)})},e.normalizeNode=t=>{let[r,a]=t;if("table-head"===r.type&&r.children.length>1)return void(0,V.at)(e,a,Q.wA.next(a),(e,t)=>0!==t);let i=!1;for(let t of["table-body","table-head"])if(r.type===t){for(let[n,o]of r.children.entries())if("table-row"===o.type){for(let[r,l]of o.children.entries())if("table-cell"===l.type){let o=[...a,n,r];l.header&&"table-body"===t&&(Q.gB.unsetNodes(e,"header",{at:o}),i=!0),l.header||"table-head"!==t||(Q.gB.setNodes(e,{header:!0},{at:o}),i=!0)}}}if(!i){if("table"===r.type){let t=r.children.reduce((e,t)=>"table-head"===t.type||"table-body"===t.type?t.children.reduce((e,t)=>"table-row"===t.type?Math.max(e,t.children.length):e,e):e,0),n=!1;for(let[i,o]of r.children.entries())if("table-body"===o.type||"table-head"===o.type)for(let[r,l]of o.children.entries())"table-row"===l.type&&l.children.length!==t&&(Q.gB.insertNodes(e,Array.from({length:t-l.children.length},()=>nJ("table-head"===o.type)),{at:[...a,i,r,l.children.length]}),n=!0);if(n)return;if(1===r.children.length&&"table-head"===r.children[0].type)return void Q.gB.insertNodes(e,{type:"table-body",children:Array.from({length:r.children[0].children.length},()=>nJ(!1))},{at:[...a,1]});if(2===r.children.length&&"table-head"===r.children[1].type)return void Q.gB.moveNodes(e,{at:[...a,1],to:[...a,0]});if(r.children.length>2)return void(0,V.at)(e,a,Q.wA.next(a),(e,t)=>0!==t&&1!==t)}n(t)}},e}(function(e,t,n){let r=(0,eC.A)(e=>(0,V.aL)(t,e)),{normalizeNode:a,deleteBackward:i,insertBreak:o}=n;return n.deleteBackward=e=>{if(n.selection){let e=nS(n);if(e.isInside&&Q.Q6.isCollapsed(n.selection)&&Q.KE.isStart(n,n.selection.anchor,e.prop[1])&&0===e.prop[1][e.prop[1].length-1])return void Q.gB.unwrapNodes(n,{at:e.componentBlock[1]})}i(e)},n.insertBreak=()=>{let t=nS(n);if(n.selection&&t.isInside){let{prop:[r,a],componentBlock:[i,l]}=t,s=a[a.length-1]===i.children.length-1;if("component-block-prop"===r.type){let[[e,a]]=Q.KE.nodes(n,{match:e=>"paragraph"===e.type}),i=a[a.length-1]===r.children.length-1;if(""===Q.bP.string(e)&&i)return void(s?Q.gB.moveNodes(n,{at:a,to:Q.wA.next(t.componentBlock[1])}):(Q.gB.move(n,{distance:1,unit:"line"}),Q.gB.removeNodes(n,{at:a})))}if("component-inline-prop"===r.type)return void Q.KE.withoutNormalizing(n,()=>{let t=e[i.component];if(void 0!==r.propPath&&void 0!==t){let e={kind:"object",fields:t.schema},c=(0,V.aM)(e,r.propPath,i.props),d=[...c].reverse().findIndex(e=>"array"===e.kind);if(-1!==d){let e=c.length-1-d,t=c[e];(0,q.vA)("array"===t.kind);let u=nu(i.props,r.propPath.slice(0,e));if(nj(t.element))return void(""===Q.bP.string(r)&&u.length-1===r.propPath[e]?(Q.gB.removeNodes(n,{at:a}),s?(Q.gB.insertNodes(n,{type:"paragraph",children:[{text:""}]},{at:Q.wA.next(l)}),Q.gB.select(n,Q.wA.next(l))):Q.gB.move(n,{distance:1,unit:"line"})):o())}}Q.gB.splitNodes(n,{always:!0});let c=Q.wA.next(a);s?Q.gB.moveNodes(n,{at:c,to:Q.wA.next(l)}):((0,V.at)(n,c,[...Q.wA.next(c),0]),Q.gB.removeNodes(n,{at:c}))})}o()},n.normalizeNode=t=>{let[i,o]=t;if("component-inline-prop"===i.type&&!i.propPath&&(1!==i.children.length||!Q.EY.isText(i.children[0])||""!==i.children[0].text))return void Q.gB.removeNodes(n,{at:o});
8if("component-block"===i.type){let t=e[i.component];if(t){let a={kind:"object",fields:t.schema},l=function e(t,n){if("child"===n.kind||"form"===n.kind)return t;if("conditional"===n.kind){let r=e(t.value,n.values[t.discriminant.toString()]);return r===t.value?t:{discriminant:t.discriminant,value:r}}if("array"===n.kind){let r=t.map(t=>e(t,n.element));return(0,V.aI)(t,r)?t:r}if("object"===n.kind){let r=!1,a={};for(let[i,o]of Object.entries(n.fields)){let n=t[i];if(void 0===n){r=!0,a[i]=tf(o);continue}let l=e(n,o);l!==n&&(r=!0),a[i]=l}return r?a:t}(0,q.xb)(n)}(i.props,a);if(l!==i.props)return void Q.gB.setNodes(n,{props:l},{at:o});for(let[e,t]of function(e,t){let n=[];return!function e(t,n,r,a=[]){if("form"===t.kind||"child"===t.kind)return void r(t,n,a);if("object"===t.kind){for(let[i,o]of Object.entries(t.fields))e(o,n[i],r,[...a,i]);r(t,n,a);return}if("array"===t.kind){for(let[i,o]of n.entries())e(t.element,o,r,a.concat(i));return r(t,n,a)}if("conditional"===t.kind){let i=n.discriminant;r(t,i,a.concat("discriminant")),e(t.values[i.toString()],n.value,r,a.concat("value")),r(t,n,a);return}(0,eB.xb)(t)}(e,t,(e,t,r)=>{"array"===e.kind&&nj(e.element)&&n.push([r,e])}),n}(a,i.props)){if(1===i.children.length&&"component-inline-prop"===i.children[0].type&&void 0===i.children[0].propPath)break;let r=[];for(let[t,n]of i.children.entries())if(("component-block-prop"===n.type||"component-inline-prop"===n.type)&&void 0!==n.propPath){let a=n.propPath.concat();for(;a.length&&"number"!=typeof a.pop(););(0,V.aI)(e,a)&&r.push([t,n])}let l=nu(i.props,e),s=tp(l),c=new Set(s),d=new Set,u=[],p=[],h=()=>{let e=tg();for(;c.has(e);)e=tg();return e};for(let[,n]of r){let r=n.propPath[e.length];(0,q.vA)("number"==typeof r),l.length<=r||d.has(r)&&function(e){let t=e.children[0];return 1===e.children.length&&("component-inline-prop"===e.type&&void 0===t.type&&""===t.text||"component-block-prop"===e.type&&"paragraph"===t.type&&1===t.children.length&&void 0===t.children[0].type&&""===t.children[0].text)}(n)?(u.push(tf(t.element)),p.push(h())):(d.add(r),u.push(l[r]),p.push(d.has(r)?h():s[r]))}if(th(u,p),!(0,V.aI)(l,u)){let t=function e(t,n,r,a){if(0===a.length)return r;let[i,...o]=a;if("object"===t.kind)return{...n,[i]:e(t.fields[i],n[i],r,o)};if("conditional"===t.kind)return(0,eB.vA)("value"===i),{discriminant:n.discriminant,value:e(t.values[i],n.value,r,o)};if("array"===t.kind){let a=[...n];return th(a,tp(n)),a[i]=e(t.element,a[i],r,o),a}(0,eB.vA)("form"!==t.kind&&"child"!==t.kind),(0,eB.xb)(t)}(a,i.props,u,e);for(let[a,[i,l]]of(Q.gB.setNodes(n,{props:t},{at:o}),r.entries())){let t=[...l.propPath];t[e.length]=a,Q.gB.setNodes(n,{propPath:t},{at:[...o,i]})}return}}let s=new Map(nw(i.props,t.schema).map(e=>[JSON.stringify(e.path),e.options.kind]));if(i.children.forEach(e=>{(0,q.vA)("component-block-prop"===e.type||"component-inline-prop"===e.type),s.delete(JSON.stringify(e.propPath))}),s.size)return void Q.gB.insertNodes(n,[...s].map(([e,t])=>({type:`component-${t}-prop`,propPath:e?JSON.parse(e):e,children:[{text:""}]})),{at:[...o,i.children.length]});let c=new Set,d={};for(let[t,a]of(nw(i.props,e[i.component].schema).forEach((e,t)=>{d[JSON.stringify(e.path)]={options:e.options,index:t}}),i.children.entries())){if("component-inline-prop"!==a.type&&"component-block-prop"!==a.type)continue;let e=[...o,t],i=JSON.stringify(a.propPath);if(void 0===d[i]||c.has(i))return void Q.gB.removeNodes(n,{at:e});c.add(i);let l=d[i],s=l.index;if(t!==s)return void Q.gB.moveNodes(n,{at:e,to:[...o,s]});let u=`component-${l.options.kind}-prop`;if(a.type!==u)return void Q.gB.setNodes(n,{type:u},{at:e});if(function e([t,n],r,a){let i=nE.get(a);if(i||(i=new WeakSet,nE.set(a,i)),i.has(t))return!1;let o=!1;if("inherit"!==a.inlineMarks&&Q.EY.isText(t)&&(o=(0,V.aN)([t,n],r,a.inlineMarks,a.softBreaks)),Q.Hg.isElement(t)){let i=t.children.map((t,i)=>e([t,[...n,i]],r,a)).some(e=>e);"block"===a.kind?"component-block"===t.type?a.componentBlocks||(Q.gB.unwrapNodes(r,{at:n}),o=!0):o=(0,V.aO)([t,n],r,a.documentFeatures)||i:o=(0,V.aP)([t,n],r,a.documentFeatures.links)}return!1===o&&i.add(t),o}([a,e],n,r(l.options)))return}}}a(t)},n}(n,t,function(e){let{isVoid:t}=e;return e.isVoid=e=>"divider"===e.type||"image"===e.type||t(e),e}(function(e){let{normalizeNode:t,deleteBackward:n}=e;return e.deleteBackward=t=>{if(e.selection&&Q.Q6.isCollapsed(e.selection)&&0===e.selection.anchor.offset){let[t,n]=Q.KE.above(e,{match:e=>"layout-area"===e.type})||[e,[]];if("layout-area"===t.type&&Q.bR.equals(Q.KE.start(e,n),e.selection.anchor))return}n(t)},e.normalizeNode=n=>{let[r,a]=n;if(Q.Hg.isElement(r)&&"layout"===r.type){if(void 0===r.layout)return void Q.gB.unwrapNodes(e,{at:a});if(r.children.length<r.layout.length)return void Q.gB.insertNodes(e,Array.from({length:r.layout.length-r.children.length}).map(()=>({type:"layout-area",children:[rA()]})),{at:[...a,r.children.length]});if(r.children.length>r.layout.length)return void Array.from({length:r.children.length-r.layout.length}).map((e,t)=>
8t).reverse().forEach(t=>{let n=[...a,t+r.layout.length],i=r.children[t+r.layout.length];(0,V.at)(e,n,[...a,r.layout.length-1,r.children[r.layout.length-1].children.length],e=>"paragraph"!==e.type||""!==Q.bP.string(i)),Q.gB.removeNodes(e,{at:n})})}t(n)},e}(function(e,t,n){let{insertBreak:r,normalizeNode:a,insertText:i}=n;function o(r){var a;if((null==r?void 0:r[0].type)!=="paragraph"||1!==r[0].children.length||void 0!==r[0].children[0].type)return!1;let i=rj.exec(r[0].children[0].text);if(!i)return!1;let o=(0,V.aw)(n,e,t);return(!o||"inline"!==o.kind&&!!o.documentFeatures.formatting.blockTypes.code)&&(n.history.undos.push({operations:[],selectionBefore:n.selection}),Q.gB.select(n,r[1]),Q.gB.delete(n),Q.gB.wrapNodes(n,{type:"code",...i[1]?{language:null!=(a=nn.get(i[1].toLowerCase()))?a:i[1]}:{},children:[]},{match:e=>"paragraph"===e.type}),!0)}return n.insertBreak=()=>{let e=Q.KE.above(n,{match:V.au});if((null==e?void 0:e[0].type)==="code"&&Q.EY.isText(e[0].children[0])){let t=e[0].children[0].text;if("\n"===t[t.length-1]&&n.selection&&Q.Q6.isCollapsed(n.selection)&&Q.bR.equals(Q.KE.end(n,e[1]),n.selection.anchor)){r(),Q.gB.setNodes(n,{type:"paragraph",children:[]}),Q.gB.delete(n,{distance:1,at:{path:[...e[1],0],offset:t.length-1}});return}n.insertText("\n");return}n.selection&&Q.Q6.isCollapsed(n.selection)&&o(e)||r()},n.insertText=e=>{i(e)," "===e&&n.selection&&Q.Q6.isCollapsed(n.selection)&&o(Q.KE.above(n,{match:V.au}))},n.normalizeNode=([e,t])=>{if("code"===e.type&&Q.Hg.isElement(e))for(let[r,a]of e.children.entries()){if(!Q.EY.isText(a))return void(n.isVoid(a)?Q.gB.removeNodes(n,{at:[...t,r]}):Q.gB.unwrapNodes(n,{at:[...t,r]}));let e=Object.keys(a).filter(e=>"text"!==e);if(e.length)return void Q.gB.unsetNodes(n,e,{at:[...t,r]})}a([e,t])},n}(t,n,(0,V.aU)(t,e)))))))));let{normalizeNode:a}=r;return r.normalizeNode=([e,t])=>{if(!Q.EY.isText(e)&&"link"!==e.type){let n=Q.KE.isEditor(e)?"editor":e.type;if("string"!=typeof n||void 0===V.aV[n])return void Q.gB.unwrapNodes(r,{at:t});let a=V.aV[n];if("blocks"===a.kind&&0!==e.children.length&&e.children.every(e=>!(0,V.au)(e)))return void Q.gB.wrapNodes(r,{type:a.blockToWrapInlinesIn,children:[]},{at:t,match:e=>!(0,V.au)(e)});let i=!1;for(let[n,o]of[...e.children.entries()].reverse()){let e=[...t,n];if("inlines"===a.kind){if(!Q.EY.isText(o)&&(0,V.au)(o)){rR(r,[o,e],t),i=!0;continue}}else{if(!(0,V.au)(o)){Q.gB.wrapNodes(r,{type:a.blockToWrapInlinesIn,children:[]},{at:e}),i=!0;continue}if(!a.allowedChildren.has(o.type)){rR(r,[o,e],t),i=!0;continue}}}if(i)return}a([e,t])},r}function rR(e,[t,n],r){let a=t.type,i=V.aV[a],o=Q.bP.get(e,r),l=Q.KE.isEditor(o)?"editor":o.type,s=V.aV[l];if(!i||"unwrap"===i.invalidPositionHandleMode)return"blocks"===s.kind&&s.blockToWrapInlinesIn?void Q.gB.setNodes(e,{type:s.blockToWrapInlinesIn,...Object.fromEntries(Object.keys(t).filter(e=>"type"!==e&&"children"!==e).map(e=>[e,null]))},{at:n}):void Q.gB.unwrapNodes(e,{at:n});let c=V.aV[o.type||"editor"];if((null==c?void 0:c.kind)==="blocks"&&c.allowedChildren.has(a))return void(0===r.length?Q.gB.moveNodes(e,{at:n,to:[n[0]+1]}):Q.gB.moveNodes(e,{at:n,to:Q.wA.next(r)}));if(Q.KE.isEditor(o)){Q.gB.moveNodes(e,{at:n,to:[n[0]+1]}),Q.gB.unwrapNodes(e,{at:[n[0]+1]});return}rR(e,[t,n],r.slice(0,-1))}function rC(e){if(!e.selection)return{isInside:!1};let[,t]=Q.KE.parent(e,e.selection);if(!t.length)return{isInside:!1};let[n,r]=Q.KE.parent(e,t);return"blockquote"===n.type?{isInside:!0,path:r}:{isInside:!1}}let rI={bold:["**","__"],italic:["*","_"],strikethrough:["~~"],code:["`"]},rT=new Set,rO=new Set,rP=null;function r_(e,t){let n=rT.has(e);rT.add(e);try{return t()}finally{n||rT.delete(e)}}function rF(e,t){if(null!==rP)return t();rP=e;try{return t()}finally{rP=null}}function rM(e,t){let n=new Set;for(let t of e)rT.has(t)||n.add(t),rT.add(t);try{return t()}finally{for(let e of n)rT.delete(e)}}function rD(e){let t={text:e};for(let e of rT)rO.has(e)||(t[e]=!0);return null!==rP?[{text:""},{type:"link",href:rP,children:[t]},{text:""}]:[t]}function rL(e){let t=e.parentElement,n=null==t?void 0:t.getAttribute("data-align");if("center"===n||"end"===n)return n;if(e instanceof HTMLElement){let t=e.style.textAlign;if("center"===t)return"center";if("right"===t||"end"===t)return"end"}}let r$={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6},rz={CODE:"code",DEL:"strikethrough",S:"strikethrough",STRIKE:"str
8ikethrough",EM:"italic",I:"italic",STRONG:"bold",U:"underline",SUP:"superscript",SUB:"subscript",KBD:"keyboard"};function rU(e){if(!e.length)return[{text:""}];if(e.some(V.au)){let t=[],n=[],r=()=>{n.length&&(t.push({type:"paragraph",children:n}),n=[])};for(let a of e){if((0,V.au)(a)){r(),t.push(a);continue}""!==Q.bP.string(a).trim()&&n.push(a)}return r(),t}return e}let rK={mdastExtensions:[(0,eq.C)(),(0,eH.p)()],extensions:[(0,eV.$)(),(0,eG.K)()]};function rq(e){let t=(0,eK.Y)(e,rK).children;return 1===t.length&&"paragraph"===t[0].type&&(t=t[0].children),function e(t,n){let r=[];for(let a of t){let t=function(t,n){switch(t.type){case"blockquote":return[{type:"blockquote",children:e(t.children,n)}];case"link":return rF(t.url,()=>e(t.children,n));case"code":return[{type:"code",children:[{text:t.value}]}];case"paragraph":return[{type:"paragraph",children:e(t.children,n)}];case"heading":return[{type:"heading",level:t.depth,children:e(t.children,n)}];case"list":return[{type:t.ordered?"ordered-list":"unordered-list",children:e(t.children,n)}];case"listItem":return[{type:"list-item",children:e(t.children,n)}];case"thematicBreak":return[{type:"divider",children:[{text:""}]}];case"break":return rD("\n");case"delete":return r_("strikethrough",()=>e(t.children,n));case"strong":return r_("bold",()=>e(t.children,n));case"emphasis":return r_("italic",()=>e(t.children,n));case"inlineCode":return r_("code",()=>rD(t.value));case"text":return rD(t.value)}return rD(n.slice(t.position.start.offset,t.position.end.offset))}(a,n);t.length&&r.push(...t)}return r.length||r.push({text:""}),r}(t,e)}let rV=/https?:\/\//;function rH(e,t){(0,V.au)(t[0])?(0,V.aQ)(e,t):Q.gB.insertFragment(e,t)}let rG="x-keystatic-fragment",rW=e=>{let t=(e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null)(e);return!!t&&e instanceof t.Node},rY=e=>
8rW(e)&&3===e.nodeType,rJ=e=>{let t="";if(rY(e)&&e.nodeValue)return e.nodeValue;if((e=>rW(e)&&1===e.nodeType)(e)){for(let n of Array.from(e.childNodes))t+=rJ(n);let n=getComputedStyle(e).getPropertyValue("display");("block"===n||"list"===n||"BR"===e.tagName)&&(t+="\n")}return t},rZ=/data-keystatic-fragment="(.+?)"/m,rX="$$keystaticUint8Array$$",rQ={"...":"…","--\x3e":"→","->":"→","<-":"←","<--":"←","--":"–"},r0={"mod+b":"bold","mod+i":"italic","mod+u":"underline"},r1=new Map([["ArrowUp","up"],["ArrowDown","down"],["ArrowLeft","left"],["ArrowRight","right"]]);function r2({onChange:e,value:t,componentBlocks:n,documentFeatures:r,...a}){let i=tZ(),o=(0,s.useMemo)(()=>(function(e,t){var n,r=function(e){let{insertData:t}=e;return e.insertData=n=>{let r=Array.from(n.files).filter(e=>e.type.startsWith("image/"));if(r.length)return void Promise.all(r.map(async e=>({name:e.name,data:new Uint8Array(await e.arrayBuffer())}))).then(t=>{(0,V.aQ)(e,{type:"image",src:{content:t[0].data,filename:t[0].name},alt:"",title:"",children:[{text:""}]})});t(n)},e}(((n=function(e){let{normalizeNode:t,apply:n,insertText:r}=e;return e.normalizeNode=([n,r])=>{if(Q.EY.isText(n)&&n.insertMenu){if("/"!==n.text[0])return void Q.gB.unsetNodes(e,"insertMenu",{at:r});let t=/\s/.exec(n.text);if(t)return void Q.gB.unsetNodes(e,"insertMenu",{at:{anchor:{path:r,offset:t.index},focus:Q.KE.end(e,r)},match:Q.EY.isText,split:!0})}Q.KE.isEditor(e)&&rx(e)||t([n,r])},e.apply=t=>{n(t),"set_selection"===t.type&&rx(e)},e.insertText=t=>{if(r(t),e.selection&&"/"===t){let t=Q.KE.start(e,Q.KE.above(e,{match:V.au})[1]),n=Q.KE.before(e,e.selection.anchor,{unit:"character"});n&&(Q.bR.equals(t,n)||0!==n.offset&&/\s/.test(Q.bP.get(e,n.path).text[n.offset-1]))&&Q.gB.setNodes(e,{insertMenu:!0},{at:{anchor:n,focus:e.selection.anchor},match:Q.EY.isText,split:!0})}},e}(function(e){let{insertText:t}=e;return e.insertText=n=>{if(t(n)," "===n&&e.selection&&Q.Q6.isCollapsed(e.selection)){let t=e.selection.anchor,
8n=Q.KE.above(e,{match:V.au});n&&Object.keys(rQ).forEach(r=>{let a=Q.KE.before(e,t,{unit:"character",distance:r.length+1});if(a&&Q.wA.isDescendant(a.path,n[1])){let n={anchor:t,focus:a};Q.KE.string(e,n).slice(0,r.length)===r&&(e.history.undos.push({operations:[],selectionBefore:e.selection}),Q.gB.select(e,n),e.insertText(rQ[r]+" "))}})}},e}(function(e){let{insertBreak:t}=e;return e.insertBreak=()=>{t();let n=Q.KE.above(e,{match:e=>"heading"===e.type});if(!n||!e.selection||!Q.Q6.isCollapsed(e.selection))return;let r=n[1];if(Q.bR.equals(Q.KE.end(e,r),e.selection.anchor))return void Q.gB.unwrapNodes(e,{at:r});if(!Q.wA.hasPrevious(r))return;let a=Q.wA.previous(r),i=Q.bP.get(e,a);"heading"===i.type&&1===i.children.length&&Q.EY.isText(i.children[0])&&""===i.children[0].text&&Q.gB.unwrapNodes(e,{at:a})},e}(function(e){let{insertBreak:t,deleteBackward:n}=e;return e.deleteBackward=t=>{if(e.selection&&rC(e).isInside&&Q.Q6.isCollapsed(e.selection)&&0===e.selection.anchor.offset&&0===e.selection.anchor.path[e.selection.anchor.path.length-2])return void Q.gB.unwrapNodes(e,{match:e=>"blockquote"===e.type,split:!0});n(t)},e.insertBreak=()=>{let n=rC(e);if(e.selection&&n.isInside){let[t,r]=Q.KE.node(e,e.selection);if(Q.wA.isDescendant(r,n.path)&&""===Q.bP.string(t))return void Q.gB.unwrapNodes(e,{match:e=>"blockquote"===e.type,split:!0})}t()},e}(function(e,t,n){let{insertText:r,insertBreak:a}=n;n.insertBreak=()=>{a();let e=Q.KE.marks(n);if(!e||!n.selection)return;let t=Q.KE.above(n,{match:V.au});if(!t)return;let r=(0,V.aS)(n,n.selection.anchor),i=Object.keys(e);if(!r||!Q.wA.isDescendant(r.path,t[1])){for(let e of i)n.removeMark(e);return}let o=Q.bP.get(n,r.path);for(let e of i)o[e]||n.removeMark(e)};let i={},o=e.formatting.inlineMarks;return Object.keys(rI).forEach(e=>{o[e]&&(i[e]=rI[e])}),0===Object.keys(i).length||(n.insertText=a=>{if(r(a),n.selection&&Q.Q6.isCollapsed(n.selection)){for(let[r,l]of Object.entries(i))for(let i of l)if(a===i[i.length-1]){var o;let a=(o=n,Q.KE.start(o,Q.KE.above(o,{match:V.au})[1])),l=Q.KE.string(n,{anchor:n.selection.anchor,focus:a}),s=/\s/.test(l.slice(-i.length-1,-i.length)),c=i===l.slice(-i.length);if(s||!c)continue;let d=l.slice(0,-i.length-1);for(let[o]of[...d].reverse().entries()){if(d.slice(o,o+i.length)!==i)continue;let l=0===o?a:(0,V.aS)(n,a,{distance:o}),s=Q.KE.after(n,l,{distance:i.length});if(0!==o&&!/\s/.test(Q.KE.string(n,{anchor:Q.KE.before(n,l,{unit:"character"}),focus:l})))continue;let c=Q.KE.string(n,{anchor:s,focus:n.selection.anchor}).slice(0,-i.length);if(""===c||/\s/.test(c[0])||"italic"===r&&("_"===c[0]||"*"===c[0])||"code"===r&&"`"===c)continue;let u=(0,V.aw)(n,e,t);if(!u||"inherit"===u.inlineMarks||!1!==u.inlineMarks[r]){n.history.undos.push({operations:[],selectionBefore:n.selection});let e=Q.KE.pointRef(n,l);Q.gB.delete(n,{at:n.selection.anchor,distance:i.length,reverse:!0}),Q.gB.delete(n,{at:l,distance:i.length}),Q.gB.setNodes(n,{[r]:!0},{match:Q.EY.isText,split:!0,at:{anchor:e.unref(),focus:n.selection.anchor}}),n.removeMark(r);return}}}}}),n}(e,t,function(e,t,n){let{insertText:r}=n,a=Object.create(null),i={...e},o=(e,t,n,r="paragraph")=>{if(!n(i))return;let o=e[e.length-1];a[o]||(a[o]=Object.create(null)),a[o][e]={insert:t,type:r,shouldBeEnabledInComponentBlock:n}};return o("1. ",()=>{Q.gB.wrapNodes(n,{type:"ordered-list",children:[]},{match:V.au})},e=>e.formatting.listTypes.ordered),o("- ",()=>{Q.gB.wrapNodes(n,{type:"unordered-list",children:[]},{match:V.au})},e=>e.formatting.listTypes.unordered),o("* ",()=>{Q.gB.wrapNodes(n,{type:"unordered-list",children:[]},{match:V.au})},e=>e.formatting.listTypes.unordered),e.formatting.headings.levels.forEach(e=>{o("#".repeat(e)+" ",()=>{Q.gB.setNodes(n,{type:"heading",level:e},{match:e=>"paragraph"===e.type||"heading"===e.type})},t=>t.formatting.headings.levels.includes(e),"heading-or-paragraph")}),o("> ",()=>{Q.gB.wrapNodes(n,{type:"blockquote",children:[]},{match:e=>"paragraph"===e.type})},e=>e.formatting.blockTypes.blockquote),o("---",()=>{nR(n)},e=>e.dividers),n.insertText=i=>{r(i);let o=a[i];if(o&&n.selection&&Q.Q6.isCollapsed(n.selection)){let{anchor:r}=n.selection,a=Q.KE.above(n,{match:V.au});if(!a||"paragraph"!==a[0].type&&"heading"!==a[0].type)return;let i={anchor:r,focus:Q.KE.start(n,a[1])},l=o[Q.KE.string(n,i)];if(!l||"paragraph"===l.type&&"paragraph"!==a[0].type)return;let s=(0,V.aw)(n,e,t);if(s&&("inline"===s.kind||!l.shouldBeEnabledInComponentBlock(s.documentFeatures)))return;n.history.undos.push({operations:[],selectionBefore:n.selection}),Q.gB.select(n,i),Q.gB.delete(n),l.insert()}},n}(e,t,rB((0,eU.$k)((0,ee.o$)((0,Q.ie)())),e,t)))))))).insertSoftBreak=()=>{Q.gB.insertText(n,"\n")},n));let{insertTextData:a}=r;return r.setFragmentData=e=>{!function(e,t){let{selection:n}=e;if(!n)return;let[r,a]=Q.Q6.edges(n),i=Q.KE.void(e,{at:r.path}),o=Q.KE.void(e,{at:a.path});if(Q.Q6.isCollapsed(n)&&!i)return;let l=ee.rL.toDOMRange(e,n),s=l.cloneContents(),c=s.childNodes[0];
8if(s.childNodes.forEach(e=>{e.textContent&&""!==e.textContent.trim()&&(c=e)}),o){let[t]=o,n=l.cloneRange(),r=ee.rL.toDOMNode(e,t);n.setEndAfter(r),s=n.cloneContents()}if(i&&(c=s.querySelector("[data-slate-spacer]")),Array.from(s.querySelectorAll("[data-slate-zero-width]")).forEach(e=>{let t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),rY(c)){let e=c.ownerDocument.createElement("span");e.style.whiteSpace="pre",e.appendChild(c),s.appendChild(e),c=e}let d=JSON.stringify(e.getFragment(),(e,t)=>t instanceof Uint8Array?{[rX]:(0,eW.c)(t)}:t),u=window.btoa(encodeURIComponent(d));c.setAttribute("data-keystatic-fragment",u),t.setData(`application/${rG}`,u);let p=s.ownerDocument.createElement("div");p.appendChild(s),p.setAttribute("hidden","true"),s.ownerDocument.body.appendChild(p),t.setData("text/html",p.innerHTML),t.setData("text/plain",rJ(p)),s.ownerDocument.body.removeChild(p)}(r,e)},r.insertFragmentData=e=>{let t=e.getData(`application/${rG}`)||(e=>{let[,t]=e.getData("text/html").match(rZ)||[];return t})(e);if(t){let e=JSON.parse(decodeURIComponent(window.atob(t)),(e,t)=>"object"==typeof t&&null!==t&&rX in t&&"string"==typeof t[rX]?(0,eW.a)(t[rX]):t);return r.insertFragment(e),!0}return!1},r.insertTextData=e=>{let t=Q.KE.above(r,{match:V.au});if((null==t?void 0:t[0].type)==="code"){let t=e.getData("text/plain");return r.insertText(t),!0}let n=e.getData("vscode-editor-data");if(n)try{let t=JSON.parse(n);if((null==t?void 0:t.mode)==="markdown"||(null==t?void 0:t.mode)==="mdx"){let t=e.getData("text/plain");if(t){let e=rq(t);return rH(r,e),!0}}}catch(e){console.log(e)}let i=e.getData("text/plain");if(rV.test(i)&&tQ(i)&&r.selection&&!Q.Q6.isCollapsed(r.selection)&&Q.KE.above(r,{match:e=>(0,V.au)(e)&&!(0,V.au)(e.children[0])})&&Q.KE.nodes(r,{match:e=>"link"===e.type}).next().done)return Q.gB.wrapNodes(r,{type:"link",href:i,children:[]},{split:!0}),!0;let o=e.getData("text/html");if(o)return rH(r,rU(function e(t){let n=[];for(let r of t)n.push(...function(t){if(!(t instanceof globalThis.HTMLElement)){let e=t.textContent;return e?rD(e):[]}if("BR"===t.nodeName)return rD("\n");if("IMG"===t.nodeName){let e=t.getAttribute("alt");return rD(null!=e?e:"")}if("HR"===t.nodeName)return[{type:"divider",children:[{text:""}]}];let n=function(e){let t=new Set,n=e.style,{nodeName:r}=e,a=rz[r];a&&t.add(a);let{fontWeight:i,textDecoration:o,verticalAlign:l}=n;return"underline"===o?t.add("underline"):"line-through"===o&&t.add("strikethrough"),"SPAN"===r&&e.classList.contains("code")&&t.add("code"),"B"===r&&"normal"!==i?t.add("bold"):"string"==typeof i&&("bold"===i||"bolder"===i||"1000"===i||/^[5-9]\d{2}$/.test(i))&&t.add("bold"),"italic"===n.fontStyle&&t.add("italic"),"super"===l?t.add("superscript"):"sub"===l&&t.add("subscript"),t}(t);return t.classList.contains("listtype-quote")?(n.delete("italic"),rM(n,()=>[{type:"blockquote",children:rU(e(t.childNodes))}])):rM(n,()=>{let{nodeName:n}=t;if("A"===n){let n=t.getAttribute("href");if(n)return rF(n,()=>(function(e,t){let n=rO.has(e);rO.add(e);try{return t()}finally{n||rO.delete(e)}})("underline",()=>e(t.childNodes)))}if("PRE"===n&&t.textContent)return[{type:"code",children:[{text:t.textContent||""}]}];let r=e(t.childNodes),a=rU(r);if("LI"===n){let e,t={type:"list-item-content",children:a.filter(t=>void 0!==e||"ordered-list"!==t.type&&"unordered-list"!==t.type||(e=t,!1))};return[{type:"list-item",children:e?[t,e]:[t]}]}if("P"===n)return[{type:"paragraph",textAlign:rL(t),children:a}];let i=r$[n];return"number"==typeof i?[{type:"heading",level:i,textAlign:rL(t),children:a}]:"BLOCKQUOTE"===n?[{type:"blockquote",children:a}]:"OL"===n?[{type:"ordered-list",children:a}]:"UL"===n?[{type:"unordered-list",children:a}]:"DIV"!==n||(0,V.au)(a[0])?r:[{type:"paragraph",children:a}]})}(r));return n}(new DOMParser().parseFromString(o,"text/html").body.childNodes))),!0;return i?(rH(r,rq(i)),!0):a(e)},r})(r,n),[r,n]);return(0,H.jsx)("div",{"data-layout":i,className:(0,u.xW)((0,u.AH)({backgroundColor:u.Bk.color.background.canvas,minWidth:0,'&[data-layout="main"]':{flex:1,display:"flex",flexDirection:"column"},'&:not([data-layout="main"])':{border:`${u.Bk.size.border.regular} solid ${u.Bk.color.border.neutral}`,borderRadius:u.Bk.size.radius.medium}}
8),"keystar-document-editor"),children:(0,H.jsxs)(r6,{componentBlocks:n,documentFeatures:r,editor:o,value:t,onChange:t=>{null==e||e(t);let n=window.getSelection();if(n&&!ee.rL.isFocused(o)){let e=ee.rL.toDOMNode(o,o);n.anchorNode===e&&ee.rL.focus(o)}},children:[(0,s.useMemo)(()=>void 0!==e&&(0,H.jsx)(rn,{documentFeatures:r}),[r,e]),(0,H.jsx)(r9,{...a,readOnly:void 0===e}),!1]})})}let r3=(0,s.createContext)(!1);function r4(){return(0,s.useContext)(r3)}function r6({children:e,editor:t,onChange:n,value:r,componentBlocks:a,documentFeatures:i}){let o=(0,s.useMemo)(()=>Math.random().toString(36),[t]);return(0,H.jsx)(r3.Provider,{value:!0,children:(0,H.jsx)(ee.A,{editor:t,value:r,onChange:e=>{n(e);let r=window.getSelection();if(r&&!ee.rL.isFocused(t)){let e=ee.rL.toDOMNode(t,t);r.anchorNode===e&&ee.rL.focus(t)}},children:(0,H.jsx)(n0,{children:(0,H.jsx)(tW,{componentBlocks:a,editorDocumentFeatures:i,children:e})})},o)})}function r9(e){let t=(0,V.aW)(),n=tZ(),r=(0,ee.Zi)(),{componentBlocks:a,documentFeatures:i}=tG(),o=(0,s.useMemo)(()=>e=>{if(e.defaultPrevented)return;for(let t in r0)if(i.formatting.inlineMarks[r0[t]]&&(0,et.v_)(t,e.nativeEvent)){e.preventDefault();let n=r0[t];!function(e,t){let n=Q.KE.marks(e);if(null!=n&&n[t])return!0;for(let n of Q.KE.nodes(e,{match:Q.EY.isText}))if(n[0][t])return!0;return!1}(r,n)?Q.KE.addMark(r,n,!0):Q.KE.removeMark(r,n);return}if((0,et.v_)("mod+\\",e.nativeEvent))return void(0,V.aR)(r);if(i.links&&(0,et.v_)("mod+k",e.nativeEvent)){e.preventDefault(),t0(r,"");return}if("Tab"===e.key&&(e.shiftKey?function(e){let t=Q.KE.above(e,{match:V.au});return!!t&&"list-item-content"===t[0].type&&(Q.gB.unwrapNodes(e,{match:tU,split:!0}),!0)}(r):function(e){let t=Q.KE.above(e,{match:V.au});if(!t||"list-item-content"!==t[0].type)return!1;let n=Q.wA.parent(t[1]);if(0===n[n.length-1])return!1;let r=Q.wA.previous(n),a=Q.bP.get(e,r);if(1!==a.children.length)return Q.gB.moveNodes(e,{at:n,to:[...r,a.
8children.length-1,a.children[a.children.length-1].children.length]}),!0;let i=Q.KE.parent(e,Q.wA.parent(t[1]))[0].type;return Q.KE.withoutNormalizing(e,()=>{Q.gB.wrapNodes(e,{type:i,children:[]},{at:n}),Q.gB.moveNodes(e,{to:[...r,a.children.length],at:n})}),!0}(r)))return void e.preventDefault();if("Tab"===e.key&&r.selection){let t=Q.KE.above(r,{match:e=>"layout-area"===e.type||"table-cell"===e.type});if(t){let n=e.shiftKey?Q.KE.before(r,t[1],{unit:"block"}):Q.KE.after(r,t[1],{unit:"block"});Q.gB.setSelection(r,{anchor:n,focus:n}),e.preventDefault()}}if((0,et.v_)("mod+a",e)){let t=Q.KE.above(r,{match:(0,V.av)("table")});if(t){Q.gB.select(r,t[1]),e.preventDefault();return}}let t=r1.get(e.key),{selection:n}=r;if(t&&n){let i=nY(r);if(i){var a,o;let l=null==(a=Q.KE.above(r,{match:(0,V.av)("table-cell"),at:n.focus.path}))?void 0:a[1],s=null==(o=Q.KE.above(r,{match:(0,V.av)("table-cell"),at:n.anchor.path}))?void 0:o[1];if(!l||!s)return;let c=function(e,t,n){if("left"===n||"right"===n){let r=Q.KE.above(e,{match:(0,V.av)("table-row"),at:t});if(!r)return;let a=t[t.length-1]+("left"===n?-1:1);if(!r[0].children[a])return;return[...r[1],a]}let r=Q.KE.above(e,{match:(0,V.av)("table"),at:t});if(!r)return;let a=t[t.length-3]+t[t.length-2],i=nW("table-head"===r[0].children[0].type,a+("up"===n?-1:1));if(Q.bP.has(r[0],i))return[...r[1],...i,t[t.length-1]]}(r,l,t);if(c){if("not-selected"===i.singleCell){if("up"!==t&&"down"!==t)return;let[a,i]=ee.rL.toDOMPoint(r,n.focus),o=Q.KE.above(r,{match:V.au,at:n.focus.path});if(!o||"up"===t&&o[1].slice(l.length).some(e=>0!==e))return;if("down"===t){let[e]=Q.KE.parent(r,o[1]);if(e.children.length-1!==o[1][o[1].length-1])return;for(let[e,t]of Q.bP.ancestors(r,o[1],{reverse:!0})){if("table-cell"===e.type)break;let[n]=Q.KE.parent(r,t);if(n.children.length-1!==t[t.length-1])return}}let s=ee.rL.toDOMNode(r,o[0]),d=document.createRange();d.selectNodeContents(s);let u=Array.from(d.getClientRects()),p=document.createRange();p.setStart(a,i),p.setEnd(a,i);let h=Array.from(p.getClientRects()),g=h[h.length-1],f="up"===t?"top":"bottom",m="top"===f?Math.min(...u.map(e=>e.top)):Math.max(...u.map(e=>e.bottom));if(g[f]===m){let a=Q.KE["up"===t?"end":"start"](r,c);Q.gB.select(r,{focus:a,anchor:e.shiftKey?n.anchor:a}),e.preventDefault()}return}if(!e.shiftKey)return;Q.wA.equals(c,s)?Q.gB.select(r,c):Q.gB.select(r,{anchor:n.anchor,focus:Q.KE.start(r,c)}),e.preventDefault()}}}},[r,i]);return(0,H.jsx)(V.aX,{editor:r,children:(0,H.jsx)(d.s7,{size:"main"===n?"medium":"regular",children:(0,H.jsx)(ee.Fo,{placeholder:'Start writing or press "/" for commands...',decorate:(0,s.useCallback)(([e,t])=>{let n=[];if("component-block"===e.type){if(1===e.children.length&&Q.Hg.isElement(e.children[0])&&"component-inline-prop"===e.children[0].type&&void 0===e.children[0].propPath)return n;e.children.forEach((i,o)=>{if(""===Q.bP.string(i)&&Q.Hg.isElement(i)&&("component-block-prop"===i.type||"component-inline-prop"===i.type)&&void 0!==i.propPath){let l=Q.KE.start(r,[...t,o]),s=(0,V.aY)(i.propPath,a[e.component].schema,e.props);s&&n.push({placeholder:s,anchor:l,focus:l})}})}if("code"===e.type&&1===e.children.length&&void 0===e.children[0].type&&e.language&&e.language in tY.languages){let r=[...t,0];!function e(t,a){for(let i of a){let a=t+function e(t){return"string"==typeof t?t.length:Array.isArray(t.content)?t.content.reduce((t,n)=>t+e(n),0):e(t.content)}(i);"string"!=typeof i&&(n.push({["prism_"+i.type]:!0,anchor:{path:r,offset:t},focus:{path:r,offset:a}}),e(t,Array.isArray(i.content)?i.content:[i.content])),t=a}}(0,tY.tokenize(e.children[0].text,tY.languages[e.language]))}return n},[r,a]),onKeyDown:o,renderElement:rf,renderLeaf:rS,...e,...(0,u.Pn)({container:t,layout:n}),className:(0,u.xW)(r7,e.className)})})})}let r5={flex:1,height:"auto",minHeight:u.Bk.size.scale[2e3],minWidth:0,padding:u.Bk.size.space.medium,'&[data-layout="main"]':{boxSizing:"border-box",height:"100%",padding:0,paddingTop:u.Bk.size.space.medium,minHeight:0,minWidth:0,maxWidth:800,marginInline:"auto",[u.C3.above.mobile]:{padding:u.Bk.size.space.xlarge},[u.C3.above.tablet]:{padding:u.Bk.size.space.xxlarge},'&[data-container="wide"]':{padding:u.Bk.size.scale[600]}}},r7=(0,u.AH)({...r5,a:{color:u.Bk.color.foreground.accent}}),r8={},ae=0;
8function at(e){let t=tG(),[n,r]=(0,s.useState)(()=>({key:ae++,value:e.value})),a=(0,s.useMemo)(()=>(0,V.aZ)(t.documentFeatures,e.schema.options),[e.schema,t.documentFeatures]);return n.value!==e.value&&r({key:ae++,value:e.value}),(0,H.jsx)(tX,{children:(0,H.jsx)(l.D0,{label:e.schema.options.label,children:i=>(0,s.createElement)(r2,{...i,key:n.key,componentBlocks:"inherit"===e.schema.options.componentBlocks?t.componentBlocks:r8,documentFeatures:a,onChange:t=>{r(e=>({key:e.key,value:t})),e.onChange(t)},value:n.value})})})}function an(e){let t=tR(e);return"block"===e.schema.options.kind&&("both"===e.schema.options.editIn||"modal"===e.schema.options.editIn)&&t.value?(0,H.jsx)(at,{schema:e.schema,...t}):null}function ar(e){var t,n,r;return"object"===e.kind?null!=(t=e.Input)?t:tA:"conditional"===e.kind?null!=(n=e.Input)?n:tN:"array"===e.kind?null!=(r=e.Input)?r:tF:"child"===e.kind?an:e.Input}let aa=(0,s.memo)(function(e){var t;let n,r,a=(0,o.c)(7);if((null==(t=e.omitFieldAtPath)?void 0:t.length)===0)return null;a[0]!==e.schema?(n=ar(e.schema),a[0]=e.schema,a[1]=n):n=a[1];let i=n,l=!!e.autoFocus,s=!!e.forceValidation;return a[2]!==i||a[3]!==e||a[4]!==l||a[5]!==s?(r=(0,H.jsx)(i,{...e,autoFocus:l,forceValidation:s}),a[2]=i,a[3]=e,a[4]=l,a[5]=s,a[6]=r):r=a[6],r}),ai=[],ao=(0,s.memo)(function(e){let t,n,r,a,i,l=(0,o.c)(13);l[0]!==e?({slugField:n,...t}=e,l[0]=e,l[1]=t,l[2]=n):(t=l[1],n=l[2]),l[3]!==t.schema?(r=ar(t.schema),l[3]=t.schema,l[4]=r):r=l[4];let s=r,c=t,d=!!t.autoFocus,u=!!t.forceValidation;return l[5]!==s||l[6]!==c||l[7]!==d||l[8]!==u?(a=(0,H.jsx)(s,{...c,autoFocus:d,forceValidation:u}),l[5]=s,l[6]=c,l[7]=d,l[8]=u,l[9]=a):a=l[9],l[10]!==n||l[11]!==a?(i=(0,H.jsx)(V.aA,{value:ai,children:(0,H.jsx)(V.aB,{value:n,children:a})}),l[10]=n,l[11]=a,l[12]=i):i=l[12],i});class al extends Error{constructor(){super("There are a variable number of child fields")}}function as(e){try{let t=function e(t,n,r){if(r.has(t))return[];switch(r.add(t),t.kind){case"form":return[];case"child":return[{relativePath:n,options:t.options,kind:"child"}];case"conditional":if(ac(t))throw new al;return[];case"array":if(t.asChildTag){let a=e(t.element,[],r);if(a.length>1)return[];return[{kind:"array",asChildTag:t.asChildTag,field:t,relativePath:n,child:a[0]}]}if(ac(t))throw new al;return[];case"object":{let a=[];for(let[i,o]of Object.entries(t.fields))a.push(...e(o,n.concat(i),r));return a}}}(e,[],new Set);if(1===t.length)return t[0];return}catch(e){if(e instanceof al)return;throw e}}function ac(e,t=new Set){if(t.has(e))return!1;switch(t.add(e),e.kind){case"form":return!1;case"child":return!0;case"conditional":return Object.values(e.values).some(e=>ac(e,t));case"object":return Object.keys(e.fields).some(n=>ac(e.fields[n],t));case"array":return ac(e.element,t)}}function ad(e){if("inline"===e.type)return au(e.children);if("link"===e.type)return rF(e.attributes.href,()=>au(e.children));if("text"===e.type)return rD(e.attributes.content);if("strong"===e.type)return r_("bold",()=>au(e.children));if("code"===e.type)return r_("code",()=>rD(e.attributes.content));if("em"===e.type)return r_("italic",()=>au(e.children));if("s"===e.type)return r_("strikethrough",()=>au(e.children));if("tag"===e.type){if("u"===e.tag)return r_("underline",()=>au(e.children));if("kbd"===e.tag)return r_("keyboard",()=>au(e.children));if("sub"===e.tag)return r_("subscript",()=>au(e.children));if("sup"===e.tag)return r_("superscript",()=>au(e.children))}if("softbreak"===e.type)return rD(" ");if("hardbreak"===e.type)return rD("\n");if("component-inline-prop"===e.tag&&Array.isArray(e.attributes.propPath)&&e.attributes.propPath.every(e=>"string"==typeof e||"number"==typeof e))return{type:"component-inline-prop",children:ap(e.children),propPath:e.attributes.propPath};throw Error(`Unknown inline node type: ${e.type}`)}function au(e){return e.flatMap(ad)}function ap(e){let t,n=e.flatMap(ad),r=[];for(let[e,i]of n.entries()){var a;(void 0!==i.type||""!==i.text||(null==(a=t)?void 0:a.type)!==void 0||e===n.length-1)&&(r.push(i),t=i)}return r.length||r.push({text:""}),r}function ah(e,t){let n=e.children.flatMap(e=>(function e(t,n){var r,a;if("blockquote"===t.type)return{type:"blockquote",children:t.children.flatMap(t=>e(t,n))};if("fence"===t.type){let{language:e,content:n,...r}=t.attributes;return{type:"code",children:[{text:n.replace(/\n$/,"")}],..."string"==typeof e?{language:e}:{},...r}}if("heading"===t.type)return{...t.attributes,level:t.attributes.level,type:"heading",children:ap(t.children)};if("list"===t.type)return{type:t.attributes.ordered?"ordered-list":"unordered-list",children:t.children.flatMap(t=>e(t,n))};if("item"===t.type){let a=[{type:"list-item-content",children:t.children.length?ap([t.children[0]]):[{text:""}]}];if((null==(r=t.children[1])?void 0:r.type)==="list"){let r=t.children[1];a.push({type:r.attributes.ordered?"ordered-list":"unordered-list",children:r.children.flatMap(t=>e(t,n))})}return{type:"list-item",children:a}}if("paragraph"===t.type){if(1===t.children.length&&"inline"===t.children[0].type&&1===t.children[0].children.length&&"image"===t.children[0].children[0].type){let e=t.children[0].children[0];return{type:"image",src:decodeURI(e.attributes.src),alt:e.attributes.alt,title:null!=(a=e.attributes.title)?a:"",children:[{text:""}]}}let e=ap(t.children);return 1===e.length&&"component-inline-prop"===e[0].type?e[0]:{type:"paragraph",children:e,textAlign:t.attributes.textAlign}}if("hr"===t.type)return{type:"divider",children:[{text:""}]};if("table"===t.type)return{type:"table",children:t.children.flatMap(t=>e(t,n))};if("tbody"===t.type)return{type:"table-body",children:t.children.flatMap(t=>e(t,n))};if("thead"===t.type)return t.children.length?{type:"table-head",children:t.children.flatMap(t=>e(t,n))}:[];if("tr"===t.type)return{type:"table-row",children:t.children.flatMap(t=>e(t,n))};if("td"===t.type)return{type:"table-cell",children:t.children.flatMap(t=>e(t,n))};if("th"===t.type)return{type:"table-cell",header:!0,children:t.children.flatMap(t=>e(t,n))};if("tag"===t.type){if("table"===t.tag)return e(t.children[0],n);if("layout"===t.tag)return{type:"layout",layout:t.attributes.layout,children:t.children.flatMap(t=>e(t,n))};if("layout-area"===t.tag)return{type:"layout-area",children:t.children.flatMap(t=>e(t,n))};if("component-block"===t.tag)return{type:"component-block",component:t.attributes.component,props:t.attributes.props,children:0===t.children.length?[{type:"component-inline-prop",children:[{text:""}]}]:t.children.flatMap(t=>e(t,n))};if("component-block-prop"===t.tag&&Array.isArray(t.attributes.propPath)&&t.attributes.propPath.every(e=>"string"==typeof e||"number"==typeof e))return{type:"component-block-prop",children:t.children.flatMap(t=>e(t,n)),propPath:t.attributes.propPath};if(t.tag){let r=n[t.tag];if(r){let a=as({kind:"object",fields:r.schema});if(a){let r=JSON.parse(JSON.stringify(t.attributes)),i=[];return function t(n,r,a,i,o,l){if("child"===i.kind){let t=n.flatMap(t=>e(t,l));
8r.push({type:`component-${i.options.kind}-prop`,propPath:[...o,...i.relativePath],children:t})}if("array"===i.kind){let e=[];for(let[a,s]of n.entries()){if("paragraph"===s.type&&(s=s.children[0].children[0]),"tag"!==s.type)throw Error(`expected tag ${i.asChildTag}, found type: ${s.type}`);if(s.tag!==i.asChildTag)throw Error(`expected tag ${i.asChildTag}, found tag: ${s.tag}`);let n=JSON.parse(JSON.stringify(s.attributes));i.child&&t(s.children,r,n,i.child,[...o,...i.relativePath,a],l),e.push(n)}let s=i.relativePath[i.relativePath.length-1];nu(a,i.relativePath.slice(0,-1))[s]=e}}(t.children,i,r,a,[],n),{type:"component-block",component:t.tag,props:r,children:i}}return{type:"component-block",component:t.tag,props:t.attributes,children:0===t.children.length?[{type:"component-inline-prop",children:[{text:""}]}]:t.children.flatMap(t=>e(t,n))}}}throw Error(`Unknown tag: ${t.tag}`)}return ad(t)})(e,t));return 0===n.length?[{type:"paragraph",children:[{text:""}]}]:("paragraph"!==n[n.length-1].type&&n.push({type:"paragraph",children:[{text:""}]}),n)}function ag(e,t){return"string"==typeof e?`${e.replace(/\/*$/,"")}/${void 0===t?"":t+"/"}`:""}function af(e,t,n,r,a,i,o){return e.map(e=>{var l,s,c,d,u,p,h;
8if("component-block"===e.type){let i=t[e.component];if(!i)return e;let h=(0,V.o)(i.schema);return{...e,props:(l=h,s=e.props,c=n,d=r,u=a,p=o,np(l,s,{form:(e,t)=>{if("asset"===e.formKind){var n;if("read"===u)return e.reader.parse(t);let r=e.filename(t,{slug:p,suggestedFilenamePrefix:void 0});return e.parse(t,{asset:r?e.directory?null==(n=d.get(e.directory))?void 0:n.get(r):c.get(r):void 0,slug:p})}if("content"===e.formKind||"assets"===e.formKind)throw Error("Not implemented");return"read"===u?e.reader.parse(t):e.parse(t,void 0)}}))}}if("image"===e.type&&"string"==typeof e.src&&"edit"===a){let t=am(i,o),a=e.src.slice(t.length),l=null==(h="object"==typeof i.images&&"string"==typeof i.images.directory?r.get((0,V.a_)(i.images.directory)):n)?void 0:h.get(a);return l?{type:"image",src:{filename:a,content:l},alt:e.alt,title:e.title,children:[{text:""}]}:{type:"paragraph",children:[{text:`Missing image ${a}`}]}}if("string"==typeof e.type){let l=af(e.children,t,n,r,a,i,o);return{...e,children:l}}return e})}function am(e,t){return ag("object"==typeof e.images?e.images.publicPath:void 0,t)}function ab(e,t,n,r,a){let i=[];return{value:np(t,e,{form(o,l,s){if(1===s.length&&n===s[0]){if("slug"!==o.formKind)throw Error("slugField is a not a slug field");return o.serializeWithSlug(l).value}if("asset"===o.formKind){let{asset:n,value:c}=o.serialize(l,{suggestedFilenamePrefix:a?ay(s,t,e):void 0,slug:r});return n&&i.push({path:n.filename,contents:n.content,parent:o.directory}),c}if("content"===o.formKind||"assets"===o.formKind){let n,a,c;if("content"===o.formKind){let d=o.serialize(l,{slug:r});d.content&&i.push({path:ay(s,t,e)+o.contentExtension,contents:d.content,parent:void 0}),{value:c,other:n,external:a}=d}else{let e=o.serialize(l,{slug:r});({value:c,other:n,external:a}=e)}for(let[r,a]of n)i.push({path:ay(s,t,e)+"/"+r,contents:a,parent:void 0});let d=new Set(o.directories);for(let[e,t]of a){if(!d.has(e))throw Error(`Invalid directory ${e} in content field serialization`);for(let[n,r]of t)i.push({path:n,contents:r,parent:e})}return c}return o.serialize(l).value},object:(e,t)=>Object.fromEntries(Object.entries(t).filter(([e,t])=>void 0!==t)),array:(e,t)=>t.map(e=>void 0===e?null:e),conditional:(e,t)=>void 0===t.value?{discriminant:t.discriminant}:t,child(){}}),extraFiles:i}}function ay(e,t,n){let r=[];for(let a of e){if("array"===t.kind){if(n=n[a],t.slugField&&"object"===t.element.kind){let e=(0,V.P)({schema:t.element.fields,slugField:t.slugField},n);r.push(e)}else r.push(a);t=t.element;continue}if(r.push(a),"object"===t.kind){n=n[a],t=t.fields[a];continue}if("conditional"===t.kind){"discriminant"===a?t=t.discriminant:"value"===a&&(t=t.values[n.discriminant]),n=n[a];continue}throw Error(`unexpected ${t.kind}`)}return r.join("/")}function ak(e){return new i.Jf.Node("inline",{},e.flatMap(function e(t){var n,r;if("link"===t.type)return new i.Jf.Node("link",{href:t.href},t.children.flatMap(e));if(void 0!==t.type)throw Error(`unexpected inline node type: ${t.type}`);let a=Object.keys(t).filter(e=>"text"!==e&&"code"!==e).sort(),o=t.text.split(/\n/);if(o.length>1)return o.flatMap((n,r)=>{if(0===r)return e({...t,text:n});let a=e({...t,text:n});return[new i.Jf.Node("hardbreak"),...Array.isArray(a)?a:[a]]});let l=null==(n=/^\s+/.exec(t.text))?void 0:n[0],s=null==(r=/\s+$/.exec(t.text))?void 0:r[0],c=t.code?[new i.Jf.Node("code",{content:t.text.trim()},[])]:[new i.Jf.Node("text",{content:t.text.trim()})];for(let e of a){let t=ax[e];t&&(c=[new i.Jf.Node(t.type,{},c,t.tag)])}return/^\s+$/.test(t.text)?c.unshift(new i.Jf.Node("text",{content:l},[])):(null!=l&&l.length&&c.unshift(new i.Jf.Node("text",{content:l},[])),null!=s&&s.length&&c.push(new i.Jf.Node("text",{content:s},[]))),c}))}let ax={bold:{type:"strong"},code:{type:"code"},italic:{type:"em"},underline:{type:"tag",tag:"u"},keyboard:{type:"tag",tag:"kbd"},strikethrough:{type:"s"},subscript:{type:"tag",tag:"sub"},superscript:{type:"tag",tag:"sup"}},av=0,aw=new TextEncoder;function aS(e){let t=tZ(),[n,r]=(0,s.useState)(()=>({key:av++,value:e.value}));n.value!==e.value&&r({key:av++,value:e.value});let a={label:e.label,labelElementType:"span",description:e.description};
8return"main"===t&&(a={"aria-label":e.label}),(0,H.jsx)(l.D0,{height:"main"===t?"100%":void 0,...a,children:t=>(0,s.createElement)(r2,{...t,key:n.key,componentBlocks:e.componentBlocks,documentFeatures:e.documentFeatures,onChange:t=>{r(e=>({key:e.key,value:t})),e.onChange(t)},value:n.value})})}let aE=new TextDecoder,aj=(0,V.b0)({label:"Alt text",description:"This text will be used by screen readers and search engines."}),aA=(0,V.a$)({Input:()=>null,defaultValue:()=>"",parse(e){if(void 0===e)return"";if("string"!=typeof e)throw new V.ar("Must be string");return e},validate:e=>e,serialize:e=>({value:e}),label:"Title"});function aN({label:e,componentBlocks:t={},description:n,...r}){let a=function(e){var t,n,r,a,i,o,l,s,c,d,u,p,h,g,f,m,b,y;let k=!0===e.formatting?{blockTypes:!0,headingLevels:!0,inlineMarks:!0,listTypes:!0,softBreaks:!0}:null!=(t=e.formatting)?t:{},x=!0===e.images?{}:e.images;return{formatting:{alignment:!0===k.alignment?{center:!0,end:!0}:{center:!!(null!=(n=k.alignment)&&n.center),end:!!(null!=(r=k.alignment)&&r.end)},blockTypes:(null==k?void 0:k.blockTypes)===!0?{blockquote:!0,code:{schema:(0,V.o)({})}}:{blockquote:!!(null!=(a=k.blockTypes)&&a.blockquote),code:(e=>{if((null==(e=k.blockTypes)?void 0:e.code)===void 0)return!1;if(!0===k.blockTypes.code||!k.blockTypes.code.schema)return{schema:(0,V.o)({})};for(let e of["type","children","language"])if(e in k.blockTypes.code.schema)throw Error(`"${e}" cannot be a key in the schema for code blocks`);return{schema:(0,V.o)(k.blockTypes.code.schema)}})()},headings:(e=>{let t=null==k?void 0:k.headingLevels,n="object"==typeof t&&"levels"in t?t:{levels:t,schema:void 0};if(n.schema){for(let e of["type","children","level","textAlign"])if(e in n.schema)throw Error(`"${e}" cannot be a key in the schema for headings`)}return{levels:[...new Set(!0===n.levels?[1,2,3,4,5,6]:n.levels)],schema:(0,V.o)(null!=(e=n.schema)?e:{})}})(),inlineMarks:!0===k.inlineMarks?{bold:!0,code:!0,italic:!0,keyboard:!1,strikethrough:!0,subscript:!1,superscript:!1,underline:!1}:{bold:!!(null!=(i=k.inlineMarks)&&i.bold),code:!!(null!=(o=k.inlineMarks)&&o.code),italic:!!(null!=(l=k.inlineMarks)&&l.italic),strikethrough:!!(null!=(s=k.inlineMarks)&&s.strikethrough),underline:!!(null!=(c=k.inlineMarks)&&c.underline),keyboard:!!(null!=(d=k.inlineMarks)&&d.keyboard),subscript:!!(null!=(u=k.inlineMarks)&&u.subscript),superscript:!!(null!=(p=k.inlineMarks)&&p.superscript)},listTypes:!0===k.listTypes?{ordered:!0,unordered:!0}:{ordered:!!(null!=(h=k.listTypes)&&h.ordered),unordered:!!(null!=(g=k.listTypes)&&g.unordered)},softBreaks:!!k.softBreaks},links:!!e.links,layouts:[...new Set((e.layouts||[]).map(e=>JSON.stringify(e)))].map(e=>JSON.parse(e)),dividers:!!e.dividers,images:void 0!==x&&{...x,schema:{alt:null!=(f=null==(m=x.schema)?void 0:m.alt)?f:aj,title:null!=(b=null==(y=x.schema)?void 0:y.title)?b:aA}},tables:!!e.tables}}(r);return{kind:"form",formKind:"content",defaultValue:()=>[{type:"paragraph",children:[{text:""}]}],Input:r=>(0,H.jsx)(aS,{componentBlocks:t,description:n,label:e,documentFeatures:a,...r}),parse(e,n){let r=aE.decode(n.content),o=ah((0,i.qg)(r),t);return af(function(e,t,n){let r=rB((0,Q.ie)(),e,t);return r.children=n,Q.KE.normalize(r,{force:!0}),r.children}(a,t,o),t,n.other,n.external,"edit",a,n.slug)},contentExtension:".mdoc",validate:e=>e,directories:[...(0,V.b1)((0,V.o)(Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(0,V.o)(t.schema)])))),..."object"==typeof a.images&&"string"==typeof a.images.directory?[(0,V.a_)(a.images.directory)]:[]],serialize:(e,n)=>(function(e,t,n,r){let{extraFiles:a,node:o}=function(e,t){let n=[],r={...t,extraFiles:n};return{node:new i.Jf.Node("document",{},e.flatMap(e=>(function e(t,n){if("paragraph"===t.type){let e=new i.Jf.Node("paragraph",t.textAlign?{textAlign:t.textAlign}:{},[ak(t.children)]);return t.textAlign&&e.annotations.push({name:"textAlign",value:t.textAlign,type:"attribute"}),e}if("image"===t.type)return n.extraFiles.push({contents:t.src.content,path:t.src.filename,parent:"object"==typeof n.documentFeatures.images&&"string"==typeof n.documentFeatures.images.directory?(0,V.a_)(n.documentFeatures.images.directory):void 0}),new i.Jf.Node("paragraph",{},[new i.Jf.Node("inline",{},[new i.Jf.Node("image",{src:encodeURI(`${am(n.documentFeatures,n.slug)}${t.src.filename}`),alt:t.alt,title:t.title})])]);if("code"===t.type){let e={},{children:r,language:a,type:o,...l}
8=t,s="object"==typeof n.documentFeatures.formatting.blockTypes.code?n.documentFeatures.formatting.blockTypes.code.schema:void 0;if(s&&Object.keys(s.fields).length>0){let t=ab(tm(s,l),s,void 0,n.slug,!1);Object.assign(e,t.value),n.extraFiles.push(...t.extraFiles)}let c=r[0].text+"\n",d=new i.Jf.Node("fence",{content:c,language:a,...e},[new i.Jf.Node("text",{content:c})]);for(let[t,n]of Object.entries(e))d.annotations.push({name:t,value:n,type:"attribute"});return d}let r=t=>e(t,n);if("blockquote"===t.type)return new i.Jf.Node("blockquote",{},t.children.map(r));if("divider"===t.type)return new i.Jf.Node("hr");if("table"===t.type){let e=t.children.find(e=>"table-head"===e.type);return new i.Jf.Node("tag",{},[new i.Jf.Node("table",{},[new i.Jf.Node("thead",{},e?e.children.map(r):[]),r(t.children.find(e=>"table-body"===e.type))])],"table")}if("table-body"===t.type)return new i.Jf.Node("tbody",{},t.children.map(r));if("table-row"===t.type)return new i.Jf.Node("tr",{},t.children.map(r));if("table-cell"===t.type)return new i.Jf.Node(t.header?"th":"td",{},t.children.map(r));if("heading"===t.type){let e={};t.textAlign&&(e.textAlign=t.textAlign);let{children:r,level:a,textAlign:o,type:l,...s}=t,c=n.documentFeatures.formatting.headings.schema;Object.keys(c.fields).length>0&&Object.assign(e,ab(tm(c,s),c,void 0,n.slug,!1).value);let d=new i.Jf.Node("heading",{level:t.level,...e},[ak(t.children)]);for(let[t,n]of Object.entries(e))d.annotations.push({name:t,value:n,type:"attribute"});return d}if("ordered-list"===t.type)return new i.Jf.Node("list",{ordered:!0},t.children.map(r));if("unordered-list"===t.type)return new i.Jf.Node("list",{ordered:!1},t.children.map(r));if("layout"===t.type)return new i.Jf.Node("tag",{layout:t.layout},t.children.map(r),"layout");if("layout-area"===t.type)return new i.Jf.Node("tag",{},t.children.flatMap(r),"layout-area");if("component-block"===t.type){let e=1===t.children.length&&"component-inline-prop"===t.children[0].type&&void 0===t.children[0].propPath,a=n.componentBlocks[t.component],o=[];for(let e of t.children)("component-block-prop"===e.type||"component-inline-prop"===e.type)&&void 0!==e.propPath&&o.push({type:e.type,propPath:e.propPath,children:"component-block-prop"===e.type?e.children.flatMap(r):[ak(e.children)]});let l=t.props;if(a){let e=ab(t.props,{kind:"object",fields:a.schema},void 0,n.slug,!1);l=e.value,n.extraFiles.push(...e.extraFiles);let r=as({kind:"object",fields:a.schema});if(r){let e=[];return!function e(t,n,r,a){if("child"===a.kind){let e=t.find(e=>(0,V.aI)(e.propPath,a.relativePath));e&&n.push(...e.children);return}if("array"===a.kind){let o=a.relativePath[a.relativePath.length-1],l=nu(r,a.relativePath.slice(0,-1)),s=l[o];delete l[o];let c=new Map;for(let e of t){let t=e.propPath.slice(a.relativePath.length+1),n=e.propPath[a.relativePath.length];void 0===c.get(n)&&c.set(n,[]),c.get(n).push({children:e.children,propPath:t})}n.push(...s.map((t,n)=>{var r;let o=null!=(r=c.get(n))?r:[],l=[];return e(o,l,t,a.child),new i.Jf.Node("tag",t,l,a.asChildTag)}))}}(o,e,l,r),new i.Jf.Node("tag",l,e,t.component)}}let s=e?[]:o.map(e=>new i.Jf.Node("tag",{propPath:e.propPath},e.children,e.type));return new i.Jf.Node("tag",l,s,t.component)}if("component-block-prop"===t.type||"component-inline-prop"===t.type)return new i.Jf.Node("tag",{propPath:t.propPath},"component-inline-prop"===t.type?[ak(t.children)]:t.children.flatMap(r),t.type);if("list-item"===t.type){let r=t.children[0];if("list-item-content"!==r.type)throw Error("list item content must contain a list-item-content");let a=[ak(r.children)],o=t.children[1];return o&&a.push(e(o,n)),new i.Jf.Node("item",{},a)}if("list-item-content"===t.type)throw Error("list-item-content in unexpected position");throw Error(`unexpected node type: ${t.type}`)})(e,r))),extraFiles:n}}(e,{componentBlocks:n,documentFeatures:r,slug:t.slug}),l=new Map,s=new Map;for(let e of a){if(void 0===e.parent){l.set(e.path,e.contents);continue}s.has(e.parent)||s.set(e.parent,new Map),s.get(e.parent).set(e.path,e.contents)}return{content:aw.encode((0,i.GP)((0,i.qg)((0,i.GP)(o)))),other:l,external:s,value:void 0}})(e,n,t,a),reader:{parse(e,n){let r=aE.decode(n.content);return af(ah((0,i.qg)(r),t),t,new Map,new Map,"read",a,void 0)}}}}let aB={blockParent:"ProseMirror-blockParent",hideselection:"ProseMirror-hideselection",nodeInSelection:"ProseMirror-nodeInSelection",nodeSelection:"ProseMirror-selectednode",placeholder:"ProseMirror-placeholder"};function aR(e){let t=new WeakMap;return n=>{if(t.has(n))return t.get(n);let r=e(n);return t.set(n,r),r}}let aC=u.Bk.color.background.canvas,aI=u.Bk.color.alias.borderSelected,aT=u.Bk.size.border.medium,aO=u.Bk.size.space.regular;(0,u.HO)({".prosemirror-dropcursor-block":{"&::before, &::after":{backgroundColor:aC,border:`${aT} solid ${aI}`,borderRadius:"50%",content:'" "',height:aO,position:"absolute",width:aO,top:`calc(${aO} / -2 - ${aT} / 2)`},"&::before":{left:`calc(${aO} * -1)`},"&::after":{right:`calc(${aO} * -1)`}}});let aP=(0,u.AH)`
9  /* Provide our own selection indicator */
10  .${aB.nodeSelection} {
11    position: relative;
12  }
13  .${aB.nodeSelection}::after {
14    background-color: ${u.Bk.color.alias.backgroundSelected};
15    border-radius: ${u.Bk.size.radius.small};
16    content: '';
17    inset: calc(${u.Bk.size.alias.focusRingGap} * -1);
18    pointer-events: none;
19    position: absolute;
20  }
21  .${aB.nodeSelection}:is(${"area, base, br, col, embed, hr, img, input, link, meta, param, source, track, wbr"}) {
22    outline: ${u.Bk.size.alias.focusRing} solid
23      ${u.Bk.color.border.accent};
24    outline-offset: ${u.Bk.size.alias.focusRingGap};
25  }
26  .${aB.hideselection} *::selection {
27    background: transparent;
28  }
29  .${aB.hideselection} *::-moz-selection {
30    background: transparent;
31  }
32  .${aB.hideselection} {
33    caret-color: transparent;
34  }
35
36  /* Style the placeholder element */
37  .${aB.placeholder} {
38    color: ${u.Bk.color.foreground.neutralTertiary};
39    pointer-events: none;
40  }
41
42  /* Protect against generic img rules */
43  img.ProseMirror-separator {
44    display: inline !important;
45    border: none !important;
46    margin: 0 !important;
47  }
48
49  /* Provide an indicator for focusing places that don't allow regular selection */
50  .ProseMirror-gapcursor {
51    display: none;
52    pointer-events: none;
53    position: absolute;
54  }
55  .ProseMirror-gapcursor:after {
56    content: '';
57    display: block;
58    position: absolute;
59    top: -2px;
60    width: 20px;
61    border-top: 1px solid black;
62    animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
63  }
64
65  @keyframes ProseMirror-cursor-blink {
66    to {
67      visibility: hidden;
68    }
69  }
70
71  .ProseMirror-focused .ProseMirror-gapcursor {
72    display: block;
73  }
74  .ProseMirror > .ProseMirror-yjs-cursor:first-child {
75    margin-top: 16px;
76  }
77  /* This gives the remote user caret. The colors are automatically overwritten*/
78  .ProseMirror-yjs-cursor {
79    position: relative;
80    margin-left: -1px;
81    margin-right: -1px;
82    border-left: 1px solid black;
83    border-right: 1px solid black;
84    border-color: orange;
85    word-break: normal;
86    pointer-events: none;
87  }
88  /* This renders the username above the caret */
89  .ProseMirror-yjs-cursor > div {
90    position: absolute;
91    top: -1.05em;
92    left: -1px;
93    font-size: 13px;
94    background-color: rgb(250, 129, 0);
95    font-family: ${u.Bk.typography.fontFamily.base};
96    font-style: normal;
97    font-weight: normal;
98    line-height: normal;
99    user-select: none;
100    color: white;
101    padding-left: 2px;
102    padding-right: 2px;
103    white-space: nowrap;
104  }
105`;function a_(e){let t=(0,s.useRef)(e),n=(0,s.useCallback)((...e)=>t.current(...e),[]);return(0,s.useEffect)(()=>{t.current=e}),n}function aF(e){return(t,n)=>(!(t.selection instanceof h.nh)||t.selection.node.type!==e)&&(n&&n(t.tr.replaceSelectionWith(e.createAndFill())),!0)}function aM(e){let t=e.contentMatch.defaultType,n=t.contentMatch.defaultType,r=ic(e.schema).nodes.table_header;return(a,i)=>{let o=r.createAndFill(),l=n.createAndFill(),s=t.create(void 0,[o,o,o]),c=t.create(void 0,[l,l,l]);return null==i||i(a.tr.replaceSelectionWith(e.create(void 0,[s,c,c]))),!0}}function aD(e,t=null){let n=e.contentMatch.defaultType;return function(r,a){let{$from:i,$to:o}=r.selection,l=i.blockRange(o),s=!1,c=l;if(!l)return!1;let d=function(e,t){for(let n=e.depth;n>0;n--){let r=e.$from.node(n);if(r.type.contentMatch.defaultType===t)return{node:r,pos:e.$from.before(n)}}}(l,n);if((null==d?void 0:d.node.type)==e)return aL(n)(r,a);if(d&&d.node.type!==e)return a&&a(r.tr.setNodeMarkup(d.pos,e,t).scrollIntoView()),!0;if(l.depth>=2&&i.node(l.depth-1).type.compatibleContent(e)&&0==l.startIndex){if(0==i.index(l.depth-1))return!1;let e=r.doc.resolve(l.start-2);c=new U.u$(e,e,l.depth),l.endIndex<l.parent.childCount&&(l=new U.u$(i,r.doc.resolve(o.end(l.depth)),l.depth)),s=!0}let u=(0,g.oM)(c,e,t,l);return!!u&&(a&&a((function(e,t,n,r,a){let i=U.FK.empty;for(let e=n.length-1;e>=0;e--)i=U.FK.from(n[e].type.create(n[e].attrs,i));e.step(new g.Wg(t.start-2*!!r,t.end,t.start,t.end,new U.Ji(i,0,0),n.length,!0));let o=0;for(let e=0;e<n.length;e++)n[e].type==a&&(o=e+1);let l=n.length-o,s=t.start+n.length-2*!!r,c=t.parent;for(let n=t.startIndex,r=t.endIndex,a=!0;n<r;n++,a=!1)!a&&(0,g.zy)(e.doc,s,l)&&(e.split(s,l),s+=2*l),s+=c.child(n).nodeSize;return e})(r.tr,l,u,s,e).scrollIntoView()),!0)}}function aL(e){return function(t,n){let{$from:r,$to:a}=t.selection,i=r.blockRange(a,t=>t.childCount>0&&t.firstChild.type==e);return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let a=e.tr,i=r.end,o=r.$to.end(r.depth);i<o&&(a.step(new g.Wg(i-1,o,i,o,new U.Ji(U.FK.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new U.u$(a.doc.resolve(r.$from.pos),a.doc.resolve(o),r.depth));let l=(0,g.jP)(r);if(null==l)return!1;a.lift(r,l);let s=a.mapping.map(i,-1)-1;return(0,g.n9)(a.doc,s)&&a.join(s),t(a.scrollIntoView()),!0}(t,n,e,i):function(e,t,n){let r=e.tr,a=n.parent;for(let e=n.end,t=n.endIndex-1,i=n.startIndex;t>i;t--)e-=a.child(t).nodeSize,r.delete(e-1,e+1);let i=r.doc.resolve(n.start),o=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,s=n.endIndex==a.childCount,c=i.node(-1),d=i.index(-1);if(!c.canReplace(d+ +!l,d+1,o.content.append(s?U.FK.empty:U.FK.from(a))))return!1;let u=i.pos,p=u+o.nodeSize;return r.step(new g.Wg(u-!!l,p+ +!!s,u+1,p-1,new U.Ji((l?U.FK.empty:U.FK.from(a.copy(U.FK.empty))).append(s?U.FK.empty:U.FK.from(a.copy(U.FK.empty))),+!l,+!s),+!l)),t(r.scrollIntoView()),!0}(t,n,i)))}}let a$="@@independentForGapCursor";class az extends h.LN{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return az.valid(n)?new az(n):h.LN.near(n)}content(){return U.Ji.empty}eq(e){return e instanceof az&&e.head==this.head}toJSON(){return{type:"ksgapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new az(e.resolve(t.pos))}getBookmark(){return new aU(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating||e.type.spec[a$])return!0;
105if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating||e.type.spec[a$])return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){n:for(;;){if(!n&&az.valid(e))return e;let r=e.pos,a=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){a=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let o=e.doc.resolve(r);if(az.valid(o))return o}for(;;){let i=t>0?a.firstChild:a.lastChild;if(!i){if(a.isAtom&&!a.isText&&!h.nh.isSelectable(a)){e=e.doc.resolve(r+a.nodeSize*t),n=!1;continue n}break}a=i,r+=t;let o=e.doc.resolve(r);if(az.valid(o))return o}return null}}}az.prototype.visible=!1,az.findFrom=az.findGapCursorFrom;try{h.LN.jsonID("ksgapcursor",az)}catch{}class aU{constructor(e){this.pos=e}map(e){return new aU(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return az.valid(t)?new az(t):h.LN.near(t)}}
105function aK(e){let t=(0,Z.o)(te),n=(0,s.useId)(),[r,a]=(0,s.useState)(!1),[i,o]=(0,s.useState)(e.value),l=(0,s.useMemo)(()=>tC(e.schema,o,()=>void 0),[e.schema])(i),{dismiss:d}=(0,K.Bj)();return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(J.UC,{children:(0,H.jsx)(c.so,{id:n,elementType:"form",onSubmit:t=>{t.target===t.currentTarget&&(t.preventDefault(),tS(e.schema,i,void 0)?(e.onSave(i),d()):a(!0))},direction:"column",gap:"xxlarge",children:(0,H.jsx)(ao,{...l,forceValidation:r})})}),(0,H.jsxs)(f.e2,{children:[(0,H.jsx)(f.$n,{onPress:d,children:t.format("cancel")}),(0,H.jsx)(f.$n,{form:n,prominence:"high",type:"submit",children:"Done"})]})]})}function aq(e,t,n){try{return tv({kind:"object",fields:e},t,[],[],(e,t)=>{if("asset"===e.formKind){var r;let a=e.filename(t,{slug:n.slug,suggestedFilenamePrefix:void 0});return e.parse(t,{asset:a?e.directory?null==(r=n.otherFiles.get(e.directory))?void 0:r.get(a):n.extraFiles.get(a):void 0,slug:n.slug})}if("assets"===e.formKind||"content"===e.formKind)throw Error("Not implemented");return e.parse(t,void 0)},!1)}catch(e){throw Error(tw(e))}}function aV(e,t){let n=ab(e,{kind:"object",fields:t},void 0,void 0,!1);return{value:n.value,extraFiles:n.extraFiles.map(e=>({...e,contents:e.contents}))}}function aH(e,t){let n=new Map,r=new Map;for(let t of e.extraFiles)t.parent?(r.has(t.parent)||r.set(t.parent,new Map),r.get(t.parent).set(t.path,t.contents)):n.set(t.path,t.contents);return aq(t,e.value,{slug:void 0,extraFiles:n,otherFiles:r})}function aG(e,t,n){let r=ab(aH(t,e),{kind:"object",fields:e},void 0,n.slug,!1);for(let e of r.extraFiles)e.parent?(n.otherFiles.has(e.parent)||n.otherFiles.set(e.parent,new Map),n.otherFiles.get(e.parent).set(e.path,e.contents)):n.extraFiles.set(e.path,e.contents);return r.value}let aW=function(e,t){let n,r=(0,o.c)(3);return r[0]!==e||r[1]!==t?(n=aH(e,t),r[0]=e,r[1]=t,r[2]=n):n=r[2],n};function aY(e){return JSON.stringify({value:e.value,extraFiles:e.extraFiles.map(e=>({path:e.path,parent:e.parent,contents:(0,eW.c)(e.contents)}))})}function aJ(e){if("string"==typeof e)return!1;let t=e.dataset.props;if(!t)return!1;try{let e=JSON.parse(t);return{props:{value:e.value,extraFiles:e.extraFiles.map(e=>({path:e.path,parent:e.parent,contents:(0,eW.a)(e.contents)}))}}}catch{return!1}}function aZ(e){let t,n,r,a,i,l,p,g,m,b,y,k,x,v=(0,o.c)(37),[w,S]=(0,s.useState)(!1),E=ip();v[0]!==e.component.schema?(n={kind:"object",fields:e.component.schema},v[0]=e.component.schema,v[1]=n):n=v[1],t=n;let j=aW(e.node.attrs.props,e.component.schema),A=`${aB.blockParent} ${(0,u.AH)({marginBlock:"1em",position:"relative",...e.hasNodeSelection?{"&::after":{backgroundColor:u.Bk.color.alias.backgroundSelected,borderRadius:u.Bk.size.radius.regular,content:"''",inset:0,pointerEvents:"none",position:"absolute"}}:{}})}${e.hasNodeSelection?` ${aB.hideselection}`:""}`,N=e.hasNodeSelection?"color.alias.borderSelected":"color.alias.borderDisabled",B=e.hasNodeSelection?"color.alias.backgroundSelected":"color.alias.backgroundIdle",R=e.hasNodeSelection?u.Bk.color.foreground.accent:u.Bk.color.foreground.neutralTertiary;return v[2]!==R?(r=(0,u.AH)({color:R,textTransform:"uppercase",fontWeight:u.Bk.typography.fontWeight.semibold,fontSize:"0.9rem"}
105),v[2]=R,v[3]=r):r=v[3],v[4]!==E||v[5]!==e?(a=()=>{E((t,n)=>(n&&n(t.tr.setSelection(h.nh.create(t.doc,e.getPos()))),!0))},v[4]=E,v[5]=e,v[6]=a):a=v[6],v[7]!==r||v[8]!==a||v[9]!==e.component.label?(i=(0,H.jsx)(c.az,{flex:1,paddingX:"regular",paddingY:"small",UNSAFE_className:r,onClick:a,children:e.component.label}),v[7]=r,v[8]=a,v[9]=e.component.label,v[10]=i):i=v[10],v[11]!==e.component.schema?(l=!!Object.keys(e.component.schema).length&&(0,H.jsx)(f.$n,{prominence:"low",onPress:()=>{S(!0)},UNSAFE_className:(0,u.AH)({borderBottomRightRadius:0}),children:"Edit"}),v[11]=e.component.schema,v[12]=l):l=v[12],v[13]!==B||v[14]!==i||v[15]!==e.toolbar||v[16]!==l?(p=(0,H.jsxs)(c.so,{backgroundColor:B,contentEditable:!1,alignItems:"center","data-ignore-content":"",children:[i,e.toolbar,l]}),v[13]=B,v[14]=i,v[15]=e.toolbar,v[16]=l,v[17]=p):p=v[17],v[18]!==e.children?(g=(0,H.jsx)(c.az,{padding:"regular",children:e.children}),v[18]=e.children,v[19]=g):g=v[19],v[20]!==A||v[21]!==N||v[22]!==p||v[23]!==g?(m=(0,H.jsxs)(c.az,{UNSAFE_className:A,border:N,borderRadius:"regular",children:[p,g]}),v[20]=A,v[21]=N,v[22]=p,v[23]=g,v[24]=m):m=v[24],v[25]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{S(!1)},v[25]=b):b=v[25],v[26]!==w||v[27]!==e||v[28]!==E||v[29]!==t||v[30]!==j?(y=w&&(0,H.jsxs)(K.lG,{children:[(0,H.jsxs)(d.DZ,{children:["Edit ",e.component.label]}),(0,H.jsx)(aK,{schema:t,value:j,onSave:n=>{E((r,a)=>(a&&a(r.tr.setNodeAttribute(e.getPos(),"props",aV(n,t.fields))),!0))}})]}),v[26]=w,v[27]=e,v[28]=E,v[29]=t,v[30]=j,v[31]=y):y=v[31],v[32]!==y?(k=(0,H.jsx)(K.Uz,{onDismiss:b,children:y}),v[32]=y,v[33]=k):k=v[33],v[34]!==m||v[35]!==k?(x=(0,H.jsxs)(H.Fragment,{children:[m,k]}),v[34]=m,v[35]=k,v[36]=x):x=v[36],x}let aX=["p",{class:(0,u.AH)({marginBlock:"1em"})},0],aQ=["blockquote",{class:(0,u.xW)(aB.blockParent,(0,u.AH)({[`&.${aB.nodeInSelection}, &.${aB.nodeSelection}`]:{borderColor:u.Bk.color.alias.borderSelected}}))},0],a0=["hr",{contenteditable:"false",class:(0,u.AH)({cursor:"pointer",[`&.${aB.nodeInSelection}, &.${aB.nodeSelection}`]:{backgroundColor:u.Bk.color.alias.borderSelected}})}],a1=["br"],a2=["ol",{},0],a3=["ul",{},0],a4=["li",{},0],a6="inline*",a9=[{description:"Use this for a top level heading",icon:P.J},{description:"Use this for key sections",icon:_.G},{description:"Use this for sub-sections",icon:F.l},{description:"Use this for deep headings",icon:M.K},{description:"Use this for grouping list items",icon:D.F},{description:"Use this for low-level headings",icon:L.G}],a5={colspan:{default:1},rowspan:{default:1}},a7=(0,u.AH)({borderBottom:`1px solid ${u.Bk.color.alias.borderIdle}`,borderInlineEnd:`1px solid ${u.Bk.color.alias.borderIdle}`,boxSizing:"border-box",margin:0,padding:u.Bk.size.space.regular,position:"relative",textAlign:"start",verticalAlign:"top","&.selectedCell":{backgroundColor:u.Bk.color.alias.backgroundSelected,"& *::selection":{backgroundColor:"transparent"}},"&.selectedCell::after":{border:`1px solid ${u.Bk.color.alias.borderSelected}`,position:"absolute",top:-1,left:-1,content:'""',height:"100%",width:"100%"}}),a8=(0,u.AH)(a7,{backgroundColor:u.Bk.color.scale.slate3,fontWeight:u.Bk.typography.fontWeight.semibold}),ie={doc:{content:"block+"},paragraph:{content:a6,group:"block",parseDOM:[{tag:"p"},{tag:"[data-ignore-content]",ignore:!0}],toDOM:()=>aX},text:{group:"inline"},blockquote:{content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:()=>aQ,insertMenu:{label:"Blockquote",description:"Insert a quote or citation",icon:A.G,command:p.Im}},divider:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>a0,insertMenu:{label:"Divider",description:"A horizontal line to separate content",icon:z.$,command:aF}},code_block:{content:"text*",group:"block",defining:!0,[a$]:!0,attrs:{language:{default:""}},insertMenu:{label:"Code block",description:"Display code with syntax highlighting",icon:O.b,command:p.y_},marks:"",code:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs(e){var t;return"string"==typeof e?{}:{language:null!=(t=e.getAttribute("data-language"))?t:""}}}],toDOM:e=>["pre",{spellcheck:"false","data-language":e.attrs.language},["code",{},0]]},list_item:{content:"block+",parseDOM:[{tag:"li"}],toDOM:()=>a4,defining:!0},unordered_list:{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>a3,insertMenu:{label:"Bullet list",description:"Insert an unordered list",icon:w.G,command:aD}},ordered_list:{content:"list_item+",group:"block",attrs:{start:{default:1}},parseDOM:[{tag:"ol",getAttrs:e=>"string"!=typeof e&&(e instanceof HTMLOListElement&&!(e.start<0)?{start:e.start}:{start:1})}],toDOM:e=>1===e.attrs.start?a2:["ol",{start:e.attrs.start},0],insertMenu:{label:"Ordered list",description:"Insert an ordered list",icon:S.b,command:aD}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>a1},table:{content:"table_row+",insertMenu:{label:"Table",description:"Insert a table",icon:R.k,command:aM},tableRole:"table",isolating:!0,group:"block",parseDOM:[{tag:"table"}],toDOM:()=>["table",{class:(0,u.AH)({width:"100%",tableLayout:"fixed",position:"relative",borderSpacing:0,borderInlineStart:`1px solid ${u.Bk.color.alias.borderIdle}`,borderTop:`1px solid ${u.Bk.color.alias.borderIdle}`,"&:has(.selectedCell) *::selection":{backgroundColor:"transparent"},".ProseMirror-widget + *":{marginTop:0}})},["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",allowGapCursor:!1,parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:"block+",tableRole:"cell",isolating:!0,attrs:a5,parseDOM:[{tag:"td"}],toDOM:()=>["td",{class:a7},0]},table_header:{content:"block+",tableRole:"header_cell",attrs:a5,isolating:!0,parseDOM:[{tag:"th"}],toDOM:()=>["th",{class:a8},0]},image:{content:"",group:"inline",inline:!0,attrs:{src:{},filename:{},alt:{default:""},title:{default:""}},insertMenu:{label:"Image",description:"Insert an image",icon:$.F,command:e=>(t,n,r)=>(n&&r&&(async()=>{let t=await nD("image/*"),n=ic(e.schema);t&&n.config.image&&r.dispatch(r.state.tr.replaceSelectionWith(e.createChecked({src:new Uint8Array(await t.arrayBuffer()),filename:n.config.image.transformFilename(t.name)})))})(),!0)},nodeView(e){let t=new Blob([e.attrs.src],{type:e.attrs.filename.endsWith(".svg")?"image/svg+xml":void 0}),n=document.createElement("img");return n.src=URL.createObjectURL(t),n.alt=e.attrs.alt,n.title=e.attrs.title,n.dataset.f
105ilename=e.attrs.filename,n.classList.add((0,u.AH)({boxSizing:"border-box",borderRadius:u.Bk.size.radius.regular,display:"inline-block",maxHeight:u.Bk.size.scale[3600],maxWidth:"100%",transition:(0,u.kY)("box-shadow"),"&::selection":{backgroundColor:"transparent"}})),{dom:n,destroy(){URL.revokeObjectURL(n.src)}}},toDOM:e=>["img",{src:`data:${e.attrs.filename.endsWith(".svg")?"image/svg+xml":"application/octet-stream"};base64,${(0,eW.c)(e.attrs.src)}`,alt:e.attrs.alt,title:e.attrs.title,"data-filename":e.attrs.filename}],parseDOM:[{tag:"img[src][data-filename]",getAttrs(e){var t,n;if("string"==typeof e)return!1;let r=e.getAttribute("src"),a=e.getAttribute("data-filename");return!!(null!=r&&r.startsWith("data:"))&&!!a&&{src:(0,eW.a)(r.replace(/^data:[a-z/-]+;base64,/,"")),filename:a,alt:null!=(t=e.getAttribute("alt"))?t:"",title:null!=(n=e.getAttribute("title"))?n:""}}}]}},it=["em",0],ir=["strong",0],ia=["code",0],ii=["s",0],io={link:{attrs:{href:{},title:{default:""}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){var t;if("string"==typeof e)return!1;let n=e.getAttribute("href");return!!n&&{href:n,title:null!=(t=e.getAttribute("title"))?t:""}}}],toDOM:e=>["a",{href:e.attrs.href,title:""===e.attrs.title?void 0:e.attrs.title},0]},italic:{shortcuts:["Mod-i","Mod-I"],parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>"italic"==e.type.name}],toDOM:()=>it},bold:{shortcuts:["Mod-b","Mod-B"],parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"string"!=typeof e&&"normal"!=e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>"strong"==e.type.name},{style:"font-weight",getAttrs:e=>"string"==typeof e&&/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>ir},strikethrough:{shortcuts:["Mod-Shift-s","Mod-Shift-S"],parseDOM:[{tag:"s"}],toDOM:()=>ii}
105,code:{shortcuts:["Mod-`","Mod-Shift-M","Mod-E","Mod-e"],parseDOM:[{tag:"code"}],toDOM:()=>ia}};function il(e,t,n){let r={doc:ie.doc,paragraph:ie.paragraph,text:ie.text,hard_break:ie.hard_break,...function(e){let t=new Map(Object.keys(e).map((e,t)=>[e,`component${t}`]));return Object.fromEntries(Object.entries(e).flatMap(([n,r])=>{let a,i={kind:"object",fields:r.schema};if("block"===r.kind)a={group:`${r.forSpecificLocations?"":"block "}${t.get(n)}`,defining:!0,attrs:{props:{default:aV(tf(i),i.fields)}},reactNodeView:{component:function(e){let t=ip(),n=aW(e.node.attrs.props,r.schema);return"NodeView"in r&&r.NodeView?(0,H.jsx)(r.NodeView,{isSelected:e.hasNodeSelection||e.isNodeCompletelyWithinSelection,onRemove:()=>{t((t,n)=>{if(n){let r=e.getPos();n(t.tr.delete(r,r+e.node.nodeSize))}return!0})},onChange:n=>{t((t,r)=>(r&&r(t.tr.setNodeAttribute(e.getPos(),"props",aV(n,i.fields))),!0))},value:n}):(0,H.jsx)(aZ,{node:e.node,hasNodeSelection:e.hasNodeSelection||e.isNodeCompletelyWithinSelection,component:r,getPos:e.getPos,children:"ContentView"in r&&r.ContentView&&(0,H.jsx)(r.ContentView,{value:n})})},rendersOwnContent:!1},parseDOM:[{tag:`div[data-component="${n}"]`,getAttrs:e=>"string"!=typeof e&&aJ(e)}],toDOM:e=>["div",{"data-component":n,"data-props":aY(e.attrs.props)}],insertMenu:r.forSpecificLocations?void 0:{label:r.label,command:aF,forToolbar:!0,description:r.description,icon:r.icon}};else if("wrapper"===r.kind)a={group:`${r.forSpecificLocations?"":"block "}${t.get(n)}`,content:"block+",defining:!0,attrs:{props:{default:aV(tf(i),i.fields)}},reactNodeView:{component:function(e){let t=ip(),n=aW(e.node.attrs.props,r.schema);return"NodeView"in r&&r.NodeView?(0,H.jsx)(r.NodeView,{isSelected:e.hasNodeSelection||e.isNodeCompletelyWithinSelection,onRemove:()=>{t((t,n)=>{if(n){let r=e.getPos();n(t.tr.delete(r,r+e.node.nodeSize))}return!0})},onChange:n=>{t((t,r)=>(r&&r(t.tr.setNodeAttribute(e.getPos(),"props",aV(n,i.fields))),!0))},value:n,children:e.children}):(0,H.jsx)(aZ,{node:e.node,hasNodeSelection:e.hasNodeSelection||e.isNodeCompletelyWithinSelection,component:r,getPos:e.getPos,children:"ContentView"in r&&r.ContentView?(0,H.jsx)(r.ContentView,{value:n,children:e.children}):e.children})},rendersOwnContent:!1},toDOM:e=>["div",{"data-component":n,"data-props":aY(e.attrs.props)},0],parseDOM:[{tag:`div[data-component="${n}"]`,getAttrs:aJ}],insertMenu:r.forSpecificLocations?void 0:{label:r.label,command:aF,forToolbar:!0,description:r.description,icon:r.icon}};else if("inline"===r.kind)a={group:"inline",inline:!0,attrs:{props:{default:aV(tf(i),i.fields)}},toDOM:e=>["span",{"data-component":n,"data-props":aY(e.attrs.props)}],parseDOM:[{tag:`span[data-component="${n}"]`,getAttrs:aJ}],reactNodeView:{component:function(e){let t=aW(e.node.attrs.props,r.schema),a=ip();return"NodeView"in r&&r.NodeView?(0,H.jsx)("span",{contentEditable:!1,children:(0,H.jsx)(r.NodeView,{value:t,onChange:t=>{a((n,r)=>(r&&r(n.tr.setNodeAttribute(e.getPos(),"props",aV(t,i.fields))),!0))},isSelected:e.hasNodeSelection||e.isNodeCompletelyWithinSelection,onRemove:()=>{a((t,n)=>{if(n){let r=e.getPos();n(t.tr.delete(r,r+e.node.nodeSize))}return!0})}})}):"ContentView"in r&&r.ContentView?(0,H.jsx)(c.az,{elementType:"span",contentEditable:!1,border:e.hasNodeSelection?"color.alias.borderSelected":"color.alias.borderIdle",borderRadius:"regular",children:(0,H.jsx)(r.ContentView,{value:t})}):(0,H.jsx)(c.az,{elementType:"span",contentEditable:!1,border:e.hasNodeSelection?"color.alias.borderSelected":"color.alias.borderIdle","data-component":n,borderRadius:"regular",UNSAFE_className:(0,u.AH)({"::after":{content:"attr(data-component)"}})})},rendersOwnContent:!1},insertMenu:{label:r.label,command:aF,forToolbar:!0,description:r.description,icon:r.icon}};else if("repeating"===r.kind){let o=r.children.map(t=>({key:t,label:e[t].label}));a={group:`${r.forSpecificLocations?"":"block "}${t.get(n)}`,content:`(${r.children.map(e=>t.get(e)).join(" | ")}){${r.validation.children.min},${r.validation.children.max===1/0?"":r.validation.children.max}}`,defining:!0,attrs:{props:{default:aV(tf(i),i.fields)}},reactNodeView:{component:function(e){let t=ip(),n=aW(e.node.attrs.props,r.schema);return"NodeView"in r&&r.NodeView?(0,H.jsx)(r.NodeView,{isSelected:e.hasNodeSelection||e.isNodeCompletelyWithinSelection,onRemove:()=>{t((t,n)=>{if(n){let r=e.getPos();n(t.tr.delete(r,r+e.node.nodeSize))}return!0})},onChange:n=>{t((t,r)=>(r&&r(t.tr.setNodeAttribute(e.getPos(),"props",aV(n,i.fields))),!0))},value:n,children:e.children}):(0,H.jsx)(aZ,{node:e.node,hasNodeSelection:e.hasNodeSelection||e.isNodeCompletelyWithinSelection,component:r,getPos:e.getPos,toolbar:e.node.contentMatchAt(e.node.childCount).defaultType&&(1===r.children.length?(0,H.jsx)(f.$n,{onPress:()=>{t((t,n)=>(n&&n(t.tr.insert(e.getPos()+e.node.nodeSize-1,t.schema.nodes[r.children[0]].createAndFill())),!0))},children:"Insert"}):(0,H.jsxs)(C.cQ,{children:[(0,H.jsx)(f.$n,{children:"Insert"}),(0,H.jsx)(C.W1,{onAction:n=>{t((t,r)=>(r&&r(t.tr.insert(e.getPos()+e.node.nodeSize-1,t.schema.nodes[n].createAndFill())),!0))},items:o,children:e=>(0,H.jsx)(C.q7,{children:e.label},e.key)})]})),children:"ContentView"in r&&r.ContentView?(0,H.jsx)(r.ContentView,{value:n,children:e.children}):e.children})},rendersOwnContent:!1},toDOM:e=>["div",{"data-component":n,"data-props":aY(e.attrs.props)},0],parseDOM:[{tag:`div[data-component="${n}"]`,getAttrs:aJ}],insertMenu:r.forSpecificLocations?void 0:{label:r.label,command:aF,forToolbar:!0,description:r.description,icon:r.icon}}}return a?[[n,a]]:[]}))}(t)};e.blockquote&&(r.blockquote=ie.blockquote),e.divider&&(r.divider=ie.divider),e.codeBlock&&(r.code_block={...ie.code_block,attrs:{...ie.code_block.attrs,props:{default:aV(tf({kind:"object",fields:e.heading.schema}),e.heading.schema)}}}),e.orderedList&&(r.ordered_list=ie.ordered_list),e.unorderedList&&(r.unordered_list=ie.unordered_list),(e.orderedList||e.unorderedList)&&(r.list_item=ie.list_item),e.heading.levels.length&&(r.heading={attrs:{level:{default:e.heading.levels[0]},props:{default:aV(tf({kind:"object",fields:e.heading.schema}),e.heading.schema)}},content:a6,group:"block",parseDOM:e.heading.levels.map(e=>({tag:"h"+e,attrs:{level:e}})),defining:!0,toDOM:e=>["h"+e.attrs.level,0],insertMenu:e.heading.levels.map((e,t)=>({...a9[t],label:"Heading "+e,command:t=>(0,p.y_)(t,{level:e})}))}),e.table&&(r.table=ie.table,r.table_row=ie.table_row,n?r.table_cell={...ie.table_cell,content:"paragraph"}:r.table_cell=ie.table_cell,r.table_header=ie.table_header),e.image&&(r.image=ie.image);let a={...Object.fromEntries(Object.entries(t).flatMap(([e,t])=>{var n;if("mark"!==t.kind)return[];let r={kind:"object",fields:t.schema},a=null!=(n=t.tag)?n:"span",i={attrs:{props:{default:aV(tf(r),r.fields)}},toDOM(n){let r,i=document.createElement(a);i.setAttribute("data-component",e),i.setAttribute("data-props",aY(n.attrs.props));let o=()=>(r||(r=aH(n.attrs.props,t.schema)),r);return"function"==typeof t.className?i.className=t.className({value:o()}):"string"==typeof t.className&&(i.className=t.className),"function"==typeof t.style?Object.assign(i.style,t.style({value:o()})):t.style&&Object.assign(i.style,t.style),i},parseDOM:[{tag:`${a}[data-component="${e}"]`,getAttrs:aJ}]};return[[e,i]]}))};e.link&&(a.link=io.link),e.italic&&(a.italic=io.italic),e.bold&&(a.bold=io.bold),e.strikethrough&&(a.strikethrough=io.strikethrough),e.code&&(a.code=io.c
105ode);let i=new U.Sj({nodes:r,marks:a}),o=i.nodes,l=i.marks,s={schema:i,marks:l,nodes:o,config:e,components:t,insertMenuItems:[],format:n?"mdx":"markdoc"};is.set(i,s);let d=[];for(let e of Object.values(i.nodes)){let t=e.spec.insertMenu;if(t)if(Array.isArray(t))for(let n of t)d.push({label:n.label,description:n.description,icon:n.icon,command:n.command(e,s),forToolbar:n.forToolbar});else d.push({label:t.label,description:t.description,icon:t.icon,command:t.command(e,s),forToolbar:t.forToolbar})}return s.insertMenuItems=d.sort((e,t)=>e.label.localeCompare(t.label)).map((e,t)=>({...e,id:t.toString()})),s}let is=new WeakMap;function ic(e){let t=is.get(e);if(!t)throw Error("No editor schema for schema");return t}let id=s.createContext(null);function iu(){let e=(0,s.useContext)(id);if(null===e)throw Error("useEditorState must be used inside ProseMirrorEditorView");return e}function ip(){return iy().dispatchCommand}function ih(){return iy().schema}function ig(){return iy().view}function im(e){let{mount:t}=iy();return(0,H.jsx)("div",{...e,ref:t})}let ib=s.createContext(null);function iy(){let e=(0,s.useContext)(ib);if(null===e)throw Error("editor hooks must be used inside a ProseMirrorEditorView");return e}let ik=(0,s.forwardRef)(function(e,t){let{view:n,mount:r}=function(e,t){let n=(0,s.useRef)(null),r=(0,s.useRef)(null),a=(0,V.z)(),i=a_(t);return(0,s.useLayoutEffect)(()=>{if(null===n.current)return;let t=new eY.Lz({mount:n.current},{state:e,config:a,dispatchTransaction(e){let n=t.state.apply(e);t.updateState(n),i(n)}});return r.current=t,()=>{t.destroy(),r.current=null}},[n,i,a]),(0,s.useLayoutEffect)(()=>{var t;null==(t=r.current)||t.updateState(e)},[e]),{view:r,mount:n}}(e.value,e.onChange);(0,s.useImperativeHandle)(t,()=>({get view(){return n.current}}),[n]);let a=(0,s.useMemo)(()=>({view:n,mount:r,dispatchCommand:e=>{n.current&&(e(n.current.state,n.current.dispatch,n.current),n.current.focus())},schema:ic(e.value.schema)}),[r,e.value.schema,n]);return(0,H.jsx)(ib.Provider,{value:a,children:(0,H.jsx)(id.Provider,{value:e.value,children:e.children})})});function ix(e,t){return ag("object"==typeof e.image?e.image.publicPath:void 0,t)}function iv(){let e,t,n,r=(0,o.c)(3);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(e,t,n)=>(t&&n&&(async()=>{let e=await nD("image/*"),t=ic(n.state.schema);e&&t.config.image&&n.dispatch(n.state.tr.replaceSelectionWith(n.state.schema.nodes.image.createChecked({src:new Uint8Array(await e.arrayBuffer()),filename:t.config.image.transformFilename(e.name)})))})(),!0),r[0]=e):e=r[0],r[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,H.jsx)(iX,{"aria-label":"Image",command:e,children:(0,H.jsx)(b.I,{src:$.F})}),r[1]=t):t=r[1],r[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,H.jsxs)(T.k,{children:[t,(0,H.jsx)(T.m,{children:(0,H.jsx)(d.EY,{children:"Image"})})]}),r[2]=n):n=r[2],n}let iw=new h.hs("AutocompleteDecoration"),iS={kind:"inactive"};function iE(){let e,t,n=(0,o.c)(4),r=iu();n[0]!==r?(e=iw.getState(r),n[0]=r,n[1]=e):e=n[1];let a=e;return a&&"inactive"!==a.kind?(n[2]!==a?(t=(0,H.jsx)(ij,{state:a}),n[2]=a,n[3]=t):t=n[3],t):null}function ij(e){let t,n,r,a=(0,o.c)(9),i=iu();a[0]!==e.state.decorations||a[1]!==i.doc?(n=e.state.decorations.find()[0],t=i.doc.textBetween(n.from,n.to).slice(1),a[0]=e.state.decorations,a[1]=i.doc,a[2]=t,a[3]=n):(t=a[2],n=a[3]);let l=t;return a[4]!==e.state.component||a[5]!==l||a[6]!==n.from||a[7]!==n.to?(r=(0,H.jsx)(e.state.component,{query:l,from:n.from,to:n.to}),a[4]=e.state.component,a[5]=l,a[6]=n.from,a[7]=n.to,a[8]=r):r=a[8],r}function iA(e){return e.setMeta(iw,{action:"remove"})}function iN(e){let t=function(e){let t=iw.getState(e);if((null==t?void 0:t.kind)==="active")return t.decorations.find()[0]}(e);if(t)return iA(e.tr.delete(t.from,t.to))}(0,eC.A)(e=>{let t=iN(e);return t?{state:e.apply(t),tr:t}:{state:e}});let iB=(0,u.AH)({color:u.Bk.color.foreground.accent});function iR(e){let t=iw.getState(e.state);return(null==t?void 0:t.kind)==="active"&&e.dispatch(iA(e.state.tr)),!1}function iC(){return(0,H.jsx)(c.zt,{alignItems:"center",gap:"regular",height:"element.regular",paddingX:"medium",children:(0,H.jsx)(d.EY,{color:"neutralSecondary",weight:"medium",children:"No results…"})})}
105let iI=new h.hs("keydown");function iT(e){let t,n,r,a=(0,o.c)(6),i=iu();a[0]!==i?(t=iI.getState(i),a[0]=i,a[1]=t):t=a[1];let l=t,c=a_(e);a[2]!==l||a[3]!==c?(n=()=>{if(!l)return;let e={fn:c};return l.add(e),()=>{l.delete(e)}},r=[l,c],a[2]=l,a[3]=c,a[4]=n,a[5]=r):(n=a[4],r=a[5]),(0,s.useEffect)(n,r)}function iO(e,t){let n,r,a=(0,o.c)(5),[i,l]=(0,s.useState)(null),c=function(){let e=ig(),t=iu();return(0,s.useCallback)(()=>{if(e.current&&e.current.state!==t){var n;null==(n=e.current)||n.updateState(t)}return e.current},[e,t])}();return a[0]!==c||a[1]!==e||a[2]!==t?(n=()=>{let n=c();if(!n)return void l(null);l(function(e,t,n){let r=e.state.doc.nodeAt(t);if(null!==r&&n===t+r.nodeSize){let n=e.nodeDOM(t);if(n instanceof Element)return iP(n,e)}let a=e.domAtPos(t),i=e.domAtPos(n),o=document.createRange();return o.setStart(a.node,a.offset),o.setEnd(i.node,i.offset),iP(o,e)}(n,e,t))},r=[c,e,t],a[0]=c,a[1]=e,a[2]=t,a[3]=n,a[4]=r):(n=a[3],r=a[4]),(0,s.useLayoutEffect)(n,r),i}function iP(e,t){return{contextElement:t.dom,getBoundingClientRect:()=>e.getBoundingClientRect()}}function i_(e){let t=ig(),n=iO(e.from,e.to),{keydownListener:r,listbox:a}=function(e){var t;let n,r,a,i,l,c,d,u,p,h=(0,o.c)(20);h[0]!==e?({listenerRef:r,onEscape:a,scrollRef:n,...i}=e,h[0]=e,h[1]=n,h[2]=r,h[3]=a,h[4]=i):(n=h[1],r=h[2],a=h[3],i=h[4]);let g=(0,e$.p)(e),f=(0,ez.pn)(),m=(0,s.useRef)(null);l=new eJ.n({collection:g.collection,ref:m,layoutDelegate:f});let{collectionProps:b}=(0,eZ.y)({keyboardDelegate:l,ref:r,scrollRef:null!=(t=n)?t:m,selectionManager:g.selectionManager,disallowEmptySelection:!0,disallowTypeAhead:!0,isVirtualized:!0,shouldFocusWrap:!0});h[5]!==g.selectionManager||h[6]!==e.onAction||h[7]!==a?(c=t=>{var n,r;switch(t.key){case"Enter":g.selectionManager.focusedKey&&(g.selectionManager.select(g.selectionManager.focusedKey),null==(n=e.onAction)||n.call(e,g.selectionManager.focusedKey)),t.preventDefault();break;case"Escape":null==(r=a)||r()}},h[5]=g.selectionManager,h[6]=e.onAction,h[7]=a,h[8]=c):c=h[8];let y=c;h[9]!==y||h[10]!==b.onKeyDown?(d=(0,er.c)(y,b.onKeyDown),h[9]=y,h[10]=b.onKeyDown,h[11]=d):d=h[11];let k=d;return h[12]!==m||h[13]!==f||h[14]!==g||h[15]!==i?(u=(0,H.jsx)(ez.TY,{ref:m,renderEmptyState:iC,layout:f,state:g,autoFocus:"first",shouldUseVirtualFocus:!0,shouldFocusWrap:!0,UNSAFE_className:ez.X0,...i}),h[12]=m,h[13]=f,h[14]=g,h[15]=i,h[16]=u):u=h[16],h[17]!==k||h[18]!==u?(p={keydownListener:k,listbox:u},h[17]=k,h[18]=u,h[19]=p):p=h[19],p}({listenerRef:(0,s.useMemo)(()=>({get current(){var e,n;return null!=(e=null==(n=t.current)?void 0:n.dom)?e:null}}),[t]),...e,UNSAFE_style:{width:320,...e.UNSAFE_style}});return iT(e=>(r(e),e.defaultPrevented)),n&&(0,H.jsx)(m.vx,{adaptToBoundary:"stretch",portal:!1,minWidth:"element.medium",placement:"bottom-start",reference:n,children:a})}let iF={pattern:/(?:^|\s)\/$/,handler:(e,t,n,r)=>{var a,i,o;return a=e.tr,i=r-1,o=void 0,a.setMeta(iw,{action:"add",from:i,to:r,menu:i$,pattern:o})}},iM=aR(e=>{let t=iN(e);return t?{state:e.apply(t),tr:t}:{state:e}});function iD(e){return(t,n,r)=>{let{state:a,tr:i}=iM(t);return!!i&&(n&&n(i),e(a,n,r))}}function iL(e){return(0,H.jsxs)(ez.q7,{textValue:e.label,children:[(0,H.jsx)(d.EY,{children:e.label}),e.description&&(0,H.jsx)(d.EY,{slot:"description",children:e.description}),e.icon&&(0,H.jsx)(b.I,{src:e.icon})]},e.id)}function i$(e){let t,n,r,a,i,l,s=(0,o.c)(23),c=ig(),d=ip(),u=ih(),p=iu();if(s[0]!==u.insertMenuItems||s[1]!==e.query||s[2]!==p){let t;s[4]!==p?(t=e=>e.command(p),s[4]=p,s[5]=t):t=s[5],n=(0,eN.Ht)(u.insertMenuItems,e.query,{keys:["label"]}).filter(t),s[0]=u.insertMenuItems,s[1]=e.query,s[2]=p,s[3]=n}else n=s[3];return t=n,s[6]!==t||s[7]!==d||s[8]!==c.current||s[9]!==p.tr?(r=e=>{if(" "!==e.key)return!1;if(1===t.length)return d(iD(t[0].command)),!0;if(0===t.length){var n;null==(n=c.current)||n.dispatch(iA(p.tr))}return!1},s[6]=t,s[7]=d,s[8]=c.current,s[9]=p.tr,s[10]=r):r=s[10],iT(r),s[11]!==p||s[12]!==c.current?(a=()=>{var e;let t=iN(p);t&&(null==(e=c.current)||e.dispatch(t))},s[11]=p,s[12]=c.current,s[13]=a):a=s[13],s[14]!==t||s[15]!==d?(i=e=>{let n=t.find(t=>
105t.id===e);n&&d(iD(n.command))},s[14]=t,s[15]=d,s[16]=i):i=s[16],s[17]!==e.from||s[18]!==e.to||s[19]!==t||s[20]!==a||s[21]!==i?(l=(0,H.jsx)(i_,{from:e.from,to:e.to,"aria-label":"Insert menu",items:t,children:iL,onEscape:a,onAction:i}),s[17]=e.from,s[18]=e.to,s[19]=t,s[20]=a,s[21]=i,s[22]=l):l=s[22],l}function iz(e){let t,n,r,a,i,l,u,p,h,g,m,y,k,x,v,w,S,E=(0,o.c)(33),[j,A]=(0,s.useState)(!1),N=(0,Z.o)(te);return E[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>A(!0),E[0]=t):t=E[0],E[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,H.jsx)(f.rA,{prominence:"low",onPress:t,children:(0,H.jsx)(b.I,{src:ep.I})}),E[1]=n):n=E[1],E[2]!==N?(r=N.format("edit"),E[2]=N,E[3]=r):r=E[3],E[4]!==r?(a=(0,H.jsxs)(T.k,{children:[n,(0,H.jsx)(T.m,{children:r})]}),E[4]=r,E[5]=a):a=E[5],E[6]!==e.href?(i=()=>{window.open(e.href,"_blank","noopener,noreferrer")},E[6]=e.href,E[7]=i):i=E[7],E[8]===Symbol.for("react.memo_cache_sentinel")?(l=(0,H.jsx)(b.I,{src:eh.X}),E[8]=l):l=E[8],E[9]!==i?(u=(0,H.jsx)(f.rA,{prominence:"low",onPress:i,children:l}),E[9]=i,E[10]=u):u=E[10],E[11]!==e.href?(p=(0,H.jsx)(T.m,{children:(0,H.jsx)(d.EY,{truncate:3,children:e.href})}),E[11]=e.href,E[12]=p):p=E[12],E[13]!==u||E[14]!==p?(h=(0,H.jsxs)(T.k,{children:[u,p]}),E[13]=u,E[14]=p,E[15]=h):h=E[15],E[16]===Symbol.for("react.memo_cache_sentinel")?(g=(0,H.jsx)(b.I,{src:ef.$}),E[16]=g):g=E[16],E[17]!==e.onUnlink?(m=(0,H.jsx)(f.rA,{prominence:"low",onPress:e.onUnlink,children:g}),E[17]=e.onUnlink,E[18]=m):m=E[18],E[19]===Symbol.for("react.memo_cache_sentinel")?(y=(0,H.jsx)(T.m,{children:"Unlink"}),E[19]=y):y=E[19],E[20]!==m?(k=(0,H.jsxs)(T.k,{children:[m,y]}),E[20]=m,E[21]=k):k=E[21],E[22]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{A(!1)},E[22]=x):x=E[22],E[23]!==j||E[24]!==e?(v=j&&(0,H.jsx)(iU,{text:e.text,href:e.href,onSubmit:t=>{let{href:n}=t;e.onHrefChange(n)}}),E[23]=j,E[24]=e,E[25]=v):v=E[25],E[26]!==v?(w=(0,H.jsx)(K.Uz,{onDismiss:x,children:v}),E[26]=v,E[27]=w):w=E[27],E[28]!==a||E[29]!==h||E[30]!==k||E[31]!==w?(S=(0,H.jsxs)(c.so,{gap:"small",padding:"regular",children:[a,h,k,w]}),E[28]=a,E[29]=h,E[30]=k,E[31]=w,E[32]=S):S=E[32],S}function iU(e){let t,n,r,a,i,l,u,p,h,g,m,b,y,k,x,v,w=(0,o.c)(40);w[0]!==e?({onSubmit:n,...t}=e,w[0]=e,w[1]=t,w[2]=n):(t=w[1],n=w[2]);let[S,E]=(0,s.useState)(t.href||""),[j,A]=(0,s.useState)(!1),{dismiss:N}=(0,K.Bj)(),B=(0,Z.o)(te);w[3]!==j||w[4]!==S?(r=j&&!tQ(S),w[3]=j,w[4]=S,w[5]=r):r=w[5];let R=r;w[6]===Symbol.for("react.memo_cache_sentinel")?(a={display:"contents"},w[6]=a):a=w[6],w[7]!==R||w[8]!==N||w[9]!==n||w[10]!==S?(i=e=>{e.target===e.currentTarget&&(e.preventDefault(),R||(N(),n({href:S})))},w[7]=R,w[8]=N,w[9]=n,w[10]=S,w[11]=i):i=w[11];let C=t.href?"Edit":"Add";w[12]!==C?(l=(0,H.jsxs)(d.DZ,{children:[C," link"]}),w[12]=C,w[13]=l):l=w[13],w[14]!==t.text?(u=(0,H.jsx)(eu.A_,{label:"Text",value:t.text,isReadOnly:!0}),w[14]=t.text,w[15]=u):u=w[15],w[16]===Symbol.for("react.memo_cache_sentinel")?(p=()=>A(!0),w[16]=p):p=w[16];let I=R&&"Please provide a valid URL.";return w[17]!==S||w[18]!==I?(h=(0,H.jsx)(eu.A_,{autoFocus:!0,isRequired:!0,onBlur:p,label:"Link",onChange:E,value:S,errorMessage:I}),w[17]=S,w[18]=I,w[19]=h):h=w[19],w[20]!==u||w[21]!==h?(g=(0,H.jsx)(J.UC,{children:(0,H.jsxs)(c.so,{gap:"large",direction:"column",children:[u,h]})}),w[20]=u,w[21]=h,w[22]=g):g=w[22],w[23]!==B?(m=B.format("cancel"),w[23]=B,w[24]=m):m=w[24],w[25]!==N||w[26]!==m?(b=(0,H.jsx)(f.$n,{onPress:N,children:m}),w[25]=N,w[26]=m,w[27]=b):b=w[27],w[28]!==B?(y=B.format("save"),w[28]=B,w[29]=y):y=w[29],w[30]!==y?(k=(0,H.jsx)(f.$n,{prominence:"high",type:"submit",children:y}),w[30]=y,w[31]=k):k=w[31],w[32]!==b||w[33]!==k?(x=(0,H.jsxs)(f.e2,{children:[b,k]}),w[32]=b,w[33]=k,w[34]=x):x=w[34],w[35]!==i||w[36]!==l||w[37]!==g||w[38]!==x?(v=(0,H.jsx)(K.lG,{size:"small",children:(0,H.jsxs)("form",{style:a,onSubmit:i,children:[l,g,x]})}),w[35]=i,w[36]=l,w[37]=g,w[38]=x,w[39]=v):v=w[39],v}function iK(e){let t=ih(),[n,r]=(0,s.useState)({alt:e.alt,title:e.title}),a=(0,s.useMemo)(()=>({kind:"object",fields:t.config.image.schema}),[t.config.image]),i=(0,s.useMemo)(()=>tC(a,r,()=>void 0),[a])(n),[o,l]=function(e){let t=e.lastIndexOf(".");return -1===t?[e,""]:[e.substring(0,t),e.substring(t+1)]}
105(e.filename),[u,p]=(0,s.useState)(!1),[h,g]=(0,s.useState)(o),[m,b]=(0,s.useState)(!1),{dismiss:y}=(0,K.Bj)(),k=(0,Z.o)(te);return(0,H.jsx)(K.lG,{size:"small",children:(0,H.jsxs)("form",{style:{display:"contents"},onSubmit:t=>{t.target===t.currentTarget&&(t.preventDefault(),p(!0),h&&tS(a,n,void 0)&&(y(),e.onSubmit({alt:n.alt,title:n.title,filename:[h,l].join(".")})))},children:[(0,H.jsx)(d.DZ,{children:"Image details"}),(0,H.jsx)(J.UC,{children:(0,H.jsxs)(c.so,{gap:"large",direction:"column",children:[(0,H.jsx)(eu.A_,{label:"File name",onChange:g,onBlur:()=>b(!0),value:h,isRequired:!0,errorMessage:(m||u)&&!h?"Please provide a file name.":void 0,endElement:l?(0,H.jsx)(c.so,{alignItems:"center",justifyContent:"center",paddingEnd:"regular",children:(0,H.jsxs)(d.EY,{color:"neutralTertiary",children:[".",l]})}):null}),(0,H.jsx)(ao,{forceValidation:u,autoFocus:!0,...i})]})}),(0,H.jsxs)(f.e2,{children:[(0,H.jsx)(f.$n,{onPress:y,children:k.format("cancel")}),(0,H.jsx)(f.$n,{prominence:"high",type:"submit",children:k.format("save")})]})]})})}function iq(e){let t,n,r,a,i,l,c,u,p=(0,o.c)(14),[h,g]=(0,s.useState)(!1);p[0]!==e.schema?(n={kind:"object",fields:e.schema},p[0]=e.schema,p[1]=n):n=p[1],t=n;let m=aW(e.serialized,e.schema),y=ip();return p[2]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{g(!0)},p[2]=r):r=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,H.jsx)(f.rA,{prominence:"low",onPress:r,children:(0,H.jsx)(b.I,{src:eQ.r})}),p[3]=a):a=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(i=(0,H.jsxs)(T.k,{children:[a,(0,H.jsx)(T.m,{children:"Edit"})]}),p[4]=i):i=p[4],p[5]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{g(!1)},p[5]=l):l=p[5],p[6]!==h||p[7]!==e||p[8]!==y||p[9]!==t||p[10]!==m?(c=h&&(0,H.jsxs)(K.lG,{children:[(0,H.jsxs)(d.DZ,{children:["Edit ",e.name]}),(0,H.jsx)(aK,{schema:t,value:m,onSave:t=>{y((n,r)=>(r&&r(n.tr.setNodeAttribute(e.pos,"props",aV(t,e.schema))),!0))}})]}),p[6]=h,p[7]=e,p[8]=y,p[9]=t,p[10]=m,p[11]=c):c=p[11],p[12]!==c?(u=(0,H.jsxs)(H.Fragment,{children:[i,(0,H.jsx)(K.Uz,{onDismiss:l,children:c})]}),p[12]=c,p[13]=u):u=p[13],u}let iV={code_block:function(e){let t=ip(),n=ih(),r=ig();return(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[(0,H.jsx)(eu.A_,{"aria-label":"Code block language",value:e.node.attrs.language,onChange:t=>{let n=r.current;n.dispatch(n.state.tr.setNodeAttribute(e.pos,"language",t))}}),!!Object.keys(n.config.codeBlock.schema).length&&(0,H.jsx)(iq,{name:"Code Block",schema:n.config.codeBlock.schema,pos:e.pos,serialized:e.node.attrs.props}),(0,H.jsx)(c.cG,{orientation:"vertical"}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{t((t,n)=>(n&&n(t.tr.delete(e.pos,e.pos+e.node.nodeSize)),!0))},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})]})},image:function(e){let t,n,r,a,i,l,d,u,p,g,m,y,k,x,v,w,S,E,j,A,N,B=(0,o.c)(42),R=(0,Z.o)(te),C=ip(),[I,O]=(0,s.useState)(!1);return B[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>O(!0),B[0]=t):t=B[0],B[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,H.jsx)(f.rA,{prominence:"low",onPress:t,children:(0,H.jsx)(b.I,{src:ep.I})}),B[1]=n):n=B[1],B[2]!==R?(r=R.format("edit"),B[2]=R,B[3]=r):r=B[3],B[4]!==r?(a=(0,H.jsxs)(T.k,{children:[n,(0,H.jsx)(T.m,{children:r})]}),B[4]=r,B[5]=a):a=B[5],B[6]!==C||B[7]!==e.pos?(i=async()=>{let t=await nD("image/*");if(!t)return;let n=new Uint8Array(await t.arrayBuffer());C((t,r)=>{if(r){let{tr:a}=t;a.setNodeAttribute(e.pos,"src",n);let i=t.apply(a);a.setSelection(h.nh.create(i.doc,e.pos)),r(a)}return!0})},B[6]=C,B[7]=e.pos,B[8]=i):i=B[8],B[9]===Symbol.for("react.memo_cache_sentinel")?(l=(0,H.jsx)(b.I,{src:eT.H}),B[9]=l):l=B[9],B[10]!==i?(d=(0,H.jsx)(f.rA,{prominence:"low",onPress:i,children:l}),B[10]=i,B[11]=d):d=B[11],B[12]===Symbol.for("react.memo_cache_sentinel")?(u=(0,H.jsx)(T.m,{children:"Choose file"}),B[12]=u):u=B[12],B[13]!==d?(p=(0,H.jsxs)(T.k,{children:[d,u]}),B[13]=d,B[14]=p):p=B[14],B[15]!==a||B[16]!==p?(g=(0,H.jsxs)(c.so,{gap:"small",children:[a,p]}),B[15]=a,B[16]=p,B[17]=g):g=B[17],B[18]===Symbol.for("react.memo_cache_sentinel")?(m=(0,H.jsx)(c.cG,{orientation:"vertical"}),B[18]=m):m=B[18],B[19]!==C||B[20]!==e.pos||B[21]!==e.node.nodeSize?(y=()=>{C((t,n)=>(n&&n(t.tr.delete(e.pos,e.pos+e.node.nodeSize)),!0))},B[19]=C,B[20]=e.pos,B[21]=e.node.nodeSize,B[22]=y):y=B[22],B[23]===Symbol.for("react.memo_cache_sentinel")?(k=(0,H.jsx)(b.I,{src:W.U}),B[23]=k):k=B[23],B[24]!==y?(x=(0,H.jsx)(f.rA,{prominence:"low",onPress:y,children:k}),B[24]=y,B[25]=x):x=B[25],B[26]===Symbol.for("react.memo_cache_sentinel")?(v=(0,H.jsx)(T.m,{tone:"critical",children:"Remove"}),B[26]=v):v=B[26],B[27]!==x?(w=(0,H.jsxs)(T.k,{children:[x,v]}),B[27]=x,B[28]=w):w=B[28],B[29]!==g||B[30]!==w?(S=(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[g,m,w]}),B[29]=g,B[30]=w,B[31]=S):S=B[31],B[32]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{O(!1)},B[32]=E):E=B[32],B[33]!==I||B[34]!==C||B[35]!==e?(j=I&&(0,H.jsx)(iK,{alt:e.node.attrs.alt,title:e.node.attrs.title,filename:e.node.attrs.filename,onSubmit:t=>{C((n,r)=>{if(r){let{tr:a}=n;a.setNodeMarkup(e.pos,void 0,{...e.node.attrs,...t});let i=n.apply(a);a.setSelection(h.nh.create(i.doc,e.pos)),r(a)}return!0}),O(!1)}}),B[33]=I,B[34]=C,B[35]=e,B[36]=j):j=B[36],B[37]!==j?(A=(0,H.jsx)(K.Uz,{onDismiss:E,children:j}),B[37]=j,B[38]=A):A=B[38],B[39]!==S||B[40]!==A?(N=(0,H.jsxs)(H.Fragment,{children:[S,A]}),B[39]=S,B[40]=A,B[41]=N):N=B[41],N},table:function(e){var t;let n=ip(),r=ih();return(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:["markdoc"===r.format&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",isSelected:(null==(t=e.node.firstChild)||null==(t=t.firstChild)?void 0:t.type)===r.nodes.table_header,onPress:()=>{n((0,eX.iS)("row"))},children:(0,H.jsx)(b.I,{src:eD.T})}),(0,H.jsx)(T.m,{children:"Header row"})]}),(0,H.jsx)(c.cG,{orientation:"vertical"})]}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{n((t,n)=>(n&&n(t.tr.delete(e.pos,e.pos+e.node.nodeSize)),!0))},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})]})},heading:Object.assign(function(e){let t=ip(),n=ih();return(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[(0,H.jsx)(iq,{name:"Heading",schema:n.config.heading.schema,pos:e.pos,serialized:e.node.attrs.props}),(0,H.jsx)(c.cG,{orientation:"vertical"}),(0,H.jsxs)(T.k,{children:[(0,H.jsx)(f.rA,{prominence:"low",onPress:()=>{t((t,n)=>(n&&n(t.tr.delete(e.pos,e.pos+e.node.nodeSize)),!0))},children:(0,H.jsx)(b.I,{src:W.U})}),(0,H.jsx)(T.m,{tone:"critical",children:"Remove"})]})]})},{shouldShow:e=>!!Object.keys(e.config.heading.schema).length})};function iH(e,t){let{parent:n,parentOffset:r}=e,a=n.childAfter(r);if(!a.node)return null;let i=a.node.marks.find(e=>e.type===t);if(!i)return null;let o=e.index(),l=e.start()+a.offset,s=o+1,c=l+a.node.nodeSize;
105for(;o>0&&i.isInSet(n.child(o-1).marks);)o-=1,l-=n.child(o).nodeSize;for(;s<n.childCount&&i.isInSet(n.child(s).marks);)c+=n.child(s).nodeSize,s+=1;return{from:l,to:c,mark:i}}let iG=e=>{let t,n,r,a,i=(0,o.c)(14),l=ip(),s=e.mark.attrs.href;return"string"!=typeof s?null:(i[0]!==e.state.doc||i[1]!==e.from||i[2]!==e.to?(t=e.state.doc.textBetween(e.from,e.to),i[0]=e.state.doc,i[1]=e.from,i[2]=e.to,i[3]=t):t=i[3],i[4]!==l||i[5]!==e.from||i[6]!==e.to?(n=()=>{l((t,n)=>(n&&n(t.tr.removeMark(e.from,e.to,t.schema.marks.link)),!0))},r=t=>{l((n,r)=>(r&&r(n.tr.removeMark(e.from,e.to,n.schema.marks.link).addMark(e.from,e.to,n.schema.marks.link.create({href:t}))),!0))},i[4]=l,i[5]=e.from,i[6]=e.to,i[7]=n,i[8]=r):(n=i[7],r=i[8]),i[9]!==t||i[10]!==s||i[11]!==n||i[12]!==r?(a=(0,H.jsx)(iz,{text:t,href:s,onUnlink:n,onHrefChange:r}),i[9]=t,i[10]=s,i[11]=n,i[12]=r,i[13]=a):a=i[13],a)};function iW(e){let t,n,r,a,i,l,u,p,h,g,m,y,k,x,v,w=(0,o.c)(43);w[0]!==e.state.schema?(t=ic(e.state.schema),w[0]=e.state.schema,w[1]=t):t=w[1];let S=t.components[e.node.type.name],E=ip(),[j,A]=(0,s.useState)(!1);w[2]!==S.schema?(r={kind:"object",fields:S.schema},w[2]=S.schema,w[3]=r):r=w[3],n=r;let N=aW(e.node.attrs.props,S.schema),B=ig();if("inline"===S.kind&&S.ToolbarView){let t,r,a;return w[4]!==B.current||w[5]!==e.pos||w[6]!==n.fields?(t=t=>{let r=B.current;r.dispatch(r.state.tr.setNodeAttribute(e.pos,"props",aV(t,n.fields)))},w[4]=B.current,w[5]=e.pos,w[6]=n.fields,w[7]=t):t=w[7],w[8]!==E||w[9]!==e.pos||w[10]!==e.node.nodeSize?(r=()=>{E((t,n)=>(n&&n(t.tr.delete(e.pos,e.pos+e.node.nodeSize)),!0))},w[8]=E,w[9]=e.pos,w[10]=e.node.nodeSize,w[11]=r):r=w[11],w[12]!==S.ToolbarView||w[13]!==N||w[14]!==t||w[15]!==r?(a=(0,H.jsx)(S.ToolbarView,{value:N,onChange:t,onRemove:r}),w[12]=S.ToolbarView,w[13]=N,w[14]=t,w[15]=r,w[16]=a):a=w[16],a}return w[17]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{A(!0)},w[17]=a):a=w[17],w[18]===Symbol.for("react.memo_cache_sentinel")?(i=(0,H.jsx)(f.rA,{prominence:"low",onPress:a,children:(0,H.jsx)(b.I,{src:eQ.r})}),w[18]=i):i=w[18],w[19]===Symbol.for("react.memo_cache_sentinel")?(l=(0,H.jsxs)(T.k,{children:[i,(0,H.jsx)(T.m,{children:"Edit"})]}),w[19]=l):l=w[19],w[20]!==E||w[21]!==e.pos||w[22]!==e.node.nodeSize?(u=()=>{E((t,n)=>(n&&n(t.tr.delete(e.pos,e.pos+e.node.nodeSize)),!0))},w[20]=E,w[21]=e.pos,w[22]=e.node.nodeSize,w[23]=u):u=w[23],w[24]===Symbol.for("react.memo_cache_sentinel")?(p=(0,H.jsx)(b.I,{src:W.U}),w[24]=p):p=w[24],w[25]!==u?(h=(0,H.jsx)(f.rA,{prominence:"low",onPress:u,children:p}),w[25]=u,w[26]=h):h=w[26],w[27]===Symbol.for("react.memo_cache_sentinel")?(g=(0,H.jsx)(T.m,{tone:"critical",children:"Remove"}),w[27]=g):g=w[27],w[28]!==h?(m=(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[l,(0,H.jsxs)(T.k,{children:[h,g]})]}),w[28]=h,w[29]=m):m=w[29],w[30]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{A(!1)},w[30]=y):y=w[30],w[31]!==j||w[32]!==S||w[33]!==E||w[34]!==e||w[35]!==n||w[36]!==N?(k=j&&(0,H.jsxs)(K.lG,{children:[(0,H.jsxs)(d.DZ,{children:["Edit ",S.label]}),(0,H.jsx)(aK,{schema:n,value:N,onSave:t=>{E((r,a)=>(a&&a(r.tr.setNodeAttribute(e.pos,"props",aV(t,n.fields))),!0))}})]}),w[31]=j,w[32]=S,w[33]=E,w[34]=e,w[35]=n,w[36]=N,w[37]=k):k=w[37],w[38]!==k?(x=(0,H.jsx)(K.Uz,{onDismiss:y,children:k}),w[38]=k,w[39]=x):x=w[39],w[40]!==m||w[41]!==x?(v=(0,H.jsxs)(H.Fragment,{children:[m,x]}),w[40]=m,w[41]=x,w[42]=v):v=w[42],v}let iY=e=>{let t,n,r,a,i,l,u,p,h,g,m,y,k,x,v,w=(0,o.c)(31);w[0]!==e.state.schema?(t=ic(e.state.schema),w[0]=e.state.schema,w[1]=t):t=w[1];let S=t.components[e.mark.type.name],E=ip(),[j,A]=(0,s.useState)(!1);w[2]!==S.schema?(r={kind:"object",fields:S.schema},w[2]=S.schema,w[3]=r):r=w[3],n=r;let N=aW(e.mark.attrs.props,S.schema);return w[4]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{A(!0)},w[4]=a):a=w[4],w[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,H.jsx)(f.rA,{prominence:"low",onPress:a,children:(0,H.jsx)(b.I,{src:eQ.r})}),w[5]=i):i=w[5],w[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,H.jsxs)(T.k,{children:[i,(0,H.jsx)(T.m,{children:"Edit"})]}),w[6]=l):l=w[6],w[7]!==E||w[8]!==e.from||w[9]!==e.to||w[10]!==e.mark.type?(u=()=>{E((t,n)=>(n&&n(t.tr.removeMark(e.from,e.to,e.mark.type)),!0))}
105,w[7]=E,w[8]=e.from,w[9]=e.to,w[10]=e.mark.type,w[11]=u):u=w[11],w[12]===Symbol.for("react.memo_cache_sentinel")?(p=(0,H.jsx)(b.I,{src:W.U}),w[12]=p):p=w[12],w[13]!==u?(h=(0,H.jsx)(f.rA,{prominence:"low",onPress:u,children:p}),w[13]=u,w[14]=h):h=w[14],w[15]===Symbol.for("react.memo_cache_sentinel")?(g=(0,H.jsx)(T.m,{tone:"critical",children:"Remove"}),w[15]=g):g=w[15],w[16]!==h?(m=(0,H.jsxs)(c.so,{gap:"regular",padding:"regular",children:[l,(0,H.jsxs)(T.k,{children:[h,g]})]}),w[16]=h,w[17]=m):m=w[17],w[18]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{A(!1)},w[18]=y):y=w[18],w[19]!==j||w[20]!==S||w[21]!==E||w[22]!==e||w[23]!==n||w[24]!==N?(k=j&&(0,H.jsxs)(K.lG,{children:[(0,H.jsxs)(d.DZ,{children:["Edit ",S.label]}),(0,H.jsx)(aK,{schema:n,value:N,onSave:t=>{E((n,r)=>(r&&r(n.tr.removeMark(e.from,e.to,e.mark.type).addMark(e.from,e.to,e.mark.type.create({props:aV(t,S.schema)}))),!0))}})]}),w[19]=j,w[20]=S,w[21]=E,w[22]=e,w[23]=n,w[24]=N,w[25]=k):k=w[25],w[26]!==k?(x=(0,H.jsx)(K.Uz,{onDismiss:y,children:k}),w[26]=k,w[27]=x):x=w[27],w[28]!==m||w[29]!==x?(v=(0,H.jsxs)(H.Fragment,{children:[m,x]}),w[28]=m,w[29]=x,w[30]=v):v=w[30],v};function iJ(e){let t,n=(0,o.c)(4),r=iO("node"===e.decoration.kind?e.decoration.pos:e.decoration.from,"node"===e.decoration.kind?e.decoration.pos+e.decoration.node.nodeSize:e.decoration.to);return n[0]!==r||n[1]!==e.decoration||n[2]!==e.state?(t=r&&(0,H.jsx)(m.vx,{adaptToBoundary:e.decoration.adaptToBoundary,minWidth:"element.medium",placement:"bottom",portal:!1,reference:r,children:(e.decoration.kind,(0,H.jsx)(e.decoration.component,{...e.decoration,state:e.state}))}),n[0]=r,n[1]=e.decoration,n[2]=e.state,n[3]=t):t=n[3],t}function iZ(e){let t,n,r,a=(0,o.c)(5);return(a[0]!==e.state?(n=function(e){if(e.selection instanceof h.U3){let t=ic(e.schema),n=null;for(let[r,a]of Object.entries(t.components)){if("mark"!==a.kind||!Object.keys(a.schema).length)continue;let i=t.schema.marks[r],o=iH(e.selection.$from,i),l=iH(e.selection.$to,i);if(o&&o.from===(null==l?void 0:l.from)&&o.to===l.to){let e=o.to-o.from;(!n||e<n.to-n.from)&&(n={adaptToBoundary:"flip",kind:"mark",component:iY,mark:o.mark,from:o.from,to:o.to})}}if(t.marks.link){let r=iH(e.selection.$from,t.marks.link),a=iH(e.selection.$to,t.marks.link);if(r&&r.from===(null==a?void 0:a.from)&&r.to===a.to){let e=r.to-r.from;if(!n||e<n.to-n.from)return{adaptToBoundary:"flip",kind:"mark",component:iG,mark:r.mark,from:r.from,to:r.to}}}if(n)return n}let t=ic(e.schema);if(e.selection instanceof h.nh){var n;let r=e.selection.node;if((null==(n=t.components[r.type.name])?void 0:n.kind)==="inline")return{adaptToBoundary:"stick",kind:"node",node:r,component:iW,pos:e.selection.from};let a=iV[r.type.name];if(void 0!==a&&(!a.shouldShow||a.shouldShow(t)))return{adaptToBoundary:"stick",kind:"node",node:r,component:a,pos:e.selection.from}}let r=e.selection.$from.start(e.selection.$from.sharedDepth(e.selection.to)),a=e.doc.resolve(r);for(let e=a.depth;e>0;e--){let n=a.node(e);if(!n)break;let r=iV[n.type.name];if(void 0!==r&&(!r.shouldShow||r.shouldShow(t)))return{adaptToBoundary:"stick",kind:"node",node:n,component:r,pos:a.start(e)-1}}return null}(e.state),a[0]=e.state,a[1]=n):n=a[1],t=n)?(a[2]!==t||a[3]!==e.state?(r=(0,H.jsx)(iJ,{decoration:t,state:e.state}),a[2]=t,a[3]=e.state,a[4]=r):r=a[4],r):null}function iX(e){var t,n;let r=iu(),a=ip(),i=!!(null!=(t=e.isSelected)&&t.call(e,r)),o=!e.command(r)||(null==(n=e.isDisabled)?void 0:n.call(e,r));return(0,s.useMemo)(()=>(0,H.jsx)(m.fc,{"aria-label":e["aria-label"],isSelected:i,isDisabled:o,onPress:()=>{a(e.command)},children:e.children}),[o,i,e,a])}function iQ(e){let[t,n]=(0,s.useState)(null),r=ip(),a=ig();return iT(t=>{if(t.metaKey&&("k"===t.key||"K"===t.key)){let{state:r}=a.current;if(!i5(e.link)(r))return t.preventDefault(),n(r.doc.textBetween(r.selection.from,r.selection.to)),!0}return!1}),(0,s.useMemo)(()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(T.k,{children:[(0,H.jsx)(iX,{"aria-label":"Divider",command:(t,r)=>{let a=iH(t.selection.$from,e.link),i=iH(t.selection.$to,e.link);if(a&&(!i||a.mark===(null==i?void 0:i.mark))){if(r){var o;r(t.tr.removeMark(a.from,null!=(o=null==i?void 0:i.to)?o:a.to,e.link))}return!0}return!t.selection.empty&&(r&&n(t.doc.textBetween(t.selection.from,t.selection.to)),!0)},isSelected:i5(e.link),children:(0,H.jsx)(b.I,{src:eg.w})}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Link"}),(0,H.jsx)(d.ue,{meta:!0,children:"K"})]})]}),(0,H.jsx)(K.Uz,{onDismiss:()=>{n(null)},children:t&&(0,H.jsx)(iU,{href:"",text:t,onSubmit:t=>{n(null),r((0,p.wh)(e.link,t))}})})]}),[e.link,r,t])}let i0=(0,s.memo)(function(e){var t,n;let{nodes:r,marks:a}=ih();return(0,H.jsxs)(i2,{...e,children:[(0,H.jsxs)(i3,{children:[r.heading&&(0,H.jsx)(i6,{headingType:r.heading}),(0,H.jsxs)(m.tj,{"aria-label":"Formatting options",children:[(0,H.jsx)(m.Cv,{}),(0,H.jsx)(i7,{}),(0,H.jsx)(m.Cv,{}),(0,H.jsx)(oe,{}),(0,H.jsx)(m.Cv,{}
105),(0,H.jsxs)(m.K$,{"aria-label":"Blocks",children:[r.divider&&(0,H.jsxs)(T.k,{children:[(0,H.jsx)(iX,{"aria-label":"Divider",command:aF(r.divider),isSelected:on(r.divider),children:(0,H.jsx)(b.I,{src:E.c})}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Divider"}),(0,H.jsx)(d.ue,{children:"---"})]})]}),a.link&&(0,H.jsx)(iQ,{link:a.link}),r.blockquote&&(0,H.jsxs)(T.k,{children:[(0,H.jsx)(iX,{"aria-label":"Quote",command:(e,t)=>{if(!on(r.blockquote)(e))return(0,p.Im)(r.blockquote)(e,t);{let{$from:n,$to:a}=e.selection,i=n.blockRange(a,e=>e.type===r.blockquote);if(!i)return!1;let o=(0,g.jP)(i);return null!==o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)}},isSelected:on(r.blockquote),children:(0,H.jsx)(b.I,{src:A.G})}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Quote"}),(0,H.jsx)(d.ue,{children:">⎵"})]})]}),r.code_block&&(0,H.jsxs)(T.k,{children:[(0,H.jsx)(iX,{"aria-label":"Code block",command:(t=r.code_block,n=r.paragraph,(e,r,a)=>{let i=[];for(let n of e.selection.ranges)e.doc.nodesBetween(n.$from.pos,n.$to.pos,(e,n)=>{e.type===t&&i.push([n,n+e.nodeSize])});if(!i.length)return(0,p.y_)(t)(e,r,a);if(r){let t=e.tr;for(let[e,r]of i)t.setBlockType(e,r,n);r(t)}return!0}),isSelected:on(r.code_block),children:(0,H.jsx)(b.I,{src:x.N})}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Code block"}),(0,H.jsx)(d.ue,{children:"```"})]})]}),r.table&&(0,H.jsxs)(T.k,{children:[(0,H.jsx)(iX,{"aria-label":"Table",command:aM(r.table),children:(0,H.jsx)(b.I,{src:R.k})}),(0,H.jsx)(T.m,{children:(0,H.jsx)(d.EY,{children:"Table"})})]}),r.image&&(0,H.jsx)(iv,{})]})]})]}),(0,H.jsx)(i9,{})]})}),i1=({children:e})=>{let t=tZ();return(0,H.jsx)("div",{"data-layout":t,className:(0,u.AH)({alignItems:"center",boxSizing:"border-box",display:"flex",height:u.Bk.size.element.medium,[u.C3.above.mobile]:{height:u.Bk.size.element.large},'&[data-layout="main"]':{marginInline:"auto",maxWidth:800,minWidth:0,paddingInline:u.Bk.size.space.medium,[u.C3.above.mobile]:{paddingInline:u.Bk.size.space.xlarge},[u.C3.above.tablet]:{paddingInline:u.Bk.size.space.xxlarge}}}),children:e})},i2=e=>{let t=tZ();return(0,H.jsx)("div",{...e,"data-layout":t,className:(0,u.AH)({backdropFilter:"blur(8px)",backgroundClip:"padding-box",backgroundColor:`color-mix(in srgb, transparent, ${u.Bk.color.background.canvas} 90%)`,borderBottom:`${u.Bk.size.border.regular} solid color-mix(in srgb, transparent, ${u.Bk.color.foreground.neutral} 10%)`,borderStartEndRadius:u.Bk.size.radius.medium,borderStartStartRadius:u.Bk.size.radius.medium,minWidth:0,position:"sticky",top:0,zIndex:2,'&[data-layout="main"]':{borderRadius:0}}),children:(0,H.jsx)(i1,{children:e.children})})},i3=e=>{let t=tZ();return(0,H.jsx)("div",{"data-layout":t,className:(0,u.AH)({alignItems:"center",display:"flex",flex:1,gap:u.Bk.size.space.regular,paddingInline:u.Bk.size.space.medium,minWidth:0,overflowX:"auto",marginBlock:`calc(${u.Bk.size.alias.focusRing} * -1)`,paddingBlock:u.Bk.size.alias.focusRing,msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},'&[data-layout="main"]':{paddingInline:0}}),...e})},i4=new Map([["normal","normal"],["1",1],["2",2],["3",3],["4",4],["5",5],["6",6]]),i6=e=>{let{nodes:t,config:n}=ih(),r=(0,s.useMemo)(()=>{let e=[{name:"Paragraph",id:"normal"}];return n.heading.levels.forEach(t=>{e.push({name:`Heading ${t}`,id:t.toString()})}),e},[n.heading.levels]),a=function(e,t,n){var r;let a;for(let r of e.selection.ranges)if(e.doc.nodesBetween(r.$from.pos,r.$to.pos,e=>{if(e.type===t){let t=e.attrs.level;void 0===a?a=t:a!==t&&(a="disabled")}e.type===n&&(void 0===a?a="normal":"normal"!==a&&(a="disabled"))}),"disabled"===a)break;return null!=(r=a)?r:"disabled"}(iu(),e.headingType,t.paragraph),i=ip();return(0,s.useMemo)(()=>(0,H.jsx)(I.LC,{flexShrink:0,width:"scale.1700",prominence:"low","aria-label":"Text block",items:r,isDisabled:"disabled"===a,selectedKey:"disabled"===a?"normal":a.toString(),onSelectionChange:n=>{let r=i4.get(n);"normal"===r?i((0,p.y_)(t.paragraph)):r&&i((0,p.y_)(e.headingType,{level:parseInt(r)}))},children:e=>(0,H.jsx)(I.q7,{children:e.name},e.id)}),[r,a,t.paragraph,e.headingType,i])};function i9(){let e=tZ(),t=ip(),n=ih(),r=(0,s.useMemo)(()=>n.insertMenuItems.filter(e=>e.forToolbar),[n.insertMenuItems]),a=(0,s.useMemo)(()=>new Map(r.map(e=>[e.id,e])),[r]);return 0===r.length?null:(0,H.jsxs)(C.cQ,{align:"end",children:[(0,H.jsxs)(T.k,{children:[(0,H.jsxs)(f.rA,{marginEnd:"main"===e?void 0:"medium",children:[(0,H.jsx)(b.I,{src:j.W}),(0,H.jsx)(b.I,{src:k.b})]}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:"Insert"}),(0,H.jsx)(d.ue,{children:"/"})]})]}),(0,H.jsx)(C.W1,{onAction:e=>{var n;let r=null==(n=a.get(e))?void 0:n.command;r&&t(r)},items:r,children:iL})]})}let i5=e=>t=>{if(t.selection instanceof h.U3&&t.selection.empty)return!!t.selection.$cursor&&!!e.isInSet(t.storedMarks||t.selection.$cursor.marks());for(let n of t.selection.ranges)if(t.doc.rangeHasMark(n.$from.pos,n.$to.pos,e))return!0;return!1};function i7(){let e=iu(),t=ih(),n=ip(),r=(0,s.useMemo)(()=>{let e=[];for(let[n,r]of(t.marks.bold&&e.push({key:"bold",label:"Bold",icon:y.T,shortcut:"B",command:(0,p.wh)(t.marks.bold),isSelected:i5(t.marks.bold)}),t.marks.italic&&e.push({key:"italic",label:"Italic",icon:v.m,shortcut:"I",command:(0,p.wh)(t.marks.italic),isSelected:i5(t.marks.italic)}
105),t.marks.strikethrough&&e.push({key:"strikethrough",label:"Strikethrough",icon:B.t,command:(0,p.wh)(t.marks.strikethrough),isSelected:i5(t.marks.strikethrough)}),t.marks.code&&e.push({key:"code",label:"Code",icon:x.N,command:(0,p.wh)(t.marks.code),isSelected:i5(t.marks.code)}),Object.entries(t.components)))"mark"===r.kind&&e.push({key:n,label:r.label,icon:r.icon,command:(0,p.wh)(t.schema.marks[n]),isSelected:i5(t.schema.marks[n])});return e.push({key:"clearFormatting",label:"Clear formatting",icon:N.x,command:(e,t)=>!e.selection.empty&&(t&&t(e.tr.removeMark(e.selection.from,e.selection.to)),!0),isSelected:()=>!1}),e},[t]),a=i8(r.filter(t=>t.isSelected(e)).map(e=>e.key)),i=i8(r.filter(t=>!t.command(e)).map(e=>e.key));return(0,s.useMemo)(()=>(0,H.jsx)(m.K$,{"aria-label":"Text formatting",value:a,onChange:e=>{let t=r.find(t=>t.key===e);t&&n(t.command)},disabledKeys:i,selectionMode:"multiple",children:r.map(e=>(0,H.jsxs)(T.k,{children:[(0,H.jsx)(m.o9,{value:e.key,"aria-label":e.label,children:(0,H.jsx)(b.I,{src:e.icon})}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:e.label}),"shortcut"in e&&(0,H.jsx)(d.ue,{meta:!0,children:e.shortcut})]})]},e.key))}),[i,r,n,a])}function i8(e){return(0,s.useMemo)(()=>e,[JSON.stringify(e)])}function oe(){let e=iu(),t=ih(),n=ip(),r=!!t.nodes.ordered_list&&aD(t.nodes.ordered_list)(e),a=!!t.nodes.unordered_list&&aD(t.nodes.unordered_list)(e),i=function(e,t){let n=e.selection.$from.sharedDepth(e.selection.to);for(let r=n;r>0;r--){let n=e.selection.$from.node(r);if(n.type===t.nodes.ordered_list)return"ordered_list";if(n.type===t.nodes.unordered_list)return"unordered_list"}return null}(e,t),o=(0,s.useMemo)(()=>[!!t.nodes.unordered_list&&{label:"Bullet list",key:"unordered_list",shortcut:"-",icon:w.G},!!t.nodes.ordered_list&&{label:"Numbered list",key:"ordered_list",shortcut:"1.",icon:S.b}].filter(ot),[t.nodes.unordered_list,t.nodes.ordered_list]),l=(0,s.useMemo)(()=>[!r&&"ordered_list",!a&&"unordered_list"].filter(ot),[r,a]);return(0,s.useMemo)(()=>0===o.length?null:(0,H.jsx)(m.K$,{"aria-label":"Lists",value:i,onChange:e=>{let r=t.nodes[e];r&&n(aD(r))},disabledKeys:l,selectionMode:"single",children:o.map(e=>(0,H.jsxs)(T.k,{children:[(0,H.jsx)(m.o9,{value:e.key,"aria-label":e.label,children:(0,H.jsx)(b.I,{src:e.icon})}),(0,H.jsxs)(T.m,{children:[(0,H.jsx)(d.EY,{children:e.label}),(0,H.jsx)(d.ue,{children:e.shortcut})]})]},e.key))}),[i,l,n,o,t.nodes])}function ot(e){return!1!==e}function on(e){return t=>{let n=!1;for(let r of t.selection.ranges)if(t.doc.nodesBetween(r.$from.pos,r.$to.pos,t=>{t.type===e&&(n=!0)}),n)break;return n}}let or=0;function oa(e){let t=ig();return(0,H.jsx)("span",{className:os,ref:(0,s.useCallback)(n=>{if(!n)return;n.appendChild(e.node);let r=t.current;r&&r.hasFocus()&&r.focus()},[e.node,t])})}let oi=(0,s.memo)(function(e){let t,n,r=(0,o.c)(9);return r[0]!==e.contentDOM?(t=e.contentDOM?(0,H.jsx)(oa,{node:e.contentDOM}):null,r[0]=e.contentDOM,r[1]=t):t=r[1],r[2]!==e.component||r[3]!==e.node||r[4]!==e.getPos||r[5]!==e.hasNodeSelection||r[6]!==e.isNodeCompletelyWithinSelection||r[7]!==t?(n=(0,H.jsx)(e.component,{node:e.node,getPos:e.getPos,hasNodeSelection:e.hasNodeSelection,isNodeCompletelyWithinSelection:e.isNodeCompletelyWithinSelection,children:t}),r[2]=e.component,r[3]=e.node,r[4]=e.getPos,r[5]=e.hasNodeSelection,r[6]=e.isNodeCompletelyWithinSelection,r[7]=t,r[8]=n):n=r[8],n});function oo(e){let t,n,r,a,i,l=(0,o.c)(12);l[0]!==e.state?(t=od.getState(e.state),l[0]=e.state,l[1]=t):t=l[1];let c=t;l[2]!==c.nodeViews?(n=()=>new Map(c.nodeViews),l[2]=c.nodeViews,l[3]=n):n=l[3];let[d,u]=(0,s.useState)(n);l[4]!==c?(r=()=>c.register(()=>{u(new Map(c.nodeViews))}),a=[c],l[4]=c,l[5]=r,l[6]=a):(r=l[5],a=l[6]),(0,s.useLayoutEffect)(r,a);let p=e.state.selection instanceof h.nh?e.state.selection.from:void 0,g=e.state.selection.from,f=e.state.selection.to;return l[7]!==d||l[8]!==p||l[9]!==g||l[10]!==f?(i=(0,H.jsx)(H.Fragment,{children:[...d].map(e=>{let[t,n]=e,{contentDOM:r,dom:a,node:i,getPos:o}=n,l=ol(i.type);if(!l)return null;let s=o();return void 0===s?null:(0,e0.createPortal)((0,H.jsx)(oi,{hasNodeSelection:p===s,isNodeCompletelyWithinSelection:s>=g&&s+i.nodeSize<=f,node:i,contentDOM:r,component:l.component,getPos:o}),a,t)})}),l[7]=d,l[8]=p,l[9]=g,l[10]=f,l[11]=i):i=l[11],i}function ol(e){return e.spec.reactNodeView}let os=(0,u.AH)({display:"contents"});function oc(e){let t=document.createElement(e);return t.classList.add(os),t}let od=new h.hs("reactNodeViews"),ou={deleteRow:{label:"Delete row",command:eX.aR},deleteColumn:{label:"Delete column",command:eX.gR},insertRowBelow:{label:"Insert row below",command:eX.gC},insertColumnRight:{label:"Insert column right",command:eX.GU}};function op(){let e,t,n,r,a,i,l,s,c,d=(0,o.c)(12),p=ip(),h=u.Bk.size.space.small;return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,u.AH)({top:h,insetInlineEnd:h,position:"absolute"}),d[0]=e):e=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,u.AH)({borderRadius:u.Bk.size.radius.small,height:"auto",minWidth:0,padding:0,"&::before":{content:'""',inset:`calc(${h} * -1)`,position:"absolute"}}),d[1]=t):t=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,H.jsx)(f.rA,{prominence:"low","aria-label":"Cell options",UNSAFE_className:t,children:(0,H.jsx)(b.I,{src:k.b})}),d[2]=n):n=d[2],d[3]!==p?(r=e=>{e in ou&&p(ou[e].command)},d[3]=p,d[4]=r):r=d[4],d[5]===Symbol.for("react.memo_cache_sentinel")?(a=Object.entries(ou).map(e=>{let[t,n]=e;return{...n,key:t}}),i=e=>(0,H.jsx)(eo.q,{children:e.label},e.key),d[5]=a,d[6]=i):(a=d[5],i=d[6]),d[7]!==r?(l=(0,H.jsxs)(C.cQ,{align:"end",children:[n,(0,H.jsx)(C.W1,{onAction:r,items:a,children:i})]}),d[7]=r,d[8]=l):l=d[8],d[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,H.jsx)(T.m,{children:"Options"}),d[9]=s):s=d[9],d[10]!==l?(c=(0,H.jsx)("div",{contentEditable:!1,
105className:e,children:(0,H.jsxs)(T.k,{children:[l,s]})}),d[10]=l,d[11]=c):c=d[11],c}function oh(e){let t=function(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.before(t)}}(e.selection.$from);if(void 0!==t){let n=document.createElement("div"),r=eY.NZ.widget(t+1,n,{element:n,side:1});return{set:eY.zF.create(e.doc,[r]),element:n}}}let og=new h.k_({state:{init:(e,t)=>oh(t),apply:(e,t,n,r)=>oh(r)},props:{decorations(e){var t;return null==(t=og.getState(e))?void 0:t.set}}});function of(){let e,t,n=(0,o.c)(4),r=iu();if(n[0]!==r){t=Symbol.for("react.early_return_sentinel");e:{var a;let i,o=null==(a=og.getState(r))?void 0:a.element;if(!o){t=null;break e}n[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,H.jsx)(op,{}),n[3]=i):i=n[3],e=(0,e0.createPortal)(i,o)}n[0]=r,n[1]=e,n[2]=t}else e=n[1],t=n[2];return t!==Symbol.for("react.early_return_sentinel")?t:e}let om=(0,s.createContext)({id:""}).Provider,ob=(0,u.AH)({flex:1,height:"auto",minHeight:u.Bk.size.scale[2e3],minWidth:0,outline:0,padding:u.Bk.size.space.medium,'[data-layout="main"] > div > &':{boxSizing:"border-box",height:"100%",padding:0,paddingTop:u.Bk.size.space.medium,minHeight:0,minWidth:0,maxWidth:800,marginInline:"auto",[u.C3.above.mobile]:{padding:u.Bk.size.space.xlarge},[u.C3.above.tablet]:{padding:u.Bk.size.space.xxlarge},'&[data-container="wide"]':{padding:u.Bk.size.scale[600]}}}),oy=(0,s.forwardRef)(function(e,t){var n;let r,a,i,l,p,h,g,f,m,b,y,k,x,v,w,S,E,j,A,N,B,R,C=(0,o.c)(46);C[0]!==e?({value:r,onChange:a,...i}=e,C[0]=e,C[1]=r,C[2]=a,C[3]=i):(r=C[1],a=C[2],i=C[3]);let[I,T]=(0,s.useState)(r);"yjs"in a&&(null==(n=eO.pJ.getState(I))?void 0:n.type)!==a.yjs()&&T(r);let O=tZ(),P=(0,V.aW)(),_="main"===O?"medium":"regular";C[4]!==O||C[5]!==P?(l=(0,u.Pn)({layout:O,container:P}),C[4]=O,C[5]=P,C[6]=l):l=C[6],C[7]!==_||C[8]!==l?(p={size:_,UNSAFE_className:ob,...l},C[7]=_,C[8]=l,C[9]=p):p=C[9];let F=(0,d.u$)(p);eO.S6.getState(r)?(h=null!=I?I:r,g=T):(h=r,g=a);let M=(0,s.useId)();return C[10]!==M?(m={id:M},C[10]=M,C[11]=m):m=C[11],f=m,C[12]!==M?(b=`keystatic-editor-root-${M}`,C[12]=M,C[13]=b):b=C[13],(C[14]===Symbol.for("react.memo_cache_sentinel")?(y=(0,u.AH)(aP,{'&[data-layout="main"]':{flex:1,display:"flex",flexDirection:"column"},'&:not([data-layout="main"])':{border:`${u.Bk.size.border.regular} solid ${u.Bk.color.border.neutral}`,borderRadius:u.Bk.size.radius.medium}}),C[14]=y):y=C[14],C[15]!==M)?(k=`keystatic-editor-toolbar-${M}`,C[15]=M,C[16]=k):k=C[16],(C[17]!==k?(x=(0,H.jsx)(i0,{id:k,"data-keystatic-editor":"toolbar"}),C[17]=k,C[18]=x):x=C[18],C[19]!==M)?(v=`keystatic-editor-content-${M}`,C[19]=M,C[20]=v):v=C[20],C[21]!==i||C[22]!==F||C[23]!==v?(w=(0,H.jsx)("div",{children:(0,H.jsx)(im,{...i,...F,role:"textbox","aria-multiline":"true",id:v,"data-keystatic-editor":"content"})}),C[21]=i,C[22]=F,C[23]=v,C[24]=w):w=C[24],C[25]!==b||C[26]!==O||C[27]!==x||C[28]!==w?(S=(0,H.jsxs)(c.az,{id:b,"data-keystatic-editor":"root","data-layout":O,backgroundColor:"canvas",minWidth:0,UNSAFE_className:y,children:[x,w]}),C[25]=b,C[26]=O,C[27]=x,C[28]=w,C[29]=S):S=C[29],C[30]!==h?(E=(0,H.jsx)(oo,{state:h}),C[30]=h,C[31]=E):E=C[31],C[32]===Symbol.for("react.memo_cache_sentinel")?(j=(0,H.jsx)(of,{}),C[32]=j):j=C[32],C[33]!==h?(A=(0,H.jsx)(iZ,{state:h}),C[33]=h,C[34]=A):A=C[34],C[35]===Symbol.for("react.memo_cache_sentinel")?(N=(0,H.jsx)(iE,{}),C[35]=N):N=C[35],C[36]!==h||C[37]!==g||C[38]!==t||C[39]!==S||C[40]!==E||C[41]!==A?(B=(0,H.jsxs)(ik,{value:h,onChange:g,ref:t,children:[S,E,j,A,N]}),C[36]=h,C[37]=g,C[38]=t,C[39]=S,C[40]=E,C[41]=A,C[42]=B):B=C[42],C[43]!==f||C[44]!==B?(R=(0,H.jsx)(om,{value:f,children:B}),C[43]=f,C[44]=B,C[45]=R):R=C[45],R}),ok=[],ox=aR(e=>e.isTextblock?function(e){if(!e.type.spec.code||!e.childCount)return ok;let t=e.content.child(0).text;if(!t)return ok;let n=e.attrs.language;if("string"!=typeof n)return ok;let r=(n=n.trim()).indexOf(" ");if(-1!==r&&(n=n.slice(0,r)),n=n.toLowerCase(),!Object.prototype.hasOwnProperty.call(tY.languages,n))return ok;let a=tY.languages[n];if("object"!=typeof a)return ok;let i=[];return!function e(t,n){for(let r of n){let n=t+function e(t){return"string"==typeof t?t.length:Array.isArray(t.content)?t.content.reduce((t,n)=>t+e(n),0):e(t.content)}(r);if("string"!=typeof r){let a=ov.get(r.type);a&&i.push({attrs:{class:a},from:t,to:n}),e(t,Array.isArray(r.content)?r.content:[r.content])}t=n}}(0,tY.tokenize(t,a)),i}(e):function(e){let t=0,n=[];for(let r=0;r<e.childCount;r++){let a=e.child(r),i=ox(a);if(!i.length){t+=a.nodeSize;continue}let o=t+1;for(let e of i)n.push({attrs:e.attrs,from:e.from+o,to:e.to+o});t+=a.nodeSize}return n}(e.content)),ov=new Map([{types:["comment","prolog","doctype","cdata"],style:{color:u.Bk.color.foreground.neutralTertiary,fontStyle:"italic"}},{types:["atrule","attr-name","class-name","selector"],style:{color:u.Bk.color.scale.amber11}},{types:["boolean","constant","inserted-sign","entity","inserted","number","regex","symbol","variable"],style:{color:u.Bk.color.scale.green11}},{types:["attr-value","builtin","char","constant","generics","url"],style:{color:u.Bk.color.scale.pink11}},{types:["string"],style:{color:u.Bk.color.scale.indigo9}},{types:["annotation","deleted","deleted-sign","decorator","important","tag"],style:{color:u.Bk.color.scale.red11}},{types:["function","function-variable","operator"],style:{color:u.Bk.color.scale.purple11}},{types:["tag","selector","keyword"],style:{color:u.Bk.color.scale.indigo11}},{types:["punctuation"],style:{color:u.Bk.color.foreground.neutralSecondary}}].flatMap(e=>{let t=(0,u.AH)(e.style);return e.types.map(e=>[e,t])})),ow="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),oS=(e,t,n)=>{let{$head:r,$anchor:a}=e.selection;return!!r.parent.type.spec.code&&!!r.sameParent(a)&&(0,p.st)(p.Z1,p.iz,p.aw)(e,t,n
105)},oE=(e,t)=>{let{$from:n,to:r}=e.selection,a=n.sharedDepth(r);if(0===a)return!1;let i=function(e,t){for(let n=t;n>0;n--){let t=e.before(n),r=e.doc.nodeAt(t);if(r&&!1!==r.type.spec.selectable)return t}}(n,a);return void 0!==i&&(t&&t(e.tr.setSelection(h.nh.create(e.doc,i))),!0)};class oj{cursorPos=null;element=null;constructor(e,t){var n;this.editorView=e,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,a;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),i=e?r.bottom:r.top;e&&t&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),a={left:r.left,right:r.right,top:i-this.width/2,bottom:i+this.width/2}}}}if(!a){let e=this.editorView.coordsAtPos(this.cursorPos);a={left:e.left-this.width/2,right:e.left+this.width/2,top:e.top,bottom:e.bottom}}let i=this.editorView.dom.offsetParent;if(!this.element&&(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),i&&(i!=document.body||"static"!=getComputedStyle(i).position)){let n=i.getBoundingClientRect();e=n.left-i.scrollLeft,t=n.top-i.scrollTop}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=a.left-e+"px",this.element.style.top=a.top-t+"px",this.element.style.width=a.right-a.left+"px",this.element.style.height=a.bottom-a.top+"px"}scheduleRemoval(e){void 0!==this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,a="function"==typeof r?r(this.editorView,t,e):r;if(t&&!a){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,g.Um)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}let oA=(0,e2.K)({ArrowLeft:oN("horiz",-1),ArrowRight:oN("horiz",1),ArrowUp:oN("vert",-1),ArrowDown:oN("vert",1)});function oN(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,a){let i=e.selection,o=t>0?i.$to:i.$from,l=i.empty;if(i instanceof h.U3){if(!a.endOfTextblock(n)||0==o.depth)return!1;l=!1,o=e.doc.resolve(t>0?o.after():o.before())}let s=az.findGapCursorFrom(o,t,l);return!!s&&(r&&r(e.tr.setSelection(new az(s))),!0)}}function oB(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!az.valid(r))return!1;let a=e.posAtCoords({left:n.clientX,top:n.clientY});return!(a&&a.inside>-1&&h.nh.isSelectable(e.state.doc.nodeAt(a.inside)))&&(e.dispatch(e.state.tr.setSelection(new az(r))),!0)}function oR(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof az))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let a=U.FK.empty;for(let e=r.length-1;e>=0;e--)a=U.FK.from(r[e].createAndFill(null,a));let i=e.state.tr.replace(n.pos,n.pos,new U.Ji(a,0,0));return i.setSelection(h.U3.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function oC(e){if(!(e.selection instanceof az))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",eY.zF.create(e.doc,[eY.NZ.widget(e.selection.head,t,{key:"gapcursor"})])}function oI(e,t){let n=e.state;if(e.composing||!(n.selection instanceof h.U3))return!1;let{$cursor:r}=n.selection;if(!r)return!1;let a=function(e,t,n,r){let a=e.doc.resolve(t);if(a.parent.type.spec.code)return;let i=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"");for(let a of r){let r=a.pattern.exec(i);if(!r)continue;let o=t-r[0].length,l=a.handler(e,r,o,n);if(l)return l}}(n,r.pos,r.pos,t);if(!a)return!1;let i=eO.Mj.getState(e.state);return i?(i.undoManager.stopCapturing(),e.dispatch(a)):e.dispatch((0,e1.xq)(a)),!0}function oT(e,t=null,n){return(r,a,i,o)=>{let l=t instanceof Function?t(a):t,s=r.tr.delete(i,o),c=s.doc.resolve(i).blockRange(),d=c&&(0,g.oM)(c,e,l);if(!d)return null;s.wrap(c,d);let u=s.doc.resolve(i-1).nodeBefore;return u&&u.type==e&&(0,g.n9)(s.doc,i-1)&&(!n||n(a,u))&&s.join(i-1),s}}
105function oO(e,t=null){return(n,r,a,i)=>{let o=n.doc.resolve(a),l=t instanceof Function?t(r):t;return!1!==l&&o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e)?n.tr.delete(a,i).setBlockType(a,a,e,l):null}}let oP=new Map([["bold",["**","__"]],["italic",["*","_"]],["strikethrough",["~~"]],["code",["`"]]]),o_=Object.entries({"...":"…","--\x3e":"→","->":"→","<-":"←","<--":"←","--":"–","(c)":"\xa9","(r)":"\xae","(tm)":"™"}).map(([e,t])=>({pattern:RegExp(`(${e3(e)})\\s$`),handler:(e,n,r,a)=>{let i=t;if(n[1]){let e=n[0].lastIndexOf(n[1]);i+=n[0].slice(e+n[1].length);let t=(r+=e)-a;t>0&&(i=n[0].slice(e-t,e)+i,r=a)}return e.tr.insertText(i,r,a)}}));function oF(e,t,n,r){let a=!0;return e.nodesBetween(t,n,e=>{e.isText||e.type.allowsMarkType(r)||(a=!1)}),a}function oM(e){return e===(0,em.Jf)(e)}let oD=/^https?:\/\//;function oL(e,t,n,r){let a=[],i=0,o=[],l="";function s(){let e=a;for(let t=0;t<i;t++){let t=e[e.length-1];if(!("children"in t))throw Error("Expected children in last element");e=t.children}return e}let c=(a,c,d)=>{var u;let p=a?a.marks:[],h=l;if(l="",null!=(u=a)&&u.isText&&p.some(e=>o$(e.type)&&!e.isInSet(o))){let[,e,t]=/^(\s*)(.*)$/m.exec(a.text);e&&(h+=e,(a=t?a.withText(t):null)||(p=o))}if(a&&a.isText&&p.some(t=>o$(t.type)&&(d==e.childCount-1||!t.isInSet(e.child(d+1).marks)))){let[,e,t]=/^(.*?)(\s*)$/m.exec(a.text);t&&(l=t,(a=e?a.withText(e):null)||(p=o))}t:for(let[e,t]of p.entries())if(oz(t.type))for(let[n,r]of o.entries()){if(!oz(r.type))break;if(t.eq(r)){e>n?p=p.slice(0,n).concat(t).concat(p.slice(n,e)).concat(p.slice(e+1,p.length)):n>e&&(p=p.slice(0,e).concat(p.slice(e+1,n)).concat(t).concat(p.slice(n,p.length)));continue t}}let g=0;for(;g<Math.min(o.length,p.length)&&p[g].eq(o[g]);)++g;for(;g<o.length;){let e=o.pop();e.type!==ic(e.type.schema).marks.code&&i--}if(h&&s().push(t(h)),a){for(;o.length<p.length;){let e=p[o.length];o.push(e);let t=r(e);t&&(s().push(t),i++)}let e=n(a);e&&s().push(e)}};return e.forEach(c),c(null,0,e.childCount),a}function o$(e){let t=ic(e.schema);return e===t.marks.bold||e===t.marks.italic||e===t.marks.strikethrough}function oz(e){let t=ic(e.schema);return e===t.marks.bold||e===t.marks.italic||e===t.marks.strikethrough||e===t.marks.link}function oU(e,t){let n=e=>(function(e,t){let n=[];return e.forEach(e=>{n.push(oU(e,t))}),n})(e,t),r=e=>[new i.Jf.Node("inline",{},oL(e,e=>new i.Jf.Node("text",{content:e}),e=>(function(e,t){let{schema:n}=t;if(e.type===n.nodes.hard_break)return new i.Jf.Node("hardbreak");if(e.type===n.nodes.image){let{src:n,filename:r}=e.attrs;if("object"==typeof t.schema.config.image&&"string"==typeof t.schema.config.image.directory){let e=(0,V.a_)(t.schema.config.image.directory);t.otherFiles.has(e)||t.otherFiles.set(e,new Map),t.otherFiles.get(e).set(r,n)}else t.extraFiles.set(r,n);return new i.Jf.Node("image",{src:encodeURI(`${ix(t.schema.config,t.slug)}${e.attrs.filename}`),alt:e.attrs.alt,title:e.attrs.title})}let r=t.schema.components[e.type.name];if((null==r?void 0:r.kind)==="inline"){let n=new i.Jf.Node("tag",aG(r.schema,e.attrs.props,t),[],e.type.name);return n.inline=!0,n}if(void 0!==e.text)return new i.Jf.Node(e.marks.some(e=>e.type===n.marks.code)?"code":"text",{content:e.text})})(e,t),e=>(function(e,t){let n,{schema:r}=t;if(e.type===r.marks.code)return;let a=r.components[e.type.name];if(a){let n=new i.Jf.Node("tag",aG(a.schema,e.attrs.props,t),[],e.type.name);return n.inline=!0,n}return(e.type===r.marks.bold&&(n="strong"),e.type===r.marks.italic&&(n="em"),e.type===r.marks.strikethrough&&(n="s"),n)?new i.Jf.Node(n,{},[]):e.type===r.marks.link?new i.Jf.Node("link",{href:e.attrs.href,title:e.attrs.title}):void 0})(e,t)))],a=ic(e.type.schema);if(e.type===a.nodes.doc)return new i.Jf.Node("document",{},n(e.content));if(e.type===a.nodes.paragraph)return new i.Jf.Node("paragraph",{},r(e.content));if(e.type===a.nodes.blockquote)return new i.Jf.Node("blockquote",{},n(e.content));if(e.type===a.nodes.divider)return new i.Jf.Node("hr");if(e.type===a.nodes.table){let t=n(e.content),r=new i.Jf.Node("thead",{},[]);"th"===t[0].children[0].type&&r.children.push(t.shift());let a=new i.Jf.Node("tbody",{},t);return new i.Jf.Node("tag",{},[new i.Jf.Node("table",{},[r,a])],"table")}if(e.type===a.nodes.table_row)return new i.Jf.Node("tr",{},n(e.content));if(e.type===a.nodes.table_header)return new i.Jf.Node("th",{},n(e.content));if(e.type===a.nodes.table_cell)return new i.Jf.Node("td",{},n(e.content));if(e.type===a.nodes.heading){let n=aG(a.config.heading.schema,e.attrs.props,t),o=new i.Jf.Node("heading",{level:e.attrs.level,...n},r(e.content));for(let[e,t]of Object.entries(n))o.annotations.push({name:e,value:t,type:"attribute"});return o}if(e.type===a.nodes.code_block){let n=aG(a.config.codeBlock.schema,e.attrs.props,t),o=new i.Jf.Node("fence","string"==typeof e.attrs.language&&"plain"!==e.attrs.language?{language:e.attrs.language,content:e.textBetween(0,e.content.size)+"\n",...n}:{content:e.textBetween(0,e.content.size)+"\n",...n},r(e.content));for(let[e,t]of Object.entries(n))o.annotations.push({name:e,value:t,type:"attribute"});return o}if(e.type===a.nodes.list_item){let t=n(e.content);return 1===t.length&&"paragraph"===t[0].type?t=t[0].children:2===t.length&&"paragraph"===t[0].type&&1===t[0].children.length&&"list"===t[1].type&&(t=[t[0].children[0],t[1]]),new i.Jf.Node("item",{},t)}if(e.type===a.nodes.ordered_list)return new i.Jf.Node("list",{ordered:!0,start:e.attrs.start},n(e.content));if(e.type===a.nodes.unordered_list)return new i.Jf.Node("list",{ordered:!1},n(e.content));
105let o=e.type.name,l=a.components[o];if(l){let r="wrapper"===l.kind||"repeating"===l.kind?n(e.content):[];return new i.Jf.Node("tag",aG(l.schema,e.attrs.props,t),r,o)}return new i.Jf.Node("paragraph",{},r(e.content))}function oK(){if(!r)throw Error("state not set");return r}function oq(){return oK().schema}function oV(e){oK().errors.push(e)}function oH(e,t){let n=[];for(let r of e){let e=oX(r,t);e&&(Array.isArray(e)?n.push(...e):n.push(e))}return n}function oG(e,t){return oV({error:{id:"unspecified-type",level:"critical",message:`${e.type} is not allowed`},lines:e.lines,type:e.type,location:e.location}),oH(e.children,t)}function oW(e,t,n){let r=oH(e.children,t),a=t.createAndFill(n,r);return a||oV({error:{id:"unexpected-children",level:"critical",message:`${e.type} has unexpected children`},lines:e.lines,type:e.type,location:e.location}),a}function oY(e,t,n){return t?function(e,t){let n=oK(),r=n.marks;n.marks=e.addToSet(n.marks);try{return t()}finally{n.marks=r}}(t instanceof U.sX?t.create():t,()=>oH(e.children,n)):oG(e,n)}function oJ(e,t,n,a,i){r={schema:t,errors:[],marks:[],extraFiles:null!=n?n:new Map,otherFiles:null!=a?a:new Map,slug:i};try{let t=oX(e,void 0);if(r.errors.length)throw Error(r.errors.map(e=>e.lines[0]+":"+e.error.message).join("\n"));if(!(t instanceof U.bP))throw Error("unexpected node");return t}finally{r=void 0}}function oZ(e,t){let n=oq(),r=[];for(let t of e.children){let e=oX(t,n.nodes.paragraph);if(e){if(!Array.isArray(e)){if(e.isInline){r.push(n.nodes.paragraph.createAndFill({},e));continue}r.push(e);continue}if("inline"===t.type){r.push(n.nodes.paragraph.createAndFill({},e));continue}r.push(...e)}}let a=t.createAndFill({},r);return a||oV({error:{id:"unexpected-children",level:"critical",message:`${e.type} has unexpected children`},lines:e.lines,type:e.type,location:e.location}),a}function oX(e,t){var n,r,a;if(e.errors.length){for(let t of e.errors)oV({error:t,lines:e.lines,type:e.type,location:e.location});return null}if("error"===e.type)return oV({error:{id:"error-node",level:"critical",message:"Unexpected error node without errors"},lines:e.lines,type:e.type,location:e.location}),null;let i=oq();if("inline"===e.type)return oH(e.children,t);if("em"===e.type)return oY(e,i.marks.italic,t);if("code"===e.type)return i.marks.code?i.schema.text(e.attributes.content,[...oK().marks,i.marks.code.create()]):oG(e,t);if("s"===e.type)return oY(e,i.marks.strikethrough,t);if("strong"===e.type)return oY(e,i.marks.bold,t);if("softbreak"===e.type)return i.schema.text("\n");if("hardbreak"===e.type)return i.nodes.hard_break?i.nodes.hard_break.create():oG(e,t);if("blockquote"===e.type)return i.nodes.blockquote?oW(e,i.nodes.blockquote,{}):oG(e,t);if("heading"===e.type){if(!i.nodes.heading)return oG(e,t);let{level:n,...r}=e.attributes,a=oK(),o=a.schema.config.heading.schema;return oW(e,i.nodes.heading,{level:e.attributes.level,props:aV(aq(o,r,a),o)})}if("paragraph"===e.type)return oW(e,i.nodes.paragraph,{});if("comment"===e.type)return[];if("document"===e.type)return oW(e,i.nodes.doc,{});if("fence"===e.type){if(!i.nodes.code_block)return oG(e,t);let{language:n,content:r,...a}=e.attributes,o=oK(),l=o.schema.config.codeBlock.schema;return r=r.slice(0,-1),i.nodes.code_block.createAndFill({language:"string"==typeof e.attributes.language?e.attributes.language:"",props:aV(aq(l,a,o),l)},r?i.schema.text(r):void 0)}if("hr"===e.type)return i.nodes.divider?oW(e,i.nodes.divider,{}):oG(e,t);if("link"===e.type)return oY(e,null==(n=i.marks.link)?void 0:n.create({href:e.attributes.href}),t);
105if("text"===e.type)return i.schema.text(e.attributes.content,oK().marks);if("item"===e.type)return i.nodes.list_item?oZ(e,i.nodes.list_item):oG(e,t);if("list"===e.type){let n=e.attributes.ordered?i.nodes.ordered_list:i.nodes.unordered_list;return n?oW(e,n,e.attributes.ordered&&void 0!==e.attributes.start?{start:e.attributes.start}:{}):oG(e,t)}if("table"===e.type)return i.nodes.table?oW(e,i.nodes.table,{}):oG(e,t);if("tbody"===e.type||"thead"===e.type)return oH(e.children,t);if("tr"===e.type)return i.nodes.table_row?oW(e,i.nodes.table_row,{}):oG(e,t);if("th"===e.type)return i.nodes.table_header?oZ(e,i.nodes.table_header):oG(e,t);if("td"===e.type)return i.nodes.table_cell?oZ(e,i.nodes.table_cell):oG(e,t);if("tag"===e.type&&e.tag){if("table"===e.tag)return oX(e.children[0],t);let n=i.components[e.tag];if(n){let r=oK(),a=aq(n.schema,e.attributes,r);if("mark"===n.kind)return oY(e,i.schema.marks[e.tag].create({props:aV(a,n.schema)}),t);let o=i.schema.nodes[e.tag],l=oH(e.children,o),s=o.createAndFill({props:aV(a,n.schema)},l);return(s||oV({error:{id:"unexpected-children",level:"critical",message:`${e.type} has unexpected children`},lines:e.lines,type:e.type,location:e.location}),"inline"!==n.kind||null!=t&&t.isTextblock)?s:i.nodes.paragraph.createAndFill({},s)}return oV({error:{id:"unspecified-type",level:"critical",message:`Missing component definition for ${e.tag}`},lines:e.lines,type:e.type,location:e.location}),oH(e.children,t)}if("image"===e.type){let t=ix(i.config,oK().slug),n=decodeURIComponent(e.attributes.src).slice(t.length),o=null==(r="object"==typeof i.config.image&&"string"==typeof i.config.image.directory?oK().otherFiles.get((0,V.a_)(i.config.image.directory)):oK().extraFiles)?void 0:r.get(n);return o&&i.nodes.image?i.nodes.image.createChecked({src:o,alt:e.attributes.alt,title:e.attributes.title,filename:n}):i.schema.text(`![${e.attributes.alt||""}](${e.attributes.src||""}${null!=(a=e.attributes.title)&&a.length?` "${e.attributes.title}"`:""})`)}return oV({error:{id:"unhandled-type",level:"critical",message:`Unhandled type ${e.type}`},lines:e.lines,type:e.type,location:e.location}),null}let oQ=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i,o0=e=>{let t=document.createElement("span");t.classList.add("ProseMirror-yjs-cursor"),t.style.borderColor=e.color;let n=document.createElement("div");return n.style.backgroundColor=e.color,n.insertBefore(document.createTextNode(e.name),null),t.insertBefore(n,null),t};function o1(e,t,n,r,a){let o=ic(e.type.schema);return h.$t.create({selection:t,storedMarks:n,plugins:[function(e){if(!e.marks.link)return new h.k_({});let t=e.marks.link;return new h.k_({props:{transformPasted(n){var r,a;return 1===n.content.childCount&&(null==(r=n.content.firstChild)?void 0:r.type)===e.nodes.paragraph&&(null==(a=n.content.firstChild.firstChild)?void 0:a.text)!==void 0&&oD.test(n.content.firstChild.firstChild.text)&&oM(n.content.firstChild.firstChild.text)&&0===n.content.firstChild.firstChild.marks.length?U.Ji.maxOpen(U.FK.from(e.nodes.paragraph.createChecked(null,e.schema.text(n.content.firstChild.firstChild.text,[t.create({href:n.content.firstChild.firstChild.text,title:""})])))):n},handlePaste(n,r){var a,i,o;let l,s=null==(a=r.clipboardData)?void 0:a.getData("text/plain");if(s&&oD.test(s)&&oM(s)&&!n.state.selection.empty&&n.state.selection.$from.parent===n.state.selection.$to.parent&&(i=n.state.selection.$from,o=n.state.selection.$to,l=!1,i.doc.nodesBetween(i.pos,o.pos,t=>{if(t.marks.some(t=>t.type===e.marks.link))return l=!0,!1}),!l)){let{tr:e}=n.state;return e.addMark(n.state.selection.from,n.state.selection.to,t.create({href:s,title:""})),n.dispatch(e),!0}return!1}}})}(o),function(e){let t=e.nodes.image;return new h.k_({props:{handleDrop(n,r){var a;if(null!=(a=r.dataTransfer)&&a.files.length){let a=r.dataTransfer.files[0],i=n.posAtCoords({left:r.clientX,top:r.clientY});if(!i)return;let o=n.state.doc.resolve(i.pos);for(let[t,r]of Object.entries(e.components)){if("block"!==r.kind&&"inline"!==r.kind||!r.handleFile)continue;let i=r.handleFile(a,n.props.config);if(i)return(async()=>{let a=await i,o=U.Ji.maxOpen(U.FK.from(e.schema.nodes[t].createChecked({props:aV(a,r.schema)}))),l=(0,g.Um)(n.state.doc,n.state.selection.from,o);null!==l&&n.dispatch(n.state.tr.replace(l,l,o))})(),!0}if(a.type.startsWith("image/")&&t&&e.config.image){let{transformFilename:r}=e.config.image;return(async()=>{let e=U.Ji.maxOpen(U.FK.from(t.createChecked({src:new Uint8Array(await a.arrayBuffer()),filename:r(a.name)}))),i=(0,g.Um)(n.state.doc,o.pos,e);null!==i&&n.dispatch(n.state.tr.replace(i,i,e))})(),!0}}},handlePaste(n,r){var a;if(null!=(a=r.clipboardData)&&a.files.length){let a=r.clipboardData.files[0];for(let[t,r]of Object.entries(e.components)){if("block"!==r.kind||!r.handleFile)continue;let i=r.handleFile(a,n.props.config);if(i)return(async()=>{let a=await i;
105n.dispatch(n.state.tr.replaceSelectionWith(e.schema.nodes[t].createChecked({props:aV(a,r.schema)})))})(),!0}if(a.type.startsWith("image/")&&t&&e.config.image){let{transformFilename:r}=e.config.image;return(async()=>{n.dispatch(n.state.tr.replaceSelectionWith(t.createChecked({src:new Uint8Array(await a.arrayBuffer()),filename:r(a.name)})))})(),!0}}}}})}(o),new h.k_({key:iI,state:{init:()=>new Set,apply:(e,t)=>t},props:{handleKeyDown(e,t){let n=iI.getState(e.state);if(!n)return!1;for(let e of n)if(e.fn(t))return!0;return!1}}}),...r&&a?[(0,e_.YZ)(r),(0,eF.Tr)(a,{cursorBuilder:o0,awarenessStateFilter(e,t,n){let r=a.getLocalState();return e!==t&&n.location===(null==r?void 0:r.location)&&n.branch===(null==r?void 0:r.branch)}}),(0,eP.$J)()]:[(0,e1.b6)()],function(e={}){return new h.k_({view:t=>new oj(t,e)})}({color:u.Bk.color.alias.borderSelected,width:2}),function({rules:e,enterRules:t}){return new h.k_({props:{handleTextInput:t=>(setTimeout(()=>{oI(t,e)}),!1),handleKeyDown:(e,n)=>"Enter"===n.key&&oI(e,t),handleDOMEvents:{compositionend:t=>{setTimeout(()=>{oI(t,e)})}}}})}({rules:function({nodes:e,marks:t,config:n}){let r=[...o_];for(let[a,i]of(e.blockquote&&r.push({pattern:/^\s*>\s$/,handler:oT(e.blockquote)}),e.ordered_list&&r.push({pattern:/^\s*(\d+)(?:\.|\))\s$/,handler:oT(e.ordered_list,e=>({start:parseInt(e[1],10)}))}),e.unordered_list&&r.push({pattern:/^\s*([-+*])\s$/,handler:oT(e.unordered_list)}),e.code_block&&r.push({pattern:/^```(\w+)?\s$/,handler:oO(e.code_block,e=>{var t;return{language:null!=(t=e[1])?t:""}})}),e.divider&&r.push({pattern:/^---$/,handler:function(e,t=null){return(n,r,a,i)=>{let o=n.doc.resolve(a),l=t instanceof Function?t(r):t;return o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e)?n.tr.delete(a,i).replaceSelectionWith(e.createAndFill(l)):null}}(e.divider)}),e.heading&&r.push({pattern:/^(#{1,6})\s$/,handler:oO(e.heading,e=>n.heading.levels.includes(e[1].length)?{level:e[1].length}:null)}),oP)){let e=t[a];for(let t of i)e&&r.push({pattern:RegExp(`${"_"===t[0]?"(?:^|\\s)":"*"===t?"(?:^|[^\\*])":""}${e3(t)}([^${e3(t[0])}\\s]|(?:[^${e3(t[0])}\\s].*[^\\s]))${e3(t)}$`),handler:(n,[,r],a,i)=>{let o=i-r.length-2*t.length;if(!oF(n.doc,o,i,e))return null;let l=n.tr;return l.addMark(o+t.length,i-t.length,e.create()),l.delete(i-t.length,i),l.delete(o,o+t.length),l.removeStoredMark(e),l}})}let a=t.link;return a&&r.push({pattern:/(?:^|[^!])\[(.*)\]\((.*)\)$/,handler(e,[,t,n],r,i){let o=i-n.length-t.length-4;if(!oF(e.doc,o,i,a))return null;let l=e.tr;return l.addMark(o,i,a.create({href:n})),l.delete(o+1+t.length,i),l.delete(o,o+1),l.removeStoredMark(a),l}}),r.push(iF),r}(o),enterRules:function({nodes:e}){let t=[];return e.code_block&&t.push({pattern:/^```(\w+)?$/,handler:oO(e.code_block,e=>{var t;return{language:null!=(t=e[1])?t:""}})}),t}(o)}),new h.k_({props:{decorations:oC,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&az.valid(n)?new az(n):null,handleClick:oB,handleKeyDown:oA,handleDOMEvents:{beforeinput
105:oR}}}),(0,e2.w)(function({nodes:e,marks:t,config:n},r){let a={},i=(e,t)=>{a[e]?a[e]=(0,p.st)(a[e],t):a[e]=t};if(e.list_item){var o,l;i("Enter",(o=e.list_item,function(e,t){let{$from:n,$to:r,node:a}=e.selection;if(a&&a.isBlock||n.depth<2||!n.sameParent(r))return!1;let i=n.node(-1);if(i.type!=o)return!1;if(0==n.parent.content.size&&n.node(-1).childCount==n.indexAfter(-1)){if(3==n.depth||n.node(-3).type!=o||n.index(-2)!=n.node(-2).childCount-1)return!1;if(t){let r=U.FK.empty,a=n.index(-1)?1:n.index(-2)?2:3;for(let e=n.depth-a;e>=n.depth-3;e--)r=U.FK.from(n.node(e).copy(r));let i=n.indexAfter(-1)<n.node(-2).childCount?1:n.indexAfter(-2)<n.node(-3).childCount?2:3;r=r.append(U.FK.from(o.createAndFill()));let l=n.before(n.depth-(a-1)),s=e.tr.replace(l,n.after(-i),new U.Ji(r,4-a,0)),c=-1;s.doc.nodesBetween(l,s.doc.content.size,(e,t)=>{if(c>-1)return!1;e.isTextblock&&0==e.content.size&&(c=t+1)}),c>-1&&s.setSelection(h.LN.near(s.doc.resolve(c))),t(s.scrollIntoView())}return!0}let l=r.pos==n.end()?i.contentMatchAt(0).defaultType:null,s=e.tr.delete(n.pos,r.pos),c=l?[null,{type:l}]:void 0;return!!(0,g.zy)(s.doc,n.pos,2,c)&&(t&&t(s.split(n.pos,2,c).scrollIntoView()),!0)})),i("Tab",(l=e.list_item,function(e,t){let{$from:n,$to:r}=e.selection,a=n.blockRange(r,e=>e.childCount>0&&e.firstChild.type==l);if(!a)return!1;let i=a.startIndex;if(0==i)return!1;let o=a.parent,s=o.child(i-1);if(s.type!=l)return!1;if(t){let n=s.lastChild&&s.lastChild.type==o.type,r=U.FK.from(n?l.create():null),i=new U.Ji(U.FK.from(l.create(null,U.FK.from(o.type.create(null,r)))),n?3:1,0),c=a.start,d=a.end;t(e.tr.step(new g.Wg(c-(n?3:1),d,c,d,i,1,!0)).scrollIntoView())}return!0})),i("Shift-Tab",aL(e.list_item))}i("Enter",(0,p.st)(p.pC,p.Z1,p.iz,p.aw));let s=(0,p.st)(p.ic,p.Qv,p._e),c=(0,p.st)(p.ic,p.eT,p.Sd);i("Backspace",s),i("Mod-Backspace",s),i("Shift-Backspace",s),i("Delete",c),i("Mod-Delete",c),i("Mod-a",p.Ub),ow&&(i("Ctrl-h",s),i("Alt-Backspace",s),i("Ctrl-d",c),i("Ctrl-Alt-Backspace",c),i("Alt-Delete",c),i("Alt-d",c),i("Ctrl-a",p.$f),i("Ctrl-e",p.ec)),i("Mod-z",r?eP.tN:e1.tN),i("Shift-Mod-z",r?eP.ZS:e1.ZS),ow&&i("Mod-y",r?eP.ZS:e1.ZS);let d=["Mod-Enter","Shift-Enter"];for(let t of(ow&&d.push("Ctrl-Enter"),d))i(t,oS),e.hard_break&&i(t,function(e){return(t,n)=>(n&&n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0)}(e.hard_break));for(let e of Object.values(t))if(e.spec.shortcuts){if(Array.isArray(e.spec.shortcuts)){for(let t of e.spec.shortcuts){if("string"!=typeof t)throw Error(`Invalid shortcut for mark ${e.name}`);i(t,(0,p.wh)(e))}continue}throw Error(`Invalid shortcuts for mark ${e.name}`)}if(i("Alt-ArrowUp",p.G2),i("Alt-ArrowDown",p.bh),i("Escape",oE),e.unordered_list&&i("Shift-Ctrl-8",aD(e.unordered_list)),e.ordered_list&&i("Shift-Ctrl-9",aD(e.ordered_list)),i("Shift-Ctrl-0",(0,p.y_)(e.paragraph)),e.heading)for(let t of n.heading.levels)i(`Shift-Ctrl-${t}`,(0,p.y_)(e.heading,{level:t}));return a}(o,!!(r&&a))),new h.k_({props:{clipboardTextSerializer(e,t){try{return(0,i.GP)(oU(t.state.doc.type.create({},e.content),{otherFiles:new Map,extraFiles:new Map,schema:ic(t.state.schema),slug:void 0}))}catch(t){return console.log("failed to serialize clipboard text as markdoc",t),e.content.textBetween(0,e.content.size,"\n\n")}},clipboardTextParser(e,t,n,r){try{return U.Ji.maxOpen(oJ((0,i.qg)(e),ic(r.state.schema),void 0,void 0,void 0).content)}catch(n){return console.log("failed to parse clipboard text as markdoc",n),function(e,t,n,r){let a=t.marks(),{schema:i}=r.state,o=U.ZF.fromSchema(i),l=document.createElement("div");return e.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=l.appendChild(document.createElement("p"));e&&t.appendChild(o.serializeNode(i.text(e,a)))}),(r.someProp("clipboardParser")||r.someProp("domParser")||U.S4.fromSchema(r.state.schema)).parseSlice(l,{preserveWhitespace:!0,context:t,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||oQ.test(e.parentNode.nodeName)?null:{ignore:!0}})}(e,t,0,r)}},handlePaste(e,t){if(e.props.editable&&!e.props.editable(e.state)||!t.clipboardData)return!1;let n=t.clipboardData.getData("text/html");if(n&&function(e){let t=new globalThis.DOMParser().parseFromString(e,"text/html"),n=t.body.firstElementChild;if(1!==t.body.childElementCount||(null==n?void 0:n.tagName)!=="DIV"||!(n instanceof HTMLElement)||!n.style.fontFamily.includes("monospace"))return!1;for(let e of n.children)if("BR"!==e.tagName){if("DIV"!==e.tagName)return!1;for(let t of e.children)if("SPAN"!==t.tagName)return!1}return!0}(n)){let n=t.clipboardData.getData("text/plain");return e.pasteText(n),!0}return!1}}}),new h.k_({props:{decorations(e){let t,n,r=[];if(e.selection instanceof h.U3&&({from:t,to:n}=e.selection),e.selection instanceof h.i5&&(t=0,n=e.doc.content.size),void 0!==t&&void 0!==n){let a=t,i=n;e.doc.nodesBetween(t,n,(e,t)=>{if(e.isText)return;let n=t+e.nodeSize;t>=a&&n<=i&&r.push(eY.NZ.node(t,t+e.nodeSize,{class:aB.nodeInSelection}))})}return eY.zF.create(e.doc,r)}}}),new h.k_({props:{decorations(e){var t;let n=e.doc;if(1===n.childCount&&null!=(t=n.firstChild)&&t.isTextblock&&0===n.firstChild.content.size){let e=document.createElement("span");return e.className=aB.placeholder,e.textContent='Start writing or press "/" for commands…',eY.zF.create(n,[eY.NZ.widget(1,e)])}}}}),function(e){let t=new Set;for(let n of Object.values(e.nodes))(n.spec.reactNodeView||n.spec.nodeView)&&t.add(n);
105return new h.k_({key:od,state:{init(){let e=new Set;return{nodeViews:new Map,callbacks:e,register:t=>(e.add(t),()=>{e.delete(t)})}},apply:(e,t)=>t},props:{nodeViews:Object.fromEntries([...t].map(e=>[e.name,(t,n,r)=>{if(e.spec.nodeView)return e.spec.nodeView(t,n,r);let a=ol(e),i=document.createElement(e.isInline?"span":"div"),o=null!=a&&a.rendersOwnContent||e.isLeaf?void 0:oc(e.inlineContent?"div":"span"),l=oc(e.inlineContent?"div":"span");i.appendChild(l);let s=`${or++}`,c={contentDOM:o,dom:l,getPos:r,key:s,node:t},d=od.getState(n.state);d.nodeViews.set(s,c);let u=()=>{for(let e of d.callbacks)e()};return u(),{dom:i,contentDOM:o,destroy(){d.nodeViews.delete(s),u()},ignoreMutation:e=>!(null!=o&&o.contains(e.target)),deselectNode(){},selectNode(){},update:t=>t.type===e&&(d.nodeViews.set(s,{...c,node:t}),u(),!0)}}]))}})}(e.type.schema),new h.k_({key:iw,state:{init:()=>({kind:"inactive"}),apply(e,t,n,r){var a;let i=e.getMeta(iw);if((null==i?void 0:i.action)==="add"){let t=eY.NZ.inline(i.from,i.to,{nodeName:"decoration-autocomplete",class:iB},{inclusiveStart:!1,inclusiveEnd:!0});return{kind:"active",trigger:r.doc.textBetween(i.from,i.to,""),decorations:eY.zF.create(e.doc,[t]),component:i.menu,pattern:i.pattern}}if("inactive"===t.kind)return t;let o=t.decorations.map(e.mapping,e.doc),l=o.find();if((null==i?void 0:i.action)==="remove"||(a=e.selection,!(o.find(a.from,a.to).length>0))||1!==l.length)return iS;let{from:s,to:c}=l[0],d=r.doc.textBetween(s,c,"�","�");return t.trigger!==d.slice(0,t.trigger.length)||d.includes("�")||t.pattern&&!t.pattern.test(d)?iS:{...t,decorations:o}}},props:{decorations:e=>{let t=iw.getState(e);return(null==t?void 0:t.kind)==="active"?t.decorations:eY.zF.empty},handlePaste:iR,handleDrop:iR,handleKeyDown(e,t){let n=iw.getState(e.state);return(null==n?void 0:n.kind)==="active"&&"Escape"===t.key&&(iA(e.state.tr),!0)}}}),(0,eX.LF)(),og,new h.k_({props:{decorations(e){let t=ox(e.doc).map(e=>eY.NZ.inline(e.from,e.to,e.attrs));return eY.zF.create(e.doc,t)}}})],doc:e})}function o2(){if(!a)throw Error("state not set");return a}function o3(e){o2().errors.push(e)}function o4(e,t){let n=[];for(let r of e){let e=o8(r,t);e&&(Array.isArray(e)?n.push(...e):n.push(e))}return n}function o6(e,t){return o3(`${e.type} is not allowed`),o4("children"in e?e.children:[],t)}function o9(e,t,n,r){let a=o4("children"in e?e.children:[],t);r&&(a=r(a));let i=t.createAndFill(n,a);return i||o3(`${e.type} has unexpected children`),i}function o5(e,t,n){return t?function(e,t){let n=o2(),r=n.marks;n.marks=e.addToSet(n.marks);try{return t()}finally{n.marks=r}}(t instanceof U.sX?t.create():t,()=>o4("children"in e?e.children:[],n)):o6(e,n)}let o7=e=>t=>{let n=[],r=[];for(let a of t){if(a.isInline){r.push(a);continue}r.length&&(n.push(e.nodes.paragraph.createChecked({},r)),r=[]),n.push(a)}return r.length&&n.push(e.nodes.paragraph.createChecked({},r)),n};function o8(e,t){var n,r,a;let i=o2().schema;if("emphasis"===e.type)return o5(e,i.marks.italic,t);if("inlineCode"===e.type)return i.marks.code?i.schema.text(e.value,[...o2().marks,i.marks.code.create()]):o6(e,t);if("delete"===e.type)return o5(e,i.marks.strikethrough,t);if("strong"===e.type)return o5(e,i.marks.bold,t);if("break"===e.type)return i.nodes.hard_break?i.nodes.hard_break.create():o6(e,t);if("blockquote"===e.type)return i.nodes.blockquote?o9(e,i.nodes.blockquote,{}):o6(e,t);if("heading"===e.type)return i.nodes.heading?o9(e,i.nodes.heading,{level:e.depth}):o6(e,t);if("paragraph"===e.type)return o9(e,i.nodes.paragraph,{});if("root"===e.type)return o9(e,i.nodes.doc,{});if("code"===e.type){if(!i.nodes.code_block)return o6(e,t);let n="string"==typeof e.lang?e.lang:"";return e.meta&&(n+=" "+e.meta),i.nodes.code_block.createAndFill({language:n},i.schema.text(e.value))}if("thematicBreak"===e.type)return i.nodes.divider?o9(e,i.nodes.divider,{}):o6(e,t);if("link"===e.type)return o5(e,null==(n=i.marks.link)?void 0:n.create({href:e.url}),t);if("linkReference"===e.type){let n=o2().definitions.get(e.identifier.toUpperCase());return n?o5(e,null==(r=i.marks.link)?void 0:r.create({href:n.url}),t):(o3(`Could not find definition for ${e.identifier}`),o4(e.children,t))}if("text"===e.type)return i.schema.text(e.value,o2().marks);if("listItem"===e.type)return i.nodes.list_item?o9(e,i.nodes.list_item,{},o7(i)):o6(e,t);if("list"===e.type){let n=e.ordered?i.nodes.ordered_list:i.nodes.unordered_list;return n?o9(e,n,e.ordered&&null!=e.start?{start:e.start}:{}):o6(e,t)}if("table"===e.type)return i.nodes.table?o9(e,i.nodes.table,{}):o6(e,t);if("tableRow"===e.type)return i.nodes.table_row?o9(e,i.nodes.table_row,{}):o6(e,t);if("tableCell"===e.type)return i.nodes.table_cell?o9(e,i.nodes.table_cell,{},o7(i)):o6(e,t);if("mdxJsxFlowElement"===e.type||"mdxJsxTextElement"===e.type){if(!e.name)return o6(e,t);let n=i.components[e.name];if(n){let r=o2(),a={};
105for(let t of e.attributes){if("mdxJsxAttribute"===t.type){if(null==t.value){a[t.name]=!0;continue}try{a[t.name]="string"==typeof t.value?t.value:function(e){(0,q.vA)(1===e.body.length);let t=e.body[0];return(0,q.vA)("ExpressionStatement"===t.type),function e(t){if("Literal"===t.type){let e=t.value;return(0,q.vA)("string"==typeof e||"number"==typeof e||"boolean"==typeof e||null===e),e}if("ArrayExpression"===t.type)return t.elements.map(t=>((0,q.vA)(null!==t&&"SpreadElement"!==t.type),e(t)));if("ObjectExpression"===t.type)return Object.fromEntries(t.properties.map(t=>{(0,q.vA)("Property"===t.type&&!t.computed&&"init"===t.kind);let n=t.key,r="Identifier"===n.type?n.name:"Literal"===n.type?n.value:void 0;return(0,q.vA)("string"==typeof r),[r,e(t.value)]}));throw Error(`Unexpected expression type ${t.type}`)}(t.expression)}(t.value.data.estree)}catch{o3(`${e.type} has unexpected attributes`)}continue}o3(`${e.type} has unexpected attributes`)}let o=aq(n.schema,a,r);if("mark"===n.kind)return"mdxJsxFlowElement"===e.type?o6(e,t):o5(e,i.schema.marks[e.name].create({props:aV(o,n.schema)}),t);let l=i.schema.nodes[e.name],s=l.createAndFill({props:aV(o,n.schema)},o4(e.children,l));return(s||o3(`${e.type} has unexpected children`),"inline"!==n.kind||null!=t&&t.isTextblock)?s:i.nodes.paragraph.createAndFill({},s)}return o3(`Missing component definition for ${e.name}`),o4("children"in e?e.children:[],t)}if("image"===e.type||"imageReference"===e.type){let t="image"===e.type?e:o2().definitions.get(e.identifier.toUpperCase());if(!t)return o3(`Could not find definition for ${e.identifier}`),null;let n=ix(i.config,o2().slug),r=decodeURI(t.url).slice(n.length),o=null==(a="object"==typeof i.config.image&&"string"==typeof i.config.image.directory?o2().otherFiles.get((0,V.a_)(i.config.image.directory)):o2().extraFiles)?void 0:a.get(r);return o&&i.nodes.image?i.nodes.image.createChecked({src:o,alt:e.alt,title:t.title,filename:r}):i.schema.text(`![${e.alt||""}](${t.url||""}${t.title?` "${t.title}"`:""})`)}return"definition"===e.type?[]:(o3(`Unhandled type ${e.type}: ${(0,e4.l)(e,{extensions:[(0,eq.r)(),(0,eH.K)(),(0,e6.d)(),(0,e9.e)()],rule:"-"})}`),null)}function le(e){return Object.entries(e).map(([e,t])=>({type:"mdxJsxAttribute",name:e,value:!0===t?null:"string"==typeof t?t:{type:"mdxJsxAttributeValueExpression",value:JSON.stringify(t)}}))}function lt(e,t){let n=[];return e.content.forEach(e=>{n.push(t(e))}),n}function ln(e){return{type:"listItem",spread:(2!==e.length||"paragraph"!==e[0].type||"list"!==e[1].type)&&void 0,children:e}}function lr(e){return o1(e.nodes.doc.createAndFill())}function la(e,t,n,r,a){return o1(oJ((0,i.qg)(e),t,n,r,a))}function li(e,t){let n=new Map,r=new Map,a=oU(e.doc,{extraFiles:n,otherFiles:r,schema:ic(e.schema),slug:t}),o=(0,i.GP)(a);return{content:(0,i.GP)((0,i.qg)(o)),other:n,external:r}}function lo(e,t,n,r,i){return o1(function(e,t,n,r,i){a={schema:t,errors:[],marks:[],extraFiles:null!=n?n:new Map,otherFiles:null!=r?r:new Map,slug:i,definitions:new Map},(0,e8.YR)(e,e=>{if("definition"===e.type){let t=String(e.identifier).toUpperCase();o2().definitions.has(t)||o2().definitions.set(t,e)}});try{let t=o8(e,void 0);if(a.errors.length)throw Error(a.errors.join("\n"));if(!(t instanceof U.bP))throw Error("unexpected node");return t}finally{a=void 0}}((0,eK.Y)(e,{extensions:[(0,e7.d)(),(0,eV.$)(),(0,eG.K)(),(0,e5.x)()],mdastExtensions:[(0,e9.r)(),(0,eq.C)(),(0,eH.p)(),(0,e6.c)()]}),t,n,r,i))}function ll(e,t){var n,r;let a=new Map,i=new Map,o=(n=e.doc,r={extraFiles:a,otherFiles:i,schema:ic(e.schema),slug:t},{type:"root",children:function e(t,n){let r=[];return t.forEach(t=>{r.push(function(t,n){let r=t=>e(t,n),a=e=>oL(e,e=>({type:"text",value:e}),e=>(function(e,t){let{schema:n}=t;if(e.type===n.nodes.hard_break)return{type:"break"};if(e.type===n.nodes.image){let{src:n,filename:r}=e.attrs;if("object"==typeof t.schema.config.image&&"string"==typeof t.schema.config.image.directory){let e=(0,V.a_)(t.schema.config.image.directory);t.otherFiles.has(e)||t.otherFiles.set(e,new Map),t.otherFiles.get(e).set(r,n)}else t.extraFiles.set(r,n);return{type:"image",url:encodeURI(`${ix(t.schema.config,t.slug)}${e.attrs.filename}`),alt:e.attrs.alt,title:e.attrs.title}}let r=t.schema.components[e.type.name];return(null==r?void 0:r.kind)==="inline"?{type:"mdxJsxTextElement",name:e.type.n
105ame,attributes:le(aG(r.schema,e.attrs.props,t)),children:[]}:void 0!==e.text?{type:e.marks.some(e=>e.type===n.marks.code)?"inlineCode":"text",value:e.text}:void 0})(e,n),e=>(function(e,t){let n,{schema:r}=t;if(e.type===r.marks.code)return;let a=r.components[e.type.name];return a?{type:"mdxJsxTextElement",name:e.type.name,attributes:le(aG(a.schema,e.attrs.props,t)),children:[]}:(e.type===r.marks.bold&&(n="strong"),e.type===r.marks.italic&&(n="emphasis"),e.type===r.marks.strikethrough&&(n="delete"),n)?{type:n,children:[]}:e.type===r.marks.link?{type:"link",url:e.attrs.href,title:e.attrs.title,children:[]}:void 0})(e,n)),i=ic(t.type.schema);if(t.type===i.nodes.paragraph)return{type:"paragraph",children:a(t.content)};if(t.type===i.nodes.blockquote)return{type:"blockquote",children:r(t.content)};if(t.type===i.nodes.divider)return{type:"thematicBreak"};if(t.type===i.nodes.table)return{type:"table",children:lt(t,e=>({type:"tableRow",children:lt(e,e=>({type:"tableCell",children:a(e.content.child(0).content)}))}))};if(t.type===i.nodes.heading)return{type:"heading",depth:t.attrs.level,children:a(t.content)};if(t.type===i.nodes.code_block){var o;let e="string"==typeof t.attrs.language&&"plain"!==t.attrs.language?t.attrs.language:void 0,n=null;return null!=(o=e)&&o.includes(" ")&&([e,n]=e.split(" ",2)),{type:"code",lang:e,meta:n,value:t.textContent}}if(t.type===i.nodes.ordered_list)return{type:"list",ordered:!0,spread:!1,start:t.attrs.start,children:lt(t,e=>ln(r(e.content)))};if(t.type===i.nodes.unordered_list)return{type:"list",spread:!1,children:lt(t,e=>ln(r(e.content)))};let l=t.type.name,s=i.components[l];if(s){let e="wrapper"===s.kind||"repeating"===s.kind?r(t.content):[];return{type:"mdxJsxFlowElement",name:l,attributes:le(aG(s.schema,t.attrs.props,n)),children:e}}return{type:"paragraph",children:a(t.content)}}(t,n))}),r}(n.content,r)});return{content:(0,e4.l)(o,{extensions:[(0,eq.r)(),(0,eH.K)(),(0,e6.d)(),(0,e9.e)()],rule:"-"}),other:a,external:i}}function ls(e){let t,n,r,a=(0,o.c)(12),i=tZ();a[0]!==e.label||a[1]!==e.description?(t={label:e.label,labelElementType:"span",description:e.description},a[0]=e.label,a[1]=e.description,a[2]=t):t=a[2];let s=t;if("main"===i){let t;a[3]!==e.label?(t={"aria-label":e.label},a[3]=e.label,a[4]=t):t=a[4],s=t}let c="main"===i?"100%":void 0;return a[5]!==e.value||a[6]!==e.onChange?(n=t=>(0,H.jsx)(oy,{...t,value:e.value,onChange:e.onChange}),a[5]=e.value,a[6]=e.onChange,a[7]=n):n=a[7],a[8]!==c||a[9]!==s||a[10]!==n?(r=(0,H.jsx)(l.D0,{height:c,...s,children:n}),a[8]=c,a[9]=s,a[10]=n,a[11]=r):r=a[11],r}function lc(e,t,n){return o1((0,eM.au)(e.schema,t),void 0,void 0,t,n)}let ld=(0,V.b0)({label:"Alt text",description:"This text will be used by screen readers and search engines."}),lu=(0,V.a$)({Input:()=>null,defaultValue:()=>"",parse(e){if(void 0===e)return"";if("string"!=typeof e)throw new V.ar("Must be string");return e},validate:e=>e,serialize:e=>({value:e}),label:"Title"});function lp(e){var t,n,r,a,i,o,l,s,c,d;let u,p;return{bold:null==(t=e.bold)||t,italic:null==(n=e.italic)||n,strikethrough:null==(r=e.strikethrough)||r,code:null==(a=e.code)||a,heading:(u=[],(!0===(p="object"!=typeof e.heading||Array.isArray(e.heading)?e.heading:e.heading.levels)||void 0===p)&&(u=[1,2,3,4,5,6]),Array.isArray(p)&&(u=p),{levels:u,schema:e.heading&&"object"==typeof e.heading&&"schema"in e.heading?e.heading.schema:{}}),blockquote:null==(i=e.blockquote)||i,orderedList:null==(o=e.orderedList)||o,unorderedList:null==(l=e.unorderedList)||l,table:null==(s=e.table)||s,link:null==(c=e.link)||c,image:!1!==e.image?((t,n,r,a,i)=>{let o=!0===e.image?void 0:e.image;return{directory:null==o?void 0:o.directory,publicPath:null==o?void 0:o.publicPath,transformFilename:null!=(t=null==o?void 0:o.transformFilename)?t:e=>e,schema:{alt:null!=(n=null==o||null==(r=o.schema)?void 0:r.alt)?n:ld,title:null!=(a=null==o||null==(i=o.schema)?void 0:i.title)?a:lu}}})():void 0,divider:null==(d=e.divider)||d,codeBlock:!1===e.codeBlock?void 0:{schema:"object"==typeof e.codeBlock?e.codeBlock.schema:{}}}}function lh(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,function(e){if("object"===e.kind||"conditional"===e.kind)return{type:Object,required:!0};if("array"===e.kind)return{type:Array,required:!0};if("child"===e.kind)return{};if(void 0===e.formKind){if("string"==typeof e.defaultValue&&"options"in e&&Array.isArray(e.options)&&e.options.every(e=>"object"==typeof e&&null!==e&&"value"in e&&"string"==typeof e.value))return{type:String,matches:e.options.map(e=>e.value),required:!0};if("string"==typeof e.defaultValue){let t=!1;try{e.parse("")}catch{t=!0}return{type:String,required:t}}try{return e.parse(1),{type:Number}}catch{}return"boolean"==typeof e.defaultValue?{type:Boolean,required:!0}:{}}if("slug"===e.formKind){let t=!1;try{e.parse("",void 0)}catch{t=!0}return{type:String,required:t}}if("asset"===e.formKind){let t=!1;try{e.validate(null)}catch{t=!0}return{type:String,required:t}}return{}}(t)]))}let lg=new TextDecoder,lf=new TextEncoder;
105function lm(e,t){return[...(0,V.b1)((0,V.o)(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(0,V.o)(t.schema)])))),..."object"==typeof t.image&&"string"==typeof t.image.directory?[(0,V.a_)(t.image.directory)]:[]]}function lb({label:e,description:t,options:n={},components:r={},extension:a="mdoc"}){let o,l=lp(n),s=()=>(o||(o=il(l,r,!1)),o);return{kind:"form",formKind:"content",defaultValue:()=>lr(s()),Input:n=>(0,H.jsx)(ls,{description:t,label:e,...n}),parse:(e,{content:t,other:n,external:r,slug:a})=>la(lg.decode(t),s(),n,r,a),contentExtension:`.${a}`,validate:e=>e,directories:lm(r,l),serialize(e,{slug:t}){let n=li(e,t);return{content:lf.encode(n.content),external:n.external,other:n.other,value:void 0}},reader:{parse:(e,{content:t})=>{let n=lg.decode(t);return{node:(0,i.qg)(n)}}},collaboration:{toYjs:e=>(0,eM.g4)(e.doc),fromYjs:(e,t)=>lc(s(),e,t)}}}function ly({label:e,description:t,options:n={},components:r={},extension:a="mdx"}){let i,o=lp(n),l=()=>(i||(i=il(o,r,!0)),i);return{kind:"form",formKind:"content",defaultValue:()=>lr(l()),Input:n=>(0,H.jsx)(ls,{description:t,label:e,...n}),parse:(e,{content:t,other:n,external:r,slug:a})=>lo(lg.decode(t),l(),n,r,a),contentExtension:`.${a}`,validate:e=>e,directories:lm(r,o),serialize(e,{slug:t}){let n=ll(e,t);return{content:lf.encode(n.content),external:n.external,other:n.other,value:void 0}},reader:{parse:(e,{content:t})=>lg.decode(t)},collaboration:{toYjs:e=>(0,eM.g4)(e.doc),fromYjs:(e,t)=>lc(l(),e,t)}}}lb.createMarkdocConfig=function(e){var t,n;let r=lp(e.options||{}),a={nodes:{...i.a9},tags:{}};for(let[n,o]of(r.heading.levels.length?a.nodes.heading={...i.a9.heading,attributes:{...i.a9.heading.attributes,...lh(r.heading.schema)}}:a.nodes.heading=void 0,r.blockquote||(a.nodes.blockquote=void 0),r.codeBlock?a.nodes.fence={...i.a9.fence,attributes:{...i.a9.fence.attributes,...lh(r.codeBlock.schema)}}:a.nodes.fence=void 0,r.orderedList||r.unorderedList||(a.nodes.list=void 0),r.bold||(a.nodes.strong=void 0),r.italic||(a.nodes.em=void 0),r.strikethrough||(a.nodes.s=void 0),r.link||(a.nodes.link=void 0),r.image||(a.nodes.image=void 0),r.divider||(a.nodes.hr=void 0),r.table||(a.nodes.table=void 0),Object.entries(e.components||{}))){let r="block"===o.kind||"inline"===o.kind;a.tags[n]={render:null==(t=e.render)||null==(t=t.tags)?void 0:t[n],children:r?[]:void 0,selfClosing:r,attributes:lh(o.schema),description:"description"in o?o.description:void 0,inline:"inline"===o.kind||"mark"===o.kind}}for(let[t,r]of Object.entries((null==(n=e.render)?void 0:n.nodes)||{})){let e=a.nodes[t];e&&(e.render=r)}return a},lb.inline=function({label:e,description:t,options:n={},components:r={}}){let a,o=lp(n),l=()=>(a||(a=il(o,r,!1)),a);return{kind:"form",formKind:"assets",defaultValue:()=>lr(l()),Input:n=>(0,H.jsx)(ls,{description:t,label:e,...n}),parse:(e,{other:t,external:n,slug:r})=>{if(void 0===e&&(e=""),"string"!=typeof e)throw new V.ar("Must be a string");return la(e,l(),t,n,r)},validate:e=>e,directories:lm(r,o),serialize(e,{slug:t}){let n=li(e,t);return{external:n.external,other:n.other,value:n.content}},reader:{parse:e=>{if(void 0===e&&(e=""),"string"!=typeof e)throw new V.ar("Must be a string");return{node:(0,i.qg)(e)}}},collaboration:{toYjs:e=>(0,eM.g4)(e.doc),fromYjs:(e,t)=>lc(l(),e,t)}}},ly.inline=function({label:e,description:t,options:n={},components:r={}}){let a,i=lp(n),o=()=>(a||(a=il(i,r,!0)),a);return{kind:"form",formKind:"assets",defaultValue:()=>lr(o()),Input:n=>(0,H.jsx)(ls,{description:t,label:e,...n}),parse:(e,{other:t,external:n,slug:r})=>{if(void 0===e&&(e=""),"string"!=typeof e)throw new V.ar("Must be a string");return lo(e,o(),t,n,r)},validate:e=>e,directories:lm(r,i),serialize(e,{slug:t}){let n=ll(e,t);return{external:n.external,other:n.other,value:n.content}},reader:{parse:e=>{if(void 0===e&&(e=""),"string"!=typeof e)throw new V.ar("Must be a string");return e}},collaboration:{toYjs:e=>(0,eM.g4)(e.doc),fromYjs:(e,t)=>lc(o(),e,t)}}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.